\ No newline at end of file
diff --git a/web-app/build/static/js/1011.13d372c8.chunk.js b/web-app/build/static/js/1011.13d372c8.chunk.js
deleted file mode 100644
index 3b30dc018..000000000
--- a/web-app/build/static/js/1011.13d372c8.chunk.js
+++ /dev/null
@@ -1,2 +0,0 @@
-(self.webpackChunkweb_app=self.webpackChunkweb_app||[]).push([[1011],{99956:(e,t,o)=>{"use strict";o.d(t,{X:()=>a});o(65043);var n=o(24241),r=o(70579);const a=[{label:"Access Key",elementKey:"accessKey"},{label:"Expiry",elementKey:"expiration",renderFunction:e=>{if(e){const t=n.c9.fromISO(e).toUTC().toFormat("y/M/d hh:mm:ss z");return(0,r.jsx)("span",{title:t,children:t})}return""}},{label:"Status",elementKey:"accountStatus",renderFunction:e=>"off"===e?"Disabled":"Enabled"},{label:"Name",elementKey:"name"},{label:"Description",elementKey:"description"}]},10158:(e,t,o)=>{"use strict";o.d(t,{A:()=>y});var n=o(65043),r=o(89923),a=o(56629),i=o(53518),l=o(41206),c=o(20554),s=o(56483),u=o(64159),p=o(94141),d=o(77403),f=o(24241),m=o(70579);const y=e=>{let{open:t,selectedAccessKey:o,closeModalAndRefresh:y}=e;const b=(0,c.jL)(),[h,g]=(0,n.useState)(!1),[x,v]=(0,n.useState)(""),[C,S]=(0,n.useState)(""),[w,j]=(0,n.useState)(""),[k,E]=(0,n.useState)(),[_,A]=(0,n.useState)("enabled");(0,n.useEffect)((()=>{if(!h&&""!==o){const e=(0,s.nf)(o);g(!0),a.F.serviceAccounts.getServiceAccount(e).then((e=>{g(!1);const t=e.data;S((null===t||void 0===t?void 0:t.name)||""),null!==t&&void 0!==t&&t.expiration&&E(f.c9.fromISO(null===t||void 0===t?void 0:t.expiration)),j((null===t||void 0===t?void 0:t.description)||""),A(t.accountStatus),v(t.policy||"")})).catch((e=>{g(!1),b((0,u.Dy)((0,i.S)(e)))}))}}),[o]);return(0,m.jsx)(p.A,{title:"Edit details of - ".concat(o),modalOpen:t,onClose:()=>{y()},titleIcon:(0,m.jsx)(r.uYH,{}),children:(0,m.jsx)("form",{noValidate:!0,autoComplete:"off",onSubmit:e=>{var t;t=x,e.preventDefault(),a.F.serviceAccounts.updateServiceAccount((0,s.nf)(o),{policy:t,description:w,expiry:k,name:C,status:_}).then((()=>{y()})).catch((async e=>{const t=await e.json();b((0,u.C9)((0,i.S)(t)))}))},children:(0,m.jsxs)(r.xA9,{container:!0,children:[(0,m.jsx)(r.xA9,{item:!0,xs:12,children:(0,m.jsx)(l.A,{label:"Access Key Policy",value:x,onChange:e=>{v(e)},editorHeight:"350px",helptip:(0,m.jsx)(n.Fragment,{children:(0,m.jsx)("a",{target:"blank",href:"https://min.io/docs/minio/kubernetes/upstream/administration/identity-access-management/policy-based-access-control.html#policy-document-structure",children:"Guide to access policy structure"})})})}),(0,m.jsx)(r.azJ,{sx:{marginBottom:"15px",marginTop:"15px",display:"flex",width:"100%","& label":{width:"195px"}},children:(0,m.jsx)(r.e8j,{noLabelMinWidth:!0,value:k,onChange:e=>{E(e)},id:"expiryTime",label:"Expiry",timeFormat:"24h",secondsSelector:!1})}),(0,m.jsx)(r.xA9,{xs:12,sx:{marginBottom:"15px"},children:(0,m.jsx)(r.cl_,{value:C,size:120,label:"Name",id:"name",name:"name",type:"text",placeholder:"Enter a name",onChange:e=>{S(e.target.value)}})}),(0,m.jsx)(r.xA9,{xs:12,sx:{marginBottom:"15px"},children:(0,m.jsx)(r.cl_,{size:120,value:w,label:"Description",id:"description",name:"description",type:"text",placeholder:"Enter a description",onChange:e=>{j(e.target.value)}})}),(0,m.jsxs)(r.xA9,{xs:12,sx:{display:"flex",alignItems:"center",justifyContent:"start",fontWeight:600,color:"rgb(7, 25, 62)",gap:2,marginBottom:"15px"},children:[(0,m.jsx)("label",{style:{width:"150px"},children:"Status"}),(0,m.jsx)(r.azJ,{sx:{padding:"2px"},children:(0,m.jsx)(r.dOG,{style:{gap:"115px"},indicatorLabels:["Enabled","Disabled"],checked:"on"===_,id:"saStatus",name:"saStatus",label:"",onChange:e=>{A(e.target.checked?"on":"off")},value:"yes"})})]}),(0,m.jsxs)(r.xA9,{item:!0,xs:12,sx:d.Uz.modalButtonBar,children:[(0,m.jsx)(r.$nd,{id:"cancel-sa-policy",type:"button",variant:"regular",onClick:()=>{y()},disabled:h,label:"Cancel"}),(0,m.jsx)(r.$nd,{id:"save-sa-policy",type:"submit",variant:"callAction",color:"primary",disabled:h,label:"Update"})]})]})})})}},72237:(e,t,o)=>{"use strict";o.d(t,{A:()=>a});var n=o(65043),r=o(70579);const a=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return function(o){return(0,r.jsx)(n.Suspense,{fallback:t,children:(0,r.jsx)(e,{...o})})}}},41206:(e,t,o)=>{"use strict";o.d(t,{A:()=>s});var n=o(65043),r=o(89923),a=o(61476),i=o.n(a),l=o(6681),c=o(70579);const s=e=>{let{value:t,label:o="",tooltip:a="",mode:s="json",onChange:u,editorHeight:p=250,helptip:d}=e;return(0,c.jsx)(r.BYM,{value:t,onChange:e=>u(e),mode:s,tooltip:a,editorHeight:p,label:o,helpTools:(0,c.jsx)(n.Fragment,{children:(0,c.jsx)(l.A,{tooltip:"Copy to Clipboard",children:(0,c.jsx)(i(),{text:t,children:(0,c.jsx)(r.$nd,{type:"button",id:"copy-code-mirror",icon:(0,c.jsx)(r.TdU,{}),color:"primary",variant:"regular"})})})}),helpTip:d,helpTipPlacement:"right"})}},45479:(e,t,o)=>{"use strict";o.d(t,{Ck:()=>a,PE:()=>i,Qm:()=>c,Xm:()=>l,uu:()=>s});o(65043);var n=o(89923),r=o(70579);const a=[{icon:(0,r.jsx)(n.DzZ,{}),configuration_id:"region",configuration_label:"Region"},{icon:(0,r.jsx)(n.MZJ,{}),configuration_id:"compression",configuration_label:"Compression"},{icon:(0,r.jsx)(n.loI,{}),configuration_id:"api",configuration_label:"API"},{icon:(0,r.jsx)(n.qm4,{}),configuration_id:"heal",configuration_label:"Heal"},{icon:(0,r.jsx)(n.Pq3,{}),configuration_id:"scanner",configuration_label:"Scanner"},{icon:(0,r.jsx)(n.RYV,{}),configuration_id:"etcd",configuration_label:"Etcd"},{icon:(0,r.jsx)(n.D0K,{}),configuration_id:"logger_webhook",configuration_label:"Logger Webhook"},{icon:(0,r.jsx)(n.rBG,{}),configuration_id:"audit_webhook",configuration_label:"Audit Webhook"},{icon:(0,r.jsx)(n.Dk$,{}),configuration_id:"audit_kafka",configuration_label:"Audit Kafka"}],i={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 custom notes if any"}],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}],api:[{name:"requests_max",required:!1,label:"Requests Max",tooltip:"Maximum number of concurrent requests, e.g. '1600'",type:"number",placeholder:"Enter Requests Max"},{name:"cors_allow_origin",required:!1,label:"Cors Allow Origin",tooltip:"List of origins allowed for CORS requests",type:"csv",placeholder:"Enter allowed origin e.g. https://example.com"},{name:"replication_workers",required:!1,label:"Replication Workers",tooltip:"Number of replication workers, defaults to 100",type:"number",placeholder:"Enter Replication Workers"},{name:"replication_failed_workers",required:!1,label:"Replication Failed Workers",tooltip:"Number of replication workers for recently failed replicas, defaults to 4",type:"number",placeholder:"Enter Replication Failed Workers"}],heal:[{name:"bitrotscan",required:!1,label:"Bitrot Scan",tooltip:"Perform bitrot scan on disks when checking objects during scanner",type:"on|off"},{name:"max_sleep",required:!1,label:"Max Sleep",tooltip:"Maximum sleep duration between objects to slow down heal operation, e.g. 2s",type:"duration",placeholder:"Enter Max Sleep Duration"},{name:"max_io",required:!1,label:"Max IO",tooltip:"Maximum IO requests allowed between objects to slow down heal operation, e.g. 3",type:"number",placeholder:"Enter Max IO"}],scanner:[{name:"delay",required:!1,label:"Delay Multiplier",tooltip:"Scanner delay multiplier, defaults to '10.0'",type:"number",placeholder:"Enter Delay"},{name:"max_wait",required:!1,label:"Max Wait",tooltip:"Maximum wait time between operations, defaults to '15s'",type:"duration",placeholder:"Enter Max Wait"},{name:"cycle",required:!1,label:"Cycle",tooltip:"Time duration between scanner cycles, defaults to '1m'",type:"duration",placeholder:"Enter Cycle"}],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 custom notes if any"}],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"}],audit_kafka:[{name:"enable",required:!1,label:"Enable",tooltip:"Enable audit_kafka target",type:"on|off",customValueProcess:e=>""===e||"on"===e?"on":"off"},{name:"brokers",required:!0,label:"Brokers",type:"csv",placeholder:"Enter Kafka Broker"},{name:"topic",required:!1,label:"Topic",type:"string",placeholder:"Enter Kafka Topic",tooltip:"Kafka topic used for bucket notifications"},{name:"sasl",required:!1,label:"Use SASL",tooltip:"Enable SASL (Simple Authentication and Security Layer) authentication",type:"on|off"},{name:"sasl_username",required:!1,label:"SASL Username",type:"string",placeholder:"Enter SASL Username",tooltip:"Username for SASL/PLAIN or SASL/SCRAM authentication"},{name:"sasl_password",required:!1,label:"SASL Password",type:"password",placeholder:"Enter SASL Password",tooltip:"Password for SASL/PLAIN or SASL/SCRAM authentication"},{name:"sasl_mechanism",required:!1,label:"SASL Mechanism",type:"string",placeholder:"Enter SASL Mechanism",tooltip:"SASL authentication mechanism"},{name:"tls",required:!1,label:"Use TLS",tooltip:"Enable TLS (Transport Layer Security)",type:"on|off"},{name:"tls_skip_verify",required:!1,label:"Skip TLS Verification",tooltip:"Trust server TLS without verification",type:"on|off"},{name:"client_tls_cert",required:!1,label:"Client Cert",tooltip:"Client cert for mTLS authentication",type:"string",placeholder:"Enter Client Cert"},{name:"client_tls_key",required:!1,label:"Client Cert Key",tooltip:"Client cert key for mTLS authentication",type:"string",placeholder:"Enter Client Cert Key"},{name:"tls_client_auth",required:!1,label:"TLS Client Auth",tooltip:"ClientAuth determines the Kafka server's policy for TLS client authorization",type:"string"},{name:"version",required:!1,label:"Version",tooltip:"Specify the version of the Kafka cluster",type:"string"}]},l=e=>e.filter((e=>""!==e.value)),c=(e,t,o)=>{const n=e.target,r=n.value;let a=[...o];return n.checked?a.push(r):a=a.filter((e=>e!==r)),t(a),a},s=e=>{let t={};return e.forEach((e=>{if(e.env_override){const o={value:e.env_override.value||"",overrideEnv:e.env_override.name||""};t={...t,[e.key]:o}}})),t}},68045:(e,t,o)=>{"use strict";o.d(t,{A:()=>p});var n=o(65043),r=o(89923),a=o(58661),i=o(64159),l=o(20554),c=o(56629),s=o(53518),u=o(70579);const p=e=>{let{closeDeleteModalAndRefresh:t,deleteOpen:o,selectedSAs:p}=e;const d=(0,l.jL)(),[f,m]=(0,n.useState)(!1);if(!p)return null;return(0,u.jsx)(a.A,{title:"Delete Access Keys",confirmText:"Delete",isOpen:o,titleIcon:(0,u.jsx)(r.xWY,{}),isLoading:f,onConfirm:()=>{m(!0),c.F.serviceAccounts.deleteMultipleServiceAccounts(p).then((e=>{t(!0)})).catch((async e=>{const o=await e.json();d((0,i.C9)((0,s.S)(o))),t(!1)})).finally((()=>m(!1)))},onClose:()=>t(!1),confirmationContent:(0,u.jsxs)(n.Fragment,{children:["Are you sure you want to delete the selected ",p.length," ","Access Keys?"," "]})})}},8185:(e,t,o)=>{"use strict";o.d(t,{Hw:()=>r,LA:()=>n,SO:()=>a,rY:()=>i});const n=(e,t)=>{if(e.accessKey&&t.accessKey){if(e.accessKey>t.accessKey)return 1;if(e.accessKeye.name>t.name?1:e.namee>t?1:ee.policy>t.policy?1:e.policy{"use strict";var n=o(40139),r={"text/plain":"Text","text/html":"Url",default:"Text"};e.exports=function(e,t){var o,a,i,l,c,s,u=!1;t||(t={}),o=t.debug||!1;try{if(i=n(),l=document.createRange(),c=document.getSelection(),(s=document.createElement("span")).textContent=e,s.ariaHidden="true",s.style.all="unset",s.style.position="fixed",s.style.top=0,s.style.clip="rect(0, 0, 0, 0)",s.style.whiteSpace="pre",s.style.webkitUserSelect="text",s.style.MozUserSelect="text",s.style.msUserSelect="text",s.style.userSelect="text",s.addEventListener("copy",(function(n){if(n.stopPropagation(),t.format)if(n.preventDefault(),"undefined"===typeof n.clipboardData){o&&console.warn("unable to use e.clipboardData"),o&&console.warn("trying IE specific stuff"),window.clipboardData.clearData();var a=r[t.format]||r.default;window.clipboardData.setData(a,e)}else n.clipboardData.clearData(),n.clipboardData.setData(t.format,e);t.onCopy&&(n.preventDefault(),t.onCopy(n.clipboardData))})),document.body.appendChild(s),l.selectNodeContents(s),c.addRange(l),!document.execCommand("copy"))throw new Error("copy command was unsuccessful");u=!0}catch(p){o&&console.error("unable to copy using execCommand: ",p),o&&console.warn("trying IE specific stuff");try{window.clipboardData.setData(t.format||"text",e),t.onCopy&&t.onCopy(window.clipboardData),u=!0}catch(p){o&&console.error("unable to copy using clipboardData: ",p),o&&console.error("falling back to prompt"),a=function(e){var t=(/mac os x/i.test(navigator.userAgent)?"\u2318":"Ctrl")+"+C";return e.replace(/#{\s*key\s*}/g,t)}("message"in t?t.message:"Copy to clipboard: #{key}, Enter"),window.prompt(a,e)}}finally{c&&("function"==typeof c.removeRange?c.removeRange(l):c.removeAllRanges()),s&&document.body.removeChild(s),i()}return u}},24480:(e,t,o)=>{"use strict";function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.CopyToClipboard=void 0;var r=l(o(65043)),a=l(o(75270)),i=["text","onCopy","options","children"];function l(e){return e&&e.__esModule?e:{default:e}}function c(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),o.push.apply(o,n)}return o}function s(e){for(var t=1;t=0||(r[o]=e[o]);return r}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,o)&&(r[o]=e[o])}return r}function p(e,t){for(var o=0;o{"use strict";var n=o(24480).CopyToClipboard;n.CopyToClipboard=n,e.exports=n},40139:e=>{e.exports=function(){var e=document.getSelection();if(!e.rangeCount)return function(){};for(var t=document.activeElement,o=[],n=0;n.\n\nimport React from \"react\";\nimport { DateTime } from \"luxon\";\n\nexport const ACCOUNT_TABLE_COLUMNS = [\n { label: \"Access Key\", elementKey: \"accessKey\" },\n {\n label: \"Expiry\",\n elementKey: \"expiration\",\n renderFunction: (expTime: string) => {\n if (expTime) {\n const fmtDate = DateTime.fromISO(expTime)\n .toUTC()\n .toFormat(\"y/M/d hh:mm:ss z\");\n\n return {fmtDate};\n }\n return \"\";\n },\n },\n {\n label: \"Status\",\n elementKey: \"accountStatus\",\n renderFunction: (status: string) => {\n if (status === \"off\") {\n return \"Disabled\";\n } else {\n return \"Enabled\";\n }\n },\n },\n { label: \"Name\", elementKey: \"name\" },\n { label: \"Description\", elementKey: \"description\" },\n];\n","// This file is part of MinIO Console Server\n// Copyright (c) 2022 MinIO, Inc.\n//\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU Affero General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU Affero General Public License for more details.\n//\n// You should have received a copy of the GNU Affero General Public License\n// along with this program. If not, see .\n\nimport React, { useEffect, useState, Fragment } from \"react\";\nimport {\n Box,\n Button,\n ChangeAccessPolicyIcon,\n DateTimeInput,\n Grid,\n InputBox,\n Switch,\n} from \"mds\";\nimport { api } from \"api\";\nimport { errorToHandler } from \"api/errors\";\nimport CodeMirrorWrapper from \"../Common/FormComponents/CodeMirrorWrapper/CodeMirrorWrapper\";\nimport { ApiError } from \"api/consoleApi\";\nimport { useAppDispatch } from \"store\";\nimport { encodeURLString } from \"common/utils\";\nimport { setErrorSnackMessage, setModalErrorSnackMessage } from \"systemSlice\";\nimport ModalWrapper from \"../Common/ModalWrapper/ModalWrapper\";\nimport { modalStyleUtils } from \"../Common/FormComponents/common/styleLibrary\";\nimport { DateTime } from \"luxon\";\n\ninterface IServiceAccountPolicyProps {\n open: boolean;\n selectedAccessKey: string | null;\n closeModalAndRefresh: () => void;\n}\n\nconst EditServiceAccount = ({\n open,\n selectedAccessKey,\n closeModalAndRefresh,\n}: IServiceAccountPolicyProps) => {\n const dispatch = useAppDispatch();\n const [loading, setLoading] = useState(false);\n const [policyDefinition, setPolicyDefinition] = useState(\"\");\n\n const [name, setName] = useState(\"\");\n const [description, setDescription] = useState(\"\");\n const [expiry, setExpiry] = useState();\n const [status, setStatus] = useState(\"enabled\");\n\n useEffect(() => {\n if (!loading && selectedAccessKey !== \"\") {\n const sourceAccKey = encodeURLString(selectedAccessKey);\n setLoading(true);\n api.serviceAccounts\n .getServiceAccount(sourceAccKey)\n .then((res) => {\n setLoading(false);\n const saInfo = res.data;\n\n setName(saInfo?.name || \"\");\n\n if (saInfo?.expiration) {\n setExpiry(DateTime.fromISO(saInfo?.expiration));\n }\n\n setDescription(saInfo?.description || \"\");\n setStatus(saInfo.accountStatus);\n\n setPolicyDefinition(saInfo.policy || \"\");\n })\n .catch((err) => {\n setLoading(false);\n dispatch(setModalErrorSnackMessage(errorToHandler(err)));\n });\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [selectedAccessKey]);\n\n const setPolicy = (event: React.FormEvent, newPolicy: string) => {\n event.preventDefault();\n api.serviceAccounts\n .updateServiceAccount(encodeURLString(selectedAccessKey), {\n policy: newPolicy,\n description: description,\n expiry: expiry,\n name: name,\n status: status,\n })\n .then(() => {\n closeModalAndRefresh();\n })\n .catch(async (res) => {\n const err = (await res.json()) as ApiError;\n dispatch(setErrorSnackMessage(errorToHandler(err)));\n });\n };\n\n return (\n {\n closeModalAndRefresh();\n }}\n titleIcon={}\n >\n \n \n );\n};\n\nexport default EditServiceAccount;\n","// This file is part of MinIO Console Server\n// Copyright (c) 2021 MinIO, Inc.\n//\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU Affero General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU Affero General Public License for more details.\n//\n// You should have received a copy of the GNU Affero General Public License\n// along with this program. If not, see .\n\nimport React, { ComponentType, Suspense, SuspenseProps } from \"react\";\n\nfunction withSuspense
(\n WrappedComponent: ComponentType
,\n fallback: SuspenseProps[\"fallback\"] = null,\n) {\n function ComponentWithSuspense(props: P) {\n return (\n \n \n \n );\n }\n\n return ComponentWithSuspense;\n}\n\nexport default withSuspense;\n","// This file is part of MinIO Console Server\n// Copyright (c) 2021 MinIO, Inc.\n//\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU Affero General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU Affero General Public License for more details.\n//\n// You should have received a copy of the GNU Affero General Public License\n// along with this program. If not, see .\n\nimport React, { Fragment } from \"react\";\nimport { Button, CodeEditor, CopyIcon } from \"mds\";\nimport CopyToClipboard from \"react-copy-to-clipboard\";\nimport TooltipWrapper from \"../../TooltipWrapper/TooltipWrapper\";\n\ninterface ICodeWrapper {\n value: string;\n label?: string;\n mode?: string;\n tooltip?: string;\n onChange: (value: string) => any;\n editorHeight?: string | number;\n helptip?: any;\n}\n\nconst CodeMirrorWrapper = ({\n value,\n label = \"\",\n tooltip = \"\",\n mode = \"json\",\n onChange,\n editorHeight = 250,\n helptip,\n}: ICodeWrapper) => {\n return (\n onChange(value)}\n mode={mode}\n tooltip={tooltip}\n editorHeight={editorHeight}\n label={label}\n helpTools={\n \n \n \n }\n color={\"primary\"}\n variant={\"regular\"}\n />\n \n \n \n }\n helpTip={helptip}\n helpTipPlacement=\"right\"\n />\n );\n};\n\nexport default CodeMirrorWrapper;\n","// This file is part of MinIO Console Server\n// Copyright (c) 2021 MinIO, Inc.\n//\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU Affero General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU Affero General Public License for more details.\n//\n// You should have received a copy of the GNU Affero General Public License\n// along with this program. If not, see .\nimport React from \"react\";\nimport { IElement, IElementValue, IOverrideEnv, OverrideValue } from \"./types\";\nimport {\n CodeIcon,\n CompressIcon,\n ConsoleIcon,\n FindReplaceIcon,\n FirstAidIcon,\n KeyIcon,\n LogsIcon,\n PendingItemsIcon,\n PublicIcon,\n} from \"mds\";\n\nexport const configurationElements: IElement[] = [\n {\n icon: ,\n configuration_id: \"region\",\n configuration_label: \"Region\",\n },\n {\n icon: ,\n configuration_id: \"compression\",\n configuration_label: \"Compression\",\n },\n {\n icon: ,\n configuration_id: \"api\",\n configuration_label: \"API\",\n },\n {\n icon: ,\n configuration_id: \"heal\",\n configuration_label: \"Heal\",\n },\n {\n icon: ,\n configuration_id: \"scanner\",\n configuration_label: \"Scanner\",\n },\n {\n icon: ,\n configuration_id: \"etcd\",\n configuration_label: \"Etcd\",\n },\n {\n icon: ,\n configuration_id: \"logger_webhook\",\n configuration_label: \"Logger Webhook\",\n },\n {\n icon: ,\n configuration_id: \"audit_webhook\",\n configuration_label: \"Audit Webhook\",\n },\n {\n icon: ,\n configuration_id: \"audit_kafka\",\n configuration_label: \"Audit Kafka\",\n },\n];\n\nexport const fieldsConfigurations: any = {\n region: [\n {\n name: \"name\",\n required: true,\n label: \"Server Location\",\n tooltip: 'Name of the location of the server e.g. \"us-west-rack2\"',\n type: \"string\",\n placeholder: \"e.g. us-west-rack-2\",\n },\n {\n name: \"comment\",\n required: false,\n label: \"Comment\",\n tooltip: \"You can add a comment to this setting\",\n type: \"comment\",\n placeholder: \"Enter custom notes if any\",\n },\n ],\n compression: [\n {\n name: \"extensions\",\n required: false,\n label: \"Extensions\",\n tooltip:\n 'Extensions to compress e.g. \".txt\", \".log\" or \".csv\" - you can write one per field',\n type: \"csv\",\n placeholder: \"Enter an Extension\",\n withBorder: true,\n },\n {\n name: \"mime_types\",\n required: false,\n label: \"Mime Types\",\n tooltip:\n 'Mime types e.g. \"text/*\", \"application/json\" or \"application/xml\" - you can write one per field',\n type: \"csv\",\n placeholder: \"Enter a Mime Type\",\n withBorder: true,\n },\n ],\n api: [\n {\n name: \"requests_max\",\n required: false,\n label: \"Requests Max\",\n tooltip: \"Maximum number of concurrent requests, e.g. '1600'\",\n type: \"number\",\n placeholder: \"Enter Requests Max\",\n },\n {\n name: \"cors_allow_origin\",\n required: false,\n label: \"Cors Allow Origin\",\n tooltip: \"List of origins allowed for CORS requests\",\n type: \"csv\",\n placeholder: \"Enter allowed origin e.g. https://example.com\",\n },\n {\n name: \"replication_workers\",\n required: false,\n label: \"Replication Workers\",\n tooltip: \"Number of replication workers, defaults to 100\",\n type: \"number\",\n placeholder: \"Enter Replication Workers\",\n },\n {\n name: \"replication_failed_workers\",\n required: false,\n label: \"Replication Failed Workers\",\n tooltip:\n \"Number of replication workers for recently failed replicas, defaults to 4\",\n type: \"number\",\n placeholder: \"Enter Replication Failed Workers\",\n },\n ],\n heal: [\n {\n name: \"bitrotscan\",\n required: false,\n label: \"Bitrot Scan\",\n tooltip:\n \"Perform bitrot scan on disks when checking objects during scanner\",\n type: \"on|off\",\n },\n {\n name: \"max_sleep\",\n required: false,\n label: \"Max Sleep\",\n tooltip:\n \"Maximum sleep duration between objects to slow down heal operation, e.g. 2s\",\n type: \"duration\",\n placeholder: \"Enter Max Sleep Duration\",\n },\n {\n name: \"max_io\",\n required: false,\n label: \"Max IO\",\n tooltip:\n \"Maximum IO requests allowed between objects to slow down heal operation, e.g. 3\",\n type: \"number\",\n placeholder: \"Enter Max IO\",\n },\n ],\n scanner: [\n {\n name: \"delay\",\n required: false,\n label: \"Delay Multiplier\",\n tooltip: \"Scanner delay multiplier, defaults to '10.0'\",\n type: \"number\",\n placeholder: \"Enter Delay\",\n },\n {\n name: \"max_wait\",\n required: false,\n label: \"Max Wait\",\n tooltip: \"Maximum wait time between operations, defaults to '15s'\",\n type: \"duration\",\n placeholder: \"Enter Max Wait\",\n },\n {\n name: \"cycle\",\n required: false,\n label: \"Cycle\",\n tooltip: \"Time duration between scanner cycles, defaults to '1m'\",\n type: \"duration\",\n placeholder: \"Enter Cycle\",\n },\n ],\n etcd: [\n {\n name: \"endpoints\",\n required: true,\n label: \"Endpoints\",\n tooltip:\n 'List of etcd endpoints e.g. \"http://localhost:2379\" - you can write one per field',\n type: \"csv\",\n placeholder: \"Enter Endpoint\",\n },\n {\n name: \"path_prefix\",\n required: false,\n label: \"Path Prefix\",\n tooltip: 'Namespace prefix to isolate tenants e.g. \"customer1/\"',\n type: \"string\",\n placeholder: \"Enter Path Prefix\",\n },\n {\n name: \"coredns_path\",\n required: false,\n label: \"Coredns Path\",\n tooltip: 'Shared bucket DNS records, default is \"/skydns\"',\n type: \"string\",\n placeholder: \"Enter Coredns Path\",\n },\n {\n name: \"client_cert\",\n required: false,\n label: \"Client Cert\",\n tooltip: \"Client cert for mTLS authentication\",\n type: \"string\",\n placeholder: \"Enter Client Cert\",\n },\n {\n name: \"client_cert_key\",\n required: false,\n label: \"Client Cert Key\",\n tooltip: \"Client cert key for mTLS authentication\",\n type: \"string\",\n placeholder: \"Enter Client Cert Key\",\n },\n {\n name: \"comment\",\n required: false,\n label: \"Comment\",\n tooltip: \"You can add a comment to this setting\",\n type: \"comment\",\n multiline: true,\n placeholder: \"Enter custom notes if any\",\n },\n ],\n logger_webhook: [\n {\n name: \"endpoint\",\n required: true,\n label: \"Endpoint\",\n type: \"string\",\n placeholder: \"Enter Endpoint\",\n },\n {\n name: \"auth_token\",\n required: true,\n label: \"Auth Token\",\n type: \"string\",\n placeholder: \"Enter Auth Token\",\n },\n ],\n audit_webhook: [\n {\n name: \"endpoint\",\n required: true,\n label: \"Endpoint\",\n type: \"string\",\n placeholder: \"Enter Endpoint\",\n },\n {\n name: \"auth_token\",\n required: true,\n label: \"Auth Token\",\n type: \"string\",\n placeholder: \"Enter Auth Token\",\n },\n ],\n audit_kafka: [\n {\n name: \"enable\",\n required: false,\n label: \"Enable\",\n tooltip: \"Enable audit_kafka target\",\n type: \"on|off\",\n customValueProcess: (origValue: string) => {\n return origValue === \"\" || origValue === \"on\" ? \"on\" : \"off\";\n },\n },\n {\n name: \"brokers\",\n required: true,\n label: \"Brokers\",\n type: \"csv\",\n placeholder: \"Enter Kafka Broker\",\n },\n {\n name: \"topic\",\n required: false,\n label: \"Topic\",\n type: \"string\",\n placeholder: \"Enter Kafka Topic\",\n tooltip: \"Kafka topic used for bucket notifications\",\n },\n {\n name: \"sasl\",\n required: false,\n label: \"Use SASL\",\n tooltip:\n \"Enable SASL (Simple Authentication and Security Layer) authentication\",\n type: \"on|off\",\n },\n {\n name: \"sasl_username\",\n required: false,\n label: \"SASL Username\",\n type: \"string\",\n placeholder: \"Enter SASL Username\",\n tooltip: \"Username for SASL/PLAIN or SASL/SCRAM authentication\",\n },\n {\n name: \"sasl_password\",\n required: false,\n label: \"SASL Password\",\n type: \"password\",\n placeholder: \"Enter SASL Password\",\n tooltip: \"Password for SASL/PLAIN or SASL/SCRAM authentication\",\n },\n {\n name: \"sasl_mechanism\",\n required: false,\n label: \"SASL Mechanism\",\n type: \"string\",\n placeholder: \"Enter SASL Mechanism\",\n tooltip: \"SASL authentication mechanism\",\n },\n {\n name: \"tls\",\n required: false,\n label: \"Use TLS\",\n tooltip: \"Enable TLS (Transport Layer Security)\",\n type: \"on|off\",\n },\n {\n name: \"tls_skip_verify\",\n required: false,\n label: \"Skip TLS Verification\",\n tooltip: \"Trust server TLS without verification\",\n type: \"on|off\",\n },\n {\n name: \"client_tls_cert\",\n required: false,\n label: \"Client Cert\",\n tooltip: \"Client cert for mTLS authentication\",\n type: \"string\",\n placeholder: \"Enter Client Cert\",\n },\n {\n name: \"client_tls_key\",\n required: false,\n label: \"Client Cert Key\",\n tooltip: \"Client cert key for mTLS authentication\",\n type: \"string\",\n placeholder: \"Enter Client Cert Key\",\n },\n {\n name: \"tls_client_auth\",\n required: false,\n label: \"TLS Client Auth\",\n tooltip:\n \"ClientAuth determines the Kafka server's policy for TLS client authorization\",\n type: \"string\",\n },\n {\n name: \"version\",\n required: false,\n label: \"Version\",\n tooltip: \"Specify the version of the Kafka cluster\",\n type: \"string\",\n },\n ],\n};\n\nexport const removeEmptyFields = (formFields: IElementValue[]) => {\n const nonEmptyFields = formFields.filter((field) => field.value !== \"\");\n\n return nonEmptyFields;\n};\n\nexport const selectSAs = (\n e: React.ChangeEvent,\n setSelectedSAs: Function,\n selectedSAs: string[],\n) => {\n const targetD = e.target;\n const value = targetD.value;\n const checked = targetD.checked;\n\n let elements: string[] = [...selectedSAs]; // We clone the selectedSAs array\n if (checked) {\n // If the user has checked this field we need to push this to selectedSAs\n elements.push(value);\n } else {\n // User has unchecked this field, we need to remove it from the list\n elements = elements.filter((element) => element !== value);\n }\n setSelectedSAs(elements);\n return elements;\n};\n\nexport const overrideFields = (formFields: IElementValue[]): IOverrideEnv => {\n let overrideReturn: IOverrideEnv = {};\n\n formFields.forEach((envItem) => {\n // it has override values, we construct the value\n if (envItem.env_override) {\n const value: OverrideValue = {\n value: envItem.env_override.value || \"\",\n overrideEnv: envItem.env_override.name || \"\",\n };\n\n overrideReturn = { ...overrideReturn, [envItem.key]: value };\n }\n });\n\n return overrideReturn;\n};\n","// This file is part of MinIO Console Server\n// Copyright (c) 2022 MinIO, Inc.\n//\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU Affero General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU Affero General Public License for more details.\n//\n// You should have received a copy of the GNU Affero General Public License\n// along with this program. If not, see .\n\nimport React, { Fragment, useState } from \"react\";\nimport { ConfirmDeleteIcon } from \"mds\";\nimport ConfirmDialog from \"../../../screens/Console/Common/ModalWrapper/ConfirmDialog\";\nimport { setErrorSnackMessage } from \"../../../systemSlice\";\nimport { useAppDispatch } from \"../../../store\";\nimport { api } from \"api\";\nimport { ApiError, HttpResponse } from \"api/consoleApi\";\nimport { errorToHandler } from \"api/errors\";\n\ninterface IDeleteMultiSAsProps {\n closeDeleteModalAndRefresh: (refresh: boolean) => void;\n deleteOpen: boolean;\n selectedSAs: string[];\n}\n\nconst DeleteMultipleSAs = ({\n closeDeleteModalAndRefresh,\n deleteOpen,\n selectedSAs,\n}: IDeleteMultiSAsProps) => {\n const dispatch = useAppDispatch();\n const onClose = () => closeDeleteModalAndRefresh(false);\n const [loadingDelete, setLoadingDelete] = useState(false);\n\n if (!selectedSAs) {\n return null;\n }\n const onConfirmDelete = () => {\n setLoadingDelete(true);\n api.serviceAccounts\n .deleteMultipleServiceAccounts(selectedSAs)\n .then((_) => {\n closeDeleteModalAndRefresh(true);\n })\n .catch(async (res: HttpResponse) => {\n const err = (await res.json()) as ApiError;\n dispatch(setErrorSnackMessage(errorToHandler(err)));\n closeDeleteModalAndRefresh(false);\n })\n .finally(() => setLoadingDelete(false));\n };\n return (\n }\n isLoading={loadingDelete}\n onConfirm={onConfirmDelete}\n onClose={onClose}\n confirmationContent={\n \n Are you sure you want to delete the selected {selectedSAs.length}{\" \"}\n Access Keys?{\" \"}\n \n }\n />\n );\n};\n\nexport default DeleteMultipleSAs;\n","// This file is part of MinIO Console Server\n// Copyright (c) 2021 MinIO, Inc.\n//\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU Affero General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU Affero General Public License for more details.\n//\n// You should have received a copy of the GNU Affero General Public License\n// along with this program. If not, see .\n\nimport { Policy, User } from \"api/consoleApi\";\n\ninterface policyDetailsInterface {\n policy: string;\n}\n\nexport const usersSort = (a: User, b: User) => {\n if (a.accessKey && b.accessKey) {\n if (a.accessKey > b.accessKey) {\n return 1;\n }\n if (a.accessKey < b.accessKey) {\n return -1;\n }\n }\n // a must be equal to b\n return 0;\n};\n\nexport const policySort = (a: Policy, b: Policy) => {\n if (a.name! > b.name!) {\n return 1;\n }\n if (a.name! < b.name!) {\n return -1;\n }\n // a must be equal to b\n return 0;\n};\n\nexport const stringSort = (a: string, b: string) => {\n if (a > b) {\n return 1;\n }\n if (a < b) {\n return -1;\n }\n // a must be equal to b\n return 0;\n};\n\nexport const policyDetailsSort = (\n a: policyDetailsInterface,\n b: policyDetailsInterface,\n) => {\n if (a.policy > b.policy) {\n return 1;\n }\n if (a.policy < b.policy) {\n return -1;\n }\n // a must be equal to b\n return 0;\n};\n","\"use strict\";\n\nvar deselectCurrent = require(\"toggle-selection\");\n\nvar clipboardToIE11Formatting = {\n \"text/plain\": \"Text\",\n \"text/html\": \"Url\",\n \"default\": \"Text\"\n}\n\nvar defaultMessage = \"Copy to clipboard: #{key}, Enter\";\n\nfunction format(message) {\n var copyKey = (/mac os x/i.test(navigator.userAgent) ? \"⌘\" : \"Ctrl\") + \"+C\";\n return message.replace(/#{\\s*key\\s*}/g, copyKey);\n}\n\nfunction copy(text, options) {\n var debug,\n message,\n reselectPrevious,\n range,\n selection,\n mark,\n success = false;\n if (!options) {\n options = {};\n }\n debug = options.debug || false;\n try {\n reselectPrevious = deselectCurrent();\n\n range = document.createRange();\n selection = document.getSelection();\n\n mark = document.createElement(\"span\");\n mark.textContent = text;\n // avoid screen readers from reading out loud the text\n mark.ariaHidden = \"true\"\n // reset user styles for span element\n mark.style.all = \"unset\";\n // prevents scrolling to the end of the page\n mark.style.position = \"fixed\";\n mark.style.top = 0;\n mark.style.clip = \"rect(0, 0, 0, 0)\";\n // used to preserve spaces and line breaks\n mark.style.whiteSpace = \"pre\";\n // do not inherit user-select (it may be `none`)\n mark.style.webkitUserSelect = \"text\";\n mark.style.MozUserSelect = \"text\";\n mark.style.msUserSelect = \"text\";\n mark.style.userSelect = \"text\";\n mark.addEventListener(\"copy\", function(e) {\n e.stopPropagation();\n if (options.format) {\n e.preventDefault();\n if (typeof e.clipboardData === \"undefined\") { // IE 11\n debug && console.warn(\"unable to use e.clipboardData\");\n debug && console.warn(\"trying IE specific stuff\");\n window.clipboardData.clearData();\n var format = clipboardToIE11Formatting[options.format] || clipboardToIE11Formatting[\"default\"]\n window.clipboardData.setData(format, text);\n } else { // all other browsers\n e.clipboardData.clearData();\n e.clipboardData.setData(options.format, text);\n }\n }\n if (options.onCopy) {\n e.preventDefault();\n options.onCopy(e.clipboardData);\n }\n });\n\n document.body.appendChild(mark);\n\n range.selectNodeContents(mark);\n selection.addRange(range);\n\n var successful = document.execCommand(\"copy\");\n if (!successful) {\n throw new Error(\"copy command was unsuccessful\");\n }\n success = true;\n } catch (err) {\n debug && console.error(\"unable to copy using execCommand: \", err);\n debug && console.warn(\"trying IE specific stuff\");\n try {\n window.clipboardData.setData(options.format || \"text\", text);\n options.onCopy && options.onCopy(window.clipboardData);\n success = true;\n } catch (err) {\n debug && console.error(\"unable to copy using clipboardData: \", err);\n debug && console.error(\"falling back to prompt\");\n message = format(\"message\" in options ? options.message : defaultMessage);\n window.prompt(message, text);\n }\n } finally {\n if (selection) {\n if (typeof selection.removeRange == \"function\") {\n selection.removeRange(range);\n } else {\n selection.removeAllRanges();\n }\n }\n\n if (mark) {\n document.body.removeChild(mark);\n }\n reselectPrevious();\n }\n\n return success;\n}\n\nmodule.exports = copy;\n","\"use strict\";\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.CopyToClipboard = void 0;\n\nvar _react = _interopRequireDefault(require(\"react\"));\n\nvar _copyToClipboard = _interopRequireDefault(require(\"copy-to-clipboard\"));\n\nvar _excluded = [\"text\", \"onCopy\", \"options\", \"children\"];\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\n\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, \"prototype\", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } else if (call !== void 0) { throw new TypeError(\"Derived constructors may only return object or undefined\"); } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nvar CopyToClipboard = /*#__PURE__*/function (_React$PureComponent) {\n _inherits(CopyToClipboard, _React$PureComponent);\n\n var _super = _createSuper(CopyToClipboard);\n\n function CopyToClipboard() {\n var _this;\n\n _classCallCheck(this, CopyToClipboard);\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _super.call.apply(_super, [this].concat(args));\n\n _defineProperty(_assertThisInitialized(_this), \"onClick\", function (event) {\n var _this$props = _this.props,\n text = _this$props.text,\n onCopy = _this$props.onCopy,\n children = _this$props.children,\n options = _this$props.options;\n\n var elem = _react[\"default\"].Children.only(children);\n\n var result = (0, _copyToClipboard[\"default\"])(text, options);\n\n if (onCopy) {\n onCopy(text, result);\n } // Bypass onClick if it was present\n\n\n if (elem && elem.props && typeof elem.props.onClick === 'function') {\n elem.props.onClick(event);\n }\n });\n\n return _this;\n }\n\n _createClass(CopyToClipboard, [{\n key: \"render\",\n value: function render() {\n var _this$props2 = this.props,\n _text = _this$props2.text,\n _onCopy = _this$props2.onCopy,\n _options = _this$props2.options,\n children = _this$props2.children,\n props = _objectWithoutProperties(_this$props2, _excluded);\n\n var elem = _react[\"default\"].Children.only(children);\n\n return /*#__PURE__*/_react[\"default\"].cloneElement(elem, _objectSpread(_objectSpread({}, props), {}, {\n onClick: this.onClick\n }));\n }\n }]);\n\n return CopyToClipboard;\n}(_react[\"default\"].PureComponent);\n\nexports.CopyToClipboard = CopyToClipboard;\n\n_defineProperty(CopyToClipboard, \"defaultProps\", {\n onCopy: undefined,\n options: undefined\n});","\"use strict\";\n\nvar _require = require('./Component'),\n CopyToClipboard = _require.CopyToClipboard;\n\nCopyToClipboard.CopyToClipboard = CopyToClipboard;\nmodule.exports = CopyToClipboard;","\nmodule.exports = function () {\n var selection = document.getSelection();\n if (!selection.rangeCount) {\n return function () {};\n }\n var active = document.activeElement;\n\n var ranges = [];\n for (var i = 0; i < selection.rangeCount; i++) {\n ranges.push(selection.getRangeAt(i));\n }\n\n switch (active.tagName.toUpperCase()) { // .toUpperCase handles XHTML\n case 'INPUT':\n case 'TEXTAREA':\n active.blur();\n break;\n\n default:\n active = null;\n break;\n }\n\n selection.removeAllRanges();\n return function () {\n selection.type === 'Caret' &&\n selection.removeAllRanges();\n\n if (!selection.rangeCount) {\n ranges.forEach(function(range) {\n selection.addRange(range);\n });\n }\n\n active &&\n active.focus();\n };\n};\n"],"names":["ACCOUNT_TABLE_COLUMNS","label","elementKey","renderFunction","expTime","fmtDate","DateTime","fromISO","toUTC","toFormat","_jsx","title","children","status","_ref","open","selectedAccessKey","closeModalAndRefresh","dispatch","useAppDispatch","loading","setLoading","useState","policyDefinition","setPolicyDefinition","name","setName","description","setDescription","expiry","setExpiry","setStatus","useEffect","sourceAccKey","encodeURLString","api","serviceAccounts","getServiceAccount","then","res","saInfo","data","expiration","accountStatus","policy","catch","err","setModalErrorSnackMessage","errorToHandler","ModalWrapper","concat","modalOpen","onClose","titleIcon","ChangeAccessPolicyIcon","noValidate","autoComplete","onSubmit","e","setPolicy","newPolicy","preventDefault","updateServiceAccount","async","json","setErrorSnackMessage","_jsxs","Grid","container","item","xs","CodeMirrorWrapper","value","onChange","editorHeight","helptip","Fragment","target","href","Box","sx","marginBottom","marginTop","display","width","DateTimeInput","noLabelMinWidth","id","timeFormat","secondsSelector","InputBox","size","type","placeholder","alignItems","justifyContent","fontWeight","color","gap","style","padding","Switch","indicatorLabels","checked","modalStyleUtils","modalButtonBar","Button","variant","onClick","disabled","WrappedComponent","fallback","arguments","length","undefined","props","Suspense","tooltip","mode","CodeEditor","helpTools","TooltipWrapper","CopyToClipboard","text","icon","CopyIcon","helpTip","helpTipPlacement","configurationElements","PublicIcon","configuration_id","configuration_label","CompressIcon","CodeIcon","FirstAidIcon","FindReplaceIcon","KeyIcon","ConsoleIcon","PendingItemsIcon","LogsIcon","fieldsConfigurations","region","required","compression","withBorder","heal","scanner","etcd","multiline","logger_webhook","audit_webhook","audit_kafka","customValueProcess","origValue","removeEmptyFields","formFields","filter","field","selectSAs","setSelectedSAs","selectedSAs","targetD","elements","push","element","overrideFields","overrideReturn","forEach","envItem","env_override","overrideEnv","key","closeDeleteModalAndRefresh","deleteOpen","loadingDelete","setLoadingDelete","ConfirmDialog","confirmText","isOpen","ConfirmDeleteIcon","isLoading","onConfirm","onConfirmDelete","deleteMultipleServiceAccounts","_","finally","confirmationContent","usersSort","a","b","accessKey","policySort","stringSort","policyDetailsSort","deselectCurrent","require","clipboardToIE11Formatting","module","exports","options","debug","message","reselectPrevious","range","selection","mark","success","document","createRange","getSelection","createElement","textContent","ariaHidden","all","position","top","clip","whiteSpace","webkitUserSelect","MozUserSelect","msUserSelect","userSelect","addEventListener","stopPropagation","format","clipboardData","console","warn","window","clearData","setData","onCopy","body","appendChild","selectNodeContents","addRange","execCommand","Error","error","copyKey","test","navigator","userAgent","replace","prompt","removeRange","removeAllRanges","removeChild","_typeof","obj","Symbol","iterator","constructor","prototype","Object","defineProperty","_react","_interopRequireDefault","_copyToClipboard","_excluded","__esModule","ownKeys","object","enumerableOnly","keys","getOwnPropertySymbols","symbols","sym","getOwnPropertyDescriptor","enumerable","apply","_objectSpread","i","source","_defineProperty","getOwnPropertyDescriptors","defineProperties","_objectWithoutProperties","excluded","sourceKeys","indexOf","_objectWithoutPropertiesLoose","sourceSymbolKeys","propertyIsEnumerable","call","_defineProperties","descriptor","configurable","writable","_setPrototypeOf","o","p","setPrototypeOf","__proto__","_createSuper","Derived","hasNativeReflectConstruct","Reflect","construct","sham","Proxy","Boolean","valueOf","_isNativeReflectConstruct","result","Super","_getPrototypeOf","NewTarget","this","self","TypeError","_assertThisInitialized","_possibleConstructorReturn","ReferenceError","getPrototypeOf","_React$PureComponent","subClass","superClass","create","_inherits","Constructor","protoProps","staticProps","_super","_this","instance","_classCallCheck","_len","args","Array","_key","event","_this$props","elem","Children","only","_this$props2","cloneElement","PureComponent","rangeCount","active","activeElement","ranges","getRangeAt","tagName","toUpperCase","blur","focus"],"sourceRoot":""}
\ No newline at end of file
diff --git a/web-app/build/static/js/1011.59fa8004.chunk.js b/web-app/build/static/js/1011.59fa8004.chunk.js
new file mode 100644
index 000000000..321efac18
--- /dev/null
+++ b/web-app/build/static/js/1011.59fa8004.chunk.js
@@ -0,0 +1,2 @@
+(self.webpackChunkweb_app=self.webpackChunkweb_app||[]).push([[1011],{99956:(e,t,o)=>{"use strict";o.d(t,{X:()=>a});o(65043);var n=o(24241),r=o(70579);const a=[{label:"Access Key",elementKey:"accessKey"},{label:"Expiry",elementKey:"expiration",renderFunction:e=>{if(e){const t=n.c9.fromISO(e).toUTC().toFormat("y/M/d hh:mm:ss z");return(0,r.jsx)("span",{title:t,children:t})}return""}},{label:"Status",elementKey:"accountStatus",renderFunction:e=>"off"===e?"Disabled":"Enabled"},{label:"Name",elementKey:"name"},{label:"Description",elementKey:"description"}]},10158:(e,t,o)=>{"use strict";o.d(t,{A:()=>m});var n=o(65043),r=o(89923),a=o(56629),i=o(53518),l=o(41206),c=o(20554),s=o(64159),u=o(94141),p=o(77403),d=o(24241),f=o(70579);const m=e=>{let{open:t,selectedAccessKey:o,closeModalAndRefresh:m}=e;const y=(0,c.jL)(),[b,h]=(0,n.useState)(!1),[g,x]=(0,n.useState)(""),[v,C]=(0,n.useState)(""),[S,w]=(0,n.useState)(""),[j,k]=(0,n.useState)(),[E,_]=(0,n.useState)("enabled");(0,n.useEffect)((()=>{b||""===o||(h(!0),a.F.serviceAccounts.getServiceAccount(o||"").then((e=>{h(!1);const t=e.data;C((null===t||void 0===t?void 0:t.name)||""),null!==t&&void 0!==t&&t.expiration&&k(d.c9.fromISO(null===t||void 0===t?void 0:t.expiration)),w((null===t||void 0===t?void 0:t.description)||""),_(t.accountStatus),x(t.policy||"")})).catch((e=>{h(!1),y((0,s.Dy)((0,i.S)(e)))})))}),[o]);return(0,f.jsx)(u.A,{title:"Edit details of - ".concat(o),modalOpen:t,onClose:()=>{m()},titleIcon:(0,f.jsx)(r.uYH,{}),children:(0,f.jsx)("form",{noValidate:!0,autoComplete:"off",onSubmit:e=>{var t;t=g,e.preventDefault(),a.F.serviceAccounts.updateServiceAccount(o||"",{policy:t,description:S,expiry:j,name:v,status:E}).then((()=>{m()})).catch((async e=>{const t=await e.json();y((0,s.C9)((0,i.S)(t)))}))},children:(0,f.jsxs)(r.xA9,{container:!0,children:[(0,f.jsx)(r.xA9,{item:!0,xs:12,children:(0,f.jsx)(l.A,{label:"Access Key Policy",value:g,onChange:e=>{x(e)},editorHeight:"350px",helptip:(0,f.jsx)(n.Fragment,{children:(0,f.jsx)("a",{target:"blank",href:"https://min.io/docs/minio/kubernetes/upstream/administration/identity-access-management/policy-based-access-control.html#policy-document-structure",children:"Guide to access policy structure"})})})}),(0,f.jsx)(r.azJ,{sx:{marginBottom:"15px",marginTop:"15px",display:"flex",width:"100%","& label":{width:"195px"}},children:(0,f.jsx)(r.e8j,{noLabelMinWidth:!0,value:j,onChange:e=>{k(e)},id:"expiryTime",label:"Expiry",timeFormat:"24h",secondsSelector:!1})}),(0,f.jsx)(r.xA9,{xs:12,sx:{marginBottom:"15px"},children:(0,f.jsx)(r.cl_,{value:v,size:120,label:"Name",id:"name",name:"name",type:"text",placeholder:"Enter a name",onChange:e=>{C(e.target.value)}})}),(0,f.jsx)(r.xA9,{xs:12,sx:{marginBottom:"15px"},children:(0,f.jsx)(r.cl_,{size:120,value:S,label:"Description",id:"description",name:"description",type:"text",placeholder:"Enter a description",onChange:e=>{w(e.target.value)}})}),(0,f.jsxs)(r.xA9,{xs:12,sx:{display:"flex",alignItems:"center",justifyContent:"start",fontWeight:600,color:"rgb(7, 25, 62)",gap:2,marginBottom:"15px"},children:[(0,f.jsx)("label",{style:{width:"150px"},children:"Status"}),(0,f.jsx)(r.azJ,{sx:{padding:"2px"},children:(0,f.jsx)(r.dOG,{style:{gap:"115px"},indicatorLabels:["Enabled","Disabled"],checked:"on"===E,id:"saStatus",name:"saStatus",label:"",onChange:e=>{_(e.target.checked?"on":"off")},value:"yes"})})]}),(0,f.jsxs)(r.xA9,{item:!0,xs:12,sx:p.Uz.modalButtonBar,children:[(0,f.jsx)(r.$nd,{id:"cancel-sa-policy",type:"button",variant:"regular",onClick:()=>{m()},disabled:b,label:"Cancel"}),(0,f.jsx)(r.$nd,{id:"save-sa-policy",type:"submit",variant:"callAction",color:"primary",disabled:b,label:"Update"})]})]})})})}},72237:(e,t,o)=>{"use strict";o.d(t,{A:()=>a});var n=o(65043),r=o(70579);const a=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return function(o){return(0,r.jsx)(n.Suspense,{fallback:t,children:(0,r.jsx)(e,{...o})})}}},41206:(e,t,o)=>{"use strict";o.d(t,{A:()=>s});var n=o(65043),r=o(89923),a=o(61476),i=o.n(a),l=o(6681),c=o(70579);const s=e=>{let{value:t,label:o="",tooltip:a="",mode:s="json",onChange:u,editorHeight:p=250,helptip:d}=e;return(0,c.jsx)(r.BYM,{value:t,onChange:e=>u(e),mode:s,tooltip:a,editorHeight:p,label:o,helpTools:(0,c.jsx)(n.Fragment,{children:(0,c.jsx)(l.A,{tooltip:"Copy to Clipboard",children:(0,c.jsx)(i(),{text:t,children:(0,c.jsx)(r.$nd,{type:"button",id:"copy-code-mirror",icon:(0,c.jsx)(r.TdU,{}),color:"primary",variant:"regular"})})})}),helpTip:d,helpTipPlacement:"right"})}},45479:(e,t,o)=>{"use strict";o.d(t,{Ck:()=>a,PE:()=>i,Qm:()=>c,Xm:()=>l,uu:()=>s});o(65043);var n=o(89923),r=o(70579);const a=[{icon:(0,r.jsx)(n.DzZ,{}),configuration_id:"region",configuration_label:"Region"},{icon:(0,r.jsx)(n.MZJ,{}),configuration_id:"compression",configuration_label:"Compression"},{icon:(0,r.jsx)(n.loI,{}),configuration_id:"api",configuration_label:"API"},{icon:(0,r.jsx)(n.qm4,{}),configuration_id:"heal",configuration_label:"Heal"},{icon:(0,r.jsx)(n.Pq3,{}),configuration_id:"scanner",configuration_label:"Scanner"},{icon:(0,r.jsx)(n.RYV,{}),configuration_id:"etcd",configuration_label:"Etcd"},{icon:(0,r.jsx)(n.D0K,{}),configuration_id:"logger_webhook",configuration_label:"Logger Webhook"},{icon:(0,r.jsx)(n.rBG,{}),configuration_id:"audit_webhook",configuration_label:"Audit Webhook"},{icon:(0,r.jsx)(n.Dk$,{}),configuration_id:"audit_kafka",configuration_label:"Audit Kafka"}],i={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 custom notes if any"}],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}],api:[{name:"requests_max",required:!1,label:"Requests Max",tooltip:"Maximum number of concurrent requests, e.g. '1600'",type:"number",placeholder:"Enter Requests Max"},{name:"cors_allow_origin",required:!1,label:"Cors Allow Origin",tooltip:"List of origins allowed for CORS requests",type:"csv",placeholder:"Enter allowed origin e.g. https://example.com"},{name:"replication_workers",required:!1,label:"Replication Workers",tooltip:"Number of replication workers, defaults to 100",type:"number",placeholder:"Enter Replication Workers"},{name:"replication_failed_workers",required:!1,label:"Replication Failed Workers",tooltip:"Number of replication workers for recently failed replicas, defaults to 4",type:"number",placeholder:"Enter Replication Failed Workers"}],heal:[{name:"bitrotscan",required:!1,label:"Bitrot Scan",tooltip:"Perform bitrot scan on disks when checking objects during scanner",type:"on|off"},{name:"max_sleep",required:!1,label:"Max Sleep",tooltip:"Maximum sleep duration between objects to slow down heal operation, e.g. 2s",type:"duration",placeholder:"Enter Max Sleep Duration"},{name:"max_io",required:!1,label:"Max IO",tooltip:"Maximum IO requests allowed between objects to slow down heal operation, e.g. 3",type:"number",placeholder:"Enter Max IO"}],scanner:[{name:"delay",required:!1,label:"Delay Multiplier",tooltip:"Scanner delay multiplier, defaults to '10.0'",type:"number",placeholder:"Enter Delay"},{name:"max_wait",required:!1,label:"Max Wait",tooltip:"Maximum wait time between operations, defaults to '15s'",type:"duration",placeholder:"Enter Max Wait"},{name:"cycle",required:!1,label:"Cycle",tooltip:"Time duration between scanner cycles, defaults to '1m'",type:"duration",placeholder:"Enter Cycle"}],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 custom notes if any"}],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"}],audit_kafka:[{name:"enable",required:!1,label:"Enable",tooltip:"Enable audit_kafka target",type:"on|off",customValueProcess:e=>""===e||"on"===e?"on":"off"},{name:"brokers",required:!0,label:"Brokers",type:"csv",placeholder:"Enter Kafka Broker"},{name:"topic",required:!1,label:"Topic",type:"string",placeholder:"Enter Kafka Topic",tooltip:"Kafka topic used for bucket notifications"},{name:"sasl",required:!1,label:"Use SASL",tooltip:"Enable SASL (Simple Authentication and Security Layer) authentication",type:"on|off"},{name:"sasl_username",required:!1,label:"SASL Username",type:"string",placeholder:"Enter SASL Username",tooltip:"Username for SASL/PLAIN or SASL/SCRAM authentication"},{name:"sasl_password",required:!1,label:"SASL Password",type:"password",placeholder:"Enter SASL Password",tooltip:"Password for SASL/PLAIN or SASL/SCRAM authentication"},{name:"sasl_mechanism",required:!1,label:"SASL Mechanism",type:"string",placeholder:"Enter SASL Mechanism",tooltip:"SASL authentication mechanism"},{name:"tls",required:!1,label:"Use TLS",tooltip:"Enable TLS (Transport Layer Security)",type:"on|off"},{name:"tls_skip_verify",required:!1,label:"Skip TLS Verification",tooltip:"Trust server TLS without verification",type:"on|off"},{name:"client_tls_cert",required:!1,label:"Client Cert",tooltip:"Client cert for mTLS authentication",type:"string",placeholder:"Enter Client Cert"},{name:"client_tls_key",required:!1,label:"Client Cert Key",tooltip:"Client cert key for mTLS authentication",type:"string",placeholder:"Enter Client Cert Key"},{name:"tls_client_auth",required:!1,label:"TLS Client Auth",tooltip:"ClientAuth determines the Kafka server's policy for TLS client authorization",type:"string"},{name:"version",required:!1,label:"Version",tooltip:"Specify the version of the Kafka cluster",type:"string"}]},l=e=>e.filter((e=>""!==e.value)),c=(e,t,o)=>{const n=e.target,r=n.value;let a=[...o];return n.checked?a.push(r):a=a.filter((e=>e!==r)),t(a),a},s=e=>{let t={};return e.forEach((e=>{if(e.env_override){const o={value:e.env_override.value||"",overrideEnv:e.env_override.name||""};t={...t,[e.key]:o}}})),t}},68045:(e,t,o)=>{"use strict";o.d(t,{A:()=>p});var n=o(65043),r=o(89923),a=o(58661),i=o(64159),l=o(20554),c=o(56629),s=o(53518),u=o(70579);const p=e=>{let{closeDeleteModalAndRefresh:t,deleteOpen:o,selectedSAs:p}=e;const d=(0,l.jL)(),[f,m]=(0,n.useState)(!1);if(!p)return null;return(0,u.jsx)(a.A,{title:"Delete Access Keys",confirmText:"Delete",isOpen:o,titleIcon:(0,u.jsx)(r.xWY,{}),isLoading:f,onConfirm:()=>{m(!0),c.F.serviceAccounts.deleteMultipleServiceAccounts(p).then((e=>{t(!0)})).catch((async e=>{const o=await e.json();d((0,i.C9)((0,s.S)(o))),t(!1)})).finally((()=>m(!1)))},onClose:()=>t(!1),confirmationContent:(0,u.jsxs)(n.Fragment,{children:["Are you sure you want to delete the selected ",p.length," ","Access Keys?"," "]})})}},8185:(e,t,o)=>{"use strict";o.d(t,{Hw:()=>r,LA:()=>n,SO:()=>a,rY:()=>i});const n=(e,t)=>{if(e.accessKey&&t.accessKey){if(e.accessKey>t.accessKey)return 1;if(e.accessKeye.name>t.name?1:e.namee>t?1:ee.policy>t.policy?1:e.policy{"use strict";var n=o(40139),r={"text/plain":"Text","text/html":"Url",default:"Text"};e.exports=function(e,t){var o,a,i,l,c,s,u=!1;t||(t={}),o=t.debug||!1;try{if(i=n(),l=document.createRange(),c=document.getSelection(),(s=document.createElement("span")).textContent=e,s.ariaHidden="true",s.style.all="unset",s.style.position="fixed",s.style.top=0,s.style.clip="rect(0, 0, 0, 0)",s.style.whiteSpace="pre",s.style.webkitUserSelect="text",s.style.MozUserSelect="text",s.style.msUserSelect="text",s.style.userSelect="text",s.addEventListener("copy",(function(n){if(n.stopPropagation(),t.format)if(n.preventDefault(),"undefined"===typeof n.clipboardData){o&&console.warn("unable to use e.clipboardData"),o&&console.warn("trying IE specific stuff"),window.clipboardData.clearData();var a=r[t.format]||r.default;window.clipboardData.setData(a,e)}else n.clipboardData.clearData(),n.clipboardData.setData(t.format,e);t.onCopy&&(n.preventDefault(),t.onCopy(n.clipboardData))})),document.body.appendChild(s),l.selectNodeContents(s),c.addRange(l),!document.execCommand("copy"))throw new Error("copy command was unsuccessful");u=!0}catch(p){o&&console.error("unable to copy using execCommand: ",p),o&&console.warn("trying IE specific stuff");try{window.clipboardData.setData(t.format||"text",e),t.onCopy&&t.onCopy(window.clipboardData),u=!0}catch(p){o&&console.error("unable to copy using clipboardData: ",p),o&&console.error("falling back to prompt"),a=function(e){var t=(/mac os x/i.test(navigator.userAgent)?"\u2318":"Ctrl")+"+C";return e.replace(/#{\s*key\s*}/g,t)}("message"in t?t.message:"Copy to clipboard: #{key}, Enter"),window.prompt(a,e)}}finally{c&&("function"==typeof c.removeRange?c.removeRange(l):c.removeAllRanges()),s&&document.body.removeChild(s),i()}return u}},24480:(e,t,o)=>{"use strict";function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.CopyToClipboard=void 0;var r=l(o(65043)),a=l(o(75270)),i=["text","onCopy","options","children"];function l(e){return e&&e.__esModule?e:{default:e}}function c(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),o.push.apply(o,n)}return o}function s(e){for(var t=1;t=0||(r[o]=e[o]);return r}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,o)&&(r[o]=e[o])}return r}function p(e,t){for(var o=0;o{"use strict";var n=o(24480).CopyToClipboard;n.CopyToClipboard=n,e.exports=n},40139:e=>{e.exports=function(){var e=document.getSelection();if(!e.rangeCount)return function(){};for(var t=document.activeElement,o=[],n=0;n.\n\nimport React from \"react\";\nimport { DateTime } from \"luxon\";\n\nexport const ACCOUNT_TABLE_COLUMNS = [\n { label: \"Access Key\", elementKey: \"accessKey\" },\n {\n label: \"Expiry\",\n elementKey: \"expiration\",\n renderFunction: (expTime: string) => {\n if (expTime) {\n const fmtDate = DateTime.fromISO(expTime)\n .toUTC()\n .toFormat(\"y/M/d hh:mm:ss z\");\n\n return {fmtDate};\n }\n return \"\";\n },\n },\n {\n label: \"Status\",\n elementKey: \"accountStatus\",\n renderFunction: (status: string) => {\n if (status === \"off\") {\n return \"Disabled\";\n } else {\n return \"Enabled\";\n }\n },\n },\n { label: \"Name\", elementKey: \"name\" },\n { label: \"Description\", elementKey: \"description\" },\n];\n","// This file is part of MinIO Console Server\n// Copyright (c) 2022 MinIO, Inc.\n//\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU Affero General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU Affero General Public License for more details.\n//\n// You should have received a copy of the GNU Affero General Public License\n// along with this program. If not, see .\n\nimport React, { useEffect, useState, Fragment } from \"react\";\nimport {\n Box,\n Button,\n ChangeAccessPolicyIcon,\n DateTimeInput,\n Grid,\n InputBox,\n Switch,\n} from \"mds\";\nimport { api } from \"api\";\nimport { errorToHandler } from \"api/errors\";\nimport CodeMirrorWrapper from \"../Common/FormComponents/CodeMirrorWrapper/CodeMirrorWrapper\";\nimport { ApiError } from \"api/consoleApi\";\nimport { useAppDispatch } from \"store\";\nimport { setErrorSnackMessage, setModalErrorSnackMessage } from \"systemSlice\";\nimport ModalWrapper from \"../Common/ModalWrapper/ModalWrapper\";\nimport { modalStyleUtils } from \"../Common/FormComponents/common/styleLibrary\";\nimport { DateTime } from \"luxon\";\n\ninterface IServiceAccountPolicyProps {\n open: boolean;\n selectedAccessKey: string | null;\n closeModalAndRefresh: () => void;\n}\n\nconst EditServiceAccount = ({\n open,\n selectedAccessKey,\n closeModalAndRefresh,\n}: IServiceAccountPolicyProps) => {\n const dispatch = useAppDispatch();\n const [loading, setLoading] = useState(false);\n const [policyDefinition, setPolicyDefinition] = useState(\"\");\n\n const [name, setName] = useState(\"\");\n const [description, setDescription] = useState(\"\");\n const [expiry, setExpiry] = useState();\n const [status, setStatus] = useState(\"enabled\");\n\n useEffect(() => {\n if (!loading && selectedAccessKey !== \"\") {\n setLoading(true);\n api.serviceAccounts\n .getServiceAccount(selectedAccessKey || \"\")\n .then((res) => {\n setLoading(false);\n const saInfo = res.data;\n\n setName(saInfo?.name || \"\");\n\n if (saInfo?.expiration) {\n setExpiry(DateTime.fromISO(saInfo?.expiration));\n }\n\n setDescription(saInfo?.description || \"\");\n setStatus(saInfo.accountStatus);\n\n setPolicyDefinition(saInfo.policy || \"\");\n })\n .catch((err) => {\n setLoading(false);\n dispatch(setModalErrorSnackMessage(errorToHandler(err)));\n });\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [selectedAccessKey]);\n\n const setPolicy = (event: React.FormEvent, newPolicy: string) => {\n event.preventDefault();\n api.serviceAccounts\n .updateServiceAccount(selectedAccessKey || \"\", {\n policy: newPolicy,\n description: description,\n expiry: expiry,\n name: name,\n status: status,\n })\n .then(() => {\n closeModalAndRefresh();\n })\n .catch(async (res) => {\n const err = (await res.json()) as ApiError;\n dispatch(setErrorSnackMessage(errorToHandler(err)));\n });\n };\n\n return (\n {\n closeModalAndRefresh();\n }}\n titleIcon={}\n >\n \n \n );\n};\n\nexport default EditServiceAccount;\n","// This file is part of MinIO Console Server\n// Copyright (c) 2021 MinIO, Inc.\n//\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU Affero General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU Affero General Public License for more details.\n//\n// You should have received a copy of the GNU Affero General Public License\n// along with this program. If not, see .\n\nimport React, { ComponentType, Suspense, SuspenseProps } from \"react\";\n\nfunction withSuspense
(\n WrappedComponent: ComponentType
,\n fallback: SuspenseProps[\"fallback\"] = null,\n) {\n function ComponentWithSuspense(props: P) {\n return (\n \n \n \n );\n }\n\n return ComponentWithSuspense;\n}\n\nexport default withSuspense;\n","// This file is part of MinIO Console Server\n// Copyright (c) 2021 MinIO, Inc.\n//\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU Affero General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU Affero General Public License for more details.\n//\n// You should have received a copy of the GNU Affero General Public License\n// along with this program. If not, see .\n\nimport React, { Fragment } from \"react\";\nimport { Button, CodeEditor, CopyIcon } from \"mds\";\nimport CopyToClipboard from \"react-copy-to-clipboard\";\nimport TooltipWrapper from \"../../TooltipWrapper/TooltipWrapper\";\n\ninterface ICodeWrapper {\n value: string;\n label?: string;\n mode?: string;\n tooltip?: string;\n onChange: (value: string) => any;\n editorHeight?: string | number;\n helptip?: any;\n}\n\nconst CodeMirrorWrapper = ({\n value,\n label = \"\",\n tooltip = \"\",\n mode = \"json\",\n onChange,\n editorHeight = 250,\n helptip,\n}: ICodeWrapper) => {\n return (\n onChange(value)}\n mode={mode}\n tooltip={tooltip}\n editorHeight={editorHeight}\n label={label}\n helpTools={\n \n \n \n }\n color={\"primary\"}\n variant={\"regular\"}\n />\n \n \n \n }\n helpTip={helptip}\n helpTipPlacement=\"right\"\n />\n );\n};\n\nexport default CodeMirrorWrapper;\n","// This file is part of MinIO Console Server\n// Copyright (c) 2021 MinIO, Inc.\n//\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU Affero General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU Affero General Public License for more details.\n//\n// You should have received a copy of the GNU Affero General Public License\n// along with this program. If not, see .\nimport React from \"react\";\nimport { IElement, IElementValue, IOverrideEnv, OverrideValue } from \"./types\";\nimport {\n CodeIcon,\n CompressIcon,\n ConsoleIcon,\n FindReplaceIcon,\n FirstAidIcon,\n KeyIcon,\n LogsIcon,\n PendingItemsIcon,\n PublicIcon,\n} from \"mds\";\n\nexport const configurationElements: IElement[] = [\n {\n icon: ,\n configuration_id: \"region\",\n configuration_label: \"Region\",\n },\n {\n icon: ,\n configuration_id: \"compression\",\n configuration_label: \"Compression\",\n },\n {\n icon: ,\n configuration_id: \"api\",\n configuration_label: \"API\",\n },\n {\n icon: ,\n configuration_id: \"heal\",\n configuration_label: \"Heal\",\n },\n {\n icon: ,\n configuration_id: \"scanner\",\n configuration_label: \"Scanner\",\n },\n {\n icon: ,\n configuration_id: \"etcd\",\n configuration_label: \"Etcd\",\n },\n {\n icon: ,\n configuration_id: \"logger_webhook\",\n configuration_label: \"Logger Webhook\",\n },\n {\n icon: ,\n configuration_id: \"audit_webhook\",\n configuration_label: \"Audit Webhook\",\n },\n {\n icon: ,\n configuration_id: \"audit_kafka\",\n configuration_label: \"Audit Kafka\",\n },\n];\n\nexport const fieldsConfigurations: any = {\n region: [\n {\n name: \"name\",\n required: true,\n label: \"Server Location\",\n tooltip: 'Name of the location of the server e.g. \"us-west-rack2\"',\n type: \"string\",\n placeholder: \"e.g. us-west-rack-2\",\n },\n {\n name: \"comment\",\n required: false,\n label: \"Comment\",\n tooltip: \"You can add a comment to this setting\",\n type: \"comment\",\n placeholder: \"Enter custom notes if any\",\n },\n ],\n compression: [\n {\n name: \"extensions\",\n required: false,\n label: \"Extensions\",\n tooltip:\n 'Extensions to compress e.g. \".txt\", \".log\" or \".csv\" - you can write one per field',\n type: \"csv\",\n placeholder: \"Enter an Extension\",\n withBorder: true,\n },\n {\n name: \"mime_types\",\n required: false,\n label: \"Mime Types\",\n tooltip:\n 'Mime types e.g. \"text/*\", \"application/json\" or \"application/xml\" - you can write one per field',\n type: \"csv\",\n placeholder: \"Enter a Mime Type\",\n withBorder: true,\n },\n ],\n api: [\n {\n name: \"requests_max\",\n required: false,\n label: \"Requests Max\",\n tooltip: \"Maximum number of concurrent requests, e.g. '1600'\",\n type: \"number\",\n placeholder: \"Enter Requests Max\",\n },\n {\n name: \"cors_allow_origin\",\n required: false,\n label: \"Cors Allow Origin\",\n tooltip: \"List of origins allowed for CORS requests\",\n type: \"csv\",\n placeholder: \"Enter allowed origin e.g. https://example.com\",\n },\n {\n name: \"replication_workers\",\n required: false,\n label: \"Replication Workers\",\n tooltip: \"Number of replication workers, defaults to 100\",\n type: \"number\",\n placeholder: \"Enter Replication Workers\",\n },\n {\n name: \"replication_failed_workers\",\n required: false,\n label: \"Replication Failed Workers\",\n tooltip:\n \"Number of replication workers for recently failed replicas, defaults to 4\",\n type: \"number\",\n placeholder: \"Enter Replication Failed Workers\",\n },\n ],\n heal: [\n {\n name: \"bitrotscan\",\n required: false,\n label: \"Bitrot Scan\",\n tooltip:\n \"Perform bitrot scan on disks when checking objects during scanner\",\n type: \"on|off\",\n },\n {\n name: \"max_sleep\",\n required: false,\n label: \"Max Sleep\",\n tooltip:\n \"Maximum sleep duration between objects to slow down heal operation, e.g. 2s\",\n type: \"duration\",\n placeholder: \"Enter Max Sleep Duration\",\n },\n {\n name: \"max_io\",\n required: false,\n label: \"Max IO\",\n tooltip:\n \"Maximum IO requests allowed between objects to slow down heal operation, e.g. 3\",\n type: \"number\",\n placeholder: \"Enter Max IO\",\n },\n ],\n scanner: [\n {\n name: \"delay\",\n required: false,\n label: \"Delay Multiplier\",\n tooltip: \"Scanner delay multiplier, defaults to '10.0'\",\n type: \"number\",\n placeholder: \"Enter Delay\",\n },\n {\n name: \"max_wait\",\n required: false,\n label: \"Max Wait\",\n tooltip: \"Maximum wait time between operations, defaults to '15s'\",\n type: \"duration\",\n placeholder: \"Enter Max Wait\",\n },\n {\n name: \"cycle\",\n required: false,\n label: \"Cycle\",\n tooltip: \"Time duration between scanner cycles, defaults to '1m'\",\n type: \"duration\",\n placeholder: \"Enter Cycle\",\n },\n ],\n etcd: [\n {\n name: \"endpoints\",\n required: true,\n label: \"Endpoints\",\n tooltip:\n 'List of etcd endpoints e.g. \"http://localhost:2379\" - you can write one per field',\n type: \"csv\",\n placeholder: \"Enter Endpoint\",\n },\n {\n name: \"path_prefix\",\n required: false,\n label: \"Path Prefix\",\n tooltip: 'Namespace prefix to isolate tenants e.g. \"customer1/\"',\n type: \"string\",\n placeholder: \"Enter Path Prefix\",\n },\n {\n name: \"coredns_path\",\n required: false,\n label: \"Coredns Path\",\n tooltip: 'Shared bucket DNS records, default is \"/skydns\"',\n type: \"string\",\n placeholder: \"Enter Coredns Path\",\n },\n {\n name: \"client_cert\",\n required: false,\n label: \"Client Cert\",\n tooltip: \"Client cert for mTLS authentication\",\n type: \"string\",\n placeholder: \"Enter Client Cert\",\n },\n {\n name: \"client_cert_key\",\n required: false,\n label: \"Client Cert Key\",\n tooltip: \"Client cert key for mTLS authentication\",\n type: \"string\",\n placeholder: \"Enter Client Cert Key\",\n },\n {\n name: \"comment\",\n required: false,\n label: \"Comment\",\n tooltip: \"You can add a comment to this setting\",\n type: \"comment\",\n multiline: true,\n placeholder: \"Enter custom notes if any\",\n },\n ],\n logger_webhook: [\n {\n name: \"endpoint\",\n required: true,\n label: \"Endpoint\",\n type: \"string\",\n placeholder: \"Enter Endpoint\",\n },\n {\n name: \"auth_token\",\n required: true,\n label: \"Auth Token\",\n type: \"string\",\n placeholder: \"Enter Auth Token\",\n },\n ],\n audit_webhook: [\n {\n name: \"endpoint\",\n required: true,\n label: \"Endpoint\",\n type: \"string\",\n placeholder: \"Enter Endpoint\",\n },\n {\n name: \"auth_token\",\n required: true,\n label: \"Auth Token\",\n type: \"string\",\n placeholder: \"Enter Auth Token\",\n },\n ],\n audit_kafka: [\n {\n name: \"enable\",\n required: false,\n label: \"Enable\",\n tooltip: \"Enable audit_kafka target\",\n type: \"on|off\",\n customValueProcess: (origValue: string) => {\n return origValue === \"\" || origValue === \"on\" ? \"on\" : \"off\";\n },\n },\n {\n name: \"brokers\",\n required: true,\n label: \"Brokers\",\n type: \"csv\",\n placeholder: \"Enter Kafka Broker\",\n },\n {\n name: \"topic\",\n required: false,\n label: \"Topic\",\n type: \"string\",\n placeholder: \"Enter Kafka Topic\",\n tooltip: \"Kafka topic used for bucket notifications\",\n },\n {\n name: \"sasl\",\n required: false,\n label: \"Use SASL\",\n tooltip:\n \"Enable SASL (Simple Authentication and Security Layer) authentication\",\n type: \"on|off\",\n },\n {\n name: \"sasl_username\",\n required: false,\n label: \"SASL Username\",\n type: \"string\",\n placeholder: \"Enter SASL Username\",\n tooltip: \"Username for SASL/PLAIN or SASL/SCRAM authentication\",\n },\n {\n name: \"sasl_password\",\n required: false,\n label: \"SASL Password\",\n type: \"password\",\n placeholder: \"Enter SASL Password\",\n tooltip: \"Password for SASL/PLAIN or SASL/SCRAM authentication\",\n },\n {\n name: \"sasl_mechanism\",\n required: false,\n label: \"SASL Mechanism\",\n type: \"string\",\n placeholder: \"Enter SASL Mechanism\",\n tooltip: \"SASL authentication mechanism\",\n },\n {\n name: \"tls\",\n required: false,\n label: \"Use TLS\",\n tooltip: \"Enable TLS (Transport Layer Security)\",\n type: \"on|off\",\n },\n {\n name: \"tls_skip_verify\",\n required: false,\n label: \"Skip TLS Verification\",\n tooltip: \"Trust server TLS without verification\",\n type: \"on|off\",\n },\n {\n name: \"client_tls_cert\",\n required: false,\n label: \"Client Cert\",\n tooltip: \"Client cert for mTLS authentication\",\n type: \"string\",\n placeholder: \"Enter Client Cert\",\n },\n {\n name: \"client_tls_key\",\n required: false,\n label: \"Client Cert Key\",\n tooltip: \"Client cert key for mTLS authentication\",\n type: \"string\",\n placeholder: \"Enter Client Cert Key\",\n },\n {\n name: \"tls_client_auth\",\n required: false,\n label: \"TLS Client Auth\",\n tooltip:\n \"ClientAuth determines the Kafka server's policy for TLS client authorization\",\n type: \"string\",\n },\n {\n name: \"version\",\n required: false,\n label: \"Version\",\n tooltip: \"Specify the version of the Kafka cluster\",\n type: \"string\",\n },\n ],\n};\n\nexport const removeEmptyFields = (formFields: IElementValue[]) => {\n const nonEmptyFields = formFields.filter((field) => field.value !== \"\");\n\n return nonEmptyFields;\n};\n\nexport const selectSAs = (\n e: React.ChangeEvent,\n setSelectedSAs: Function,\n selectedSAs: string[],\n) => {\n const targetD = e.target;\n const value = targetD.value;\n const checked = targetD.checked;\n\n let elements: string[] = [...selectedSAs]; // We clone the selectedSAs array\n if (checked) {\n // If the user has checked this field we need to push this to selectedSAs\n elements.push(value);\n } else {\n // User has unchecked this field, we need to remove it from the list\n elements = elements.filter((element) => element !== value);\n }\n setSelectedSAs(elements);\n return elements;\n};\n\nexport const overrideFields = (formFields: IElementValue[]): IOverrideEnv => {\n let overrideReturn: IOverrideEnv = {};\n\n formFields.forEach((envItem) => {\n // it has override values, we construct the value\n if (envItem.env_override) {\n const value: OverrideValue = {\n value: envItem.env_override.value || \"\",\n overrideEnv: envItem.env_override.name || \"\",\n };\n\n overrideReturn = { ...overrideReturn, [envItem.key]: value };\n }\n });\n\n return overrideReturn;\n};\n","// This file is part of MinIO Console Server\n// Copyright (c) 2022 MinIO, Inc.\n//\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU Affero General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU Affero General Public License for more details.\n//\n// You should have received a copy of the GNU Affero General Public License\n// along with this program. If not, see .\n\nimport React, { Fragment, useState } from \"react\";\nimport { ConfirmDeleteIcon } from \"mds\";\nimport ConfirmDialog from \"../../../screens/Console/Common/ModalWrapper/ConfirmDialog\";\nimport { setErrorSnackMessage } from \"../../../systemSlice\";\nimport { useAppDispatch } from \"../../../store\";\nimport { api } from \"api\";\nimport { ApiError, HttpResponse } from \"api/consoleApi\";\nimport { errorToHandler } from \"api/errors\";\n\ninterface IDeleteMultiSAsProps {\n closeDeleteModalAndRefresh: (refresh: boolean) => void;\n deleteOpen: boolean;\n selectedSAs: string[];\n}\n\nconst DeleteMultipleSAs = ({\n closeDeleteModalAndRefresh,\n deleteOpen,\n selectedSAs,\n}: IDeleteMultiSAsProps) => {\n const dispatch = useAppDispatch();\n const onClose = () => closeDeleteModalAndRefresh(false);\n const [loadingDelete, setLoadingDelete] = useState(false);\n\n if (!selectedSAs) {\n return null;\n }\n const onConfirmDelete = () => {\n setLoadingDelete(true);\n api.serviceAccounts\n .deleteMultipleServiceAccounts(selectedSAs)\n .then((_) => {\n closeDeleteModalAndRefresh(true);\n })\n .catch(async (res: HttpResponse) => {\n const err = (await res.json()) as ApiError;\n dispatch(setErrorSnackMessage(errorToHandler(err)));\n closeDeleteModalAndRefresh(false);\n })\n .finally(() => setLoadingDelete(false));\n };\n return (\n }\n isLoading={loadingDelete}\n onConfirm={onConfirmDelete}\n onClose={onClose}\n confirmationContent={\n \n Are you sure you want to delete the selected {selectedSAs.length}{\" \"}\n Access Keys?{\" \"}\n \n }\n />\n );\n};\n\nexport default DeleteMultipleSAs;\n","// This file is part of MinIO Console Server\n// Copyright (c) 2021 MinIO, Inc.\n//\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU Affero General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU Affero General Public License for more details.\n//\n// You should have received a copy of the GNU Affero General Public License\n// along with this program. If not, see .\n\nimport { Policy, User } from \"api/consoleApi\";\n\ninterface policyDetailsInterface {\n policy: string;\n}\n\nexport const usersSort = (a: User, b: User) => {\n if (a.accessKey && b.accessKey) {\n if (a.accessKey > b.accessKey) {\n return 1;\n }\n if (a.accessKey < b.accessKey) {\n return -1;\n }\n }\n // a must be equal to b\n return 0;\n};\n\nexport const policySort = (a: Policy, b: Policy) => {\n if (a.name! > b.name!) {\n return 1;\n }\n if (a.name! < b.name!) {\n return -1;\n }\n // a must be equal to b\n return 0;\n};\n\nexport const stringSort = (a: string, b: string) => {\n if (a > b) {\n return 1;\n }\n if (a < b) {\n return -1;\n }\n // a must be equal to b\n return 0;\n};\n\nexport const policyDetailsSort = (\n a: policyDetailsInterface,\n b: policyDetailsInterface,\n) => {\n if (a.policy > b.policy) {\n return 1;\n }\n if (a.policy < b.policy) {\n return -1;\n }\n // a must be equal to b\n return 0;\n};\n","\"use strict\";\n\nvar deselectCurrent = require(\"toggle-selection\");\n\nvar clipboardToIE11Formatting = {\n \"text/plain\": \"Text\",\n \"text/html\": \"Url\",\n \"default\": \"Text\"\n}\n\nvar defaultMessage = \"Copy to clipboard: #{key}, Enter\";\n\nfunction format(message) {\n var copyKey = (/mac os x/i.test(navigator.userAgent) ? \"⌘\" : \"Ctrl\") + \"+C\";\n return message.replace(/#{\\s*key\\s*}/g, copyKey);\n}\n\nfunction copy(text, options) {\n var debug,\n message,\n reselectPrevious,\n range,\n selection,\n mark,\n success = false;\n if (!options) {\n options = {};\n }\n debug = options.debug || false;\n try {\n reselectPrevious = deselectCurrent();\n\n range = document.createRange();\n selection = document.getSelection();\n\n mark = document.createElement(\"span\");\n mark.textContent = text;\n // avoid screen readers from reading out loud the text\n mark.ariaHidden = \"true\"\n // reset user styles for span element\n mark.style.all = \"unset\";\n // prevents scrolling to the end of the page\n mark.style.position = \"fixed\";\n mark.style.top = 0;\n mark.style.clip = \"rect(0, 0, 0, 0)\";\n // used to preserve spaces and line breaks\n mark.style.whiteSpace = \"pre\";\n // do not inherit user-select (it may be `none`)\n mark.style.webkitUserSelect = \"text\";\n mark.style.MozUserSelect = \"text\";\n mark.style.msUserSelect = \"text\";\n mark.style.userSelect = \"text\";\n mark.addEventListener(\"copy\", function(e) {\n e.stopPropagation();\n if (options.format) {\n e.preventDefault();\n if (typeof e.clipboardData === \"undefined\") { // IE 11\n debug && console.warn(\"unable to use e.clipboardData\");\n debug && console.warn(\"trying IE specific stuff\");\n window.clipboardData.clearData();\n var format = clipboardToIE11Formatting[options.format] || clipboardToIE11Formatting[\"default\"]\n window.clipboardData.setData(format, text);\n } else { // all other browsers\n e.clipboardData.clearData();\n e.clipboardData.setData(options.format, text);\n }\n }\n if (options.onCopy) {\n e.preventDefault();\n options.onCopy(e.clipboardData);\n }\n });\n\n document.body.appendChild(mark);\n\n range.selectNodeContents(mark);\n selection.addRange(range);\n\n var successful = document.execCommand(\"copy\");\n if (!successful) {\n throw new Error(\"copy command was unsuccessful\");\n }\n success = true;\n } catch (err) {\n debug && console.error(\"unable to copy using execCommand: \", err);\n debug && console.warn(\"trying IE specific stuff\");\n try {\n window.clipboardData.setData(options.format || \"text\", text);\n options.onCopy && options.onCopy(window.clipboardData);\n success = true;\n } catch (err) {\n debug && console.error(\"unable to copy using clipboardData: \", err);\n debug && console.error(\"falling back to prompt\");\n message = format(\"message\" in options ? options.message : defaultMessage);\n window.prompt(message, text);\n }\n } finally {\n if (selection) {\n if (typeof selection.removeRange == \"function\") {\n selection.removeRange(range);\n } else {\n selection.removeAllRanges();\n }\n }\n\n if (mark) {\n document.body.removeChild(mark);\n }\n reselectPrevious();\n }\n\n return success;\n}\n\nmodule.exports = copy;\n","\"use strict\";\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.CopyToClipboard = void 0;\n\nvar _react = _interopRequireDefault(require(\"react\"));\n\nvar _copyToClipboard = _interopRequireDefault(require(\"copy-to-clipboard\"));\n\nvar _excluded = [\"text\", \"onCopy\", \"options\", \"children\"];\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\n\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, \"prototype\", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } else if (call !== void 0) { throw new TypeError(\"Derived constructors may only return object or undefined\"); } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nvar CopyToClipboard = /*#__PURE__*/function (_React$PureComponent) {\n _inherits(CopyToClipboard, _React$PureComponent);\n\n var _super = _createSuper(CopyToClipboard);\n\n function CopyToClipboard() {\n var _this;\n\n _classCallCheck(this, CopyToClipboard);\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _super.call.apply(_super, [this].concat(args));\n\n _defineProperty(_assertThisInitialized(_this), \"onClick\", function (event) {\n var _this$props = _this.props,\n text = _this$props.text,\n onCopy = _this$props.onCopy,\n children = _this$props.children,\n options = _this$props.options;\n\n var elem = _react[\"default\"].Children.only(children);\n\n var result = (0, _copyToClipboard[\"default\"])(text, options);\n\n if (onCopy) {\n onCopy(text, result);\n } // Bypass onClick if it was present\n\n\n if (elem && elem.props && typeof elem.props.onClick === 'function') {\n elem.props.onClick(event);\n }\n });\n\n return _this;\n }\n\n _createClass(CopyToClipboard, [{\n key: \"render\",\n value: function render() {\n var _this$props2 = this.props,\n _text = _this$props2.text,\n _onCopy = _this$props2.onCopy,\n _options = _this$props2.options,\n children = _this$props2.children,\n props = _objectWithoutProperties(_this$props2, _excluded);\n\n var elem = _react[\"default\"].Children.only(children);\n\n return /*#__PURE__*/_react[\"default\"].cloneElement(elem, _objectSpread(_objectSpread({}, props), {}, {\n onClick: this.onClick\n }));\n }\n }]);\n\n return CopyToClipboard;\n}(_react[\"default\"].PureComponent);\n\nexports.CopyToClipboard = CopyToClipboard;\n\n_defineProperty(CopyToClipboard, \"defaultProps\", {\n onCopy: undefined,\n options: undefined\n});","\"use strict\";\n\nvar _require = require('./Component'),\n CopyToClipboard = _require.CopyToClipboard;\n\nCopyToClipboard.CopyToClipboard = CopyToClipboard;\nmodule.exports = CopyToClipboard;","\nmodule.exports = function () {\n var selection = document.getSelection();\n if (!selection.rangeCount) {\n return function () {};\n }\n var active = document.activeElement;\n\n var ranges = [];\n for (var i = 0; i < selection.rangeCount; i++) {\n ranges.push(selection.getRangeAt(i));\n }\n\n switch (active.tagName.toUpperCase()) { // .toUpperCase handles XHTML\n case 'INPUT':\n case 'TEXTAREA':\n active.blur();\n break;\n\n default:\n active = null;\n break;\n }\n\n selection.removeAllRanges();\n return function () {\n selection.type === 'Caret' &&\n selection.removeAllRanges();\n\n if (!selection.rangeCount) {\n ranges.forEach(function(range) {\n selection.addRange(range);\n });\n }\n\n active &&\n active.focus();\n };\n};\n"],"names":["ACCOUNT_TABLE_COLUMNS","label","elementKey","renderFunction","expTime","fmtDate","DateTime","fromISO","toUTC","toFormat","_jsx","title","children","status","_ref","open","selectedAccessKey","closeModalAndRefresh","dispatch","useAppDispatch","loading","setLoading","useState","policyDefinition","setPolicyDefinition","name","setName","description","setDescription","expiry","setExpiry","setStatus","useEffect","api","serviceAccounts","getServiceAccount","then","res","saInfo","data","expiration","accountStatus","policy","catch","err","setModalErrorSnackMessage","errorToHandler","ModalWrapper","concat","modalOpen","onClose","titleIcon","ChangeAccessPolicyIcon","noValidate","autoComplete","onSubmit","e","setPolicy","newPolicy","preventDefault","updateServiceAccount","async","json","setErrorSnackMessage","_jsxs","Grid","container","item","xs","CodeMirrorWrapper","value","onChange","editorHeight","helptip","Fragment","target","href","Box","sx","marginBottom","marginTop","display","width","DateTimeInput","noLabelMinWidth","id","timeFormat","secondsSelector","InputBox","size","type","placeholder","alignItems","justifyContent","fontWeight","color","gap","style","padding","Switch","indicatorLabels","checked","modalStyleUtils","modalButtonBar","Button","variant","onClick","disabled","WrappedComponent","fallback","arguments","length","undefined","props","Suspense","tooltip","mode","CodeEditor","helpTools","TooltipWrapper","CopyToClipboard","text","icon","CopyIcon","helpTip","helpTipPlacement","configurationElements","PublicIcon","configuration_id","configuration_label","CompressIcon","CodeIcon","FirstAidIcon","FindReplaceIcon","KeyIcon","ConsoleIcon","PendingItemsIcon","LogsIcon","fieldsConfigurations","region","required","compression","withBorder","heal","scanner","etcd","multiline","logger_webhook","audit_webhook","audit_kafka","customValueProcess","origValue","removeEmptyFields","formFields","filter","field","selectSAs","setSelectedSAs","selectedSAs","targetD","elements","push","element","overrideFields","overrideReturn","forEach","envItem","env_override","overrideEnv","key","closeDeleteModalAndRefresh","deleteOpen","loadingDelete","setLoadingDelete","ConfirmDialog","confirmText","isOpen","ConfirmDeleteIcon","isLoading","onConfirm","onConfirmDelete","deleteMultipleServiceAccounts","_","finally","confirmationContent","usersSort","a","b","accessKey","policySort","stringSort","policyDetailsSort","deselectCurrent","require","clipboardToIE11Formatting","module","exports","options","debug","message","reselectPrevious","range","selection","mark","success","document","createRange","getSelection","createElement","textContent","ariaHidden","all","position","top","clip","whiteSpace","webkitUserSelect","MozUserSelect","msUserSelect","userSelect","addEventListener","stopPropagation","format","clipboardData","console","warn","window","clearData","setData","onCopy","body","appendChild","selectNodeContents","addRange","execCommand","Error","error","copyKey","test","navigator","userAgent","replace","prompt","removeRange","removeAllRanges","removeChild","_typeof","obj","Symbol","iterator","constructor","prototype","Object","defineProperty","_react","_interopRequireDefault","_copyToClipboard","_excluded","__esModule","ownKeys","object","enumerableOnly","keys","getOwnPropertySymbols","symbols","sym","getOwnPropertyDescriptor","enumerable","apply","_objectSpread","i","source","_defineProperty","getOwnPropertyDescriptors","defineProperties","_objectWithoutProperties","excluded","sourceKeys","indexOf","_objectWithoutPropertiesLoose","sourceSymbolKeys","propertyIsEnumerable","call","_defineProperties","descriptor","configurable","writable","_setPrototypeOf","o","p","setPrototypeOf","__proto__","_createSuper","Derived","hasNativeReflectConstruct","Reflect","construct","sham","Proxy","Boolean","valueOf","_isNativeReflectConstruct","result","Super","_getPrototypeOf","NewTarget","this","self","TypeError","_assertThisInitialized","_possibleConstructorReturn","ReferenceError","getPrototypeOf","_React$PureComponent","subClass","superClass","create","_inherits","Constructor","protoProps","staticProps","_super","_this","instance","_classCallCheck","_len","args","Array","_key","event","_this$props","elem","Children","only","_this$props2","cloneElement","PureComponent","rangeCount","active","activeElement","ranges","getRangeAt","tagName","toUpperCase","blur","focus"],"sourceRoot":""}
\ No newline at end of file
diff --git a/web-app/build/static/js/1324.62d917da.chunk.js b/web-app/build/static/js/1324.62d917da.chunk.js
deleted file mode 100644
index f8766d31c..000000000
--- a/web-app/build/static/js/1324.62d917da.chunk.js
+++ /dev/null
@@ -1,2 +0,0 @@
-"use strict";(self.webpackChunkweb_app=self.webpackChunkweb_app||[]).push([[1324,5851,4705],{85851:(e,s,t)=>{t.r(s),t.d(s,{default:()=>x});var l=t(65043),n=t(89923),i=t(56483),o=t(64159),c=t(20554),r=t(58661),a=t(56629),d=t(53518),u=t(70579);const x=e=>{let{selectedGroups:s,deleteOpen:t,closeDeleteModalAndRefresh:x}=e;const p=(0,c.jL)(),[h,m]=(0,l.useState)(!1);if(!s)return null;const j=s.map((e=>(0,u.jsx)("div",{children:(0,u.jsx)("b",{children:e})},e)));return(0,u.jsx)(r.A,{title:"Delete Group".concat(s.length>1?"s":""),confirmText:"Delete",isOpen:t,titleIcon:(0,u.jsx)(n.xWY,{}),isLoading:h,onConfirm:()=>{for(let e of s)m(!0),a.F.group.removeGroup((0,i.nf)(e)).then((e=>{x(!0)})).catch((async e=>{const s=await e.json();p((0,o.C9)((0,d.S)(s))),x(!1)})).finally((()=>m(!1)))},onClose:()=>x(!1),confirmationContent:(0,u.jsxs)(l.Fragment,{children:["Are you sure you want to delete the following"," ",1===s.length?"":s.length," group",s.length>1?"s?":"?",j]})})}},91324:(e,s,t)=>{t.r(s),t.d(s,{default:()=>G,formatPolicy:()=>P});var l=t(65043),n=t(73216),i=t(89923),o=t(56629),c=t(53518),r=t(99161),a=t(77938),d=t(56483),u=t(64159),x=t(20554),p=t(62560),h=t(74705),m=t(77403),j=t(22923),b=t(94141),g=t(70579);const y=e=>{let{title:s="",groupStatus:t="enabled",preSelectedUsers:n=[],selectedGroup:r="",open:a,onClose:p}=e;const h=(0,x.jL)(),[y,f]=(0,l.useState)(n);return(0,g.jsxs)(b.A,{modalOpen:a,onClose:p,title:s,titleIcon:(0,g.jsx)(i.WC,{}),children:[(0,g.jsxs)(i.Hbc,{withBorders:!1,containerPadding:!1,children:[(0,g.jsx)(i.EmB,{label:"Selected Group",sx:{width:"100%"},children:r}),(0,g.jsx)(j.A,{selectedUsers:y,setSelectedUsers:f,editMode:!r})]}),(0,g.jsxs)(i.xA9,{item:!0,xs:12,sx:m.Uz.modalButtonBar,children:[(0,g.jsx)(i.$nd,{id:"reset-add-group-member",type:"button",variant:"regular",onClick:()=>{f(n)},label:"Reset"}),(0,g.jsx)(i.$nd,{id:"save-add-group-member",type:"button",variant:"callAction",onClick:()=>{o.F.group.updateGroup((0,d.nf)(r),{members:y,status:t}).then((()=>{p()})).catch((e=>{p(),h((0,u.Dy)((0,c.S)(e.error)))}))},label:"Save"})]})]})};var f=t(85851),v=t(64681),A=t(6681),S=t(55968),C=t(48793);const P=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return e.length<=0?[]:e.split(",")},G=()=>{const e=(0,x.jL)(),s=(0,n.Zp)(),t=(0,n.g)(),[m,j]=(0,l.useState)({}),[b,G]=(0,l.useState)(!1),[M,U]=(0,l.useState)(!1),[k,w]=(0,l.useState)(!1),[E,z]=(0,l.useState)(""),[L,D]=(0,l.useState)("members"),F=(0,d.x6)(t.groupName||""),{members:K=[],policy:B="",status:R}=m,_=K.filter((e=>e.includes(E))),I=(0,a._)(r.Ms,r.Ld,!0);(0,l.useEffect)((()=>{e((0,u.ph)("group_details"))}),[]),(0,l.useEffect)((()=>{F&&Z()}),[F]);const O=P(B),N="enabled"===R,$=K.length>0?"Edit Members":"Add Members",H=(0,a._)(r.Ms,r.Oh),J=(0,a._)(r.Ms,r.Hr,!0),T=(0,a._)(r.Ms,r.QR,!0),Q=(0,a._)(r.Ms,r.yv,!0);function Z(){H&&o.F.group.groupInfo((0,d.nf)(F)).then((e=>{j(e.data)})).catch((s=>{e((0,u.Dy)((0,c.S)(s.error))),j({})}))}const W=(0,g.jsxs)(i.azJ,{onMouseMove:()=>{e((0,u.ph)("groups_members"))},children:[(0,g.jsx)(i._xt,{separator:!0,sx:{marginBottom:15},actions:(0,g.jsxs)(i.azJ,{sx:{display:"flex",gap:10},children:[(0,g.jsx)(v.A,{placeholder:"Search members",onChange:e=>{z(e)},value:E,sx:{maxWidth:280}}),(0,g.jsx)(a.R,{resource:r.Ms,scopes:r.BD,errorProps:{disabled:!0},children:(0,g.jsx)(A.A,{tooltip:J?$:(0,r.vj)(r.k1,"edit Group membership"),children:(0,g.jsx)(i.$nd,{id:"add-user-group",label:$,variant:"callAction",icon:(0,g.jsx)(i.REV,{}),onClick:()=>{U(!0)},disabled:!J})})})]}),children:"Members"}),(0,g.jsx)(i.xA9,{item:!0,xs:12,children:(0,g.jsx)(a.R,{resource:r.Ms,scopes:r.x6,errorProps:{disabled:!0},children:(0,g.jsx)(A.A,{tooltip:I?"":(0,r.vj)(r.Ld,"view User details"),children:(0,g.jsx)(i.bQt,{itemActions:[{type:"view",onClick:e=>{s("".concat(r.zZ.USERS,"/").concat((0,d.nf)(e)))},isDisabled:!I}],columns:[{label:"Access Key"}],selectedItems:[],isLoading:!1,records:_,entityName:"Users"})})})})]}),Y=(0,g.jsxs)(l.Fragment,{children:[(0,g.jsx)(i.azJ,{onMouseMove:()=>{e((0,u.ph)("groups_policies"))},children:(0,g.jsx)(i._xt,{separator:!0,sx:{marginBottom:15},actions:(0,g.jsx)(A.A,{tooltip:T?"Set Policies":(0,r.vj)(r.QR,"assign Policies"),children:(0,g.jsx)(i.$nd,{id:"set-policies",label:"Set Policies",variant:"callAction",icon:(0,g.jsx)(i.n$X,{}),onClick:()=>{G(!0)},disabled:!T})}),children:"Policies"})}),(0,g.jsx)(i.xA9,{item:!0,xs:12,children:(0,g.jsx)(A.A,{tooltip:Q?"":(0,r.vj)(r.yv,"view Policy details"),children:(0,g.jsx)(i.bQt,{itemActions:[{type:"view",onClick:e=>{s("".concat(r.zZ.POLICIES,"/").concat((0,d.nf)(e)))},isDisabled:!Q}],columns:[{label:"Policy"}],isLoading:!1,records:O,entityName:"Policies"})})})]});return(0,g.jsxs)(l.Fragment,{children:[b?(0,g.jsx)(h.default,{open:b,selectedGroups:[F],selectedUser:null,closeModalAndRefresh:()=>{G(!1),Z(),e((0,p.Gy)([]))}}):null,M?(0,g.jsx)(y,{selectedGroup:F,onSaveClick:()=>{},title:$,groupStatus:R,preSelectedUsers:K,open:M,onClose:()=>{U(!1),Z()}}):null,k&&(0,g.jsx)(f.default,{deleteOpen:k,selectedGroups:[F],closeDeleteModalAndRefresh:e=>{w(!1),e&&s(r.zZ.GROUPS)}}),(0,g.jsx)(C.A,{label:(0,g.jsx)(l.Fragment,{children:(0,g.jsx)(i.EGL,{label:"Groups",onClick:()=>s(r.zZ.GROUPS)})}),actions:(0,g.jsx)(S.A,{})}),(0,g.jsxs)(i.Mxu,{children:[(0,g.jsx)(i.xA9,{item:!0,xs:12,children:(0,g.jsx)(i.lcx,{icon:(0,g.jsx)(l.Fragment,{children:(0,g.jsx)(i.YXz,{width:40})}),title:F,subTitle:null,bottomBorder:!0,actions:(0,g.jsxs)(i.azJ,{sx:{display:"flex",fontSize:14,alignItems:"center",gap:15},children:[(0,g.jsx)("span",{children:"Group Status:"}),(0,g.jsx)("span",{id:"group-status-label",style:{fontWeight:"bold"},children:N?"Enabled":"Disabled"}),(0,g.jsx)(A.A,{tooltip:(0,a._)(r.Ms,r.pf,!0)?"":(0,r.vj)(r.pf,"enable or disable Groups"),children:(0,g.jsx)(a.R,{resource:r.Ms,scopes:r.pf,errorProps:{disabled:!0},matchAll:!0,children:(0,g.jsx)(i.dOG,{indicatorLabels:["Enabled","Disabled"],checked:N,value:"group_enabled",id:"group-status",name:"group-status",onChange:()=>{var s;s=!N,o.F.group.updateGroup((0,d.nf)(F),{members:K,status:s?"enabled":"disabled"}).then((()=>{Z()})).catch((s=>{e((0,u.Dy)((0,c.S)(s.error)))}))},switchOnly:!0})})}),(0,g.jsx)(A.A,{tooltip:"Delete Group",children:(0,g.jsx)(i.$nd,{id:"delete-user-group",variant:"secondary",icon:(0,g.jsx)(i.ucK,{}),onClick:()=>{w(!0)}})})]}),sx:{marginBottom:15}})}),(0,g.jsx)(i.xA9,{item:!0,xs:12,children:(0,g.jsx)(i.tUM,{options:[{tabConfig:{id:"members",label:"Members"},content:W},{tabConfig:{id:"policies",label:"Policies"},content:Y}],currentTabOrPath:L,onTabClick:D})})]})]})}},22923:(e,s,t)=>{t.d(s,{A:()=>h});var l=t(65043),n=t(33097),i=t.n(n),o=t(56629),c=t(53518),r=t(89923),a=t(8185),d=t(64159),u=t(20554),x=t(64681),p=t(70579);const h=e=>{let{selectedUsers:s,setSelectedUsers:t,editMode:n=!1}=e;const h=(0,u.jL)(),[m,j]=(0,l.useState)([]),[b,g]=(0,l.useState)(!1),[y,f]=(0,l.useState)(""),v=(0,l.useCallback)((()=>{o.F.users.listUsers().then((e=>{let s=i()(e.data,"users",[]);s||(s=[]),j(s.sort(a.LA)),g(!1)})).catch((e=>{h((0,d.Dy)((0,c.S)(e.error))),g(!1)}))}),[h]);(0,l.useEffect)((()=>{g(!0)}),[]),(0,l.useEffect)((()=>{b&&v()}),[b,v]);const A=s||[],S=m.filter((e=>e.accessKey.includes(y)));return(0,p.jsx)(r.xA9,{item:!0,xs:12,className:"inputItem",children:(0,p.jsxs)(r.azJ,{children:[b&&(0,p.jsx)(r.z21,{}),(null===m||void 0===m?void 0:m.length)>0?(0,p.jsxs)(l.Fragment,{children:[(0,p.jsx)(r.xA9,{item:!0,xs:12,className:"inputItem",children:(0,p.jsx)(x.A,{label:n?"Edit Members":"Assign Users",placeholder:"Filter Users",onChange:f,value:y})}),(0,p.jsx)(r.bQt,{columns:[{label:"Access Key",elementKey:"accessKey"}],onSelect:e=>{const s=e.target,l=s.value,n=s.checked;let i=[...A];return n?i.push(l):i=i.filter((e=>e!==l)),t(i),i},selectedItems:A,isLoading:b,records:S,entityName:"Users",idField:"accessKey",customPaperHeight:"200px"})]}):(0,p.jsx)(r.azJ,{sx:{textAlign:"center",padding:"10px 0"},children:"No Users to display"})]})})}},42967:(e,s,t)=>{t.d(s,{A:()=>p});var l=t(65043),n=t(89923),i=t(8185),o=t(64681),c=t(64159),r=t(20554),a=t(62560),d=t(22166),u=t(56629),x=t(70579);const p=e=>{let{noTitle:s=!1}=e;const t=(0,r.jL)(),[p,h]=(0,l.useState)([]),[m,j]=(0,l.useState)(!1),[b,g]=(0,l.useState)(""),y=(0,d.d4)((e=>e.createUser.selectedPolicies)),f=(0,l.useCallback)((()=>{j(!0),u.F.policies.listPolicies().then((e=>{var s;const t=null!==(s=e.data.policies)&&void 0!==s?s:[];j(!1),h(t.sort(i.Hw))})).catch((e=>{j(!1),t((0,c.Dy)(e))}))}),[t]);(0,l.useEffect)((()=>{j(!0)}),[]),(0,l.useEffect)((()=>{m&&f()}),[m,f]);const v=p.filter((e=>e.name.includes(b)));return(0,x.jsxs)(n.xA9,{item:!0,xs:12,className:"inputItem",children:[m&&(0,x.jsx)(n.z21,{}),p.length>0?(0,x.jsxs)(l.Fragment,{children:[(0,x.jsx)(n.xA9,{item:!0,xs:12,className:"inputItem",children:(0,x.jsx)(o.A,{placeholder:"Start typing to search for a Policy",onChange:e=>{g(e)},value:b,label:s?"":"Assign Policies"})}),(0,x.jsx)(n.bQt,{columns:[{label:"Policy",elementKey:"name"}],onSelect:e=>{const s=e.target,l=s.value,n=s.checked;let i=[...y];n?i.push(l):i=i.filter((e=>e!==l)),i=i.filter((e=>""!==e)),t((0,a.Gy)(i))},selectedItems:y,isLoading:m,records:v,entityName:"Policies",idField:"name",customPaperHeight:"200px"})]}):(0,x.jsx)(n.azJ,{sx:{textAlign:"center",padding:"10px 0"},children:"No Policies Available"})]})}},74705:(e,s,t)=>{t.r(s),t.d(s,{default:()=>b});var l=t(65043),n=t(33097),i=t.n(n),o=t(22166),c=t(89923),r=t(56483),a=t(64159),d=t(20554),u=t(77403),x=t(62560),p=t(94141),h=t(42967),m=t(20649),j=t(70579);const b=e=>{let{closeModalAndRefresh:s,selectedUser:t,selectedGroups:n,open:b}=e;const g=(0,d.jL)(),[y,f]=(0,l.useState)(!1),[v,A]=(0,l.useState)([]),[S,C]=(0,l.useState)([]),P=(0,o.d4)((e=>e.createUser.selectedPolicies));(0,l.useEffect)((()=>{if(b){if(1===(null===n||void 0===n?void 0:n.length))return void(1===(null===n||void 0===n?void 0:n.length)&&m.A.invoke("GET","/api/v1/group/".concat((0,r.nf)(n[0]))).then((e=>{const s=i()(e,"policy","");A(s.split(",")),C(s.split(",")),g((0,x.Gy)(s.split(",")))})).catch((e=>{g((0,a.Dy)(e)),f(!1)})));const e=i()(t,"policy",[]);A(e),C(e),g((0,x.Gy)(e))}}),[b,null===n||void 0===n?void 0:n.length,t]);const G=i()(t,"accessKey","");return(0,j.jsxs)(p.A,{onClose:()=>{s()},modalOpen:b,title:"Set Policies",children:[(0,j.jsxs)(c.Hbc,{withBorders:!1,containerPadding:!1,children:[(1===(null===n||void 0===n?void 0:n.length)||null!=t)&&(0,j.jsxs)(l.Fragment,{children:[(0,j.jsx)(c.EmB,{label:"Selected ".concat(null!==n?"Group":"User"),sx:{width:"100%"},children:null!==n?n[0]:G}),(0,j.jsx)(c.EmB,{label:"Current Policy",sx:{width:"100%"},children:v.join(", ")})]}),n&&(null===n||void 0===n?void 0:n.length)>1&&(0,j.jsx)(c.EmB,{label:"Selected Groups",sx:{width:"100%"},children:n.join(", ")}),(0,j.jsx)(c.xA9,{item:!0,xs:12,children:(0,j.jsx)(h.A,{selectedPolicy:S})})]}),(0,j.jsxs)(c.xA9,{item:!0,xs:12,sx:u.Uz.modalButtonBar,children:[(0,j.jsx)(c.$nd,{id:"reset",type:"button",variant:"regular",onClick:()=>{C(v),g((0,x.Gy)(v))},label:"Reset"}),(0,j.jsx)(c.$nd,{id:"save",type:"button",variant:"callAction",color:"primary",disabled:y,onClick:()=>{let e=null,l=null;null!==n?l=n:null!==t&&(e=[t.accessKey]||0),f(!0),m.A.invoke("PUT","/api/v1/set-policy-multi",{name:P,groups:l,users:e}).then((()=>{f(!1),s()})).catch((e=>{f(!1),g((0,a.Dy)(e))}))},label:"Save"})]}),y&&(0,j.jsx)(c.xA9,{item:!0,xs:12,children:(0,j.jsx)(c.z21,{})})]})}},8185:(e,s,t)=>{t.d(s,{Hw:()=>n,LA:()=>l,SO:()=>i,rY:()=>o});const l=(e,s)=>{if(e.accessKey&&s.accessKey){if(e.accessKey>s.accessKey)return 1;if(e.accessKeye.name>s.name?1:e.namee>s?1:ee.policy>s.policy?1:e.policy.\n\nimport React, { Fragment, useState } from \"react\";\nimport { ConfirmDeleteIcon } from \"mds\";\nimport { encodeURLString } from \"../../../common/utils\";\nimport { setErrorSnackMessage } from \"../../../systemSlice\";\nimport { useAppDispatch } from \"../../../store\";\nimport ConfirmDialog from \"../Common/ModalWrapper/ConfirmDialog\";\nimport { api } from \"api\";\nimport { errorToHandler } from \"api/errors\";\nimport { ApiError, HttpResponse } from \"api/consoleApi\";\n\ninterface IDeleteGroup {\n selectedGroups: string[];\n deleteOpen: boolean;\n closeDeleteModalAndRefresh: any;\n}\n\nconst DeleteGroup = ({\n selectedGroups,\n deleteOpen,\n closeDeleteModalAndRefresh,\n}: IDeleteGroup) => {\n const dispatch = useAppDispatch();\n const onClose = () => closeDeleteModalAndRefresh(false);\n const [loadingDelete, setLoadingDelete] = useState(false);\n\n if (!selectedGroups) {\n return null;\n }\n const onDeleteGroups = () => {\n for (let group of selectedGroups) {\n setLoadingDelete(true);\n api.group\n .removeGroup(encodeURLString(group))\n .then((_) => {\n closeDeleteModalAndRefresh(true);\n })\n .catch(async (res: HttpResponse) => {\n const err = (await res.json()) as ApiError;\n dispatch(setErrorSnackMessage(errorToHandler(err)));\n closeDeleteModalAndRefresh(false);\n })\n .finally(() => setLoadingDelete(false));\n }\n };\n\n const renderGroups = selectedGroups.map((group) => (\n
\n {group}\n
\n ));\n\n return (\n 1 ? \"s\" : \"\"}`}\n confirmText={\"Delete\"}\n isOpen={deleteOpen}\n titleIcon={}\n isLoading={loadingDelete}\n onConfirm={onDeleteGroups}\n onClose={onClose}\n confirmationContent={\n \n Are you sure you want to delete the following{\" \"}\n {selectedGroups.length === 1 ? \"\" : selectedGroups.length} group\n {selectedGroups.length > 1 ? \"s?\" : \"?\"}\n {renderGroups}\n \n }\n />\n );\n};\n\nexport default DeleteGroup;\n","// This file is part of MinIO Console Server\n// Copyright (c) 2023 MinIO, Inc.\n//\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU Affero General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU Affero General Public License for more details.\n//\n// You should have received a copy of the GNU Affero General Public License\n// along with this program. If not, see .\n\nimport React, { useState } from \"react\";\nimport { AddMembersToGroupIcon, Button, FormLayout, Grid, ReadBox } from \"mds\";\nimport { modalStyleUtils } from \"../Common/FormComponents/common/styleLibrary\";\nimport { encodeURLString } from \"../../../common/utils\";\nimport { setModalErrorSnackMessage } from \"../../../systemSlice\";\nimport { useAppDispatch } from \"../../../store\";\nimport { api } from \"api\";\nimport { errorToHandler } from \"api/errors\";\nimport UsersSelectors from \"./UsersSelectors\";\nimport ModalWrapper from \"../Common/ModalWrapper/ModalWrapper\";\n\ntype UserPickerModalProps = {\n title?: string;\n preSelectedUsers?: string[];\n selectedGroup?: string;\n open: boolean;\n onClose: () => void;\n onSaveClick: () => void;\n groupStatus?: string;\n};\n\nconst AddGroupMember = ({\n title = \"\",\n groupStatus = \"enabled\",\n preSelectedUsers = [],\n selectedGroup = \"\",\n open,\n onClose,\n}: UserPickerModalProps) => {\n const dispatch = useAppDispatch();\n const [selectedUsers, setSelectedUsers] = useState(preSelectedUsers);\n\n function addMembersToGroup() {\n return api.group\n .updateGroup(encodeURLString(selectedGroup), {\n members: selectedUsers,\n status: groupStatus,\n })\n .then(() => {\n onClose();\n })\n .catch((err) => {\n onClose();\n dispatch(setModalErrorSnackMessage(errorToHandler(err.error)));\n });\n }\n\n return (\n }\n >\n \n \n {selectedGroup}\n \n \n \n \n \n \n );\n};\n\nexport default AddGroupMember;\n","// This file is part of MinIO Console Server\n// Copyright (c) 2023 MinIO, Inc.\n//\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU Affero General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU Affero General Public License for more details.\n//\n// You should have received a copy of the GNU Affero General Public License\n// along with this program. If not, see .\n\nimport React, { Fragment, useEffect, useState } from \"react\";\nimport { useNavigate, useParams } from \"react-router-dom\";\nimport {\n AddIcon,\n BackLink,\n Box,\n Button,\n DataTable,\n Grid,\n GroupsIcon,\n IAMPoliciesIcon,\n PageLayout,\n ScreenTitle,\n SectionTitle,\n Switch,\n Tabs,\n TrashIcon,\n} from \"mds\";\nimport { api } from \"api\";\nimport { errorToHandler } from \"api/errors\";\nimport { Group } from \"api/consoleApi\";\nimport {\n addUserToGroupPermissions,\n CONSOLE_UI_RESOURCE,\n createGroupPermissions,\n editGroupMembersPermissions,\n enableDisableGroupPermissions,\n getGroupPermissions,\n IAM_PAGES,\n listUsersPermissions,\n permissionTooltipHelper,\n setGroupPoliciesPermissions,\n viewPolicyPermissions,\n viewUserPermissions,\n} from \"../../../common/SecureComponent/permissions\";\nimport {\n hasPermission,\n SecureComponent,\n} from \"../../../common/SecureComponent\";\nimport { decodeURLString, encodeURLString } from \"../../../common/utils\";\nimport { setHelpName, setModalErrorSnackMessage } from \"../../../systemSlice\";\nimport { useAppDispatch } from \"../../../store\";\nimport { setSelectedPolicies } from \"../Users/AddUsersSlice\";\nimport SetPolicy from \"../Policies/SetPolicy\";\nimport AddGroupMember from \"./AddGroupMember\";\nimport DeleteGroup from \"./DeleteGroup\";\nimport SearchBox from \"../Common/SearchBox\";\nimport TooltipWrapper from \"../Common/TooltipWrapper/TooltipWrapper\";\nimport HelpMenu from \"../HelpMenu\";\nimport PageHeaderWrapper from \"../Common/PageHeaderWrapper/PageHeaderWrapper\";\n\nexport const formatPolicy = (policy: string = \"\"): string[] => {\n if (policy.length <= 0) return [];\n return policy.split(\",\");\n};\n\nconst GroupsDetails = () => {\n const dispatch = useAppDispatch();\n const navigate = useNavigate();\n const params = useParams();\n\n const [groupDetails, setGroupDetails] = useState({});\n const [policyOpen, setPolicyOpen] = useState(false);\n const [usersOpen, setUsersOpen] = useState(false);\n const [deleteOpen, setDeleteOpen] = useState(false);\n const [memberFilter, setMemberFilter] = useState(\"\");\n const [currentTab, setCurrentTab] = useState(\"members\");\n\n const groupName = decodeURLString(params.groupName || \"\");\n\n const { members = [], policy = \"\", status: groupEnabled } = groupDetails;\n\n const filteredMembers = members.filter((elementItem) =>\n elementItem.includes(memberFilter),\n );\n\n const viewUser = hasPermission(\n CONSOLE_UI_RESOURCE,\n viewUserPermissions,\n true,\n );\n\n useEffect(() => {\n dispatch(setHelpName(\"group_details\"));\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, []);\n\n useEffect(() => {\n if (groupName) {\n fetchGroupInfo();\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [groupName]);\n\n const groupPolicies = formatPolicy(policy);\n const isGroupEnabled = groupEnabled === \"enabled\";\n const memberActionText = members.length > 0 ? \"Edit Members\" : \"Add Members\";\n\n const getGroupDetails = hasPermission(\n CONSOLE_UI_RESOURCE,\n getGroupPermissions,\n );\n\n const canEditGroupMembers = hasPermission(\n CONSOLE_UI_RESOURCE,\n editGroupMembersPermissions,\n true,\n );\n\n const canSetPolicies = hasPermission(\n CONSOLE_UI_RESOURCE,\n setGroupPoliciesPermissions,\n true,\n );\n\n const canViewPolicy = hasPermission(\n CONSOLE_UI_RESOURCE,\n viewPolicyPermissions,\n true,\n );\n\n function fetchGroupInfo() {\n if (getGroupDetails) {\n api.group\n .groupInfo(encodeURLString(groupName))\n .then((res) => {\n setGroupDetails(res.data);\n })\n .catch((err) => {\n dispatch(setModalErrorSnackMessage(errorToHandler(err.error)));\n setGroupDetails({});\n });\n }\n }\n\n function toggleGroupStatus(nextStatus: boolean) {\n return api.group\n .updateGroup(encodeURLString(groupName), {\n members: members,\n status: nextStatus ? \"enabled\" : \"disabled\",\n })\n .then(() => {\n fetchGroupInfo();\n })\n .catch((err) => {\n dispatch(setModalErrorSnackMessage(errorToHandler(err.error)));\n });\n }\n\n const groupsTabContent = (\n {\n dispatch(setHelpName(\"groups_members\"));\n }}\n >\n \n {\n setMemberFilter(searchText);\n }}\n value={memberFilter}\n sx={{\n maxWidth: 280,\n }}\n />\n \n \n }\n onClick={() => {\n setUsersOpen(true);\n }}\n disabled={!canEditGroupMembers}\n />\n \n \n \n }\n >\n Members\n \n \n \n \n {\n navigate(`${IAM_PAGES.USERS}/${encodeURLString(userName)}`);\n },\n isDisabled: !viewUser,\n },\n ]}\n columns={[{ label: \"Access Key\" }]}\n selectedItems={[]}\n isLoading={false}\n records={filteredMembers}\n entityName=\"Users\"\n />\n \n \n \n \n );\n\n const policiesTabContent = (\n \n {\n dispatch(setHelpName(\"groups_policies\"));\n }}\n >\n \n }\n onClick={() => {\n setPolicyOpen(true);\n }}\n disabled={!canSetPolicies}\n />\n \n }\n >\n Policies\n \n \n \n \n {\n navigate(`${IAM_PAGES.POLICIES}/${encodeURLString(policy)}`);\n },\n isDisabled: !canViewPolicy,\n },\n ]}\n columns={[{ label: \"Policy\" }]}\n isLoading={false}\n records={groupPolicies}\n entityName=\"Policies\"\n />\n \n \n \n );\n\n return (\n \n {policyOpen ? (\n {\n setPolicyOpen(false);\n fetchGroupInfo();\n dispatch(setSelectedPolicies([]));\n }}\n />\n ) : null}\n\n {usersOpen ? (\n {}}\n title={memberActionText}\n groupStatus={groupEnabled}\n preSelectedUsers={members}\n open={usersOpen}\n onClose={() => {\n setUsersOpen(false);\n fetchGroupInfo();\n }}\n />\n ) : null}\n\n {deleteOpen && (\n {\n setDeleteOpen(false);\n if (isDelSuccess) {\n navigate(IAM_PAGES.GROUPS);\n }\n }}\n />\n )}\n \n navigate(IAM_PAGES.GROUPS)}\n />\n \n }\n actions={}\n />\n \n \n \n \n \n }\n title={groupName}\n subTitle={null}\n bottomBorder\n actions={\n \n Group Status:\n \n {isGroupEnabled ? \"Enabled\" : \"Disabled\"}\n \n \n \n {\n toggleGroupStatus(!isGroupEnabled);\n }}\n switchOnly\n />\n \n \n\n \n }\n onClick={() => {\n setDeleteOpen(true);\n }}\n />\n \n \n }\n sx={{ marginBottom: 15 }}\n />\n \n\n \n \n \n \n \n );\n};\n\nexport default GroupsDetails;\n","// This file is part of MinIO Console Server\n// Copyright (c) 2021 MinIO, Inc.\n//\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU Affero General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU Affero General Public License for more details.\n//\n// You should have received a copy of the GNU Affero General Public License\n// along with this program. If not, see .\n\nimport React, { useCallback, useEffect, useState, Fragment } from \"react\";\nimport get from \"lodash/get\";\nimport { api } from \"api\";\nimport { errorToHandler } from \"api/errors\";\nimport { Box, DataTable, Grid, ProgressBar } from \"mds\";\n\nimport { usersSort } from \"../../../utils/sortFunctions\";\nimport { setModalErrorSnackMessage } from \"../../../systemSlice\";\nimport { useAppDispatch } from \"../../../store\";\nimport SearchBox from \"../Common/SearchBox\";\n\ninterface IGroupsProps {\n selectedUsers: string[];\n setSelectedUsers: any;\n editMode?: boolean;\n}\n\nconst UsersSelectors = ({\n selectedUsers,\n setSelectedUsers,\n editMode = false,\n}: IGroupsProps) => {\n const dispatch = useAppDispatch();\n //Local States\n const [records, setRecords] = useState([]);\n const [loading, isLoading] = useState(false);\n const [filter, setFilter] = useState(\"\");\n\n const fetchUsers = useCallback(() => {\n api.users\n .listUsers()\n .then((res) => {\n let users = get(res.data, \"users\", []);\n\n if (!users) {\n users = [];\n }\n\n setRecords(users.sort(usersSort));\n isLoading(false);\n })\n .catch((err) => {\n dispatch(setModalErrorSnackMessage(errorToHandler(err.error)));\n isLoading(false);\n });\n }, [dispatch]);\n\n //Effects\n useEffect(() => {\n isLoading(true);\n }, []);\n\n useEffect(() => {\n if (loading) {\n fetchUsers();\n }\n }, [loading, fetchUsers]);\n\n const selUsers = !selectedUsers ? [] : selectedUsers;\n\n //Fetch Actions\n const selectionChanged = (e: React.ChangeEvent) => {\n const targetD = e.target;\n const value = targetD.value;\n const checked = targetD.checked;\n\n let elements: string[] = [...selUsers]; // We clone the selectedGroups array\n\n if (checked) {\n // If the user has checked this field we need to push this to selectedGroupsList\n elements.push(value);\n } else {\n // User has unchecked this field, we need to remove it from the list\n elements = elements.filter((element) => element !== value);\n }\n setSelectedUsers(elements);\n\n return elements;\n };\n\n const filteredRecords = records.filter((elementItem) =>\n elementItem.accessKey.includes(filter),\n );\n\n return (\n \n \n {loading && }\n {records?.length > 0 ? (\n \n \n \n \n \n \n ) : (\n \n No Users to display\n \n )}\n \n \n );\n};\n\nexport default UsersSelectors;\n","// This file is part of MinIO Console Server\n// Copyright (c) 2021 MinIO, Inc.\n//\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU Affero General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU Affero General Public License for more details.\n//\n// You should have received a copy of the GNU Affero General Public License\n// along with this program. If not, see .\n\nimport React, { Fragment, useCallback, useEffect, useState } from \"react\";\n\nimport { Box, DataTable, Grid, ProgressBar } from \"mds\";\nimport { policySort } from \"../../../utils/sortFunctions\";\nimport { ErrorResponseHandler } from \"../../../common/types\";\nimport SearchBox from \"../Common/SearchBox\";\nimport { setModalErrorSnackMessage } from \"../../../systemSlice\";\nimport { AppState, useAppDispatch } from \"../../../store\";\nimport { setSelectedPolicies } from \"../Users/AddUsersSlice\";\nimport { useSelector } from \"react-redux\";\nimport { api } from \"../../../api\";\n\ninterface ISelectPolicyProps {\n selectedPolicy?: string[];\n noTitle?: boolean;\n}\n\nconst PolicySelectors = ({ noTitle = false }: ISelectPolicyProps) => {\n const dispatch = useAppDispatch();\n // Local State\n const [records, setRecords] = useState([]);\n const [loading, isLoading] = useState(false);\n const [filter, setFilter] = useState(\"\");\n\n const currentPolicies = useSelector(\n (state: AppState) => state.createUser.selectedPolicies,\n );\n\n const fetchPolicies = useCallback(() => {\n isLoading(true);\n\n api.policies\n .listPolicies()\n .then((res) => {\n const policies = res.data.policies ?? [];\n isLoading(false);\n setRecords(policies.sort(policySort));\n })\n .catch((err: ErrorResponseHandler) => {\n isLoading(false);\n dispatch(setModalErrorSnackMessage(err));\n });\n }, [dispatch]);\n\n //Effects\n useEffect(() => {\n isLoading(true);\n }, []);\n\n useEffect(() => {\n if (loading) {\n fetchPolicies();\n }\n }, [loading, fetchPolicies]);\n\n const selectionChanged = (e: React.ChangeEvent) => {\n const targetD = e.target;\n const value = targetD.value;\n const checked = targetD.checked;\n\n let elements: string[] = [...currentPolicies]; // We clone the checkedUsers array\n\n if (checked) {\n // If the user has checked this field we need to push this to checkedUsersList\n elements.push(value);\n } else {\n // User has unchecked this field, we need to remove it from the list\n elements = elements.filter((element) => element !== value);\n }\n // remove empty values\n elements = elements.filter((element) => element !== \"\");\n\n dispatch(setSelectedPolicies(elements));\n };\n\n const filteredRecords = records.filter((elementItem) =>\n elementItem.name.includes(filter),\n );\n\n return (\n \n {loading && }\n {records.length > 0 ? (\n \n \n {\n setFilter(value);\n }}\n value={filter}\n label={!noTitle ? \"Assign Policies\" : \"\"}\n />\n \n\n \n \n ) : (\n \n No Policies Available\n \n )}\n \n );\n};\n\nexport default PolicySelectors;\n","// This file is part of MinIO Console Server\n// Copyright (c) 2021 MinIO, Inc.\n//\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU Affero General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU Affero General Public License for more details.\n//\n// You should have received a copy of the GNU Affero General Public License\n// along with this program. If not, see .\n\nimport React, { Fragment, useEffect, useState } from \"react\";\nimport get from \"lodash/get\";\nimport { useSelector } from \"react-redux\";\nimport { Button, FormLayout, ReadBox, Grid, ProgressBar } from \"mds\";\n\nimport { ErrorResponseHandler } from \"../../../common/types\";\nimport { encodeURLString } from \"../../../common/utils\";\nimport { setModalErrorSnackMessage } from \"../../../systemSlice\";\nimport { AppState, useAppDispatch } from \"../../../store\";\nimport { modalStyleUtils } from \"../Common/FormComponents/common/styleLibrary\";\nimport { User } from \"../Users/types\";\nimport { setSelectedPolicies } from \"../Users/AddUsersSlice\";\nimport ModalWrapper from \"../Common/ModalWrapper/ModalWrapper\";\nimport PolicySelectors from \"./PolicySelectors\";\nimport api from \"../../../common/api\";\n\ninterface ISetPolicyProps {\n closeModalAndRefresh: () => void;\n selectedUser: User | null;\n selectedGroups: string[] | null;\n open: boolean;\n}\n\nconst SetPolicy = ({\n closeModalAndRefresh,\n selectedUser,\n selectedGroups,\n open,\n}: ISetPolicyProps) => {\n const dispatch = useAppDispatch();\n //Local States\n const [loading, setLoading] = useState(false);\n const [actualPolicy, setActualPolicy] = useState([]);\n const [selectedPolicy, setSelectedPolicy] = useState([]);\n const currentPolicies = useSelector(\n (state: AppState) => state.createUser.selectedPolicies,\n );\n const setPolicyAction = () => {\n let users = null;\n let groups = null;\n if (selectedGroups !== null) {\n groups = selectedGroups;\n } else {\n if (selectedUser !== null) {\n users = [selectedUser.accessKey] || [\" \"];\n }\n }\n\n setLoading(true);\n\n api\n .invoke(\"PUT\", `/api/v1/set-policy-multi`, {\n name: currentPolicies,\n groups: groups,\n users: users,\n })\n .then(() => {\n setLoading(false);\n closeModalAndRefresh();\n })\n .catch((err: ErrorResponseHandler) => {\n setLoading(false);\n dispatch(setModalErrorSnackMessage(err));\n });\n };\n\n const fetchGroupInformation = () => {\n if (selectedGroups?.length === 1) {\n api\n .invoke(\"GET\", `/api/v1/group/${encodeURLString(selectedGroups[0])}`)\n .then((res: any) => {\n const groupPolicy: String = get(res, \"policy\", \"\");\n setActualPolicy(groupPolicy.split(\",\"));\n setSelectedPolicy(groupPolicy.split(\",\"));\n dispatch(setSelectedPolicies(groupPolicy.split(\",\")));\n })\n .catch((err: ErrorResponseHandler) => {\n dispatch(setModalErrorSnackMessage(err));\n setLoading(false);\n });\n }\n };\n\n const resetSelection = () => {\n setSelectedPolicy(actualPolicy);\n dispatch(setSelectedPolicies(actualPolicy));\n };\n\n useEffect(() => {\n if (open) {\n if (selectedGroups?.length === 1) {\n fetchGroupInformation();\n return;\n }\n\n const userPolicy: string[] = get(selectedUser, \"policy\", []);\n setActualPolicy(userPolicy);\n setSelectedPolicy(userPolicy);\n dispatch(setSelectedPolicies(userPolicy));\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [open, selectedGroups?.length, selectedUser]);\n\n const userName = get(selectedUser, \"accessKey\", \"\");\n\n return (\n {\n closeModalAndRefresh();\n }}\n modalOpen={open}\n title=\"Set Policies\"\n >\n \n {(selectedGroups?.length === 1 || selectedUser != null) && (\n \n \n {selectedGroups !== null ? selectedGroups[0] : userName}\n \n \n {actualPolicy.join(\", \")}\n \n \n )}\n {selectedGroups && selectedGroups?.length > 1 && (\n \n {selectedGroups.join(\", \")}\n \n )}\n \n \n \n \n \n \n \n \n {loading && (\n \n \n \n )}\n \n );\n};\n\nexport default SetPolicy;\n","// This file is part of MinIO Console Server\n// Copyright (c) 2021 MinIO, Inc.\n//\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU Affero General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU Affero General Public License for more details.\n//\n// You should have received a copy of the GNU Affero General Public License\n// along with this program. If not, see .\n\nimport { Policy, User } from \"api/consoleApi\";\n\ninterface policyDetailsInterface {\n policy: string;\n}\n\nexport const usersSort = (a: User, b: User) => {\n if (a.accessKey && b.accessKey) {\n if (a.accessKey > b.accessKey) {\n return 1;\n }\n if (a.accessKey < b.accessKey) {\n return -1;\n }\n }\n // a must be equal to b\n return 0;\n};\n\nexport const policySort = (a: Policy, b: Policy) => {\n if (a.name! > b.name!) {\n return 1;\n }\n if (a.name! < b.name!) {\n return -1;\n }\n // a must be equal to b\n return 0;\n};\n\nexport const stringSort = (a: string, b: string) => {\n if (a > b) {\n return 1;\n }\n if (a < b) {\n return -1;\n }\n // a must be equal to b\n return 0;\n};\n\nexport const policyDetailsSort = (\n a: policyDetailsInterface,\n b: policyDetailsInterface,\n) => {\n if (a.policy > b.policy) {\n return 1;\n }\n if (a.policy < b.policy) {\n return -1;\n }\n // a must be equal to b\n return 0;\n};\n"],"names":["_ref","selectedGroups","deleteOpen","closeDeleteModalAndRefresh","dispatch","useAppDispatch","loadingDelete","setLoadingDelete","useState","renderGroups","map","group","_jsx","children","ConfirmDialog","title","concat","length","confirmText","isOpen","titleIcon","ConfirmDeleteIcon","isLoading","onConfirm","onDeleteGroups","api","removeGroup","encodeURLString","then","_","catch","async","err","res","json","setErrorSnackMessage","errorToHandler","finally","onClose","confirmationContent","_jsxs","Fragment","groupStatus","preSelectedUsers","selectedGroup","open","selectedUsers","setSelectedUsers","ModalWrapper","modalOpen","AddMembersToGroupIcon","FormLayout","withBorders","containerPadding","ReadBox","label","sx","width","UsersSelectors","editMode","Grid","item","xs","modalStyleUtils","modalButtonBar","Button","id","type","variant","onClick","updateGroup","members","status","setModalErrorSnackMessage","error","formatPolicy","policy","arguments","undefined","split","GroupsDetails","navigate","useNavigate","params","useParams","groupDetails","setGroupDetails","policyOpen","setPolicyOpen","usersOpen","setUsersOpen","setDeleteOpen","memberFilter","setMemberFilter","currentTab","setCurrentTab","groupName","decodeURLString","groupEnabled","filteredMembers","filter","elementItem","includes","viewUser","hasPermission","CONSOLE_UI_RESOURCE","viewUserPermissions","useEffect","setHelpName","fetchGroupInfo","groupPolicies","isGroupEnabled","memberActionText","getGroupDetails","getGroupPermissions","canEditGroupMembers","editGroupMembersPermissions","canSetPolicies","setGroupPoliciesPermissions","canViewPolicy","viewPolicyPermissions","groupInfo","data","groupsTabContent","Box","onMouseMove","SectionTitle","separator","marginBottom","actions","display","gap","SearchBox","placeholder","onChange","searchText","value","maxWidth","SecureComponent","resource","scopes","addUserToGroupPermissions","errorProps","disabled","TooltipWrapper","tooltip","permissionTooltipHelper","createGroupPermissions","icon","AddIcon","listUsersPermissions","DataTable","itemActions","userName","IAM_PAGES","USERS","isDisabled","columns","selectedItems","records","entityName","policiesTabContent","IAMPoliciesIcon","POLICIES","SetPolicy","selectedUser","closeModalAndRefresh","setSelectedPolicies","AddGroupMember","onSaveClick","DeleteGroup","isDelSuccess","GROUPS","PageHeaderWrapper","BackLink","HelpMenu","PageLayout","ScreenTitle","GroupsIcon","subTitle","bottomBorder","fontSize","alignItems","style","fontWeight","enableDisableGroupPermissions","matchAll","Switch","indicatorLabels","checked","name","nextStatus","switchOnly","TrashIcon","Tabs","options","tabConfig","content","currentTabOrPath","onTabClick","setRecords","loading","setFilter","fetchUsers","useCallback","users","listUsers","get","sort","usersSort","selUsers","filteredRecords","accessKey","className","ProgressBar","elementKey","onSelect","e","targetD","target","elements","push","element","idField","customPaperHeight","textAlign","padding","noTitle","currentPolicies","useSelector","state","createUser","selectedPolicies","fetchPolicies","policies","listPolicies","_res$data$policies","policySort","setLoading","actualPolicy","setActualPolicy","selectedPolicy","setSelectedPolicy","invoke","groupPolicy","userPolicy","join","PolicySelectors","resetSelection","color","setPolicyAction","groups","a","b","stringSort","policyDetailsSort"],"sourceRoot":""}
\ No newline at end of file
diff --git a/web-app/build/static/js/1324.cc645cb1.chunk.js b/web-app/build/static/js/1324.cc645cb1.chunk.js
new file mode 100644
index 000000000..a5c60ac1d
--- /dev/null
+++ b/web-app/build/static/js/1324.cc645cb1.chunk.js
@@ -0,0 +1,2 @@
+"use strict";(self.webpackChunkweb_app=self.webpackChunkweb_app||[]).push([[1324,5851,4705],{85851:(e,s,t)=>{t.r(s),t.d(s,{default:()=>u});var l=t(65043),n=t(89923),i=t(64159),o=t(20554),r=t(58661),c=t(56629),a=t(53518),d=t(70579);const u=e=>{let{selectedGroups:s,deleteOpen:t,closeDeleteModalAndRefresh:u}=e;const p=(0,o.jL)(),[x,h]=(0,l.useState)(!1);if(!s)return null;const m=s.map((e=>(0,d.jsx)("div",{children:(0,d.jsx)("b",{children:e})},e)));return(0,d.jsx)(r.A,{title:"Delete Group".concat(s.length>1?"s":""),confirmText:"Delete",isOpen:t,titleIcon:(0,d.jsx)(n.xWY,{}),isLoading:x,onConfirm:()=>{for(let e of s)h(!0),c.F.group.removeGroup(e).then((e=>{u(!0)})).catch((async e=>{const s=await e.json();p((0,i.C9)((0,a.S)(s))),u(!1)})).finally((()=>h(!1)))},onClose:()=>u(!1),confirmationContent:(0,d.jsxs)(l.Fragment,{children:["Are you sure you want to delete the following"," ",1===s.length?"":s.length," group",s.length>1?"s?":"?",m]})})}},91324:(e,s,t)=>{t.r(s),t.d(s,{default:()=>P,formatPolicy:()=>C});var l=t(65043),n=t(73216),i=t(89923),o=t(56629),r=t(53518),c=t(99161),a=t(77938),d=t(64159),u=t(20554),p=t(62560),x=t(74705),h=t(77403),m=t(22923),j=t(94141),g=t(70579);const b=e=>{let{title:s="",groupStatus:t="enabled",preSelectedUsers:n=[],selectedGroup:c="",open:a,onClose:p}=e;const x=(0,u.jL)(),[b,y]=(0,l.useState)(n);return(0,g.jsxs)(j.A,{modalOpen:a,onClose:p,title:s,titleIcon:(0,g.jsx)(i.WC,{}),children:[(0,g.jsxs)(i.Hbc,{withBorders:!1,containerPadding:!1,children:[(0,g.jsx)(i.EmB,{label:"Selected Group",sx:{width:"100%"},children:c}),(0,g.jsx)(m.A,{selectedUsers:b,setSelectedUsers:y,editMode:!c})]}),(0,g.jsxs)(i.xA9,{item:!0,xs:12,sx:h.Uz.modalButtonBar,children:[(0,g.jsx)(i.$nd,{id:"reset-add-group-member",type:"button",variant:"regular",onClick:()=>{y(n)},label:"Reset"}),(0,g.jsx)(i.$nd,{id:"save-add-group-member",type:"button",variant:"callAction",onClick:()=>{o.F.group.updateGroup(c,{members:b,status:t}).then((()=>{p()})).catch((e=>{p(),x((0,d.Dy)((0,r.S)(e.error)))}))},label:"Save"})]})]})};var y=t(85851),v=t(64681),f=t(6681),A=t(55968),S=t(48793);const C=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return e.length<=0?[]:e.split(",")},P=()=>{const e=(0,u.jL)(),s=(0,n.Zp)(),t=(0,n.g)(),[h,m]=(0,l.useState)({}),[j,P]=(0,l.useState)(!1),[G,U]=(0,l.useState)(!1),[M,k]=(0,l.useState)(!1),[w,E]=(0,l.useState)(""),[z,L]=(0,l.useState)("members"),{members:N=[],policy:R="",status:D}=h,F=N.filter((e=>e.includes(w))),I=(0,a._)(c.Ms,c.Ld,!0);(0,l.useEffect)((()=>{e((0,d.ph)("group_details"))}),[]),(0,l.useEffect)((()=>{t.groupName&&T()}),[t.groupName]);const K=C(R),B="enabled"===D,_=N.length>0?"Edit Members":"Add Members",O=(0,a._)(c.Ms,c.Oh),$=(0,a._)(c.Ms,c.Hr,!0),H=(0,a._)(c.Ms,c.QR,!0),J=(0,a._)(c.Ms,c.yv,!0);function T(){O&&o.F.group.groupInfo(t.groupName||"").then((e=>{m(e.data)})).catch((s=>{e((0,d.Dy)((0,r.S)(s.error))),m({})}))}const Q=(0,g.jsxs)(i.azJ,{onMouseMove:()=>{e((0,d.ph)("groups_members"))},children:[(0,g.jsx)(i._xt,{separator:!0,sx:{marginBottom:15},actions:(0,g.jsxs)(i.azJ,{sx:{display:"flex",gap:10},children:[(0,g.jsx)(v.A,{placeholder:"Search members",onChange:e=>{E(e)},value:w,sx:{maxWidth:280}}),(0,g.jsx)(a.R,{resource:c.Ms,scopes:c.BD,errorProps:{disabled:!0},children:(0,g.jsx)(f.A,{tooltip:$?_:(0,c.vj)(c.k1,"edit Group membership"),children:(0,g.jsx)(i.$nd,{id:"add-user-group",label:_,variant:"callAction",icon:(0,g.jsx)(i.REV,{}),onClick:()=>{U(!0)},disabled:!$})})})]}),children:"Members"}),(0,g.jsx)(i.xA9,{item:!0,xs:12,children:(0,g.jsx)(a.R,{resource:c.Ms,scopes:c.x6,errorProps:{disabled:!0},children:(0,g.jsx)(f.A,{tooltip:I?"":(0,c.vj)(c.Ld,"view User details"),children:(0,g.jsx)(i.bQt,{itemActions:[{type:"view",onClick:e=>{s("".concat(c.zZ.USERS,"/").concat(encodeURIComponent(e)))},isDisabled:!I}],columns:[{label:"Access Key"}],selectedItems:[],isLoading:!1,records:F,entityName:"Users"})})})})]}),Z=(0,g.jsxs)(l.Fragment,{children:[(0,g.jsx)(i.azJ,{onMouseMove:()=>{e((0,d.ph)("groups_policies"))},children:(0,g.jsx)(i._xt,{separator:!0,sx:{marginBottom:15},actions:(0,g.jsx)(f.A,{tooltip:H?"Set Policies":(0,c.vj)(c.QR,"assign Policies"),children:(0,g.jsx)(i.$nd,{id:"set-policies",label:"Set Policies",variant:"callAction",icon:(0,g.jsx)(i.n$X,{}),onClick:()=>{P(!0)},disabled:!H})}),children:"Policies"})}),(0,g.jsx)(i.xA9,{item:!0,xs:12,children:(0,g.jsx)(f.A,{tooltip:J?"":(0,c.vj)(c.yv,"view Policy details"),children:(0,g.jsx)(i.bQt,{itemActions:[{type:"view",onClick:e=>{s("".concat(c.zZ.POLICIES,"/").concat(encodeURIComponent(e)))},isDisabled:!J}],columns:[{label:"Policy"}],isLoading:!1,records:K,entityName:"Policies"})})})]});return(0,g.jsxs)(l.Fragment,{children:[j?(0,g.jsx)(x.default,{open:j,selectedGroups:[t.groupName||""],selectedUser:null,closeModalAndRefresh:()=>{P(!1),T(),e((0,p.Gy)([]))}}):null,G?(0,g.jsx)(b,{selectedGroup:t.groupName,onSaveClick:()=>{},title:_,groupStatus:D,preSelectedUsers:N,open:G,onClose:()=>{U(!1),T()}}):null,M&&(0,g.jsx)(y.default,{deleteOpen:M,selectedGroups:[t.groupName||""],closeDeleteModalAndRefresh:e=>{k(!1),e&&s(c.zZ.GROUPS)}}),(0,g.jsx)(S.A,{label:(0,g.jsx)(l.Fragment,{children:(0,g.jsx)(i.EGL,{label:"Groups",onClick:()=>s(c.zZ.GROUPS)})}),actions:(0,g.jsx)(A.A,{})}),(0,g.jsxs)(i.Mxu,{children:[(0,g.jsx)(i.xA9,{item:!0,xs:12,children:(0,g.jsx)(i.lcx,{icon:(0,g.jsx)(l.Fragment,{children:(0,g.jsx)(i.YXz,{width:40})}),title:t.groupName||"",subTitle:null,bottomBorder:!0,actions:(0,g.jsxs)(i.azJ,{sx:{display:"flex",fontSize:14,alignItems:"center",gap:15},children:[(0,g.jsx)("span",{children:"Group Status:"}),(0,g.jsx)("span",{id:"group-status-label",style:{fontWeight:"bold"},children:B?"Enabled":"Disabled"}),(0,g.jsx)(f.A,{tooltip:(0,a._)(c.Ms,c.pf,!0)?"":(0,c.vj)(c.pf,"enable or disable Groups"),children:(0,g.jsx)(a.R,{resource:c.Ms,scopes:c.pf,errorProps:{disabled:!0},matchAll:!0,children:(0,g.jsx)(i.dOG,{indicatorLabels:["Enabled","Disabled"],checked:B,value:"group_enabled",id:"group-status",name:"group-status",onChange:()=>{var s;s=!B,o.F.group.updateGroup(t.groupName||"",{members:N,status:s?"enabled":"disabled"}).then((()=>{T()})).catch((s=>{e((0,d.Dy)((0,r.S)(s.error)))}))},switchOnly:!0})})}),(0,g.jsx)(f.A,{tooltip:"Delete Group",children:(0,g.jsx)(i.$nd,{id:"delete-user-group",variant:"secondary",icon:(0,g.jsx)(i.ucK,{}),onClick:()=>{k(!0)}})})]}),sx:{marginBottom:15}})}),(0,g.jsx)(i.xA9,{item:!0,xs:12,children:(0,g.jsx)(i.tUM,{options:[{tabConfig:{id:"members",label:"Members"},content:Q},{tabConfig:{id:"policies",label:"Policies"},content:Z}],currentTabOrPath:z,onTabClick:L})})]})]})}},22923:(e,s,t)=>{t.d(s,{A:()=>h});var l=t(65043),n=t(33097),i=t.n(n),o=t(56629),r=t(53518),c=t(89923),a=t(8185),d=t(64159),u=t(20554),p=t(64681),x=t(70579);const h=e=>{let{selectedUsers:s,setSelectedUsers:t,editMode:n=!1}=e;const h=(0,u.jL)(),[m,j]=(0,l.useState)([]),[g,b]=(0,l.useState)(!1),[y,v]=(0,l.useState)(""),f=(0,l.useCallback)((()=>{o.F.users.listUsers().then((e=>{let s=i()(e.data,"users",[]);s||(s=[]),j(s.sort(a.LA)),b(!1)})).catch((e=>{h((0,d.Dy)((0,r.S)(e.error))),b(!1)}))}),[h]);(0,l.useEffect)((()=>{b(!0)}),[]),(0,l.useEffect)((()=>{g&&f()}),[g,f]);const A=s||[],S=m.filter((e=>e.accessKey.includes(y)));return(0,x.jsx)(c.xA9,{item:!0,xs:12,className:"inputItem",children:(0,x.jsxs)(c.azJ,{children:[g&&(0,x.jsx)(c.z21,{}),(null===m||void 0===m?void 0:m.length)>0?(0,x.jsxs)(l.Fragment,{children:[(0,x.jsx)(c.xA9,{item:!0,xs:12,className:"inputItem",children:(0,x.jsx)(p.A,{label:n?"Edit Members":"Assign Users",placeholder:"Filter Users",onChange:v,value:y})}),(0,x.jsx)(c.bQt,{columns:[{label:"Access Key",elementKey:"accessKey"}],onSelect:e=>{const s=e.target,l=s.value,n=s.checked;let i=[...A];return n?i.push(l):i=i.filter((e=>e!==l)),t(i),i},selectedItems:A,isLoading:g,records:S,entityName:"Users",idField:"accessKey",customPaperHeight:"200px"})]}):(0,x.jsx)(c.azJ,{sx:{textAlign:"center",padding:"10px 0"},children:"No Users to display"})]})})}},42967:(e,s,t)=>{t.d(s,{A:()=>x});var l=t(65043),n=t(89923),i=t(8185),o=t(64681),r=t(64159),c=t(20554),a=t(62560),d=t(22166),u=t(56629),p=t(70579);const x=e=>{let{noTitle:s=!1}=e;const t=(0,c.jL)(),[x,h]=(0,l.useState)([]),[m,j]=(0,l.useState)(!1),[g,b]=(0,l.useState)(""),y=(0,d.d4)((e=>e.createUser.selectedPolicies)),v=(0,l.useCallback)((()=>{j(!0),u.F.policies.listPolicies().then((e=>{var s;const t=null!==(s=e.data.policies)&&void 0!==s?s:[];j(!1),h(t.sort(i.Hw))})).catch((e=>{j(!1),t((0,r.Dy)(e))}))}),[t]);(0,l.useEffect)((()=>{j(!0)}),[]),(0,l.useEffect)((()=>{m&&v()}),[m,v]);const f=x.filter((e=>e.name.includes(g)));return(0,p.jsxs)(n.xA9,{item:!0,xs:12,className:"inputItem",children:[m&&(0,p.jsx)(n.z21,{}),x.length>0?(0,p.jsxs)(l.Fragment,{children:[(0,p.jsx)(n.xA9,{item:!0,xs:12,className:"inputItem",children:(0,p.jsx)(o.A,{placeholder:"Start typing to search for a Policy",onChange:e=>{b(e)},value:g,label:s?"":"Assign Policies"})}),(0,p.jsx)(n.bQt,{columns:[{label:"Policy",elementKey:"name"}],onSelect:e=>{const s=e.target,l=s.value,n=s.checked;let i=[...y];n?i.push(l):i=i.filter((e=>e!==l)),i=i.filter((e=>""!==e)),t((0,a.Gy)(i))},selectedItems:y,isLoading:m,records:f,entityName:"Policies",idField:"name",customPaperHeight:"200px"})]}):(0,p.jsx)(n.azJ,{sx:{textAlign:"center",padding:"10px 0"},children:"No Policies Available"})]})}},74705:(e,s,t)=>{t.r(s),t.d(s,{default:()=>j});var l=t(65043),n=t(33097),i=t.n(n),o=t(22166),r=t(89923),c=t(64159),a=t(20554),d=t(77403),u=t(62560),p=t(94141),x=t(42967),h=t(20649),m=t(70579);const j=e=>{let{closeModalAndRefresh:s,selectedUser:t,selectedGroups:n,open:j}=e;const g=(0,a.jL)(),[b,y]=(0,l.useState)(!1),[v,f]=(0,l.useState)([]),[A,S]=(0,l.useState)([]),C=(0,o.d4)((e=>e.createUser.selectedPolicies));(0,l.useEffect)((()=>{if(j){if(1===(null===n||void 0===n?void 0:n.length))return void(1===(null===n||void 0===n?void 0:n.length)&&h.A.invoke("GET","/api/v1/group/".concat(encodeURIComponent(n[0]))).then((e=>{const s=i()(e,"policy","");f(s.split(",")),S(s.split(",")),g((0,u.Gy)(s.split(",")))})).catch((e=>{g((0,c.Dy)(e)),y(!1)})));const e=i()(t,"policy",[]);f(e),S(e),g((0,u.Gy)(e))}}),[j,null===n||void 0===n?void 0:n.length,t]);const P=i()(t,"accessKey","");return(0,m.jsxs)(p.A,{onClose:()=>{s()},modalOpen:j,title:"Set Policies",children:[(0,m.jsxs)(r.Hbc,{withBorders:!1,containerPadding:!1,children:[(1===(null===n||void 0===n?void 0:n.length)||null!=t)&&(0,m.jsxs)(l.Fragment,{children:[(0,m.jsx)(r.EmB,{label:"Selected ".concat(null!==n?"Group":"User"),sx:{width:"100%"},children:null!==n?n[0]:P}),(0,m.jsx)(r.EmB,{label:"Current Policy",sx:{width:"100%"},children:v.join(", ")})]}),n&&(null===n||void 0===n?void 0:n.length)>1&&(0,m.jsx)(r.EmB,{label:"Selected Groups",sx:{width:"100%"},children:n.join(", ")}),(0,m.jsx)(r.xA9,{item:!0,xs:12,children:(0,m.jsx)(x.A,{selectedPolicy:A})})]}),(0,m.jsxs)(r.xA9,{item:!0,xs:12,sx:d.Uz.modalButtonBar,children:[(0,m.jsx)(r.$nd,{id:"reset",type:"button",variant:"regular",onClick:()=>{S(v),g((0,u.Gy)(v))},label:"Reset"}),(0,m.jsx)(r.$nd,{id:"save",type:"button",variant:"callAction",color:"primary",disabled:b,onClick:()=>{let e=null,l=null;null!==n?l=n:null!==t&&(e=[t.accessKey]||0),y(!0),h.A.invoke("PUT","/api/v1/set-policy-multi",{name:C,groups:l,users:e}).then((()=>{y(!1),s()})).catch((e=>{y(!1),g((0,c.Dy)(e))}))},label:"Save"})]}),b&&(0,m.jsx)(r.xA9,{item:!0,xs:12,children:(0,m.jsx)(r.z21,{})})]})}},8185:(e,s,t)=>{t.d(s,{Hw:()=>n,LA:()=>l,SO:()=>i,rY:()=>o});const l=(e,s)=>{if(e.accessKey&&s.accessKey){if(e.accessKey>s.accessKey)return 1;if(e.accessKeye.name>s.name?1:e.namee>s?1:ee.policy>s.policy?1:e.policy.\n\nimport React, { Fragment, useState } from \"react\";\nimport { ConfirmDeleteIcon } from \"mds\";\nimport { setErrorSnackMessage } from \"../../../systemSlice\";\nimport { useAppDispatch } from \"../../../store\";\nimport ConfirmDialog from \"../Common/ModalWrapper/ConfirmDialog\";\nimport { api } from \"api\";\nimport { errorToHandler } from \"api/errors\";\nimport { ApiError, HttpResponse } from \"api/consoleApi\";\n\ninterface IDeleteGroup {\n selectedGroups: string[];\n deleteOpen: boolean;\n closeDeleteModalAndRefresh: any;\n}\n\nconst DeleteGroup = ({\n selectedGroups,\n deleteOpen,\n closeDeleteModalAndRefresh,\n}: IDeleteGroup) => {\n const dispatch = useAppDispatch();\n const onClose = () => closeDeleteModalAndRefresh(false);\n const [loadingDelete, setLoadingDelete] = useState(false);\n\n if (!selectedGroups) {\n return null;\n }\n const onDeleteGroups = () => {\n for (let group of selectedGroups) {\n setLoadingDelete(true);\n api.group\n .removeGroup(group)\n .then((_) => {\n closeDeleteModalAndRefresh(true);\n })\n .catch(async (res: HttpResponse) => {\n const err = (await res.json()) as ApiError;\n dispatch(setErrorSnackMessage(errorToHandler(err)));\n closeDeleteModalAndRefresh(false);\n })\n .finally(() => setLoadingDelete(false));\n }\n };\n\n const renderGroups = selectedGroups.map((group) => (\n
\n {group}\n
\n ));\n\n return (\n 1 ? \"s\" : \"\"}`}\n confirmText={\"Delete\"}\n isOpen={deleteOpen}\n titleIcon={}\n isLoading={loadingDelete}\n onConfirm={onDeleteGroups}\n onClose={onClose}\n confirmationContent={\n \n Are you sure you want to delete the following{\" \"}\n {selectedGroups.length === 1 ? \"\" : selectedGroups.length} group\n {selectedGroups.length > 1 ? \"s?\" : \"?\"}\n {renderGroups}\n \n }\n />\n );\n};\n\nexport default DeleteGroup;\n","// This file is part of MinIO Console Server\n// Copyright (c) 2023 MinIO, Inc.\n//\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU Affero General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU Affero General Public License for more details.\n//\n// You should have received a copy of the GNU Affero General Public License\n// along with this program. If not, see .\n\nimport React, { useState } from \"react\";\nimport { AddMembersToGroupIcon, Button, FormLayout, Grid, ReadBox } from \"mds\";\nimport { modalStyleUtils } from \"../Common/FormComponents/common/styleLibrary\";\nimport { setModalErrorSnackMessage } from \"../../../systemSlice\";\nimport { useAppDispatch } from \"../../../store\";\nimport { api } from \"api\";\nimport { errorToHandler } from \"api/errors\";\nimport UsersSelectors from \"./UsersSelectors\";\nimport ModalWrapper from \"../Common/ModalWrapper/ModalWrapper\";\n\ntype UserPickerModalProps = {\n title?: string;\n preSelectedUsers?: string[];\n selectedGroup?: string;\n open: boolean;\n onClose: () => void;\n onSaveClick: () => void;\n groupStatus?: string;\n};\n\nconst AddGroupMember = ({\n title = \"\",\n groupStatus = \"enabled\",\n preSelectedUsers = [],\n selectedGroup = \"\",\n open,\n onClose,\n}: UserPickerModalProps) => {\n const dispatch = useAppDispatch();\n const [selectedUsers, setSelectedUsers] = useState(preSelectedUsers);\n\n function addMembersToGroup() {\n return api.group\n .updateGroup(selectedGroup, {\n members: selectedUsers,\n status: groupStatus,\n })\n .then(() => {\n onClose();\n })\n .catch((err) => {\n onClose();\n dispatch(setModalErrorSnackMessage(errorToHandler(err.error)));\n });\n }\n\n return (\n }\n >\n \n \n {selectedGroup}\n \n \n \n \n {\n setSelectedUsers(preSelectedUsers);\n }}\n label={\"Reset\"}\n />\n\n {\n addMembersToGroup();\n }}\n label={\"Save\"}\n />\n \n \n );\n};\n\nexport default AddGroupMember;\n","// This file is part of MinIO Console Server\n// Copyright (c) 2023 MinIO, Inc.\n//\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU Affero General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU Affero General Public License for more details.\n//\n// You should have received a copy of the GNU Affero General Public License\n// along with this program. If not, see .\n\nimport React, { Fragment, useEffect, useState } from \"react\";\nimport { useNavigate, useParams } from \"react-router-dom\";\nimport {\n AddIcon,\n BackLink,\n Box,\n Button,\n DataTable,\n Grid,\n GroupsIcon,\n IAMPoliciesIcon,\n PageLayout,\n ScreenTitle,\n SectionTitle,\n Switch,\n Tabs,\n TrashIcon,\n} from \"mds\";\nimport { api } from \"api\";\nimport { errorToHandler } from \"api/errors\";\nimport { Group } from \"api/consoleApi\";\nimport {\n addUserToGroupPermissions,\n CONSOLE_UI_RESOURCE,\n createGroupPermissions,\n editGroupMembersPermissions,\n enableDisableGroupPermissions,\n getGroupPermissions,\n IAM_PAGES,\n listUsersPermissions,\n permissionTooltipHelper,\n setGroupPoliciesPermissions,\n viewPolicyPermissions,\n viewUserPermissions,\n} from \"../../../common/SecureComponent/permissions\";\nimport {\n hasPermission,\n SecureComponent,\n} from \"../../../common/SecureComponent\";\nimport { setHelpName, setModalErrorSnackMessage } from \"../../../systemSlice\";\nimport { useAppDispatch } from \"../../../store\";\nimport { setSelectedPolicies } from \"../Users/AddUsersSlice\";\nimport SetPolicy from \"../Policies/SetPolicy\";\nimport AddGroupMember from \"./AddGroupMember\";\nimport DeleteGroup from \"./DeleteGroup\";\nimport SearchBox from \"../Common/SearchBox\";\nimport TooltipWrapper from \"../Common/TooltipWrapper/TooltipWrapper\";\nimport HelpMenu from \"../HelpMenu\";\nimport PageHeaderWrapper from \"../Common/PageHeaderWrapper/PageHeaderWrapper\";\n\nexport const formatPolicy = (policy: string = \"\"): string[] => {\n if (policy.length <= 0) return [];\n return policy.split(\",\");\n};\n\nconst GroupsDetails = () => {\n const dispatch = useAppDispatch();\n const navigate = useNavigate();\n const params = useParams();\n\n const [groupDetails, setGroupDetails] = useState({});\n const [policyOpen, setPolicyOpen] = useState(false);\n const [usersOpen, setUsersOpen] = useState(false);\n const [deleteOpen, setDeleteOpen] = useState(false);\n const [memberFilter, setMemberFilter] = useState(\"\");\n const [currentTab, setCurrentTab] = useState(\"members\");\n\n const { members = [], policy = \"\", status: groupEnabled } = groupDetails;\n\n const filteredMembers = members.filter((elementItem) =>\n elementItem.includes(memberFilter),\n );\n\n const viewUser = hasPermission(\n CONSOLE_UI_RESOURCE,\n viewUserPermissions,\n true,\n );\n\n useEffect(() => {\n dispatch(setHelpName(\"group_details\"));\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, []);\n\n useEffect(() => {\n if (params.groupName) {\n fetchGroupInfo();\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [params.groupName]);\n\n const groupPolicies = formatPolicy(policy);\n const isGroupEnabled = groupEnabled === \"enabled\";\n const memberActionText = members.length > 0 ? \"Edit Members\" : \"Add Members\";\n\n const getGroupDetails = hasPermission(\n CONSOLE_UI_RESOURCE,\n getGroupPermissions,\n );\n\n const canEditGroupMembers = hasPermission(\n CONSOLE_UI_RESOURCE,\n editGroupMembersPermissions,\n true,\n );\n\n const canSetPolicies = hasPermission(\n CONSOLE_UI_RESOURCE,\n setGroupPoliciesPermissions,\n true,\n );\n\n const canViewPolicy = hasPermission(\n CONSOLE_UI_RESOURCE,\n viewPolicyPermissions,\n true,\n );\n\n function fetchGroupInfo() {\n if (getGroupDetails) {\n api.group\n .groupInfo(params.groupName || \"\")\n .then((res) => {\n setGroupDetails(res.data);\n })\n .catch((err) => {\n dispatch(setModalErrorSnackMessage(errorToHandler(err.error)));\n setGroupDetails({});\n });\n }\n }\n\n function toggleGroupStatus(nextStatus: boolean) {\n return api.group\n .updateGroup(params.groupName || \"\", {\n members: members,\n status: nextStatus ? \"enabled\" : \"disabled\",\n })\n .then(() => {\n fetchGroupInfo();\n })\n .catch((err) => {\n dispatch(setModalErrorSnackMessage(errorToHandler(err.error)));\n });\n }\n\n const groupsTabContent = (\n {\n dispatch(setHelpName(\"groups_members\"));\n }}\n >\n \n {\n setMemberFilter(searchText);\n }}\n value={memberFilter}\n sx={{\n maxWidth: 280,\n }}\n />\n \n \n }\n onClick={() => {\n setUsersOpen(true);\n }}\n disabled={!canEditGroupMembers}\n />\n \n \n \n }\n >\n Members\n \n \n \n \n {\n navigate(\n `${IAM_PAGES.USERS}/${encodeURIComponent(userName)}`,\n );\n },\n isDisabled: !viewUser,\n },\n ]}\n columns={[{ label: \"Access Key\" }]}\n selectedItems={[]}\n isLoading={false}\n records={filteredMembers}\n entityName=\"Users\"\n />\n \n \n \n \n );\n\n const policiesTabContent = (\n \n {\n dispatch(setHelpName(\"groups_policies\"));\n }}\n >\n \n }\n onClick={() => {\n setPolicyOpen(true);\n }}\n disabled={!canSetPolicies}\n />\n \n }\n >\n Policies\n \n \n \n \n {\n navigate(\n `${IAM_PAGES.POLICIES}/${encodeURIComponent(policy)}`,\n );\n },\n isDisabled: !canViewPolicy,\n },\n ]}\n columns={[{ label: \"Policy\" }]}\n isLoading={false}\n records={groupPolicies}\n entityName=\"Policies\"\n />\n \n \n \n );\n\n return (\n \n {policyOpen ? (\n {\n setPolicyOpen(false);\n fetchGroupInfo();\n dispatch(setSelectedPolicies([]));\n }}\n />\n ) : null}\n\n {usersOpen ? (\n {}}\n title={memberActionText}\n groupStatus={groupEnabled}\n preSelectedUsers={members}\n open={usersOpen}\n onClose={() => {\n setUsersOpen(false);\n fetchGroupInfo();\n }}\n />\n ) : null}\n\n {deleteOpen && (\n {\n setDeleteOpen(false);\n if (isDelSuccess) {\n navigate(IAM_PAGES.GROUPS);\n }\n }}\n />\n )}\n \n navigate(IAM_PAGES.GROUPS)}\n />\n \n }\n actions={}\n />\n \n \n \n \n \n }\n title={params.groupName || \"\"}\n subTitle={null}\n bottomBorder\n actions={\n \n Group Status:\n \n {isGroupEnabled ? \"Enabled\" : \"Disabled\"}\n \n \n \n {\n toggleGroupStatus(!isGroupEnabled);\n }}\n switchOnly\n />\n \n \n\n \n }\n onClick={() => {\n setDeleteOpen(true);\n }}\n />\n \n \n }\n sx={{ marginBottom: 15 }}\n />\n \n\n \n \n \n \n \n );\n};\n\nexport default GroupsDetails;\n","// This file is part of MinIO Console Server\n// Copyright (c) 2021 MinIO, Inc.\n//\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU Affero General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU Affero General Public License for more details.\n//\n// You should have received a copy of the GNU Affero General Public License\n// along with this program. If not, see .\n\nimport React, { useCallback, useEffect, useState, Fragment } from \"react\";\nimport get from \"lodash/get\";\nimport { api } from \"api\";\nimport { errorToHandler } from \"api/errors\";\nimport { Box, DataTable, Grid, ProgressBar } from \"mds\";\n\nimport { usersSort } from \"../../../utils/sortFunctions\";\nimport { setModalErrorSnackMessage } from \"../../../systemSlice\";\nimport { useAppDispatch } from \"../../../store\";\nimport SearchBox from \"../Common/SearchBox\";\n\ninterface IGroupsProps {\n selectedUsers: string[];\n setSelectedUsers: any;\n editMode?: boolean;\n}\n\nconst UsersSelectors = ({\n selectedUsers,\n setSelectedUsers,\n editMode = false,\n}: IGroupsProps) => {\n const dispatch = useAppDispatch();\n //Local States\n const [records, setRecords] = useState([]);\n const [loading, isLoading] = useState(false);\n const [filter, setFilter] = useState(\"\");\n\n const fetchUsers = useCallback(() => {\n api.users\n .listUsers()\n .then((res) => {\n let users = get(res.data, \"users\", []);\n\n if (!users) {\n users = [];\n }\n\n setRecords(users.sort(usersSort));\n isLoading(false);\n })\n .catch((err) => {\n dispatch(setModalErrorSnackMessage(errorToHandler(err.error)));\n isLoading(false);\n });\n }, [dispatch]);\n\n //Effects\n useEffect(() => {\n isLoading(true);\n }, []);\n\n useEffect(() => {\n if (loading) {\n fetchUsers();\n }\n }, [loading, fetchUsers]);\n\n const selUsers = !selectedUsers ? [] : selectedUsers;\n\n //Fetch Actions\n const selectionChanged = (e: React.ChangeEvent) => {\n const targetD = e.target;\n const value = targetD.value;\n const checked = targetD.checked;\n\n let elements: string[] = [...selUsers]; // We clone the selectedGroups array\n\n if (checked) {\n // If the user has checked this field we need to push this to selectedGroupsList\n elements.push(value);\n } else {\n // User has unchecked this field, we need to remove it from the list\n elements = elements.filter((element) => element !== value);\n }\n setSelectedUsers(elements);\n\n return elements;\n };\n\n const filteredRecords = records.filter((elementItem) =>\n elementItem.accessKey.includes(filter),\n );\n\n return (\n \n \n {loading && }\n {records?.length > 0 ? (\n \n \n \n \n \n \n ) : (\n \n No Users to display\n \n )}\n \n \n );\n};\n\nexport default UsersSelectors;\n","// This file is part of MinIO Console Server\n// Copyright (c) 2021 MinIO, Inc.\n//\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU Affero General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU Affero General Public License for more details.\n//\n// You should have received a copy of the GNU Affero General Public License\n// along with this program. If not, see .\n\nimport React, { Fragment, useCallback, useEffect, useState } from \"react\";\n\nimport { Box, DataTable, Grid, ProgressBar } from \"mds\";\nimport { policySort } from \"../../../utils/sortFunctions\";\nimport { ErrorResponseHandler } from \"../../../common/types\";\nimport SearchBox from \"../Common/SearchBox\";\nimport { setModalErrorSnackMessage } from \"../../../systemSlice\";\nimport { AppState, useAppDispatch } from \"../../../store\";\nimport { setSelectedPolicies } from \"../Users/AddUsersSlice\";\nimport { useSelector } from \"react-redux\";\nimport { api } from \"../../../api\";\n\ninterface ISelectPolicyProps {\n selectedPolicy?: string[];\n noTitle?: boolean;\n}\n\nconst PolicySelectors = ({ noTitle = false }: ISelectPolicyProps) => {\n const dispatch = useAppDispatch();\n // Local State\n const [records, setRecords] = useState([]);\n const [loading, isLoading] = useState(false);\n const [filter, setFilter] = useState(\"\");\n\n const currentPolicies = useSelector(\n (state: AppState) => state.createUser.selectedPolicies,\n );\n\n const fetchPolicies = useCallback(() => {\n isLoading(true);\n\n api.policies\n .listPolicies()\n .then((res) => {\n const policies = res.data.policies ?? [];\n isLoading(false);\n setRecords(policies.sort(policySort));\n })\n .catch((err: ErrorResponseHandler) => {\n isLoading(false);\n dispatch(setModalErrorSnackMessage(err));\n });\n }, [dispatch]);\n\n //Effects\n useEffect(() => {\n isLoading(true);\n }, []);\n\n useEffect(() => {\n if (loading) {\n fetchPolicies();\n }\n }, [loading, fetchPolicies]);\n\n const selectionChanged = (e: React.ChangeEvent) => {\n const targetD = e.target;\n const value = targetD.value;\n const checked = targetD.checked;\n\n let elements: string[] = [...currentPolicies]; // We clone the checkedUsers array\n\n if (checked) {\n // If the user has checked this field we need to push this to checkedUsersList\n elements.push(value);\n } else {\n // User has unchecked this field, we need to remove it from the list\n elements = elements.filter((element) => element !== value);\n }\n // remove empty values\n elements = elements.filter((element) => element !== \"\");\n\n dispatch(setSelectedPolicies(elements));\n };\n\n const filteredRecords = records.filter((elementItem) =>\n elementItem.name.includes(filter),\n );\n\n return (\n \n {loading && }\n {records.length > 0 ? (\n \n \n {\n setFilter(value);\n }}\n value={filter}\n label={!noTitle ? \"Assign Policies\" : \"\"}\n />\n \n\n \n \n ) : (\n \n No Policies Available\n \n )}\n \n );\n};\n\nexport default PolicySelectors;\n","// This file is part of MinIO Console Server\n// Copyright (c) 2021 MinIO, Inc.\n//\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU Affero General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU Affero General Public License for more details.\n//\n// You should have received a copy of the GNU Affero General Public License\n// along with this program. If not, see .\n\nimport React, { Fragment, useEffect, useState } from \"react\";\nimport get from \"lodash/get\";\nimport { useSelector } from \"react-redux\";\nimport { Button, FormLayout, ReadBox, Grid, ProgressBar } from \"mds\";\n\nimport { ErrorResponseHandler } from \"../../../common/types\";\nimport { setModalErrorSnackMessage } from \"../../../systemSlice\";\nimport { AppState, useAppDispatch } from \"../../../store\";\nimport { modalStyleUtils } from \"../Common/FormComponents/common/styleLibrary\";\nimport { User } from \"../Users/types\";\nimport { setSelectedPolicies } from \"../Users/AddUsersSlice\";\nimport ModalWrapper from \"../Common/ModalWrapper/ModalWrapper\";\nimport PolicySelectors from \"./PolicySelectors\";\nimport api from \"../../../common/api\";\n\ninterface ISetPolicyProps {\n closeModalAndRefresh: () => void;\n selectedUser: User | null;\n selectedGroups: string[] | null;\n open: boolean;\n}\n\nconst SetPolicy = ({\n closeModalAndRefresh,\n selectedUser,\n selectedGroups,\n open,\n}: ISetPolicyProps) => {\n const dispatch = useAppDispatch();\n //Local States\n const [loading, setLoading] = useState(false);\n const [actualPolicy, setActualPolicy] = useState([]);\n const [selectedPolicy, setSelectedPolicy] = useState([]);\n const currentPolicies = useSelector(\n (state: AppState) => state.createUser.selectedPolicies,\n );\n const setPolicyAction = () => {\n let users = null;\n let groups = null;\n if (selectedGroups !== null) {\n groups = selectedGroups;\n } else {\n if (selectedUser !== null) {\n users = [selectedUser.accessKey] || [\" \"];\n }\n }\n\n setLoading(true);\n\n api\n .invoke(\"PUT\", `/api/v1/set-policy-multi`, {\n name: currentPolicies,\n groups: groups,\n users: users,\n })\n .then(() => {\n setLoading(false);\n closeModalAndRefresh();\n })\n .catch((err: ErrorResponseHandler) => {\n setLoading(false);\n dispatch(setModalErrorSnackMessage(err));\n });\n };\n\n const fetchGroupInformation = () => {\n if (selectedGroups?.length === 1) {\n api\n .invoke(\"GET\", `/api/v1/group/${encodeURIComponent(selectedGroups[0])}`)\n .then((res: any) => {\n const groupPolicy: String = get(res, \"policy\", \"\");\n setActualPolicy(groupPolicy.split(\",\"));\n setSelectedPolicy(groupPolicy.split(\",\"));\n dispatch(setSelectedPolicies(groupPolicy.split(\",\")));\n })\n .catch((err: ErrorResponseHandler) => {\n dispatch(setModalErrorSnackMessage(err));\n setLoading(false);\n });\n }\n };\n\n const resetSelection = () => {\n setSelectedPolicy(actualPolicy);\n dispatch(setSelectedPolicies(actualPolicy));\n };\n\n useEffect(() => {\n if (open) {\n if (selectedGroups?.length === 1) {\n fetchGroupInformation();\n return;\n }\n\n const userPolicy: string[] = get(selectedUser, \"policy\", []);\n setActualPolicy(userPolicy);\n setSelectedPolicy(userPolicy);\n dispatch(setSelectedPolicies(userPolicy));\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [open, selectedGroups?.length, selectedUser]);\n\n const userName = get(selectedUser, \"accessKey\", \"\");\n\n return (\n {\n closeModalAndRefresh();\n }}\n modalOpen={open}\n title=\"Set Policies\"\n >\n \n {(selectedGroups?.length === 1 || selectedUser != null) && (\n \n \n {selectedGroups !== null ? selectedGroups[0] : userName}\n \n \n {actualPolicy.join(\", \")}\n \n \n )}\n {selectedGroups && selectedGroups?.length > 1 && (\n \n {selectedGroups.join(\", \")}\n \n )}\n \n \n \n \n \n \n \n \n {loading && (\n \n \n \n )}\n \n );\n};\n\nexport default SetPolicy;\n","// This file is part of MinIO Console Server\n// Copyright (c) 2021 MinIO, Inc.\n//\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU Affero General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU Affero General Public License for more details.\n//\n// You should have received a copy of the GNU Affero General Public License\n// along with this program. If not, see .\n\nimport { Policy, User } from \"api/consoleApi\";\n\ninterface policyDetailsInterface {\n policy: string;\n}\n\nexport const usersSort = (a: User, b: User) => {\n if (a.accessKey && b.accessKey) {\n if (a.accessKey > b.accessKey) {\n return 1;\n }\n if (a.accessKey < b.accessKey) {\n return -1;\n }\n }\n // a must be equal to b\n return 0;\n};\n\nexport const policySort = (a: Policy, b: Policy) => {\n if (a.name! > b.name!) {\n return 1;\n }\n if (a.name! < b.name!) {\n return -1;\n }\n // a must be equal to b\n return 0;\n};\n\nexport const stringSort = (a: string, b: string) => {\n if (a > b) {\n return 1;\n }\n if (a < b) {\n return -1;\n }\n // a must be equal to b\n return 0;\n};\n\nexport const policyDetailsSort = (\n a: policyDetailsInterface,\n b: policyDetailsInterface,\n) => {\n if (a.policy > b.policy) {\n return 1;\n }\n if (a.policy < b.policy) {\n return -1;\n }\n // a must be equal to b\n return 0;\n};\n"],"names":["_ref","selectedGroups","deleteOpen","closeDeleteModalAndRefresh","dispatch","useAppDispatch","loadingDelete","setLoadingDelete","useState","renderGroups","map","group","_jsx","children","ConfirmDialog","title","concat","length","confirmText","isOpen","titleIcon","ConfirmDeleteIcon","isLoading","onConfirm","onDeleteGroups","api","removeGroup","then","_","catch","async","err","res","json","setErrorSnackMessage","errorToHandler","finally","onClose","confirmationContent","_jsxs","Fragment","groupStatus","preSelectedUsers","selectedGroup","open","selectedUsers","setSelectedUsers","ModalWrapper","modalOpen","AddMembersToGroupIcon","FormLayout","withBorders","containerPadding","ReadBox","label","sx","width","UsersSelectors","editMode","Grid","item","xs","modalStyleUtils","modalButtonBar","Button","id","type","variant","onClick","updateGroup","members","status","setModalErrorSnackMessage","error","formatPolicy","policy","arguments","undefined","split","GroupsDetails","navigate","useNavigate","params","useParams","groupDetails","setGroupDetails","policyOpen","setPolicyOpen","usersOpen","setUsersOpen","setDeleteOpen","memberFilter","setMemberFilter","currentTab","setCurrentTab","groupEnabled","filteredMembers","filter","elementItem","includes","viewUser","hasPermission","CONSOLE_UI_RESOURCE","viewUserPermissions","useEffect","setHelpName","groupName","fetchGroupInfo","groupPolicies","isGroupEnabled","memberActionText","getGroupDetails","getGroupPermissions","canEditGroupMembers","editGroupMembersPermissions","canSetPolicies","setGroupPoliciesPermissions","canViewPolicy","viewPolicyPermissions","groupInfo","data","groupsTabContent","Box","onMouseMove","SectionTitle","separator","marginBottom","actions","display","gap","SearchBox","placeholder","onChange","searchText","value","maxWidth","SecureComponent","resource","scopes","addUserToGroupPermissions","errorProps","disabled","TooltipWrapper","tooltip","permissionTooltipHelper","createGroupPermissions","icon","AddIcon","listUsersPermissions","DataTable","itemActions","userName","IAM_PAGES","USERS","encodeURIComponent","isDisabled","columns","selectedItems","records","entityName","policiesTabContent","IAMPoliciesIcon","POLICIES","SetPolicy","selectedUser","closeModalAndRefresh","setSelectedPolicies","AddGroupMember","onSaveClick","DeleteGroup","isDelSuccess","GROUPS","PageHeaderWrapper","BackLink","HelpMenu","PageLayout","ScreenTitle","GroupsIcon","subTitle","bottomBorder","fontSize","alignItems","style","fontWeight","enableDisableGroupPermissions","matchAll","Switch","indicatorLabels","checked","name","nextStatus","switchOnly","TrashIcon","Tabs","options","tabConfig","content","currentTabOrPath","onTabClick","setRecords","loading","setFilter","fetchUsers","useCallback","users","listUsers","get","sort","usersSort","selUsers","filteredRecords","accessKey","className","ProgressBar","elementKey","onSelect","e","targetD","target","elements","push","element","idField","customPaperHeight","textAlign","padding","noTitle","currentPolicies","useSelector","state","createUser","selectedPolicies","fetchPolicies","policies","listPolicies","_res$data$policies","policySort","setLoading","actualPolicy","setActualPolicy","selectedPolicy","setSelectedPolicy","invoke","groupPolicy","userPolicy","join","PolicySelectors","resetSelection","color","setPolicyAction","groups","a","b","stringSort","policyDetailsSort"],"sourceRoot":""}
\ No newline at end of file
diff --git a/web-app/build/static/js/1370.a3d466ac.chunk.js b/web-app/build/static/js/1370.a3d466ac.chunk.js
new file mode 100644
index 000000000..53b50323e
--- /dev/null
+++ b/web-app/build/static/js/1370.a3d466ac.chunk.js
@@ -0,0 +1,2 @@
+(self.webpackChunkweb_app=self.webpackChunkweb_app||[]).push([[1370],{41206:(e,t,n)=>{"use strict";n.d(t,{A:()=>l});var r=n(65043),o=n(89923),i=n(61476),a=n.n(i),s=n(6681),c=n(70579);const l=e=>{let{value:t,label:n="",tooltip:i="",mode:l="json",onChange:d,editorHeight:p=250,helptip:u}=e;return(0,c.jsx)(o.BYM,{value:t,onChange:e=>d(e),mode:l,tooltip:i,editorHeight:p,label:n,helpTools:(0,c.jsx)(r.Fragment,{children:(0,c.jsx)(s.A,{tooltip:"Copy to Clipboard",children:(0,c.jsx)(a(),{text:t,children:(0,c.jsx)(o.$nd,{type:"button",id:"copy-code-mirror",icon:(0,c.jsx)(o.TdU,{}),color:"primary",variant:"regular"})})})}),helpTip:u,helpTipPlacement:"right"})}},71435:(e,t,n)=>{"use strict";n.d(t,{CS:()=>a,Ez:()=>r,WJ:()=>o,Zb:()=>i});const r={RED:"#C83B51",GREEN:"#4CCB92",YELLOW:"#FFBD62"},o=(e,t)=>e<=t/2?"bad":2!==t&&e===t/2+1?"warn":e===t?"good":void 0,i=e=>{switch(e){case"offline":return"bad";case"online":return"good";default:return"warn"}},a=(e,t)=>e<=t/2?"bad":e===t/2+1?"warn":e===t?"good":void 0},81370:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>O});var r=n(65043),o=n(22166),i=n(73216),a=n(89923),s=n(77403),c=n(41206),l=n(99161),d=n(77938),p=n(72237),u=n(64681),x=n(71435),h=n(70579);const f={display:"grid",gridTemplateColumns:"70px 1fr",gap:15},m=e=>{let{search:t="",children:n=""}=e;const r=new RegExp("(".concat(function(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"").replace(/([.?*+^$[\]\\(){}|-])/g,"\\$1")}(t),")"),"i"),o=String(n).split(r);return t?o.map(((e,t)=>r.test(e)?(0,h.jsx)("mark",{children:e},t):e)):n},y=e=>{let{policyStatements:t}=e;const[n,o]=(0,r.useState)("");return(0,h.jsxs)(a.xA9,{container:!0,children:[(0,h.jsx)(a.xA9,{item:!0,xs:12,children:(0,h.jsxs)(a.xA9,{container:!0,sx:{display:"flex",alignItems:"center"},children:[(0,h.jsx)(a.V7x,{content:(0,h.jsxs)(r.Fragment,{children:["Define which actions are permitted on a specified resource. Learn more about"," ",(0,h.jsx)("a",{target:"blank",href:"https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_elements_condition.html",children:"IAM conditional statements"}),"."]}),placement:"right",children:(0,h.jsx)(a.xA9,{item:!0,xs:12,sm:6,sx:{fontWeight:"bold"},children:"Statements"})}),(0,h.jsx)(a.xA9,{item:!0,xs:12,sm:6,sx:{display:"flex",justifyContent:"flex-end"},children:(0,h.jsx)(u.A,{placeholder:"Search",onChange:o,value:n,sx:{maxWidth:380}})})]})}),!t&&(0,h.jsx)(r.Fragment,{children:"Policy has no statements"}),t&&(0,h.jsx)(a.xA9,{item:!0,xs:12,sx:{"& .policy-row":{borderBottom:"1px solid #eaeaea"},"& .policy-row:first-child":{borderTop:"1px solid #eaeaea"},"& .policy-row:last-child":{borderBottom:"0px"},paddingTop:"15px","& mark":{color:"#000000",fontWeight:500}},children:t.map(((e,t)=>{const r=e.Effect,o="Allow"===r;return(0,h.jsxs)(a.azJ,{className:"policy-row",sx:{display:"grid",gridTemplateColumns:"1fr",gap:"15px",fontSize:"14px",padding:"10px 0 10px 0","& .label":{fontWeight:600}},children:[(0,h.jsxs)(a.azJ,{sx:f,children:[(0,h.jsx)(a.azJ,{className:"label",children:"Effect:"}),(0,h.jsxs)(a.azJ,{sx:{display:"flex",alignItems:"center","& .min-icon":{marginRight:"5px",fill:o?x.Ez.GREEN:x.Ez.RED,height:"14px",width:"14px"}},children:[o?(0,h.jsx)(a.xhy,{}):(0,h.jsx)(a.aaC,{}),r]})]}),(0,h.jsxs)(a.xA9,{container:!0,sx:{gap:15},children:[(0,h.jsxs)(a.xA9,{item:!0,xs:12,sm:6,sx:f,children:[(0,h.jsx)(a.azJ,{className:"label",children:"Actions:"}),(0,h.jsx)(a.azJ,{children:e.Action&&e.Action.map(((e,r)=>(0,h.jsx)("div",{children:(0,h.jsx)(m,{search:n,children:e})},"".concat(t,"-r-").concat(r))))})]}),(0,h.jsxs)(a.xA9,{item:!0,xs:12,sm:6,sx:f,children:[(0,h.jsx)(a.azJ,{className:"label",children:"Resources:"}),(0,h.jsx)(a.azJ,{children:e.Resource&&e.Resource.map(((e,r)=>(0,h.jsxs)("div",{children:[" ",(0,h.jsx)(m,{search:n,children:e})]},"".concat(t,"-r-").concat(r))))})]})]})]},"".concat(t))}))})]})};var b=n(64159),g=n(46537),j=n(20554),v=n(6681),C=n(48793),w=n(56629),A=n(55968);const P=(0,p.A)(r.lazy((()=>n.e(4676).then(n.bind(n,4676))))),O=()=>{const e=(0,j.jL)(),t=(0,i.Zp)(),n=(0,i.g)(),p=(0,o.d4)(g.s$),[x,f]=(0,r.useState)(null),[m,O]=(0,r.useState)([]),[S,_]=(0,r.useState)([]),[E,R]=(0,r.useState)([]),[k,D]=(0,r.useState)(!1),M=n.policyName||"",[T,F]=(0,r.useState)(""),[z,I]=(0,r.useState)(!0),[N,U]=(0,r.useState)(""),[B,J]=(0,r.useState)(!0),[L,G]=(0,r.useState)(""),[$,H]=(0,r.useState)(!0),[W,Z]=(0,r.useState)(!1),[V,Y]=(0,r.useState)("summary"),K=p&&p.includes("ldap-idp")||!1,Q=(0,d._)(l.Ms,l.qA,!0),X=(0,d._)(l.Ms,l.Oh,!0),q=(0,d._)(l.Ms,l.x6,!0),ee=(0,d._)(l.Ms,l.Ld,!0),te=(0,d._)(l.Ms,l.yv,!0),ne=(0,d._)(l.Ms,l.uA,!0),re=(0,d._)(l.Ms,l.nr,!0);(0,r.useEffect)((()=>{z&&(z&&(te?w.F.policy.policyInfo(M).then((e=>{if(e.data){var t,n;f(e.data),F(e?JSON.stringify(JSON.parse(null===(t=e.data)||void 0===t?void 0:t.policy),null,4):"");const r=JSON.parse(null===(n=e.data)||void 0===n?void 0:n.policy);O(r.Statement)}I(!1)})).catch((t=>{e((0,b.C9)(t)),I(!1)})):I(!1)),B&&(q&&!K?w.F.policies.listUsersForPolicy(M).then((e=>{var t;_(null!==(t=e.data)&&void 0!==t?t:[]),J(!1)})).catch((t=>{e((0,b.C9)(t)),J(!1)})):J(!1)),$&&(Q&&!K?w.F.policies.listGroupsForPolicy(M).then((e=>{var t;R(null!==(t=e.data)&&void 0!==t?t:[]),H(!1)})).catch((t=>{e((0,b.C9)(t)),H(!1)})):H(!1)))}),[M,z,B,$,_,R,F,f,J,H,q,Q,te,K,e]);const oe=""!==M.trim(),ie=[{type:"view",onClick:e=>{t("".concat(l.zZ.USERS,"/").concat(encodeURIComponent(e)))},disableButtonFunction:()=>!ee}],ae=S.filter((e=>e.includes(N))),se=[{type:"view",onClick:e=>{t("".concat(l.zZ.GROUPS,"/").concat(encodeURIComponent(e)))},disableButtonFunction:()=>!X}],ce=E.filter((e=>e.includes(L))),le=()=>{J(!0),H(!0),I(!0)};return(0,r.useEffect)((()=>{e((0,b.ph)("policy_details_summary"))}),[]),(0,h.jsxs)(r.Fragment,{children:[W&&(0,h.jsx)(P,{deleteOpen:W,selectedPolicy:M,closeDeleteModalAndRefresh:e=>{Z(!1),t(l.zZ.POLICIES)}}),(0,h.jsx)(C.A,{label:(0,h.jsx)(r.Fragment,{children:(0,h.jsx)(a.EGL,{label:"Policy",onClick:()=>t(l.zZ.POLICIES)})}),actions:(0,h.jsx)(A.A,{})}),(0,h.jsxs)(a.Mxu,{children:[(0,h.jsx)(a.lcx,{icon:(0,h.jsx)(a.n$X,{width:40}),title:M,subTitle:(0,h.jsx)(r.Fragment,{children:"IAM Policy"}),actions:(0,h.jsxs)(r.Fragment,{children:[(0,h.jsx)(d.R,{scopes:[l.OV.ADMIN_DELETE_POLICY],resource:l.Ms,errorProps:{disabled:!0},children:(0,h.jsx)(v.A,{tooltip:ne?"":(0,l.vj)(l.uA,"delete Policies"),children:(0,h.jsx)(a.$nd,{id:"delete-policy",label:"Delete Policy",variant:"secondary",icon:(0,h.jsx)(a.ucK,{}),onClick:()=>{Z(!0)},disabled:!ne})})}),(0,h.jsx)(v.A,{tooltip:"Refresh",children:(0,h.jsx)(a.$nd,{id:"refresh-policy",label:"Refresh",variant:"regular",icon:(0,h.jsx)(a.fNY,{}),onClick:()=>{le()}})})]}),sx:{marginBottom:15}}),(0,h.jsx)(a.azJ,{children:(0,h.jsx)(a.tUM,{options:[{tabConfig:{label:"Summary",disabled:!te,id:"summary"},content:(0,h.jsx)(r.Fragment,{children:(0,h.jsxs)(a.xA9,{onMouseMove:()=>e((0,b.ph)("policy_details_summary")),children:[(0,h.jsx)(a._xt,{separator:!0,sx:{marginBottom:15},children:"Policy Summary"}),(0,h.jsx)(a.azJ,{withBorders:!0,children:(0,h.jsx)(y,{policyStatements:m})})]})})},{tabConfig:{label:"Users",disabled:!q||K,id:"users"},content:(0,h.jsx)(r.Fragment,{children:(0,h.jsxs)(a.xA9,{onMouseMove:()=>e((0,b.ph)("policy_details_users")),children:[(0,h.jsx)(a._xt,{separator:!0,sx:{marginBottom:15},children:"Users"}),(0,h.jsxs)(a.xA9,{container:!0,children:[S.length>0&&(0,h.jsx)(a.xA9,{item:!0,xs:12,sx:{...s._0.actionsTray,marginBottom:15},children:(0,h.jsx)(u.A,{value:N,placeholder:"Search Users",id:"search-resource",onChange:e=>{U(e)}})}),(0,h.jsx)(a.bQt,{itemActions:ie,columns:[{label:"Name",elementKey:"name"}],isLoading:B,records:ae,entityName:"Users with this Policy associated",idField:"name",customPaperHeight:"500px"})]})]})})},{tabConfig:{label:"Groups",disabled:!Q||K,id:"groups"},content:(0,h.jsx)(r.Fragment,{children:(0,h.jsxs)(a.xA9,{onMouseMove:()=>e((0,b.ph)("policy_details_groups")),children:[(0,h.jsx)(a._xt,{separator:!0,sx:{marginBottom:15},children:"Groups"}),(0,h.jsxs)(a.xA9,{container:!0,children:[E.length>0&&(0,h.jsx)(a.xA9,{item:!0,xs:12,sx:{...s._0.actionsTray,marginBottom:15},children:(0,h.jsx)(u.A,{value:N,placeholder:"Search Groups",id:"search-resource",onChange:e=>{G(e)}})}),(0,h.jsx)(a.bQt,{itemActions:se,columns:[{label:"Name",elementKey:"name"}],isLoading:$,records:ce,entityName:"Groups with this Policy associated",idField:"name",customPaperHeight:"500px"})]})]})})},{tabConfig:{label:"Raw Policy",disabled:!te,id:"raw-policy"},content:(0,h.jsx)(r.Fragment,{children:(0,h.jsxs)(a.xA9,{onMouseMove:()=>e((0,b.ph)("policy_details_policy")),children:[(0,h.jsx)(a.V7x,{content:(0,h.jsx)(r.Fragment,{children:(0,h.jsx)("a",{target:"blank",href:"https://min.io/docs/minio/kubernetes/upstream/administration/identity-access-management/policy-based-access-control.html#policy-document-structure",children:"Guide to access policy structure"})}),placement:"right",children:(0,h.jsx)(a._xt,{children:"Raw Policy"})}),(0,h.jsx)("form",{noValidate:!0,autoComplete:"off",onSubmit:t=>{t.preventDefault(),k||(D(!0),re?w.F.policies.addPolicy({name:M,policy:T}).then((t=>{D(!1),e((0,b.Hk)("Policy successfully updated")),le()})).catch((t=>{D(!1),e((0,b.C9)({errorMessage:"There was an error updating the Policy ",detailedError:"There was an error updating the Policy: "+(t.error.detailedMessage||"")+". Please check Policy syntax."}))})):D(!1))},children:(0,h.jsxs)(a.xA9,{container:!0,children:[(0,h.jsx)(a.xA9,{item:!0,xs:12,children:(0,h.jsx)(c.A,{value:T,onChange:e=>{re&&F(e)},editorHeight:"350px",helptip:(0,h.jsx)(r.Fragment,{children:(0,h.jsx)("a",{target:"blank",href:"https://min.io/docs/minio/kubernetes/upstream/administration/identity-access-management/policy-based-access-control.html#policy-document-structure",children:"Guide to access policy structure"})})})}),(0,h.jsxs)(a.xA9,{item:!0,xs:12,sx:{display:"flex",justifyContent:"flex-end",paddingTop:16,gap:8},children:[!x&&(0,h.jsx)(a.$nd,{type:"button",variant:"regular",id:"clear-policy",onClick:()=>{F("{}")},children:"Clear"}),(0,h.jsx)(d.R,{scopes:[l.OV.ADMIN_CREATE_POLICY],resource:l.Ms,errorProps:{disabled:!0},children:(0,h.jsx)(v.A,{tooltip:re?"":(0,l.vj)(l.nr,"edit a Policy"),children:(0,h.jsx)(a.$nd,{id:"save",type:"submit",variant:"callAction",color:"primary",disabled:k||!oe||!re,label:"Save"})})})]}),k&&(0,h.jsx)(a.xA9,{item:!0,xs:12,children:(0,h.jsx)(a.z21,{})})]})})]})})}],currentTabOrPath:V,onTabClick:e=>Y(e)})})]})]})}},75270:(e,t,n)=>{"use strict";var r=n(40139),o={"text/plain":"Text","text/html":"Url",default:"Text"};e.exports=function(e,t){var n,i,a,s,c,l,d=!1;t||(t={}),n=t.debug||!1;try{if(a=r(),s=document.createRange(),c=document.getSelection(),(l=document.createElement("span")).textContent=e,l.ariaHidden="true",l.style.all="unset",l.style.position="fixed",l.style.top=0,l.style.clip="rect(0, 0, 0, 0)",l.style.whiteSpace="pre",l.style.webkitUserSelect="text",l.style.MozUserSelect="text",l.style.msUserSelect="text",l.style.userSelect="text",l.addEventListener("copy",(function(r){if(r.stopPropagation(),t.format)if(r.preventDefault(),"undefined"===typeof r.clipboardData){n&&console.warn("unable to use e.clipboardData"),n&&console.warn("trying IE specific stuff"),window.clipboardData.clearData();var i=o[t.format]||o.default;window.clipboardData.setData(i,e)}else r.clipboardData.clearData(),r.clipboardData.setData(t.format,e);t.onCopy&&(r.preventDefault(),t.onCopy(r.clipboardData))})),document.body.appendChild(l),s.selectNodeContents(l),c.addRange(s),!document.execCommand("copy"))throw new Error("copy command was unsuccessful");d=!0}catch(p){n&&console.error("unable to copy using execCommand: ",p),n&&console.warn("trying IE specific stuff");try{window.clipboardData.setData(t.format||"text",e),t.onCopy&&t.onCopy(window.clipboardData),d=!0}catch(p){n&&console.error("unable to copy using clipboardData: ",p),n&&console.error("falling back to prompt"),i=function(e){var t=(/mac os x/i.test(navigator.userAgent)?"\u2318":"Ctrl")+"+C";return e.replace(/#{\s*key\s*}/g,t)}("message"in t?t.message:"Copy to clipboard: #{key}, Enter"),window.prompt(i,e)}}finally{c&&("function"==typeof c.removeRange?c.removeRange(s):c.removeAllRanges()),l&&document.body.removeChild(l),a()}return d}},24480:(e,t,n)=>{"use strict";function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.CopyToClipboard=void 0;var o=s(n(65043)),i=s(n(75270)),a=["text","onCopy","options","children"];function s(e){return e&&e.__esModule?e:{default:e}}function c(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function l(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function p(e,t){for(var n=0;n{"use strict";var r=n(24480).CopyToClipboard;r.CopyToClipboard=r,e.exports=r},40139:e=>{e.exports=function(){var e=document.getSelection();if(!e.rangeCount)return function(){};for(var t=document.activeElement,n=[],r=0;r.\n\nimport React, { Fragment } from \"react\";\nimport { Button, CodeEditor, CopyIcon } from \"mds\";\nimport CopyToClipboard from \"react-copy-to-clipboard\";\nimport TooltipWrapper from \"../../TooltipWrapper/TooltipWrapper\";\n\ninterface ICodeWrapper {\n value: string;\n label?: string;\n mode?: string;\n tooltip?: string;\n onChange: (value: string) => any;\n editorHeight?: string | number;\n helptip?: any;\n}\n\nconst CodeMirrorWrapper = ({\n value,\n label = \"\",\n tooltip = \"\",\n mode = \"json\",\n onChange,\n editorHeight = 250,\n helptip,\n}: ICodeWrapper) => {\n return (\n onChange(value)}\n mode={mode}\n tooltip={tooltip}\n editorHeight={editorHeight}\n label={label}\n helpTools={\n \n \n \n }\n color={\"primary\"}\n variant={\"regular\"}\n />\n \n \n \n }\n helpTip={helptip}\n helpTipPlacement=\"right\"\n />\n );\n};\n\nexport default CodeMirrorWrapper;\n","// This file is part of MinIO Console Server\n// Copyright (c) 2022 MinIO, Inc.\n//\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU Affero General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU Affero General Public License for more details.\n//\n// You should have received a copy of the GNU Affero General Public License\n// along with this program. If not, see .\n\nexport const STATUS_COLORS = {\n RED: \"#C83B51\",\n GREEN: \"#4CCB92\",\n YELLOW: \"#FFBD62\",\n};\n\nexport const getDriveStatusColor = (\n activeDisks: number,\n totalDrives: number,\n) => {\n if (activeDisks <= totalDrives / 2) {\n return \"bad\";\n }\n if (totalDrives !== 2 && activeDisks === totalDrives / 2 + 1) {\n return \"warn\";\n }\n if (activeDisks === totalDrives) {\n return \"good\";\n }\n};\n\nexport const serverStatusColor = (health_status: string) => {\n switch (health_status) {\n case \"offline\":\n return \"bad\";\n case \"online\":\n return \"good\";\n default:\n return \"warn\";\n }\n};\nexport const getNetworkStatusColor = (\n activeNetwork: number,\n networkTotal: number,\n) => {\n if (activeNetwork <= networkTotal / 2) {\n return \"bad\";\n }\n if (activeNetwork === networkTotal / 2 + 1) {\n return \"warn\";\n }\n if (activeNetwork === networkTotal) {\n return \"good\";\n }\n};\n","// This file is part of MinIO Console Server\n// Copyright (c) 2022 MinIO, Inc.\n//\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU Affero General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU Affero General Public License for more details.\n//\n// You should have received a copy of the GNU Affero General Public License\n// along with this program. If not, see .\n\nimport React, { Fragment, useState } from \"react\";\nimport { DisabledIcon, EnabledIcon, Box, Grid, HelpTip } from \"mds\";\nimport SearchBox from \"../Common/SearchBox\";\nimport { STATUS_COLORS } from \"../Dashboard/BasicDashboard/Utils\";\nimport { IAMStatement } from \"./types\";\n\nconst rowGridStyle = {\n display: \"grid\",\n gridTemplateColumns: \"70px 1fr\",\n gap: 15,\n};\n\nconst escapeRegExp = (str = \"\") =>\n str.replace(/([.?*+^$[\\]\\\\(){}|-])/g, \"\\\\$1\");\n\nconst Highlight = ({ search = \"\", children = \"\" }): any => {\n const txtParts = new RegExp(`(${escapeRegExp(search)})`, \"i\");\n const parts = String(children).split(txtParts);\n\n if (search) {\n return parts.map((part, index) =>\n txtParts.test(part) ? {part} : part,\n );\n } else {\n return children;\n }\n};\n\nconst PolicyView = ({\n policyStatements,\n}: {\n policyStatements: IAMStatement[];\n}) => {\n const [filter, setFilter] = useState(\"\");\n\n return (\n \n \n \n \n Define which actions are permitted on a specified resource.\n Learn more about{\" \"}\n \n IAM conditional statements\n \n .\n \n }\n placement=\"right\"\n >\n \n Statements\n \n \n \n \n \n \n \n {!policyStatements && Policy has no statements}\n {policyStatements && (\n \n {policyStatements.map((stmt, i) => {\n const effect = stmt.Effect;\n const isAllow = effect === \"Allow\";\n return (\n \n \n Effect:\n \n {isAllow ? : }\n {effect}\n \n \n \n \n Actions:\n \n {stmt.Action &&\n stmt.Action.map((act, actIndex) => (\n
\n ))}\n \n \n \n \n );\n })}\n \n )}\n \n );\n};\n\nexport default PolicyView;\n","// Copyright (c) 2021 MinIO, Inc.\n//\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU Affero General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU Affero General Public License for more details.\n//\n// You should have received a copy of the GNU Affero General Public License\n// along with this program. If not, see .\n\nimport React, { Fragment, useEffect, useState } from \"react\";\nimport { IAMPolicy, IAMStatement } from \"./types\";\nimport { useSelector } from \"react-redux\";\nimport { useNavigate, useParams } from \"react-router-dom\";\nimport {\n BackLink,\n Box,\n Button,\n DataTable,\n Grid,\n IAMPoliciesIcon,\n PageLayout,\n ProgressBar,\n RefreshIcon,\n ScreenTitle,\n SectionTitle,\n Tabs,\n TrashIcon,\n HelpTip,\n} from \"mds\";\nimport { actionsTray } from \"../Common/FormComponents/common/styleLibrary\";\n\nimport { ErrorResponseHandler } from \"../../../common/types\";\nimport CodeMirrorWrapper from \"../Common/FormComponents/CodeMirrorWrapper/CodeMirrorWrapper\";\n\nimport {\n CONSOLE_UI_RESOURCE,\n createPolicyPermissions,\n deletePolicyPermissions,\n getGroupPermissions,\n IAM_PAGES,\n IAM_SCOPES,\n listGroupPermissions,\n listUsersPermissions,\n permissionTooltipHelper,\n viewPolicyPermissions,\n viewUserPermissions,\n} from \"../../../common/SecureComponent/permissions\";\nimport {\n hasPermission,\n SecureComponent,\n} from \"../../../common/SecureComponent\";\n\nimport withSuspense from \"../Common/Components/withSuspense\";\n\nimport PolicyView from \"./PolicyView\";\nimport { decodeURLString, encodeURLString } from \"../../../common/utils\";\nimport {\n setErrorSnackMessage,\n setHelpName,\n setSnackBarMessage,\n} from \"../../../systemSlice\";\nimport { selFeatures } from \"../consoleSlice\";\nimport { useAppDispatch } from \"../../../store\";\nimport TooltipWrapper from \"../Common/TooltipWrapper/TooltipWrapper\";\nimport PageHeaderWrapper from \"../Common/PageHeaderWrapper/PageHeaderWrapper\";\nimport { Policy } from \"../../../api/consoleApi\";\nimport { api } from \"../../../api\";\nimport HelpMenu from \"../HelpMenu\";\nimport SearchBox from \"../Common/SearchBox\";\n\nconst DeletePolicy = withSuspense(React.lazy(() => import(\"./DeletePolicy\")));\n\nconst PolicyDetails = () => {\n const dispatch = useAppDispatch();\n const navigate = useNavigate();\n const params = useParams();\n\n const features = useSelector(selFeatures);\n\n const [policy, setPolicy] = useState(null);\n const [policyStatements, setPolicyStatements] = useState([]);\n const [userList, setUserList] = useState([]);\n const [groupList, setGroupList] = useState([]);\n const [addLoading, setAddLoading] = useState(false);\n\n const policyName = decodeURLString(params.policyName || \"\");\n\n const [policyDefinition, setPolicyDefinition] = useState(\"\");\n const [loadingPolicy, setLoadingPolicy] = useState(true);\n const [filterUsers, setFilterUsers] = useState(\"\");\n const [loadingUsers, setLoadingUsers] = useState(true);\n const [filterGroups, setFilterGroups] = useState(\"\");\n const [loadingGroups, setLoadingGroups] = useState(true);\n const [deleteOpen, setDeleteOpen] = useState(false);\n const [selectedTab, setSelectedTab] = useState(\"summary\");\n\n const ldapIsEnabled = (features && features.includes(\"ldap-idp\")) || false;\n\n const displayGroups = hasPermission(\n CONSOLE_UI_RESOURCE,\n listGroupPermissions,\n true,\n );\n\n const viewGroup = hasPermission(\n CONSOLE_UI_RESOURCE,\n getGroupPermissions,\n true,\n );\n\n const displayUsers = hasPermission(\n CONSOLE_UI_RESOURCE,\n listUsersPermissions,\n true,\n );\n\n const viewUser = hasPermission(\n CONSOLE_UI_RESOURCE,\n viewUserPermissions,\n true,\n );\n\n const displayPolicy = hasPermission(\n CONSOLE_UI_RESOURCE,\n viewPolicyPermissions,\n true,\n );\n\n const canDeletePolicy = hasPermission(\n CONSOLE_UI_RESOURCE,\n deletePolicyPermissions,\n true,\n );\n\n const canEditPolicy = hasPermission(\n CONSOLE_UI_RESOURCE,\n createPolicyPermissions,\n true,\n );\n\n const saveRecord = (event: React.FormEvent) => {\n event.preventDefault();\n if (addLoading) {\n return;\n }\n setAddLoading(true);\n if (canEditPolicy) {\n api.policies\n .addPolicy({\n name: policyName,\n policy: policyDefinition,\n })\n .then((_) => {\n setAddLoading(false);\n dispatch(setSnackBarMessage(\"Policy successfully updated\"));\n refreshPolicyDetails();\n })\n .catch((err) => {\n setAddLoading(false);\n dispatch(\n setErrorSnackMessage({\n errorMessage: \"There was an error updating the Policy \",\n detailedError:\n \"There was an error updating the Policy: \" +\n (err.error.detailedMessage || \"\") +\n \". Please check Policy syntax.\",\n }),\n );\n });\n } else {\n setAddLoading(false);\n }\n };\n\n useEffect(() => {\n const loadUsersForPolicy = () => {\n if (loadingUsers) {\n if (displayUsers && !ldapIsEnabled) {\n api.policies\n .listUsersForPolicy(encodeURLString(policyName))\n .then((result) => {\n setUserList(result.data ?? []);\n setLoadingUsers(false);\n })\n .catch((err: ErrorResponseHandler) => {\n dispatch(setErrorSnackMessage(err));\n setLoadingUsers(false);\n });\n } else {\n setLoadingUsers(false);\n }\n }\n };\n\n const loadGroupsForPolicy = () => {\n if (loadingGroups) {\n if (displayGroups && !ldapIsEnabled) {\n api.policies\n .listGroupsForPolicy(encodeURLString(policyName))\n .then((result) => {\n setGroupList(result.data ?? []);\n setLoadingGroups(false);\n })\n .catch((err: ErrorResponseHandler) => {\n dispatch(setErrorSnackMessage(err));\n setLoadingGroups(false);\n });\n } else {\n setLoadingGroups(false);\n }\n }\n };\n const loadPolicyDetails = () => {\n if (loadingPolicy) {\n if (displayPolicy) {\n api.policy\n .policyInfo(encodeURLString(policyName))\n .then((result) => {\n if (result.data) {\n setPolicy(result.data);\n setPolicyDefinition(\n result\n ? JSON.stringify(JSON.parse(result.data?.policy!), null, 4)\n : \"\",\n );\n const pol: IAMPolicy = JSON.parse(result.data?.policy!);\n setPolicyStatements(pol.Statement);\n }\n setLoadingPolicy(false);\n })\n .catch((err: ErrorResponseHandler) => {\n dispatch(setErrorSnackMessage(err));\n setLoadingPolicy(false);\n });\n } else {\n setLoadingPolicy(false);\n }\n }\n };\n\n if (loadingPolicy) {\n loadPolicyDetails();\n loadUsersForPolicy();\n loadGroupsForPolicy();\n }\n }, [\n policyName,\n loadingPolicy,\n loadingUsers,\n loadingGroups,\n setUserList,\n setGroupList,\n setPolicyDefinition,\n setPolicy,\n setLoadingUsers,\n setLoadingGroups,\n displayUsers,\n displayGroups,\n displayPolicy,\n ldapIsEnabled,\n dispatch,\n ]);\n\n const resetForm = () => {\n setPolicyDefinition(\"{}\");\n };\n\n const validSave = policyName.trim() !== \"\";\n\n const deletePolicy = () => {\n setDeleteOpen(true);\n };\n\n const closeDeleteModalAndRefresh = (refresh: boolean) => {\n setDeleteOpen(false);\n navigate(IAM_PAGES.POLICIES);\n };\n\n const userViewAction = (user: any) => {\n navigate(`${IAM_PAGES.USERS}/${encodeURLString(user)}`);\n };\n const userTableActions = [\n {\n type: \"view\",\n onClick: userViewAction,\n disableButtonFunction: () => !viewUser,\n },\n ];\n\n const filteredUsers = userList.filter((elementItem) =>\n elementItem.includes(filterUsers),\n );\n\n const groupViewAction = (group: any) => {\n navigate(`${IAM_PAGES.GROUPS}/${encodeURLString(group)}`);\n };\n\n const groupTableActions = [\n {\n type: \"view\",\n onClick: groupViewAction,\n disableButtonFunction: () => !viewGroup,\n },\n ];\n\n const filteredGroups = groupList.filter((elementItem) =>\n elementItem.includes(filterGroups),\n );\n\n const refreshPolicyDetails = () => {\n setLoadingUsers(true);\n setLoadingGroups(true);\n setLoadingPolicy(true);\n };\n\n useEffect(() => {\n dispatch(setHelpName(\"policy_details_summary\"));\n\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, []);\n\n return (\n \n {deleteOpen && (\n \n )}\n \n navigate(IAM_PAGES.POLICIES)}\n />\n \n }\n actions={}\n />\n \n }\n title={policyName}\n subTitle={IAM Policy}\n actions={\n \n \n \n }\n onClick={deletePolicy}\n disabled={!canDeletePolicy}\n />\n \n \n\n \n }\n onClick={() => {\n refreshPolicyDetails();\n }}\n />\n \n \n }\n sx={{ marginBottom: 15 }}\n />\n \n \n \n dispatch(setHelpName(\"policy_details_summary\"))\n }\n >\n \n Policy Summary\n \n \n \n \n \n \n ),\n },\n {\n tabConfig: {\n label: \"Users\",\n disabled: !displayUsers || ldapIsEnabled,\n id: \"users\",\n },\n content: (\n \n \n dispatch(setHelpName(\"policy_details_users\"))\n }\n >\n \n Users\n \n \n {userList.length > 0 && (\n \n {\n setFilterUsers(val);\n }}\n />\n \n )}\n \n \n \n \n ),\n },\n {\n tabConfig: {\n label: \"Groups\",\n disabled: !displayGroups || ldapIsEnabled,\n id: \"groups\",\n },\n content: (\n \n \n dispatch(setHelpName(\"policy_details_groups\"))\n }\n >\n \n Groups\n \n \n {groupList.length > 0 && (\n \n {\n setFilterGroups(val);\n }}\n />\n \n )}\n \n \n \n \n ),\n },\n {\n tabConfig: {\n label: \"Raw Policy\",\n disabled: !displayPolicy,\n id: \"raw-policy\",\n },\n content: (\n \n \n dispatch(setHelpName(\"policy_details_policy\"))\n }\n >\n \n \n Guide to access policy structure\n \n \n }\n placement=\"right\"\n >\n Raw Policy\n \n \n \n \n ),\n },\n ]}\n currentTabOrPath={selectedTab}\n onTabClick={(tab) => setSelectedTab(tab)}\n />\n \n \n \n );\n};\n\nexport default PolicyDetails;\n","\"use strict\";\n\nvar deselectCurrent = require(\"toggle-selection\");\n\nvar clipboardToIE11Formatting = {\n \"text/plain\": \"Text\",\n \"text/html\": \"Url\",\n \"default\": \"Text\"\n}\n\nvar defaultMessage = \"Copy to clipboard: #{key}, Enter\";\n\nfunction format(message) {\n var copyKey = (/mac os x/i.test(navigator.userAgent) ? \"⌘\" : \"Ctrl\") + \"+C\";\n return message.replace(/#{\\s*key\\s*}/g, copyKey);\n}\n\nfunction copy(text, options) {\n var debug,\n message,\n reselectPrevious,\n range,\n selection,\n mark,\n success = false;\n if (!options) {\n options = {};\n }\n debug = options.debug || false;\n try {\n reselectPrevious = deselectCurrent();\n\n range = document.createRange();\n selection = document.getSelection();\n\n mark = document.createElement(\"span\");\n mark.textContent = text;\n // avoid screen readers from reading out loud the text\n mark.ariaHidden = \"true\"\n // reset user styles for span element\n mark.style.all = \"unset\";\n // prevents scrolling to the end of the page\n mark.style.position = \"fixed\";\n mark.style.top = 0;\n mark.style.clip = \"rect(0, 0, 0, 0)\";\n // used to preserve spaces and line breaks\n mark.style.whiteSpace = \"pre\";\n // do not inherit user-select (it may be `none`)\n mark.style.webkitUserSelect = \"text\";\n mark.style.MozUserSelect = \"text\";\n mark.style.msUserSelect = \"text\";\n mark.style.userSelect = \"text\";\n mark.addEventListener(\"copy\", function(e) {\n e.stopPropagation();\n if (options.format) {\n e.preventDefault();\n if (typeof e.clipboardData === \"undefined\") { // IE 11\n debug && console.warn(\"unable to use e.clipboardData\");\n debug && console.warn(\"trying IE specific stuff\");\n window.clipboardData.clearData();\n var format = clipboardToIE11Formatting[options.format] || clipboardToIE11Formatting[\"default\"]\n window.clipboardData.setData(format, text);\n } else { // all other browsers\n e.clipboardData.clearData();\n e.clipboardData.setData(options.format, text);\n }\n }\n if (options.onCopy) {\n e.preventDefault();\n options.onCopy(e.clipboardData);\n }\n });\n\n document.body.appendChild(mark);\n\n range.selectNodeContents(mark);\n selection.addRange(range);\n\n var successful = document.execCommand(\"copy\");\n if (!successful) {\n throw new Error(\"copy command was unsuccessful\");\n }\n success = true;\n } catch (err) {\n debug && console.error(\"unable to copy using execCommand: \", err);\n debug && console.warn(\"trying IE specific stuff\");\n try {\n window.clipboardData.setData(options.format || \"text\", text);\n options.onCopy && options.onCopy(window.clipboardData);\n success = true;\n } catch (err) {\n debug && console.error(\"unable to copy using clipboardData: \", err);\n debug && console.error(\"falling back to prompt\");\n message = format(\"message\" in options ? options.message : defaultMessage);\n window.prompt(message, text);\n }\n } finally {\n if (selection) {\n if (typeof selection.removeRange == \"function\") {\n selection.removeRange(range);\n } else {\n selection.removeAllRanges();\n }\n }\n\n if (mark) {\n document.body.removeChild(mark);\n }\n reselectPrevious();\n }\n\n return success;\n}\n\nmodule.exports = copy;\n","\"use strict\";\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.CopyToClipboard = void 0;\n\nvar _react = _interopRequireDefault(require(\"react\"));\n\nvar _copyToClipboard = _interopRequireDefault(require(\"copy-to-clipboard\"));\n\nvar _excluded = [\"text\", \"onCopy\", \"options\", \"children\"];\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\n\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, \"prototype\", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } else if (call !== void 0) { throw new TypeError(\"Derived constructors may only return object or undefined\"); } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nvar CopyToClipboard = /*#__PURE__*/function (_React$PureComponent) {\n _inherits(CopyToClipboard, _React$PureComponent);\n\n var _super = _createSuper(CopyToClipboard);\n\n function CopyToClipboard() {\n var _this;\n\n _classCallCheck(this, CopyToClipboard);\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _super.call.apply(_super, [this].concat(args));\n\n _defineProperty(_assertThisInitialized(_this), \"onClick\", function (event) {\n var _this$props = _this.props,\n text = _this$props.text,\n onCopy = _this$props.onCopy,\n children = _this$props.children,\n options = _this$props.options;\n\n var elem = _react[\"default\"].Children.only(children);\n\n var result = (0, _copyToClipboard[\"default\"])(text, options);\n\n if (onCopy) {\n onCopy(text, result);\n } // Bypass onClick if it was present\n\n\n if (elem && elem.props && typeof elem.props.onClick === 'function') {\n elem.props.onClick(event);\n }\n });\n\n return _this;\n }\n\n _createClass(CopyToClipboard, [{\n key: \"render\",\n value: function render() {\n var _this$props2 = this.props,\n _text = _this$props2.text,\n _onCopy = _this$props2.onCopy,\n _options = _this$props2.options,\n children = _this$props2.children,\n props = _objectWithoutProperties(_this$props2, _excluded);\n\n var elem = _react[\"default\"].Children.only(children);\n\n return /*#__PURE__*/_react[\"default\"].cloneElement(elem, _objectSpread(_objectSpread({}, props), {}, {\n onClick: this.onClick\n }));\n }\n }]);\n\n return CopyToClipboard;\n}(_react[\"default\"].PureComponent);\n\nexports.CopyToClipboard = CopyToClipboard;\n\n_defineProperty(CopyToClipboard, \"defaultProps\", {\n onCopy: undefined,\n options: undefined\n});","\"use strict\";\n\nvar _require = require('./Component'),\n CopyToClipboard = _require.CopyToClipboard;\n\nCopyToClipboard.CopyToClipboard = CopyToClipboard;\nmodule.exports = CopyToClipboard;","\nmodule.exports = function () {\n var selection = document.getSelection();\n if (!selection.rangeCount) {\n return function () {};\n }\n var active = document.activeElement;\n\n var ranges = [];\n for (var i = 0; i < selection.rangeCount; i++) {\n ranges.push(selection.getRangeAt(i));\n }\n\n switch (active.tagName.toUpperCase()) { // .toUpperCase handles XHTML\n case 'INPUT':\n case 'TEXTAREA':\n active.blur();\n break;\n\n default:\n active = null;\n break;\n }\n\n selection.removeAllRanges();\n return function () {\n selection.type === 'Caret' &&\n selection.removeAllRanges();\n\n if (!selection.rangeCount) {\n ranges.forEach(function(range) {\n selection.addRange(range);\n });\n }\n\n active &&\n active.focus();\n };\n};\n"],"names":["_ref","value","label","tooltip","mode","onChange","editorHeight","helptip","_jsx","CodeEditor","helpTools","Fragment","children","TooltipWrapper","CopyToClipboard","text","Button","type","id","icon","CopyIcon","color","variant","helpTip","helpTipPlacement","STATUS_COLORS","RED","GREEN","YELLOW","getDriveStatusColor","activeDisks","totalDrives","serverStatusColor","health_status","getNetworkStatusColor","activeNetwork","networkTotal","rowGridStyle","display","gridTemplateColumns","gap","Highlight","search","txtParts","RegExp","concat","arguments","length","undefined","replace","escapeRegExp","parts","String","split","map","part","index","test","_ref2","policyStatements","filter","setFilter","useState","_jsxs","Grid","container","item","xs","sx","alignItems","HelpTip","content","target","href","placement","sm","fontWeight","justifyContent","SearchBox","placeholder","maxWidth","borderBottom","borderTop","paddingTop","stmt","i","effect","Effect","isAllow","Box","className","fontSize","padding","marginRight","fill","height","width","EnabledIcon","DisabledIcon","Action","act","actIndex","Resource","res","resIndex","DeletePolicy","withSuspense","React","PolicyDetails","dispatch","useAppDispatch","navigate","useNavigate","params","useParams","features","useSelector","selFeatures","policy","setPolicy","setPolicyStatements","userList","setUserList","groupList","setGroupList","addLoading","setAddLoading","policyName","decodeURLString","policyDefinition","setPolicyDefinition","loadingPolicy","setLoadingPolicy","filterUsers","setFilterUsers","loadingUsers","setLoadingUsers","filterGroups","setFilterGroups","loadingGroups","setLoadingGroups","deleteOpen","setDeleteOpen","selectedTab","setSelectedTab","ldapIsEnabled","includes","displayGroups","hasPermission","CONSOLE_UI_RESOURCE","listGroupPermissions","viewGroup","getGroupPermissions","displayUsers","listUsersPermissions","viewUser","viewUserPermissions","displayPolicy","viewPolicyPermissions","canDeletePolicy","deletePolicyPermissions","canEditPolicy","createPolicyPermissions","useEffect","api","policyInfo","encodeURLString","then","result","data","_result$data3","_result$data4","JSON","stringify","parse","pol","Statement","catch","err","setErrorSnackMessage","policies","listUsersForPolicy","_result$data","listGroupsForPolicy","_result$data2","validSave","trim","userTableActions","onClick","user","IAM_PAGES","USERS","disableButtonFunction","filteredUsers","elementItem","groupTableActions","group","GROUPS","filteredGroups","refreshPolicyDetails","setHelpName","selectedPolicy","closeDeleteModalAndRefresh","refresh","POLICIES","PageHeaderWrapper","BackLink","actions","HelpMenu","PageLayout","ScreenTitle","IAMPoliciesIcon","title","subTitle","SecureComponent","scopes","IAM_SCOPES","ADMIN_DELETE_POLICY","resource","errorProps","disabled","permissionTooltipHelper","TrashIcon","deletePolicy","RefreshIcon","marginBottom","Tabs","options","tabConfig","onMouseMove","SectionTitle","separator","withBorders","PolicyView","actionsTray","val","DataTable","itemActions","columns","elementKey","isLoading","records","entityName","idField","customPaperHeight","noValidate","autoComplete","onSubmit","e","preventDefault","addPolicy","name","_","setSnackBarMessage","errorMessage","detailedError","error","detailedMessage","CodeMirrorWrapper","ADMIN_CREATE_POLICY","ProgressBar","currentTabOrPath","onTabClick","tab","deselectCurrent","require","clipboardToIE11Formatting","module","exports","debug","message","reselectPrevious","range","selection","mark","success","document","createRange","getSelection","createElement","textContent","ariaHidden","style","all","position","top","clip","whiteSpace","webkitUserSelect","MozUserSelect","msUserSelect","userSelect","addEventListener","stopPropagation","format","clipboardData","console","warn","window","clearData","setData","onCopy","body","appendChild","selectNodeContents","addRange","execCommand","Error","copyKey","navigator","userAgent","prompt","removeRange","removeAllRanges","removeChild","_typeof","obj","Symbol","iterator","constructor","prototype","Object","defineProperty","_react","_interopRequireDefault","_copyToClipboard","_excluded","__esModule","ownKeys","object","enumerableOnly","keys","getOwnPropertySymbols","symbols","sym","getOwnPropertyDescriptor","enumerable","push","apply","_objectSpread","source","forEach","key","_defineProperty","getOwnPropertyDescriptors","defineProperties","_objectWithoutProperties","excluded","sourceKeys","indexOf","_objectWithoutPropertiesLoose","sourceSymbolKeys","propertyIsEnumerable","call","_defineProperties","props","descriptor","configurable","writable","_setPrototypeOf","o","p","setPrototypeOf","__proto__","_createSuper","Derived","hasNativeReflectConstruct","Reflect","construct","sham","Proxy","Boolean","valueOf","_isNativeReflectConstruct","Super","_getPrototypeOf","NewTarget","this","self","TypeError","_assertThisInitialized","_possibleConstructorReturn","ReferenceError","getPrototypeOf","_React$PureComponent","subClass","superClass","create","_inherits","Constructor","protoProps","staticProps","_super","_this","instance","_classCallCheck","_len","args","Array","_key","event","_this$props","elem","Children","only","_this$props2","cloneElement","PureComponent","rangeCount","active","activeElement","ranges","getRangeAt","tagName","toUpperCase","blur","focus"],"sourceRoot":""}
\ No newline at end of file
diff --git a/web-app/build/static/js/2166.a0f01e1a.chunk.js b/web-app/build/static/js/2166.a0f01e1a.chunk.js
new file mode 100644
index 000000000..45408b2df
--- /dev/null
+++ b/web-app/build/static/js/2166.a0f01e1a.chunk.js
@@ -0,0 +1,2 @@
+"use strict";(self.webpackChunkweb_app=self.webpackChunkweb_app||[]).push([[2166],{72271:(e,t,a)=>{a.d(t,{A:()=>l});a(65043);var n=a(89923),i=a(70579);const l=e=>{let{iconComponent:t,entity:a}=e;return(0,i.jsx)(n.xA9,{container:!0,children:(0,i.jsx)(n.xA9,{item:!0,xs:12,children:(0,i.jsx)(n.lVp,{title:"".concat(a," not available"),iconComponent:t,help:(0,i.jsxs)(n.azJ,{sx:{fontSize:"14px",["@media (max-width: ".concat(n.nmC.sm,"px)")]:{display:"flex",flexFlow:"column"}},children:[(0,i.jsx)("span",{children:"This feature is not available for a single-disk setup.\xa0"}),(0,i.jsxs)("span",{children:["Please deploy a server in"," ",(0,i.jsx)("a",{href:"https://min.io/docs/minio/linux/operations/install-deploy-manage/deploy-minio-multi-node-multi-drive.html?ref=con",target:"_blank",rel:"noopener",children:"Distributed Mode"})," ","to use this feature."]})]})})})})}},2166:(e,t,a)=>{a.r(t),a.d(t,{default:()=>g});var n=a(65043),i=a(89923),l=a(73216),s=a(22166),o=a(56483),c=a(64159),r=a(20554),d=a(14558),p=a(94141),x=a(72271),m=a(49501),h=a(28481),u=a(48793),f=a(55968),j=a(70579);const b=e=>{let{volumeVal:t,pathVal:a}=e;return(0,j.jsx)(i.azJ,{className:"code-block-container",children:(0,j.jsxs)(i.azJ,{className:"example-code-block",children:[(0,j.jsxs)(i.azJ,{sx:{display:"flex",marginBottom:"5px",flexFlow:"row",["@media (max-width: ".concat(i.nmC.sm,"px)")]:{flexFlow:"column"}},children:[(0,j.jsx)("label",{children:"Volume/bucket Name :"})," ",(0,j.jsx)("code",{children:t})]}),(0,j.jsxs)(i.azJ,{sx:{display:"flex",flexFlow:"row",["@media (max-width: ".concat(i.nmC.sm,"px)")]:{flexFlow:"column"}},children:[(0,j.jsx)("label",{children:"Path : "}),(0,j.jsx)("code",{children:a})]})]})})},g=()=>{const e=(0,r.jL)(),t=(0,l.Zp)(),a=(0,s.d4)(c.Rq),[g,w]=(0,n.useState)(""),[y,v]=(0,n.useState)(""),[k,C]=(0,n.useState)(!0),[z,T]=(0,n.useState)(""),[S,J]=(0,n.useState)(""),[F,V]=(0,n.useState)(!1),[A,I]=(0,n.useState)(""),[_,N]=(0,n.useState)(""),B=(0,d.vf)();(0,n.useEffect)((()=>{let e,t;e=g.trim().length>0,e?"/"===g.slice(0,1)&&(e=!1,I("Volume/Bucket name cannot start with /")):I("This field is required"),t=y.trim().length>0,y?"/"===y.slice(0,1)&&(t=!1,N("Path cannot start with /")):N("This field is required");const a=e&&t;e&&I(""),t&&N(""),V(a)}),[g,y]);const R=async()=>{let t=document.baseURI.replace(window.location.origin,"");(async e=>await fetch(e,{method:"GET"}))("".concat(t,"/api/v1/admin/inspect?volume=").concat(encodeURIComponent(g),"&file=").concat(encodeURIComponent(y),"&encrypt=").concat(k)).then((async t=>{if(!t.ok){const a=await t.json();e((0,c.C9)({errorMessage:a.message,detailedError:a.code}))}const a=await t.blob(),n=t.headers.get("content-disposition").split('"')[1],i=(0,o.UM)(n)||"";(0,o.OT)(a,n),J(n),T(i)})).catch((t=>{e((0,c.C9)(t))}))},E=()=>{w(""),v(""),C(!0)};return(0,n.useEffect)((()=>{e((0,c.ph)("inspect"))}),[]),(0,j.jsxs)(n.Fragment,{children:[(0,j.jsx)(u.A,{label:"Inspect",actions:(0,j.jsx)(f.A,{})}),(0,j.jsxs)(i.Mxu,{children:[!B&&(0,j.jsx)(h.A,{compactMode:!0}),a?(0,j.jsx)(i.Hbc,{helpBox:(0,j.jsx)(i.lVp,{title:"Learn more about the Inspect feature",iconComponent:(0,j.jsx)(i.nTF,{}),help:(0,j.jsxs)(n.Fragment,{children:[(0,j.jsx)(i.azJ,{sx:{marginTop:"16px",fontWeight:600,fontStyle:"italic",fontSize:"14px"},children:"Examples:"}),(0,j.jsxs)(i.azJ,{sx:{display:"flex",flexFlow:"column",fontSize:"14px",flex:"2","& .step-row":{fontSize:"14px",display:"flex",marginTop:"15px",marginBottom:"15px","&.step-text":{fontWeight:400},"&:before":{content:"' '",height:"7px",width:"7px",backgroundColor:"#2781B0",marginRight:"10px",marginTop:"7px",flexShrink:0}},"& .code-block-container":{flex:"1",marginTop:"15px",marginLeft:"35px","& input":{color:"#737373"}},"& .example-code-block label":{display:"inline-block",width:160,fontWeight:600,fontSize:14,["@media (max-width: ".concat(i.nmC.sm,"px)")]:{width:"100%"}},"& code":{width:100,paddingLeft:"10px",fontFamily:"monospace",paddingRight:"10px",paddingTop:"3px",paddingBottom:"3px",borderRadius:"2px",border:"1px solid #eaeaea",fontSize:"10px",fontWeight:500,["@media (max-width: ".concat(i.nmC.sm,"px)")]:{width:"100%"}},"& .spacer":{marginBottom:"5px"}},children:[(0,j.jsxs)(i.azJ,{children:[(0,j.jsx)(i.azJ,{className:"step-row",children:(0,j.jsx)("div",{className:"step-text",children:"To Download 'xl.meta' for a specific object from all the drives in a zip file:"})}),(0,j.jsx)(b,{pathVal:"test*/xl.meta",volumeVal:"test-bucket"})]}),(0,j.jsxs)(i.azJ,{children:[(0,j.jsx)(i.azJ,{className:"step-row",children:(0,j.jsx)("div",{className:"step-text",children:"To Download all constituent parts for a specific object, and optionally encrypt the downloaded zip:"})}),(0,j.jsx)(b,{pathVal:"test*/xl.meta",volumeVal:"test*/*/part.*"})]}),(0,j.jsxs)(i.azJ,{children:[(0,j.jsx)(i.azJ,{className:"step-row",children:(0,j.jsxs)("div",{className:"step-text",children:["To Download recursively all objects at a prefix.",(0,j.jsx)("br",{}),"NOTE: This can be an expensive operation use it with caution."]})}),(0,j.jsx)(b,{pathVal:"test*/xl.meta",volumeVal:"test/**"})]})]}),(0,j.jsxs)(i.azJ,{sx:{marginTop:"30px",marginLeft:"15px",fontSize:"14px"},children:["You can learn more at our"," ",(0,j.jsx)("a",{href:"https://github.com/minio/minio/tree/master/docs/debugging?ref=con",target:"_blank",rel:"noopener",children:"documentation"}),"."]})]})}),children:(0,j.jsxs)("form",{noValidate:!0,autoComplete:"off",onSubmit:e=>{e.preventDefault(),B?R():t("/support/register")},children:[(0,j.jsx)(i.cl_,{id:"inspect_volume",name:"inspect_volume",onChange:e=>{w(e.target.value)},label:"Volume or Bucket Name",value:g,error:A,required:!0,placeholder:"test-bucket",disabled:!B}),(0,j.jsx)(i.cl_,{id:"inspect_path",name:"inspect_path",error:_,onChange:e=>{v(e.target.value)},label:"File or Path to inspect",value:y,required:!0,placeholder:"test*/xl.meta",disabled:!B}),(0,j.jsx)(i.dOG,{label:"Encrypt",indicatorLabels:["True","False"],checked:k,value:"true",id:"inspect_encrypt",name:"inspect_encrypt",onChange:()=>{C(!k)},disabled:!B}),(0,j.jsxs)(i.azJ,{sx:{display:"flex",alignItems:"center",justifyContent:"flex-end",marginTop:"55px"},children:[(0,j.jsx)(i.$nd,{id:"inspect-clear-button",style:{marginRight:"15px"},type:"button",variant:"regular","data-test-id":"inspect-clear-button",onClick:E,label:"Clear",disabled:!B}),(0,j.jsx)(i.$nd,{id:"inspect-start",type:"submit",variant:B?"callAction":"regular","data-test-id":"inspect-submit-button",disabled:!F||!B,label:"Inspect"})]})]})}):(0,j.jsx)(x.A,{iconComponent:(0,j.jsx)(i.nTF,{}),entity:"Inspect"}),z?(0,j.jsx)(p.A,{modalOpen:!0,title:"Inspect Decryption Key",onClose:()=>{(0,o.Yj)(S),T(""),E()},titleIcon:(0,j.jsx)(i.aJN,{}),children:(0,j.jsxs)(n.Fragment,{children:[(0,j.jsxs)(i.azJ,{children:["This will be displayed only once. It cannot be recovered.",(0,j.jsx)("br",{}),"Use secure medium to share this key."]}),(0,j.jsx)("form",{noValidate:!0,onSubmit:()=>!1,children:(0,j.jsx)(m.A,{value:z})})]})}):null]})]})}},49501:(e,t,a)=>{a.d(t,{A:()=>s});var n=a(65043),i=a(89923),l=a(70579);const s=e=>{let{value:t}=e;const[a,s]=(0,n.useState)(!1);return(0,l.jsxs)(i.azJ,{sx:{display:"flex",alignItems:"center",flexFlow:"row",["@media (max-width: ".concat(i.nmC.sm,"px)")]:{flexFlow:"column"}},children:[(0,l.jsx)(i.cl_,{id:"inspect-dec-key",name:"inspect-dec-key",placeholder:"",label:"",type:a?"text":"password",onChange:()=>{},value:t,overlayIcon:(0,l.jsx)(i.TdU,{}),readOnly:!0,overlayAction:()=>navigator.clipboard.writeText(t)}),(0,l.jsx)(i.$nd,{id:"show-hide-key",style:{marginLeft:"10px"},variant:"callAction",onClick:()=>s(!a),label:"Show/Hide"})]})}}}]);
+//# sourceMappingURL=2166.a0f01e1a.chunk.js.map
\ No newline at end of file
diff --git a/web-app/build/static/js/2166.a0f01e1a.chunk.js.map b/web-app/build/static/js/2166.a0f01e1a.chunk.js.map
new file mode 100644
index 000000000..b80c32321
--- /dev/null
+++ b/web-app/build/static/js/2166.a0f01e1a.chunk.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"static/js/2166.a0f01e1a.chunk.js","mappings":"uJAwBA,MAuCA,EAvCwBA,IAAkD,IAAjD,cAAEC,EAAa,OAAEC,GAA0BF,EAClE,OACEG,EAAAA,EAAAA,KAACC,EAAAA,IAAI,CAACC,WAAS,EAAAC,UACbH,EAAAA,EAAAA,KAACC,EAAAA,IAAI,CAACG,MAAI,EAACC,GAAI,GAAGF,UAChBH,EAAAA,EAAAA,KAACM,EAAAA,IAAO,CACNC,MAAK,GAAAC,OAAKT,EAAM,kBAChBD,cAAeA,EACfW,MACEC,EAAAA,EAAAA,MAACC,EAAAA,IAAG,CACFC,GAAI,CACFC,SAAU,OACV,CAAC,sBAADL,OAAuBM,EAAAA,IAAYC,GAAE,QAAQ,CAC3CC,QAAS,OACTC,SAAU,WAEZd,SAAA,EAEFH,EAAAA,EAAAA,KAAA,QAAAG,SAAM,gEAGNO,EAAAA,EAAAA,MAAA,QAAAP,SAAA,CAAM,4BACsB,KAC1BH,EAAAA,EAAAA,KAAA,KACEkB,KAAK,oHACLC,OAAO,SACPC,IAAI,WAAUjB,SACf,qBAEI,IA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screens/Console/Tools/KeyRevealer.tsx"],"sourcesContent":["// This file is part of MinIO Console Server\n// Copyright (c) 2021 MinIO, Inc.\n//\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU Affero General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU Affero General Public License for more details.\n//\n// You should have received a copy of the GNU Affero General Public License\n// along with this program. If not, see .\n\nimport React from \"react\";\nimport { HelpBox, Box, Grid, breakPoints } from \"mds\";\n\ninterface IDistributedOnly {\n iconComponent: any;\n entity: string;\n}\n\nconst DistributedOnly = ({ iconComponent, entity }: IDistributedOnly) => {\n return (\n \n \n \n \n This feature is not available for a single-disk setup. \n \n \n Please deploy a server in{\" \"}\n \n Distributed Mode\n {\" \"}\n to use this feature.\n \n \n }\n />\n \n \n );\n};\n\nexport default DistributedOnly;\n","// This file is part of MinIO Console Server\n// Copyright (c) 2022 MinIO, Inc.\n//\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU Affero General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU Affero General Public License for more details.\n//\n// You should have received a copy of the GNU Affero General Public License\n// along with this program. If not, see .\n\nimport React, { Fragment, useEffect, useState } from \"react\";\nimport {\n Box,\n breakPoints,\n Button,\n FormLayout,\n HelpBox,\n InputBox,\n InspectMenuIcon,\n PageLayout,\n PasswordKeyIcon,\n Switch,\n} from \"mds\";\nimport { useNavigate } from \"react-router-dom\";\nimport { useSelector } from \"react-redux\";\nimport {\n deleteCookie,\n getCookieValue,\n performDownload,\n} from \"../../../common/utils\";\nimport {\n selDistSet,\n setErrorSnackMessage,\n setHelpName,\n} from \"../../../systemSlice\";\nimport { useAppDispatch } from \"../../../store\";\nimport { registeredCluster } from \"../../../config\";\nimport ModalWrapper from \"../Common/ModalWrapper/ModalWrapper\";\nimport DistributedOnly from \"../Common/DistributedOnly/DistributedOnly\";\nimport KeyRevealer from \"./KeyRevealer\";\nimport RegisterCluster from \"../Support/RegisterCluster\";\nimport PageHeaderWrapper from \"../Common/PageHeaderWrapper/PageHeaderWrapper\";\nimport HelpMenu from \"../HelpMenu\";\n\nconst ExampleBlock = ({\n volumeVal,\n pathVal,\n}: {\n volumeVal: string;\n pathVal: string;\n}) => {\n return (\n \n \n \n {volumeVal}\n \n \n \n {pathVal}\n \n \n \n );\n};\n\nconst Inspect = () => {\n const dispatch = useAppDispatch();\n const navigate = useNavigate();\n const distributedSetup = useSelector(selDistSet);\n\n const [volumeName, setVolumeName] = useState(\"\");\n const [inspectPath, setInspectPath] = useState(\"\");\n const [isEncrypt, setIsEncrypt] = useState(true);\n\n const [decryptionKey, setDecryptionKey] = useState(\"\");\n\n const [insFileName, setInsFileName] = useState(\"\");\n\n const [isFormValid, setIsFormValid] = useState(false);\n const [volumeError, setVolumeError] = useState(\"\");\n const [pathError, setPathError] = useState(\"\");\n const clusterRegistered = registeredCluster();\n /**\n * Validation Effect\n */\n useEffect(() => {\n let isVolValid;\n let isPathValid;\n\n isVolValid = volumeName.trim().length > 0;\n if (!isVolValid) {\n setVolumeError(\"This field is required\");\n } else if (volumeName.slice(0, 1) === \"/\") {\n isVolValid = false;\n setVolumeError(\"Volume/Bucket name cannot start with /\");\n }\n isPathValid = inspectPath.trim().length > 0;\n if (!inspectPath) {\n setPathError(\"This field is required\");\n } else if (inspectPath.slice(0, 1) === \"/\") {\n isPathValid = false;\n setPathError(\"Path cannot start with /\");\n }\n const isValid = isVolValid && isPathValid;\n\n if (isVolValid) {\n setVolumeError(\"\");\n }\n if (isPathValid) {\n setPathError(\"\");\n }\n\n setIsFormValid(isValid);\n }, [volumeName, inspectPath]);\n\n const makeRequest = async (url: string) => {\n return await fetch(url, { method: \"GET\" });\n };\n\n const performInspect = async () => {\n let basename = document.baseURI.replace(window.location.origin, \"\");\n const urlOfInspectApi = `${basename}/api/v1/admin/inspect?volume=${encodeURIComponent(volumeName)}&file=${encodeURIComponent(inspectPath)}&encrypt=${isEncrypt}`;\n\n makeRequest(urlOfInspectApi)\n .then(async (res) => {\n if (!res.ok) {\n const resErr: any = await res.json();\n\n dispatch(\n setErrorSnackMessage({\n errorMessage: resErr.message,\n detailedError: resErr.code,\n }),\n );\n }\n const blob: Blob = await res.blob();\n\n //@ts-ignore\n const filename = res.headers.get(\"content-disposition\").split('\"')[1];\n const decryptKey = getCookieValue(filename) || \"\";\n\n performDownload(blob, filename);\n setInsFileName(filename);\n setDecryptionKey(decryptKey);\n })\n .catch((err) => {\n dispatch(setErrorSnackMessage(err));\n });\n };\n\n const resetForm = () => {\n setVolumeName(\"\");\n setInspectPath(\"\");\n setIsEncrypt(true);\n };\n\n const onCloseDecKeyModal = () => {\n deleteCookie(insFileName);\n setDecryptionKey(\"\");\n resetForm();\n };\n\n useEffect(() => {\n dispatch(setHelpName(\"inspect\"));\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, []);\n\n return (\n \n } />\n\n \n {!clusterRegistered && }\n {!distributedSetup ? (\n }\n entity={\"Inspect\"}\n />\n ) : (\n }\n help={\n \n \n Examples:\n \n\n \n \n \n
\n To Download 'xl.meta' for a specific object from all\n the drives in a zip file:\n
\n \n\n \n \n\n \n \n
\n To Download all constituent parts for a specific\n object, and optionally encrypt the downloaded zip:\n
\n \n\n \n \n \n \n
\n To Download recursively all objects at a prefix.\n \n NOTE: This can be an expensive operation use it with\n caution.\n
\n \n \n \n \n\n \n You can learn more at our{\" \"}\n \n documentation\n \n .\n \n \n }\n />\n }\n >\n \n \n )}\n {decryptionKey ? (\n }\n >\n \n \n This will be displayed only once. It cannot be recovered.\n \n Use secure medium to share this key.\n \n \n \n \n ) : null}\n \n \n );\n};\n\nexport default Inspect;\n","// This file is part of MinIO Console Server\n// Copyright (c) 2022 MinIO, Inc.\n//\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU Affero General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU Affero General Public License for more details.\n//\n// You should have received a copy of the GNU Affero General Public License\n// along with this program. If not, see .\n\nimport React, { useState } from \"react\";\nimport { Button, CopyIcon, InputBox, Box, breakPoints } from \"mds\";\n\nconst KeyRevealer = ({ value }: { value: string }) => {\n const [shown, setShown] = useState(false);\n\n return (\n \n {}}\n value={value}\n overlayIcon={}\n readOnly={true}\n overlayAction={() => navigator.clipboard.writeText(value)}\n />\n\n setShown(!shown)}\n label={\"Show/Hide\"}\n />\n \n );\n};\n\nexport default KeyRevealer;\n"],"names":["_ref","iconComponent","entity","_jsx","Grid","container","children","item","xs","HelpBox","title","concat","help","_jsxs","Box","sx","fontSize","breakPoints","sm","display","flexFlow","href","target","rel","ExampleBlock","volumeVal","pathVal","className","marginBottom","Inspect","dispatch","useAppDispatch","navigate","useNavigate","distributedSetup","useSelector","selDistSet","volumeName","setVolumeName","useState","inspectPath","setInspectPath","isEncrypt","setIsEncrypt","decryptionKey","setDecryptionKey","insFileName","setInsFileName","isFormValid","setIsFormValid","volumeError","setVolumeError","pathError","setPathError","clusterRegistered","registeredCluster","useEffect","isVolValid","isPathValid","trim","length","slice","isValid","performInspect","async","basename","document","baseURI","replace","window","location","origin","fetch","url","method","makeRequest","encodeURIComponent","then","res","ok","resErr","json","setErrorSnackMessage","errorMessage","message","detailedError","code","blob","filename","headers","get","split","decryptKey","getCookieValue","performDownload","catch","err","resetForm","setHelpName","Fragment","PageHeaderWrapper","label","actions","HelpMenu","PageLayout","RegisterCluster","compactMode","FormLayout","helpBox","InspectMenuIcon","marginTop","fontWeight","fontStyle","flex","content","height","width","backgroundColor","marginRight","flexShrink","marginLeft","color","paddingLeft","fontFamily","paddingRight","paddingTop","paddingBottom","borderRadius","border","noValidate","autoComplete","onSubmit","e","preventDefault","InputBox","id","name","onChange","value","error","required","placeholder","disabled","Switch","indicatorLabels","checked","alignItems","justifyContent","Button","style","type","variant","onClick","DistributedOnly","ModalWrapper","modalOpen","onClose","onCloseDecKeyModal","deleteCookie","titleIcon","PasswordKeyIcon","KeyRevealer","shown","setShown","overlayIcon","CopyIcon","readOnly","overlayAction","navigator","clipboard","writeText"],"sourceRoot":""}
\ No newline at end of file
diff --git a/web-app/build/static/js/2166.bb4ae347.chunk.js b/web-app/build/static/js/2166.bb4ae347.chunk.js
deleted file mode 100644
index 3eed409bc..000000000
--- a/web-app/build/static/js/2166.bb4ae347.chunk.js
+++ /dev/null
@@ -1,2 +0,0 @@
-"use strict";(self.webpackChunkweb_app=self.webpackChunkweb_app||[]).push([[2166],{72271:(e,t,a)=>{a.d(t,{A:()=>i});a(65043);var n=a(89923),s=a(70579);const i=e=>{let{iconComponent:t,entity:a}=e;return(0,s.jsx)(n.xA9,{container:!0,children:(0,s.jsx)(n.xA9,{item:!0,xs:12,children:(0,s.jsx)(n.lVp,{title:"".concat(a," not available"),iconComponent:t,help:(0,s.jsxs)(n.azJ,{sx:{fontSize:"14px",["@media (max-width: ".concat(n.nmC.sm,"px)")]:{display:"flex",flexFlow:"column"}},children:[(0,s.jsx)("span",{children:"This feature is not available for a single-disk setup.\xa0"}),(0,s.jsxs)("span",{children:["Please deploy a server in"," ",(0,s.jsx)("a",{href:"https://min.io/docs/minio/linux/operations/install-deploy-manage/deploy-minio-multi-node-multi-drive.html?ref=con",target:"_blank",rel:"noopener",children:"Distributed Mode"})," ","to use this feature."]})]})})})})}},2166:(e,t,a)=>{a.r(t),a.d(t,{default:()=>g});var n=a(65043),s=a(89923),i=a(73216),l=a(22166),o=a(56483),c=a(64159),r=a(20554),d=a(14558),p=a(94141),x=a(72271),m=a(49501),h=a(28481),u=a(48793),f=a(55968),j=a(70579);const b=e=>{let{volumeVal:t,pathVal:a}=e;return(0,j.jsx)(s.azJ,{className:"code-block-container",children:(0,j.jsxs)(s.azJ,{className:"example-code-block",children:[(0,j.jsxs)(s.azJ,{sx:{display:"flex",marginBottom:"5px",flexFlow:"row",["@media (max-width: ".concat(s.nmC.sm,"px)")]:{flexFlow:"column"}},children:[(0,j.jsx)("label",{children:"Volume/bucket Name :"})," ",(0,j.jsx)("code",{children:t})]}),(0,j.jsxs)(s.azJ,{sx:{display:"flex",flexFlow:"row",["@media (max-width: ".concat(s.nmC.sm,"px)")]:{flexFlow:"column"}},children:[(0,j.jsx)("label",{children:"Path : "}),(0,j.jsx)("code",{children:a})]})]})})},g=()=>{const e=(0,r.jL)(),t=(0,i.Zp)(),a=(0,l.d4)(c.Rq),[g,w]=(0,n.useState)(""),[y,v]=(0,n.useState)(""),[k,z]=(0,n.useState)(!0),[C,T]=(0,n.useState)(""),[S,J]=(0,n.useState)(""),[F,V]=(0,n.useState)(!1),[A,_]=(0,n.useState)(""),[N,I]=(0,n.useState)(""),B=(0,d.vf)();(0,n.useEffect)((()=>{let e,t;e=g.trim().length>0,e?"/"===g.slice(0,1)&&(e=!1,_("Volume/Bucket name cannot start with /")):_("This field is required"),t=y.trim().length>0,y?"/"===y.slice(0,1)&&(t=!1,I("Path cannot start with /")):I("This field is required");const a=e&&t;e&&_(""),t&&I(""),V(a)}),[g,y]);const E=async()=>{const t=(0,o.nf)(y),a=(0,o.nf)(g);let n=document.baseURI.replace(window.location.origin,"");(async e=>await fetch(e,{method:"GET"}))("".concat(n,"/api/v1/admin/inspect?volume=").concat(a,"&file=").concat(t,"&encrypt=").concat(k)).then((async t=>{if(!t.ok){const a=await t.json();e((0,c.C9)({errorMessage:a.message,detailedError:a.code}))}const a=await t.blob(),n=t.headers.get("content-disposition").split('"')[1],s=(0,o.UM)(n)||"";(0,o.OT)(a,n),J(n),T(s)})).catch((t=>{e((0,c.C9)(t))}))},L=()=>{w(""),v(""),z(!0)};return(0,n.useEffect)((()=>{e((0,c.ph)("inspect"))}),[]),(0,j.jsxs)(n.Fragment,{children:[(0,j.jsx)(u.A,{label:"Inspect",actions:(0,j.jsx)(f.A,{})}),(0,j.jsxs)(s.Mxu,{children:[!B&&(0,j.jsx)(h.A,{compactMode:!0}),a?(0,j.jsx)(s.Hbc,{helpBox:(0,j.jsx)(s.lVp,{title:"Learn more about the Inspect feature",iconComponent:(0,j.jsx)(s.nTF,{}),help:(0,j.jsxs)(n.Fragment,{children:[(0,j.jsx)(s.azJ,{sx:{marginTop:"16px",fontWeight:600,fontStyle:"italic",fontSize:"14px"},children:"Examples:"}),(0,j.jsxs)(s.azJ,{sx:{display:"flex",flexFlow:"column",fontSize:"14px",flex:"2","& .step-row":{fontSize:"14px",display:"flex",marginTop:"15px",marginBottom:"15px","&.step-text":{fontWeight:400},"&:before":{content:"' '",height:"7px",width:"7px",backgroundColor:"#2781B0",marginRight:"10px",marginTop:"7px",flexShrink:0}},"& .code-block-container":{flex:"1",marginTop:"15px",marginLeft:"35px","& input":{color:"#737373"}},"& .example-code-block label":{display:"inline-block",width:160,fontWeight:600,fontSize:14,["@media (max-width: ".concat(s.nmC.sm,"px)")]:{width:"100%"}},"& code":{width:100,paddingLeft:"10px",fontFamily:"monospace",paddingRight:"10px",paddingTop:"3px",paddingBottom:"3px",borderRadius:"2px",border:"1px solid #eaeaea",fontSize:"10px",fontWeight:500,["@media (max-width: ".concat(s.nmC.sm,"px)")]:{width:"100%"}},"& .spacer":{marginBottom:"5px"}},children:[(0,j.jsxs)(s.azJ,{children:[(0,j.jsx)(s.azJ,{className:"step-row",children:(0,j.jsx)("div",{className:"step-text",children:"To Download 'xl.meta' for a specific object from all the drives in a zip file:"})}),(0,j.jsx)(b,{pathVal:"test*/xl.meta",volumeVal:"test-bucket"})]}),(0,j.jsxs)(s.azJ,{children:[(0,j.jsx)(s.azJ,{className:"step-row",children:(0,j.jsx)("div",{className:"step-text",children:"To Download all constituent parts for a specific object, and optionally encrypt the downloaded zip:"})}),(0,j.jsx)(b,{pathVal:"test*/xl.meta",volumeVal:"test*/*/part.*"})]}),(0,j.jsxs)(s.azJ,{children:[(0,j.jsx)(s.azJ,{className:"step-row",children:(0,j.jsxs)("div",{className:"step-text",children:["To Download recursively all objects at a prefix.",(0,j.jsx)("br",{}),"NOTE: This can be an expensive operation use it with caution."]})}),(0,j.jsx)(b,{pathVal:"test*/xl.meta",volumeVal:"test/**"})]})]}),(0,j.jsxs)(s.azJ,{sx:{marginTop:"30px",marginLeft:"15px",fontSize:"14px"},children:["You can learn more at our"," ",(0,j.jsx)("a",{href:"https://github.com/minio/minio/tree/master/docs/debugging?ref=con",target:"_blank",rel:"noopener",children:"documentation"}),"."]})]})}),children:(0,j.jsxs)("form",{noValidate:!0,autoComplete:"off",onSubmit:e=>{e.preventDefault(),B?E():t("/support/register")},children:[(0,j.jsx)(s.cl_,{id:"inspect_volume",name:"inspect_volume",onChange:e=>{w(e.target.value)},label:"Volume or Bucket Name",value:g,error:A,required:!0,placeholder:"test-bucket",disabled:!B}),(0,j.jsx)(s.cl_,{id:"inspect_path",name:"inspect_path",error:N,onChange:e=>{v(e.target.value)},label:"File or Path to inspect",value:y,required:!0,placeholder:"test*/xl.meta",disabled:!B}),(0,j.jsx)(s.dOG,{label:"Encrypt",indicatorLabels:["True","False"],checked:k,value:"true",id:"inspect_encrypt",name:"inspect_encrypt",onChange:()=>{z(!k)},disabled:!B}),(0,j.jsxs)(s.azJ,{sx:{display:"flex",alignItems:"center",justifyContent:"flex-end",marginTop:"55px"},children:[(0,j.jsx)(s.$nd,{id:"inspect-clear-button",style:{marginRight:"15px"},type:"button",variant:"regular","data-test-id":"inspect-clear-button",onClick:L,label:"Clear",disabled:!B}),(0,j.jsx)(s.$nd,{id:"inspect-start",type:"submit",variant:B?"callAction":"regular","data-test-id":"inspect-submit-button",disabled:!F||!B,label:"Inspect"})]})]})}):(0,j.jsx)(x.A,{iconComponent:(0,j.jsx)(s.nTF,{}),entity:"Inspect"}),C?(0,j.jsx)(p.A,{modalOpen:!0,title:"Inspect Decryption Key",onClose:()=>{(0,o.Yj)(S),T(""),L()},titleIcon:(0,j.jsx)(s.aJN,{}),children:(0,j.jsxs)(n.Fragment,{children:[(0,j.jsxs)(s.azJ,{children:["This will be displayed only once. It cannot be recovered.",(0,j.jsx)("br",{}),"Use secure medium to share this key."]}),(0,j.jsx)("form",{noValidate:!0,onSubmit:()=>!1,children:(0,j.jsx)(m.A,{value:C})})]})}):null]})]})}},49501:(e,t,a)=>{a.d(t,{A:()=>l});var n=a(65043),s=a(89923),i=a(70579);const l=e=>{let{value:t}=e;const[a,l]=(0,n.useState)(!1);return(0,i.jsxs)(s.azJ,{sx:{display:"flex",alignItems:"center",flexFlow:"row",["@media (max-width: ".concat(s.nmC.sm,"px)")]:{flexFlow:"column"}},children:[(0,i.jsx)(s.cl_,{id:"inspect-dec-key",name:"inspect-dec-key",placeholder:"",label:"",type:a?"text":"password",onChange:()=>{},value:t,overlayIcon:(0,i.jsx)(s.TdU,{}),readOnly:!0,overlayAction:()=>navigator.clipboard.writeText(t)}),(0,i.jsx)(s.$nd,{id:"show-hide-key",style:{marginLeft:"10px"},variant:"callAction",onClick:()=>l(!a),label:"Show/Hide"})]})}}}]);
-//# sourceMappingURL=2166.bb4ae347.chunk.js.map
\ No newline at end of file
diff --git a/web-app/build/static/js/2166.bb4ae347.chunk.js.map b/web-app/build/static/js/2166.bb4ae347.chunk.js.map
deleted file mode 100644
index 00dcca066..000000000
--- a/web-app/build/static/js/2166.bb4ae347.chunk.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"static/js/2166.bb4ae347.chunk.js","mappings":"uJAwBA,MAuCA,EAvCwBA,IAAkD,IAAjD,cAAEC,EAAa,OAAEC,GAA0BF,EAClE,OACEG,EAAAA,EAAAA,KAACC,EAAAA,IAAI,CAACC,WAAS,EAAAC,UACbH,EAAAA,EAAAA,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V,CAAC,sBAADT,OAAuBM,EAAAA,IAAYC,GAAE,QAAQ,CAC3CE,SAAU,WAEZd,SAAA,EAEFH,EAAAA,EAAAA,KAACqI,EAAAA,IAAQ,CACPC,GAAG,kBACHC,KAAK,kBACLK,YAAY,GACZxC,MAAM,GACNiD,KAAMY,EAAQ,OAAS,WACvBzB,SAAUA,OACVC,MAAOA,EACP0B,aAAanK,EAAAA,EAAAA,KAACoK,EAAAA,IAAQ,IACtBC,UAAU,EACVC,cAAeA,IAAMC,UAAUC,UAAUC,UAAUhC,MAGrDzI,EAAAA,EAAAA,KAACmJ,EAAAA,IAAM,CACLb,GAAI,gBACJc,MAAO,CACL7B,WAAY,QAEd+B,QAAQ,aACRC,QAASA,IAAMW,GAAUD,GACzB7D,MAAO,gBAEL,C","sources":["screens/Console/Common/DistributedOnly/DistributedOnly.tsx","screens/Console/Tools/Inspect.tsx","screens/Console/Tools/KeyRevealer.tsx"],"sourcesContent":["// This file is part of MinIO Console Server\n// Copyright (c) 2021 MinIO, Inc.\n//\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU Affero General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU Affero General Public License for more details.\n//\n// You should have received a copy of the GNU Affero General Public License\n// along with this program. If not, see .\n\nimport React from \"react\";\nimport { HelpBox, Box, Grid, breakPoints } from \"mds\";\n\ninterface IDistributedOnly {\n iconComponent: any;\n entity: string;\n}\n\nconst DistributedOnly = ({ iconComponent, entity }: IDistributedOnly) => {\n return (\n \n \n \n \n This feature is not available for a single-disk setup. \n \n \n Please deploy a server in{\" \"}\n \n Distributed Mode\n {\" \"}\n to use this feature.\n \n \n }\n />\n \n \n );\n};\n\nexport default DistributedOnly;\n","// This file is part of MinIO Console Server\n// Copyright (c) 2022 MinIO, Inc.\n//\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU Affero General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU Affero General Public License for more details.\n//\n// You should have received a copy of the GNU Affero General Public License\n// along with this program. If not, see .\n\nimport React, { Fragment, useEffect, useState } from \"react\";\nimport {\n Box,\n breakPoints,\n Button,\n FormLayout,\n HelpBox,\n InputBox,\n InspectMenuIcon,\n PageLayout,\n PasswordKeyIcon,\n Switch,\n} from \"mds\";\nimport { useNavigate } from \"react-router-dom\";\nimport { useSelector } from \"react-redux\";\nimport {\n deleteCookie,\n encodeURLString,\n getCookieValue,\n performDownload,\n} from \"../../../common/utils\";\nimport {\n selDistSet,\n setErrorSnackMessage,\n setHelpName,\n} from \"../../../systemSlice\";\nimport { useAppDispatch } from \"../../../store\";\nimport { registeredCluster } from \"../../../config\";\nimport ModalWrapper from \"../Common/ModalWrapper/ModalWrapper\";\nimport DistributedOnly from \"../Common/DistributedOnly/DistributedOnly\";\nimport KeyRevealer from \"./KeyRevealer\";\nimport RegisterCluster from \"../Support/RegisterCluster\";\nimport PageHeaderWrapper from \"../Common/PageHeaderWrapper/PageHeaderWrapper\";\nimport HelpMenu from \"../HelpMenu\";\n\nconst ExampleBlock = ({\n volumeVal,\n pathVal,\n}: {\n volumeVal: string;\n pathVal: string;\n}) => {\n return (\n \n \n \n {volumeVal}\n \n \n \n {pathVal}\n \n \n \n );\n};\n\nconst Inspect = () => {\n const dispatch = useAppDispatch();\n const navigate = useNavigate();\n const distributedSetup = useSelector(selDistSet);\n\n const [volumeName, setVolumeName] = useState(\"\");\n const [inspectPath, setInspectPath] = useState(\"\");\n const [isEncrypt, setIsEncrypt] = useState(true);\n\n const [decryptionKey, setDecryptionKey] = useState(\"\");\n\n const [insFileName, setInsFileName] = useState(\"\");\n\n const [isFormValid, setIsFormValid] = useState(false);\n const [volumeError, setVolumeError] = useState(\"\");\n const [pathError, setPathError] = useState(\"\");\n const clusterRegistered = registeredCluster();\n /**\n * Validation Effect\n */\n useEffect(() => {\n let isVolValid;\n let isPathValid;\n\n isVolValid = volumeName.trim().length > 0;\n if (!isVolValid) {\n setVolumeError(\"This field is required\");\n } else if (volumeName.slice(0, 1) === \"/\") {\n isVolValid = false;\n setVolumeError(\"Volume/Bucket name cannot start with /\");\n }\n isPathValid = inspectPath.trim().length > 0;\n if (!inspectPath) {\n setPathError(\"This field is required\");\n } else if (inspectPath.slice(0, 1) === \"/\") {\n isPathValid = false;\n setPathError(\"Path cannot start with /\");\n }\n const isValid = isVolValid && isPathValid;\n\n if (isVolValid) {\n setVolumeError(\"\");\n }\n if (isPathValid) {\n setPathError(\"\");\n }\n\n setIsFormValid(isValid);\n }, [volumeName, inspectPath]);\n\n const makeRequest = async (url: string) => {\n return await fetch(url, { method: \"GET\" });\n };\n\n const performInspect = async () => {\n const file = encodeURLString(inspectPath);\n const volume = encodeURLString(volumeName);\n\n let basename = document.baseURI.replace(window.location.origin, \"\");\n const urlOfInspectApi = `${basename}/api/v1/admin/inspect?volume=${volume}&file=${file}&encrypt=${isEncrypt}`;\n\n makeRequest(urlOfInspectApi)\n .then(async (res) => {\n if (!res.ok) {\n const resErr: any = await res.json();\n\n dispatch(\n setErrorSnackMessage({\n errorMessage: resErr.message,\n detailedError: resErr.code,\n }),\n );\n }\n const blob: Blob = await res.blob();\n\n //@ts-ignore\n const filename = res.headers.get(\"content-disposition\").split('\"')[1];\n const decryptKey = getCookieValue(filename) || \"\";\n\n performDownload(blob, filename);\n setInsFileName(filename);\n setDecryptionKey(decryptKey);\n })\n .catch((err) => {\n dispatch(setErrorSnackMessage(err));\n });\n };\n\n const resetForm = () => {\n setVolumeName(\"\");\n setInspectPath(\"\");\n setIsEncrypt(true);\n };\n\n const onCloseDecKeyModal = () => {\n deleteCookie(insFileName);\n setDecryptionKey(\"\");\n resetForm();\n };\n\n useEffect(() => {\n dispatch(setHelpName(\"inspect\"));\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, []);\n\n return (\n \n } />\n\n \n {!clusterRegistered && }\n {!distributedSetup ? (\n }\n entity={\"Inspect\"}\n />\n ) : (\n }\n help={\n \n \n Examples:\n \n\n \n \n \n
\n To Download 'xl.meta' for a specific object from all\n the drives in a zip file:\n
\n \n\n \n \n\n \n \n
\n To Download all constituent parts for a specific\n object, and optionally encrypt the downloaded zip:\n
\n \n\n \n \n \n \n
\n To Download recursively all objects at a prefix.\n \n NOTE: This can be an expensive operation use it with\n caution.\n
\n \n \n \n \n\n \n You can learn more at our{\" \"}\n \n documentation\n \n .\n \n \n }\n />\n }\n >\n \n \n )}\n {decryptionKey ? (\n }\n >\n \n \n This will be displayed only once. It cannot be recovered.\n \n Use secure medium to share this key.\n \n \n \n \n ) : null}\n \n \n );\n};\n\nexport default Inspect;\n","// This file is part of MinIO Console Server\n// Copyright (c) 2022 MinIO, Inc.\n//\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU Affero General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU Affero General Public License for more details.\n//\n// You should have received a copy of the GNU Affero General Public License\n// along with this program. If not, see .\n\nimport React, { useState } from \"react\";\nimport { Button, CopyIcon, InputBox, Box, breakPoints } from \"mds\";\n\nconst KeyRevealer = ({ value }: { value: string }) => {\n const [shown, setShown] = useState(false);\n\n return (\n \n {}}\n value={value}\n overlayIcon={}\n readOnly={true}\n overlayAction={() => navigator.clipboard.writeText(value)}\n />\n\n setShown(!shown)}\n label={\"Show/Hide\"}\n />\n \n );\n};\n\nexport default KeyRevealer;\n"],"names":["_ref","iconComponent","entity","_jsx","Grid","container","children","item","xs","HelpBox","title","concat","help","_jsxs","Box","sx","fontSize","breakPoints","sm","display","flexFlow","href","target","rel","ExampleBlock","volumeVal","pathVal","className","marginBottom","Inspect","dispatch","useAppDispatch","navigate","useNavigate","distributedSetup","useSelector","selDistSet","volumeName","setVolumeName","useState","inspectPath","setInspectPath","isEncrypt","setIsEncrypt","decryptionKey","setDecryptionKey","insFileName","setInsFileName","isFormValid","setIsFormValid","volumeError","setVolumeError","pathError","setPathError","clusterRegistered","registeredCluster","useEffect","isVolValid","isPathValid","trim","length","slice","isValid","performInspect","async","file","encodeURLString","volume","basename","document","baseURI","replace","window","location","origin","fetch","url","method","makeRequest","then","res","ok","resErr","json","setErrorSnackMessage","errorMessage","message","detailedError","code","blob","filename","headers","get","split","decryptKey","getCookieValue","performDownload","catch","err","resetForm","setHelpName","Fragment","PageHeaderWrapper","label","actions","HelpMenu","PageLayout","RegisterCluster","compactMode","FormLayout","helpBox","InspectMenuIcon","marginTop","fontWeight","fontStyle","flex","content","height","width","backgroundColor","marginRight","flexShrink","marginLeft","color","paddingLeft","fontFamily","paddingRight","paddingTop","paddingBottom","borderRadius","border","noValidate","autoComplete","onSubmit","e","preventDefault","InputBox","id","name","onChange","value","error","required","placeholder","disabled","Switch","indicatorLabels","checked","alignItems","justifyContent","Button","style","type","variant","onClick","DistributedOnly","ModalWrapper","modalOpen","onClose","onCloseDecKeyModal","deleteCookie","titleIcon","PasswordKeyIcon","KeyRevealer","shown","setShown","overlayIcon","CopyIcon","readOnly","overlayAction","navigator","clipboard","writeText"],"sourceRoot":""}
\ No newline at end of file
diff --git a/web-app/build/static/js/2959.c4f178f1.chunk.js b/web-app/build/static/js/2959.c4f178f1.chunk.js
deleted file mode 100644
index 632c34fe9..000000000
--- a/web-app/build/static/js/2959.c4f178f1.chunk.js
+++ /dev/null
@@ -1,2 +0,0 @@
-(self.webpackChunkweb_app=self.webpackChunkweb_app||[]).push([[2959,614],{30614:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>h});var s=n(65043),o=n(94141),a=n(89923),i=n(56629),l=n(53518),r=n(77403),c=n(64159),d=n(20554),u=n(70579);const h=e=>{let{modalOpen:t,onClose:n,bucket:h,prefilledRoute:x}=e;const m=(0,d.jL)(),[p,j]=(0,s.useState)(""),[b,g]=(0,s.useState)("readonly");(0,s.useEffect)((()=>{x&&j(x)}),[x]);return(0,u.jsx)(o.A,{modalOpen:t,title:"Add Anonymous Access Rule",onClose:n,titleIcon:(0,u.jsx)(a.No_,{}),children:(0,u.jsxs)(a.Hbc,{withBorders:!1,containerPadding:!1,children:[(0,u.jsx)(a.cl_,{value:p,label:"Prefix",id:"prefix",name:"prefix",placeholder:"Enter Prefix",onChange:e=>{j(e.target.value)},tooltip:"Enter '/' to apply the rule to all prefixes and objects at the bucket root. Do not include the wildcard asterisk '*' as part of the prefix *unless* it is an explicit part of the prefix name. The Console automatically appends an asterisk to the appropriate sections of the resulting IAM policy."}),(0,u.jsx)(a.l6P,{id:"access",name:"Access",onChange:e=>{g(e)},label:"Access",value:b,options:[{label:"readonly",value:"readonly"},{label:"writeonly",value:"writeonly"},{label:"readwrite",value:"readwrite"}],disabled:!1,helpTip:(0,u.jsx)(s.Fragment,{children:"Select the desired level of access available to unauthenticated Users"}),helpTipPlacement:"right"}),(0,u.jsxs)(a.xA9,{item:!0,xs:12,sx:r.Uz.modalButtonBar,children:[(0,u.jsx)(a.$nd,{id:"clear",type:"button",variant:"regular",onClick:()=>{j(""),g("readonly")},label:"Clear"}),(0,u.jsx)(a.$nd,{id:"add-access-save",type:"submit",variant:"callAction",disabled:""===p.trim(),onClick:()=>{i.F.bucket.setAccessRuleWithBucket(h,{prefix:p,access:b}).then((e=>{m((0,c.Hk)("Access Rule added successfully")),n()})).catch((e=>{m((0,c.C9)((0,l.S)(e.error))),n()}))},label:"Save"})]})]})})}},27945:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>Me});var s=n(65043),o=n(22166),a=n(73216),i=n(56629),l=n(20554),r=n(99161),c=n(56483),d=n(6035),u=n(33097),h=n.n(u),x=n(89923),m=n(53518),p=n(94281),j=n(24241),b=n(61476),g=n.n(b),f=n(94574),v=n(35475),_=n(77938),S=n(72237),O=n(64159);const w=e=>(e.match(/\.([^.]*?)(?=\?|#|$)/)||[])[1],T=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];const s=Object.keys(e).reduce(((n,s)=>(w(s)&&s.includes(t)&&(n[s]=e[s]),n)),{});return Object.keys(s).filter((e=>{const o=s[e].some((e=>n.find((t=>{let n=!1;if(-1!==t.indexOf("*")){const s=t.substring(0,t.length-1);n=e.includes(s)}return n||e===t})))),a=e.substring(0,e.indexOf("/*."))==="arn:aws:s3:::".concat(t);return o&&(a&&"arn:aws:s3:::*"!==e)}))};var y=n(70579);const C=(0,S.A)(s.lazy((()=>n.e(7774).then(n.bind(n,97774))))),E=f.Ay.div((()=>({display:"flex","& .additionalOptions":{paddingRight:"10px",display:"flex",alignItems:"center",["@media (max-width: ".concat(x.nmC.lg,"px)")]:{display:"none"}},"& .slashSpacingStyle":{margin:"0 5px"}}))),N=e=>{let{bucketName:t,internalPaths:n,hidePathButton:i,additionalOptions:u}=e;const h=(0,l.jL)(),m=(0,a.Zp)(),p=(0,o.d4)((e=>e.objectBrowser.rewind.rewindEnabled)),j=(0,o.d4)((e=>e.objectBrowser.versionsMode)),b=(0,o.d4)((e=>e.objectBrowser.versionedFile)),f=(0,o.d4)((e=>e.system.anonymousMode)),[S,w]=(0,s.useState)(!1),[N,A]=(0,s.useState)(!1),I=[r.OV.S3_PUT_OBJECT,r.OV.S3_PUT_ACTIONS],k=(0,o.d4)((e=>e.console.session&&e.console.session.permissions||{}));let B=n;""!==n&&(B="/".concat(n));const F=B.split("/").filter((e=>""!==e)),L=F.length-1,V=t+B||t,D=T(k,V,I);(0,s.useEffect)((()=>{A(!1),Object.keys(k).forEach((e=>{e.includes(V)&&e.includes("/*")&&A(!0)}))}),[V,n,k]);const P=(0,_._)([V,...D],I)||f||N;let R=F.map(((e,n)=>{const o="".concat(F.slice(0,n+1).join("/"),"/"),a="/browser/".concat(t,"/").concat(o?"".concat((0,c.nf)(o)):"");return n===L&&e===b?null:(0,y.jsxs)(s.Fragment,{children:[(0,y.jsx)("span",{className:"slashSpacingStyle",children:"/"}),n===L?(0,y.jsx)("span",{style:{cursor:"default",whiteSpace:"pre"},children:(0,c.Tw)(e)}):(0,y.jsx)(v.N_,{style:{whiteSpace:"pre"},to:a,onClick:()=>{h((0,d.cQ)({status:!1,objectName:""}))},children:(0,c.Tw)(e)})]},"breadcrumbs-".concat(n.toString()))})),U=[];j&&(U=[(0,y.jsx)(s.Fragment,{children:(0,y.jsxs)("span",{children:[(0,y.jsx)("span",{className:"slashSpacingStyle",children:"/"}),b," - Versions"]})},"breadcrumbs-versionedItem")]);const z=[(0,y.jsx)(s.Fragment,{children:(0,y.jsx)(v.N_,{to:"/browser/".concat(t),onClick:()=>{h((0,d.cQ)({status:!1,objectName:""}))},children:t})},"breadcrumbs-root-path"),...R,...U];return(0,y.jsxs)(s.Fragment,{children:[(0,y.jsxs)(E,{children:[S&&(0,y.jsx)(C,{modalOpen:S,bucketName:t,folderName:n,onClose:()=>{w(!1)},limitedSubPath:N&&!((0,_._)([V,...D],I)||f)}),(0,y.jsx)(x.BIu,{sx:{whiteSpace:"pre"},goBackFunction:()=>{if(j)h((0,d.cQ)({status:!1,objectName:""}));else{if(0===F.length)return void m("/browser");const e=F.slice(0,-1);m("/browser/".concat(t).concat(e.length>0?"/".concat((0,c.nf)("".concat(e.join("/"),"/"))):""))}},additionalOptions:(0,y.jsxs)(s.Fragment,{children:[(0,y.jsx)(g(),{text:"".concat(t,"/").concat(F.join("/")),children:(0,y.jsx)(x.$nd,{id:"copy-path",icon:(0,y.jsx)(x.TdU,{style:{width:"12px",height:"12px",fill:"#969FA8",marginTop:-1}}),variant:"regular",onClick:()=>{h((0,O.Hk)("Path copied to clipboard"))},style:{width:"28px",height:"28px",color:"#969FA8",border:"#969FA8 1px solid",marginRight:5}})}),(0,y.jsx)(x.azJ,{className:"additionalOptions",children:u})]}),children:z}),!i&&(0,y.jsx)(x.m_M,{tooltip:P?"Choose or create a new path":(0,r.vj)([r.OV.S3_PUT_OBJECT,r.OV.S3_PUT_ACTIONS],"create a new path"),children:(0,y.jsx)(x.$nd,{id:"new-path",onClick:()=>{w(!0)},disabled:!f&&(p||!P),icon:(0,y.jsx)(x.pj3,{style:{fill:"#969FA8"}}),style:{whiteSpace:"nowrap"},variant:"regular",label:"Create new path"})})]}),(0,y.jsx)(x.azJ,{sx:{display:"none",marginTop:15,marginBottom:5,justifyContent:"flex-start","& > div":{fontSize:12,fontWeight:"normal",flexDirection:"row",flexWrap:"nowrap"},["@media (max-width: ".concat(x.nmC.lg,"px)")]:{display:"flex"}},children:u})]})};var A=n(93445);const I=e=>"Enabled"===e||"Suspended"===e;var k=n(37414),B=n(39947),F=n(81708),L=n(6681);const V=e=>{let{uploadPath:t,bucketName:n,forceDisable:a=!1,uploadFileFunction:i,uploadFolderFunction:l,overrideStyles:c={}}=e;const[d,u]=(0,s.useState)(null),[h,m]=(0,s.useState)(!1),p=(0,o.d4)((e=>e.system.anonymousMode)),j=(0,o.d4)((e=>e.console.session&&e.console.session.permissions||{})),b=[r.OV.S3_PUT_OBJECT,r.OV.S3_PUT_ACTIONS],g=T(j,t,b),f=Boolean(d),v=()=>{u(null)},S=(0,_._)([t,...g],b)||p,O=(0,_._)([n,...g],b,!1,!0),w=S||O;return(0,y.jsxs)(s.Fragment,{children:[(0,y.jsx)(L.A,{tooltip:w?"Upload Files":(0,r.vj)([r.OV.S3_PUT_OBJECT,r.OV.S3_PUT_ACTIONS],"upload files to this bucket"),children:(0,y.jsx)(x.$nd,{id:"upload-main","aria-controls":"upload-main-menu","aria-haspopup":"true","aria-expanded":f?"true":void 0,onClick:e=>{m(!h),u(e.currentTarget)},label:"Upload",icon:(0,y.jsx)(x.JMY,{}),variant:"callAction",disabled:a||!w,sx:c})}),(0,y.jsx)(x.Vey,{id:"upload-main-menu",options:[{label:"Upload File",icon:(0,y.jsx)(x.JMY,{}),value:"file",disabled:!S||a},{label:"Upload Folder",icon:(0,y.jsx)(x.nDF,{}),value:"folder",disabled:!O||a}],selectedOption:"",onSelect:e=>{"folder"!==e?i(v):l(v)},hideTriggerAction:()=>{m(!1)},open:h,anchorEl:d,anchorOrigin:"end",useAnchorWidth:!0})]})},D=e=>{let{open:t,closePanel:n,className:s="",children:o}=e;return(0,y.jsxs)(x.azJ,{id:"details-panel",sx:{borderColor:"#EAEDEE",borderWidth:0,borderStyle:"solid",borderRadius:3,borderBottomLeftRadius:0,borderBottomRightRadius:0,width:0,transitionDuration:"0.3s",overflowX:"hidden",overflowY:"auto",position:"relative",opacity:0,marginLeft:-1,"&.open":{width:300,minWidth:300,borderLeftWidth:1,opacity:1},"@media (max-width: 799px)":{"&.open":{width:"100%",minWidth:"100%",borderLeftWidth:0}}},className:"".concat(t?"open":""," ").concat(s),children:[(0,y.jsx)(x.$nd,{variant:"text",id:"close-details-list",onClick:n,icon:(0,y.jsx)(x._FR,{}),sx:{position:"absolute",right:5,top:18,padding:0,height:14,"&:hover:not(:disabled)":{backgroundColor:"transparent"}}}),o]})};var P=n(48245);const R=e=>{let{icon:t,strings:n}=e;return(0,y.jsxs)(x.azJ,{sx:{display:"flex",alignItems:"center","& .min-icon":{width:16,height:16,marginRight:4,minWidth:16,minHeight:16},"& .fileNameText":{whiteSpace:"pre",overflow:"hidden",textOverflow:"ellipsis"}},children:[t,(0,y.jsx)("span",{className:"fileNameText",children:(0,c.qf)(n[n.length-1])})]})},U=[{icon:(0,y.jsx)(x.FRZ,{}),extensions:["mp4","mov","avi","mpeg","mpg"]},{icon:(0,y.jsx)(x.jCy,{}),extensions:["mp3","m4a","aac"]},{icon:(0,y.jsx)(x.yTC,{}),extensions:["pdf"]},{icon:(0,y.jsx)(x.QvW,{}),extensions:["ppt","pptx"]},{icon:(0,y.jsx)(x.z9t,{}),extensions:["xls","xlsx"]},{icon:(0,y.jsx)(x.VSs,{}),extensions:["cer","crt","pem"]},{icon:(0,y.jsx)(x.bM2,{}),extensions:["html","xml","css","py","go","php","cpp","h","java"]},{icon:(0,y.jsx)(x.qM2,{}),extensions:["cfg","yaml"]},{icon:(0,y.jsx)(x.ITz,{}),extensions:["sql"]},{icon:(0,y.jsx)(x.PcO,{}),extensions:["ttf","otf"]},{icon:(0,y.jsx)(x.yEV,{}),extensions:["doc","docx","txt","rtf"]},{icon:(0,y.jsx)(x.j_m,{}),extensions:["zip","rar","tar","gz"]},{icon:(0,y.jsx)(x.DUd,{}),extensions:["epub","mobi","azw","azw3"]},{icon:(0,y.jsx)(x.nLN,{}),extensions:["jpeg","jpg","gif","tiff","png","heic","dng"]}],z=function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=e,s=(0,y.jsx)(x.KlI,{});e.endsWith("/")&&(s=(0,y.jsx)(x.kez,{}),n=e.slice(0,-1));const o=e.toLowerCase();for(const i of U)for(const e of i.extensions)o.endsWith(".".concat(e))&&(s=i.icon);!e.endsWith("/")&&e.indexOf(".")<0&&(s=(0,y.jsx)(x.YJK,{}));const a=n.split("/");return t?s:(0,y.jsx)(R,{icon:s,strings:a})};var G=n(37524);const M=e=>{let{metaData:t}=e;const n=Object.keys(t);return(0,y.jsx)(s.Fragment,{children:n.map(((e,n)=>{const s=(e=>Array.isArray(e)?e.map(c.Tw).join(", "):(0,c.Tw)(e))(t[e]);return(0,y.jsxs)(x.azJ,{sx:{marginBottom:15,fontSize:14,maxHeight:180,overflowY:"auto"},children:[(0,y.jsx)("strong",{children:e}),(0,y.jsx)("br",{}),s]},"box-meta-".concat(e,"-").concat(n.toString()))}))})};var J=n(30718),K=n(85330),W=n(77403);const H=[{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"}],Y=Array.from(Array(31),((e,t)=>({value:(t+1).toString(),label:(t+1).toString()}))),$=(new Date).getFullYear(),Z=Array.from(Array(50),((e,t)=>({value:(t+$).toString(),label:(t+$).toString()})));var q=n(94141);const Q=(0,s.forwardRef)(((e,t)=>{let{id:n,label:o,disableOptions:a=!1,tooltip:i="",borderBottom:l=!1,onDateChange:r,value:c=""}=e;(0,s.useImperativeHandle)(t,(()=>({resetDate:b})));const[d,u]=(0,s.useState)(""),[h,m]=(0,s.useState)(""),[p,j]=(0,s.useState)("");(0,s.useEffect)((()=>{if(""!==c){const e=c.split("-");j(e[0]),u(e[1]),m("".concat(parseInt(e[2])))}}),[c]),(0,s.useEffect)((()=>{const[e,t]=((e,t,n)=>{const s=Date.parse("".concat(e,"-").concat(t,"-").concat(n));if(isNaN(s))return[!1,""];const o=parseInt(t),a=parseInt(n),i=o<10?"0".concat(o):o,l=a<10?"0".concat(a):a,r=new Date(s).toISOString().split("T")[0],c="".concat(e,"-").concat(i,"-").concat(l);return[r===c,c]})(p,d,h);r(t,e)}),[d,h,p,r]);const b=()=>{u(""),m(""),j("")},g=()=>a||!1,f=[{value:"",label:""},...H],v=[{value:"",label:""},...Y],_=[{value:"",label:""},...Z];return(0,y.jsxs)(x.azJ,{className:"inputItem",children:[(0,y.jsx)(x.azJ,{sx:{display:"flex",alignItems:"center",gap:5,marginBottom:5},children:(0,y.jsxs)(x.l1Y,{htmlFor:n,children:[(0,y.jsx)("span",{children:o}),""!==i&&(0,y.jsx)(x.azJ,{sx:{marginLeft:5,display:"flex",alignItems:"center","& .min-icon":{width:13}},children:(0,y.jsx)(x.m_M,{tooltip:i,placement:"top",children:(0,y.jsx)(x.azJ,{sx:{"& .min-icon":{width:13}},children:(0,y.jsx)(x.NTw,{})})})})]})}),(0,y.jsxs)(x.azJ,{sx:{display:"flex",gap:12},children:[(0,y.jsx)(x.l6P,{id:"".concat(n,"-month"),name:"".concat(n,"-month"),value:d,onChange:e=>{u(e)},options:f,label:"",disabled:g()}),(0,y.jsx)(x.l6P,{id:"".concat(n,"-day"),name:"".concat(n,"-day"),value:h,onChange:e=>{m(e)},options:v,label:"",disabled:g()}),(0,y.jsx)(x.l6P,{id:"".concat(n,"-year"),name:"".concat(n,"-year"),value:p,onChange:e=>{j(e)},options:_,label:"",disabled:g(),sx:{marginBottom:12}})]})]})})),X=e=>{let{open:t,closeModalAndRefresh:n,objectName:a,objectInfo:r,bucketName:d}=e;const u=(0,l.jL)(),h=(0,o.d4)((e=>e.objectBrowser.retentionConfig)),[p,j]=(0,s.useState)(!0),[b,g]=(0,s.useState)(""),[f,v]=(0,s.useState)(""),[_,S]=(0,s.useState)(!1),[w,T]=(0,s.useState)(!1),[C,E]=(0,s.useState)(!1);(0,s.useEffect)((()=>{if(r.retention_mode&&(g((null===h||void 0===h?void 0:h.mode)||K.BT.Governance),E(!0)),r.retention_until_date){const t=new Date(r.retention_until_date);if("Invalid Date"!==t.toString()){const n=t.getFullYear(),s=(e=t.getMonth()+1)<10?"0".concat(e):"".concat(e),o=t.getDate();isNaN(o)||"NaN"===s||isNaN(n)||v("".concat(n,"-").concat(s,"-").concat(o))}E(!0)}var e}),[r,null===h||void 0===h?void 0:h.mode]);const N=(0,s.useRef)(null),A=()=>{j(!1),g(K.BT.Governance),N.current&&N.current.resetDate()},I=C&&("governance"===b||""===b);return(0,y.jsx)(q.A,{title:"Set Retention Policy",modalOpen:t,onClose:()=>{A(),n(!1)},children:(0,y.jsx)("form",{noValidate:!0,autoComplete:"off",onSubmit:e=>{(e=>{e.preventDefault()})(e)},children:(0,y.jsxs)(x.Hbc,{withBorders:!1,containerPadding:!1,children:[(0,y.jsxs)(x.azJ,{className:"inputItem",children:[(0,y.jsx)("strong",{children:"Selected Object"}),": ",a]}),I&&(0,y.jsx)(x.dOG,{value:"status",id:"status",name:"status",checked:p,onChange:e=>{j(!p)},label:"Status",indicatorLabels:["Enabled","Disabled"]}),(0,y.jsx)(x.z6M,{currentValue:b,id:"type",name:"type",label:"Type",disableOptions:!p||C&&""!==b,onChange:e=>{g(e.target.value)},selectorOptions:[{label:"Governance",value:K.BT.Governance},{label:"Compliance",value:K.BT.Compliance}]}),(0,y.jsx)(Q,{id:"date",label:"Date",disableOptions:!(p&&("governance"===b||"compliance"===b)),ref:N,value:f,borderBottom:!0,onDateChange:(e,t)=>{S(t),t&&v(e)}}),(0,y.jsxs)(x.xA9,{item:!0,xs:12,sx:W.Uz.modalButtonBar,children:[(0,y.jsx)(x.$nd,{id:"reset",type:"button",variant:"regular",onClick:A,label:"Reset"}),(0,y.jsx)(x.$nd,{id:"save",type:"submit",variant:"callAction",disabled:p&&""===b||p&&!_||w,onClick:()=>{T(!0);const e=r.name||"",t=r.version_id||null,s=p||"governance"!==b?"".concat(f,"T23:59:59Z"):"";p||"governance"!==b?((e,t,s)=>{i.F.buckets.putObjectRetention(d,{prefix:(0,c.nf)(e),version_id:t||""},{expires:s,mode:b}).then((()=>{T(!1),n(!0)})).catch((e=>{u((0,O.Dy)((0,m.S)(e.error))),T(!1)}))})(e,t,s):((e,t)=>{i.F.buckets.deleteObjectRetention(d,{prefix:(0,c.nf)(e),version_id:t||""}).then((()=>{T(!1),n(!0)})).catch((e=>{u((0,O.Dy)((0,m.S)(e.error))),T(!1)}))})(e,t)},label:"Save"})]})]})})})};var ee=n(58661),te=n(25448);const ne=e=>{let{closeDeleteModalAndRefresh:t,deleteOpen:n,selectedBucket:a,selectedObject:i,versioningInfo:d,selectedVersion:u=""}=e;const h=(0,l.jL)(),[m,p]=(0,te.A)((()=>t(!0)),(e=>{h((0,O.C9)(e)),"Access Denied."===e.detailedError&&t(!0)})),[j,b]=(0,s.useState)(!1),[g,f]=(0,s.useState)(!1),v=(0,o.d4)((e=>e.objectBrowser.retentionConfig)),S=(0,_._)([a],[r.OV.S3_BYPASS_GOVERNANCE_RETENTION])&&"governance"===(null===v||void 0===v?void 0:v.mode);if(!i)return null;return(0,y.jsx)(ee.A,{title:"Delete Object",confirmText:"Delete",isOpen:n,titleIcon:(0,y.jsx)(x.xWY,{}),isLoading:m,onConfirm:()=>{const e=(0,c.x6)(i).endsWith("/");p("DELETE","/api/v1/buckets/".concat(a,"/objects?prefix=").concat(i).concat(""!==u?"&version_id=".concat(u):"&recursive=".concat(e,"&all_versions=").concat(j)).concat(g?"&bypass=true":""))},onClose:()=>t(!1),confirmationContent:(0,y.jsxs)(s.Fragment,{children:["Are you sure you want to delete: ",(0,y.jsx)("br",{}),(0,y.jsx)("b",{children:(0,c.x6)(i)})," ",""!==u?(0,y.jsxs)(s.Fragment,{children:[(0,y.jsx)("br",{}),(0,y.jsx)("br",{}),"Version ID:",(0,y.jsx)("br",{}),(0,y.jsx)("strong",{children:u})]}):"","? ",(0,y.jsx)("br",{}),(0,y.jsx)("br",{}),I(null===d||void 0===d?void 0:d.status)&&""===u&&(0,y.jsx)(s.Fragment,{children:(0,y.jsx)(x.dOG,{label:"Delete All Versions",indicatorLabels:["Yes","No"],checked:j,value:"delete_versions",id:"delete-versions",name:"delete-versions",onChange:e=>{b(!j)},description:""})}),S&&(j||""!==u)&&(0,y.jsx)(s.Fragment,{children:(0,y.jsx)("div",{style:{marginTop:10},children:(0,y.jsx)(x.dOG,{label:"Bypass Governance Mode",indicatorLabels:["Yes","No"],checked:g,value:"bypass_governance",id:"bypass_governance",name:"bypass_governance",onChange:e=>{f(!g)},description:""})})}),j&&(0,y.jsxs)(s.Fragment,{children:[(0,y.jsxs)("div",{style:{marginTop:10,border:"#c83b51 1px solid",borderRadius:3,padding:5,backgroundColor:"#c83b5120",color:"#c83b51"},children:["This will remove the object as well as all of its versions,"," ",(0,y.jsx)("br",{}),"This action is irreversible."]}),(0,y.jsx)("br",{}),"Are you sure you want to continue?"]})]})})},se=e=>{let{open:t,closeModalAndRefresh:n,objectName:o,bucketName:a,actualInfo:r}=e;const d=(0,l.jL)(),[u,p]=(0,s.useState)(!1),[j,b]=(0,s.useState)(!1),g=r.version_id;(0,s.useEffect)((()=>{const e=h()(r,"legal_hold_status","OFF");p("ON"===e)}),[r]);const f=()=>{p(!1)};return(0,y.jsx)(q.A,{title:"Set Legal Hold",modalOpen:t,onClose:()=>{f(),n(!1)},children:(0,y.jsx)("form",{noValidate:!0,autoComplete:"off",onSubmit:e=>{(e=>{e.preventDefault(),b(!0),i.F.buckets.putObjectLegalHold(a,{prefix:(0,c.nf)(o),version_id:g||""},{status:u?K.SW.Enabled:K.SW.Disabled}).then((()=>{b(!1),n(!0)})).catch((e=>{d((0,O.Dy)((0,m.S)(e.error))),b(!1)}))})(e)},children:(0,y.jsxs)(x.Hbc,{withBorders:!1,containerPadding:!1,children:[(0,y.jsxs)(x.azJ,{className:"inputItem",children:[(0,y.jsx)("strong",{children:"Object"}),": ",a]}),(0,y.jsx)(x.dOG,{value:"legalhold",id:"legalhold",name:"legalhold",checked:u,onChange:e=>{p(!u)},label:"Legal Hold Status",indicatorLabels:["Enabled","Disabled"],tooltip:"To enable this feature you need to enable versioning on the bucket before creation"}),(0,y.jsxs)(x.xA9,{item:!0,xs:12,sx:W.Uz.modalButtonBar,children:[(0,y.jsx)(x.$nd,{id:"clear",type:"button",variant:"regular",onClick:f,label:"Clear"}),(0,y.jsx)(x.$nd,{id:"save",type:"submit",variant:"callAction",disabled:j,label:" Save"})]})]})})})},oe=f.Ay.b((e=>{let{theme:t}=e;return{color:h()(t,"signalColors.danger","#C83B51"),marginLeft:5}})),ae=e=>{var t;let{modalOpen:n,onCloseAndUpdate:a,bucketName:d,actualInfo:u}=e;const p=(0,l.jL)(),j=(0,o.d4)(O.Rq),[b,g]=(0,s.useState)(""),[f,v]=(0,s.useState)(""),[S,w]=(0,s.useState)(!1),[T,C]=(0,s.useState)(!1),[E,N]=(0,s.useState)(""),[A,I]=(0,s.useState)(""),k=(0,c.nf)(u.name||""),B=u.tags,F=Object.keys(B||{}),L=null===(t=u.name)||void 0===t?void 0:t.split("/"),V=(null===L||void 0===L?void 0:L.pop())||"",D=e=>(0,y.jsxs)(x.azJ,{sx:{fontSize:16,margin:"20px 0 30px",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",width:"100%"},children:["Tag",e?"s":""," for: ",(0,y.jsx)("strong",{children:V})]});return(0,y.jsx)(s.Fragment,{children:(0,y.jsx)(q.A,{modalOpen:n,title:T?"Delete Tag":"Edit Tags",onClose:()=>{a(!0)},iconColor:T?"delete":"default",titleIcon:T?(0,y.jsx)(x.aaC,{}):(0,y.jsx)(x.cGQ,{}),children:T?(0,y.jsx)(s.Fragment,{children:(0,y.jsxs)(x.xA9,{container:!0,children:[D(!1),"Are you sure you want to delete the tag"," ",(0,y.jsxs)(oe,{children:[E," : ",A]})," ","?",(0,y.jsxs)(x.xA9,{item:!0,xs:12,sx:W.Uz.modalButtonBar,children:[(0,y.jsx)(x.$nd,{id:"cancel",type:"button",variant:"regular",onClick:()=>{N(""),I(""),C(!1)},label:"Cancel"}),(0,y.jsx)(x.$nd,{type:"submit",variant:"secondary",onClick:()=>{const e={...B};delete e[E];const t=j?u.version_id||"":"null";i.F.buckets.putObjectTags(d,{prefix:k,version_id:t},{tags:e}).then((()=>{a(!0),w(!1)})).catch((e=>{p((0,O.Dy)((0,m.S)(e.error))),w(!1)}))},id:"deleteTag",label:"Delete Tag"})]})]})}):(0,y.jsxs)(x.azJ,{children:[(0,y.jsx)(_.R,{scopes:[r.OV.S3_GET_OBJECT_TAGGING,r.OV.S3_GET_ACTIONS],resource:d,children:(0,y.jsxs)(x.azJ,{sx:{display:"flex",flexFlow:"column",width:"100%"},children:[D(!0),(0,y.jsxs)(x.azJ,{sx:{fontSize:14,fontWeight:"normal"},children:["Current Tags:",(0,y.jsx)("br",{}),0===F.length?(0,y.jsx)("span",{className:"muted",children:"There are no tags for this object"}):(0,y.jsx)(s.Fragment,{}),(0,y.jsx)(x.azJ,{sx:{marginTop:"5px",marginBottom:"15px"},children:F.map(((e,t)=>{const n=h()(B,"".concat(e),"");return""!==n?(0,y.jsx)(_.R,{scopes:[r.OV.S3_DELETE_OBJECT_TAGGING],resource:d,errorProps:{deleteIcon:null,onDelete:null},children:(0,y.jsx)(x.vwO,{id:"".concat(e," : ").concat(n),label:"".concat(e," : ").concat(n),variant:"regular",color:"default",onDelete:()=>{((e,t)=>{N(e),I(t),C(!0)})(e,n)}})},"chip-".concat(t)):null}))})]})]})}),(0,y.jsx)(_.R,{scopes:[r.OV.S3_PUT_OBJECT_TAGGING,r.OV.S3_PUT_ACTIONS],resource:d,errorProps:{disabled:!0,onClick:null},children:(0,y.jsxs)(x.azJ,{children:[(0,y.jsx)(x._xt,{icon:(0,y.jsx)(x.b_$,{}),separator:!1,children:"Add New Tag"}),(0,y.jsxs)(x.Hbc,{containerPadding:!1,withBorders:!1,children:[(0,y.jsx)(x.cl_,{value:b,label:"Tag Key",id:"newTagKey",name:"newTagKey",placeholder:"Enter Tag Key",onChange:e=>{g(e.target.value)}}),(0,y.jsx)(x.cl_,{value:f,label:"Tag Label",id:"newTagLabel",name:"newTagLabel",placeholder:"Enter Tag Label",onChange:e=>{v(e.target.value)}}),(0,y.jsxs)(x.xA9,{item:!0,xs:12,sx:W.Uz.modalButtonBar,children:[(0,y.jsx)(x.$nd,{id:"clear",type:"button",variant:"regular",color:"primary",onClick:()=>{v(""),g("")},label:"Clear"}),(0,y.jsx)(x.$nd,{type:"submit",variant:"callAction",disabled:""===f.trim()||""===b.trim()||S,onClick:()=>{w(!0);const e={};e[b]=f;const t={...B,...e},n=j?u.version_id||"":"null";i.F.buckets.putObjectTags(d,{prefix:k,version_id:n},{tags:t}).then((()=>{a(!0),w(!1)})).catch((e=>{p((0,O.Dy)((0,m.S)(e.error))),w(!1)}))},id:"saveTag",label:"Save"})]})]})]})})]})})})};var ie=n(49501);const le=e=>{let{closeInspectModalAndRefresh:t,inspectOpen:n,inspectPath:o,volumeName:a}=e;const i=(0,l.jL)(),r=()=>t(!1),[d,u]=(0,s.useState)(!0),[h,m]=(0,s.useState)(""),[p,j]=(0,s.useState)("");if(!o)return null;return(0,y.jsxs)(s.Fragment,{children:[!h&&(0,y.jsx)(q.A,{modalOpen:n,titleIcon:(0,y.jsx)(x.nTF,{}),title:"Inspect Object",onClose:r,children:(0,y.jsxs)("form",{noValidate:!0,autoComplete:"off",onSubmit:e=>{(e=>{e.preventDefault()})(e)},children:["Would you like to encrypt ",(0,y.jsx)("b",{children:(0,c.x6)(o)}),"?"," ",(0,y.jsx)("br",{}),(0,y.jsx)(x.dOG,{label:"Encrypt",indicatorLabels:["Yes","No"],checked:d,value:"encrypt",id:"encrypt",name:"encrypt",onChange:e=>{u(!d)},description:""}),(0,y.jsx)(x.xA9,{item:!0,xs:12,sx:W.Uz.modalButtonBar,children:(0,y.jsx)(x.$nd,{id:"inspect",type:"submit",variant:"callAction",color:"primary",onClick:async()=>{const e=(0,c.nf)(o+"/xl.meta"),t=(0,c.nf)(a);let n=document.baseURI.replace(window.location.origin,"");(async e=>await fetch(e,{method:"GET"}))("".concat(window.location.origin).concat(n,"/api/v1/admin/inspect?volume=").concat(t,"&file=").concat(e,"&encrypt=").concat(d)).then((async e=>{if(!e.ok){const t=await e.json();i((0,O.C9)({errorMessage:t.message,detailedError:t.code}))}const t=await e.blob(),n=e.headers.get("content-disposition").split('"')[1],s=(0,c.UM)(n)||"";(0,c.OT)(t,n),j(n),""!==s?m(s):r()})).catch((e=>{i((0,O.C9)(e))}))},label:"Inspect"})})]})}),h?(0,y.jsxs)(q.A,{modalOpen:n,title:"Inspect Decryption Key",onClose:()=>{(0,c.Yj)(p),r(),m("")},titleIcon:(0,y.jsx)(x.aJN,{}),children:[(0,y.jsxs)(x.azJ,{children:["This will be displayed only once. It cannot be recovered.",(0,y.jsx)("br",{}),"Use secure medium to share this key."]}),(0,y.jsx)(x.azJ,{children:(0,y.jsx)(ie.A,{value:h})})]}):null]})},re=e=>{let{open:t,closeModal:n,currentItem:o,internalPaths:a,actualInfo:i,bucketName:r}=e;const c=(0,l.jL)(),[d,u]=(0,s.useState)(o),[h,m]=(0,s.useState)(!1);return(0,y.jsxs)(q.A,{title:"Rename Download",modalOpen:t,onClose:n,titleIcon:(0,y.jsx)(x.qUP,{}),children:[(0,y.jsxs)("div",{children:["The file you are trying to download has a long name.",(0,y.jsx)("br",{}),"This can cause issues on Windows Systems by trimming the file name after download.",(0,y.jsx)("br",{}),(0,y.jsx)("br",{})," We recommend to rename the file download"]}),(0,y.jsx)("form",{noValidate:!0,autoComplete:"off",onSubmit:e=>{(e=>{e.preventDefault(),(0,P._)(c,r,a,i),n()})(e)},children:(0,y.jsxs)(x.Hbc,{withBorders:!1,containerPadding:!1,children:[(0,y.jsx)(x.cl_,{id:"download-filename",name:"download-filename",onChange:e=>{u(e.target.value)},label:"",type:"text",value:d,error:d.length>200&&!h?"Filename should be less than 200 characters long.":""}),(0,y.jsx)(x.dOG,{value:"acceptLongName",id:"acceptLongName",name:"acceptLongName",checked:h,onChange:e=>{m(e.target.checked),e.target.checked&&u(o)},label:"Use Original Name"}),(0,y.jsx)(x.xA9,{item:!0,xs:12,sx:W.Uz.modalButtonBar,children:(0,y.jsx)(x.$nd,{id:"download-file",type:"submit",variant:"callAction",color:"primary",disabled:d.length>200&&!h,label:"Download File"})})]})})]})},ce={is_latest:!0,last_modified:"",legal_hold_status:"",name:"",retention_mode:"",retention_until_date:"",size:0,tags:{},version_id:void 0},de=e=>{let{internalPaths:t,bucketName:n,versioningInfo:a,locking:u,onClosePanel:m}=e;const p=(0,l.jL)(),j=(0,o.d4)(O.Rq),b=(0,o.d4)((e=>e.objectBrowser.versionsMode)),g=(0,o.d4)((e=>e.objectBrowser.selectedVersion)),f=(0,o.d4)((e=>e.objectBrowser.loadingObjectInfo)),[v,S]=(0,s.useState)(!1),[w,T]=(0,s.useState)(!1),[C,E]=(0,s.useState)(!1),[N,I]=(0,s.useState)(!1),[k,B]=(0,s.useState)(!1),[F,V]=(0,s.useState)(null),[D,R]=(0,s.useState)([]),[U,K]=(0,s.useState)(null),[W,H]=(0,s.useState)([]),[Y,$]=(0,s.useState)(!1),[Z,q]=(0,s.useState)(!1),[Q,ee]=(0,s.useState)(0),[te,oe]=(0,s.useState)(!1),[ie,de]=(0,s.useState)(null),[ue,he]=(0,s.useState)(!1),xe=((0,c.x6)(t)||"").split("/").pop()||"";let me=[];F&&F.name&&(me=F.name.split("/")),(0,s.useEffect)((()=>{if(j&&D&&D.length>=1){let e=D.find((e=>e.is_latest))||ce;""!==g&&(e=D.find((e=>e.version_id===g))||ce),e.is_delete_marker||he(!0),V(e)}}),[g,j,D]),(0,s.useEffect)((()=>{f&&""!==t&&i.F.buckets.listObjects(n,{prefix:t,with_versions:j}).then((e=>{const t=e.data.objects||[];if(j){R(t),H(t);const e=t.reduce(((e,t)=>null!==t&&void 0!==t&&t.size?e+t.size:e),0);ee(e)}else{const e=t[0];V(e),H([]),e.is_delete_marker||he(!0)}p((0,d.oe)(!1))})).catch((e=>{console.error("Error loading object details",e.error),p((0,d.oe)(!1))}))}),[f,n,t,p,j,g]),(0,s.useEffect)((()=>{ue&&""!==t&&i.F.buckets.getObjectMetadata(n,{prefix:t,versionID:(null===F||void 0===F?void 0:F.version_id)||""}).then((e=>{let t=h()(e.data,"objectMetadata",{});de(t),he(!1)})).catch((e=>{console.error("Error Getting Metadata Status: ",e.detailedError),he(!1)}))}),[n,t,ue,null===F||void 0===F?void 0:F.version_id]);let pe=[];F&&F.tags&&(pe=Object.keys(F.tags));const je=(0,y.jsx)("div",{style:{textAlign:"center",marginTop:35},children:(0,y.jsx)(x.aHM,{})});if(!F)return f?je:null;const be=me.length>0?me[me.length-1]:F.name,ge=[n,xe,[n,F.name].join("/")],fe=(0,_._)(n,[r.OV.S3_PUT_OBJECT_LEGAL_HOLD,r.OV.S3_PUT_ACTIONS]),ve=(0,_._)(ge,[r.OV.S3_PUT_OBJECT_TAGGING,r.OV.S3_PUT_ACTIONS]),_e=(0,_._)(ge,[r.OV.S3_GET_OBJECT_RETENTION,r.OV.S3_PUT_OBJECT_RETENTION,r.OV.S3_GET_ACTIONS,r.OV.S3_PUT_ACTIONS],!0),Se=(0,_._)(ge,[r.OV.ADMIN_INSPECT_DATA]),Oe=(0,_._)(ge,[r.OV.S3_GET_BUCKET_VERSIONING,r.OV.S3_PUT_BUCKET_VERSIONING,r.OV.S3_GET_OBJECT_VERSION,r.OV.S3_GET_ACTIONS,r.OV.S3_PUT_ACTIONS]),we=(0,_._)(ge,[r.OV.S3_GET_OBJECT,r.OV.S3_GET_ACTIONS]),Te=(0,_._)([n,xe,[n,F.name].join("/")],[r.OV.S3_DELETE_OBJECT]);let ye=(0,A.IZ)(ie,xe);const Ce=[{action:()=>{(0,P._)(p,n,t,F)},label:"Download",disabled:!!F.is_delete_marker||!we,icon:(0,y.jsx)(x.s3U,{}),tooltip:we?"Download this Object":(0,r.vj)([r.OV.S3_GET_OBJECT,r.OV.S3_GET_ACTIONS],"download this object")},{action:()=>{S(!0)},label:"Share",disabled:!!F.is_delete_marker||!we,icon:(0,y.jsx)(x.liv,{}),tooltip:we?"Share this File":(0,r.vj)([r.OV.S3_GET_OBJECT,r.OV.S3_GET_ACTIONS],"share this object")},{action:()=>{q(!0)},label:"Preview",disabled:!!F.is_delete_marker||"none"===ye&&!we,icon:(0,y.jsx)(x.cyn,{}),tooltip:we?"Preview this File":(0,r.vj)([r.OV.S3_GET_OBJECT,r.OV.S3_GET_ACTIONS],"preview this object")},{action:()=>{I(!0)},label:"Legal Hold",disabled:!u||!j||!!F.is_delete_marker||!fe||""!==g,icon:(0,y.jsx)(x.ODz,{}),tooltip:fe?u?"Change Legal Hold rules for this File":"Object Locking must be enabled on this bucket in order to set Legal Hold":(0,r.vj)([r.OV.S3_PUT_OBJECT_LEGAL_HOLD,r.OV.S3_PUT_ACTIONS],"change legal hold settings for this object")},{action:()=>{T(!0)},label:"Retention",disabled:!j||!!F.is_delete_marker||!_e||""!==g||!u,icon:(0,y.jsx)(x.gn6,{}),tooltip:_e?u?"Change Retention rules for this File":"Object Locking must be enabled on this bucket in order to set Retention Rules":(0,r.vj)([r.OV.S3_GET_OBJECT_RETENTION,r.OV.S3_PUT_OBJECT_RETENTION,r.OV.S3_GET_ACTIONS,r.OV.S3_PUT_ACTIONS],"change Retention Rules for this object")},{action:()=>{E(!0)},label:"Tags",disabled:!!F.is_delete_marker||""!==g||!ve,icon:(0,y.jsx)(x.P3Z,{}),tooltip:ve?"Change Tags for this File":(0,r.vj)([r.OV.S3_PUT_OBJECT_TAGGING,r.OV.S3_GET_OBJECT_TAGGING,r.OV.S3_GET_ACTIONS,r.OV.S3_PUT_ACTIONS],"set Tags on this object")},{action:()=>{B(!0)},label:"Inspect",disabled:!j||!!F.is_delete_marker||""!==g||!Se,icon:(0,y.jsx)(x.nTF,{}),tooltip:Se?"Inspect this file":(0,r.vj)([r.OV.ADMIN_INSPECT_DATA],"inspect this file")},{action:()=>{p((0,d.cQ)({status:!b,objectName:be}))},label:b?"Hide Object Versions":"Display Object Versions",icon:(0,y.jsx)(x.j1U,{}),disabled:!j||!(F.version_id&&"null"!==F.version_id)||!Oe,tooltip:Oe?F.version_id&&"null"!==F.version_id?"Display Versions for this file":"":(0,r.vj)([r.OV.S3_GET_BUCKET_VERSIONING,r.OV.S3_PUT_BUCKET_VERSIONING,r.OV.S3_GET_OBJECT_VERSION,r.OV.S3_GET_ACTIONS,r.OV.S3_PUT_ACTIONS],"display all versions of this object")}];return(0,y.jsxs)(s.Fragment,{children:[v&&F&&(0,y.jsx)(J.default,{open:v,closeModalAndRefresh:()=>{K(null),S(!1)},bucketName:n,dataObject:U||F}),w&&F&&(0,y.jsx)(X,{open:w,closeModalAndRefresh:e=>{T(!1),e&&p((0,d.oe)(!0))},objectName:xe,objectInfo:F,bucketName:n}),Y&&(0,y.jsx)(ne,{deleteOpen:Y,selectedBucket:n,selectedObject:t,closeDeleteModalAndRefresh:e=>{$(!1),e&&""===g?m(!0):(p((0,d.SK)(!0)),p((0,d.Ai)("")),p((0,d.oe)(!0)))},versioningInfo:j?a:void 0,selectedVersion:g}),N&&F&&(0,y.jsx)(se,{open:N,closeModalAndRefresh:e=>{I(!1),e&&p((0,d.oe)(!0))},objectName:F.name||"",bucketName:n,actualInfo:F}),Z&&F&&(0,y.jsx)(G.default,{open:Z,bucketName:n,actualInfo:F,onClosePreview:()=>{q(!1)}}),C&&F&&(0,y.jsx)(ae,{modalOpen:C,bucketName:n,actualInfo:F,onCloseAndUpdate:e=>{E(!1),e&&p((0,d.oe)(!0))}}),k&&F&&(0,y.jsx)(le,{inspectOpen:k,volumeName:n,inspectPath:F.name||"",closeInspectModalAndRefresh:e=>{B(!1),e&&p((0,d.oe)(!0))}}),te&&F&&(0,y.jsx)(re,{open:te,closeModal:()=>{oe(!1)},currentItem:xe,bucketName:n,internalPaths:t,actualInfo:F}),f?(0,y.jsx)(s.Fragment,{children:je}):(0,y.jsxs)(x.azJ,{sx:{"& .ObjectDetailsTitle":{display:"flex",alignItems:"center","& .min-icon":{width:26,height:26,minWidth:26,minHeight:26}},"& .objectNameContainer":{whiteSpace:"nowrap",textOverflow:"ellipsis",overflow:"hidden",alignItems:"center",marginLeft:10},"& .capitalizeFirst":{textTransform:"capitalize"},"& .detailContainer":{padding:"0 22px",marginBottom:10,fontSize:14}},children:[(0,y.jsx)(x.Smc,{title:(0,y.jsxs)("div",{className:"ObjectDetailsTitle",children:[z(be||"",!0),(0,y.jsx)("span",{className:"objectNameContainer",children:be})]}),items:Ce}),(0,y.jsx)(L.A,{tooltip:Te?"":(0,r.vj)([r.OV.S3_DELETE_OBJECT],"delete this object"),children:(0,y.jsx)(x.xA9,{item:!0,xs:12,sx:{justifyContent:"center",display:"flex"},children:(0,y.jsx)(_.R,{resource:[n,xe,[n,F.name].join("/")],scopes:[r.OV.S3_DELETE_OBJECT],errorProps:{disabled:!0},children:(0,y.jsx)(x.$nd,{id:"delete-element-click",icon:(0,y.jsx)(x.d7y,{}),iconLocation:"start",fullWidth:!0,variant:"secondary",onClick:()=>{$(!0)},disabled:""===g&&F.is_delete_marker,sx:{width:"calc(100% - 44px)",margin:"8px 0"},label:"Delete".concat(""!==g?" version":"")})})})}),(0,y.jsx)(x.kCK,{icon:(0,y.jsx)(x.Hch,{}),label:"Object Info"}),(0,y.jsxs)(x.azJ,{className:"detailContainer",children:[(0,y.jsx)("strong",{children:"Name:"}),(0,y.jsx)("br",{}),(0,y.jsx)("div",{style:{overflowWrap:"break-word"},children:be})]}),""!==g&&(0,y.jsxs)(x.azJ,{className:"detailContainer",children:[(0,y.jsx)("strong",{children:"Version ID:"}),(0,y.jsx)("br",{}),g]}),(0,y.jsxs)(x.azJ,{className:"detailContainer",children:[(0,y.jsx)("strong",{children:"Size:"}),(0,y.jsx)("br",{}),(0,c.nO)("".concat(F.size||"0"))]}),F.version_id&&"null"!==F.version_id&&""===g&&(0,y.jsxs)(x.azJ,{className:"detailContainer",children:[(0,y.jsx)("strong",{children:"Versions:"}),(0,y.jsx)("br",{}),W.length," version",1!==W.length?"s":"",","," ",(0,c.qO)(Q)]}),""===g&&(0,y.jsxs)(x.azJ,{className:"detailContainer",children:[(0,y.jsx)("strong",{children:"Last Modified:"}),(0,y.jsx)("br",{}),(e=>{const t=new Date,n=new Date(e),s=t.getTime()-n.getTime(),o=(0,c.eQ)(s,"ms");return""!==o.trim()?"".concat(o," ago"):"Just now"})(F.last_modified||"")]}),(0,y.jsxs)(x.azJ,{className:"detailContainer",children:[(0,y.jsx)("strong",{children:"ETAG:"}),(0,y.jsx)("br",{}),F.etag||"N/A"]}),(0,y.jsxs)(x.azJ,{className:"detailContainer",children:[(0,y.jsx)("strong",{children:"Tags:"}),(0,y.jsx)("br",{}),0===pe.length?"N/A":pe.map(((e,t)=>(0,y.jsxs)("span",{children:[e,":",h()(F,"tags.".concat(e),""),t{let{versionToRestore:t,bucketName:n,objectPath:o,restoreOpen:a,onCloseAndUpdate:r}=e;const u=(0,l.jL)(),[h,p]=(0,s.useState)(!1);return(0,y.jsx)(ee.A,{title:"Restore File Version",confirmText:"Restore",isOpen:a,isLoading:h,titleIcon:(0,y.jsx)(x.YkU,{}),onConfirm:()=>{p(!0),i.F.buckets.putObjectRestore(n,{prefix:(0,c.nf)(o),version_id:t.version_id||""}).then((()=>{p(!1),r(!0),u((0,d.NV)({prefix:o,objectInfo:t}))})).catch((e=>{u((0,O.C9)((0,m.S)(e.error))),p(!1)}))},confirmButtonProps:{variant:"secondary",disabled:h},onClose:()=>{r(!1)},confirmationContent:(0,y.jsxs)(x.azJ,{id:"alert-dialog-description",children:["Are you sure you want to restore ",(0,y.jsx)("br",{}),(0,y.jsx)("b",{children:o})," ",(0,y.jsx)("br",{})," with Version ID:",(0,y.jsx)("br",{}),(0,y.jsx)("b",{children:t.version_id}),"?"]})})},he=e=>{let{type:t}=e,n="#000",s="";switch(t){case"null":n="#07193E",s="NULL VERSION";break;case"deleted":n="#868686",s="DELETED";break;default:n="#174551",s="CURRENT VERSION"}return(0,y.jsx)("span",{style:{backgroundColor:n,padding:"0 5px",display:"inline-block",color:"#FFF",fontWeight:"bold",fontSize:12,borderRadius:2,whiteSpace:"nowrap",margin:"0 10px"},children:s})},xe=f.Ay.div((e=>{let{theme:t}=e;return{"&:before":{content:"' '",display:"block",position:"absolute",width:"2px",height:"calc(100% + 2px)",backgroundColor:h()(t,"borderColor","#F8F8F8"),left:"24px"},"& .mainFileVersionItem":{borderBottom:"".concat(h()(t,"borderColor","#F8F8F8")," 1px solid"),padding:"1rem 0",margin:"0 0.5rem 0 2.5rem",cursor:"pointer","&.deleted":{color:"#868686"}},"& .intermediateLayer":{margin:"0 1.5rem 0 1.5rem","&:hover, &.selected":{backgroundColor:h()(t,"boxBackground","#F8F8F8"),"& > div":{borderBottomColor:h()(t,"boxBackground","#F8F8F8")}}},"& .versionContainer":{fontSize:16,fontWeight:"bold",display:"flex",alignItems:"center","& svg.min-icon":{width:18,height:18,minWidth:18,minHeight:18,marginRight:10}},"& .buttonContainer":{textAlign:"right","& button":{marginLeft:"1.5rem"}},"& .versionID":{fontSize:"12px",margin:"2px 0",whiteSpace:"nowrap",textOverflow:"ellipsis",maxWidth:"95%",overflow:"hidden"},"& .versionData":{marginRight:"10px",fontSize:12,color:"#868686"},"@media (max-width: 600px)":{"& .buttonContainer":{"& button":{marginLeft:"5px"}}},"@media (max-width: 799px)":{"&:before":{display:"none"},"& .mainFileVersionItem":{padding:"5px 0px",margin:0},"& .intermediateLayer":{margin:0,"&:hover, &.selected":{backgroundColor:"transparent","& > div":{borderBottomColor:h()(t,"boxBackground","#F8F8F8")}}},"& .versionContainer":{fontSize:14,"& svg.min-icon":{display:"none"}},"& .versionData":{textOverflow:"ellipsis",maxWidth:"95%",overflow:"hidden",whiteSpace:"nowrap"},"& .collapsableInfo":{display:"flex",flexDirection:"column"},"& .versionItem":{display:"none"}}}})),me=e=>{let{fileName:t,versionInfo:n,isSelected:s,checkable:o,isChecked:a,onCheck:i,onShare:l,onDownload:r,onRestore:d,onPreview:u,globalClick:h,index:m,key:p,style:b}=e;const g=n.is_delete_marker,f=[{icon:(0,y.jsx)(x.cyn,{}),action:u,tooltip:"Preview"},{icon:(0,y.jsx)(x.s3U,{}),action:r,tooltip:"Download this version"},{icon:(0,y.jsx)(x.liv,{}),action:l,tooltip:"Share this version"},{icon:(0,y.jsx)(x.YkU,{}),action:d,tooltip:"Restore this version"}];let v=null;n.is_delete_marker?v="deleted":n.is_latest?v="current":"null"===n.version_id&&(v="null");let _=j.c9.now();return n.last_modified&&(_=j.c9.fromISO(n.last_modified)),(0,y.jsx)(xe,{children:(0,y.jsx)(x.xA9,{container:!0,className:"ctrItem",onClick:()=>{h(n)},style:b,children:(0,y.jsx)(x.xA9,{item:!0,xs:12,className:"intermediateLayer".concat(" ",s?"selected":""),children:(0,y.jsxs)(x.xA9,{item:!0,xs:!0,className:"mainFileVersionItem ".concat(n.is_delete_marker?"deleted":""),children:[(0,y.jsx)(x.xA9,{item:!0,xs:12,children:(0,y.jsxs)(x.xA9,{container:!0,children:[(0,y.jsxs)(x.xA9,{item:!0,xs:!0,md:4,className:"versionContainer",children:[o&&(0,y.jsx)(x.Sc0,{checked:a,id:"select-".concat(n.version_id),name:"select-".concat(n.version_id),onChange:e=>{e.stopPropagation(),i(n.version_id||"")},value:n.version_id||"",disabled:n.is_delete_marker,sx:{width:"initial"}}),z(t,!0)," v",m.toString(),(0,y.jsx)("span",{className:"versionItem",children:v&&(0,y.jsx)(he,{type:v})})]}),(0,y.jsx)(x.xA9,{item:!0,xs:10,md:8,className:"buttonContainer",children:f.map(((e,t)=>(0,y.jsx)(x.m_M,{tooltip:e.tooltip,children:(0,y.jsx)(x.K0,{size:"small",id:"version-action-".concat(e.tooltip,"-").concat(t.toString()),className:"spacing".concat(" ",g?"buttonDisabled":""),disabled:g,onClick:t=>{t.stopPropagation(),g?t.preventDefault():e.action(n)},sx:{backgroundColor:"#F8F8F8",borderRadius:"100%",width:"28px",height:"28px",padding:"5px","& .min-icon":{width:"14px",height:"14px"}},children:e.icon})},"version-action-".concat(e.tooltip,"-").concat(t.toString()))))})]})}),(0,y.jsx)(x.xA9,{item:!0,xs:12,className:"versionID",children:"null"!==n.version_id?n.version_id:"-"}),(0,y.jsxs)(x.xA9,{item:!0,xs:12,className:"collapsableInfo",children:[(0,y.jsxs)("span",{className:"versionData",children:[(0,y.jsx)("strong",{children:"Last modified:"})," ",_.toFormat("ccc, LLL dd yyyy HH:mm:ss (ZZZZ)")]}),(0,y.jsxs)("span",{className:"versionData",children:[(0,y.jsx)("strong",{children:"Size:"})," ",(0,c.nO)("".concat(n.size||"0"))]})]})]})})},p)})},pe=e=>{let{closeDeleteModalAndRefresh:t,deleteOpen:n,selectedBucket:a,selectedObject:d}=e;const u=(0,l.jL)(),[h,p]=(0,s.useState)(!1),[j,b]=(0,s.useState)(""),[g,f]=(0,s.useState)(!1),v=(0,o.d4)((e=>e.objectBrowser.retentionConfig)),S=(0,_._)([a],[r.OV.S3_BYPASS_GOVERNANCE_RETENTION])&&"governance"===(null===v||void 0===v?void 0:v.mode);if((0,s.useEffect)((()=>{h&&i.F.buckets.deleteObject(a,{prefix:d,non_current_versions:!0,bypass:g}).then((()=>{t(!0)})).catch((e=>{u((0,O.C9)((0,m.S)(e.error))),p(!1)}))}),[h,t,u,d,a,g]),!d)return null;return(0,y.jsx)(ee.A,{title:"Delete Non-Current versions",confirmText:"Delete",isOpen:n,titleIcon:(0,y.jsx)(x.xWY,{}),isLoading:h,onConfirm:()=>{p(!0)},onClose:()=>t(!1),confirmButtonProps:{disabled:"YES, PROCEED"!==j||h},confirmationContent:(0,y.jsxs)(s.Fragment,{children:["Are you sure you want to delete all the non-current versions for:"," ",(0,y.jsx)("b",{children:(0,c.x6)(d)}),"? ",(0,y.jsx)("br",{}),S&&(0,y.jsx)(s.Fragment,{children:(0,y.jsx)("div",{style:{marginTop:10},children:(0,y.jsx)(x.dOG,{label:"Bypass Governance Mode",indicatorLabels:["Yes","No"],checked:g,value:"bypass_governance",id:"bypass_governance",name:"bypass_governance",onChange:e=>{f(!g)},description:""})})}),(0,y.jsx)("br",{}),"To continue please type ",(0,y.jsx)("b",{children:"YES, PROCEED"})," in the box.",(0,y.jsx)("br",{}),(0,y.jsx)("br",{}),(0,y.jsx)(x.xA9,{item:!0,xs:12,children:(0,y.jsx)(x.cl_,{id:"type-confirm",name:"retype-tenant",onChange:e=>{b(e.target.value)},label:"",value:j})})]})})},je=e=>{let{closeDeleteModalAndRefresh:t,deleteOpen:n,selectedBucket:a,selectedVersions:c,selectedObject:d}=e;const u=(0,l.jL)(),[h,p]=(0,s.useState)(!1),[j,b]=(0,s.useState)(!1),g=(0,o.d4)((e=>e.objectBrowser.retentionConfig)),f=(0,_._)([a],[r.OV.S3_BYPASS_GOVERNANCE_RETENTION])&&"governance"===(null===g||void 0===g?void 0:g.mode);return(0,s.useEffect)((()=>{if(h){const e=c.map((e=>({path:d,versionID:e,recursive:!1})));e.length>0&&i.F.buckets.deleteMultipleObjects(a,e,{all_versions:!1,bypass:j}).then((()=>{p(!1),t(!0)})).catch((e=>{u((0,O.C9)((0,m.S)(e.error))),p(!1)}))}}),[h,t,a,d,c,j,u]),c?(0,y.jsx)(ee.A,{title:"Delete Selected Versions",confirmText:"Delete",isOpen:n,titleIcon:(0,y.jsx)(x.xWY,{}),isLoading:h,onConfirm:()=>{p(!0)},onClose:()=>t(!1),confirmationContent:(0,y.jsxs)(s.Fragment,{children:["Are you sure you want to delete the selected ",c.length," ","versions for ",(0,y.jsx)("strong",{children:d}),"?",f&&(0,y.jsx)(s.Fragment,{children:(0,y.jsx)("div",{style:{marginTop:10},children:(0,y.jsx)(x.dOG,{label:"Bypass Governance Mode",indicatorLabels:["Yes","No"],checked:j,value:"bypass_governance",id:"bypass_governance",name:"bypass_governance",onChange:e=>{b(!j)},description:""})})})]})}):null};var be=n(95098);const ge={is_latest:!0,last_modified:"",legal_hold_status:"",name:"",retention_mode:"",retention_until_date:"",size:0,tags:{},version_id:void 0},fe=e=>{let{internalPaths:t,bucketName:n}=e;const a=(0,l.jL)(),r=(0,o.d4)((e=>e.objectBrowser.searchVersions)),u=(0,o.d4)((e=>e.objectBrowser.loadingVersions)),p=(0,o.d4)((e=>e.objectBrowser.selectedVersion)),j=(0,o.d4)(O.Rq),[b,g]=(0,s.useState)(!1),[f,v]=(0,s.useState)(null),[_,S]=(0,s.useState)(null),[w,T]=(0,s.useState)([]),[C,E]=(0,s.useState)(!1),[A,I]=(0,s.useState)(null),[k,B]=(0,s.useState)("date"),[F,V]=(0,s.useState)(!1),[D,R]=(0,s.useState)(!1),[U,z]=(0,s.useState)(!1),[M,K]=(0,s.useState)([]),[W,H]=(0,s.useState)(!1);let Y=[];f&&f.name&&(Y=f.name.split("/")),(0,s.useEffect)((()=>{u||f||a((0,d.SK)(!0))}),[u,f,a]),(0,s.useEffect)((()=>{u&&""!==t&&i.F.buckets.listObjects(n,{prefix:t,with_versions:j}).then((e=>{const n=h()(e.data,"objects",[]),s=(0,c.x6)(t),o=n.filter((e=>e.name===s));j?(v(o.find((e=>e.is_latest))||ge),T(o)):(v(o[0]),T([])),a((0,d.SK)(!1))})).catch((e=>{a((0,O.C9)((0,m.S)(e.error))),a((0,d.SK)(!1))}))}),[u,n,t,a,j]);const $=e=>{S(e),g(!0)},Z=e=>{S(e),V(!0)},q=e=>{I(e),E(!0)},Q=e=>{(0,P._)(a,n,t,e)},X=e=>{a((0,d.Ai)(e.version_id||""))},ee=w.filter((e=>!!e.version_id&&e.version_id.includes(r))),te=w.reduce(((e,t)=>t.size?e+t.size:e),0);ee.sort(((e,t)=>{if("size"===k)return e.size&&t.size?e.sizet.size?1:0:0;{const n=new Date(e.last_modified||"").getTime(),s=new Date(t.last_modified||"").getTime();return ns?-1:0}}));const ne=e=>{if(M.includes(e)){const t=M.filter((t=>t!==e));return void K(t)}const t=[...M];t.push(e),K(t)};return(0,y.jsxs)(s.Fragment,{children:[b&&f&&(0,y.jsx)(J.default,{open:b,closeModalAndRefresh:()=>{S(null),g(!1),V(!1)},bucketName:n,dataObject:_||f}),C&&f&&A&&(0,y.jsx)(ue,{restoreOpen:C,bucketName:n,versionToRestore:A,objectPath:f.name||"",onCloseAndUpdate:e=>{E(!1),I(null),e&&(a((0,d.SK)(!0)),a((0,d.oe)(!0)))}}),F&&f&&(0,y.jsx)(G.default,{open:F,bucketName:n,actualInfo:{name:f.name||"",version_id:_&&_.version_id?_.version_id:"null",size:_&&_.size?_.size:0,content_type:"",last_modified:f.last_modified||""},onClosePreview:()=>{V(!1)}}),D&&(0,y.jsx)(pe,{deleteOpen:D,closeDeleteModalAndRefresh:e=>{R(!1),e&&(a((0,d.SK)(!0)),a((0,d.Ai)("")),a((0,d.oe)(!0)))},selectedBucket:n,selectedObject:t}),W&&(0,y.jsx)(je,{selectedBucket:n,selectedObject:(0,c.x6)(t),deleteOpen:W,selectedVersions:M,closeDeleteModalAndRefresh:e=>{H(!1),e&&(a((0,d.SK)(!0)),a((0,d.Ai)("")),a((0,d.oe)(!0)),K([]))}}),(0,y.jsxs)(x.xA9,{container:!0,sx:{width:"100%",padding:10,"@media (max-width: 799px)":{minHeight:800}},children:[!f&&(0,y.jsx)(x.xA9,{item:!0,xs:12,children:(0,y.jsx)(x.z21,{})}),f&&(0,y.jsxs)(s.Fragment,{children:[(0,y.jsx)(x.xA9,{item:!0,xs:12,children:(0,y.jsx)(N,{bucketName:n,internalPaths:(0,c.x6)(t),hidePathButton:!0})}),(0,y.jsx)(x.xA9,{item:!0,xs:12,sx:{position:"relative","& .detailsSpacer":{marginRight:18,"@media (max-width: 600px)":{marginRight:0}},["@media (max-width: ".concat(x.nmC.md,"px)")]:{"&::before":{display:"none"}}},children:(0,y.jsx)(x.lcx,{icon:(0,y.jsx)("span",{style:{display:"block",marginTop:"-10px"},children:(0,y.jsx)(x.j1U,{style:{width:20,height:20}})}),title:"".concat(Y.length>0?Y[Y.length-1]:f.name," Versions"),subTitle:(0,y.jsxs)(s.Fragment,{children:[(0,y.jsx)("span",{className:"detailsSpacer",children:(0,y.jsxs)("strong",{children:[w.length," Version",1===w.length?"":"s","\xa0\xa0\xa0"]})}),(0,y.jsx)("span",{className:"detailsSpacer",children:(0,y.jsx)("strong",{children:(0,c.qO)(te)})})]}),actions:(0,y.jsxs)(s.Fragment,{children:[(0,y.jsx)(L.A,{tooltip:"Select Multiple Versions",children:(0,y.jsx)(x.$nd,{id:"select-multiple-versions",onClick:()=>{z(!U)},icon:(0,y.jsx)(x.IN,{}),variant:U?"callAction":"regular",style:{marginRight:8}})}),U&&(0,y.jsx)(L.A,{tooltip:"Delete Selected Versions",children:(0,y.jsx)(x.$nd,{id:"delete-multiple-versions",onClick:()=>{H(!0)},icon:(0,y.jsx)(x.d7y,{}),variant:"secondary",style:{marginRight:8},disabled:0===M.length})}),(0,y.jsx)(L.A,{tooltip:"Delete Non Current Versions",children:(0,y.jsx)(x.$nd,{id:"delete-non-current",onClick:()=>{R(!0)},icon:(0,y.jsx)(x.rgY,{}),variant:"secondary",style:{marginRight:15},disabled:w.length<=1})}),(0,y.jsx)(x.l6P,{id:"sort-by",options:[{label:"Date",value:"date"},{label:"Size",value:"size"}],value:k,label:"Sort by",onChange:e=>{B(e)},noLabelMinWidth:!0})]}),bottomBorder:!1})}),(0,y.jsx)(x.xA9,{item:!0,xs:12,sx:{flexGrow:1,height:"calc(100% - 120px)",overflow:"auto",["@media (max-width: ".concat(x.nmC.md,"px)")]:{height:600}},children:f.version_id&&"null"!==f.version_id&&(0,y.jsx)(be.B8,{style:{width:"100%"},containerStyle:{width:"100%",maxWidth:"100%"},width:1,height:800,rowCount:ee.length,rowHeight:108,rowRenderer:e=>{let{key:t,index:n,isScrolling:s,isVisible:o,style:a}=e;const i=w.length-n;return(0,y.jsx)(me,{style:a,fileName:(null===f||void 0===f?void 0:f.name)||"",versionInfo:ee[n],index:i,onDownload:Q,onRestore:q,onShare:$,onPreview:Z,globalClick:X,isSelected:p===ee[n].version_id,checkable:U,onCheck:ne,isChecked:M.includes(ee[n].version_id||"")},t)}})})]})]})]})},ve=e=>{if(e.name.endsWith("/"))return"";const t=j.c9.now(),n=j.c9.fromISO(e.last_modified);return t.hasSame(n,"day")&&t.hasSame(n,"month")&&t.hasSame(n,"year")?"Today, ".concat(n.toFormat("HH:mm")):n.toFormat("ccc, LLL dd yyyy HH:mm (ZZZZ)")},_e=e=>e.name.endsWith("/")||!e.size?"-":(0,c.nO)(String(e.size)),Se=[{label:"Name",elementKey:"name",renderFunction:z,enableSort:!0},{label:"Last Modified",elementKey:"last_modified",renderFunction:ve,renderFullObject:!0,enableSort:!0},{label:"Size",elementKey:"size",renderFunction:_e,renderFullObject:!0,width:100,enableSort:!0}],Oe=[{label:"Name",elementKey:"name",renderFunction:z,enableSort:!0},{label:"Object Date",elementKey:"last_modified",renderFunction:ve,renderFullObject:!0,enableSort:!0},{label:"Size",elementKey:"size",renderFunction:_e,renderFullObject:!0,width:100,enableSort:!0},{label:"Deleted",elementKey:"delete_flag",renderFunction:e=>e?"Yes":"No",width:60}];var we=n(46537);const Te=()=>{const e=(0,l.jL)(),t=(0,a.g)(),n=(0,a.Zp)(),[i,u]=(0,s.useState)("ASC"),[m,p]=(0,s.useState)("name"),j=t.bucketName||"",b=(0,o.d4)((e=>e.objectBrowser.objectDetailsOpen)),g=(0,o.d4)((e=>e.objectBrowser.requestInProgress)),f=(0,o.d4)(we.s$),v=!(null===f||void 0===f||!f.includes("object-browser-only")),S=(0,o.d4)((e=>e.objectBrowser.rewind.rewindEnabled)),O=(0,o.d4)((e=>e.objectBrowser.records)),w=(0,o.d4)((e=>e.objectBrowser.searchObjects)),T=(0,o.d4)((e=>e.objectBrowser.selectedObjects)),C=(0,o.d4)((e=>e.objectBrowser.connectionError)),E=(0,o.d4)((e=>e.system.anonymousMode)),N=(0,_._)(j,[r.OV.S3_LIST_BUCKET,r.OV.S3_ALL_LIST_BUCKET]),I=O.filter((e=>{if(""===w)return!0;return e.name.toLowerCase().indexOf(w.toLowerCase())>=0})).sort((0,A.$w)(m));let k=[];k="ASC"===i?I:I.reverse();const B=[{type:"view",tooltip:"View",onClick:t=>{var s;const o=t.name||"",a="/browser/".concat(j).concat(o?"/".concat((0,c.nf)(o)):"");!E||null!==(s=t.name)&&void 0!==s&&s.endsWith("/")?(e((0,d.KX)([])),n(a),E||(e((0,d.TO)(!0)),e((0,d.SK)(!0))),e((0,d.A7)("".concat(o?"".concat((0,c.nf)(o)):"")))):(0,P._)(e,j,"".concat((0,c.nf)(o)),t)},sendOnlyId:!1}];let F=N||E?"This location is empty".concat(S?"":", please try uploading a new file"):(0,r.vj)([r.OV.S3_LIST_BUCKET,r.OV.S3_ALL_LIST_BUCKET],"view Objects in this bucket");C&&(F="Objects List unavailable. Please review your WebSockets configuration and try again");let L="calc(100vh - 290px)";return v&&(L="calc(100vh - 315px)"),(0,y.jsx)(x.bQt,{itemActions:B,columns:S?Oe:Se,isLoading:g,entityName:"Objects",idField:"name",records:k,customPaperHeight:L,selectedItems:T,onSelect:E?void 0:t=>{const n=t.target,s=n.value,o=n.checked;let a=[...T];return o?a.push(s):a=a.filter((e=>e!==s)),e((0,d.KX)(a)),e((0,d.A7)(null)),a},customEmptyMessage:F,sortEnabled:{currentSort:m,currentDirection:i,onSortClick:t=>{const n=h()(t,"sortDirection","DESC");p(t.sortBy),u(n),e((0,d.Yw)(!0))}},onSelectAll:()=>{if(e((0,d.A7)(null)),T.length===k.length)return void e((0,d.KX)([]));const t=k.map((e=>e.name));e((0,d.KX)(t))},rowStyle:e=>{var t;let{index:n}=e;return null!==(t=k[n])&&void 0!==t&&t.delete_flag?"deleted":""},sx:{minHeight:b?"100%":"initial"},noBackground:!0})};var ye=n(64681);const Ce=()=>{const e=(0,l.jL)(),t=(0,o.d4)((e=>e.objectBrowser.searchObjects));return(0,y.jsx)(ye.A,{placeholder:"Start typing to filter objects in the bucket",onChange:t=>{e((0,d.$X)(t))},value:t})};var Ee=n(30614);const Ne=(0,S.A)(s.lazy((()=>n.e(5941).then(n.bind(n,65941))))),Ae=(0,S.A)(s.lazy((()=>Promise.resolve().then(n.bind(n,30718))))),Ie=(0,S.A)(s.lazy((()=>n.e(2704).then(n.bind(n,32704))))),ke=(0,S.A)(s.lazy((()=>Promise.resolve().then(n.bind(n,37524))))),Be={borderWidth:2,borderRadius:2,borderColor:"transparent",outline:"none"},Fe={borderStyle:"dashed",backgroundColor:"transparent",borderColor:"#2196f3"},Le={borderStyle:"dashed",backgroundColor:"transparent",borderColor:"#00e676"},Ve=()=>{var e;const t=(0,l.jL)(),n=(0,a.g)(),u=(0,a.Zp)(),b=(0,a.zy)(),g=(0,o.d4)((e=>e.objectBrowser.rewind.rewindEnabled)),f=(0,o.d4)((e=>e.objectBrowser.rewind.bucketToRewind)),v=(0,o.d4)((e=>e.objectBrowser.versionsMode)),S=(0,o.d4)((e=>e.objectBrowser.showDeleted)),C=(0,o.d4)((e=>e.objectBrowser.objectDetailsOpen)),E=(0,o.d4)((e=>e.objectBrowser.selectedInternalPaths)),P=(0,o.d4)((e=>e.objectBrowser.requestInProgress)),R=(0,o.d4)((e=>e.objectBrowser.simplePath)),U=(0,o.d4)((e=>e.objectBrowser.versionInfo)),z=(0,o.d4)((e=>e.objectBrowser.lockingEnabled)),G=(0,o.d4)((e=>e.objectBrowser.downloadRenameModal)),M=(0,o.d4)((e=>e.objectBrowser.selectedPreview)),J=(0,o.d4)((e=>e.objectBrowser.shareFileModalOpen)),K=(0,o.d4)((e=>e.objectBrowser.previewOpen)),W=(0,o.d4)((e=>e.objectBrowser.selectedBucket)),H=(0,o.d4)((e=>e.system.anonymousMode)),Y=(0,o.d4)((e=>e.objectBrowser.anonymousAccessOpen)),$=(0,o.d4)((e=>{var t;return(null===(t=e.objectBrowser)||void 0===t?void 0:t.records)||[]})),Z=(0,o.d4)(B.Nx),q=(0,o.d4)(B.fT),[Q,X]=(0,s.useState)(!1),[ee,te]=(0,s.useState)(!1),[ne,se]=(0,s.useState)(!1),[oe,ae]=(0,s.useState)(!1),[ie,le]=(0,s.useState)(!1),[ce,ue]=(0,s.useState)(null),[he,xe]=(0,s.useState)(null),[me,pe]=(0,s.useState)(!1),je=I(U.status),be=n.bucketName||"",ge=b.pathname.split("/browser/".concat(be,"/")),ve=2===ge.length?ge[1]:"",_e=(0,c.x6)(ve),Se=_e.split("/").filter((e=>""!==e));let Oe=[be];Se.length>0&&(Oe=Oe.concat(Se));const we=(0,s.useRef)(null),ye=(0,s.useRef)(null),Ve=(0,o.d4)((e=>e.console.session&&e.console.session.permissions||{})),De=[r.OV.S3_PUT_OBJECT,r.OV.S3_PUT_ACTIONS],Pe=Oe.join("/"),Re=function(e,t){const n=T(e,t,arguments.length>2&&void 0!==arguments[2]?arguments[2]:[]).reduce(((e,t)=>{const n=w(t);return n&&e.push(".".concat(n)),e}),[]);return[...new Set(n)].join(",")}(Ve,Pe,De),Ue=T(Ve,Pe,De),ze=(0,_._)([Pe,...Ue],[r.OV.S3_GET_OBJECT,r.OV.S3_GET_ACTIONS]),Ge=(0,_._)(be,[r.OV.S3_GET_OBJECT,r.OV.S3_GET_ACTIONS,r.OV.S3_GET_BUCKET_VERSIONING]),Me=(0,_._)([Pe,...Ue],[r.OV.S3_DELETE_OBJECT]),Je=(0,_._)([Pe,...Ue],De)||H,Ke=(0,_._)(be,[r.OV.S3_GET_BUCKET_POLICY,r.OV.S3_PUT_BUCKET_POLICY,r.OV.S3_GET_ACTIONS,r.OV.S3_PUT_ACTIONS]),We=(0,o.d4)((e=>e.objectBrowser.selectedObjects)),He=(()=>{let e=!1;if(1===We.length){e=!!$.find((e=>e.name==="".concat(We[0])&&e.delete_flag))}return e})(),Ye=(0,s.useCallback)((()=>{const e=We[0],t=(0,c.nf)(e);!me&&t&&i.F.buckets.getObjectMetadata(be,{prefix:t}).then((e=>{let t=h()(e.data,"objectMetadata",{});pe(!0),xe(t)})).catch((e=>{console.error("Error Getting Metadata Status: ",e,null===e||void 0===e?void 0:e.detailedError),pe(!0)}))}),[be,We,me]);(0,s.useEffect)((()=>{be&&!He&&Ye()}),[be,We,Ye,He]),(0,s.useEffect)((()=>{g&&f!==be&&t((0,d.rS)())}),[g,f,be,t]),(0,s.useEffect)((()=>{null!==ye.current&&(ye.current.setAttribute("directory",""),ye.current.setAttribute("webkitdirectory",""))}),[ye]),(0,s.useEffect)((()=>{if(1===We.length){const e=We[0],t=e.endsWith("/");let n=(0,A.IZ)(he,e);le(!("none"===n||!ze)),ae(!(!ze||t))}else ae(!1),le(!1)}),[We,ze,he]),(0,s.useEffect)((()=>{ce||H||i.F.buckets.getBucketQuota(be).then((e=>{let t=null;e.data.quota&&(t=e.data),ue(t)})).catch((e=>{console.error("Error Getting Quota Status: ",e.error.detailedMessage),ue(null)}))}),[ce,be,H]),(0,s.useEffect)((()=>{We.length>0?t((0,d.TO)(!0)):0!==We.length||null!==E||P||t((0,d.TO)(!1))}),[We,E,t,P]),(0,s.useEffect)((()=>{ne||(t((0,B.ZU)(!0)),se(!0))}),[ne,t,se]),(0,s.useEffect)((()=>{!P&&!Z||H||i.F.buckets.bucketInfo(be).then((e=>{t((0,B.ZU)(!1)),t((0,B.$T)(e.data))})).catch((e=>{t((0,B.ZU)(!1)),t((0,O.C9)((0,m.S)(e)))}))}),[be,Z,t,H,P]),(0,s.useEffect)((()=>{""!==W&&i.F.buckets.getBucketRetentionConfig(W).then((e=>{t((0,d.PJ)(e.data))})).catch((()=>{t((0,d.PJ)(null))}))}),[W,t]);const $e=e=>{if(null!==e&&void 0!==e&&null!==e.target.files&&void 0!==e.target.files){e.preventDefault();var t=[];for(let n=0;n{let s="";R&&(s=R.endsWith("/")?R:R+"/");((e,n,s,o)=>{let a=a=>new Promise(((i,l)=>{let r="api/v1/buckets/".concat(n,"/objects/upload");const u=a.name,x=new Blob([a],{type:a.type});let m="";const p=h()(a,"path",""),j=h()(a,"webkitRelativePath","");let b=o;const g=(0,k.E0)(8);""!==p?b=p:""!==j&&(b=j);let f="";if(""!==s||""!==b){const e=b.split("/").slice(0,-1).join("/"),t=s.endsWith("/")?s.slice(0,-1):s;f="".concat(t).concat(t.endsWith("/")||""===e||e.startsWith("/")?"":"/").concat(e).concat(!e.endsWith("/")||""===e.trim()&&!s.endsWith("/")?"/":"")}r=""!==f?"".concat(r,"?prefix=").concat((0,c.nf)(f+u)):"".concat(r,"?prefix=").concat((0,c.nf)(u)),m=(0,c.nf)(f);const v=(0,c.nf)("".concat(n,"-").concat(m,"-").concat((new Date).getTime(),"-").concat(Math.random()));let _=new XMLHttpRequest;_.open("POST",r,!0),H&&_.setRequestHeader("X-Anonymous","1");const S=e.length>1;let O="An error occurred while uploading the file".concat(S?"s":"",".");const w={413:"Error - File size too large"};_.withCredentials=!1,_.onload=function(){if(_.status>=200&&_.status<300)t((0,d.rx)(v)),i({status:_.status}),(0,k.vy)(g);else{if(w[_.status])O=w[_.status];else if(_.response)try{const e=JSON.parse(_.response);O=e.detailedMessage}catch(e){O="something went wrong"}t((0,d.iL)({instanceID:v,msg:O})),l({status:_.status,message:O}),(0,k.vy)(g)}},_.upload.addEventListener("error",(()=>{l(O),t((0,d.iL)({instanceID:v,msg:"A network error occurred."}))})),_.upload.addEventListener("progress",(e=>{const n=Math.floor(100*e.loaded/e.total);t((0,d.DW)({instanceID:v,progress:n}))})),_.onerror=()=>{l(O),t((0,d.iL)({instanceID:v,msg:"A network error occurred."}))},_.onloadend=()=>{0===e.length&&t((0,d.Yw)(!0))},_.onabort=()=>{t((0,d.Dm)(v))};const T=new FormData;void 0!==a.size&&(T.append(a.size.toString(),x,u),(0,k.FP)(g,_),t((0,d.cP)({ID:g,bucketName:n,done:!1,instanceID:v,percentage:0,prefix:"".concat((0,c.x6)(m)).concat(u),type:"upload",waitingForFile:!1,failed:!1,cancelled:!1,errorMessage:""})),(0,k.vx)(g,T))}));const i=[];t((0,d.Nu)());for(let t=0;t{const n=e.filter((e=>"rejected"===e.status));if(n.length>0){const e=i.length,s=i.length-n.length,o={errorMessage:"There were some errors during file upload",detailedError:"Uploaded files ".concat(s,"/").concat(e)};t((0,O.C9)(o))}t((0,d.Yw)(!0))}))})(e,be,s,n)}),[be,t,R,H]),qe=(0,s.useCallback)((e=>{if(e&&e.length>0&&Je){let n=e[0].path,s=e;Re.length>0&&(s=e.filter((e=>{const t=w(e.name);return Re.includes(t)}))),s.length?(Ze(s,n),console.log("".concat(s.length," Allowed Files Processed out of ").concat(e.length,"."),Pe,...Ue),s.length!==e.length&&t((0,O.C9)({errorMessage:"Upload is restricted.",detailedError:(0,r.vj)([r.OV.S3_PUT_OBJECT,r.OV.S3_PUT_ACTIONS],"upload objects to this location")}))):(t((0,O.C9)({errorMessage:"Could not process drag and drop.",detailedError:(0,r.vj)([r.OV.S3_PUT_OBJECT,r.OV.S3_PUT_ACTIONS],"upload objects to this location")})),console.error("Could not process drag and drop . upload may be restricted.",Pe,...Ue))}Je||t((0,O.C9)({errorMessage:"Upload not allowed",detailedError:(0,r.vj)([r.OV.S3_PUT_OBJECT,r.OV.S3_PUT_ACTIONS],"upload objects to this location")}))}),[Ze]),{getRootProps:Qe,getInputProps:Xe,isDragActive:et,isDragAccept:tt}=(0,p.VB)({noClick:!0,onDrop:qe}),nt=(0,s.useMemo)((()=>({...Be,...et?Fe:{},...tt?Le:{}})),[et,tt]),st=e=>{if(t((0,d.A7)(null)),t((0,d.cQ)({status:!1})),C&&null!==E){const e=(0,c.x6)(ve).split("/");e.pop();let t="";e&&e.length>0&&(t="".concat(e.join("/"),"/")),u("/browser/".concat(be,"/").concat((0,c.nf)(t)))}t((0,d.TO)(!1)),e&&t((0,d.Yw)(!0))};let ot=j.c9.now();null!==q&&void 0!==q&&q.creation_date&&(ot=j.c9.fromISO(q.creation_date));const at=(null===We||void 0===We?void 0:We.length)<=1?"Download Selected":" Download selected objects as Zip. Any Deleted objects in the selection would be skipped from download.",it=[{action:()=>{t((0,F.op)(be))},label:"Download",disabled:!ze||He,icon:(0,y.jsx)(x.s3U,{}),tooltip:ze?at:(0,r.vj)([r.OV.S3_GET_OBJECT,r.OV.S3_GET_ACTIONS],"download objects from this bucket")},{action:()=>{t((0,F.mS)())},label:"Share",disabled:1!==We.length||!oe||He,icon:(0,y.jsx)(x.liv,{}),tooltip:oe?"Share Selected File":"Sharing unavailable"},{action:()=>{t((0,F.HS)())},label:"Preview",disabled:1!==We.length||!ie||He,icon:(0,y.jsx)(x.cyn,{}),tooltip:ie?"Preview Selected File":"Preview unavailable"},{action:()=>{t((0,F.oz)())},label:"Anonymous Access",disabled:1!==We.length||!We[0].endsWith("/")||!Ke,icon:(0,y.jsx)(x._kf,{}),tooltip:1===We.length&&We[0].endsWith("/")?"Set Anonymous Access to this Folder":"Anonymous Access unavailable"},{action:()=>{X(!0)},label:"Delete",icon:(0,y.jsx)(x.d7y,{}),disabled:!Me||0===We.length,tooltip:Me?"Delete Selected Files":(0,r.vj)([r.OV.S3_DELETE_OBJECT],"delete objects in this bucket")}];return(0,y.jsxs)(s.Fragment,{children:[J&&M&&(0,y.jsx)(Ae,{open:J,closeModalAndRefresh:()=>{t((0,d.Lf)(!1)),t((0,d.go)(null))},bucketName:be,dataObject:{name:M.name,last_modified:"",version_id:M.version_id}}),Q&&(0,y.jsx)(Ne,{deleteOpen:Q,selectedBucket:be,selectedObjects:We,closeDeleteModalAndRefresh:e=>{X(!1),e&&(t((0,O.Hk)("Objects deleted successfully.")),t((0,d.KX)([])),t((0,d.Yw)(!0)))},versioning:U}),ee&&(0,y.jsx)(Ie,{open:ee,closeModalAndRefresh:()=>{te(!1)},bucketName:be}),K&&M&&(0,y.jsx)(ke,{open:K,bucketName:be,actualInfo:{name:M.name||"",last_modified:"",version_id:M.version_id||"",size:M.size||0},onClosePreview:()=>{t((0,d.xE)(!1)),t((0,d.go)(null))}}),!!G&&(0,y.jsx)(re,{open:!!G,closeModal:()=>{t((0,d.Ew)(null))},currentItem:(null===(e=G.name.split("/"))||void 0===e?void 0:e.pop())||"",bucketName:be,internalPaths:ve,actualInfo:{name:G.name,last_modified:"",version_id:G.version_id,size:G.size}}),Y&&(0,y.jsx)(Ee.default,{onClose:()=>{t((0,d.I8)(!1))},bucket:be,modalOpen:Y,prefilledRoute:"".concat(We[0],"*")}),(0,y.jsxs)(x.Mxu,{variant:"full",children:[H&&(0,y.jsx)("div",{style:{paddingBottom:16},children:(0,y.jsx)(Ce,{})}),(0,y.jsx)(x.azJ,{withBorders:!0,sx:{padding:"0 5px"},children:(0,y.jsx)(x.lcx,{icon:(0,y.jsx)("span",{children:(0,y.jsx)(x.brV,{style:{width:30}})}),title:be,subTitle:H?null:(0,y.jsxs)(x.azJ,{sx:{"& .detailsSpacer":{marginRight:18,"@media (max-width: 600px)":{marginRight:0}}},children:[(0,y.jsxs)("span",{className:"detailsSpacer",children:["Created on:\xa0",(0,y.jsx)("strong",{children:null!==q&&void 0!==q&&q.creation_date?ot.toFormat("ccc, LLL dd yyyy HH:mm:ss (ZZZZ)"):""})]}),(0,y.jsxs)("span",{className:"detailsSpacer",children:["Access:\xa0\xa0",(0,y.jsx)("strong",{children:(null===q||void 0===q?void 0:q.access)||""})]}),q&&(0,y.jsx)(s.Fragment,{children:(0,y.jsxs)("span",{className:"detailsSpacer",children:[q.size&&(0,y.jsx)(s.Fragment,{children:(0,c.qO)(q.size)}),q.size&&ce&&(0,y.jsxs)(s.Fragment,{children:[" ","/ ",(0,c.qO)(ce.quota||0)]}),q.size&&q.objects?" - ":"",q.objects&&(0,y.jsxs)(s.Fragment,{children:[q.objects,"\xa0Object",q.objects&&1!==q.objects?"s":""]})]})})]}),actions:(0,y.jsxs)(s.Fragment,{children:[!H&&(0,y.jsx)(L.A,{tooltip:Ge?"Rewind Bucket":(0,r.vj)([r.OV.S3_GET_OBJECT,r.OV.S3_GET_ACTIONS,r.OV.S3_GET_BUCKET_VERSIONING],"apply rewind in this bucket"),children:(0,y.jsx)(x.$nd,{id:"rewind-objects-list",label:"Rewind",icon:(0,y.jsx)(x.Exy,{color:"alert",dotOnly:!0,invisible:!g,children:(0,y.jsx)(x.osr,{style:{minWidth:16,minHeight:16,width:16,height:16,marginTop:-3}})}),variant:"regular",onClick:()=>{te(!0)},disabled:!je||!Ge})}),(0,y.jsx)(L.A,{tooltip:"Reload List",children:(0,y.jsx)(x.$nd,{id:"refresh-objects-list",label:"Refresh",icon:(0,y.jsx)(x.fNY,{}),variant:"regular",onClick:()=>{v?t((0,d.SK)(!0)):(t((0,d.A3)()),t((0,d.Yw)(!0)))},disabled:!H&&(!(0,_._)(be,[r.OV.S3_LIST_BUCKET,r.OV.S3_ALL_LIST_BUCKET])||g)})}),(0,y.jsx)("input",{type:"file",multiple:!0,accept:Re||void 0,onChange:$e,style:{display:"none"},ref:we}),(0,y.jsx)("input",{type:"file",multiple:!0,onChange:$e,style:{display:"none"},ref:ye}),(0,y.jsx)(V,{bucketName:be,uploadPath:Pe,uploadFileFunction:e=>{we&&we.current&&we.current.click(),e()},uploadFolderFunction:e=>{ye&&ye.current&&ye.current.click(),e()}})]}),bottomBorder:!1})}),(0,y.jsxs)("div",{id:"object-list-wrapper",...Qe({style:{...nt}}),children:[(0,y.jsx)("input",{...Xe()}),(0,y.jsxs)(x.azJ,{withBorders:!0,sx:{display:"flex",borderTop:0,padding:0,"& .hideListOnSmall":{"@media (max-width: 799px)":{display:"none"}}},children:[v?(0,y.jsx)(s.Fragment,{children:null!==E&&(0,y.jsx)(fe,{internalPaths:E,bucketName:be})}):(0,y.jsx)(_.R,{scopes:[r.OV.S3_LIST_BUCKET,r.OV.S3_ALL_LIST_BUCKET],resource:be,errorProps:{disabled:!0},children:(0,y.jsxs)(x.xA9,{item:!0,xs:12,sx:{width:"100%",position:"relative","&.detailsOpen":{"@media (max-width: 799px)":{display:"none"}}},className:C?"detailsOpen":"",children:[!H&&(0,y.jsx)(x.xA9,{item:!0,xs:12,sx:{padding:"12px 14px 5px"},children:(0,y.jsx)(N,{bucketName:be,internalPaths:_e,additionalOptions:!je||g?null:(0,y.jsx)(x.Sc0,{name:"deleted_objects",id:"showDeletedObjects",value:"deleted_on",label:"Show deleted objects",onChange:()=>{t((0,d.A3)()),t((0,d.lA)(!S)),st(!0)},checked:S,sx:{marginLeft:5,"@media (max-width: 600px)":{marginLeft:0,flexDirection:"row"}}}),hidePathButton:!1})}),(0,y.jsx)(Te,{})]})}),!H&&(0,y.jsx)(_.R,{scopes:[r.OV.S3_LIST_BUCKET,r.OV.S3_ALL_LIST_BUCKET],resource:be,errorProps:{disabled:!0},children:(0,y.jsxs)(D,{open:C,closePanel:()=>{st(!1)},className:"".concat(v?"hideListOnSmall":""),children:[We.length>0&&(0,y.jsx)(x.Smc,{items:it,title:"Selected Objects:"}),null!==E&&(0,y.jsx)(de,{internalPaths:E,bucketName:be,onClosePanel:st,versioningInfo:U,locking:z})]})})]})]})]})]})};var De=n(18218),Pe=n(69772),Re=n(48793),Ue=n(59707),ze=n(55968);const Ge=e=>{let{bucketName:t}=e;const n=(0,l.jL)(),i=(0,o.d4)(we.s$),c=(0,o.d4)((e=>e.objectBrowser.versionsMode)),u=(0,o.d4)((e=>e.objectBrowser.versionedFile)),h=(0,o.d4)((e=>e.objectBrowser.searchVersions)),m=!(null===i||void 0===i||!i.includes("object-browser-only")),p=(0,a.Zp)(),j=(0,De.A)(t,[r.OV.S3_GET_BUCKET_POLICY,r.OV.S3_PUT_BUCKET_POLICY,r.OV.S3_GET_BUCKET_VERSIONING,r.OV.S3_PUT_BUCKET_VERSIONING,r.OV.S3_GET_BUCKET_ENCRYPTION_CONFIGURATION,r.OV.S3_PUT_BUCKET_ENCRYPTION_CONFIGURATION,r.OV.S3_DELETE_BUCKET,r.OV.S3_GET_BUCKET_NOTIFICATIONS,r.OV.S3_PUT_BUCKET_NOTIFICATIONS,r.OV.S3_GET_REPLICATION_CONFIGURATION,r.OV.S3_PUT_REPLICATION_CONFIGURATION,r.OV.S3_GET_LIFECYCLE_CONFIGURATION,r.OV.S3_PUT_LIFECYCLE_CONFIGURATION,r.OV.ADMIN_GET_BUCKET_QUOTA,r.OV.ADMIN_SET_BUCKET_QUOTA,r.OV.S3_PUT_BUCKET_TAGGING,r.OV.S3_GET_BUCKET_TAGGING,r.OV.S3_LIST_BUCKET_VERSIONS,r.OV.S3_GET_BUCKET_POLICY_STATUS,r.OV.S3_DELETE_BUCKET_POLICY,r.OV.S3_GET_ACTIONS,r.OV.S3_PUT_ACTIONS]),b=(0,y.jsx)(s.Fragment,{children:c?(0,y.jsx)(s.Fragment,{children:(0,y.jsx)(ye.A,{placeholder:"Start typing to filter versions of ".concat(u),onChange:e=>{n((0,d.aj)(e))},value:h})}):(0,y.jsx)(_.R,{scopes:[r.OV.S3_LIST_BUCKET,r.OV.S3_ALL_LIST_BUCKET],resource:t,errorProps:{disabled:!0},children:(0,y.jsx)(Ce,{})})});return(0,s.useEffect)((()=>{n((0,O.ph)("object_browser"))}),[]),(0,y.jsx)(s.Fragment,{children:m?(0,y.jsxs)(x.xA9,{container:!0,sx:{padding:"20px 32px 0"},children:[(0,y.jsx)(x.xA9,{children:(0,y.jsx)(Pe.A,{marginRight:30,marginTop:10})}),(0,y.jsxs)(x.xA9,{item:!0,xs:!0,sx:{display:"flex",gap:10},children:[b,(0,y.jsx)(Ue.A,{})]})]}):(0,y.jsx)(Re.A,{label:(0,y.jsx)(x.EGL,{label:"Object Browser",onClick:()=>{p(r.zZ.OBJECT_BROWSER_VIEW)}}),actions:(0,y.jsxs)(s.Fragment,{children:[(0,y.jsx)(_.R,{scopes:r.pC[r.ac.BUCKET_ADMIN],resource:t,errorProps:{disabled:!0},children:(0,y.jsx)(L.A,{tooltip:j?"Configure Bucket":"You do not have the required permissions to configure this bucket. Please contact your MinIO administrator to request "+r.ac.BUCKET_ADMIN+" permisions.",children:(0,y.jsx)(x.$nd,{id:"configure-bucket-main",color:"primary","aria-label":"Configure Bucket",onClick:()=>p("/buckets/".concat(t,"/admin")),icon:(0,y.jsx)(x.Zes,{style:{width:20,height:20,marginTop:-3}}),style:{padding:"0 10px"}})})}),(0,y.jsx)(ze.A,{})]}),middleComponent:b})})},Me=()=>{const e=(0,l.jL)(),t=(0,a.g)(),n=(0,a.zy)(),u=(0,o.d4)((e=>e.objectBrowser.loadingVersioning)),h=(0,o.d4)((e=>e.objectBrowser.rewind.rewindEnabled)),x=(0,o.d4)((e=>e.objectBrowser.rewind.dateToRewind)),m=(0,o.d4)((e=>e.objectBrowser.showDeleted)),p=(0,o.d4)((e=>e.objectBrowser.requestInProgress)),j=(0,o.d4)((e=>e.objectBrowser.loadingLocking)),b=(0,o.d4)((e=>e.objectBrowser.reloadObjectsList)),g=(0,o.d4)((e=>e.objectBrowser.simplePath)),f=(0,o.d4)((e=>e.system.anonymousMode)),v=(0,o.d4)((e=>e.objectBrowser.selectedBucket)),_=(0,o.d4)((e=>e.objectBrowser.records)),S=t.bucketName||"",O=n.pathname.split("/browser/".concat(S,"/")),w=2===O.length?O[1]:"",T=(0,s.useCallback)((t=>{let n=(new Date).toISOString();null!==x&&h&&(n=x);e({type:"socket/OBRequest",payload:{bucketName:S,path:t,rewindMode:h||m,date:n}})}),[S,m,x,h,e]),C=(0,s.useCallback)((function(){let t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];const n=(0,c.x6)(w);e((0,d.cQ)({status:!1}));let s=n;n.endsWith("/")||""===n||(s="".concat(n.split("/").slice(0,-1).join("/"),"/")),"/"===s&&(s=""),(s!==g||S!==v||t)&&(e((0,d.u)(!0)),T(s))}),[w,e,g,v,S,T]);(0,s.useEffect)((()=>()=>{e({type:"socket/OBCancelLast"})}),[e]),(0,s.useEffect)((()=>{const t=(0,c.x6)(w);e((0,d.vn)(!0)),t.endsWith("/")||""===t?(e((0,d.TO)(!1)),e((0,d.A7)(null)),e((0,d.Qy)(!0))):(e((0,d.oe)(!0)),e((0,d.TO)(!0)),e((0,d.SK)(!0)),e((0,d.A7)("".concat(t?"".concat((0,c.nf)(t)):""))))}),[S,w,x,h,e]),(0,s.useEffect)((()=>{C(!1)}),[C]),(0,s.useEffect)((()=>{b&&0===_.length&&!p&&C(!0)}),[b,_,p,C]);const E=(0,De.A)(S,[r.OV.S3_LIST_BUCKET,r.OV.S3_ALL_LIST_BUCKET])||f;return(0,s.useEffect)((()=>{u&&!f&&(E?i.F.buckets.getBucketVersioning(S).then((t=>{e((0,d.AP)(t.data)),e((0,d.vn)(!1))})).catch((t=>{console.error("Error Getting Object Versioning Status: ",t.error.detailedMessage),e((0,d.vn)(!1))})):(e((0,d.vn)(!1)),e((0,d.A3)())))}),[S,u,e,E,f]),(0,s.useEffect)((()=>{j&&(E?i.F.buckets.getBucketObjectLockingStatus(S).then((t=>{e((0,d.xW)(t.data.object_locking_enabled)),e((0,d.Qy)(!1))})).catch((t=>{console.error("Error Getting Object Locking Status: ",t.error.detailedMessage),e((0,d.Qy)(!1))})):(e((0,d.A3)()),e((0,d.Qy)(!1))))}),[S,j,e,E]),(0,y.jsxs)(s.Fragment,{children:[!f&&(0,y.jsx)(Ge,{bucketName:S}),(0,y.jsx)(Ve,{})]})}},30718:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>f});var s=n(65043),o=n(22166),a=n(89923),i=n(61476),l=n.n(i),r=n(94141),c=n(24241),d=n(70579);const u=e=>{let{id:t,initialDate:n,label:o,maxSeconds:i,entity:l,onChange:r}=e;const u=Math.floor(i/86400),h=Math.floor(i%86400/3600),x=Math.floor(i%3600/60),[m,p]=(0,s.useState)(0),[j,b]=(0,s.useState)(0),[g,f]=(0,s.useState)(0),[v,_]=(0,s.useState)(!0),[S,O]=(0,s.useState)(c.c9.now());(0,s.useEffect)((()=>{p(u),b(h),f(x)}),[u,h,x]),(0,s.useEffect)((()=>{isNaN(j)||isNaN(m)||isNaN(g)||O(((e,t,n,s)=>c.c9.fromJSDate(e).plus({hours:n+24*t,minutes:s}))(n,m,j,g))}),[n,m,j,g]),(0,s.useEffect)((()=>{if(v){const e=S.toFormat("yyyy-MM-dd HH:mm:ss");r(e.split(" ").join("T"),!0)}else r("0000-00-00",!1)}),[S,r,v]),(0,s.useEffect)((()=>{let e=!0;(m<0||m>7||m>u||isNaN(m))&&(e=!1),(j<0||j>23||isNaN(j))&&(e=!1),(g<0||g>59||isNaN(g))&&(e=!1),m===u&&(j>h&&(e=!1),j===h&&g>x&&(e=!1)),m<=0&&j<=0&&g<=0&&(e=!1),_(e)}),[S,u,h,x,r,m,j,g]);const w={"& .textBoxContainer":{minWidth:0},"& input":{textAlign:"center",paddingRight:10,paddingLeft:10,width:40}};return(0,d.jsxs)(a.azJ,{className:"inputItem",children:[(0,d.jsx)(a.azJ,{sx:{display:"flex",alignItems:"center",marginBottom:5},children:(0,d.jsx)(a.l1Y,{htmlFor:t,children:o})}),(0,d.jsxs)(a.azJ,{sx:{display:"flex",alignItems:"flex-start",justifyContent:"space-evenly",gap:10,"& .reverseInput":{flexFlow:"row-reverse","& > label":{fontWeight:400,marginLeft:15,marginRight:25}}},children:[(0,d.jsx)(a.azJ,{children:(0,d.jsx)(a.cl_,{id:t,className:"reverseInput removeArrows",type:"number",min:"0",max:"7",label:"Days",name:t,onChange:e=>{p(parseInt(e.target.value))},value:m.toString(),sx:w,noLabelMinWidth:!0})}),(0,d.jsx)(a.azJ,{children:(0,d.jsx)(a.cl_,{id:t,className:"reverseInput removeArrows",type:"number",min:"0",max:"23",label:"Hours",name:t,onChange:e=>{b(parseInt(e.target.value))},value:j.toString(),sx:w,noLabelMinWidth:!0})}),(0,d.jsx)(a.azJ,{children:(0,d.jsx)(a.cl_,{id:t,className:"reverseInput removeArrows",type:"number",min:"0",max:"59",label:"Minutes",name:t,onChange:e=>{f(parseInt(e.target.value))},value:g.toString(),sx:w,noLabelMinWidth:!0})})]}),(0,d.jsx)(a.azJ,{sx:{display:"flex",alignItems:"center",justifyContent:"flex-start",marginTop:25,marginLeft:10,marginBottom:15,"& .validityText":{fontSize:14,marginTop:15,display:"flex",alignItems:"center",justifyContent:"center","@media (max-width: 900px)":{flexFlow:"column"},"& > .min-icon":{color:"#5E5E5E",width:15,height:15,marginRight:10}},"& .validTill":{fontWeight:"bold",marginLeft:15},"& .invalidDurationText":{marginTop:15,display:"flex",color:"red",fontSize:11}},children:v?(0,d.jsxs)("div",{className:"validityText",children:[(0,d.jsx)(a.qYV,{}),(0,d.jsxs)("div",{children:[l," will be available until:"]})," ",(0,d.jsx)("div",{className:"validTill",children:S.toFormat("MM/dd/yyyy HH:mm:ss ZZZZ")})]}):(0,d.jsx)("div",{className:"invalidDurationText",children:"Please select a valid duration."})})]})};var h=n(56483),x=n(64159),m=n(20554),p=n(56629),j=n(53518),b=n(81708),g=n(6035);const f=e=>{let{open:t,closeModalAndRefresh:n,bucketName:i,dataObject:c}=e;const f=(0,m.jL)(),v=(0,o.d4)(x.Rq),_=(0,o.d4)(g.yL),[S,O]=(0,s.useState)(""),[w,T]=(0,s.useState)(!0),[y,C]=(0,s.useState)(!1),[E,N]=(0,s.useState)(""),[A,I]=(0,s.useState)(!0),[k,B]=(0,s.useState)("null"),F=new Date;return(0,s.useEffect)((()=>{f((0,b.Ex)())}),[f]),(0,s.useEffect)((()=>{if(void 0===c.version_id)return v?(p.F.buckets.listObjects(i,{prefix:(0,h.nf)(c.name||""),with_versions:v}).then((e=>{const t=(e.data.objects||[]).find((e=>e.is_latest));B(t?"".concat(t.version_id):"null")})).catch((e=>{f((0,x.Dy)((0,j.S)(e.error)))})),void T(!1)):(B("null"),void T(!1));B(c.version_id||"null"),T(!1)}),[i,c,v,f]),(0,s.useEffect)((()=>{if(A&&!w){C(!0),O("");const e=new Date("".concat(E)),t=new Date,n=Math.ceil((e.getTime()-t.getTime())/1e3);n>0&&p.F.buckets.shareObject(i,{prefix:(0,h.nf)(c.name||""),version_id:k,expires:""!==E?"".concat(n,"s"):""}).then((e=>{O(e.data),C(!1)})).catch((e=>{f((0,x.Dy)((0,j.S)(e.error))),O(""),C(!1)}))}}),[c,E,i,A,O,f,v,w,k]),(0,d.jsx)(s.Fragment,{children:(0,d.jsxs)(r.A,{title:"Share File",titleIcon:(0,d.jsx)(a.liv,{style:{fill:"#4CCB92"}}),modalOpen:t,onClose:()=>{n()},children:[w&&(0,d.jsx)(a.xA9,{item:!0,xs:12,children:(0,d.jsx)(a.z21,{})}),!w&&(0,d.jsxs)(s.Fragment,{children:[(0,d.jsx)(a.xA9,{item:!0,xs:12,sx:{fontSize:14,fontWeight:400},children:(0,d.jsx)(a.m_M,{placement:"right",tooltip:(0,d.jsxs)("span",{children:["You can reset your session by logging out and logging back in to the web UI. ",(0,d.jsx)("br",{})," ",(0,d.jsx)("br",{}),"You can increase the maximum configuration time by setting the MINIO_STS_DURATION environment variable on all your nodes. ",(0,d.jsx)("br",{})," ",(0,d.jsx)("br",{}),"You can use ",(0,d.jsx)("b",{children:"mc share"})," as an alternative to this UI, where the session length does not limit the URL validity."]}),children:(0,d.jsxs)("span",{children:["The following URL lets you share this object without requiring a login. ",(0,d.jsx)("br",{}),"The URL expires automatically at the earlier of your configured time (",(0,h.K7)(_),") or the expiration of your current web session."]})})}),(0,d.jsx)("br",{}),(0,d.jsx)(a.xA9,{item:!0,xs:12,children:(0,d.jsx)(u,{initialDate:F,id:"date",label:"Active for",maxSeconds:_,onChange:(e,t)=>{I(t),t?N(e):(N(""),O(""))},entity:"Link"})}),(0,d.jsx)(a.xA9,{item:!0,xs:12,sx:{marginBottom:10},children:(0,d.jsx)(a.EmB,{actionButton:(0,d.jsx)(l(),{text:S,children:(0,d.jsx)(a.$nd,{id:"copy-path",variant:"regular",onClick:()=>{f((0,x.h0)("Share URL Copied to clipboard"))},disabled:""===S||y,style:{width:"28px",height:"28px",padding:"0px"},icon:(0,d.jsx)(a.TdU,{})})}),children:S})})]})]})})}},37524:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>f});var s=n(65043),o=n(94141),a=n(89923),i=n(33097),l=n.n(i),r=n(93445),c=n(56483),d=n(56629),u=n(72809),h=n(97806),x=n(10934),m=n(70579);u.A.GlobalWorkerOptions.workerSrc="./scripts/pdf.worker.min.js";const p=e=>{let{path:t,loading:n,onLoad:o,downloadFile:i}=e;const[l,r]=(0,s.useState)(!1),[c,d]=(0,s.useState)(0);if(!t)return null;const u=c>5?5:c,p=Array.from(Array(u).keys());return(0,m.jsxs)(s.Fragment,{children:[l&&0===c&&(0,m.jsx)(a.Wei,{variant:"error",title:"Error",message:(0,m.jsxs)(s.Fragment,{children:["File preview couldn't be displayed, Please try Download instead.",(0,m.jsx)(a.azJ,{sx:{display:"flex",justifyContent:"center",marginTop:12},children:(0,m.jsx)(a.$nd,{id:"download-preview",onClick:i,variant:"callAction",children:"Download File"})})]}),sx:{marginBottom:10}}),!n&&!l&&(0,m.jsx)(a.Wei,{variant:"warning",title:"File Preview",message:(0,m.jsxs)(s.Fragment,{children:["This is a File Preview for the first ",p.length," pages of the document, if you wish to work with the full document please download instead.",(0,m.jsx)(a.azJ,{sx:{display:"flex",justifyContent:"center",marginTop:12},children:(0,m.jsx)(a.$nd,{id:"download-preview",onClick:i,variant:"callAction",children:"Download File"})})]}),sx:{marginBottom:10}}),!l&&(0,m.jsx)(a.azJ,{sx:{overflowY:"auto","& .react-pdf__Page__canvas":{margin:"0 auto",backgroundColor:"transparent"}},children:(0,m.jsx)(h.A,{file:t,onLoadSuccess:e=>{let{_pdfInfo:t}=e;d(t.numPages||0),r(!1),o()},onLoadError:e=>{r(!0),o(),console.error(e)},children:p.map((e=>(0,m.jsx)(x.A,{pageNumber:e+1,renderAnnotationLayer:!1,renderTextLayer:!1,renderForms:!1},"render-page-".concat(e))))})})]})};var j=n(48245),b=n(20554);const g=e=>{let{bucketName:t,actualInfo:n,isFullscreen:o=!1}=e;const i=(0,b.jL)(),[u,h]=(0,s.useState)(!0),[x,g]=(0,s.useState)(null),[f,v]=(0,s.useState)(!1),_=(null===n||void 0===n?void 0:n.name)||"",S=(0,s.useCallback)((()=>{if(!f){const e=(0,c.nf)(_);d.F.buckets.getObjectMetadata(t,{prefix:e,versionID:n.version_id||""}).then((e=>{let t=l()(e.data,"objectMetadata",{});v(!0),g(t)})).catch((e=>{console.error("Error Getting Metadata Status: ",e,null===e||void 0===e?void 0:e.detailedError),v(!0)}))}}),[t,_,f,n.version_id]);(0,s.useEffect)((()=>{t&&_&&S()}),[t,_,S]);let O="";if(n){const e=(0,c.nf)(n.name||"");let s=document.baseURI.replace(window.location.origin,"");O="".concat(window.location.origin).concat(s,"api/v1/buckets/").concat(t,"/objects/download?preview=true&prefix=").concat(e),n.version_id&&(O=O.concat("&version_id=".concat(n.version_id)))}let w=(0,r.IZ)(x,_);const T=()=>{h(!1)};return(0,m.jsxs)(s.Fragment,{children:["none"!==w&&u&&(0,m.jsx)(a.xA9,{item:!0,xs:12,children:(0,m.jsx)(a.z21,{})}),f?(0,m.jsxs)(a.azJ,{sx:{textAlign:"center","& .iframeContainer":{border:"0px",flex:"1 1 auto",width:"100%",height:250,backgroundColor:"transparent",borderRadius:5,"&.image":{height:500},"&.audio":{height:150},"&.video":{height:350},"&.fullHeight":{height:"calc(100vh - 185px)"}},"& .iframeBase":{backgroundColor:"#fff"},"& .iframeHidden":{display:"none"}},children:["video"===w&&(0,m.jsx)("video",{style:{width:"auto",height:"auto",maxWidth:"calc(100vw - 100px)",maxHeight:"calc(100vh - 200px)"},autoPlay:!0,controls:!0,muted:!1,playsInline:!0,onPlay:T,children:(0,m.jsx)("source",{src:O,type:"video/mp4"})}),"audio"===w&&(0,m.jsx)("audio",{style:{width:"100%",height:"auto"},autoPlay:!0,controls:!0,muted:!1,playsInline:!0,onPlay:T,children:(0,m.jsx)("source",{src:O,type:"audio/mpeg"})}),"image"===w&&(0,m.jsx)("img",{style:{width:"auto",height:"auto",maxWidth:"100vw",maxHeight:"100vh"},src:O,alt:"preview",onLoad:T}),"pdf"===w&&(0,m.jsx)(s.Fragment,{children:(0,m.jsx)(p,{path:O,onLoad:T,loading:u,downloadFile:()=>(0,j._)(i,t,O,n)})}),"none"===w&&(0,m.jsx)("div",{children:(0,m.jsx)(a.Wei,{message:" File couldn't be previewed using file extension or mime type. Please try Download instead",title:"Preview unavailable",sx:{margin:"15px 0"}})}),"none"!==w&&"video"!==w&&"audio"!==w&&"image"!==w&&"pdf"!==w&&(0,m.jsx)("div",{className:"iframeBase ".concat(u?"iframeHidden":""),children:(0,m.jsx)("iframe",{src:O,title:"File Preview",allowTransparency:!0,className:"iframeContainer ".concat(o?"fullHeight":w),onLoad:T,children:"File couldn't be loaded. Please try Download instead"})})]}):null]})},f=e=>{let{open:t,bucketName:n,actualInfo:i,onClosePreview:l}=e;return(0,m.jsx)(s.Fragment,{children:(0,m.jsx)(o.A,{modalOpen:t,title:"Preview - ".concat(null===i||void 0===i?void 0:i.name),onClose:l,wideLimit:!1,titleIcon:(0,m.jsx)(a.jG,{}),children:(0,m.jsx)(g,{bucketName:n,actualInfo:i})})})}},72237:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});var s=n(65043),o=n(70579);const a=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return function(n){return(0,o.jsx)(s.Suspense,{fallback:t,children:(0,o.jsx)(e,{...n})})}}},81708:(e,t,n)=>{"use strict";n.d(t,{Ex:()=>p,HS:()=>h,mS:()=>x,op:()=>u,oz:()=>m});var s=n(80907),o=n(56483),a=n(37414),i=n(93445),l=n(6035),r=n(64159),c=n(24241),d=n(56629);const u=(0,s.zD)("objectBrowser/downloadSelected",(async(e,t)=>{let{getState:n,rejectWithValue:s,dispatch:d}=t;const u=n(),h=t=>{const n=(0,o.nf)("".concat(e,"-").concat(t.name,"-").concat((new Date).getTime(),"-").concat(Math.random())),s=(0,a.E0)(8),c=(0,i.RG)(e,(0,o.nf)(t.name),t.version_id,t.size,null,s,(e=>{d((0,l.DW)({instanceID:n,progress:e}))}),(()=>{d((0,l.rx)(n))}),(e=>{d((0,l.iL)({instanceID:n,msg:e}))}),(()=>{d((0,l.Dm)(n))}),(()=>{d((0,r.Hk)("File download will be handled directly by the browser."))}));(0,a.FP)(s,c),d((0,l.cP)({ID:s,bucketName:e,done:!1,instanceID:n,percentage:0,prefix:t.name,type:"download",waitingForFile:!0,failed:!1,cancelled:!1,errorMessage:""}))};if(0!==u.objectBrowser.selectedObjects.length){let t=[];const n=e=>u.objectBrowser.selectedObjects.includes(e.name);if(t=u.objectBrowser.records.filter(n),1===t.length){if(t[0].name.length>200&&(0,o.oK)().toLowerCase().includes("win"))return void d((0,l.Ew)(t[0]));h(t[0])}else if(1===t.length)h(t[0]);else if(t.length>1){const n="".concat(c.c9.now().toFormat("LL-dd-yyyy-HH-mm-ss"),"_files_list.zip"),s=t.reduce(((e,t)=>{const n=null===t||void 0===t?void 0:t.delete_flag;return t&&!n?e.push(t.name):console.log("Skipping ".concat(null===t||void 0===t?void 0:t.name," from download.")),e}),[]);return void await(0,i.Fj)(e,s,n)}}})),h=(0,s.zD)("objectBrowser/openPreview",(async(e,t)=>{let{getState:n,rejectWithValue:s,dispatch:o}=t;const a=n();if(1===a.objectBrowser.selectedObjects.length){let e;const t=e=>a.objectBrowser.selectedObjects.includes(e.name);e=a.objectBrowser.records.find(t),e&&(o((0,l.go)(e)),o((0,l.xE)(!0)))}})),x=(0,s.zD)("objectBrowser/openShare",(async(e,t)=>{let{getState:n,rejectWithValue:s,dispatch:o}=t;const a=n();if(1===a.objectBrowser.selectedObjects.length){let e;const t=e=>a.objectBrowser.selectedObjects.includes(e.name);e=a.objectBrowser.records.find(t),e&&(o((0,l.go)(e)),o((0,l.Lf)(!0)))}})),m=(0,s.zD)("objectBrowser/openAnonymousAccess",(async(e,t)=>{let{getState:n,dispatch:s}=t;const o=n();1===o.objectBrowser.selectedObjects.length&&o.objectBrowser.selectedObjects[0].endsWith("/")&&s((0,l.I8)(!0))})),p=(0,s.zD)("objectBrowser/maxShareLinkExpTime",(async(e,t)=>{let{rejectWithValue:n,dispatch:s}=t;return d.F.buckets.getMaxShareLinkExp().then((e=>{s((0,l.QV)(e.data.exp))})).catch((async e=>n(e.error)))}))},48245:(e,t,n)=>{"use strict";n.d(t,{_:()=>r});var s=n(56483),o=n(37414),a=n(93445),i=n(6035),l=n(64159);const r=(e,t,n,r)=>{var c;const d=(0,s.nf)("".concat(t,"-").concat(r.name,"-").concat((new Date).getTime(),"-").concat(Math.random())),u=(0,s.oK)().toLowerCase().includes("win");if(((null===(c=r.name)||void 0===c?void 0:c.length)||0)>200&&u)return void e((0,i.Jl)(!0));const h=(0,o.E0)(8),x=(0,a.RG)(t,n,r.version_id,r.size||0,null,h,(t=>{e((0,i.DW)({instanceID:d,progress:t}))}),(()=>{e((0,i.rx)(d))}),(t=>{e((0,i.iL)({instanceID:d,msg:t}))}),(()=>{e((0,i.Dm)(d))}),(()=>{e((0,l.Hk)("File download will be handled directly by the browser."))}));(0,o.FP)(h,x),e((0,i.cP)({ID:h,bucketName:t,done:!1,instanceID:d,percentage:0,prefix:r.name||"",type:"download",waitingForFile:!0,failed:!1,cancelled:!1,errorMessage:""}))}},49501:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});var s=n(65043),o=n(89923),a=n(70579);const i=e=>{let{value:t}=e;const[n,i]=(0,s.useState)(!1);return(0,a.jsxs)(o.azJ,{sx:{display:"flex",alignItems:"center",flexFlow:"row",["@media (max-width: ".concat(o.nmC.sm,"px)")]:{flexFlow:"column"}},children:[(0,a.jsx)(o.cl_,{id:"inspect-dec-key",name:"inspect-dec-key",placeholder:"",label:"",type:n?"text":"password",onChange:()=>{},value:t,overlayIcon:(0,a.jsx)(o.TdU,{}),readOnly:!0,overlayAction:()=>navigator.clipboard.writeText(t)}),(0,a.jsx)(o.$nd,{id:"show-hide-key",style:{marginLeft:"10px"},variant:"callAction",onClick:()=>i(!n),label:"Show/Hide"})]})}},17640:()=>{},23237:()=>{},97492:()=>{},31815:()=>{},66671:()=>{},82787:()=>{}}]);
-//# sourceMappingURL=2959.c4f178f1.chunk.js.map
\ No newline at end of file
diff --git a/web-app/build/static/js/2959.c4f178f1.chunk.js.map b/web-app/build/static/js/2959.c4f178f1.chunk.js.map
deleted file mode 100644
index 4b84321a4..000000000
--- a/web-app/build/static/js/2959.c4f178f1.chunk.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"static/js/2959.c4f178f1.chunk.js","mappings":"4OA0CA,MA0GA,EA1GsBA,IAKC,IALA,UACrBC,EAAS,QACTC,EAAO,OACPC,EAAM,eACNC,GACeJ,EACf,MAAMK,GAAWC,EAAAA,EAAAA,OAEVC,EAAQC,IAAaC,EAAAA,EAAAA,UAAS,KAC9BC,EAAgBC,IAAqBF,EAAAA,EAAAA,UAAc,aAE1DG,EAAAA,EAAAA,YAAU,KACJR,GACFI,EAAUJ,EACZ,GACC,CAACA,IA6BJ,OACES,EAAAA,EAAAA,KAACC,EAAAA,EAAY,CACXb,UAAWA,EACXc,MAAM,4BACNb,QAASA,EACTc,WAAWH,EAAAA,EAAAA,KAACI,EAAAA,IAAiB,IAAIC,UAEjCC,EAAAA,EAAAA,MAACC,EAAAA,IAAU,CAACC,aAAa,EAAOC,kBAAkB,EAAMJ,SAAA,EACtDL,EAAAA,EAAAA,KAACU,EAAAA,IAAQ,CACPC,MAAOjB,EACPkB,MAAO,SACPC,GAAI,SACJC,KAAM,SACNC,YAAa,eACbC,SAAWC,IACTtB,EAAUsB,EAAEC,OAAOP,MAAM,EAE3BQ,QACE,2SAGJnB,EAAAA,EAAAA,KAACoB,EAAAA,IAAM,CACLP,GAAG,SACHC,KAAK,SACLE,SAAWL,IACTb,EAAkBa,EAAM,E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sBAAD3W,OAAuBU,EAAAA,IAAYwkC,GAAE,QAAQ,CAC3CvuB,SAAU,WAEZpb,SAAA,EAEFL,EAAAA,EAAAA,KAACU,EAAAA,IAAQ,CACPG,GAAG,kBACHC,KAAK,kBACLC,YAAY,GACZH,MAAM,GACNqB,KAAM6nC,EAAQ,OAAS,WACvB9oC,SAAUA,OACVL,MAAOA,EACPspC,aAAajqC,EAAAA,EAAAA,KAAC+J,EAAAA,IAAQ,IACtBmgC,UAAU,EACVC,cAAeA,IAAMC,UAAUC,UAAUC,UAAU3pC,MAGrDX,EAAAA,EAAAA,KAACgC,EAAAA,IAAM,CACLnB,GAAI,gBACJ6H,MAAO,CACL+E,WAAY,QAEdvL,QAAQ,aACRC,QAASA,IAAM4nC,GAAUD,GACzBlpC,MAAO,gBAEL,C","sources":["screens/Console/Buckets/BucketDetails/AddAccessRule.tsx","screens/Console/Buckets/ListBuckets/UploadPermissionUtils.ts","screens/Console/ObjectBrowser/BrowserBreadcrumbs.tsx","utils/validationFunctions.ts","screens/Console/Buckets/ListBuckets/UploadFilesButton.tsx","screens/Console/Buckets/ListBuckets/Objects/ListObjects/DetailsListPanel.tsx","screens/Console/Buckets/ListBuckets/Objects/ListObjects/IconWithLabel.tsx","screens/Console/Buckets/ListBuckets/Objects/ListObjects/utils.tsx","screens/Console/Buckets/ListBuckets/Objects/ObjectDetails/ObjectMetaData.tsx","screens/Console/Common/FormComponents/DateSelector/utils.ts","screens/Console/Common/FormComponents/DateSelector/DateSelector.tsx","screens/Console/Buckets/ListBuckets/Objects/ObjectDetails/SetRetention.tsx","screens/Console/Buckets/ListBuckets/Objects/ListObjects/DeleteObject.tsx","screens/Console/Buckets/ListBuckets/Objects/ObjectDetails/SetLegalHoldModal.tsx","screens/Console/Buckets/ListBuckets/Objects/ObjectDetails/TagsModal.tsx","screens/Console/Buckets/ListBuckets/Objects/ListObjects/InspectObject.tsx","screens/Console/ObjectBrowser/RenameLongFilename.tsx","screens/Console/Buckets/ListBuckets/Objects/ListObjects/ObjectDetailPanel.tsx","screens/Console/Buckets/ListBuckets/Objects/ObjectDetails/RestoreFileVersion.tsx","screens/Console/Buckets/ListBuckets/Objects/ObjectDetails/SpecificVersionPill.tsx","screens/Console/Buckets/ListBuckets/Objects/ObjectDetails/FileVersionItem.tsx","screens/Console/Buckets/ListBuckets/Objects/ListObjects/DeleteNonCurrent.tsx","screens/Console/Buckets/ListBuckets/Objects/ObjectDetails/DeleteSelectedVersions.tsx","screens/Console/Buckets/ListBuckets/Objects/ObjectDetails/VersionsNavigator.tsx","screens/Console/Buckets/ListBuckets/Objects/ListObjects/ListObjectsHelpers.tsx","screens/Console/Buckets/ListBuckets/Objects/ListObjects/ListObjectsTable.tsx","screens/Console/ObjectBrowser/FilterObjectsSB.tsx","screens/Console/Buckets/ListBuckets/Objects/ListObjects/ListObjects.tsx","screens/Console/ObjectBrowser/OBHeader.tsx","screens/Console/Buckets/BucketDetails/BrowserHandler.tsx","screens/Console/Common/FormComponents/DaysSelector/DaysSelector.tsx","screens/Console/Buckets/ListBuckets/Objects/ObjectDetails/ShareFile.tsx","screens/Console/Buckets/ListBuckets/Objects/Preview/PreviewPDF.tsx","screens/Console/Buckets/ListBuckets/Objects/Preview/PreviewFileContent.tsx","screens/Console/Buckets/ListBuckets/Objects/Preview/PreviewFileModal.tsx","screens/Console/Common/Components/withSuspense.tsx","screens/Console/ObjectBrowser/objectBrowserThunks.ts","screens/Console/ObjectBrowser/utils.ts","screens/Console/Tools/KeyRevealer.tsx"],"sourcesContent":["// This file is part of MinIO Console Server\n// Copyright (c) 2021 MinIO, Inc.\n//\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU Affero General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU Affero General Public License for more details.\n//\n// You should have received a copy of the GNU Affero General Public License\n// along with this program. If not, see .\n\nimport React, { useEffect, useState, Fragment } from \"react\";\nimport ModalWrapper from \"../../Common/ModalWrapper/ModalWrapper\";\nimport {\n AddAccessRuleIcon,\n Button,\n FormLayout,\n Grid,\n InputBox,\n Select,\n} from \"mds\";\nimport { api } from \"api\";\nimport { errorToHandler } from \"api/errors\";\nimport { modalStyleUtils } from \"../../Common/FormComponents/common/styleLibrary\";\nimport {\n setErrorSnackMessage,\n setSnackBarMessage,\n} from \"../../../../systemSlice\";\nimport { useAppDispatch } from \"../../../../store\";\n\ninterface IAddAccessRule {\n modalOpen: boolean;\n onClose: () => any;\n bucket: string;\n prefilledRoute?: string;\n}\n\nconst AddAccessRule = ({\n modalOpen,\n onClose,\n bucket,\n prefilledRoute,\n}: IAddAccessRule) => {\n const dispatch = useAppDispatch();\n\n const [prefix, setPrefix] = useState(\"\");\n const [selectedAccess, setSelectedAccess] = useState(\"readonly\");\n\n useEffect(() => {\n if (prefilledRoute) {\n setPrefix(prefilledRoute);\n }\n }, [prefilledRoute]);\n\n const accessOptions = [\n { label: \"readonly\", value: \"readonly\" },\n { label: \"writeonly\", value: \"writeonly\" },\n { label: \"readwrite\", value: \"readwrite\" },\n ];\n\n const resetForm = () => {\n setPrefix(\"\");\n setSelectedAccess(\"readonly\");\n };\n\n const createProcess = () => {\n api.bucket\n .setAccessRuleWithBucket(bucket, {\n prefix: prefix,\n access: selectedAccess,\n })\n .then((res: any) => {\n dispatch(setSnackBarMessage(\"Access Rule added successfully\"));\n onClose();\n })\n .catch((res) => {\n dispatch(setErrorSnackMessage(errorToHandler(res.error)));\n onClose();\n });\n };\n\n return (\n }\n >\n \n {\n setPrefix(e.target.value);\n }}\n tooltip={\n \"Enter '/' to apply the rule to all prefixes and objects at the bucket root. Do not include the wildcard asterisk '*' as part of the prefix *unless* it is an explicit part of the prefix name. The Console automatically appends an asterisk to the appropriate sections of the resulting IAM policy.\"\n }\n />\n \n \n );\n};\n\nexport default AddAccessRule;\n","// This file is part of MinIO Console Server\n// Copyright (c) 2023 MinIO, Inc.\n//\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU Affero General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU Affero General Public License for more details.\n//\n// You should have received a copy of the GNU Affero General Public License\n// along with this program. If not, see .\n\nexport const extractFileExtn = (resourceStr: string) => {\n //file extensions may contain query string. so exclude query strings !\n return (resourceStr.match(/\\.([^.]*?)(?=\\?|#|$)/) || [])[1];\n};\nexport const getPolicyAllowedFileExtensions = (\n sessionGrants: Record,\n uploadPath: string,\n scopes: string[] = [],\n) => {\n const sessionGrantWildCards = getSessionGrantsWildCard(\n sessionGrants,\n uploadPath,\n scopes,\n );\n\n //get acceptable files if any in the policy.\n const allowedFileExtensions = sessionGrantWildCards.reduce(\n (acc: string[], cv: string) => {\n const extension: string = extractFileExtn(cv);\n if (extension) {\n acc.push(`.${extension}`); //strict extension matching.\n }\n return acc;\n },\n [],\n );\n\n const uniqueExtensions = [...new Set(allowedFileExtensions)];\n return uniqueExtensions.join(\",\");\n};\n\n// The resource should not have the extensions (*.ext) for the hasPermission to work.\n// so sanitize this and also use to extract the allowed extensions outside of permission check.\nexport const getSessionGrantsWildCard = (\n sessionGrants: Record,\n uploadPath: string,\n scopes: string[] = [],\n) => {\n //get only the path matching grants to reduce processing.\n const grantsWithExtension = Object.keys(sessionGrants).reduce(\n (acc: Record, grantKey: string) => {\n if (extractFileExtn(grantKey) && grantKey.includes(uploadPath)) {\n acc[grantKey] = sessionGrants[grantKey];\n }\n return acc;\n },\n {},\n );\n\n const checkPathsForPermission = (sessionGrantKey: string) => {\n const grantActions = grantsWithExtension[sessionGrantKey];\n const hasScope = grantActions.some((actionKey) =>\n scopes.find((scopeKey) => {\n let wildCardMatch = false;\n const hasWildCard = scopeKey.indexOf(\"*\") !== -1;\n if (hasWildCard) {\n const scopeActionKey = scopeKey.substring(0, scopeKey.length - 1);\n\n wildCardMatch = actionKey.includes(scopeActionKey);\n }\n\n return wildCardMatch || actionKey === scopeKey;\n }),\n );\n\n const sessionGrantKeyPath = sessionGrantKey.substring(\n 0,\n sessionGrantKey.indexOf(\"/*.\"), //start of extension part.\n );\n const isUploadPathMatching =\n sessionGrantKeyPath === `arn:aws:s3:::${uploadPath}`;\n\n const hasGrant =\n isUploadPathMatching && sessionGrantKey !== \"arn:aws:s3:::*\";\n\n return hasScope && hasGrant;\n };\n\n return Object.keys(grantsWithExtension).filter(checkPathsForPermission);\n};\n","// This file is part of MinIO Console Server\n// Copyright (c) 2022 MinIO, Inc.\n//\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU Affero General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU Affero General Public License for more details.\n//\n// You should have received a copy of the GNU Affero General Public License\n// along with this program. If not, see .\n\nimport React, { Fragment, useEffect, useState } from \"react\";\nimport { useSelector } from \"react-redux\";\nimport CopyToClipboard from \"react-copy-to-clipboard\";\nimport styled from \"styled-components\";\nimport { Link, useNavigate } from \"react-router-dom\";\nimport { encodeURLString, safeDecodeURIComponent } from \"../../../common/utils\";\nimport {\n Button,\n CopyIcon,\n NewPathIcon,\n Tooltip,\n Breadcrumbs,\n breakPoints,\n Box,\n} from \"mds\";\nimport { hasPermission } from \"../../../common/SecureComponent\";\nimport {\n IAM_SCOPES,\n permissionTooltipHelper,\n} from \"../../../common/SecureComponent/permissions\";\nimport withSuspense from \"../Common/Components/withSuspense\";\nimport { setSnackBarMessage } from \"../../../systemSlice\";\nimport { AppState, useAppDispatch } from \"../../../store\";\nimport { setVersionsModeEnabled } from \"./objectBrowserSlice\";\nimport { getSessionGrantsWildCard } from \"../Buckets/ListBuckets/UploadPermissionUtils\";\n\nconst CreatePathModal = withSuspense(\n React.lazy(\n () => import(\"../Buckets/ListBuckets/Objects/ListObjects/CreatePathModal\"),\n ),\n);\n\nconst BreadcrumbsMain = styled.div(() => ({\n display: \"flex\",\n \"& .additionalOptions\": {\n paddingRight: \"10px\",\n display: \"flex\",\n alignItems: \"center\",\n [`@media (max-width: ${breakPoints.lg}px)`]: {\n display: \"none\",\n },\n },\n \"& .slashSpacingStyle\": {\n margin: \"0 5px\",\n },\n}));\n\ninterface IObjectBrowser {\n bucketName: string;\n internalPaths: string;\n hidePathButton?: boolean;\n additionalOptions?: React.ReactNode;\n}\n\nconst BrowserBreadcrumbs = ({\n bucketName,\n internalPaths,\n hidePathButton,\n additionalOptions,\n}: IObjectBrowser) => {\n const dispatch = useAppDispatch();\n const navigate = useNavigate();\n\n const rewindEnabled = useSelector(\n (state: AppState) => state.objectBrowser.rewind.rewindEnabled,\n );\n const versionsMode = useSelector(\n (state: AppState) => state.objectBrowser.versionsMode,\n );\n const versionedFile = useSelector(\n (state: AppState) => state.objectBrowser.versionedFile,\n );\n const anonymousMode = useSelector(\n (state: AppState) => state.system.anonymousMode,\n );\n\n const [createFolderOpen, setCreateFolderOpen] = useState(false);\n const [canCreateSubpath, setCanCreateSubpath] = useState(false);\n\n const putObjectPermScopes = [\n IAM_SCOPES.S3_PUT_OBJECT,\n IAM_SCOPES.S3_PUT_ACTIONS,\n ];\n\n const sessionGrants = useSelector((state: AppState) =>\n state.console.session ? state.console.session.permissions || {} : {},\n );\n\n let paths = internalPaths;\n\n if (internalPaths !== \"\") {\n paths = `/${internalPaths}`;\n }\n\n const splitPaths = paths.split(\"/\").filter((path) => path !== \"\");\n const lastBreadcrumbsIndex = splitPaths.length - 1;\n\n const pathToCheckPerms = bucketName + paths || bucketName;\n const sessionGrantWildCards = getSessionGrantsWildCard(\n sessionGrants,\n pathToCheckPerms,\n putObjectPermScopes,\n );\n\n useEffect(() => {\n setCanCreateSubpath(false);\n Object.keys(sessionGrants).forEach((grant) => {\n grant.includes(pathToCheckPerms) &&\n grant.includes(\"/*\") &&\n setCanCreateSubpath(true);\n });\n }, [pathToCheckPerms, internalPaths, sessionGrants]);\n\n const canCreatePath =\n hasPermission(\n [pathToCheckPerms, ...sessionGrantWildCards],\n putObjectPermScopes,\n ) ||\n anonymousMode ||\n canCreateSubpath;\n\n let breadcrumbsMap = splitPaths.map((objectItem: string, index: number) => {\n const subSplit = `${splitPaths.slice(0, index + 1).join(\"/\")}/`;\n const route = `/browser/${bucketName}/${\n subSplit ? `${encodeURLString(subSplit)}` : ``\n }`;\n\n if (index === lastBreadcrumbsIndex && objectItem === versionedFile) {\n return null;\n }\n\n return (\n \n /\n {index === lastBreadcrumbsIndex ? (\n \n {safeDecodeURIComponent(objectItem) /*Only for display*/}\n \n ) : (\n {\n dispatch(\n setVersionsModeEnabled({ status: false, objectName: \"\" }),\n );\n }}\n >\n {\n safeDecodeURIComponent(\n objectItem,\n ) /*Only for display to preserve */\n }\n \n )}\n \n );\n });\n\n let versionsItem: any[] = [];\n\n if (versionsMode) {\n versionsItem = [\n \n \n /\n {versionedFile} - Versions\n \n ,\n ];\n }\n\n const listBreadcrumbs: any[] = [\n \n {\n dispatch(setVersionsModeEnabled({ status: false, objectName: \"\" }));\n }}\n >\n {bucketName}\n \n ,\n ...breadcrumbsMap,\n ...versionsItem,\n ];\n\n const closeAddFolderModal = () => {\n setCreateFolderOpen(false);\n };\n\n const goBackFunction = () => {\n if (versionsMode) {\n dispatch(setVersionsModeEnabled({ status: false, objectName: \"\" }));\n } else {\n if (splitPaths.length === 0) {\n navigate(\"/browser\");\n\n return;\n }\n\n const prevPath = splitPaths.slice(0, -1);\n\n navigate(\n `/browser/${bucketName}${\n prevPath.length > 0\n ? `/${encodeURLString(`${prevPath.join(\"/\")}/`)}`\n : \"\"\n }`,\n );\n }\n };\n\n return (\n \n \n {createFolderOpen && (\n \n )}\n \n \n \n }\n variant={\"regular\"}\n onClick={() => {\n dispatch(setSnackBarMessage(\"Path copied to clipboard\"));\n }}\n style={{\n width: \"28px\",\n height: \"28px\",\n color: \"#969FA8\",\n border: \"#969FA8 1px solid\",\n marginRight: 5,\n }}\n />\n \n {additionalOptions}\n \n }\n >\n {listBreadcrumbs}\n \n {!hidePathButton && (\n \n {\n setCreateFolderOpen(true);\n }}\n disabled={anonymousMode ? false : rewindEnabled || !canCreatePath}\n icon={}\n style={{\n whiteSpace: \"nowrap\",\n }}\n variant={\"regular\"}\n label={\"Create new path\"}\n />\n \n )}\n \n div\": {\n fontSize: 12,\n fontWeight: \"normal\",\n flexDirection: \"row\",\n flexWrap: \"nowrap\",\n },\n [`@media (max-width: ${breakPoints.lg}px)`]: {\n display: \"flex\",\n },\n }}\n >\n {additionalOptions}\n \n \n );\n};\n\nexport default BrowserBreadcrumbs;\n","// This file is part of MinIO Console Server\n// Copyright (c) 2021 MinIO, Inc.\n//\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU Affero General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU Affero General Public License for more details.\n//\n// You should have received a copy of the GNU Affero General Public License\n// along with this program. If not, see .\n\nexport const isVersionedMode = (status: string | undefined) => {\n return status === \"Enabled\" || status === \"Suspended\";\n};\n","// This file is part of MinIO Console Server\n// Copyright (c) 2022 MinIO, Inc.\n//\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU Affero General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU Affero General Public License for more details.\n//\n// You should have received a copy of the GNU Affero General Public License\n// along with this program. If not, see .\n\nimport React, { Fragment, useState } from \"react\";\nimport { CSSObject } from \"styled-components\";\nimport { Button, DropdownSelector, UploadFolderIcon, UploadIcon } from \"mds\";\nimport {\n IAM_SCOPES,\n permissionTooltipHelper,\n} from \"../../../../common/SecureComponent/permissions\";\nimport { hasPermission } from \"../../../../common/SecureComponent\";\nimport TooltipWrapper from \"../../Common/TooltipWrapper/TooltipWrapper\";\nimport { useSelector } from \"react-redux\";\nimport { AppState } from \"../../../../store\";\nimport { getSessionGrantsWildCard } from \"./UploadPermissionUtils\";\n\ninterface IUploadFilesButton {\n uploadPath: string;\n bucketName: string;\n forceDisable?: boolean;\n uploadFileFunction: (closeFunction: () => void) => void;\n uploadFolderFunction: (closeFunction: () => void) => void;\n overrideStyles?: CSSObject;\n}\n\nconst UploadFilesButton = ({\n uploadPath,\n bucketName,\n forceDisable = false,\n uploadFileFunction,\n uploadFolderFunction,\n overrideStyles = {},\n}: IUploadFilesButton) => {\n const [anchorEl, setAnchorEl] = useState(null);\n const [uploadOptionsOpen, uploadOptionsSetOpen] = useState(false);\n\n const anonymousMode = useSelector(\n (state: AppState) => state.system.anonymousMode,\n );\n\n const sessionGrants = useSelector((state: AppState) =>\n state.console.session ? state.console.session.permissions || {} : {},\n );\n\n const putObjectPermScopes = [\n IAM_SCOPES.S3_PUT_OBJECT,\n IAM_SCOPES.S3_PUT_ACTIONS,\n ];\n\n const sessionGrantWildCards = getSessionGrantsWildCard(\n sessionGrants,\n uploadPath,\n putObjectPermScopes,\n );\n\n const openUploadMenu = Boolean(anchorEl);\n const handleClick = (event: React.MouseEvent) => {\n uploadOptionsSetOpen(!uploadOptionsOpen);\n setAnchorEl(event.currentTarget);\n };\n const handleCloseUpload = () => {\n setAnchorEl(null);\n };\n\n const uploadObjectAllowed =\n hasPermission(\n [uploadPath, ...sessionGrantWildCards],\n putObjectPermScopes,\n ) || anonymousMode;\n\n const uploadFolderAllowed = hasPermission(\n [bucketName, ...sessionGrantWildCards],\n putObjectPermScopes,\n false,\n true,\n );\n\n const uploadFolderAction = (action: string) => {\n if (action === \"folder\") {\n uploadFolderFunction(handleCloseUpload);\n return;\n }\n\n uploadFileFunction(handleCloseUpload);\n };\n\n const uploadEnabled: boolean = uploadObjectAllowed || uploadFolderAllowed;\n\n return (\n \n \n }\n variant={\"callAction\"}\n disabled={forceDisable || !uploadEnabled}\n sx={overrideStyles}\n />\n \n ,\n value: \"file\",\n disabled: !uploadObjectAllowed || forceDisable,\n },\n {\n label: \"Upload Folder\",\n icon: ,\n value: \"folder\",\n disabled: !uploadFolderAllowed || forceDisable,\n },\n ]}\n selectedOption={\"\"}\n onSelect={(nValue) => uploadFolderAction(nValue)}\n hideTriggerAction={() => {\n uploadOptionsSetOpen(false);\n }}\n open={uploadOptionsOpen}\n anchorEl={anchorEl}\n anchorOrigin={\"end\"}\n useAnchorWidth\n />\n \n );\n};\n\nexport default UploadFilesButton;\n","// This file is part of MinIO Console Server\n// Copyright (c) 2022 MinIO, Inc.\n//\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU Affero General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU Affero General Public License for more details.\n//\n// You should have received a copy of the GNU Affero General Public License\n// along with this program. If not, see .\n\nimport React from \"react\";\nimport { Box, Button, ClosePanelIcon } from \"mds\";\n\ninterface IDetailsListPanel {\n open: boolean;\n className?: string;\n closePanel: () => void;\n children: React.ReactNode;\n}\n\nconst DetailsListPanel = ({\n open,\n closePanel,\n className = \"\",\n children,\n}: IDetailsListPanel) => {\n return (\n \n }\n sx={{\n position: \"absolute\",\n right: 5,\n top: 18,\n padding: 0,\n height: 14,\n \"&:hover:not(:disabled)\": {\n backgroundColor: \"transparent\",\n },\n }}\n />\n {children}\n \n );\n};\n\nexport default DetailsListPanel;\n","// This file is part of MinIO Console Server\n// Copyright (c) 2021 MinIO, Inc.\n//\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU Affero General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU Affero General Public License for more details.\n//\n// You should have received a copy of the GNU Affero General Public License\n// along with this program. If not, see .\n\n// This object contains variables that will be used across form components.\n\nimport React from \"react\";\nimport { Box } from \"mds\";\nimport { replaceUnicodeChar } from \"../../../../../../common/utils\";\n\ninterface IIconWithLabel {\n icon: React.ReactNode;\n strings: string[];\n}\n\nconst IconWithLabel = ({ icon, strings }: IIconWithLabel) => {\n return (\n \n {icon}\n \n {replaceUnicodeChar(strings[strings.length - 1])}\n \n \n );\n};\n\nexport default IconWithLabel;\n","// This file is part of MinIO Console Server\n// Copyright (c) 2021 MinIO, Inc.\n//\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU Affero General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU Affero General Public License for more details.\n//\n// You should have received a copy of the GNU Affero General Public License\n// along with this program. If not, see .\n\nimport React from \"react\";\n\nimport {\n FileBookIcon,\n FileCodeIcon,\n FileConfigIcon,\n FileDbIcon,\n FileFontIcon,\n FileImageIcon,\n FileLockIcon,\n FileMissingIcon,\n FileMusicIcon,\n FileNonType,\n FilePdfIcon,\n FilePptIcon,\n FileTxtIcon,\n FileVideoIcon,\n FileXlsIcon,\n FileZipIcon,\n FolderBrowserIcon,\n} from \"mds\";\nimport IconWithLabel from \"./IconWithLabel\";\n\ninterface IExtToIcon {\n icon: any;\n extensions: string[];\n}\n\nexport const extensionToIcon: IExtToIcon[] = [\n {\n icon: ,\n extensions: [\"mp4\", \"mov\", \"avi\", \"mpeg\", \"mpg\"],\n },\n {\n icon: ,\n extensions: [\"mp3\", \"m4a\", \"aac\"],\n },\n {\n icon: ,\n extensions: [\"pdf\"],\n },\n {\n icon: ,\n extensions: [\"ppt\", \"pptx\"],\n },\n {\n icon: ,\n extensions: [\"xls\", \"xlsx\"],\n },\n {\n icon: ,\n extensions: [\"cer\", \"crt\", \"pem\"],\n },\n {\n icon: ,\n extensions: [\"html\", \"xml\", \"css\", \"py\", \"go\", \"php\", \"cpp\", \"h\", \"java\"],\n },\n {\n icon: ,\n extensions: [\"cfg\", \"yaml\"],\n },\n {\n icon: ,\n extensions: [\"sql\"],\n },\n {\n icon: ,\n extensions: [\"ttf\", \"otf\"],\n },\n {\n icon: ,\n extensions: [\"doc\", \"docx\", \"txt\", \"rtf\"],\n },\n {\n icon: ,\n extensions: [\"zip\", \"rar\", \"tar\", \"gz\"],\n },\n {\n icon: ,\n extensions: [\"epub\", \"mobi\", \"azw\", \"azw3\"],\n },\n {\n icon: ,\n extensions: [\"jpeg\", \"jpg\", \"gif\", \"tiff\", \"png\", \"heic\", \"dng\"],\n },\n];\n\nexport const displayFileIconName = (\n element: string,\n returnOnlyIcon: boolean = false,\n) => {\n let elementString = element;\n let icon = ;\n // Element is a folder\n if (element.endsWith(\"/\")) {\n icon = ;\n elementString = element.slice(0, -1);\n }\n\n const lowercaseElement = element.toLowerCase();\n for (const etc of extensionToIcon) {\n for (const ext of etc.extensions) {\n if (lowercaseElement.endsWith(`.${ext}`)) {\n icon = etc.icon;\n }\n }\n }\n\n if (!element.endsWith(\"/\") && element.indexOf(\".\") < 0) {\n icon = ;\n }\n\n const splitItem = elementString.split(\"/\");\n\n if (returnOnlyIcon) {\n return icon;\n }\n\n return ;\n};\n","// This file is part of MinIO Console Server\n// Copyright (c) 2022 MinIO, Inc.\n//\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU Affero General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU Affero General Public License for more details.\n//\n// You should have received a copy of the GNU Affero General Public License\n// along with this program. If not, see .\n\nimport React, { Fragment } from \"react\";\nimport { Box } from \"mds\";\nimport { safeDecodeURIComponent } from \"../../../../../../common/utils\";\n\ninterface IObjectMetadata {\n metaData: any;\n}\n\nconst itemRendererFn = (element: any) => {\n return Array.isArray(element)\n ? element.map(safeDecodeURIComponent).join(\", \")\n : safeDecodeURIComponent(element);\n};\n\nconst ObjectMetaData = ({ metaData }: IObjectMetadata) => {\n const metaKeys = Object.keys(metaData);\n\n return (\n \n {metaKeys.map((element: string, index: number) => {\n const renderItem = itemRendererFn(metaData[element]);\n return (\n \n {element}\n \n {renderItem}\n \n );\n })}\n \n );\n};\n\nexport default ObjectMetaData;\n","// This file is part of MinIO Console Server\n// Copyright (c) 2021 MinIO, Inc.\n//\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU Affero General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU Affero General Public License for more details.\n//\n// You should have received a copy of the GNU Affero General Public License\n// along with this program. If not, see .\n\nexport const months = [\n { value: \"01\", label: \"January\" },\n { value: \"02\", label: \"February\" },\n { value: \"03\", label: \"March\" },\n { value: \"04\", label: \"April\" },\n { value: \"05\", label: \"May\" },\n { value: \"06\", label: \"June\" },\n { value: \"07\", label: \"July\" },\n { value: \"08\", label: \"August\" },\n { value: \"09\", label: \"September\" },\n { value: \"10\", label: \"October\" },\n { value: \"11\", label: \"November\" },\n { value: \"12\", label: \"December\" },\n];\n\nexport const days = Array.from(Array(31), (_, num) => ({\n value: (num + 1).toString(),\n label: (num + 1).toString(),\n}));\n\nconst currentYear = new Date().getFullYear();\n\nexport const years = Array.from(Array(50), (_, numYear) => ({\n value: (numYear + currentYear).toString(),\n label: (numYear + currentYear).toString(),\n}));\n\nexport const validDate = (year: string, month: string, day: string): any[] => {\n const currentDate = Date.parse(`${year}-${month}-${day}`);\n\n if (isNaN(currentDate)) {\n return [false, \"\"];\n }\n\n const parsedMonth = parseInt(month);\n const parsedDay = parseInt(day);\n\n const monthForString = parsedMonth < 10 ? `0${parsedMonth}` : parsedMonth;\n const dayForString = parsedDay < 10 ? `0${parsedDay}` : parsedDay;\n\n const parsedDate = new Date(currentDate).toISOString().split(\"T\")[0];\n const dateString = `${year}-${monthForString}-${dayForString}`;\n\n return [parsedDate === dateString, dateString];\n};\n\n// twoDigitDate gets a two digit string number used for months or days\n// returns \"NaN\" if number is NaN\nexport const twoDigitDate = (num: number): string => {\n return num < 10 ? `0${num}` : `${num}`;\n};\n","// This file is part of MinIO Console Server\n// Copyright (c) 2021 MinIO, Inc.\n//\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU Affero General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU Affero General Public License for more details.\n//\n// You should have received a copy of the GNU Affero General Public License\n// along with this program. If not, see .\n\nimport React, {\n forwardRef,\n useEffect,\n useImperativeHandle,\n useState,\n} from \"react\";\nimport { Box, HelpIcon, InputLabel, Select, Tooltip } from \"mds\";\nimport { days, months, validDate, years } from \"./utils\";\n\ninterface IDateSelectorProps {\n id: string;\n label: string;\n disableOptions?: boolean;\n tooltip?: string;\n borderBottom?: boolean;\n value?: string;\n onDateChange: (date: string, isValid: boolean) => any;\n}\n\nconst DateSelector = forwardRef(\n (\n {\n id,\n label,\n disableOptions = false,\n tooltip = \"\",\n borderBottom = false,\n onDateChange,\n value = \"\",\n }: IDateSelectorProps,\n ref: any,\n ) => {\n useImperativeHandle(ref, () => ({ resetDate }));\n\n const [month, setMonth] = useState(\"\");\n const [day, setDay] = useState(\"\");\n const [year, setYear] = useState(\"\");\n\n useEffect(() => {\n // verify if there is a current value\n // assume is in the format \"2021-12-30\"\n if (value !== \"\") {\n const valueSplit = value.split(\"-\");\n\n setYear(valueSplit[0]);\n setMonth(valueSplit[1]);\n // Turn to single digit to be displayed on dropdown buttons\n setDay(`${parseInt(valueSplit[2])}`);\n }\n }, [value]);\n\n useEffect(() => {\n const [isValid, dateString] = validDate(year, month, day);\n onDateChange(dateString, isValid);\n }, [month, day, year, onDateChange]);\n\n const resetDate = () => {\n setMonth(\"\");\n setDay(\"\");\n setYear(\"\");\n };\n\n const isDateDisabled = () => {\n if (disableOptions) {\n return disableOptions;\n } else {\n return false;\n }\n };\n\n const monthForDropDown = [{ value: \"\", label: \"\" }, ...months];\n const daysForDrop = [{ value: \"\", label: \"\" }, ...days];\n const yearsForDrop = [{ value: \"\", label: \"\" }, ...years];\n\n return (\n \n \n \n {label}\n {tooltip !== \"\" && (\n \n \n \n \n \n \n \n )}\n \n \n \n \n \n );\n },\n);\n\nexport default DateSelector;\n","// This file is part of MinIO Console Server\n// Copyright (c) 2021 MinIO, Inc.\n//\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU Affero General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU Affero General Public License for more details.\n//\n// You should have received a copy of the GNU Affero General Public License\n// along with this program. If not, see .\n\nimport React, { useEffect, useRef, useState } from \"react\";\nimport { Box, Button, FormLayout, Grid, RadioGroup, Switch } from \"mds\";\nimport { useSelector } from \"react-redux\";\nimport { BucketObject, ObjectRetentionMode } from \"api/consoleApi\";\nimport { api } from \"api\";\nimport { errorToHandler } from \"api/errors\";\nimport { encodeURLString } from \"common/utils\";\nimport { modalStyleUtils } from \"../../../../Common/FormComponents/common/styleLibrary\";\nimport { twoDigitDate } from \"../../../../Common/FormComponents/DateSelector/utils\";\nimport { setModalErrorSnackMessage } from \"../../../../../../systemSlice\";\nimport { AppState, useAppDispatch } from \"../../../../../../store\";\nimport ModalWrapper from \"../../../../Common/ModalWrapper/ModalWrapper\";\nimport DateSelector from \"../../../../Common/FormComponents/DateSelector/DateSelector\";\n\ninterface ISetRetentionProps {\n open: boolean;\n closeModalAndRefresh: (updateInfo: boolean) => void;\n objectName: string;\n bucketName: string;\n objectInfo: BucketObject;\n}\n\ninterface IRefObject {\n resetDate: () => void;\n}\n\nconst SetRetention = ({\n open,\n closeModalAndRefresh,\n objectName,\n objectInfo,\n bucketName,\n}: ISetRetentionProps) => {\n const dispatch = useAppDispatch();\n const retentionConfig = useSelector(\n (state: AppState) => state.objectBrowser.retentionConfig,\n );\n\n const [statusEnabled, setStatusEnabled] = useState(true);\n const [type, setType] = useState(\"\");\n const [date, setDate] = useState(\"\");\n const [isDateValid, setIsDateValid] = useState(false);\n const [isSaving, setIsSaving] = useState(false);\n const [alreadyConfigured, setAlreadyConfigured] = useState(false);\n\n useEffect(() => {\n if (objectInfo.retention_mode) {\n setType(retentionConfig?.mode || ObjectRetentionMode.Governance);\n setAlreadyConfigured(true);\n }\n // get retention_until_date if defined\n if (objectInfo.retention_until_date) {\n const valueDate = new Date(objectInfo.retention_until_date);\n if (valueDate.toString() !== \"Invalid Date\") {\n const year = valueDate.getFullYear();\n const month = twoDigitDate(valueDate.getMonth() + 1);\n const day = valueDate.getDate();\n if (!isNaN(day) && month !== \"NaN\" && !isNaN(year)) {\n setDate(`${year}-${month}-${day}`);\n }\n }\n setAlreadyConfigured(true);\n }\n }, [objectInfo, retentionConfig?.mode]);\n\n const dateElement = useRef(null);\n\n const dateFieldDisabled = () => {\n return !(statusEnabled && (type === \"governance\" || type === \"compliance\"));\n };\n\n const onSubmit = (e: React.FormEvent) => {\n e.preventDefault();\n };\n\n const resetForm = () => {\n setStatusEnabled(false);\n setType(ObjectRetentionMode.Governance);\n if (dateElement.current) {\n dateElement.current.resetDate();\n }\n };\n\n const addRetention = (\n selectedObject: string,\n versionId: string | null,\n expireDate: string,\n ) => {\n api.buckets\n .putObjectRetention(\n bucketName,\n {\n prefix: encodeURLString(selectedObject),\n version_id: versionId || \"\",\n },\n {\n expires: expireDate,\n mode: type as ObjectRetentionMode,\n },\n )\n .then(() => {\n setIsSaving(false);\n closeModalAndRefresh(true);\n })\n .catch((err) => {\n dispatch(setModalErrorSnackMessage(errorToHandler(err.error)));\n setIsSaving(false);\n });\n };\n\n const disableRetention = (\n selectedObject: string,\n versionId: string | null,\n ) => {\n api.buckets\n .deleteObjectRetention(bucketName, {\n prefix: encodeURLString(selectedObject),\n version_id: versionId || \"\",\n })\n .then(() => {\n setIsSaving(false);\n closeModalAndRefresh(true);\n })\n .catch((err) => {\n dispatch(setModalErrorSnackMessage(errorToHandler(err.error)));\n setIsSaving(false);\n });\n };\n\n const saveNewRetentionPolicy = () => {\n setIsSaving(true);\n const selectedObject = objectInfo.name || \"\";\n const versionId = objectInfo.version_id || null;\n\n const expireDate =\n !statusEnabled && type === \"governance\" ? \"\" : `${date}T23:59:59Z`;\n\n if (!statusEnabled && type === \"governance\") {\n disableRetention(selectedObject, versionId);\n\n return;\n }\n\n addRetention(selectedObject, versionId, expireDate);\n };\n\n const showSwitcher =\n alreadyConfigured && (type === \"governance\" || type === \"\");\n\n return (\n {\n resetForm();\n closeModalAndRefresh(false);\n }}\n >\n \n \n );\n};\n\nexport default SetRetention;\n","// This file is part of MinIO Console Server\n// Copyright (c) 2021 MinIO, Inc.\n//\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU Affero General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU Affero General Public License for more details.\n//\n// You should have received a copy of the GNU Affero General Public License\n// along with this program. If not, see .\n\nimport React, { Fragment, useState } from \"react\";\nimport { ErrorResponseHandler } from \"../../../../../../common/types\";\nimport { decodeURLString } from \"../../../../../../common/utils\";\nimport ConfirmDialog from \"../../../../Common/ModalWrapper/ConfirmDialog\";\nimport useApi from \"../../../../Common/Hooks/useApi\";\nimport { ConfirmDeleteIcon, Switch } from \"mds\";\nimport { setErrorSnackMessage } from \"../../../../../../systemSlice\";\nimport { AppState, useAppDispatch } from \"../../../../../../store\";\nimport { hasPermission } from \"../../../../../../common/SecureComponent\";\nimport { IAM_SCOPES } from \"../../../../../../common/SecureComponent/permissions\";\nimport { useSelector } from \"react-redux\";\nimport { isVersionedMode } from \"../../../../../../utils/validationFunctions\";\nimport { BucketVersioningResponse } from \"api/consoleApi\";\n\ninterface IDeleteObjectProps {\n closeDeleteModalAndRefresh: (refresh: boolean) => void;\n deleteOpen: boolean;\n selectedObject: string;\n selectedBucket: string;\n\n versioningInfo: BucketVersioningResponse | undefined;\n selectedVersion?: string;\n}\n\nconst DeleteObject = ({\n closeDeleteModalAndRefresh,\n deleteOpen,\n selectedBucket,\n selectedObject,\n versioningInfo,\n selectedVersion = \"\",\n}: IDeleteObjectProps) => {\n const dispatch = useAppDispatch();\n const onDelSuccess = () => closeDeleteModalAndRefresh(true);\n const onDelError = (err: ErrorResponseHandler) => {\n dispatch(setErrorSnackMessage(err));\n\n // We close the modal box on access denied.\n if (err.detailedError === \"Access Denied.\") {\n closeDeleteModalAndRefresh(true);\n }\n };\n const onClose = () => closeDeleteModalAndRefresh(false);\n\n const [deleteLoading, invokeDeleteApi] = useApi(onDelSuccess, onDelError);\n const [deleteVersions, setDeleteVersions] = useState(false);\n const [bypassGovernance, setBypassGovernance] = useState(false);\n\n const retentionConfig = useSelector(\n (state: AppState) => state.objectBrowser.retentionConfig,\n );\n\n const canBypass =\n hasPermission(\n [selectedBucket],\n [IAM_SCOPES.S3_BYPASS_GOVERNANCE_RETENTION],\n ) && retentionConfig?.mode === \"governance\";\n\n if (!selectedObject) {\n return null;\n }\n const onConfirmDelete = () => {\n const decodedSelectedObject = decodeURLString(selectedObject);\n const recursive = decodedSelectedObject.endsWith(\"/\");\n invokeDeleteApi(\n \"DELETE\",\n `/api/v1/buckets/${selectedBucket}/objects?prefix=${selectedObject}${\n selectedVersion !== \"\"\n ? `&version_id=${selectedVersion}`\n : `&recursive=${recursive}&all_versions=${deleteVersions}`\n }${bypassGovernance ? \"&bypass=true\" : \"\"}`,\n );\n };\n\n return (\n }\n isLoading={deleteLoading}\n onConfirm={onConfirmDelete}\n onClose={onClose}\n confirmationContent={\n \n Are you sure you want to delete: \n {decodeURLString(selectedObject)}{\" \"}\n {selectedVersion !== \"\" ? (\n \n \n \n Version ID:\n \n {selectedVersion}\n \n ) : (\n \"\"\n )}\n ? \n \n {isVersionedMode(versioningInfo?.status) &&\n selectedVersion === \"\" && (\n \n {\n setDeleteVersions(!deleteVersions);\n }}\n description=\"\"\n />\n \n )}\n {canBypass && (deleteVersions || selectedVersion !== \"\") && (\n \n
\n This will remove the object as well as all of its versions,{\" \"}\n \n This action is irreversible.\n
\n \n Are you sure you want to continue?\n \n )}\n \n }\n />\n );\n};\n\nexport default DeleteObject;\n","// This file is part of MinIO Console Server\n// Copyright (c) 2021 MinIO, Inc.\n//\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU Affero General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU Affero General Public License for more details.\n//\n// You should have received a copy of the GNU Affero General Public License\n// along with this program. If not, see .\n\nimport React, { useEffect, useState } from \"react\";\nimport get from \"lodash/get\";\nimport { Box, Button, FormLayout, Grid, Switch } from \"mds\";\nimport { BucketObject, ObjectLegalHoldStatus } from \"api/consoleApi\";\nimport { api } from \"api\";\nimport { errorToHandler } from \"api/errors\";\nimport { modalStyleUtils } from \"../../../../Common/FormComponents/common/styleLibrary\";\nimport { encodeURLString } from \"../../../../../../common/utils\";\nimport { setModalErrorSnackMessage } from \"../../../../../../systemSlice\";\nimport { useAppDispatch } from \"../../../../../../store\";\nimport ModalWrapper from \"../../../../Common/ModalWrapper/ModalWrapper\";\n\ninterface ISetRetentionProps {\n open: boolean;\n closeModalAndRefresh: (reload: boolean) => void;\n objectName: string;\n bucketName: string;\n actualInfo: BucketObject;\n}\n\nconst SetLegalHoldModal = ({\n open,\n closeModalAndRefresh,\n objectName,\n bucketName,\n actualInfo,\n}: ISetRetentionProps) => {\n const dispatch = useAppDispatch();\n const [legalHoldEnabled, setLegalHoldEnabled] = useState(false);\n const [isSaving, setIsSaving] = useState(false);\n const versionId = actualInfo.version_id;\n\n useEffect(() => {\n const status = get(actualInfo, \"legal_hold_status\", \"OFF\");\n setLegalHoldEnabled(status === \"ON\");\n }, [actualInfo]);\n\n const onSubmit = (e: React.FormEvent) => {\n e.preventDefault();\n setIsSaving(true);\n\n api.buckets\n .putObjectLegalHold(\n bucketName,\n {\n prefix: encodeURLString(objectName),\n version_id: versionId || \"\",\n },\n {\n status: legalHoldEnabled\n ? ObjectLegalHoldStatus.Enabled\n : ObjectLegalHoldStatus.Disabled,\n },\n )\n .then(() => {\n setIsSaving(false);\n closeModalAndRefresh(true);\n })\n .catch((err) => {\n dispatch(setModalErrorSnackMessage(errorToHandler(err.error)));\n setIsSaving(false);\n });\n };\n\n const resetForm = () => {\n setLegalHoldEnabled(false);\n };\n\n return (\n {\n resetForm();\n closeModalAndRefresh(false);\n }}\n >\n \n \n );\n};\n\nexport default SetLegalHoldModal;\n","// This file is part of MinIO Console Server\n// Copyright (c) 2022 MinIO, Inc.\n//\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU Affero General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU Affero General Public License for more details.\n//\n// You should have received a copy of the GNU Affero General Public License\n// along with this program. If not, see .\n\nimport React, { Fragment, useState } from \"react\";\nimport get from \"lodash/get\";\nimport styled from \"styled-components\";\nimport {\n AddNewTagIcon,\n Button,\n DisabledIcon,\n EditTagIcon,\n InputBox,\n SectionTitle,\n Box,\n Grid,\n Tag,\n FormLayout,\n} from \"mds\";\nimport { BucketObject } from \"api/consoleApi\";\nimport { api } from \"api\";\nimport { errorToHandler } from \"api/errors\";\nimport { encodeURLString } from \"common/utils\";\nimport { useSelector } from \"react-redux\";\nimport ModalWrapper from \"../../../../Common/ModalWrapper/ModalWrapper\";\nimport { modalStyleUtils } from \"../../../../Common/FormComponents/common/styleLibrary\";\nimport { IAM_SCOPES } from \"../../../../../../common/SecureComponent/permissions\";\nimport { SecureComponent } from \"../../../../../../common/SecureComponent\";\nimport {\n selDistSet,\n setModalErrorSnackMessage,\n} from \"../../../../../../systemSlice\";\nimport { useAppDispatch } from \"../../../../../../store\";\n\ninterface ITagModal {\n modalOpen: boolean;\n bucketName: string;\n actualInfo: BucketObject;\n onCloseAndUpdate: (refresh: boolean) => void;\n}\n\nconst DeleteTag = styled.b(({ theme }) => ({\n color: get(theme, \"signalColors.danger\", \"#C83B51\"),\n marginLeft: 5,\n}));\n\nconst AddTagModal = ({\n modalOpen,\n onCloseAndUpdate,\n bucketName,\n actualInfo,\n}: ITagModal) => {\n const dispatch = useAppDispatch();\n const distributedSetup = useSelector(selDistSet);\n const [newKey, setNewKey] = useState(\"\");\n const [newLabel, setNewLabel] = useState(\"\");\n const [isSending, setIsSending] = useState(false);\n const [deleteEnabled, setDeleteEnabled] = useState(false);\n const [deleteKey, setDeleteKey] = useState(\"\");\n const [deleteLabel, setDeleteLabel] = useState(\"\");\n\n const selectedObject = encodeURLString(actualInfo.name || \"\");\n\n const currentTags = actualInfo.tags;\n const currTagKeys = Object.keys(currentTags || {});\n\n const allPathData = actualInfo.name?.split(\"/\");\n const currentItem = allPathData?.pop() || \"\";\n\n const resetForm = () => {\n setNewLabel(\"\");\n setNewKey(\"\");\n };\n\n const addTagProcess = () => {\n setIsSending(true);\n const newTag: any = {};\n\n newTag[newKey] = newLabel;\n const newTagList = { ...currentTags, ...newTag };\n\n const verID = distributedSetup ? actualInfo.version_id || \"\" : \"null\";\n\n api.buckets\n .putObjectTags(\n bucketName,\n { prefix: selectedObject, version_id: verID },\n { tags: newTagList },\n )\n .then(() => {\n onCloseAndUpdate(true);\n setIsSending(false);\n })\n .catch((err) => {\n dispatch(setModalErrorSnackMessage(errorToHandler(err.error)));\n setIsSending(false);\n });\n };\n\n const deleteTagProcess = () => {\n const cleanObject: any = { ...currentTags };\n delete cleanObject[deleteKey];\n\n const verID = distributedSetup ? actualInfo.version_id || \"\" : \"null\";\n\n api.buckets\n .putObjectTags(\n bucketName,\n { prefix: selectedObject, version_id: verID },\n { tags: cleanObject },\n )\n .then(() => {\n onCloseAndUpdate(true);\n setIsSending(false);\n })\n .catch((err) => {\n dispatch(setModalErrorSnackMessage(errorToHandler(err.error)));\n setIsSending(false);\n });\n };\n\n const onDeleteTag = (tagKey: string, tag: string) => {\n setDeleteKey(tagKey);\n setDeleteLabel(tag);\n setDeleteEnabled(true);\n };\n\n const cancelDelete = () => {\n setDeleteKey(\"\");\n setDeleteLabel(\"\");\n setDeleteEnabled(false);\n };\n\n const tagsFor = (plural: boolean) => (\n \n Tag{plural ? \"s\" : \"\"} for: {currentItem}\n \n );\n\n return (\n \n {\n onCloseAndUpdate(true);\n }}\n iconColor={deleteEnabled ? \"delete\" : \"default\"}\n titleIcon={deleteEnabled ? : }\n >\n {deleteEnabled ? (\n \n \n {tagsFor(false)}\n Are you sure you want to delete the tag{\" \"}\n \n {deleteKey} : {deleteLabel}\n {\" \"}\n ?\n \n \n \n \n \n \n ) : (\n \n \n \n {tagsFor(true)}\n \n Current Tags:\n \n {currTagKeys.length === 0 ? (\n \n There are no tags for this object\n \n ) : (\n \n )}\n \n {currTagKeys.map((tagKey: string, index: number) => {\n const tag = get(currentTags, `${tagKey}`, \"\");\n if (tag !== \"\") {\n return (\n \n {\n onDeleteTag(tagKey, tag);\n }}\n />\n \n );\n }\n return null;\n })}\n \n \n \n \n \n \n } separator={false}>\n Add New Tag\n \n \n {\n setNewKey(e.target.value);\n }}\n />\n {\n setNewLabel(e.target.value);\n }}\n />\n \n \n \n \n \n \n \n \n )}\n \n \n );\n};\n\nexport default AddTagModal;\n","// This file is part of MinIO Console Server\n// Copyright (c) 2022 MinIO, Inc.\n//\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU Affero General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU Affero General Public License for more details.\n//\n// You should have received a copy of the GNU Affero General Public License\n// along with this program. If not, see .\n\nimport React, { useState } from \"react\";\nimport {\n Button,\n InspectMenuIcon,\n PasswordKeyIcon,\n Switch,\n Grid,\n Box,\n} from \"mds\";\nimport {\n decodeURLString,\n deleteCookie,\n encodeURLString,\n getCookieValue,\n performDownload,\n} from \"../../../../../../common/utils\";\nimport ModalWrapper from \"../../../../Common/ModalWrapper/ModalWrapper\";\nimport { modalStyleUtils } from \"../../../../Common/FormComponents/common/styleLibrary\";\nimport KeyRevealer from \"../../../../Tools/KeyRevealer\";\nimport { setErrorSnackMessage } from \"../../../../../../systemSlice\";\nimport { useAppDispatch } from \"../../../../../../store\";\n\ninterface IInspectObjectProps {\n closeInspectModalAndRefresh: (refresh: boolean) => void;\n inspectOpen: boolean;\n inspectPath: string;\n volumeName: string;\n}\n\nconst InspectObject = ({\n closeInspectModalAndRefresh,\n inspectOpen,\n inspectPath,\n volumeName,\n}: IInspectObjectProps) => {\n const dispatch = useAppDispatch();\n const onClose = () => closeInspectModalAndRefresh(false);\n const [isEncrypt, setIsEncrypt] = useState(true);\n const [decryptionKey, setDecryptionKey] = useState(\"\");\n const [insFileName, setInsFileName] = useState(\"\");\n\n if (!inspectPath) {\n return null;\n }\n const makeRequest = async (url: string) => {\n return await fetch(url, { method: \"GET\" });\n };\n\n const performInspect = async () => {\n const file = encodeURLString(inspectPath + \"/xl.meta\");\n const volume = encodeURLString(volumeName);\n\n let basename = document.baseURI.replace(window.location.origin, \"\");\n const urlOfInspectApi = `${window.location.origin}${basename}/api/v1/admin/inspect?volume=${volume}&file=${file}&encrypt=${isEncrypt}`;\n\n makeRequest(urlOfInspectApi)\n .then(async (res) => {\n if (!res.ok) {\n const resErr: any = await res.json();\n\n dispatch(\n setErrorSnackMessage({\n errorMessage: resErr.message,\n detailedError: resErr.code,\n }),\n );\n }\n const blob: Blob = await res.blob();\n\n //@ts-ignore\n const filename = res.headers.get(\"content-disposition\").split('\"')[1];\n const decryptKey = getCookieValue(filename) || \"\";\n\n performDownload(blob, filename);\n setInsFileName(filename);\n if (decryptKey === \"\") {\n onClose();\n return;\n }\n setDecryptionKey(decryptKey);\n })\n .catch((err) => {\n dispatch(setErrorSnackMessage(err));\n });\n };\n\n const onCloseDecKeyModal = () => {\n deleteCookie(insFileName);\n onClose();\n setDecryptionKey(\"\");\n };\n\n const onSubmit = (e: React.FormEvent) => {\n e.preventDefault();\n };\n\n return (\n \n {!decryptionKey && (\n }\n title={`Inspect Object`}\n onClose={onClose}\n >\n \n \n )}\n {decryptionKey ? (\n }\n >\n \n This will be displayed only once. It cannot be recovered.\n \n Use secure medium to share this key.\n \n \n \n \n \n ) : null}\n \n );\n};\n\nexport default InspectObject;\n","// This file is part of MinIO Console Server\n// Copyright (c) 2021 MinIO, Inc.\n//\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU Affero General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU Affero General Public License for more details.\n//\n// You should have received a copy of the GNU Affero General Public License\n// along with this program. If not, see .\n\nimport React, { useState } from \"react\";\nimport { Button, EditIcon, FormLayout, Grid, InputBox, Switch } from \"mds\";\nimport { modalStyleUtils } from \"../Common/FormComponents/common/styleLibrary\";\nimport { useAppDispatch } from \"../../../store\";\nimport { downloadObject } from \"./utils\";\nimport { BucketObject } from \"api/consoleApi\";\nimport ModalWrapper from \"../Common/ModalWrapper/ModalWrapper\";\n\ninterface IRenameLongFilename {\n open: boolean;\n bucketName: string;\n internalPaths: string;\n currentItem: string;\n actualInfo: BucketObject;\n closeModal: () => void;\n}\n\nconst RenameLongFileName = ({\n open,\n closeModal,\n currentItem,\n internalPaths,\n actualInfo,\n bucketName,\n}: IRenameLongFilename) => {\n const dispatch = useAppDispatch();\n\n const [newFileName, setNewFileName] = useState(currentItem);\n const [acceptLongName, setAcceptLongName] = useState(false);\n\n const doDownload = (e: React.FormEvent) => {\n e.preventDefault();\n downloadObject(dispatch, bucketName, internalPaths, actualInfo);\n closeModal();\n };\n\n return (\n }\n >\n
\n The file you are trying to download has a long name.\n \n This can cause issues on Windows Systems by trimming the file name after\n download.\n \n We recommend to rename the file download\n
\n \n \n );\n};\n\nexport default RenameLongFileName;\n","// This file is part of MinIO Console Server\n// Copyright (c) 2022 MinIO, Inc.\n//\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU Affero General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU Affero General Public License for more details.\n//\n// You should have received a copy of the GNU Affero General Public License\n// along with this program. If not, see .\n\nimport React, { Fragment, useEffect, useState } from \"react\";\nimport get from \"lodash/get\";\nimport { useSelector } from \"react-redux\";\nimport {\n ActionsList,\n Box,\n Button,\n DeleteIcon,\n DownloadIcon,\n Grid,\n InspectMenuIcon,\n LegalHoldIcon,\n Loader,\n MetadataIcon,\n ObjectInfoIcon,\n PreviewIcon,\n RetentionIcon,\n ShareIcon,\n SimpleHeader,\n TagsIcon,\n VersionsIcon,\n} from \"mds\";\nimport { api } from \"api\";\nimport { downloadObject } from \"../../../../ObjectBrowser/utils\";\nimport { BucketObject, BucketVersioningResponse } from \"api/consoleApi\";\nimport { AllowedPreviews, previewObjectType } from \"../utils\";\nimport {\n decodeURLString,\n niceBytes,\n niceBytesInt,\n niceDaysInt,\n} from \"../../../../../../common/utils\";\nimport {\n IAM_SCOPES,\n permissionTooltipHelper,\n} from \"../../../../../../common/SecureComponent/permissions\";\nimport { AppState, useAppDispatch } from \"../../../../../../store\";\nimport {\n hasPermission,\n SecureComponent,\n} from \"../../../../../../common/SecureComponent\";\nimport { selDistSet } from \"../../../../../../systemSlice\";\nimport {\n setLoadingObjectInfo,\n setLoadingVersions,\n setSelectedVersion,\n setVersionsModeEnabled,\n} from \"../../../../ObjectBrowser/objectBrowserSlice\";\nimport { displayFileIconName } from \"./utils\";\nimport PreviewFileModal from \"../Preview/PreviewFileModal\";\nimport ObjectMetaData from \"../ObjectDetails/ObjectMetaData\";\nimport ShareFile from \"../ObjectDetails/ShareFile\";\nimport SetRetention from \"../ObjectDetails/SetRetention\";\nimport DeleteObject from \"../ListObjects/DeleteObject\";\nimport SetLegalHoldModal from \"../ObjectDetails/SetLegalHoldModal\";\nimport TagsModal from \"../ObjectDetails/TagsModal\";\nimport InspectObject from \"./InspectObject\";\nimport RenameLongFileName from \"../../../../ObjectBrowser/RenameLongFilename\";\nimport TooltipWrapper from \"../../../../Common/TooltipWrapper/TooltipWrapper\";\n\nconst emptyFile: BucketObject = {\n is_latest: true,\n last_modified: \"\",\n legal_hold_status: \"\",\n name: \"\",\n retention_mode: \"\",\n retention_until_date: \"\",\n size: 0,\n tags: {},\n version_id: undefined,\n};\n\ninterface IObjectDetailPanelProps {\n internalPaths: string;\n bucketName: string;\n versioningInfo: BucketVersioningResponse;\n locking: boolean | undefined;\n onClosePanel: (hardRefresh: boolean) => void;\n}\n\nconst ObjectDetailPanel = ({\n internalPaths,\n bucketName,\n versioningInfo,\n locking,\n onClosePanel,\n}: IObjectDetailPanelProps) => {\n const dispatch = useAppDispatch();\n\n const distributedSetup = useSelector(selDistSet);\n const versionsMode = useSelector(\n (state: AppState) => state.objectBrowser.versionsMode,\n );\n const selectedVersion = useSelector(\n (state: AppState) => state.objectBrowser.selectedVersion,\n );\n const loadingObjectInfo = useSelector(\n (state: AppState) => state.objectBrowser.loadingObjectInfo,\n );\n\n const [shareFileModalOpen, setShareFileModalOpen] = useState(false);\n const [retentionModalOpen, setRetentionModalOpen] = useState(false);\n const [tagModalOpen, setTagModalOpen] = useState(false);\n const [legalholdOpen, setLegalholdOpen] = useState(false);\n const [inspectModalOpen, setInspectModalOpen] = useState(false);\n const [actualInfo, setActualInfo] = useState(null);\n const [allInfoElements, setAllInfoElements] = useState([]);\n const [objectToShare, setObjectToShare] = useState(null);\n const [versions, setVersions] = useState([]);\n const [deleteOpen, setDeleteOpen] = useState(false);\n const [previewOpen, setPreviewOpen] = useState(false);\n const [totalVersionsSize, setTotalVersionsSize] = useState(0);\n const [longFileOpen, setLongFileOpen] = useState(false);\n const [metaData, setMetaData] = useState(null);\n const [loadMetadata, setLoadingMetadata] = useState(false);\n\n const internalPathsDecoded = decodeURLString(internalPaths) || \"\";\n const allPathData = internalPathsDecoded.split(\"/\");\n const currentItem = allPathData.pop() || \"\";\n\n // calculate object name to display\n let objectNameArray: string[] = [];\n if (actualInfo && actualInfo.name) {\n objectNameArray = actualInfo.name.split(\"/\");\n }\n\n useEffect(() => {\n if (distributedSetup && allInfoElements && allInfoElements.length >= 1) {\n let infoElement =\n allInfoElements.find((el: BucketObject) => el.is_latest) || emptyFile;\n\n if (selectedVersion !== \"\") {\n infoElement =\n allInfoElements.find(\n (el: BucketObject) => el.version_id === selectedVersion,\n ) || emptyFile;\n }\n\n if (!infoElement.is_delete_marker) {\n setLoadingMetadata(true);\n }\n\n setActualInfo(infoElement);\n }\n }, [selectedVersion, distributedSetup, allInfoElements]);\n\n useEffect(() => {\n if (loadingObjectInfo && internalPaths !== \"\") {\n api.buckets\n .listObjects(bucketName, {\n prefix: internalPaths,\n with_versions: distributedSetup,\n })\n .then((res) => {\n const result: BucketObject[] = res.data.objects || [];\n if (distributedSetup) {\n setAllInfoElements(result);\n setVersions(result);\n\n const tVersionSize = result.reduce(\n (acc: number, currValue: BucketObject): number => {\n if (currValue?.size) {\n return acc + currValue.size;\n }\n return acc;\n },\n 0,\n );\n\n setTotalVersionsSize(tVersionSize);\n } else {\n const resInfo = result[0];\n\n setActualInfo(resInfo);\n setVersions([]);\n\n if (!resInfo.is_delete_marker) {\n setLoadingMetadata(true);\n }\n }\n\n dispatch(setLoadingObjectInfo(false));\n })\n .catch((err) => {\n console.error(\"Error loading object details\", err.error);\n dispatch(setLoadingObjectInfo(false));\n });\n }\n }, [\n loadingObjectInfo,\n bucketName,\n internalPaths,\n dispatch,\n distributedSetup,\n selectedVersion,\n ]);\n\n useEffect(() => {\n if (loadMetadata && internalPaths !== \"\") {\n api.buckets\n .getObjectMetadata(bucketName, {\n prefix: internalPaths,\n versionID: actualInfo?.version_id || \"\",\n })\n .then((res) => {\n let metadata = get(res.data, \"objectMetadata\", {});\n\n setMetaData(metadata);\n setLoadingMetadata(false);\n })\n .catch((err) => {\n console.error(\"Error Getting Metadata Status: \", err.detailedError);\n setLoadingMetadata(false);\n });\n }\n }, [bucketName, internalPaths, loadMetadata, actualInfo?.version_id]);\n\n let tagKeys: string[] = [];\n\n if (actualInfo && actualInfo.tags) {\n tagKeys = Object.keys(actualInfo.tags);\n }\n\n const openRetentionModal = () => {\n setRetentionModalOpen(true);\n };\n\n const closeRetentionModal = (updateInfo: boolean) => {\n setRetentionModalOpen(false);\n if (updateInfo) {\n dispatch(setLoadingObjectInfo(true));\n }\n };\n\n const shareObject = () => {\n setShareFileModalOpen(true);\n };\n\n const closeShareModal = () => {\n setObjectToShare(null);\n setShareFileModalOpen(false);\n };\n\n const closeFileOpen = () => {\n setLongFileOpen(false);\n };\n\n const closeDeleteModal = (closeAndReload: boolean) => {\n setDeleteOpen(false);\n\n if (closeAndReload && selectedVersion === \"\") {\n onClosePanel(true);\n } else {\n dispatch(setLoadingVersions(true));\n dispatch(setSelectedVersion(\"\"));\n dispatch(setLoadingObjectInfo(true));\n }\n };\n\n const closeAddTagModal = (reloadObjectData: boolean) => {\n setTagModalOpen(false);\n if (reloadObjectData) {\n dispatch(setLoadingObjectInfo(true));\n }\n };\n\n const closeInspectModal = (reloadObjectData: boolean) => {\n setInspectModalOpen(false);\n if (reloadObjectData) {\n dispatch(setLoadingObjectInfo(true));\n }\n };\n\n const closeLegalholdModal = (reload: boolean) => {\n setLegalholdOpen(false);\n if (reload) {\n dispatch(setLoadingObjectInfo(true));\n }\n };\n\n const loaderForContainer = (\n
\n \n {selectedVersion !== \"\" && (\n \n Version ID:\n \n {selectedVersion}\n \n )}\n \n Size:\n \n {niceBytes(`${actualInfo.size || \"0\"}`)}\n \n {actualInfo.version_id &&\n actualInfo.version_id !== \"null\" &&\n selectedVersion === \"\" && (\n \n Versions:\n \n {versions.length} version{versions.length !== 1 ? \"s\" : \"\"},{\" \"}\n {niceBytesInt(totalVersionsSize)}\n \n )}\n {selectedVersion === \"\" && (\n \n Last Modified:\n \n {calculateLastModifyTime(actualInfo.last_modified || \"\")}\n \n )}\n \n ETAG:\n \n {actualInfo.etag || \"N/A\"}\n \n \n Tags:\n \n {tagKeys.length === 0\n ? \"N/A\"\n : tagKeys.map((tagKey, index) => {\n return (\n \n {tagKey}:{get(actualInfo, `tags.${tagKey}`, \"\")}\n {index < tagKeys.length - 1 ? \", \" : \"\"}\n \n );\n })}\n \n \n \n \n Legal Hold:\n \n {actualInfo.legal_hold_status ? \"On\" : \"Off\"}\n \n \n \n \n \n \n Retention Policy:\n \n \n {actualInfo.version_id && actualInfo.version_id !== \"null\" ? (\n \n {actualInfo.retention_mode\n ? actualInfo.retention_mode.toLowerCase()\n : \"None\"}\n \n ) : (\n \n {actualInfo.retention_mode\n ? actualInfo.retention_mode.toLowerCase()\n : \"None\"}\n \n )}\n \n \n \n \n {!actualInfo.is_delete_marker && (\n \n } />\n \n {actualInfo && metaData ? (\n \n ) : null}\n \n \n )}\n \n )}\n \n );\n};\n\nexport default ObjectDetailPanel;\n","// This file is part of MinIO Console Server\n// Copyright (c) 2021 MinIO, Inc.\n//\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU Affero General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU Affero General Public License for more details.\n//\n// You should have received a copy of the GNU Affero General Public License\n// along with this program. If not, see .\n\nimport React, { useState } from \"react\";\nimport { Box, RecoverIcon } from \"mds\";\nimport { BucketObject } from \"api/consoleApi\";\nimport { api } from \"api\";\nimport { errorToHandler } from \"api/errors\";\nimport { encodeURLString } from \"../../../../../../common/utils\";\nimport ConfirmDialog from \"../../../../Common/ModalWrapper/ConfirmDialog\";\nimport { setErrorSnackMessage } from \"../../../../../../systemSlice\";\nimport { useAppDispatch } from \"../../../../../../store\";\nimport { restoreLocalObjectList } from \"../../../../ObjectBrowser/objectBrowserSlice\";\n\ninterface IRestoreFileVersion {\n restoreOpen: boolean;\n bucketName: string;\n versionToRestore: BucketObject;\n objectPath: string;\n onCloseAndUpdate: (refresh: boolean) => void;\n}\n\nconst RestoreFileVersion = ({\n versionToRestore,\n bucketName,\n objectPath,\n restoreOpen,\n onCloseAndUpdate,\n}: IRestoreFileVersion) => {\n const dispatch = useAppDispatch();\n const [restoreLoading, setRestoreLoading] = useState(false);\n\n const restoreVersion = () => {\n setRestoreLoading(true);\n\n api.buckets\n .putObjectRestore(bucketName, {\n prefix: encodeURLString(objectPath),\n version_id: versionToRestore.version_id || \"\",\n })\n .then(() => {\n setRestoreLoading(false);\n onCloseAndUpdate(true);\n dispatch(\n restoreLocalObjectList({\n prefix: objectPath,\n objectInfo: versionToRestore,\n }),\n );\n })\n .catch((err) => {\n dispatch(setErrorSnackMessage(errorToHandler(err.error)));\n setRestoreLoading(false);\n });\n };\n\n return (\n }\n onConfirm={restoreVersion}\n confirmButtonProps={{\n variant: \"secondary\",\n disabled: restoreLoading,\n }}\n onClose={() => {\n onCloseAndUpdate(false);\n }}\n confirmationContent={\n \n Are you sure you want to restore \n {objectPath} with Version ID:\n \n {versionToRestore.version_id}?\n \n }\n />\n );\n};\n\nexport default RestoreFileVersion;\n","// This file is part of MinIO Console Server\n// Copyright (c) 2022 MinIO, Inc.\n//\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU Affero General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU Affero General Public License for more details.\n//\n// You should have received a copy of the GNU Affero General Public License\n// along with this program. If not, see .\n\nimport React from \"react\";\n\ninterface ISpecificVersionPillProps {\n type: \"null\" | \"current\" | \"deleted\";\n}\n\nconst SpecificVersionPill = ({ type }: ISpecificVersionPillProps) => {\n let bgColor = \"#000\";\n let message = \"\";\n\n switch (type) {\n case \"null\":\n bgColor = \"#07193E\";\n message = \"NULL VERSION\";\n break;\n case \"deleted\":\n bgColor = \"#868686\";\n message = \"DELETED\";\n break;\n default:\n bgColor = \"#174551\";\n message = \"CURRENT VERSION\";\n }\n\n return (\n \n {message}\n \n );\n};\n\nexport default SpecificVersionPill;\n","// This file is part of MinIO Console Server\n// Copyright (c) 2022 MinIO, Inc.\n//\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU Affero General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU Affero General Public License for more details.\n//\n// You should have received a copy of the GNU Affero General Public License\n// along with this program. If not, see .\n\nimport React from \"react\";\nimport { DateTime } from \"luxon\";\nimport styled from \"styled-components\";\nimport get from \"lodash/get\";\nimport { displayFileIconName } from \"../ListObjects/utils\";\nimport {\n DownloadIcon,\n PreviewIcon,\n RecoverIcon,\n ShareIcon,\n IconButton,\n Tooltip,\n Grid,\n Checkbox,\n} from \"mds\";\nimport { niceBytes } from \"../../../../../../common/utils\";\nimport SpecificVersionPill from \"./SpecificVersionPill\";\nimport { BucketObject } from \"api/consoleApi\";\n\ninterface IFileVersionItem {\n fileName: string;\n versionInfo: BucketObject;\n index: number;\n isSelected?: boolean;\n checkable: boolean;\n isChecked: boolean;\n onCheck: (versionID: string) => void;\n onShare: (versionInfo: BucketObject) => void;\n onDownload: (versionInfo: BucketObject) => void;\n onRestore: (versionInfo: BucketObject) => void;\n onPreview: (versionInfo: BucketObject) => void;\n globalClick: (versionInfo: BucketObject) => void;\n key: any;\n style: any;\n}\n\nconst FileVersionStyled = styled.div(({ theme }) => {\n return {\n \"&:before\": {\n content: \"' '\",\n display: \"block\",\n position: \"absolute\",\n width: \"2px\",\n height: \"calc(100% + 2px)\",\n backgroundColor: get(theme, \"borderColor\", \"#F8F8F8\"),\n left: \"24px\",\n },\n \"& .mainFileVersionItem\": {\n borderBottom: `${get(theme, \"borderColor\", \"#F8F8F8\")} 1px solid`,\n padding: \"1rem 0\",\n margin: \"0 0.5rem 0 2.5rem\",\n cursor: \"pointer\",\n \"&.deleted\": {\n color: \"#868686\",\n },\n },\n \"& .intermediateLayer\": {\n margin: \"0 1.5rem 0 1.5rem\",\n \"&:hover, &.selected\": {\n backgroundColor: get(theme, \"boxBackground\", \"#F8F8F8\"),\n \"& > div\": {\n borderBottomColor: get(theme, \"boxBackground\", \"#F8F8F8\"),\n },\n },\n },\n \"& .versionContainer\": {\n fontSize: 16,\n fontWeight: \"bold\",\n display: \"flex\",\n alignItems: \"center\",\n \"& svg.min-icon\": {\n width: 18,\n height: 18,\n minWidth: 18,\n minHeight: 18,\n marginRight: 10,\n },\n },\n \"& .buttonContainer\": {\n textAlign: \"right\",\n \"& button\": {\n marginLeft: \"1.5rem\",\n },\n },\n \"& .versionID\": {\n fontSize: \"12px\",\n margin: \"2px 0\",\n whiteSpace: \"nowrap\",\n textOverflow: \"ellipsis\",\n maxWidth: \"95%\",\n overflow: \"hidden\",\n },\n \"& .versionData\": {\n marginRight: \"10px\",\n fontSize: 12,\n color: \"#868686\",\n },\n \"@media (max-width: 600px)\": {\n \"& .buttonContainer\": {\n \"& button\": {\n marginLeft: \"5px\",\n },\n },\n },\n \"@media (max-width: 799px)\": {\n \"&:before\": {\n display: \"none\",\n },\n \"& .mainFileVersionItem\": {\n padding: \"5px 0px\",\n margin: 0,\n },\n \"& .intermediateLayer\": {\n margin: 0,\n \"&:hover, &.selected\": {\n backgroundColor: \"transparent\",\n \"& > div\": {\n borderBottomColor: get(theme, \"boxBackground\", \"#F8F8F8\"),\n },\n },\n },\n \"& .versionContainer\": {\n fontSize: 14,\n \"& svg.min-icon\": {\n display: \"none\",\n },\n },\n \"& .versionData\": {\n textOverflow: \"ellipsis\",\n maxWidth: \"95%\",\n overflow: \"hidden\",\n whiteSpace: \"nowrap\",\n },\n \"& .collapsableInfo\": {\n display: \"flex\",\n flexDirection: \"column\",\n },\n \"& .versionItem\": {\n display: \"none\",\n },\n },\n };\n});\n\nconst FileVersionItem = ({\n fileName,\n versionInfo,\n isSelected,\n checkable,\n isChecked,\n onCheck,\n onShare,\n onDownload,\n onRestore,\n onPreview,\n globalClick,\n index,\n key,\n style,\n}: IFileVersionItem) => {\n const disableButtons = versionInfo.is_delete_marker;\n\n const versionItemButtons = [\n {\n icon: ,\n action: onPreview,\n tooltip: \"Preview\",\n },\n {\n icon: ,\n action: onDownload,\n tooltip: \"Download this version\",\n },\n {\n icon: ,\n action: onShare,\n tooltip: \"Share this version\",\n },\n {\n icon: ,\n action: onRestore,\n tooltip: \"Restore this version\",\n },\n ];\n\n let pill: \"deleted\" | \"current\" | \"null\" | null = null;\n\n if (versionInfo.is_delete_marker) {\n pill = \"deleted\";\n } else if (versionInfo.is_latest) {\n pill = \"current\";\n } else if (versionInfo.version_id === \"null\") {\n pill = \"null\";\n }\n\n let lastModified = DateTime.now();\n\n if (versionInfo.last_modified) {\n lastModified = DateTime.fromISO(\n versionInfo.last_modified,\n ) as DateTime;\n }\n\n return (\n \n {\n globalClick(versionInfo);\n }}\n key={key}\n style={style}\n >\n \n \n \n \n \n {checkable && (\n {\n e.stopPropagation();\n onCheck(versionInfo.version_id || \"\");\n }}\n value={versionInfo.version_id || \"\"}\n disabled={versionInfo.is_delete_marker}\n sx={{\n width: \"initial\",\n }}\n />\n )}\n {displayFileIconName(fileName, true)} v{index.toString()}\n \n {pill && }\n \n \n \n {versionItemButtons.map((button, index) => {\n return (\n \n {\n e.stopPropagation();\n if (!disableButtons) {\n button.action(versionInfo);\n } else {\n e.preventDefault();\n }\n }}\n sx={{\n backgroundColor: \"#F8F8F8\",\n borderRadius: \"100%\",\n width: \"28px\",\n height: \"28px\",\n padding: \"5px\",\n \"& .min-icon\": {\n width: \"14px\",\n height: \"14px\",\n },\n }}\n >\n {button.icon}\n \n \n );\n })}\n \n \n \n \n {versionInfo.version_id !== \"null\" ? versionInfo.version_id : \"-\"}\n \n \n \n Last modified:{\" \"}\n {lastModified.toFormat(\"ccc, LLL dd yyyy HH:mm:ss (ZZZZ)\")}\n \n \n Size: {niceBytes(`${versionInfo.size || \"0\"}`)}\n \n \n \n \n \n \n );\n};\n\nexport default FileVersionItem;\n","// This file is part of MinIO Console Server\n// Copyright (c) 2022 MinIO, Inc.\n//\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU Affero General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU Affero General Public License for more details.\n//\n// You should have received a copy of the GNU Affero General Public License\n// along with this program. If not, see .\n\nimport React, { Fragment, useEffect, useState } from \"react\";\n\nimport { decodeURLString } from \"../../../../../../common/utils\";\nimport { ConfirmDeleteIcon, Switch, Grid, InputBox } from \"mds\";\nimport ConfirmDialog from \"../../../../Common/ModalWrapper/ConfirmDialog\";\nimport { setErrorSnackMessage } from \"../../../../../../systemSlice\";\nimport { AppState, useAppDispatch } from \"../../../../../../store\";\nimport { hasPermission } from \"../../../../../../common/SecureComponent\";\nimport { IAM_SCOPES } from \"../../../../../../common/SecureComponent/permissions\";\nimport { useSelector } from \"react-redux\";\nimport { api } from \"api\";\nimport { errorToHandler } from \"api/errors\";\n\ninterface IDeleteNonCurrentProps {\n closeDeleteModalAndRefresh: (refresh: boolean) => void;\n deleteOpen: boolean;\n selectedObject: string;\n selectedBucket: string;\n}\n\nconst DeleteNonCurrentVersions = ({\n closeDeleteModalAndRefresh,\n deleteOpen,\n selectedBucket,\n selectedObject,\n}: IDeleteNonCurrentProps) => {\n const dispatch = useAppDispatch();\n const [deleteLoading, setDeleteLoading] = useState(false);\n const [typeConfirm, setTypeConfirm] = useState(\"\");\n const [bypassGovernance, setBypassGovernance] = useState(false);\n\n const retentionConfig = useSelector(\n (state: AppState) => state.objectBrowser.retentionConfig,\n );\n\n const canBypass =\n hasPermission(\n [selectedBucket],\n [IAM_SCOPES.S3_BYPASS_GOVERNANCE_RETENTION],\n ) && retentionConfig?.mode === \"governance\";\n\n useEffect(() => {\n if (deleteLoading) {\n api.buckets\n .deleteObject(selectedBucket, {\n prefix: selectedObject,\n non_current_versions: true,\n bypass: bypassGovernance,\n })\n .then(() => {\n closeDeleteModalAndRefresh(true);\n })\n .catch((err) => {\n dispatch(setErrorSnackMessage(errorToHandler(err.error)));\n setDeleteLoading(false);\n });\n }\n }, [\n deleteLoading,\n closeDeleteModalAndRefresh,\n dispatch,\n selectedObject,\n selectedBucket,\n bypassGovernance,\n ]);\n\n if (!selectedObject) {\n return null;\n }\n const onConfirmDelete = () => {\n setDeleteLoading(true);\n };\n\n return (\n }\n isLoading={deleteLoading}\n onConfirm={onConfirmDelete}\n onClose={() => closeDeleteModalAndRefresh(false)}\n confirmButtonProps={{\n disabled: typeConfirm !== \"YES, PROCEED\" || deleteLoading,\n }}\n confirmationContent={\n \n Are you sure you want to delete all the non-current versions for:{\" \"}\n {decodeURLString(selectedObject)}? \n {canBypass && (\n \n
\n \n )}\n \n To continue please type YES, PROCEED in the box.\n \n \n \n ) => {\n setTypeConfirm(event.target.value);\n }}\n label=\"\"\n value={typeConfirm}\n />\n \n \n }\n />\n );\n};\n\nexport default DeleteNonCurrentVersions;\n","// This file is part of MinIO Console Server\n// Copyright (c) 2022 MinIO, Inc.\n//\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU Affero General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU Affero General Public License for more details.\n//\n// You should have received a copy of the GNU Affero General Public License\n// along with this program. If not, see .\n\nimport React, { Fragment, useEffect, useState } from \"react\";\nimport ConfirmDialog from \"../../../../Common/ModalWrapper/ConfirmDialog\";\nimport { ConfirmDeleteIcon, Switch } from \"mds\";\nimport { setErrorSnackMessage } from \"../../../../../../systemSlice\";\nimport { AppState, useAppDispatch } from \"../../../../../../store\";\nimport { hasPermission } from \"../../../../../../common/SecureComponent\";\nimport { IAM_SCOPES } from \"../../../../../../common/SecureComponent/permissions\";\nimport { useSelector } from \"react-redux\";\nimport { api } from \"api\";\nimport { errorToHandler } from \"api/errors\";\n\ninterface IDeleteSelectedVersionsProps {\n closeDeleteModalAndRefresh: (refresh: boolean) => void;\n deleteOpen: boolean;\n selectedVersions: string[];\n selectedObject: string;\n selectedBucket: string;\n}\n\nconst DeleteObject = ({\n closeDeleteModalAndRefresh,\n deleteOpen,\n selectedBucket,\n selectedVersions,\n selectedObject,\n}: IDeleteSelectedVersionsProps) => {\n const dispatch = useAppDispatch();\n const [deleteLoading, setDeleteLoading] = useState(false);\n const [bypassGovernance, setBypassGovernance] = useState(false);\n\n const retentionConfig = useSelector(\n (state: AppState) => state.objectBrowser.retentionConfig,\n );\n\n const canBypass =\n hasPermission(\n [selectedBucket],\n [IAM_SCOPES.S3_BYPASS_GOVERNANCE_RETENTION],\n ) && retentionConfig?.mode === \"governance\";\n\n const onClose = () => closeDeleteModalAndRefresh(false);\n const onConfirmDelete = () => {\n setDeleteLoading(true);\n };\n\n useEffect(() => {\n if (deleteLoading) {\n const selectedObjectsRequest = selectedVersions.map((versionID) => {\n return {\n path: selectedObject,\n versionID: versionID,\n recursive: false,\n };\n });\n\n if (selectedObjectsRequest.length > 0) {\n api.buckets\n .deleteMultipleObjects(selectedBucket, selectedObjectsRequest, {\n all_versions: false,\n bypass: bypassGovernance,\n })\n .then(() => {\n setDeleteLoading(false);\n closeDeleteModalAndRefresh(true);\n })\n .catch((err) => {\n dispatch(setErrorSnackMessage(errorToHandler(err.error)));\n setDeleteLoading(false);\n });\n }\n }\n }, [\n deleteLoading,\n closeDeleteModalAndRefresh,\n selectedBucket,\n selectedObject,\n selectedVersions,\n bypassGovernance,\n dispatch,\n ]);\n\n if (!selectedVersions) {\n return null;\n }\n\n return (\n }\n isLoading={deleteLoading}\n onConfirm={onConfirmDelete}\n onClose={onClose}\n confirmationContent={\n \n Are you sure you want to delete the selected {selectedVersions.length}{\" \"}\n versions for {selectedObject}?\n {canBypass && (\n \n
\n )}\n \n \n );\n};\n\nexport default DaysSelector;\n","// This file is part of MinIO Console Server\n// Copyright (c) 2021 MinIO, Inc.\n//\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU Affero General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU Affero General Public License for more details.\n//\n// You should have received a copy of the GNU Affero General Public License\n// along with this program. If not, see .\n\nimport React, { Fragment, useEffect, useState } from \"react\";\nimport { useSelector } from \"react-redux\";\nimport {\n Button,\n CopyIcon,\n ReadBox,\n ShareIcon,\n Grid,\n ProgressBar,\n Tooltip,\n} from \"mds\";\nimport CopyToClipboard from \"react-copy-to-clipboard\";\nimport ModalWrapper from \"../../../../Common/ModalWrapper/ModalWrapper\";\nimport DaysSelector from \"../../../../Common/FormComponents/DaysSelector/DaysSelector\";\nimport {\n encodeURLString,\n niceTimeFromSeconds,\n} from \"../../../../../../common/utils\";\nimport {\n selDistSet,\n setModalErrorSnackMessage,\n setModalSnackMessage,\n} from \"../../../../../../systemSlice\";\nimport { useAppDispatch } from \"../../../../../../store\";\nimport { BucketObject } from \"api/consoleApi\";\nimport { api } from \"api\";\nimport { errorToHandler } from \"api/errors\";\nimport { getMaxShareLinkExpTime } from \"screens/Console/ObjectBrowser/objectBrowserThunks\";\nimport { maxShareLinkExpTime } from \"screens/Console/ObjectBrowser/objectBrowserSlice\";\n\ninterface IShareFileProps {\n open: boolean;\n bucketName: string;\n dataObject: BucketObject;\n closeModalAndRefresh: () => void;\n}\n\nconst ShareFile = ({\n open,\n closeModalAndRefresh,\n bucketName,\n dataObject,\n}: IShareFileProps) => {\n const dispatch = useAppDispatch();\n const distributedSetup = useSelector(selDistSet);\n const maxshareLinkExpTimeVal = useSelector(maxShareLinkExpTime);\n const [shareURL, setShareURL] = useState(\"\");\n const [isLoadingVersion, setIsLoadingVersion] = useState(true);\n const [isLoadingFile, setIsLoadingFile] = useState(false);\n const [selectedDate, setSelectedDate] = useState(\"\");\n const [dateValid, setDateValid] = useState(true);\n const [versionID, setVersionID] = useState(\"null\");\n\n const initialDate = new Date();\n\n const dateChanged = (newDate: string, isValid: boolean) => {\n setDateValid(isValid);\n if (isValid) {\n setSelectedDate(newDate);\n return;\n }\n setSelectedDate(\"\");\n setShareURL(\"\");\n };\n\n useEffect(() => {\n dispatch(getMaxShareLinkExpTime());\n }, [dispatch]);\n\n useEffect(() => {\n // In case version is undefined, we get the latest version of the object\n if (dataObject.version_id === undefined) {\n // In case it is not distributed setup, then we default to \"null\";\n if (distributedSetup) {\n api.buckets\n .listObjects(bucketName, {\n prefix: encodeURLString(dataObject.name || \"\"),\n with_versions: distributedSetup,\n })\n .then((res) => {\n const result: BucketObject[] = res.data.objects || [];\n\n const latestVersion: BucketObject | undefined = result.find(\n (elem: BucketObject) => elem.is_latest,\n );\n\n if (latestVersion) {\n setVersionID(`${latestVersion.version_id}`);\n return;\n }\n\n // Version couldn't be retrieved, we default\n setVersionID(\"null\");\n })\n .catch((err) => {\n dispatch(setModalErrorSnackMessage(errorToHandler(err.error)));\n });\n\n setIsLoadingVersion(false);\n return;\n }\n setVersionID(\"null\");\n setIsLoadingVersion(false);\n return;\n }\n setVersionID(dataObject.version_id || \"null\");\n setIsLoadingVersion(false);\n }, [bucketName, dataObject, distributedSetup, dispatch]);\n\n useEffect(() => {\n if (dateValid && !isLoadingVersion) {\n setIsLoadingFile(true);\n setShareURL(\"\");\n\n const slDate = new Date(`${selectedDate}`);\n const currDate = new Date();\n\n const diffDate = Math.ceil(\n (slDate.getTime() - currDate.getTime()) / 1000,\n );\n\n if (diffDate > 0) {\n api.buckets\n .shareObject(bucketName, {\n prefix: encodeURLString(dataObject.name || \"\"),\n version_id: versionID,\n expires: selectedDate !== \"\" ? `${diffDate}s` : \"\",\n })\n .then((res) => {\n setShareURL(res.data);\n setIsLoadingFile(false);\n })\n .catch((err) => {\n dispatch(setModalErrorSnackMessage(errorToHandler(err.error)));\n setShareURL(\"\");\n setIsLoadingFile(false);\n });\n }\n }\n }, [\n dataObject,\n selectedDate,\n bucketName,\n dateValid,\n setShareURL,\n dispatch,\n distributedSetup,\n isLoadingVersion,\n versionID,\n ]);\n\n return (\n \n }\n modalOpen={open}\n onClose={() => {\n closeModalAndRefresh();\n }}\n >\n {isLoadingVersion && (\n \n \n \n )}\n {!isLoadingVersion && (\n \n \n \n You can reset your session by logging out and logging back\n in to the web UI.
\n You can increase the maximum configuration time by setting\n the MINIO_STS_DURATION environment variable on all your\n nodes.
\n You can use mc share as an alternative to this UI,\n where the session length does not limit the URL validity.\n \n }\n >\n \n The following URL lets you share this object without requiring\n a login. \n The URL expires automatically at the earlier of your\n configured time ({niceTimeFromSeconds(maxshareLinkExpTimeVal)}\n ) or the expiration of your current web session.\n \n \n \n \n \n \n \n \n \n {\n dispatch(\n setModalSnackMessage(\"Share URL Copied to clipboard\"),\n );\n }}\n disabled={shareURL === \"\" || isLoadingFile}\n style={{\n width: \"28px\",\n height: \"28px\",\n padding: \"0px\",\n }}\n icon={}\n />\n \n }\n >\n {shareURL}\n \n \n \n )}\n \n \n );\n};\n\nexport default ShareFile;\n","// This file is part of MinIO Console Server\n// Copyright (c) 2023 MinIO, Inc.\n//\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU Affero General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU Affero General Public License for more details.\n//\n// You should have received a copy of the GNU Affero General Public License\n// along with this program. If not, see .\n\nimport React, { Fragment, useState } from \"react\";\nimport { Document, Page, pdfjs } from \"react-pdf\";\nimport { Box, Button, InformativeMessage } from \"mds\";\n\npdfjs.GlobalWorkerOptions.workerSrc = \"./scripts/pdf.worker.min.js\";\n\ninterface IPreviewPDFProps {\n path: string;\n loading: boolean;\n onLoad: () => void;\n downloadFile: () => void;\n}\n\nconst PreviewPDF = ({\n path,\n loading,\n onLoad,\n downloadFile,\n}: IPreviewPDFProps) => {\n const [errorState, setErrorState] = useState(false);\n const [totalPages, setTotalPages] = useState(0);\n\n if (!path) {\n return null;\n }\n\n const renderPages = totalPages > 5 ? 5 : totalPages;\n const arrayCreate = Array.from(Array(renderPages).keys());\n\n return (\n \n {errorState && totalPages === 0 && (\n \n File preview couldn't be displayed, Please try Download instead.\n \n \n Download File\n \n \n \n }\n sx={{ marginBottom: 10 }}\n />\n )}\n {!loading && !errorState && (\n \n This is a File Preview for the first {arrayCreate.length} pages of\n the document, if you wish to work with the full document please\n download instead.\n \n \n Download File\n \n \n \n }\n sx={{ marginBottom: 10 }}\n />\n )}\n {!errorState && (\n \n {\n setTotalPages(_pdfInfo.numPages || 0);\n setErrorState(false);\n onLoad();\n }}\n onLoadError={(error) => {\n setErrorState(true);\n onLoad();\n console.error(error);\n }}\n >\n {arrayCreate.map((item) => (\n \n ))}\n \n \n )}\n \n );\n};\n\nexport default PreviewPDF;\n","// This file is part of MinIO Console Server\n// Copyright (c) 2021 MinIO, Inc.\n//\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU Affero General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU Affero General Public License for more details.\n//\n// You should have received a copy of the GNU Affero General Public License\n// along with this program. If not, see .\n\nimport React, { Fragment, useCallback, useEffect, useState } from \"react\";\nimport { ProgressBar, Grid, Box, InformativeMessage } from \"mds\";\nimport get from \"lodash/get\";\nimport { AllowedPreviews, previewObjectType } from \"../utils\";\nimport { encodeURLString } from \"../../../../../../common/utils\";\nimport { api } from \"../../../../../../api\";\nimport PreviewPDF from \"./PreviewPDF\";\nimport { downloadObject } from \"../../../../ObjectBrowser/utils\";\nimport { useAppDispatch } from \"../../../../../../store\";\nimport { BucketObject } from \"../../../../../../api/consoleApi\";\n\ninterface IPreviewFileProps {\n bucketName: string;\n actualInfo: BucketObject;\n isFullscreen?: boolean;\n}\n\nconst PreviewFile = ({\n bucketName,\n actualInfo,\n isFullscreen = false,\n}: IPreviewFileProps) => {\n const dispatch = useAppDispatch();\n\n const [loading, setLoading] = useState(true);\n\n const [metaData, setMetaData] = useState(null);\n const [isMetaDataLoaded, setIsMetaDataLoaded] = useState(false);\n\n const objectName = actualInfo?.name || \"\";\n\n const fetchMetadata = useCallback(() => {\n if (!isMetaDataLoaded) {\n const encodedPath = encodeURLString(objectName);\n api.buckets\n .getObjectMetadata(bucketName, {\n prefix: encodedPath,\n versionID: actualInfo.version_id || \"\",\n })\n .then((res) => {\n let metadata = get(res.data, \"objectMetadata\", {});\n setIsMetaDataLoaded(true);\n setMetaData(metadata);\n })\n .catch((err) => {\n console.error(\n \"Error Getting Metadata Status: \",\n err,\n err?.detailedError,\n );\n setIsMetaDataLoaded(true);\n });\n }\n }, [bucketName, objectName, isMetaDataLoaded, actualInfo.version_id]);\n\n useEffect(() => {\n if (bucketName && objectName) {\n fetchMetadata();\n }\n }, [bucketName, objectName, fetchMetadata]);\n\n let path = \"\";\n\n if (actualInfo) {\n const encodedPath = encodeURLString(actualInfo.name || \"\");\n let basename = document.baseURI.replace(window.location.origin, \"\");\n path = `${window.location.origin}${basename}api/v1/buckets/${bucketName}/objects/download?preview=true&prefix=${encodedPath}`;\n if (actualInfo.version_id) {\n path = path.concat(`&version_id=${actualInfo.version_id}`);\n }\n }\n\n let objectType: AllowedPreviews = previewObjectType(metaData, objectName);\n\n const iframeLoaded = () => {\n setLoading(false);\n };\n\n return (\n \n {objectType !== \"none\" && loading && (\n \n \n \n )}\n {isMetaDataLoaded ? (\n \n {objectType === \"video\" && (\n \n )}\n {objectType === \"audio\" && (\n \n )}\n {objectType === \"image\" && (\n \n )}\n {objectType === \"pdf\" && (\n \n \n downloadObject(dispatch, bucketName, path, actualInfo)\n }\n />\n \n )}\n {objectType === \"none\" && (\n
\n )}\n \n ) : null}\n \n );\n};\nexport default PreviewFile;\n","// This file is part of MinIO Console Server\n// Copyright (c) 2021 MinIO, Inc.\n//\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU Affero General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU Affero General Public License for more details.\n//\n// You should have received a copy of the GNU Affero General Public License\n// along with this program. If not, see .\n\nimport React, { Fragment } from \"react\";\nimport ModalWrapper from \"../../../../Common/ModalWrapper/ModalWrapper\";\nimport PreviewFileContent from \"./PreviewFileContent\";\nimport { ObjectPreviewIcon } from \"mds\";\nimport { BucketObject } from \"../../../../../../api/consoleApi\";\n\ninterface IPreviewFileProps {\n open: boolean;\n bucketName: string;\n actualInfo: BucketObject;\n onClosePreview: () => void;\n}\n\nconst PreviewFileModal = ({\n open,\n bucketName,\n actualInfo,\n onClosePreview,\n}: IPreviewFileProps) => {\n return (\n \n }\n >\n \n \n \n );\n};\n\nexport default PreviewFileModal;\n","// This file is part of MinIO Console Server\n// Copyright (c) 2021 MinIO, Inc.\n//\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU Affero General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU Affero General Public License for more details.\n//\n// You should have received a copy of the GNU Affero General Public License\n// along with this program. If not, see .\n\nimport React, { ComponentType, Suspense, SuspenseProps } from \"react\";\n\nfunction withSuspense
(\n WrappedComponent: ComponentType
,\n fallback: SuspenseProps[\"fallback\"] = null,\n) {\n function ComponentWithSuspense(props: P) {\n return (\n \n \n \n );\n }\n\n return ComponentWithSuspense;\n}\n\nexport default withSuspense;\n","// This file is part of MinIO Console Server\n// Copyright (c) 2022 MinIO, Inc.\n//\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU Affero General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU Affero General Public License for more details.\n//\n// You should have received a copy of the GNU Affero General Public License\n// along with this program. If not, see .\n\nimport { createAsyncThunk } from \"@reduxjs/toolkit\";\nimport { AppState } from \"../../../store\";\nimport { encodeURLString, getClientOS } from \"../../../common/utils\";\nimport { BucketObjectItem } from \"../Buckets/ListBuckets/Objects/ListObjects/types\";\nimport { makeid, storeCallForObjectWithID } from \"./transferManager\";\nimport {\n download,\n downloadSelectedAsZip,\n} from \"../Buckets/ListBuckets/Objects/utils\";\nimport {\n cancelObjectInList,\n completeObject,\n failObject,\n setAnonymousAccessOpen,\n setDownloadRenameModal,\n setMaxShareLinkExpTime,\n setNewObject,\n setPreviewOpen,\n setSelectedPreview,\n setShareFileModalOpen,\n updateProgress,\n} from \"./objectBrowserSlice\";\nimport { setSnackBarMessage } from \"../../../systemSlice\";\nimport { DateTime } from \"luxon\";\nimport { api } from \"api\";\n\nexport const downloadSelected = createAsyncThunk(\n \"objectBrowser/downloadSelected\",\n async (bucketName: string, { getState, rejectWithValue, dispatch }) => {\n const state = getState() as AppState;\n\n const downloadObject = (object: BucketObjectItem) => {\n const identityDownload = encodeURLString(\n `${bucketName}-${object.name}-${new Date().getTime()}-${Math.random()}`,\n );\n\n const ID = makeid(8);\n\n const downloadCall = download(\n bucketName,\n encodeURLString(object.name),\n object.version_id,\n object.size,\n null,\n ID,\n (progress) => {\n dispatch(\n updateProgress({\n instanceID: identityDownload,\n progress: progress,\n }),\n );\n },\n () => {\n dispatch(completeObject(identityDownload));\n },\n (msg: string) => {\n dispatch(failObject({ instanceID: identityDownload, msg }));\n },\n () => {\n dispatch(cancelObjectInList(identityDownload));\n },\n () => {\n dispatch(\n setSnackBarMessage(\n \"File download will be handled directly by the browser.\",\n ),\n );\n },\n );\n storeCallForObjectWithID(ID, downloadCall);\n dispatch(\n setNewObject({\n ID,\n bucketName,\n done: false,\n instanceID: identityDownload,\n percentage: 0,\n prefix: object.name,\n type: \"download\",\n waitingForFile: true,\n failed: false,\n cancelled: false,\n errorMessage: \"\",\n }),\n );\n };\n\n if (state.objectBrowser.selectedObjects.length !== 0) {\n let itemsToDownload: BucketObjectItem[] = [];\n\n const filterFunction = (currValue: BucketObjectItem) =>\n state.objectBrowser.selectedObjects.includes(currValue.name);\n\n itemsToDownload = state.objectBrowser.records.filter(filterFunction);\n\n // In case just one element is selected, then we trigger download modal validation.\n if (itemsToDownload.length === 1) {\n if (\n itemsToDownload[0].name.length > 200 &&\n getClientOS().toLowerCase().includes(\"win\")\n ) {\n dispatch(setDownloadRenameModal(itemsToDownload[0]));\n return;\n } else {\n downloadObject(itemsToDownload[0]);\n }\n } else {\n if (itemsToDownload.length === 1) {\n downloadObject(itemsToDownload[0]);\n } else if (itemsToDownload.length > 1) {\n const fileName = `${DateTime.now().toFormat(\n \"LL-dd-yyyy-HH-mm-ss\",\n )}_files_list.zip`;\n\n // We are enforcing zip download when multiple files are selected for better user experience\n const multiObjList = itemsToDownload.reduce((dwList: any[], bi) => {\n // Download objects/prefixes(recursively) as zip\n // Skip any deleted files selected via \"Show deleted objects\" in selection and log for debugging\n const isDeleted = bi?.delete_flag;\n if (bi && !isDeleted) {\n dwList.push(bi.name);\n } else {\n console.log(`Skipping ${bi?.name} from download.`);\n }\n return dwList;\n }, []);\n\n await downloadSelectedAsZip(bucketName, multiObjList, fileName);\n return;\n }\n }\n }\n },\n);\n\nexport const openPreview = createAsyncThunk(\n \"objectBrowser/openPreview\",\n async (_, { getState, rejectWithValue, dispatch }) => {\n const state = getState() as AppState;\n\n if (state.objectBrowser.selectedObjects.length === 1) {\n let fileObject: BucketObjectItem | undefined;\n\n const findFunction = (currValue: BucketObjectItem) =>\n state.objectBrowser.selectedObjects.includes(currValue.name);\n\n fileObject = state.objectBrowser.records.find(findFunction);\n\n if (fileObject) {\n dispatch(setSelectedPreview(fileObject));\n dispatch(setPreviewOpen(true));\n }\n }\n },\n);\n\nexport const openShare = createAsyncThunk(\n \"objectBrowser/openShare\",\n async (_, { getState, rejectWithValue, dispatch }) => {\n const state = getState() as AppState;\n\n if (state.objectBrowser.selectedObjects.length === 1) {\n let fileObject: BucketObjectItem | undefined;\n\n const findFunction = (currValue: BucketObjectItem) =>\n state.objectBrowser.selectedObjects.includes(currValue.name);\n\n fileObject = state.objectBrowser.records.find(findFunction);\n\n if (fileObject) {\n dispatch(setSelectedPreview(fileObject));\n dispatch(setShareFileModalOpen(true));\n }\n }\n },\n);\n\nexport const openAnonymousAccess = createAsyncThunk(\n \"objectBrowser/openAnonymousAccess\",\n async (_, { getState, dispatch }) => {\n const state = getState() as AppState;\n\n if (\n state.objectBrowser.selectedObjects.length === 1 &&\n state.objectBrowser.selectedObjects[0].endsWith(\"/\")\n ) {\n dispatch(setAnonymousAccessOpen(true));\n }\n },\n);\n\nexport const getMaxShareLinkExpTime = createAsyncThunk(\n \"objectBrowser/maxShareLinkExpTime\",\n async (_, { rejectWithValue, dispatch }) => {\n return api.buckets\n .getMaxShareLinkExp()\n .then((res) => {\n dispatch(setMaxShareLinkExpTime(res.data.exp));\n })\n .catch(async (res) => {\n return rejectWithValue(res.error);\n });\n },\n);\n","// This file is part of MinIO Console Server\n// Copyright (c) 2023 MinIO, Inc.\n//\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU Affero General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU Affero General Public License for more details.\n//\n// You should have received a copy of the GNU Affero General Public License\n// along with this program. If not, see .\n\nimport { encodeURLString, getClientOS } from \"../../../common/utils\";\nimport { makeid, storeCallForObjectWithID } from \"./transferManager\";\nimport { download } from \"../Buckets/ListBuckets/Objects/utils\";\nimport {\n cancelObjectInList,\n completeObject,\n failObject,\n setLongFileOpen,\n setNewObject,\n updateProgress,\n} from \"./objectBrowserSlice\";\nimport { AppDispatch } from \"../../../store\";\nimport { setSnackBarMessage } from \"../../../systemSlice\";\nimport { BucketObject } from \"api/consoleApi\";\n\nexport const downloadObject = (\n dispatch: AppDispatch,\n bucketName: string,\n internalPaths: string,\n object: BucketObject,\n) => {\n const identityDownload = encodeURLString(\n `${bucketName}-${object.name}-${new Date().getTime()}-${Math.random()}`,\n );\n\n const isWinOs = getClientOS().toLowerCase().includes(\"win\");\n\n if ((object.name?.length || 0) > 200 && isWinOs) {\n dispatch(setLongFileOpen(true));\n return;\n }\n\n const ID = makeid(8);\n\n const downloadCall = download(\n bucketName,\n internalPaths,\n object.version_id,\n object.size || 0,\n null,\n ID,\n (progress) => {\n dispatch(\n updateProgress({\n instanceID: identityDownload,\n progress: progress,\n }),\n );\n },\n () => {\n dispatch(completeObject(identityDownload));\n },\n (msg: string) => {\n dispatch(failObject({ instanceID: identityDownload, msg }));\n },\n () => {\n dispatch(cancelObjectInList(identityDownload));\n },\n () => {\n dispatch(\n setSnackBarMessage(\n \"File download will be handled directly by the browser.\",\n ),\n );\n },\n );\n\n storeCallForObjectWithID(ID, downloadCall);\n dispatch(\n setNewObject({\n ID,\n bucketName,\n done: false,\n instanceID: identityDownload,\n percentage: 0,\n prefix: object.name || \"\",\n type: \"download\",\n waitingForFile: true,\n failed: false,\n cancelled: false,\n errorMessage: \"\",\n }),\n );\n};\n","// This file is part of MinIO Console Server\n// Copyright (c) 2022 MinIO, Inc.\n//\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU Affero General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU Affero General Public License for more details.\n//\n// You should have received a copy of the GNU Affero General Public License\n// along with this program. If not, see .\n\nimport React, { useState } from \"react\";\nimport { Button, CopyIcon, InputBox, Box, breakPoints } from \"mds\";\n\nconst KeyRevealer = ({ value }: { value: string }) => {\n const [shown, setShown] = useState(false);\n\n return (\n \n {}}\n value={value}\n overlayIcon={}\n readOnly={true}\n overlayAction={() => navigator.clipboard.writeText(value)}\n />\n\n setShown(!shown)}\n label={\"Show/Hide\"}\n />\n \n );\n};\n\nexport default KeyRevealer;\n"],"names":["_ref","modalOpen","onClose","bucket","prefilledRoute","dispatch","useAppDispatch","prefix","setPrefix","useState","selectedAccess","setSelectedAccess","useEffect","_jsx","ModalWrapper","title","titleIcon","AddAccessRuleIcon","children","_jsxs","FormLayout","withBorders","containerPadding","InputBox","value","label","id","name","placeholder","onChange","e","target","tooltip","Select","options","disabled","helpTip","Fragment","helpTipPlacement","Grid","item","xs","sx","modalStyleUtils","modalButtonBar","Button","type","variant","onClick","resetForm","trim","createProcess","api","setAccessRuleWithBucket","access","then","res","setSnackBarMessage","catch","setErrorSnackMessage","errorToHandler","error","extractFileExtn","resourceStr","match","getSessionGrantsWildCard","sessionGrants","uploadPath","scopes","arguments","length","undefined","grantsWithExtension","Object","keys","reduce","acc","grantKey","includes","filter","sessionGrantKey","hasScope","some","actionKey","find","scopeKey","wildCardMatch","indexOf","scopeActionKey","substring","isUploadPathMatching","concat","CreatePathModal","withSuspense","React","BreadcrumbsMain","styled","div","display","paddingRight","alignItems","breakPoints","lg","margin","bucketName","internalPaths","hidePathButton","additionalOptions","navigate","useNavigate","rewindEnabled","useSelector","state","objectBrowser","rewind","versionsMode","versionedFile","anonymousMode","system","createFolderOpen","setCreateFolderOpen","canCreateSubpath","setCanCreateSubpath","putObjectPermScopes","IAM_SCOPES","S3_PUT_OBJECT","S3_PUT_ACTIONS","console","session","permissions","paths","splitPaths","split","path","lastBreadcrumbsIndex","pathToCheckPerms","sessionGrantWildCards","forEach","grant","canCreatePath","hasPermission","breadcrumbsMap","map","objectItem","index","subSplit","slice","join","route","encodeURLString","className","style","cursor","whiteSpace","safeDecodeURIComponent","Link","to","setVersionsModeEnabled","status","objectName","toString","versionsItem","listBreadcrumbs","folderName","closeAddFolderModal","limitedSubPath","Breadcrumbs","goBackFunction","prevPath","CopyToClipboard","text","icon","CopyIcon","width","height","fill","marginTop","color","border","marginRight","Box","Tooltip","permissionTooltipHelper","NewPathIcon","marginBottom","justifyContent","fontSize","fontWeight","flexDirection","flexWrap","isVersionedMode","forceDisable","uploadFileFunction","uploadFolderFunction","overrideStyles","anchorEl","setAnchorEl","uploadOptionsOpen","uploadOptionsSetOpen","openUploadMenu","Boolean","handleCloseUpload","uploadObjectAllowed","uploadFolderAllowed","uploadEnabled","TooltipWrapper","event","currentTarget","UploadIcon","DropdownSelector","UploadFolderIcon","selectedOption","onSelect","nValue","hideTriggerAction","open","anchorOrigin","useAnchorWidth","closePanel","borderColor","borderWidth","borderStyle","borderRadius","borderBottomLeftRadius","borderBottomRightRadius","transitionDuration","overflowX","overflowY","position","opacity","marginLeft","minWidth","borderLeftWidth","ClosePanelIcon","right","top","padding","backgroundColor","strings","minHeight","overflow","textOverflow","replaceUnicodeChar","extensionToIcon","FileVideoIcon","extensions","FileMusicIcon","FilePdfIcon","FilePptIcon","FileXlsIcon","FileLockIcon","FileCodeIcon","FileConfigIcon","FileDbIcon","FileFontIcon","FileTxtIcon","FileZipIcon","FileBookIcon","FileImageIcon","displayFileIconName","element","returnOnlyIcon","elementString","FileNonType","endsWith","FolderBrowserIcon","lowercaseElement","toLowerCase","etc","ext","FileMissingIcon","splitItem","IconWithLabel","metaData","metaKeys","renderItem","Array","isArray","itemRendererFn","maxHeight","months","days","from","_","num","currentYear","Date","getFullYear","years","numYear","forwardRef","ref","disableOptions","borderBottom","onDateChange","useImperativeHandle","resetDate","month","setMonth","day","setDay","year","setYear","valueSplit","parseInt","isValid","dateString","validDate","currentDate","parse","isNaN","parsedMonth","parsedDay","monthForString","dayForString","parsedDate","toISOString","isDateDisabled","monthForDropDown","daysForDrop","yearsForDrop","gap","InputLabel","htmlFor","placement","HelpIcon","newValue","closeModalAndRefresh","objectInfo","retentionConfig","statusEnabled","setStatusEnabled","setType","date","setDate","isDateValid","setIsDateValid","isSaving","setIsSaving","alreadyConfigured","setAlreadyConfigured","retention_mode","mode","ObjectRetentionMode","Governance","retention_until_date","valueDate","getMonth","getDate","dateElement","useRef","current","showSwitcher","noValidate","autoComplete","onSubmit","preventDefault","Switch","checked","indicatorLabels","RadioGroup","currentValue","selectorOptions","Compliance","DateSelector","saveNewRetentionPolicy","selectedObject","versionId","version_id","expireDate","addRetention","buckets","putObjectRetention","expires","err","setModalErrorSnackMessage","disableRetention","deleteObjectRetention","closeDeleteModalAndRefresh","deleteOpen","selectedBucket","versioningInfo","selectedVersion","deleteLoading","invokeDeleteApi","useApi","onDelSuccess","detailedError","deleteVersions","setDeleteVersions","bypassGovernance","setBypassGovernance","canBypass","S3_BYPASS_GOVERNANCE_RETENTION","ConfirmDialog","confirmText","isOpen","ConfirmDeleteIcon","isLoading","onConfirm","onConfirmDelete","recursive","decodeURLString","confirmationContent","description","actualInfo","legalHoldEnabled","setLegalHoldEnabled","get","putObjectLegalHold","ObjectLegalHoldStatus","Enabled","Disabled","DeleteTag","b","theme","_ref2","_actualInfo$name","onCloseAndUpdate","distributedSetup","selDistSet","newKey","setNewKey","newLabel","setNewLabel","isSending","setIsSending","deleteEnabled","setDeleteEnabled","deleteKey","setDeleteKey","deleteLabel","setDeleteLabel","currentTags","tags","currTagKeys","allPathData","currentItem","pop","tagsFor","plural","iconColor","DisabledIcon","EditTagIcon","container","cancelDelete","deleteTagProcess","cleanObject","verID","putObjectTags","SecureComponent","S3_GET_OBJECT_TAGGING","S3_GET_ACTIONS","resource","flexFlow","tagKey","tag","S3_DELETE_OBJECT_TAGGING","errorProps","deleteIcon","onDelete","Tag","onDeleteTag","S3_PUT_OBJECT_TAGGING","SectionTitle","AddNewTagIcon","separator","addTagProcess","newTag","newTagList","closeInspectModalAndRefresh","inspectOpen","inspectPath","volumeName","isEncrypt","setIsEncrypt","decryptionKey","setDecryptionKey","insFileName","setInsFileName","InspectMenuIcon","async","file","volume","basename","document","baseURI","replace","window","location","origin","fetch","url","method","makeRequest","ok","resErr","json","errorMessage","message","code","blob","filename","headers","decryptKey","getCookieValue","performDownload","onCloseDecKeyModal","deleteCookie","PasswordKeyIcon","KeyRevealer","closeModal","newFileName","setNewFileName","acceptLongName","setAcceptLongName","EditIcon","downloadObject","doDownload","emptyFile","is_latest","last_modified","legal_hold_status","size","locking","onClosePanel","loadingObjectInfo","shareFileModalOpen","setShareFileModalOpen","retentionModalOpen","setRetentionModalOpen","tagModalOpen","setTagModalOpen","legalholdOpen","setLegalholdOpen","inspectModalOpen","setInspectModalOpen","setActualInfo","allInfoElements","setAllInfoElements","objectToShare","setObjectToShare","versions","setVersions","setDeleteOpen","previewOpen","setPreviewOpen","totalVersionsSize","setTotalVersionsSize","longFileOpen","setLongFileOpen","setMetaData","loadMetadata","setLoadingMetadata","objectNameArray","infoElement","el","is_delete_marker","listObjects","with_versions","result","data","objects","tVersionSize","currValue","resInfo","setLoadingObjectInfo","getObjectMetadata","versionID","metadata","tagKeys","loaderForContainer","textAlign","Loader","objectResources","canSetLegalHold","S3_PUT_OBJECT_LEGAL_HOLD","canSetTags","canChangeRetention","S3_GET_OBJECT_RETENTION","S3_PUT_OBJECT_RETENTION","canInspect","ADMIN_INSPECT_DATA","canChangeVersioning","S3_GET_BUCKET_VERSIONING","S3_PUT_BUCKET_VERSIONING","S3_GET_OBJECT_VERSION","canGetObject","S3_GET_OBJECT","canDelete","S3_DELETE_OBJECT","objectType","previewObjectType","multiActionButtons","action","DownloadIcon","ShareIcon","PreviewIcon","LegalHoldIcon","openRetentionModal","RetentionIcon","TagsIcon","VersionsIcon","ShareFile","closeShareModal","dataObject","SetRetention","updateInfo","DeleteObject","closeAndReload","setLoadingVersions","setSelectedVersion","SetLegalHoldModal","reload","PreviewFileModal","onClosePreview","TagsModal","reloadObjectData","InspectObject","RenameLongFileName","closeFileOpen","textTransform","ActionsList","items","DeleteIcon","iconLocation","fullWidth","SimpleHeader","ObjectInfoIcon","overflowWrap","niceBytes","niceBytesInt","lastModified","currentTime","modifiedTime","difTime","getTime","formatTime","niceDaysInt","calculateLastModifyTime","etag","S3_GET_OBJECT_LEGAL_HOLD","MetadataIcon","ObjectMetaData","versionToRestore","objectPath","restoreOpen","restoreLoading","setRestoreLoading","RecoverIcon","restoreVersion","putObjectRestore","restoreLocalObjectList","confirmButtonProps","bgColor","FileVersionStyled","content","left","borderBottomColor","maxWidth","fileName","versionInfo","isSelected","checkable","isChecked","onCheck","onShare","onDownload","onRestore","onPreview","globalClick","key","disableButtons","versionItemButtons","pill","DateTime","now","fromISO","md","Checkbox","stopPropagation","SpecificVersionPill","button","IconButton","toFormat","setDeleteLoading","typeConfirm","setTypeConfirm","deleteObject","non_current_versions","bypass","selectedVersions","selectedObjectsRequest","deleteMultipleObjects","all_versions","searchVersions","loadingVersions","restoreVersionOpen","setRestoreVersionOpen","setRestoreVersion","sortValue","setSortValue","deleteNonCurrentOpen","setDeleteNonCurrentOpen","selectEnabled","setSelectEnabled","selectedItems","setSelectedItems","delSelectedVOpen","setDelSelectedVOpen","decodedInternalPaths","filteredPrefixes","onShareItem","onPreviewItem","onRestoreItem","onDownloadItem","onGlobalClick","filteredRecords","version","totalSpace","sort","a","dateA","dateB","onCheckVersion","filteredItems","cloneState","push","RestoreFileVersion","content_type","DeleteNonCurrent","reloadAfterDelete","DeleteSelectedVersions","reloadOnComplete","ProgressBar","BrowserBreadcrumbs","ScreenTitle","subTitle","actions","SelectMultipleIcon","DeleteNonCurrentIcon","noLabelMinWidth","bottomBorder","flexGrow","List","containerStyle","rowCount","rowHeight","rowRenderer","isScrolling","isVisible","versOrd","FileVersionItem","displayParsedDate","object","currTime","objectTime","hasSame","displayNiceBytes","String","listModeColumns","elementKey","renderFunction","enableSort","renderFullObject","rewindModeColumns","ListObjectsTable","params","useParams","sortDirection","setSortDirection","currentSortField","setCurrentSortField","detailsOpen","objectDetailsOpen","requestInProgress","features","selFeatures","obOnly","records","searchObjects","selectedObjects","connectionError","displayListObjects","S3_LIST_BUCKET","S3_ALL_LIST_BUCKET","sortASC","sortListObjects","payload","reverse","tableActions","_object$name","idElement","newPath","setSelectedObjects","setObjectDetailsView","setSelectedObjectView","sendOnlyId","customPaperHeight","DataTable","itemActions","columns","entityName","idField","targetD","elements","customEmptyMessage","sortEnabled","currentSort","currentDirection","onSortClick","sortData","newSortDirection","sortBy","setReloadObjectsList","onSelectAll","selectAllItems","rowStyle","_payload$index","delete_flag","noBackground","FilterObjectsSB","SearchBox","setSearchObjects","DeleteMultipleObjects","RewindEnable","baseDnDStyle","outline","activeDnDStyle","acceptDnDStyle","ListObjects","_downloadRenameModal$","useLocation","bucketToRewind","showDeleted","selectedInternalPaths","simplePath","versioningConfig","lockingEnabled","downloadRenameModal","selectedPreview","anonymousAccessOpen","_state$objectBrowser","loadingBucket","selBucketDetailsLoading","bucketInfo","selBucketDetailsInfo","deleteMultipleOpen","setDeleteMultipleOpen","rewindSelect","setRewindSelect","iniLoad","setIniLoad","canShareFile","setCanShareFile","canPreviewFile","setCanPreviewFile","quota","setQuota","isMetaDataLoaded","setIsMetaDataLoaded","isVersioningApplied","pathSegment","pathname","pageTitle","currentPath","i","fileUpload","folderUpload","pathAsResourceInPolicy","allowedFileExtensions","cv","extension","Set","getPolicyAllowedFileExtensions","canDownload","canRewind","canUpload","canSetAnonymousAccess","S3_GET_BUCKET_POLICY","S3_PUT_BUCKET_POLICY","isSelObjectDelMarker","checkForDelMarker","isObjDelMarker","obj","fetchMetadata","useCallback","encodedPath","resetRewind","setAttribute","isPrefix","getBucketQuota","quotaVals","detailedMessage","setBucketDetailsLoad","setBucketInfo","getBucketRetentionConfig","setRetentionConfig","handleUploadButton","files","newFiles","uploadObject","folderPath","pathPrefix","upload","uploadPromise","Promise","resolve","reject","uploadUrl","blobFile","Blob","filePath","fileWebkitRelativePath","relativeFolderPath","ID","makeid","prefixPath","finalFolderPath","pathClean","startsWith","identity","Math","random","xhr","XMLHttpRequest","setRequestHeader","areMultipleFiles","errorMessages","withCredentials","onload","completeObject","removeTrace","response","JSON","failObject","instanceID","msg","addEventListener","progress","floor","loaded","total","updateProgress","onerror","onloadend","onabort","cancelObjectInList","formData","FormData","append","storeCallForObjectWithID","setNewObject","done","percentage","waitingForFile","failed","cancelled","storeFormDataWithID","uploadFilePromises","openList","allSettled","results","errors","totalFiles","successUploadedFiles","onDrop","acceptedFiles","newFolderPath","allowedFiles","fileExtn","log","getRootProps","getInputProps","isDragActive","isDragAccept","useDropzone","noClick","dndStyles","useMemo","forceRefresh","splitURLS","URLItem","createdTime","creation_date","downloadToolTip","downloadSelected","openShare","openPreview","openAnonymousAccess","AccessRuleIcon","setSelectedPreview","refresh","versioning","rewindCloseModal","closePreviewWindow","closeRenameModal","setDownloadRenameModal","AddAccessRule","closeAddAccessRule","setAnonymousAccessOpen","PageLayout","paddingBottom","BucketsIcon","Badge","dotOnly","invisible","HistoryIcon","RefreshIcon","resetMessages","multiple","accept","UploadFilesButton","closeMenu","click","borderTop","VersionsNavigator","setDeletedAction","setShowDeletedObjects","DetailsListPanel","ObjectDetailPanel","configureBucketAllowed","S3_GET_BUCKET_ENCRYPTION_CONFIGURATION","S3_PUT_BUCKET_ENCRYPTION_CONFIGURATION","S3_DELETE_BUCKET","S3_GET_BUCKET_NOTIFICATIONS","S3_PUT_BUCKET_NOTIFICATIONS","S3_GET_REPLICATION_CONFIGURATION","S3_PUT_REPLICATION_CONFIGURATION","S3_GET_LIFECYCLE_CONFIGURATION","S3_PUT_LIFECYCLE_CONFIGURATION","ADMIN_GET_BUCKET_QUOTA","ADMIN_SET_BUCKET_QUOTA","S3_PUT_BUCKET_TAGGING","S3_GET_BUCKET_TAGGING","S3_LIST_BUCKET_VERSIONS","S3_GET_BUCKET_POLICY_STATUS","S3_DELETE_BUCKET_POLICY","searchBar","setSearchVersions","setHelpName","AutoColorIcon","ObjectManagerButton","PageHeaderWrapper","BackLink","IAM_PAGES","OBJECT_BROWSER_VIEW","IAM_PERMISSIONS","IAM_ROLES","BUCKET_ADMIN","SettingsIcon","HelpMenu","middleComponent","BrowserHandler","loadingVersioning","rewindDate","dateToRewind","loadingLocking","reloadObjectsList","initWSRequest","rewindMode","pathLoad","forceLoad","searchPath","setRequestInProgress","decodedIPaths","setLoadingVersioning","setLoadingLocking","getBucketVersioning","setIsVersioned","getBucketObjectLockingStatus","setLockingEnabled","object_locking_enabled","OBHeader","initialDate","maxSeconds","entity","maxDays","maxHours","maxMinutes","selectedDays","setSelectedDays","selectedHours","setSelectedHours","selectedMinutes","setSelectedMinutes","setValidDate","dateSelected","setDateSelected","calculateNewTime","hours","minutes","fromJSDate","plus","formattedDate","valid","extraStyles","paddingLeft","min","max","LinkIcon","maxshareLinkExpTimeVal","maxShareLinkExpTime","shareURL","setShareURL","isLoadingVersion","setIsLoadingVersion","isLoadingFile","setIsLoadingFile","selectedDate","setSelectedDate","dateValid","setDateValid","setVersionID","getMaxShareLinkExpTime","latestVersion","elem","slDate","currDate","diffDate","ceil","shareObject","niceTimeFromSeconds","DaysSelector","dateChanged","newDate","ReadBox","actionButton","setModalSnackMessage","pdfjs","GlobalWorkerOptions","workerSrc","loading","onLoad","downloadFile","errorState","setErrorState","totalPages","setTotalPages","renderPages","arrayCreate","InformativeMessage","Document","onLoadSuccess","_pdfInfo","numPages","onLoadError","Page","pageNumber","renderAnnotationLayer","renderTextLayer","renderForms","isFullscreen","setLoading","iframeLoaded","flex","autoPlay","controls","muted","playsInline","onPlay","src","alt","PreviewPDF","allowTransparency","wideLimit","ObjectPreviewIcon","PreviewFileContent","WrappedComponent","fallback","props","Suspense","createAsyncThunk","getState","rejectWithValue","identityDownload","downloadCall","download","itemsToDownload","filterFunction","getClientOS","multiObjList","dwList","bi","isDeleted","downloadSelectedAsZip","fileObject","findFunction","_ref3","_ref4","_ref5","getMaxShareLinkExp","setMaxShareLinkExpTime","exp","isWinOs","shown","setShown","sm","overlayIcon","readOnly","overlayAction","navigator","clipboard","writeText"],"sourceRoot":""}
\ No newline at end of file
diff --git a/web-app/build/static/js/2959.f25a9ef1.chunk.js b/web-app/build/static/js/2959.f25a9ef1.chunk.js
new file mode 100644
index 000000000..bd6f5b5e4
--- /dev/null
+++ b/web-app/build/static/js/2959.f25a9ef1.chunk.js
@@ -0,0 +1,2 @@
+(self.webpackChunkweb_app=self.webpackChunkweb_app||[]).push([[2959,614],{30614:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>h});var s=n(65043),o=n(94141),a=n(89923),i=n(56629),l=n(53518),r=n(77403),c=n(64159),d=n(20554),u=n(70579);const h=e=>{let{modalOpen:t,onClose:n,bucket:h,prefilledRoute:m}=e;const x=(0,d.jL)(),[p,j]=(0,s.useState)(""),[b,g]=(0,s.useState)("readonly");(0,s.useEffect)((()=>{m&&j(m)}),[m]);return(0,u.jsx)(o.A,{modalOpen:t,title:"Add Anonymous Access Rule",onClose:n,titleIcon:(0,u.jsx)(a.No_,{}),children:(0,u.jsxs)(a.Hbc,{withBorders:!1,containerPadding:!1,children:[(0,u.jsx)(a.cl_,{value:p,label:"Prefix",id:"prefix",name:"prefix",placeholder:"Enter Prefix",onChange:e=>{j(e.target.value)},tooltip:"Enter '/' to apply the rule to all prefixes and objects at the bucket root. Do not include the wildcard asterisk '*' as part of the prefix *unless* it is an explicit part of the prefix name. The Console automatically appends an asterisk to the appropriate sections of the resulting IAM policy."}),(0,u.jsx)(a.l6P,{id:"access",name:"Access",onChange:e=>{g(e)},label:"Access",value:b,options:[{label:"readonly",value:"readonly"},{label:"writeonly",value:"writeonly"},{label:"readwrite",value:"readwrite"}],disabled:!1,helpTip:(0,u.jsx)(s.Fragment,{children:"Select the desired level of access available to unauthenticated Users"}),helpTipPlacement:"right"}),(0,u.jsxs)(a.xA9,{item:!0,xs:12,sx:r.Uz.modalButtonBar,children:[(0,u.jsx)(a.$nd,{id:"clear",type:"button",variant:"regular",onClick:()=>{j(""),g("readonly")},label:"Clear"}),(0,u.jsx)(a.$nd,{id:"add-access-save",type:"submit",variant:"callAction",disabled:""===p.trim(),onClick:()=>{i.F.bucket.setAccessRuleWithBucket(h,{prefix:p,access:b}).then((e=>{x((0,c.Hk)("Access Rule added successfully")),n()})).catch((e=>{x((0,c.C9)((0,l.S)(e.error))),n()}))},label:"Save"})]})]})})}},27945:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>Me});var s=n(65043),o=n(22166),a=n(73216),i=n(56629),l=n(20554),r=n(99161),c=n(6035),d=n(33097),u=n.n(d),h=n(89923),m=n(53518),x=n(94281),p=n(24241),j=n(56483),b=n(61476),g=n.n(b),f=n(94574),v=n(35475),_=n(77938),S=n(72237),O=n(64159);const w=e=>(e.match(/\.([^.]*?)(?=\?|#|$)/)||[])[1],T=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];const s=Object.keys(e).reduce(((n,s)=>(w(s)&&s.includes(t)&&(n[s]=e[s]),n)),{});return Object.keys(s).filter((e=>{const o=s[e].some((e=>n.find((t=>{let n=!1;if(-1!==t.indexOf("*")){const s=t.substring(0,t.length-1);n=e.includes(s)}return n||e===t})))),a=e.substring(0,e.indexOf("/*."))==="arn:aws:s3:::".concat(t);return o&&(a&&"arn:aws:s3:::*"!==e)}))};var C=n(70579);const y=(0,S.A)(s.lazy((()=>n.e(7774).then(n.bind(n,97774))))),E=f.Ay.div((()=>({display:"flex","& .additionalOptions":{paddingRight:"10px",display:"flex",alignItems:"center",["@media (max-width: ".concat(h.nmC.lg,"px)")]:{display:"none"}},"& .slashSpacingStyle":{margin:"0 5px"}}))),I=e=>{let{bucketName:t,internalPaths:n,hidePathButton:i,additionalOptions:d}=e;const u=(0,l.jL)(),m=(0,a.Zp)(),x=(0,o.d4)((e=>e.objectBrowser.rewind.rewindEnabled)),p=(0,o.d4)((e=>e.objectBrowser.versionsMode)),b=(0,o.d4)((e=>e.objectBrowser.versionedFile)),f=(0,o.d4)((e=>e.system.anonymousMode)),[S,w]=(0,s.useState)(!1),[I,N]=(0,s.useState)(!1),A=[r.OV.S3_PUT_OBJECT,r.OV.S3_PUT_ACTIONS],k=(0,o.d4)((e=>e.console.session&&e.console.session.permissions||{}));let B=n;""!==n&&(B="/".concat(n));const F=B.split("/").filter((e=>""!==e)),L=F.length-1,V=t+B||t,D=T(k,V,A);(0,s.useEffect)((()=>{N(!1),Object.keys(k).forEach((e=>{e.includes(V)&&e.includes("/*")&&N(!0)}))}),[V,n,k]);const R=(0,_._)([V,...D],A)||f||I;let P=F.map(((e,n)=>{const o="".concat(F.slice(0,n+1).join("/"),"/"),a="/browser/".concat(encodeURIComponent(t),"/").concat(o?"".concat(encodeURIComponent(o)):"");return n===L&&e===b?null:(0,C.jsxs)(s.Fragment,{children:[(0,C.jsx)("span",{className:"slashSpacingStyle",children:"/"}),n===L?(0,C.jsx)("span",{style:{cursor:"default",whiteSpace:"pre"},children:(0,j.Tw)(e)}):(0,C.jsx)(v.N_,{style:{whiteSpace:"pre"},to:a,onClick:()=>{u((0,c.cQ)({status:!1,objectName:""}))},children:(0,j.Tw)(e)})]},"breadcrumbs-".concat(n.toString()))})),U=[];p&&(U=[(0,C.jsx)(s.Fragment,{children:(0,C.jsxs)("span",{children:[(0,C.jsx)("span",{className:"slashSpacingStyle",children:"/"}),b," - Versions"]})},"breadcrumbs-versionedItem")]);const z=[(0,C.jsx)(s.Fragment,{children:(0,C.jsx)(v.N_,{to:"/browser/".concat(t),onClick:()=>{u((0,c.cQ)({status:!1,objectName:""}))},children:t})},"breadcrumbs-root-path"),...P,...U];return(0,C.jsxs)(s.Fragment,{children:[(0,C.jsxs)(E,{children:[S&&(0,C.jsx)(y,{modalOpen:S,bucketName:t,folderName:n,onClose:()=>{w(!1)},limitedSubPath:I&&!((0,_._)([V,...D],A)||f)}),(0,C.jsx)(h.BIu,{sx:{whiteSpace:"pre"},goBackFunction:()=>{if(p)u((0,c.cQ)({status:!1,objectName:""}));else{if(0===F.length)return void m("/browser");const e=F.slice(0,-1);m("/browser/".concat(t).concat(e.length>0?"/".concat(encodeURIComponent("".concat(e.join("/"),"/"))):""))}},additionalOptions:(0,C.jsxs)(s.Fragment,{children:[(0,C.jsx)(g(),{text:"".concat(t,"/").concat(F.join("/")),children:(0,C.jsx)(h.$nd,{id:"copy-path",icon:(0,C.jsx)(h.TdU,{style:{width:"12px",height:"12px",fill:"#969FA8",marginTop:-1}}),variant:"regular",onClick:()=>{u((0,O.Hk)("Path copied to clipboard"))},style:{width:"28px",height:"28px",color:"#969FA8",border:"#969FA8 1px solid",marginRight:5}})}),(0,C.jsx)(h.azJ,{className:"additionalOptions",children:d})]}),children:z}),!i&&(0,C.jsx)(h.m_M,{tooltip:R?"Choose or create a new path":(0,r.vj)([r.OV.S3_PUT_OBJECT,r.OV.S3_PUT_ACTIONS],"create a new path"),children:(0,C.jsx)(h.$nd,{id:"new-path",onClick:()=>{w(!0)},disabled:!f&&(x||!R),icon:(0,C.jsx)(h.pj3,{style:{fill:"#969FA8"}}),style:{whiteSpace:"nowrap"},variant:"regular",label:"Create new path"})})]}),(0,C.jsx)(h.azJ,{sx:{display:"none",marginTop:15,marginBottom:5,justifyContent:"flex-start","& > div":{fontSize:12,fontWeight:"normal",flexDirection:"row",flexWrap:"nowrap"},["@media (max-width: ".concat(h.nmC.lg,"px)")]:{display:"flex"}},children:d})]})};var N=n(93445);const A=e=>"Enabled"===e||"Suspended"===e;var k=n(37414),B=n(39947),F=n(81708),L=n(6681);const V=e=>{let{uploadPath:t,bucketName:n,forceDisable:a=!1,uploadFileFunction:i,uploadFolderFunction:l,overrideStyles:c={}}=e;const[d,u]=(0,s.useState)(null),[m,x]=(0,s.useState)(!1),p=(0,o.d4)((e=>e.system.anonymousMode)),j=(0,o.d4)((e=>e.console.session&&e.console.session.permissions||{})),b=[r.OV.S3_PUT_OBJECT,r.OV.S3_PUT_ACTIONS],g=T(j,t,b),f=Boolean(d),v=()=>{u(null)},S=(0,_._)([t,...g],b)||p,O=(0,_._)([n,...g],b,!1,!0),w=S||O;return(0,C.jsxs)(s.Fragment,{children:[(0,C.jsx)(L.A,{tooltip:w?"Upload Files":(0,r.vj)([r.OV.S3_PUT_OBJECT,r.OV.S3_PUT_ACTIONS],"upload files to this bucket"),children:(0,C.jsx)(h.$nd,{id:"upload-main","aria-controls":"upload-main-menu","aria-haspopup":"true","aria-expanded":f?"true":void 0,onClick:e=>{x(!m),u(e.currentTarget)},label:"Upload",icon:(0,C.jsx)(h.JMY,{}),variant:"callAction",disabled:a||!w,sx:c})}),(0,C.jsx)(h.Vey,{id:"upload-main-menu",options:[{label:"Upload File",icon:(0,C.jsx)(h.JMY,{}),value:"file",disabled:!S||a},{label:"Upload Folder",icon:(0,C.jsx)(h.nDF,{}),value:"folder",disabled:!O||a}],selectedOption:"",onSelect:e=>{"folder"!==e?i(v):l(v)},hideTriggerAction:()=>{x(!1)},open:m,anchorEl:d,anchorOrigin:"end",useAnchorWidth:!0})]})},D=e=>{let{open:t,closePanel:n,className:s="",children:o}=e;return(0,C.jsxs)(h.azJ,{id:"details-panel",sx:{borderColor:"#EAEDEE",borderWidth:0,borderStyle:"solid",borderRadius:3,borderBottomLeftRadius:0,borderBottomRightRadius:0,width:0,transitionDuration:"0.3s",overflowX:"hidden",overflowY:"auto",position:"relative",opacity:0,marginLeft:-1,"&.open":{width:300,minWidth:300,borderLeftWidth:1,opacity:1},"@media (max-width: 799px)":{"&.open":{width:"100%",minWidth:"100%",borderLeftWidth:0}}},className:"".concat(t?"open":""," ").concat(s),children:[(0,C.jsx)(h.$nd,{variant:"text",id:"close-details-list",onClick:n,icon:(0,C.jsx)(h._FR,{}),sx:{position:"absolute",right:5,top:18,padding:0,height:14,"&:hover:not(:disabled)":{backgroundColor:"transparent"}}}),o]})};var R=n(48245);const P=e=>{let{icon:t,strings:n}=e;return(0,C.jsxs)(h.azJ,{sx:{display:"flex",alignItems:"center","& .min-icon":{width:16,height:16,marginRight:4,minWidth:16,minHeight:16},"& .fileNameText":{whiteSpace:"pre",overflow:"hidden",textOverflow:"ellipsis"}},children:[t,(0,C.jsx)("span",{className:"fileNameText",children:(0,j.qf)(n[n.length-1])})]})},U=[{icon:(0,C.jsx)(h.FRZ,{}),extensions:["mp4","mov","avi","mpeg","mpg"]},{icon:(0,C.jsx)(h.jCy,{}),extensions:["mp3","m4a","aac"]},{icon:(0,C.jsx)(h.yTC,{}),extensions:["pdf"]},{icon:(0,C.jsx)(h.QvW,{}),extensions:["ppt","pptx"]},{icon:(0,C.jsx)(h.z9t,{}),extensions:["xls","xlsx"]},{icon:(0,C.jsx)(h.VSs,{}),extensions:["cer","crt","pem"]},{icon:(0,C.jsx)(h.bM2,{}),extensions:["html","xml","css","py","go","php","cpp","h","java"]},{icon:(0,C.jsx)(h.qM2,{}),extensions:["cfg","yaml"]},{icon:(0,C.jsx)(h.ITz,{}),extensions:["sql"]},{icon:(0,C.jsx)(h.PcO,{}),extensions:["ttf","otf"]},{icon:(0,C.jsx)(h.yEV,{}),extensions:["doc","docx","txt","rtf"]},{icon:(0,C.jsx)(h.j_m,{}),extensions:["zip","rar","tar","gz"]},{icon:(0,C.jsx)(h.DUd,{}),extensions:["epub","mobi","azw","azw3"]},{icon:(0,C.jsx)(h.nLN,{}),extensions:["jpeg","jpg","gif","tiff","png","heic","dng"]}],z=function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=e,s=(0,C.jsx)(h.KlI,{});e.endsWith("/")&&(s=(0,C.jsx)(h.kez,{}),n=e.slice(0,-1));const o=e.toLowerCase();for(const i of U)for(const e of i.extensions)o.endsWith(".".concat(e))&&(s=i.icon);!e.endsWith("/")&&e.indexOf(".")<0&&(s=(0,C.jsx)(h.YJK,{}));const a=n.split("/");return t?s:(0,C.jsx)(P,{icon:s,strings:a})};var G=n(37524);const M=e=>{let{metaData:t}=e;const n=Object.keys(t);return(0,C.jsx)(s.Fragment,{children:n.map(((e,n)=>{const s=(e=>Array.isArray(e)?e.map(j.Tw).join(", "):(0,j.Tw)(e))(t[e]);return(0,C.jsxs)(h.azJ,{sx:{marginBottom:15,fontSize:14,maxHeight:180,overflowY:"auto"},children:[(0,C.jsx)("strong",{children:e}),(0,C.jsx)("br",{}),s]},"box-meta-".concat(e,"-").concat(n.toString()))}))})};var J=n(30718),K=n(85330),W=n(77403);const H=[{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"}],Y=Array.from(Array(31),((e,t)=>({value:(t+1).toString(),label:(t+1).toString()}))),$=(new Date).getFullYear(),Z=Array.from(Array(50),((e,t)=>({value:(t+$).toString(),label:(t+$).toString()})));var q=n(94141);const Q=(0,s.forwardRef)(((e,t)=>{let{id:n,label:o,disableOptions:a=!1,tooltip:i="",borderBottom:l=!1,onDateChange:r,value:c=""}=e;(0,s.useImperativeHandle)(t,(()=>({resetDate:b})));const[d,u]=(0,s.useState)(""),[m,x]=(0,s.useState)(""),[p,j]=(0,s.useState)("");(0,s.useEffect)((()=>{if(""!==c){const e=c.split("-");j(e[0]),u(e[1]),x("".concat(parseInt(e[2])))}}),[c]),(0,s.useEffect)((()=>{const[e,t]=((e,t,n)=>{const s=Date.parse("".concat(e,"-").concat(t,"-").concat(n));if(isNaN(s))return[!1,""];const o=parseInt(t),a=parseInt(n),i=o<10?"0".concat(o):o,l=a<10?"0".concat(a):a,r=new Date(s).toISOString().split("T")[0],c="".concat(e,"-").concat(i,"-").concat(l);return[r===c,c]})(p,d,m);r(t,e)}),[d,m,p,r]);const b=()=>{u(""),x(""),j("")},g=()=>a||!1,f=[{value:"",label:""},...H],v=[{value:"",label:""},...Y],_=[{value:"",label:""},...Z];return(0,C.jsxs)(h.azJ,{className:"inputItem",children:[(0,C.jsx)(h.azJ,{sx:{display:"flex",alignItems:"center",gap:5,marginBottom:5},children:(0,C.jsxs)(h.l1Y,{htmlFor:n,children:[(0,C.jsx)("span",{children:o}),""!==i&&(0,C.jsx)(h.azJ,{sx:{marginLeft:5,display:"flex",alignItems:"center","& .min-icon":{width:13}},children:(0,C.jsx)(h.m_M,{tooltip:i,placement:"top",children:(0,C.jsx)(h.azJ,{sx:{"& .min-icon":{width:13}},children:(0,C.jsx)(h.NTw,{})})})})]})}),(0,C.jsxs)(h.azJ,{sx:{display:"flex",gap:12},children:[(0,C.jsx)(h.l6P,{id:"".concat(n,"-month"),name:"".concat(n,"-month"),value:d,onChange:e=>{u(e)},options:f,label:"",disabled:g()}),(0,C.jsx)(h.l6P,{id:"".concat(n,"-day"),name:"".concat(n,"-day"),value:m,onChange:e=>{x(e)},options:v,label:"",disabled:g()}),(0,C.jsx)(h.l6P,{id:"".concat(n,"-year"),name:"".concat(n,"-year"),value:p,onChange:e=>{j(e)},options:_,label:"",disabled:g(),sx:{marginBottom:12}})]})]})})),X=e=>{let{open:t,closeModalAndRefresh:n,objectName:a,objectInfo:r,bucketName:c}=e;const d=(0,l.jL)(),u=(0,o.d4)((e=>e.objectBrowser.retentionConfig)),[x,p]=(0,s.useState)(!0),[j,b]=(0,s.useState)(""),[g,f]=(0,s.useState)(""),[v,_]=(0,s.useState)(!1),[S,w]=(0,s.useState)(!1),[T,y]=(0,s.useState)(!1);(0,s.useEffect)((()=>{if(r.retention_mode&&(b((null===u||void 0===u?void 0:u.mode)||K.BT.Governance),y(!0)),r.retention_until_date){const t=new Date(r.retention_until_date);if("Invalid Date"!==t.toString()){const n=t.getFullYear(),s=(e=t.getMonth()+1)<10?"0".concat(e):"".concat(e),o=t.getDate();isNaN(o)||"NaN"===s||isNaN(n)||f("".concat(n,"-").concat(s,"-").concat(o))}y(!0)}var e}),[r,null===u||void 0===u?void 0:u.mode]);const E=(0,s.useRef)(null),I=()=>{p(!1),b(K.BT.Governance),E.current&&E.current.resetDate()},N=T&&("governance"===j||""===j);return(0,C.jsx)(q.A,{title:"Set Retention Policy",modalOpen:t,onClose:()=>{I(),n(!1)},children:(0,C.jsx)("form",{noValidate:!0,autoComplete:"off",onSubmit:e=>{(e=>{e.preventDefault()})(e)},children:(0,C.jsxs)(h.Hbc,{withBorders:!1,containerPadding:!1,children:[(0,C.jsxs)(h.azJ,{className:"inputItem",children:[(0,C.jsx)("strong",{children:"Selected Object"}),": ",a]}),N&&(0,C.jsx)(h.dOG,{value:"status",id:"status",name:"status",checked:x,onChange:e=>{p(!x)},label:"Status",indicatorLabels:["Enabled","Disabled"]}),(0,C.jsx)(h.z6M,{currentValue:j,id:"type",name:"type",label:"Type",disableOptions:!x||T&&""!==j,onChange:e=>{b(e.target.value)},selectorOptions:[{label:"Governance",value:K.BT.Governance},{label:"Compliance",value:K.BT.Compliance}]}),(0,C.jsx)(Q,{id:"date",label:"Date",disableOptions:!(x&&("governance"===j||"compliance"===j)),ref:E,value:g,borderBottom:!0,onDateChange:(e,t)=>{_(t),t&&f(e)}}),(0,C.jsxs)(h.xA9,{item:!0,xs:12,sx:W.Uz.modalButtonBar,children:[(0,C.jsx)(h.$nd,{id:"reset",type:"button",variant:"regular",onClick:I,label:"Reset"}),(0,C.jsx)(h.$nd,{id:"save",type:"submit",variant:"callAction",disabled:x&&""===j||x&&!v||S,onClick:()=>{w(!0);const e=r.name||"",t=r.version_id||null,s=x||"governance"!==j?"".concat(g,"T23:59:59Z"):"";x||"governance"!==j?((e,t,s)=>{i.F.buckets.putObjectRetention(c,{prefix:e,version_id:t||""},{expires:s,mode:j}).then((()=>{w(!1),n(!0)})).catch((e=>{d((0,O.Dy)((0,m.S)(e.error))),w(!1)}))})(e,t,s):((e,t)=>{i.F.buckets.deleteObjectRetention(c,{prefix:e,version_id:t||""}).then((()=>{w(!1),n(!0)})).catch((e=>{d((0,O.Dy)((0,m.S)(e.error))),w(!1)}))})(e,t)},label:"Save"})]})]})})})};var ee=n(58661),te=n(25448);const ne=e=>{let{closeDeleteModalAndRefresh:t,deleteOpen:n,selectedBucket:a,selectedObject:i,versioningInfo:c,selectedVersion:d=""}=e;const u=(0,l.jL)(),[m,x]=(0,te.A)((()=>t(!0)),(e=>{u((0,O.C9)(e)),"Access Denied."===e.detailedError&&t(!0)})),[p,j]=(0,s.useState)(!1),[b,g]=(0,s.useState)(!1),f=(0,o.d4)((e=>e.objectBrowser.retentionConfig)),v=(0,_._)([a],[r.OV.S3_BYPASS_GOVERNANCE_RETENTION])&&"governance"===(null===f||void 0===f?void 0:f.mode);if(!i)return null;return(0,C.jsx)(ee.A,{title:"Delete Object",confirmText:"Delete",isOpen:n,titleIcon:(0,C.jsx)(h.xWY,{}),isLoading:m,onConfirm:()=>{const e=i.endsWith("/");x("DELETE","/api/v1/buckets/".concat(encodeURIComponent(a),"/objects?prefix=").concat(encodeURIComponent(i)).concat(""!==d?"&version_id=".concat(encodeURIComponent(d)):"&recursive=".concat(e,"&all_versions=").concat(p)).concat(b?"&bypass=true":""))},onClose:()=>t(!1),confirmationContent:(0,C.jsxs)(s.Fragment,{children:["Are you sure you want to delete: ",(0,C.jsx)("br",{}),(0,C.jsx)("b",{children:i})," ",""!==d?(0,C.jsxs)(s.Fragment,{children:[(0,C.jsx)("br",{}),(0,C.jsx)("br",{}),"Version ID:",(0,C.jsx)("br",{}),(0,C.jsx)("strong",{children:d})]}):"","? ",(0,C.jsx)("br",{}),(0,C.jsx)("br",{}),A(null===c||void 0===c?void 0:c.status)&&""===d&&(0,C.jsx)(s.Fragment,{children:(0,C.jsx)(h.dOG,{label:"Delete All Versions",indicatorLabels:["Yes","No"],checked:p,value:"delete_versions",id:"delete-versions",name:"delete-versions",onChange:e=>{j(!p)},description:""})}),v&&(p||""!==d)&&(0,C.jsx)(s.Fragment,{children:(0,C.jsx)("div",{style:{marginTop:10},children:(0,C.jsx)(h.dOG,{label:"Bypass Governance Mode",indicatorLabels:["Yes","No"],checked:b,value:"bypass_governance",id:"bypass_governance",name:"bypass_governance",onChange:e=>{g(!b)},description:""})})}),p&&(0,C.jsxs)(s.Fragment,{children:[(0,C.jsxs)("div",{style:{marginTop:10,border:"#c83b51 1px solid",borderRadius:3,padding:5,backgroundColor:"#c83b5120",color:"#c83b51"},children:["This will remove the object as well as all of its versions,"," ",(0,C.jsx)("br",{}),"This action is irreversible."]}),(0,C.jsx)("br",{}),"Are you sure you want to continue?"]})]})})},se=e=>{let{open:t,closeModalAndRefresh:n,objectName:o,bucketName:a,actualInfo:r}=e;const c=(0,l.jL)(),[d,x]=(0,s.useState)(!1),[p,j]=(0,s.useState)(!1),b=r.version_id;(0,s.useEffect)((()=>{const e=u()(r,"legal_hold_status","OFF");x("ON"===e)}),[r]);const g=()=>{x(!1)};return(0,C.jsx)(q.A,{title:"Set Legal Hold",modalOpen:t,onClose:()=>{g(),n(!1)},children:(0,C.jsx)("form",{noValidate:!0,autoComplete:"off",onSubmit:e=>{(e=>{e.preventDefault(),j(!0),i.F.buckets.putObjectLegalHold(a,{prefix:o,version_id:b||""},{status:d?K.SW.Enabled:K.SW.Disabled}).then((()=>{j(!1),n(!0)})).catch((e=>{c((0,O.Dy)((0,m.S)(e.error))),j(!1)}))})(e)},children:(0,C.jsxs)(h.Hbc,{withBorders:!1,containerPadding:!1,children:[(0,C.jsxs)(h.azJ,{className:"inputItem",children:[(0,C.jsx)("strong",{children:"Object"}),": ",a]}),(0,C.jsx)(h.dOG,{value:"legalhold",id:"legalhold",name:"legalhold",checked:d,onChange:e=>{x(!d)},label:"Legal Hold Status",indicatorLabels:["Enabled","Disabled"],tooltip:"To enable this feature you need to enable versioning on the bucket before creation"}),(0,C.jsxs)(h.xA9,{item:!0,xs:12,sx:W.Uz.modalButtonBar,children:[(0,C.jsx)(h.$nd,{id:"clear",type:"button",variant:"regular",onClick:g,label:"Clear"}),(0,C.jsx)(h.$nd,{id:"save",type:"submit",variant:"callAction",disabled:p,label:" Save"})]})]})})})},oe=f.Ay.b((e=>{let{theme:t}=e;return{color:u()(t,"signalColors.danger","#C83B51"),marginLeft:5}})),ae=e=>{var t;let{modalOpen:n,onCloseAndUpdate:a,bucketName:c,actualInfo:d}=e;const x=(0,l.jL)(),p=(0,o.d4)(O.Rq),[j,b]=(0,s.useState)(""),[g,f]=(0,s.useState)(""),[v,S]=(0,s.useState)(!1),[w,T]=(0,s.useState)(!1),[y,E]=(0,s.useState)(""),[I,N]=(0,s.useState)(""),A=d.tags,k=Object.keys(A||{}),B=null===(t=d.name)||void 0===t?void 0:t.split("/"),F=(null===B||void 0===B?void 0:B.pop())||"",L=e=>(0,C.jsxs)(h.azJ,{sx:{fontSize:16,margin:"20px 0 30px",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",width:"100%"},children:["Tag",e?"s":""," for: ",(0,C.jsx)("strong",{children:F})]});return(0,C.jsx)(s.Fragment,{children:(0,C.jsx)(q.A,{modalOpen:n,title:w?"Delete Tag":"Edit Tags",onClose:()=>{a(!0)},iconColor:w?"delete":"default",titleIcon:w?(0,C.jsx)(h.aaC,{}):(0,C.jsx)(h.cGQ,{}),children:w?(0,C.jsx)(s.Fragment,{children:(0,C.jsxs)(h.xA9,{container:!0,children:[L(!1),"Are you sure you want to delete the tag"," ",(0,C.jsxs)(oe,{children:[y," : ",I]})," ","?",(0,C.jsxs)(h.xA9,{item:!0,xs:12,sx:W.Uz.modalButtonBar,children:[(0,C.jsx)(h.$nd,{id:"cancel",type:"button",variant:"regular",onClick:()=>{E(""),N(""),T(!1)},label:"Cancel"}),(0,C.jsx)(h.$nd,{type:"submit",variant:"secondary",onClick:()=>{const e={...A};delete e[y];const t=p?d.version_id||"":"null";i.F.buckets.putObjectTags(c,{prefix:d.name||"",version_id:t},{tags:e}).then((()=>{a(!0),S(!1)})).catch((e=>{x((0,O.Dy)((0,m.S)(e.error))),S(!1)}))},id:"deleteTag",label:"Delete Tag"})]})]})}):(0,C.jsxs)(h.azJ,{children:[(0,C.jsx)(_.R,{scopes:[r.OV.S3_GET_OBJECT_TAGGING,r.OV.S3_GET_ACTIONS],resource:c,children:(0,C.jsxs)(h.azJ,{sx:{display:"flex",flexFlow:"column",width:"100%"},children:[L(!0),(0,C.jsxs)(h.azJ,{sx:{fontSize:14,fontWeight:"normal"},children:["Current Tags:",(0,C.jsx)("br",{}),0===k.length?(0,C.jsx)("span",{className:"muted",children:"There are no tags for this object"}):(0,C.jsx)(s.Fragment,{}),(0,C.jsx)(h.azJ,{sx:{marginTop:"5px",marginBottom:"15px"},children:k.map(((e,t)=>{const n=u()(A,"".concat(e),"");return""!==n?(0,C.jsx)(_.R,{scopes:[r.OV.S3_DELETE_OBJECT_TAGGING],resource:c,errorProps:{deleteIcon:null,onDelete:null},children:(0,C.jsx)(h.vwO,{id:"".concat(e," : ").concat(n),label:"".concat(e," : ").concat(n),variant:"regular",color:"default",onDelete:()=>{((e,t)=>{E(e),N(t),T(!0)})(e,n)}})},"chip-".concat(t)):null}))})]})]})}),(0,C.jsx)(_.R,{scopes:[r.OV.S3_PUT_OBJECT_TAGGING,r.OV.S3_PUT_ACTIONS],resource:c,errorProps:{disabled:!0,onClick:null},children:(0,C.jsxs)(h.azJ,{children:[(0,C.jsx)(h._xt,{icon:(0,C.jsx)(h.b_$,{}),separator:!1,children:"Add New Tag"}),(0,C.jsxs)(h.Hbc,{containerPadding:!1,withBorders:!1,children:[(0,C.jsx)(h.cl_,{value:j,label:"Tag Key",id:"newTagKey",name:"newTagKey",placeholder:"Enter Tag Key",onChange:e=>{b(e.target.value)}}),(0,C.jsx)(h.cl_,{value:g,label:"Tag Label",id:"newTagLabel",name:"newTagLabel",placeholder:"Enter Tag Label",onChange:e=>{f(e.target.value)}}),(0,C.jsxs)(h.xA9,{item:!0,xs:12,sx:W.Uz.modalButtonBar,children:[(0,C.jsx)(h.$nd,{id:"clear",type:"button",variant:"regular",color:"primary",onClick:()=>{f(""),b("")},label:"Clear"}),(0,C.jsx)(h.$nd,{type:"submit",variant:"callAction",disabled:""===g.trim()||""===j.trim()||v,onClick:()=>{S(!0);const e={};e[j]=g;const t={...A,...e},n=p?d.version_id||"":"null";i.F.buckets.putObjectTags(c,{prefix:d.name||"",version_id:n},{tags:t}).then((()=>{a(!0),S(!1)})).catch((e=>{x((0,O.Dy)((0,m.S)(e.error))),S(!1)}))},id:"saveTag",label:"Save"})]})]})]})})]})})})};var ie=n(49501);const le=e=>{let{closeInspectModalAndRefresh:t,inspectOpen:n,inspectPath:o,volumeName:a}=e;const i=(0,l.jL)(),r=()=>t(!1),[c,d]=(0,s.useState)(!0),[u,m]=(0,s.useState)(""),[x,p]=(0,s.useState)("");if(!o)return null;return(0,C.jsxs)(s.Fragment,{children:[!u&&(0,C.jsx)(q.A,{modalOpen:n,titleIcon:(0,C.jsx)(h.nTF,{}),title:"Inspect Object",onClose:r,children:(0,C.jsxs)("form",{noValidate:!0,autoComplete:"off",onSubmit:e=>{(e=>{e.preventDefault()})(e)},children:["Would you like to encrypt ",(0,C.jsx)("b",{children:o}),"? ",(0,C.jsx)("br",{}),(0,C.jsx)(h.dOG,{label:"Encrypt",indicatorLabels:["Yes","No"],checked:c,value:"encrypt",id:"encrypt",name:"encrypt",onChange:e=>{d(!c)},description:""}),(0,C.jsx)(h.xA9,{item:!0,xs:12,sx:W.Uz.modalButtonBar,children:(0,C.jsx)(h.$nd,{id:"inspect",type:"submit",variant:"callAction",color:"primary",onClick:async()=>{let e=document.baseURI.replace(window.location.origin,"");(async e=>await fetch(e,{method:"GET"}))("".concat(window.location.origin).concat(e,"/api/v1/admin/inspect?volume=").concat(encodeURIComponent(a),"&file=").concat(encodeURIComponent(o+"/xl.meta"),"&encrypt=").concat(c)).then((async e=>{if(!e.ok){const t=await e.json();i((0,O.C9)({errorMessage:t.message,detailedError:t.code}))}const t=await e.blob(),n=e.headers.get("content-disposition").split('"')[1],s=(0,j.UM)(n)||"";(0,j.OT)(t,n),p(n),""!==s?m(s):r()})).catch((e=>{i((0,O.C9)(e))}))},label:"Inspect"})})]})}),u?(0,C.jsxs)(q.A,{modalOpen:n,title:"Inspect Decryption Key",onClose:()=>{(0,j.Yj)(x),r(),m("")},titleIcon:(0,C.jsx)(h.aJN,{}),children:[(0,C.jsxs)(h.azJ,{children:["This will be displayed only once. It cannot be recovered.",(0,C.jsx)("br",{}),"Use secure medium to share this key."]}),(0,C.jsx)(h.azJ,{children:(0,C.jsx)(ie.A,{value:u})})]}):null]})},re=e=>{let{open:t,closeModal:n,currentItem:o,internalPaths:a,actualInfo:i,bucketName:r}=e;const c=(0,l.jL)(),[d,u]=(0,s.useState)(o),[m,x]=(0,s.useState)(!1);return(0,C.jsxs)(q.A,{title:"Rename Download",modalOpen:t,onClose:n,titleIcon:(0,C.jsx)(h.qUP,{}),children:[(0,C.jsxs)("div",{children:["The file you are trying to download has a long name.",(0,C.jsx)("br",{}),"This can cause issues on Windows Systems by trimming the file name after download.",(0,C.jsx)("br",{}),(0,C.jsx)("br",{})," We recommend to rename the file download"]}),(0,C.jsx)("form",{noValidate:!0,autoComplete:"off",onSubmit:e=>{(e=>{e.preventDefault(),(0,R._)(c,r,a,i),n()})(e)},children:(0,C.jsxs)(h.Hbc,{withBorders:!1,containerPadding:!1,children:[(0,C.jsx)(h.cl_,{id:"download-filename",name:"download-filename",onChange:e=>{u(e.target.value)},label:"",type:"text",value:d,error:d.length>200&&!m?"Filename should be less than 200 characters long.":""}),(0,C.jsx)(h.dOG,{value:"acceptLongName",id:"acceptLongName",name:"acceptLongName",checked:m,onChange:e=>{x(e.target.checked),e.target.checked&&u(o)},label:"Use Original Name"}),(0,C.jsx)(h.xA9,{item:!0,xs:12,sx:W.Uz.modalButtonBar,children:(0,C.jsx)(h.$nd,{id:"download-file",type:"submit",variant:"callAction",color:"primary",disabled:d.length>200&&!m,label:"Download File"})})]})})]})},ce={is_latest:!0,last_modified:"",legal_hold_status:"",name:"",retention_mode:"",retention_until_date:"",size:0,tags:{},version_id:void 0},de=e=>{let{internalPaths:t,bucketName:n,versioningInfo:a,locking:d,onClosePanel:m}=e;const x=(0,l.jL)(),p=(0,o.d4)(O.Rq),b=(0,o.d4)((e=>e.objectBrowser.versionsMode)),g=(0,o.d4)((e=>e.objectBrowser.selectedVersion)),f=(0,o.d4)((e=>e.objectBrowser.loadingObjectInfo)),[v,S]=(0,s.useState)(!1),[w,T]=(0,s.useState)(!1),[y,E]=(0,s.useState)(!1),[I,A]=(0,s.useState)(!1),[k,B]=(0,s.useState)(!1),[F,V]=(0,s.useState)(null),[D,P]=(0,s.useState)([]),[U,K]=(0,s.useState)(null),[W,H]=(0,s.useState)([]),[Y,$]=(0,s.useState)(!1),[Z,q]=(0,s.useState)(!1),[Q,ee]=(0,s.useState)(0),[te,oe]=(0,s.useState)(!1),[ie,de]=(0,s.useState)(null),[ue,he]=(0,s.useState)(!1),me=(t||"").split("/").pop()||"";let xe=[];F&&F.name&&(xe=F.name.split("/")),(0,s.useEffect)((()=>{if(p&&D&&D.length>=1){let e=D.find((e=>e.is_latest))||ce;""!==g&&(e=D.find((e=>e.version_id===g))||ce),e.is_delete_marker||he(!0),V(e)}}),[g,p,D]),(0,s.useEffect)((()=>{f&&""!==t&&i.F.buckets.listObjects(n,{prefix:t,with_versions:p}).then((e=>{const t=e.data.objects||[];if(p){P(t),H(t);const e=t.reduce(((e,t)=>null!==t&&void 0!==t&&t.size?e+t.size:e),0);ee(e)}else{const e=t[0];V(e),H([]),e.is_delete_marker||he(!0)}x((0,c.oe)(!1))})).catch((e=>{console.error("Error loading object details",e.error),x((0,c.oe)(!1))}))}),[f,n,t,x,p,g]),(0,s.useEffect)((()=>{ue&&""!==t&&i.F.buckets.getObjectMetadata(n,{prefix:t,versionID:(null===F||void 0===F?void 0:F.version_id)||""}).then((e=>{let t=u()(e.data,"objectMetadata",{});de(t),he(!1)})).catch((e=>{console.error("Error Getting Metadata Status: ",e.detailedError),he(!1)}))}),[n,t,ue,null===F||void 0===F?void 0:F.version_id]);let pe=[];F&&F.tags&&(pe=Object.keys(F.tags));const je=(0,C.jsx)("div",{style:{textAlign:"center",marginTop:35},children:(0,C.jsx)(h.aHM,{})});if(!F)return f?je:null;const be=xe.length>0?xe[xe.length-1]:F.name,ge=[n,me,[n,F.name].join("/")],fe=(0,_._)(n,[r.OV.S3_PUT_OBJECT_LEGAL_HOLD,r.OV.S3_PUT_ACTIONS]),ve=(0,_._)(ge,[r.OV.S3_PUT_OBJECT_TAGGING,r.OV.S3_PUT_ACTIONS]),_e=(0,_._)(ge,[r.OV.S3_GET_OBJECT_RETENTION,r.OV.S3_PUT_OBJECT_RETENTION,r.OV.S3_GET_ACTIONS,r.OV.S3_PUT_ACTIONS],!0),Se=(0,_._)(ge,[r.OV.ADMIN_INSPECT_DATA]),Oe=(0,_._)(ge,[r.OV.S3_GET_BUCKET_VERSIONING,r.OV.S3_PUT_BUCKET_VERSIONING,r.OV.S3_GET_OBJECT_VERSION,r.OV.S3_GET_ACTIONS,r.OV.S3_PUT_ACTIONS]),we=(0,_._)(ge,[r.OV.S3_GET_OBJECT,r.OV.S3_GET_ACTIONS]),Te=(0,_._)([n,me,[n,F.name].join("/")],[r.OV.S3_DELETE_OBJECT]);let Ce=(0,N.IZ)(ie,me);const ye=[{action:()=>{(0,R._)(x,n,t,F)},label:"Download",disabled:!!F.is_delete_marker||!we,icon:(0,C.jsx)(h.s3U,{}),tooltip:we?"Download this Object":(0,r.vj)([r.OV.S3_GET_OBJECT,r.OV.S3_GET_ACTIONS],"download this object")},{action:()=>{S(!0)},label:"Share",disabled:!!F.is_delete_marker||!we,icon:(0,C.jsx)(h.liv,{}),tooltip:we?"Share this File":(0,r.vj)([r.OV.S3_GET_OBJECT,r.OV.S3_GET_ACTIONS],"share this object")},{action:()=>{q(!0)},label:"Preview",disabled:!!F.is_delete_marker||"none"===Ce&&!we,icon:(0,C.jsx)(h.cyn,{}),tooltip:we?"Preview this File":(0,r.vj)([r.OV.S3_GET_OBJECT,r.OV.S3_GET_ACTIONS],"preview this object")},{action:()=>{A(!0)},label:"Legal Hold",disabled:!d||!p||!!F.is_delete_marker||!fe||""!==g,icon:(0,C.jsx)(h.ODz,{}),tooltip:fe?d?"Change Legal Hold rules for this File":"Object Locking must be enabled on this bucket in order to set Legal Hold":(0,r.vj)([r.OV.S3_PUT_OBJECT_LEGAL_HOLD,r.OV.S3_PUT_ACTIONS],"change legal hold settings for this object")},{action:()=>{T(!0)},label:"Retention",disabled:!p||!!F.is_delete_marker||!_e||""!==g||!d,icon:(0,C.jsx)(h.gn6,{}),tooltip:_e?d?"Change Retention rules for this File":"Object Locking must be enabled on this bucket in order to set Retention Rules":(0,r.vj)([r.OV.S3_GET_OBJECT_RETENTION,r.OV.S3_PUT_OBJECT_RETENTION,r.OV.S3_GET_ACTIONS,r.OV.S3_PUT_ACTIONS],"change Retention Rules for this object")},{action:()=>{E(!0)},label:"Tags",disabled:!!F.is_delete_marker||""!==g||!ve,icon:(0,C.jsx)(h.P3Z,{}),tooltip:ve?"Change Tags for this File":(0,r.vj)([r.OV.S3_PUT_OBJECT_TAGGING,r.OV.S3_GET_OBJECT_TAGGING,r.OV.S3_GET_ACTIONS,r.OV.S3_PUT_ACTIONS],"set Tags on this object")},{action:()=>{B(!0)},label:"Inspect",disabled:!p||!!F.is_delete_marker||""!==g||!Se,icon:(0,C.jsx)(h.nTF,{}),tooltip:Se?"Inspect this file":(0,r.vj)([r.OV.ADMIN_INSPECT_DATA],"inspect this file")},{action:()=>{x((0,c.cQ)({status:!b,objectName:be}))},label:b?"Hide Object Versions":"Display Object Versions",icon:(0,C.jsx)(h.j1U,{}),disabled:!p||!(F.version_id&&"null"!==F.version_id)||!Oe,tooltip:Oe?F.version_id&&"null"!==F.version_id?"Display Versions for this file":"":(0,r.vj)([r.OV.S3_GET_BUCKET_VERSIONING,r.OV.S3_PUT_BUCKET_VERSIONING,r.OV.S3_GET_OBJECT_VERSION,r.OV.S3_GET_ACTIONS,r.OV.S3_PUT_ACTIONS],"display all versions of this object")}];return(0,C.jsxs)(s.Fragment,{children:[v&&F&&(0,C.jsx)(J.default,{open:v,closeModalAndRefresh:()=>{K(null),S(!1)},bucketName:n,dataObject:U||F}),w&&F&&(0,C.jsx)(X,{open:w,closeModalAndRefresh:e=>{T(!1),e&&x((0,c.oe)(!0))},objectName:me,objectInfo:F,bucketName:n}),Y&&(0,C.jsx)(ne,{deleteOpen:Y,selectedBucket:n,selectedObject:t,closeDeleteModalAndRefresh:e=>{$(!1),e&&""===g?m(!0):(x((0,c.SK)(!0)),x((0,c.Ai)("")),x((0,c.oe)(!0)))},versioningInfo:p?a:void 0,selectedVersion:g}),I&&F&&(0,C.jsx)(se,{open:I,closeModalAndRefresh:e=>{A(!1),e&&x((0,c.oe)(!0))},objectName:F.name||"",bucketName:n,actualInfo:F}),Z&&F&&(0,C.jsx)(G.default,{open:Z,bucketName:n,actualInfo:F,onClosePreview:()=>{q(!1)}}),y&&F&&(0,C.jsx)(ae,{modalOpen:y,bucketName:n,actualInfo:F,onCloseAndUpdate:e=>{E(!1),e&&x((0,c.oe)(!0))}}),k&&F&&(0,C.jsx)(le,{inspectOpen:k,volumeName:n,inspectPath:F.name||"",closeInspectModalAndRefresh:e=>{B(!1),e&&x((0,c.oe)(!0))}}),te&&F&&(0,C.jsx)(re,{open:te,closeModal:()=>{oe(!1)},currentItem:me,bucketName:n,internalPaths:t,actualInfo:F}),f?(0,C.jsx)(s.Fragment,{children:je}):(0,C.jsxs)(h.azJ,{sx:{"& .ObjectDetailsTitle":{display:"flex",alignItems:"center","& .min-icon":{width:26,height:26,minWidth:26,minHeight:26}},"& .objectNameContainer":{whiteSpace:"nowrap",textOverflow:"ellipsis",overflow:"hidden",alignItems:"center",marginLeft:10},"& .capitalizeFirst":{textTransform:"capitalize"},"& .detailContainer":{padding:"0 22px",marginBottom:10,fontSize:14}},children:[(0,C.jsx)(h.Smc,{title:(0,C.jsxs)("div",{className:"ObjectDetailsTitle",children:[z(be||"",!0),(0,C.jsx)("span",{className:"objectNameContainer",children:be})]}),items:ye}),(0,C.jsx)(L.A,{tooltip:Te?"":(0,r.vj)([r.OV.S3_DELETE_OBJECT],"delete this object"),children:(0,C.jsx)(h.xA9,{item:!0,xs:12,sx:{justifyContent:"center",display:"flex"},children:(0,C.jsx)(_.R,{resource:[n,me,[n,F.name].join("/")],scopes:[r.OV.S3_DELETE_OBJECT],errorProps:{disabled:!0},children:(0,C.jsx)(h.$nd,{id:"delete-element-click",icon:(0,C.jsx)(h.d7y,{}),iconLocation:"start",fullWidth:!0,variant:"secondary",onClick:()=>{$(!0)},disabled:""===g&&F.is_delete_marker,sx:{width:"calc(100% - 44px)",margin:"8px 0"},label:"Delete".concat(""!==g?" version":"")})})})}),(0,C.jsx)(h.kCK,{icon:(0,C.jsx)(h.Hch,{}),label:"Object Info"}),(0,C.jsxs)(h.azJ,{className:"detailContainer",children:[(0,C.jsx)("strong",{children:"Name:"}),(0,C.jsx)("br",{}),(0,C.jsx)("div",{style:{overflowWrap:"break-word"},children:be})]}),""!==g&&(0,C.jsxs)(h.azJ,{className:"detailContainer",children:[(0,C.jsx)("strong",{children:"Version ID:"}),(0,C.jsx)("br",{}),g]}),(0,C.jsxs)(h.azJ,{className:"detailContainer",children:[(0,C.jsx)("strong",{children:"Size:"}),(0,C.jsx)("br",{}),(0,j.nO)("".concat(F.size||"0"))]}),F.version_id&&"null"!==F.version_id&&""===g&&(0,C.jsxs)(h.azJ,{className:"detailContainer",children:[(0,C.jsx)("strong",{children:"Versions:"}),(0,C.jsx)("br",{}),W.length," version",1!==W.length?"s":"",","," ",(0,j.qO)(Q)]}),""===g&&(0,C.jsxs)(h.azJ,{className:"detailContainer",children:[(0,C.jsx)("strong",{children:"Last Modified:"}),(0,C.jsx)("br",{}),(e=>{const t=new Date,n=new Date(e),s=t.getTime()-n.getTime(),o=(0,j.eQ)(s,"ms");return""!==o.trim()?"".concat(o," ago"):"Just now"})(F.last_modified||"")]}),(0,C.jsxs)(h.azJ,{className:"detailContainer",children:[(0,C.jsx)("strong",{children:"ETAG:"}),(0,C.jsx)("br",{}),F.etag||"N/A"]}),(0,C.jsxs)(h.azJ,{className:"detailContainer",children:[(0,C.jsx)("strong",{children:"Tags:"}),(0,C.jsx)("br",{}),0===pe.length?"N/A":pe.map(((e,t)=>(0,C.jsxs)("span",{children:[e,":",u()(F,"tags.".concat(e),""),t{let{versionToRestore:t,bucketName:n,objectPath:o,restoreOpen:a,onCloseAndUpdate:r}=e;const d=(0,l.jL)(),[u,x]=(0,s.useState)(!1);return(0,C.jsx)(ee.A,{title:"Restore File Version",confirmText:"Restore",isOpen:a,isLoading:u,titleIcon:(0,C.jsx)(h.YkU,{}),onConfirm:()=>{x(!0),i.F.buckets.putObjectRestore(n,{prefix:o,version_id:t.version_id||""}).then((()=>{x(!1),r(!0),d((0,c.NV)({prefix:o,objectInfo:t}))})).catch((e=>{d((0,O.C9)((0,m.S)(e.error))),x(!1)}))},confirmButtonProps:{variant:"secondary",disabled:u},onClose:()=>{r(!1)},confirmationContent:(0,C.jsxs)(h.azJ,{id:"alert-dialog-description",children:["Are you sure you want to restore ",(0,C.jsx)("br",{}),(0,C.jsx)("b",{children:o})," ",(0,C.jsx)("br",{})," with Version ID:",(0,C.jsx)("br",{}),(0,C.jsx)("b",{children:t.version_id}),"?"]})})},he=e=>{let{type:t}=e,n="#000",s="";switch(t){case"null":n="#07193E",s="NULL VERSION";break;case"deleted":n="#868686",s="DELETED";break;default:n="#174551",s="CURRENT VERSION"}return(0,C.jsx)("span",{style:{backgroundColor:n,padding:"0 5px",display:"inline-block",color:"#FFF",fontWeight:"bold",fontSize:12,borderRadius:2,whiteSpace:"nowrap",margin:"0 10px"},children:s})},me=f.Ay.div((e=>{let{theme:t}=e;return{"&:before":{content:"' '",display:"block",position:"absolute",width:"2px",height:"calc(100% + 2px)",backgroundColor:u()(t,"borderColor","#F8F8F8"),left:"24px"},"& .mainFileVersionItem":{borderBottom:"".concat(u()(t,"borderColor","#F8F8F8")," 1px solid"),padding:"1rem 0",margin:"0 0.5rem 0 2.5rem",cursor:"pointer","&.deleted":{color:"#868686"}},"& .intermediateLayer":{margin:"0 1.5rem 0 1.5rem","&:hover, &.selected":{backgroundColor:u()(t,"boxBackground","#F8F8F8"),"& > div":{borderBottomColor:u()(t,"boxBackground","#F8F8F8")}}},"& .versionContainer":{fontSize:16,fontWeight:"bold",display:"flex",alignItems:"center","& svg.min-icon":{width:18,height:18,minWidth:18,minHeight:18,marginRight:10}},"& .buttonContainer":{textAlign:"right","& button":{marginLeft:"1.5rem"}},"& .versionID":{fontSize:"12px",margin:"2px 0",whiteSpace:"nowrap",textOverflow:"ellipsis",maxWidth:"95%",overflow:"hidden"},"& .versionData":{marginRight:"10px",fontSize:12,color:"#868686"},"@media (max-width: 600px)":{"& .buttonContainer":{"& button":{marginLeft:"5px"}}},"@media (max-width: 799px)":{"&:before":{display:"none"},"& .mainFileVersionItem":{padding:"5px 0px",margin:0},"& .intermediateLayer":{margin:0,"&:hover, &.selected":{backgroundColor:"transparent","& > div":{borderBottomColor:u()(t,"boxBackground","#F8F8F8")}}},"& .versionContainer":{fontSize:14,"& svg.min-icon":{display:"none"}},"& .versionData":{textOverflow:"ellipsis",maxWidth:"95%",overflow:"hidden",whiteSpace:"nowrap"},"& .collapsableInfo":{display:"flex",flexDirection:"column"},"& .versionItem":{display:"none"}}}})),xe=e=>{let{fileName:t,versionInfo:n,isSelected:s,checkable:o,isChecked:a,onCheck:i,onShare:l,onDownload:r,onRestore:c,onPreview:d,globalClick:u,index:m,key:x,style:b}=e;const g=n.is_delete_marker,f=[{icon:(0,C.jsx)(h.cyn,{}),action:d,tooltip:"Preview"},{icon:(0,C.jsx)(h.s3U,{}),action:r,tooltip:"Download this version"},{icon:(0,C.jsx)(h.liv,{}),action:l,tooltip:"Share this version"},{icon:(0,C.jsx)(h.YkU,{}),action:c,tooltip:"Restore this version"}];let v=null;n.is_delete_marker?v="deleted":n.is_latest?v="current":"null"===n.version_id&&(v="null");let _=p.c9.now();return n.last_modified&&(_=p.c9.fromISO(n.last_modified)),(0,C.jsx)(me,{children:(0,C.jsx)(h.xA9,{container:!0,className:"ctrItem",onClick:()=>{u(n)},style:b,children:(0,C.jsx)(h.xA9,{item:!0,xs:12,className:"intermediateLayer".concat(" ",s?"selected":""),children:(0,C.jsxs)(h.xA9,{item:!0,xs:!0,className:"mainFileVersionItem ".concat(n.is_delete_marker?"deleted":""),children:[(0,C.jsx)(h.xA9,{item:!0,xs:12,children:(0,C.jsxs)(h.xA9,{container:!0,children:[(0,C.jsxs)(h.xA9,{item:!0,xs:!0,md:4,className:"versionContainer",children:[o&&(0,C.jsx)(h.Sc0,{checked:a,id:"select-".concat(n.version_id),name:"select-".concat(n.version_id),onChange:e=>{e.stopPropagation(),i(n.version_id||"")},value:n.version_id||"",disabled:n.is_delete_marker,sx:{width:"initial"}}),z(t,!0)," v",m.toString(),(0,C.jsx)("span",{className:"versionItem",children:v&&(0,C.jsx)(he,{type:v})})]}),(0,C.jsx)(h.xA9,{item:!0,xs:10,md:8,className:"buttonContainer",children:f.map(((e,t)=>(0,C.jsx)(h.m_M,{tooltip:e.tooltip,children:(0,C.jsx)(h.K0,{size:"small",id:"version-action-".concat(e.tooltip,"-").concat(t.toString()),className:"spacing".concat(" ",g?"buttonDisabled":""),disabled:g,onClick:t=>{t.stopPropagation(),g?t.preventDefault():e.action(n)},sx:{backgroundColor:"#F8F8F8",borderRadius:"100%",width:"28px",height:"28px",padding:"5px","& .min-icon":{width:"14px",height:"14px"}},children:e.icon})},"version-action-".concat(e.tooltip,"-").concat(t.toString()))))})]})}),(0,C.jsx)(h.xA9,{item:!0,xs:12,className:"versionID",children:"null"!==n.version_id?n.version_id:"-"}),(0,C.jsxs)(h.xA9,{item:!0,xs:12,className:"collapsableInfo",children:[(0,C.jsxs)("span",{className:"versionData",children:[(0,C.jsx)("strong",{children:"Last modified:"})," ",_.toFormat("ccc, LLL dd yyyy HH:mm:ss (ZZZZ)")]}),(0,C.jsxs)("span",{className:"versionData",children:[(0,C.jsx)("strong",{children:"Size:"})," ",(0,j.nO)("".concat(n.size||"0"))]})]})]})})},x)})},pe=e=>{let{closeDeleteModalAndRefresh:t,deleteOpen:n,selectedBucket:a,selectedObject:c}=e;const d=(0,l.jL)(),[u,x]=(0,s.useState)(!1),[p,j]=(0,s.useState)(""),[b,g]=(0,s.useState)(!1),f=(0,o.d4)((e=>e.objectBrowser.retentionConfig)),v=(0,_._)([a],[r.OV.S3_BYPASS_GOVERNANCE_RETENTION])&&"governance"===(null===f||void 0===f?void 0:f.mode);if((0,s.useEffect)((()=>{u&&i.F.buckets.deleteObject(a,{prefix:c,non_current_versions:!0,bypass:b}).then((()=>{t(!0)})).catch((e=>{d((0,O.C9)((0,m.S)(e.error))),x(!1)}))}),[u,t,d,c,a,b]),!c)return null;return(0,C.jsx)(ee.A,{title:"Delete Non-Current versions",confirmText:"Delete",isOpen:n,titleIcon:(0,C.jsx)(h.xWY,{}),isLoading:u,onConfirm:()=>{x(!0)},onClose:()=>t(!1),confirmButtonProps:{disabled:"YES, PROCEED"!==p||u},confirmationContent:(0,C.jsxs)(s.Fragment,{children:["Are you sure you want to delete all the non-current versions for:"," ",(0,C.jsx)("b",{children:c}),"? ",(0,C.jsx)("br",{}),v&&(0,C.jsx)(s.Fragment,{children:(0,C.jsx)("div",{style:{marginTop:10},children:(0,C.jsx)(h.dOG,{label:"Bypass Governance Mode",indicatorLabels:["Yes","No"],checked:b,value:"bypass_governance",id:"bypass_governance",name:"bypass_governance",onChange:e=>{g(!b)},description:""})})}),(0,C.jsx)("br",{}),"To continue please type ",(0,C.jsx)("b",{children:"YES, PROCEED"})," in the box.",(0,C.jsx)("br",{}),(0,C.jsx)("br",{}),(0,C.jsx)(h.xA9,{item:!0,xs:12,children:(0,C.jsx)(h.cl_,{id:"type-confirm",name:"retype-tenant",onChange:e=>{j(e.target.value)},label:"",value:p})})]})})},je=e=>{let{closeDeleteModalAndRefresh:t,deleteOpen:n,selectedBucket:a,selectedVersions:c,selectedObject:d}=e;const u=(0,l.jL)(),[x,p]=(0,s.useState)(!1),[j,b]=(0,s.useState)(!1),g=(0,o.d4)((e=>e.objectBrowser.retentionConfig)),f=(0,_._)([a],[r.OV.S3_BYPASS_GOVERNANCE_RETENTION])&&"governance"===(null===g||void 0===g?void 0:g.mode);return(0,s.useEffect)((()=>{if(x){const e=c.map((e=>({path:d,versionID:e,recursive:!1})));e.length>0&&i.F.buckets.deleteMultipleObjects(a,e,{all_versions:!1,bypass:j}).then((()=>{p(!1),t(!0)})).catch((e=>{u((0,O.C9)((0,m.S)(e.error))),p(!1)}))}}),[x,t,a,d,c,j,u]),c?(0,C.jsx)(ee.A,{title:"Delete Selected Versions",confirmText:"Delete",isOpen:n,titleIcon:(0,C.jsx)(h.xWY,{}),isLoading:x,onConfirm:()=>{p(!0)},onClose:()=>t(!1),confirmationContent:(0,C.jsxs)(s.Fragment,{children:["Are you sure you want to delete the selected ",c.length," ","versions for ",(0,C.jsx)("strong",{children:d}),"?",f&&(0,C.jsx)(s.Fragment,{children:(0,C.jsx)("div",{style:{marginTop:10},children:(0,C.jsx)(h.dOG,{label:"Bypass Governance Mode",indicatorLabels:["Yes","No"],checked:j,value:"bypass_governance",id:"bypass_governance",name:"bypass_governance",onChange:e=>{b(!j)},description:""})})})]})}):null};var be=n(95098);const ge={is_latest:!0,last_modified:"",legal_hold_status:"",name:"",retention_mode:"",retention_until_date:"",size:0,tags:{},version_id:void 0},fe=e=>{let{internalPaths:t,bucketName:n}=e;const a=(0,l.jL)(),r=(0,o.d4)((e=>e.objectBrowser.searchVersions)),d=(0,o.d4)((e=>e.objectBrowser.loadingVersions)),x=(0,o.d4)((e=>e.objectBrowser.selectedVersion)),p=(0,o.d4)(O.Rq),[b,g]=(0,s.useState)(!1),[f,v]=(0,s.useState)(null),[_,S]=(0,s.useState)(null),[w,T]=(0,s.useState)([]),[y,E]=(0,s.useState)(!1),[N,A]=(0,s.useState)(null),[k,B]=(0,s.useState)("date"),[F,V]=(0,s.useState)(!1),[D,P]=(0,s.useState)(!1),[U,z]=(0,s.useState)(!1),[M,K]=(0,s.useState)([]),[W,H]=(0,s.useState)(!1);let Y=[];f&&f.name&&(Y=f.name.split("/")),(0,s.useEffect)((()=>{d||f||a((0,c.SK)(!0))}),[d,f,a]),(0,s.useEffect)((()=>{d&&""!==t&&i.F.buckets.listObjects(n,{prefix:t,with_versions:p}).then((e=>{const n=u()(e.data,"objects",[]).filter((e=>e.name===t));p?(v(n.find((e=>e.is_latest))||ge),T(n)):(v(n[0]),T([])),a((0,c.SK)(!1))})).catch((e=>{a((0,O.C9)((0,m.S)(e.error))),a((0,c.SK)(!1))}))}),[d,n,t,a,p]);const $=e=>{S(e),g(!0)},Z=e=>{S(e),V(!0)},q=e=>{A(e),E(!0)},Q=e=>{(0,R._)(a,n,t,e)},X=e=>{a((0,c.Ai)(e.version_id||""))},ee=w.filter((e=>!!e.version_id&&e.version_id.includes(r))),te=w.reduce(((e,t)=>t.size?e+t.size:e),0);ee.sort(((e,t)=>{if("size"===k)return e.size&&t.size?e.sizet.size?1:0:0;{const n=new Date(e.last_modified||"").getTime(),s=new Date(t.last_modified||"").getTime();return ns?-1:0}}));const ne=e=>{if(M.includes(e)){const t=M.filter((t=>t!==e));return void K(t)}const t=[...M];t.push(e),K(t)};return(0,C.jsxs)(s.Fragment,{children:[b&&f&&(0,C.jsx)(J.default,{open:b,closeModalAndRefresh:()=>{S(null),g(!1),V(!1)},bucketName:n,dataObject:_||f}),y&&f&&N&&(0,C.jsx)(ue,{restoreOpen:y,bucketName:n,versionToRestore:N,objectPath:f.name||"",onCloseAndUpdate:e=>{E(!1),A(null),e&&(a((0,c.SK)(!0)),a((0,c.oe)(!0)))}}),F&&f&&(0,C.jsx)(G.default,{open:F,bucketName:n,actualInfo:{name:f.name||"",version_id:_&&_.version_id?_.version_id:"null",size:_&&_.size?_.size:0,content_type:"",last_modified:f.last_modified||""},onClosePreview:()=>{V(!1)}}),D&&(0,C.jsx)(pe,{deleteOpen:D,closeDeleteModalAndRefresh:e=>{P(!1),e&&(a((0,c.SK)(!0)),a((0,c.Ai)("")),a((0,c.oe)(!0)))},selectedBucket:n,selectedObject:t}),W&&(0,C.jsx)(je,{selectedBucket:n,selectedObject:t,deleteOpen:W,selectedVersions:M,closeDeleteModalAndRefresh:e=>{H(!1),e&&(a((0,c.SK)(!0)),a((0,c.Ai)("")),a((0,c.oe)(!0)),K([]))}}),(0,C.jsxs)(h.xA9,{container:!0,sx:{width:"100%",padding:10,"@media (max-width: 799px)":{minHeight:800}},children:[!f&&(0,C.jsx)(h.xA9,{item:!0,xs:12,children:(0,C.jsx)(h.z21,{})}),f&&(0,C.jsxs)(s.Fragment,{children:[(0,C.jsx)(h.xA9,{item:!0,xs:12,children:(0,C.jsx)(I,{bucketName:n,internalPaths:t,hidePathButton:!0})}),(0,C.jsx)(h.xA9,{item:!0,xs:12,sx:{position:"relative","& .detailsSpacer":{marginRight:18,"@media (max-width: 600px)":{marginRight:0}},["@media (max-width: ".concat(h.nmC.md,"px)")]:{"&::before":{display:"none"}}},children:(0,C.jsx)(h.lcx,{icon:(0,C.jsx)("span",{style:{display:"block",marginTop:"-10px"},children:(0,C.jsx)(h.j1U,{style:{width:20,height:20}})}),title:"".concat(Y.length>0?Y[Y.length-1]:f.name," Versions"),subTitle:(0,C.jsxs)(s.Fragment,{children:[(0,C.jsx)("span",{className:"detailsSpacer",children:(0,C.jsxs)("strong",{children:[w.length," Version",1===w.length?"":"s","\xa0\xa0\xa0"]})}),(0,C.jsx)("span",{className:"detailsSpacer",children:(0,C.jsx)("strong",{children:(0,j.qO)(te)})})]}),actions:(0,C.jsxs)(s.Fragment,{children:[(0,C.jsx)(L.A,{tooltip:"Select Multiple Versions",children:(0,C.jsx)(h.$nd,{id:"select-multiple-versions",onClick:()=>{z(!U)},icon:(0,C.jsx)(h.IN,{}),variant:U?"callAction":"regular",style:{marginRight:8}})}),U&&(0,C.jsx)(L.A,{tooltip:"Delete Selected Versions",children:(0,C.jsx)(h.$nd,{id:"delete-multiple-versions",onClick:()=>{H(!0)},icon:(0,C.jsx)(h.d7y,{}),variant:"secondary",style:{marginRight:8},disabled:0===M.length})}),(0,C.jsx)(L.A,{tooltip:"Delete Non Current Versions",children:(0,C.jsx)(h.$nd,{id:"delete-non-current",onClick:()=>{P(!0)},icon:(0,C.jsx)(h.rgY,{}),variant:"secondary",style:{marginRight:15},disabled:w.length<=1})}),(0,C.jsx)(h.l6P,{id:"sort-by",options:[{label:"Date",value:"date"},{label:"Size",value:"size"}],value:k,label:"Sort by",onChange:e=>{B(e)},noLabelMinWidth:!0})]}),bottomBorder:!1})}),(0,C.jsx)(h.xA9,{item:!0,xs:12,sx:{flexGrow:1,height:"calc(100% - 120px)",overflow:"auto",["@media (max-width: ".concat(h.nmC.md,"px)")]:{height:600}},children:f.version_id&&"null"!==f.version_id&&(0,C.jsx)(be.B8,{style:{width:"100%"},containerStyle:{width:"100%",maxWidth:"100%"},width:1,height:800,rowCount:ee.length,rowHeight:108,rowRenderer:e=>{let{key:t,index:n,isScrolling:s,isVisible:o,style:a}=e;const i=w.length-n;return(0,C.jsx)(xe,{style:a,fileName:(null===f||void 0===f?void 0:f.name)||"",versionInfo:ee[n],index:i,onDownload:Q,onRestore:q,onShare:$,onPreview:Z,globalClick:X,isSelected:x===ee[n].version_id,checkable:U,onCheck:ne,isChecked:M.includes(ee[n].version_id||"")},t)}})})]})]})]})},ve=e=>{if(e.name.endsWith("/"))return"";const t=p.c9.now(),n=p.c9.fromISO(e.last_modified);return t.hasSame(n,"day")&&t.hasSame(n,"month")&&t.hasSame(n,"year")?"Today, ".concat(n.toFormat("HH:mm")):n.toFormat("ccc, LLL dd yyyy HH:mm (ZZZZ)")},_e=e=>e.name.endsWith("/")||!e.size?"-":(0,j.nO)(String(e.size)),Se=[{label:"Name",elementKey:"name",renderFunction:z,enableSort:!0},{label:"Last Modified",elementKey:"last_modified",renderFunction:ve,renderFullObject:!0,enableSort:!0},{label:"Size",elementKey:"size",renderFunction:_e,renderFullObject:!0,width:100,enableSort:!0}],Oe=[{label:"Name",elementKey:"name",renderFunction:z,enableSort:!0},{label:"Object Date",elementKey:"last_modified",renderFunction:ve,renderFullObject:!0,enableSort:!0},{label:"Size",elementKey:"size",renderFunction:_e,renderFullObject:!0,width:100,enableSort:!0},{label:"Deleted",elementKey:"delete_flag",renderFunction:e=>e?"Yes":"No",width:60}];var we=n(46537);const Te=()=>{const e=(0,l.jL)(),t=(0,a.g)(),n=(0,a.Zp)(),[i,d]=(0,s.useState)("ASC"),[m,x]=(0,s.useState)("name"),p=t.bucketName||"",j=(0,o.d4)((e=>e.objectBrowser.objectDetailsOpen)),b=(0,o.d4)((e=>e.objectBrowser.requestInProgress)),g=(0,o.d4)(we.s$),f=!(null===g||void 0===g||!g.includes("object-browser-only")),v=(0,o.d4)((e=>e.objectBrowser.rewind.rewindEnabled)),S=(0,o.d4)((e=>e.objectBrowser.records)),O=(0,o.d4)((e=>e.objectBrowser.searchObjects)),w=(0,o.d4)((e=>e.objectBrowser.selectedObjects)),T=(0,o.d4)((e=>e.objectBrowser.connectionError)),y=(0,o.d4)((e=>e.system.anonymousMode)),E=(0,_._)(p,[r.OV.S3_LIST_BUCKET,r.OV.S3_ALL_LIST_BUCKET]),I=S.filter((e=>{if(""===O)return!0;return e.name.toLowerCase().indexOf(O.toLowerCase())>=0})).sort((0,N.$w)(m));let A=[];A="ASC"===i?I:I.reverse();const k=[{type:"view",tooltip:"View",onClick:t=>{var s;const o=t.name||"",a="/browser/".concat(encodeURIComponent(p)).concat(o?"/".concat(encodeURIComponent(o)):"");!y||null!==(s=t.name)&&void 0!==s&&s.endsWith("/")?(e((0,c.KX)([])),n(a),y||(e((0,c.TO)(!0)),e((0,c.SK)(!0))),e((0,c.A7)(o))):(0,R._)(e,p,o,t)},sendOnlyId:!1}];let B=E||y?"This location is empty".concat(v?"":", please try uploading a new file"):(0,r.vj)([r.OV.S3_LIST_BUCKET,r.OV.S3_ALL_LIST_BUCKET],"view Objects in this bucket");T&&(B="Objects List unavailable. Please review your WebSockets configuration and try again");let F="calc(100vh - 290px)";return f&&(F="calc(100vh - 315px)"),(0,C.jsx)(h.bQt,{itemActions:k,columns:v?Oe:Se,isLoading:b,entityName:"Objects",idField:"name",records:A,customPaperHeight:F,selectedItems:w,onSelect:y?void 0:t=>{const n=t.target,s=n.value,o=n.checked;let a=[...w];return o?a.push(s):a=a.filter((e=>e!==s)),e((0,c.KX)(a)),e((0,c.A7)(null)),a},customEmptyMessage:B,sortEnabled:{currentSort:m,currentDirection:i,onSortClick:t=>{const n=u()(t,"sortDirection","DESC");x(t.sortBy),d(n),e((0,c.Yw)(!0))}},onSelectAll:()=>{if(e((0,c.A7)(null)),w.length===A.length)return void e((0,c.KX)([]));const t=A.map((e=>e.name));e((0,c.KX)(t))},rowStyle:e=>{var t;let{index:n}=e;return null!==(t=A[n])&&void 0!==t&&t.delete_flag?"deleted":""},sx:{minHeight:j?"100%":"initial"},noBackground:!0})};var Ce=n(64681);const ye=()=>{const e=(0,l.jL)(),t=(0,o.d4)((e=>e.objectBrowser.searchObjects));return(0,C.jsx)(Ce.A,{placeholder:"Start typing to filter objects in the bucket",onChange:t=>{e((0,c.$X)(t))},value:t})};var Ee=n(30614);const Ie=(0,S.A)(s.lazy((()=>n.e(5941).then(n.bind(n,65941))))),Ne=(0,S.A)(s.lazy((()=>Promise.resolve().then(n.bind(n,30718))))),Ae=(0,S.A)(s.lazy((()=>n.e(2704).then(n.bind(n,32704))))),ke=(0,S.A)(s.lazy((()=>Promise.resolve().then(n.bind(n,37524))))),Be={borderWidth:2,borderRadius:2,borderColor:"transparent",outline:"none"},Fe={borderStyle:"dashed",backgroundColor:"transparent",borderColor:"#2196f3"},Le={borderStyle:"dashed",backgroundColor:"transparent",borderColor:"#00e676"},Ve=()=>{var e;const t=(0,l.jL)(),n=(0,a.g)(),d=(0,a.Zp)(),b=(0,a.zy)(),g=(0,o.d4)((e=>e.objectBrowser.rewind.rewindEnabled)),f=(0,o.d4)((e=>e.objectBrowser.rewind.bucketToRewind)),v=(0,o.d4)((e=>e.objectBrowser.versionsMode)),S=(0,o.d4)((e=>e.objectBrowser.showDeleted)),y=(0,o.d4)((e=>e.objectBrowser.objectDetailsOpen)),E=(0,o.d4)((e=>e.objectBrowser.selectedInternalPaths)),R=(0,o.d4)((e=>e.objectBrowser.requestInProgress)),P=(0,o.d4)((e=>e.objectBrowser.simplePath)),U=(0,o.d4)((e=>e.objectBrowser.versionInfo)),z=(0,o.d4)((e=>e.objectBrowser.lockingEnabled)),G=(0,o.d4)((e=>e.objectBrowser.downloadRenameModal)),M=(0,o.d4)((e=>e.objectBrowser.selectedPreview)),J=(0,o.d4)((e=>e.objectBrowser.shareFileModalOpen)),K=(0,o.d4)((e=>e.objectBrowser.previewOpen)),W=(0,o.d4)((e=>e.objectBrowser.selectedBucket)),H=(0,o.d4)((e=>e.system.anonymousMode)),Y=(0,o.d4)((e=>e.objectBrowser.anonymousAccessOpen)),$=(0,o.d4)((e=>{var t;return(null===(t=e.objectBrowser)||void 0===t?void 0:t.records)||[]})),Z=(0,o.d4)(B.Nx),q=(0,o.d4)(B.fT),[Q,X]=(0,s.useState)(!1),[ee,te]=(0,s.useState)(!1),[ne,se]=(0,s.useState)(!1),[oe,ae]=(0,s.useState)(!1),[ie,le]=(0,s.useState)(!1),[ce,ue]=(0,s.useState)(null),[he,me]=(0,s.useState)(null),[xe,pe]=(0,s.useState)(!1),je=A(U.status),be=n.bucketName||"",ge=b.pathname.split("/browser/".concat(be,"/")),ve=2===ge.length?decodeURIComponent(ge[1]):"",_e=ve.split("/").filter((e=>""!==e));let Se=[be];_e.length>0&&(Se=Se.concat(_e));const Oe=(0,s.useRef)(null),we=(0,s.useRef)(null),Ce=(0,o.d4)((e=>e.console.session&&e.console.session.permissions||{})),Ve=[r.OV.S3_PUT_OBJECT,r.OV.S3_PUT_ACTIONS],De=Se.join("/"),Re=function(e,t){const n=T(e,t,arguments.length>2&&void 0!==arguments[2]?arguments[2]:[]).reduce(((e,t)=>{const n=w(t);return n&&e.push(".".concat(n)),e}),[]);return[...new Set(n)].join(",")}(Ce,De,Ve),Pe=T(Ce,De,Ve),Ue=(0,_._)([De,...Pe],[r.OV.S3_GET_OBJECT,r.OV.S3_GET_ACTIONS]),ze=(0,_._)(be,[r.OV.S3_GET_OBJECT,r.OV.S3_GET_ACTIONS,r.OV.S3_GET_BUCKET_VERSIONING]),Ge=(0,_._)([De,...Pe],[r.OV.S3_DELETE_OBJECT]),Me=(0,_._)([De,...Pe],Ve)||H,Je=(0,_._)(be,[r.OV.S3_GET_BUCKET_POLICY,r.OV.S3_PUT_BUCKET_POLICY,r.OV.S3_GET_ACTIONS,r.OV.S3_PUT_ACTIONS]),Ke=(0,o.d4)((e=>e.objectBrowser.selectedObjects)),We=(()=>{let e=!1;if(1===Ke.length){e=!!$.find((e=>e.name==="".concat(Ke[0])&&e.delete_flag))}return e})(),He=(0,s.useCallback)((()=>{const e=Ke[0];!xe&&e&&i.F.buckets.getObjectMetadata(be,{prefix:e}).then((e=>{let t=u()(e.data,"objectMetadata",{});pe(!0),me(t)})).catch((e=>{console.error("Error Getting Metadata Status: ",e,null===e||void 0===e?void 0:e.detailedError),pe(!0)}))}),[be,Ke,xe]);(0,s.useEffect)((()=>{be&&!We&&He()}),[be,Ke,He,We]),(0,s.useEffect)((()=>{g&&f!==be&&t((0,c.rS)())}),[g,f,be,t]),(0,s.useEffect)((()=>{null!==we.current&&(we.current.setAttribute("directory",""),we.current.setAttribute("webkitdirectory",""))}),[we]),(0,s.useEffect)((()=>{if(1===Ke.length){const e=Ke[0],t=e.endsWith("/");let n=(0,N.IZ)(he,e);le(!("none"===n||!Ue)),ae(!(!Ue||t))}else ae(!1),le(!1)}),[Ke,Ue,he]),(0,s.useEffect)((()=>{ce||H||i.F.buckets.getBucketQuota(be).then((e=>{let t=null;e.data.quota&&(t=e.data),ue(t)})).catch((e=>{console.error("Error Getting Quota Status: ",e.error.detailedMessage),ue(null)}))}),[ce,be,H]),(0,s.useEffect)((()=>{Ke.length>0?t((0,c.TO)(!0)):0!==Ke.length||null!==E||R||t((0,c.TO)(!1))}),[Ke,E,t,R]),(0,s.useEffect)((()=>{ne||(t((0,B.ZU)(!0)),se(!0))}),[ne,t,se]),(0,s.useEffect)((()=>{!R&&!Z||H||i.F.buckets.bucketInfo(be).then((e=>{t((0,B.ZU)(!1)),t((0,B.$T)(e.data))})).catch((e=>{t((0,B.ZU)(!1)),t((0,O.C9)((0,m.S)(e)))}))}),[be,Z,t,H,R]),(0,s.useEffect)((()=>{""!==W&&i.F.buckets.getBucketRetentionConfig(W).then((e=>{t((0,c.PJ)(e.data))})).catch((()=>{t((0,c.PJ)(null))}))}),[W,t]);const Ye=e=>{if(null!==e&&void 0!==e&&null!==e.target.files&&void 0!==e.target.files){e.preventDefault();var t=[];for(let n=0;n