2 lines
93 KiB
JavaScript
2 lines
93 KiB
JavaScript
"use strict";(self.webpackChunkportal_ui=self.webpackChunkportal_ui||[]).push([[290],{29316:function(e,n,t){t(50390);var i=t(6369),a=t(86509),o=t(4285),s=t(86362),r=t(62559);n.Z=(0,o.Z)((function(e){return(0,a.Z)({link:{display:"flex",alignItems:"center",textDecoration:"none",maxWidth:"300px",padding:"2rem 2rem 0rem 2rem",color:e.palette.primary.light,fontSize:".8rem","&:hover":{textDecoration:"underline"}},icon:{marginRight:".3rem",display:"flex",alignItems:"center",justifyContent:"center","& svg.min-icon":{width:12}}})}))((function(e){var n=e.to,t=e.label,a=e.classes,o=e.className,c=e.executeOnClick;return(0,r.jsxs)(i.rU,{to:n,className:"".concat(a.link," ").concat(o||""),onClick:function(){c&&c()},children:[(0,r.jsx)("div",{className:a.icon,children:(0,r.jsx)(s.xN,{})}),(0,r.jsx)("div",{className:a.label,children:t})]})}))},90290:function(e,n,t){t.r(n),t.d(n,{default:function(){return it}});var i=t(18489),a=t(50390),o=t(34424),s=t(86509),r=t(4285),c=t(94187),l=t(95467),d=t(25594),u=t(38342),m=t.n(u),h=t(72462),p=t(5265),f=t(35531),x=t(23430),b=t(58471),j=t(70971),v=t(30324),g=t(8174),Z=t(28948),y=t(35477),C=t(2857),k=t(6369),S=t(86362),w=t(24442),N=t(30140),E=t(49495),F=t(37882),I=t(62559),P=(0,F.Z)(a.lazy((function(){return t.e(9924).then(t.bind(t,39924))}))),_={setVersionsModeEnabled:p.db},T=(0,o.$j)((function(e){var n=e.objectBrowser;return{rewindEnabled:m()(n,"rewind.rewindEnabled",!1),versionsMode:m()(n,"versionsMode",!1),versionedFile:m()(n,"versionedFile","")}}),_),D=(0,r.Z)((function(e){return(0,s.Z)((0,i.Z)({},h.cx))}))(T((function(e){var n=e.classes,t=e.bucketName,i=e.internalPaths,o=e.rewindEnabled,s=e.existingFiles,r=e.versionsMode,u=e.versionedFile,m=e.setVersionsModeEnabled,h=e.additionalOptions,p=(0,a.useState)(!1),b=(0,x.Z)(p,2),j=b[0],v=b[1],g=i;""!==i&&(g="/".concat(i));var y=g.split("/").filter((function(e){return""!==e})),C=y.map((function(e,n){var i=y.slice(0,n+1).join("/"),o="/buckets/".concat(t,"/browse/").concat(i?"".concat((0,Z.ug)(i)):"");return(0,I.jsxs)(a.Fragment,{children:[(0,I.jsx)("span",{children:" / "}),(0,I.jsx)(k.rU,{to:o,onClick:function(){m(!1)},children:e})]},"breadcrumbs-".concat(n.toString()))})),F=[];r&&(F=[(0,I.jsx)(a.Fragment,{children:(0,I.jsxs)("span",{children:[" / ",u," - Versions"]})},"breadcrumbs-versionedItem")]);var _=[(0,I.jsx)(a.Fragment,{children:(0,I.jsx)(k.rU,{to:"/buckets/".concat(t,"/browse"),onClick:function(){m(!1)},children:t})},"breadcrumbs-root-path")].concat((0,f.Z)(C),(0,f.Z)(F));return(0,I.jsxs)(a.Fragment,{children:[j&&(0,I.jsx)(P,{modalOpen:j,bucketName:t,folderName:i,onClose:function(){v(!1)},existingFiles:s}),(0,I.jsxs)(d.ZP,{item:!0,xs:12,className:"".concat(n.breadcrumbs),children:[(0,I.jsx)(l.Z,{onClick:function(){r?m(!1):w.Z.goBack()},sx:{border:"#EAEDEE 1px solid",backgroundColor:"#fff",borderLeft:0,borderRadius:0,width:39,height:39,marginRight:"10px"},children:(0,I.jsx)(S.ub,{})}),(0,I.jsx)(c.Z,{title:"Choose or create a new path",children:(0,I.jsx)(l.Z,{id:"new-path",onClick:function(){v(!0)},disabled:o||!(0,N.F)(t,[E.Ft.S3_PUT_OBJECT]),disableTouchRipple:!0,disableRipple:!0,focusRipple:!1,sx:{padding:0,paddingLeft:"6px"},children:(0,I.jsx)(S.N$,{})})}),(0,I.jsx)("div",{className:n.breadcrumbsList,dir:"rtl",children:_}),h&&(0,I.jsx)("div",{className:n.additionalOptions,children:h})]})]})}))),O=t(3662),B=t(44149),L=t(62702),M=t(77130),R=t(25534),z=t(26936),A=t(31680),W=t(70902),U=t(80498),V=t(53224),G=(0,r.Z)((function(e){return(0,s.Z)({listUploadIcons:{height:20,"& .min-icon":{width:18,fill:"rgba(0,0,0,0.87)"}}})}))((function(e){var n=e.uploadPath,t=e.bucketName,i=e.forceDisable,o=void 0!==i&&i,s=e.uploadFileFunction,r=e.uploadFolderFunction,c=e.classes,l=a.useState(null),d=(0,x.Z)(l,2),u=d[0],m=d[1],h=Boolean(u),p=function(){m(null)},f=(0,N.F)(n,[E.Ft.S3_PUT_OBJECT]),b=(0,N.F)(t,[E.Ft.S3_PUT_OBJECT],!1,!0),j=f||b;return(0,I.jsxs)(a.Fragment,{children:[(0,I.jsx)(V.Z,{id:"upload-main",tooltip:"Upload Files","aria-controls":"upload-main-menu","aria-haspopup":"true","aria-expanded":h?"true":void 0,onClick:function(e){m(e.currentTarget)},text:"Upload",icon:(0,I.jsx)(S.rG,{}),color:"primary",variant:"contained",disabled:o||!j}),(0,I.jsxs)(z.Z,{id:"upload-main-menu","aria-labelledby":"upload-main",anchorEl:u,open:h,onClose:function(){p()},anchorOrigin:{vertical:"bottom",horizontal:"center"},transformOrigin:{vertical:"top",horizontal:"center"},children:[(0,I.jsxs)(A.Z,{onClick:function(){s(p)},disabled:!f||o,children:[(0,I.jsx)(U.Z,{className:c.listUploadIcons,children:(0,I.jsx)(S.rG,{})}),(0,I.jsx)(W.Z,{children:"Upload File"})]}),(0,I.jsxs)(A.Z,{onClick:function(){r(p)},disabled:!b||o,children:[(0,I.jsx)(U.Z,{className:c.listUploadIcons,children:(0,I.jsx)(S.oX,{})}),(0,I.jsx)(W.Z,{children:"Upload Folder"})]})]})]})})),H=(0,r.Z)((function(e){return(0,s.Z)({detailsList:{borderColor:"#EAEDEE",backgroundColor:"#fff",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,borderTopWidth:1,borderBottomWidth:1,borderRightWidth:1,borderLeftWidth:1,opacity:1}},closePanel:{position:"absolute",right:0,top:8,"& .min-icon":{width:14}}})}))((function(e){var n=e.classes,t=e.open,i=e.closePanel,a=e.children;return(0,I.jsxs)(d.ZP,{item:!0,className:"".concat(n.detailsList," ").concat(t?"open":""),children:[(0,I.jsx)(l.Z,{onClick:i,className:n.closePanel,children:(0,I.jsx)(S.ot,{})}),a]})})),K=t(81378),Y=t(66946),$=t(56805),J=t(50364),q=t(79440),X=[{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"}],Q=Array.from(Array(31),(function(e,n){return n+1})),ee=(new Date).getFullYear(),ne=Array.from(Array(25),(function(e,n){return n+ee})),te=t(51002),ie=t(92440),ae=t(27207),oe=t(36222),se=t(44977),re=t(36554),ce=t(47554),le=t(43965),de=t(46413),ue=t(97538),me=(0,r.Z)((function(e){return(0,s.Z)({root:{"& .MuiSelect-icon":{color:"#000","&.Mui-disabled":{color:"#9c9c9c"}}},input:{borderBottom:0,fontSize:12}})}))(de.ZP),he=(0,a.forwardRef)((function(e,n){var t=e.classes,i=e.id,o=e.label,s=e.disableOptions,r=void 0!==s&&s,l=e.addSwitch,u=void 0!==l&&l,m=e.tooltip,h=void 0===m?"":m,p=e.borderBottom,f=void 0!==p&&p,b=e.onDateChange,j=e.value,v=void 0===j?"":j;(0,a.useImperativeHandle)(n,(function(){return{resetDate:L}}));var g=(0,a.useState)(!1),Z=(0,x.Z)(g,2),y=Z[0],C=Z[1],k=(0,a.useState)(""),S=(0,x.Z)(k,2),w=S[0],N=S[1],E=(0,a.useState)(""),F=(0,x.Z)(E,2),P=F[0],_=F[1],T=(0,a.useState)(""),D=(0,x.Z)(T,2),O=D[0],B=D[1];(0,a.useEffect)((function(){if(""!==v){var e=v.split("-");B(e[0]),N(e[1]),_("".concat(parseInt(e[2])))}}),[v]),(0,a.useEffect)((function(){var e=function(e,n,t){var i=Date.parse("".concat(e,"-").concat(n,"-").concat(t));if(isNaN(i))return[!1,""];var a=parseInt(n),o=parseInt(t),s=a<10?"0".concat(a):a,r=o<10?"0".concat(o):o,c=new Date(i).toISOString().split("T")[0],l="".concat(e,"-").concat(s,"-").concat(r);return[c===l,l]}(O,w,P),n=(0,x.Z)(e,2),t=n[0],i=n[1];b(i,t)}),[w,P,O,b]);var L=function(){N(""),_(""),B("")},M=function(){return r||!!u&&!y};return(0,I.jsxs)(d.ZP,{item:!0,xs:12,className:(0,se.Z)(t.fieldContainer,(0,oe.Z)({},t.fieldContainerBorder,f)),children:[(0,I.jsx)("div",{className:t.labelContainer,children:(0,I.jsxs)(d.ZP,{container:!0,children:[(0,I.jsxs)(re.Z,{htmlFor:i,className:t.inputLabel,children:[(0,I.jsx)("span",{children:o}),""!==h&&(0,I.jsx)("div",{className:t.tooltipContainer,children:(0,I.jsx)(c.Z,{title:h,placement:"top-start",children:(0,I.jsx)("div",{className:t.tooltip,children:(0,I.jsx)(ue.Z,{})})})})]}),u&&(0,I.jsx)(ie.Z,{indicatorLabels:["Specific Date","Default (7 Days)"],checked:y,value:"date_enabled",id:"date-status",name:"date-status",onChange:function(e){C(e.target.checked),e.target.checked||b("",!0)},switchOnly:!0})]})}),(0,I.jsxs)("div",{children:[(0,I.jsx)(ce.Z,{disabled:M(),className:t.dateInput,children:(0,I.jsxs)(le.Z,{id:"".concat(i,"-month"),name:"".concat(i,"-month"),value:w,displayEmpty:!0,onChange:function(e){N(e.target.value)},input:(0,I.jsx)(me,{}),children:[(0,I.jsx)(A.Z,{value:"",disabled:!0,children:"<Month>"}),X.map((function(e){return(0,I.jsx)(A.Z,{value:e.value,children:e.label},"select-".concat(i,"-monthOP-").concat(e.label))}))]})}),(0,I.jsx)(ce.Z,{disabled:M(),className:t.dateInput,children:(0,I.jsxs)(le.Z,{id:"".concat(i,"-day"),name:"".concat(i,"-day"),value:P,displayEmpty:!0,onChange:function(e){_(e.target.value)},input:(0,I.jsx)(me,{}),children:[(0,I.jsx)(A.Z,{value:"",disabled:!0,children:"<Day>"}),Q.map((function(e){return(0,I.jsx)(A.Z,{value:e,children:e},"select-".concat(i,"-dayOP-").concat(e))}))]})}),(0,I.jsx)(ce.Z,{disabled:M(),className:t.dateInput,children:(0,I.jsxs)(le.Z,{id:"".concat(i,"-year"),name:"".concat(i,"-year"),value:O,displayEmpty:!0,onChange:function(e){B(e.target.value)},input:(0,I.jsx)(me,{}),children:[(0,I.jsx)(A.Z,{value:"",disabled:!0,children:"<Year>"}),ne.map((function(e){return(0,I.jsx)(A.Z,{value:e,children:e},"select-".concat(i,"-yearOP-").concat(e))}))]})})]})]})})),pe=(0,r.Z)((function(e){return(0,s.Z)((0,i.Z)((0,i.Z)((0,i.Z)({dateInput:{"&:not(:last-child)":{marginRight:22}}},h.YI),h.Hr),{},{labelContainer:{flex:1},fieldContainer:(0,i.Z)((0,i.Z)({},h.YI.fieldContainer),{},{display:"flex",alignItems:"center",justifyContent:"space-between",paddingBottom:10,marginTop:11,marginBottom:6}),fieldContainerBorder:{borderBottom:"#9c9c9c 1px solid",marginBottom:20}}))}))(he),fe={setModalErrorSnackMessage:B.zb},xe=(0,o.$j)(null,fe),be=(0,r.Z)((function(e){return(0,s.Z)((0,i.Z)((0,i.Z)((0,i.Z)((0,i.Z)({},h.DF),h.ID),h.bK),{},{dateSelector:{"& div":{borderBottom:0,marginBottom:0,"& div:nth-child(2)":{border:"1px solid #EAEAEA",paddingLeft:5,"& div":{border:0}}}}}))}))(xe((function(e){var n=e.classes,t=e.open,i=e.closeModalAndRefresh,o=e.objectName,s=e.objectInfo,r=e.bucketName,c=e.setModalErrorSnackMessage,l=(0,a.useState)(!0),u=(0,x.Z)(l,2),m=u[0],h=u[1],p=(0,a.useState)(""),f=(0,x.Z)(p,2),b=f[0],j=f[1],g=(0,a.useState)(""),y=(0,x.Z)(g,2),C=y[0],k=y[1],S=(0,a.useState)(!1),w=(0,x.Z)(S,2),N=w[0],E=w[1],F=(0,a.useState)(!1),P=(0,x.Z)(F,2),_=P[0],T=P[1],D=(0,a.useState)(!1),O=(0,x.Z)(D,2),B=O[0],L=O[1];(0,a.useEffect)((function(){if(s.retention_mode&&(j(s.retention_mode.toLowerCase()),L(!0)),s.retention_until_date){var e=new Date(s.retention_until_date);if("Invalid Date"!==e.toString()){var n=e.getFullYear(),t=(a=e.getMonth()+1)<10?"0".concat(a):"".concat(a),i=e.getDate();isNaN(i)||"NaN"===t||isNaN(n)||k("".concat(n,"-").concat(t,"-").concat(i))}L(!0)}var a}),[s]);var M=(0,a.useRef)(null),R=function(){h(!1),j(""),M.current&&M.current.resetDate()},z=B&&("governance"===b||""===b);return(0,I.jsxs)(te.Z,{title:"Set Retention Policy",modalOpen:t,onClose:function(){R(),i(!1)},children:[(0,I.jsxs)("div",{className:n.spacerBottom,children:[(0,I.jsx)("strong",{children:"Selected Object"}),": ",o]}),(0,I.jsxs)("form",{noValidate:!0,autoComplete:"off",onSubmit:function(e){!function(e){e.preventDefault()}(e)},children:[z&&(0,I.jsx)(d.ZP,{item:!0,xs:12,className:n.formFieldRow,children:(0,I.jsx)(ie.Z,{value:"status",id:"status",name:"status",checked:m,onChange:function(e){h(!m)},label:"Status",indicatorLabels:["Enabled","Disabled"]})}),(0,I.jsx)(d.ZP,{item:!0,xs:12,className:n.formFieldRow,children:(0,I.jsx)(ae.Z,{currentSelection:b,id:"type",name:"type",label:"Type",disableOptions:!m||B&&""!==b,onChange:function(e){j(e.target.value)},selectorOptions:[{label:"Governance",value:"governance"},{label:"Compliance",value:"compliance"}]})}),(0,I.jsx)(d.ZP,{item:!0,xs:12,className:"".concat(n.dateSelector," "),children:(0,I.jsx)(pe,{id:"date",label:"Date",disableOptions:!(m&&("governance"===b||"compliance"===b)),ref:M,value:C,borderBottom:!0,onDateChange:function(e,n){E(n),n&&k(e)}})}),(0,I.jsxs)(d.ZP,{item:!0,xs:12,className:n.modalButtonBar,children:[(0,I.jsx)(Y.Z,{type:"button",variant:"outlined",color:"primary",onClick:R,children:"Reset"}),(0,I.jsx)(Y.Z,{type:"submit",variant:"contained",color:"primary",disabled:m&&""===b||m&&!N||_,onClick:function(){T(!0);var e=s.name,n=s.version_id,t=m||"governance"!==b?"".concat(C,"T23:59:59Z"):"";m||"governance"!==b?function(e,n,t){v.Z.invoke("PUT","/api/v1/buckets/".concat(r,"/objects/retention?prefix=").concat((0,Z.ug)(e),"&version_id=").concat(n),{expires:t,mode:b}).then((function(e){T(!1),i(!0)})).catch((function(e){c(e),T(!1)}))}(e,n,t):function(e,n){v.Z.invoke("DELETE","/api/v1/buckets/".concat(r,"/objects/retention?prefix=").concat((0,Z.ug)(e),"&version_id=").concat(n)).then((function(){T(!1),i(!0)})).catch((function(e){c(e),T(!1)}))}(e,n)},children:"Save"})]})]})]})}))),je=t(23473),ve=t(60656),ge=t(21639),Ze={setErrorSnackMessage:B.Ih},ye=(0,o.$j)(null,Ze)((function(e){var n=e.closeDeleteModalAndRefresh,t=e.deleteOpen,i=e.selectedBucket,o=e.selectedObject,s=e.setErrorSnackMessage,r=e.versioning,c=(0,ge.Z)((function(){return n(!0)}),(function(e){return s(e)})),l=(0,x.Z)(c,2),d=l[0],u=l[1],m=(0,a.useState)(!1),h=(0,x.Z)(m,2),p=h[0],f=h[1];if(!o)return null;return(0,I.jsx)(ve.Z,{title:"Delete Object",confirmText:"Delete",isOpen:t,titleIcon:(0,I.jsx)(S.Nv,{}),isLoading:d,onConfirm:function(){var e=(0,Z.le)(o).endsWith("/");u("DELETE","/api/v1/buckets/".concat(i,"/objects?path=").concat(o,"&recursive=").concat(e,"&all_versions=").concat(p))},onClose:function(){return n(!1)},confirmationContent:(0,I.jsxs)(je.Z,{children:["Are you sure you want to delete:"," ",(0,I.jsx)("b",{children:(0,Z.le)(o)}),"? ",(0,I.jsx)("br",{}),r&&(0,I.jsx)(ie.Z,{label:"Delete All Versions",indicatorLabels:["Yes","No"],checked:p,value:"delete_versions",id:"delete-versions",name:"delete-versions",onChange:function(e){f(!p)},description:""})]})})})),Ce={setModalErrorSnackMessage:B.zb},ke=(0,o.$j)(null,Ce),Se=(0,r.Z)((function(e){return(0,s.Z)((0,i.Z)((0,i.Z)((0,i.Z)({},h.DF),h.ID),h.bK))}))(ke((function(e){var n=e.classes,t=e.open,i=e.closeModalAndRefresh,o=e.objectName,s=e.bucketName,r=e.actualInfo,c=e.setModalErrorSnackMessage,l=(0,a.useState)(!1),u=(0,x.Z)(l,2),h=u[0],p=u[1],f=(0,a.useState)(!1),b=(0,x.Z)(f,2),j=b[0],g=b[1],y=r.version_id;(0,a.useEffect)((function(){var e=m()(r,"legal_hold_status","OFF");p("ON"===e)}),[r]);var C=function(){p(!1)};return(0,I.jsxs)(te.Z,{title:"Set Legal Hold",modalOpen:t,onClose:function(){C(),i(!1)},children:[(0,I.jsxs)(d.ZP,{item:!0,xs:12,className:n.spacerBottom,children:["Object: ",s]}),(0,I.jsxs)("form",{noValidate:!0,autoComplete:"off",onSubmit:function(e){!function(e){e.preventDefault(),g(!0),v.Z.invoke("PUT","/api/v1/buckets/".concat(s,"/objects/legalhold?prefix=").concat((0,Z.ug)(o),"&version_id=").concat(y),{status:h?"enabled":"disabled"}).then((function(){g(!1),i(!0)})).catch((function(e){c(e),g(!1)}))}(e)},children:[(0,I.jsx)(d.ZP,{item:!0,xs:12,className:n.formFieldRow,children:(0,I.jsx)(ie.Z,{value:"legalhold",id:"legalhold",name:"legalhold",checked:h,onChange:function(e){p(!h)},label:"Legal Hold Status",indicatorLabels:["Enabled","Disabled"],tooltip:"To enable this feature you need to enable versioning on the bucket before creation"})}),(0,I.jsxs)(d.ZP,{item:!0,xs:12,className:n.modalButtonBar,children:[(0,I.jsx)(Y.Z,{type:"button",color:"primary",variant:"outlined",onClick:C,children:"Clear"}),(0,I.jsx)(Y.Z,{type:"submit",variant:"contained",color:"primary",disabled:j,children:"Save"})]})]})]})}))),we=t(11733),Ne={setErrorSnackMessage:B.Ih},Ee=(0,o.$j)(null,Ne),Fe=(0,r.Z)((function(e){return(0,s.Z)((0,i.Z)({},h.oO))}))(Ee((function(e){var n=e.classes,t=e.versionID,i=e.bucketName,o=e.objectPath,s=e.restoreOpen,r=e.onCloseAndUpdate,c=(0,a.useState)(!1),l=(0,x.Z)(c,2),d=l[0],u=l[1];return(0,I.jsx)(ve.Z,{title:"Restore File Version",confirmText:"Restore",isOpen:s,isLoading:d,titleIcon:(0,I.jsx)(we.Z,{}),onConfirm:function(){u(!0),v.Z.invoke("PUT","/api/v1/buckets/".concat(i,"/objects/restore?prefix=").concat((0,Z.ug)(o),"&version_id=").concat(t)).then((function(e){u(!1),r(!0)})).catch((function(e){(0,B.Ih)(e),u(!1)}))},confirmButtonProps:{color:"secondary",variant:"outlined",disabled:d},onClose:function(){r(!1)},confirmationContent:(0,I.jsxs)(je.Z,{id:"alert-dialog-description",children:["Are you sure you want to restore ",(0,I.jsx)("br",{}),(0,I.jsx)("b",{children:o})," ",(0,I.jsx)("br",{})," with Version ID:",(0,I.jsx)("br",{}),(0,I.jsx)("b",{className:n.wrapText,children:t}),"?"]})})}))),Ie=t(57767),Pe=t(4182),_e=t(35044),Te=t(29399),De=t(73481),Oe=(0,r.Z)((function(e){return(0,s.Z)((0,i.Z)((0,i.Z)({propertiesIcon:{marginLeft:5,"& .min-icon":{height:12}},capitalizeFirst:{textTransform:"capitalize","& .min-icon":{width:16,height:16}},titleCol:{width:"25%"},titleItem:{width:"35%"}},h.bK),h.$b))}))((function(e){var n=e.bucketName,t=e.internalPaths,i=e.classes,o=e.actualInfo,s=e.linear,r=void 0!==s&&s,c=(0,a.useState)({}),l=(0,x.Z)(c,2),u=l[0],h=l[1],p=(0,ge.Z)((function(e){var n=m()(e,"objectMetadata",{});h(n)}),(function(e){return!1})),f=(0,x.Z)(p,2)[1],b=Object.keys(u),j=(0,a.useCallback)((function(){f("GET","/api/v1/buckets/".concat(n,"/objects/metadata?prefix=").concat(t))}),[n,t,o]);return(0,a.useEffect)((function(){o&&j()}),[o,j]),r?(0,I.jsx)(a.Fragment,{children:b.map((function(e,n){var t=Array.isArray(u[e])?u[e].map(decodeURIComponent).join(", "):decodeURIComponent(u[e]);return(0,I.jsxs)($.Z,{className:i.metadataLinear,children:[(0,I.jsx)("strong",{children:e}),(0,I.jsx)("br",{}),t]},"box-meta-".concat(e,"-").concat(n.toString()))}))}):(0,I.jsxs)(d.ZP,{container:!0,children:[(0,I.jsx)(d.ZP,{item:!0,xs:12,sx:{marginTop:"25px",marginBottom:"5px"},children:(0,I.jsx)("h3",{style:{marginTop:"0",marginBottom:"0"},children:"Object Metadata"})}),(0,I.jsx)(d.ZP,{item:!0,xs:12,children:(0,I.jsx)(Pe.Z,{className:i.table,"aria-label":"simple table",children:(0,I.jsx)(_e.Z,{children:b.map((function(e,n){var t=Array.isArray(u[e])?u[e].map(decodeURIComponent).join(", "):decodeURIComponent(u[e]);return(0,I.jsxs)(Te.Z,{children:[(0,I.jsx)(De.Z,{component:"th",scope:"row",className:i.titleItem,children:e}),(0,I.jsx)(De.Z,{align:"right",children:t})]},"tRow-".concat(n.toString()))}))})})})]})})),Be=t(83738),Le=["disabled","onClick","icon","label","classes"],Me=(0,r.Z)((function(e){return(0,s.Z)({root:{padding:"0 15px",height:22,margin:0,color:"#5E5E5E",fontWeight:"normal",fontSize:14,whiteSpace:"nowrap",width:"100%",justifyContent:"flex-start","&:hover":{backgroundColor:"transparent",color:"#000"},"& .min-icon":{width:11},"&:disabled":{color:"#EBEBEB",borderColor:"#EBEBEB"}}})}))((function(e){var n=e.disabled,t=e.onClick,a=e.icon,o=e.label,s=e.classes,r=(0,Be.Z)(e,Le);return(0,I.jsx)(Y.Z,(0,i.Z)((0,i.Z)({},r),{},{disabled:n,onClick:t,className:s.root,startIcon:a,children:(0,I.jsx)("span",{className:"buttonItem",children:o})}))})),Re=(0,r.Z)((function(){return(0,s.Z)((0,i.Z)({},h.$b))}))((function(e){var n=e.items,t=e.classes,i=e.title;return(0,I.jsxs)(a.Fragment,{children:[(0,I.jsx)("div",{className:t.titleLabel,children:i}),(0,I.jsxs)("ul",{className:t.objectActions,children:[(0,I.jsx)("li",{children:"Actions:"}),n.map((function(e,n){return(0,I.jsx)("li",{children:(0,I.jsx)(Me,{label:e.label,icon:e.icon,onClick:e.action,disabled:e.disabled})},"action-element-".concat(n.toString()))}))]})]})})),ze=t(89472),Ae=t(93482),We=t(416),Ue=(0,r.Z)((function(e){return(0,s.Z)({fileName:{display:"flex",alignItems:"center","& .min-icon":{width:16,height:16,marginRight:4}},fileNameText:{whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"}})}))((function(e){return(0,I.jsxs)("div",{className:e.classes.fileName,children:[e.icon,(0,I.jsx)("span",{className:e.classes.fileNameText,children:e.strings[e.strings.length-1]})]})})),Ve=a.lazy((function(){return Promise.resolve().then(t.bind(t,30510))})),Ge=a.lazy((function(){return Promise.resolve().then(t.bind(t,78162))})),He=a.lazy((function(){return Promise.resolve().then(t.bind(t,30272))})),Ke=a.lazy((function(){return Promise.resolve().then(t.bind(t,52383))})),Ye=a.lazy((function(){return Promise.resolve().then(t.bind(t,35031))})),$e=a.lazy((function(){return Promise.resolve().then(t.bind(t,79877))})),Je=a.lazy((function(){return Promise.resolve().then(t.bind(t,60317))})),qe=a.lazy((function(){return Promise.resolve().then(t.bind(t,80479))})),Xe=a.lazy((function(){return Promise.resolve().then(t.bind(t,37634))})),Qe=a.lazy((function(){return Promise.resolve().then(t.bind(t,99884))})),en=a.lazy((function(){return Promise.resolve().then(t.bind(t,90474))})),nn=a.lazy((function(){return Promise.resolve().then(t.bind(t,15874))})),tn=a.lazy((function(){return Promise.resolve().then(t.bind(t,58729))})),an=a.lazy((function(){return Promise.resolve().then(t.bind(t,49653))})),on=a.lazy((function(){return Promise.resolve().then(t.bind(t,25909))})),sn=[{icon:(0,I.jsx)(tn,{}),extensions:["mp4","mov","avi","mpeg","mpg"]},{icon:(0,I.jsx)(Xe,{}),extensions:["mp3","m4a","aac"]},{icon:(0,I.jsx)(Qe,{}),extensions:["pdf"]},{icon:(0,I.jsx)(en,{}),extensions:["ppt","pptx"]},{icon:(0,I.jsx)(an,{}),extensions:["xls","xlsx"]},{icon:(0,I.jsx)(Je,{}),extensions:["cer","crt","pem"]},{icon:(0,I.jsx)(Ge,{}),extensions:["html","xml","css","py","go","php","cpp","h","java"]},{icon:(0,I.jsx)(He,{}),extensions:["cfg","yaml"]},{icon:(0,I.jsx)(Ke,{}),extensions:["sql"]},{icon:(0,I.jsx)(Ye,{}),extensions:["ttf","otf"]},{icon:(0,I.jsx)(nn,{}),extensions:["txt"]},{icon:(0,I.jsx)(on,{}),extensions:["zip","rar","tar","gz"]},{icon:(0,I.jsx)(Ve,{}),extensions:["epub","mobi","azw","azw3"]},{icon:(0,I.jsx)($e,{}),extensions:["jpeg","jpg","gif","tiff","png","heic","dng"]}],rn=function(e){var n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],t=e,i=(0,I.jsx)(Ae.Z,{});e.endsWith("/")&&(i=(0,I.jsx)(We.Z,{}),t=e.substr(0,e.length-1));var a,o=e.toLowerCase(),s=(0,ze.Z)(sn);try{for(s.s();!(a=s.n()).done;){var r,c=a.value,l=(0,ze.Z)(c.extensions);try{for(l.s();!(r=l.n()).done;){var d=r.value;o.endsWith(".".concat(d))&&(i=c.icon)}}catch(m){l.e(m)}finally{l.f()}}}catch(m){s.e(m)}finally{s.f()}!e.endsWith("/")&&e.indexOf(".")<0&&(i=(0,I.jsx)(qe,{}));var u=t.split("/");return n?i:(0,I.jsx)(Ue,{icon:i,strings:u})},cn=t(66964),ln=t(63020),dn=t(21278),un={setModalErrorSnackMessage:B.zb},mn=(0,o.$j)((function(e){var n=e.system;return{distributedSetup:m()(n,"distributedSetup",!1)}}),un),hn=(0,r.Z)((function(e){return(0,s.Z)((0,i.Z)((0,i.Z)((0,i.Z)({pathLabel:{marginTop:0,marginBottom:32},newTileHeader:{fontSize:18,fontWeight:"bold",color:"#000",margin:"20px 0",paddingBottom:15,borderBottom:"#E2E2E2 2px solid"}},h.DF),h.ID),h.bK))}))(mn((function(e){var n=e.modalOpen,t=e.onCloseAndUpdate,o=e.bucketName,s=e.distributedSetup,r=e.actualInfo,c=e.setModalErrorSnackMessage,l=e.classes,u=(0,a.useState)(""),h=(0,x.Z)(u,2),p=h[0],f=h[1],b=(0,a.useState)(""),j=(0,x.Z)(b,2),g=j[0],y=j[1],C=(0,a.useState)(!1),k=(0,x.Z)(C,2),w=k[0],F=k[1],P=(0,a.useState)(!1),_=(0,x.Z)(P,2),T=_[0],D=_[1],O=(0,a.useState)(""),B=(0,x.Z)(O,2),L=B[0],M=B[1],R=(0,a.useState)(""),z=(0,x.Z)(R,2),A=z[0],W=z[1],U=(0,Z.ug)(r.name),V=r.tags,G=Object.keys(V||{}),H=r.name.split("/").pop()||"";return(0,I.jsx)(a.Fragment,{children:(0,I.jsx)(te.Z,{modalOpen:n,title:T?"Delete Tag":"Edit Tags for ".concat(H),onClose:function(){t(!0)},titleIcon:(0,I.jsx)(S.Dg,{}),children:T?(0,I.jsx)(a.Fragment,{children:(0,I.jsxs)(d.ZP,{container:!0,children:["Are you sure you want to delete the tag"," ",(0,I.jsxs)("b",{className:l.wrapText,children:[L," : ",A]})," ","from ",H,"?",(0,I.jsxs)(d.ZP,{item:!0,xs:12,className:l.modalButtonBar,children:[(0,I.jsx)(Y.Z,{type:"button",variant:"outlined",color:"primary",onClick:function(){M(""),W(""),D(!1)},children:"No"}),(0,I.jsx)(Y.Z,{type:"submit",variant:"outlined",color:"secondary",onClick:function(){var e=(0,i.Z)({},V);delete e[L];var n=s?r.version_id:"null";v.Z.invoke("PUT","/api/v1/buckets/".concat(o,"/objects/tags?prefix=").concat(U,"&version_id=").concat(n),{tags:e}).then((function(e){t(!0),F(!1)})).catch((function(e){c(e),F(!1)}))},children:"Yes"})]})]})}):(0,I.jsxs)(d.ZP,{container:!0,children:[(0,I.jsx)(N.s,{scopes:[E.Ft.S3_GET_OBJECT_TAGGING],resource:o,children:(0,I.jsxs)($.Z,{sx:{display:"flex",flexFlow:"column"},children:[(0,I.jsx)("strong",{children:"Current Tags:"}),0===G.length?"No Tags for this object":"",(0,I.jsx)($.Z,{children:G.map((function(e,n){var t=m()(V,"".concat(e),"");return""!==t?(0,I.jsx)(N.s,{scopes:[E.Ft.S3_DELETE_OBJECT_TAGGING],resource:o,matchAll:!0,errorProps:{deleteIcon:null,onDelete:null},children:(0,I.jsx)(ln.Z,{style:{textTransform:"none",marginRight:"5px"},size:"small",label:"".concat(e," : ").concat(t),color:"primary",deleteIcon:(0,I.jsx)(dn.Z,{}),onDelete:function(){!function(e,n){M(e),W(n),D(!0)}(e,t)}})},"chip-".concat(n)):null}))})]})}),(0,I.jsx)(N.s,{scopes:[E.Ft.S3_PUT_OBJECT_TAGGING],resource:o,errorProps:{disabled:!0,onClick:null},children:(0,I.jsxs)(d.ZP,{container:!0,children:[(0,I.jsx)(d.ZP,{item:!0,xs:12,className:l.newTileHeader,children:"Add New Tag"}),(0,I.jsx)(d.ZP,{item:!0,xs:12,className:l.formFieldRow,children:(0,I.jsx)(cn.Z,{value:p,label:"Tag Key",id:"newTagKey",name:"newTagKey",placeholder:"Enter Tag Key",onChange:function(e){f(e.target.value)}})}),(0,I.jsx)(d.ZP,{item:!0,xs:12,className:l.formFieldRow,children:(0,I.jsx)(cn.Z,{value:g,label:"Tag Label",id:"newTagLabel",name:"newTagLabel",placeholder:"Enter Tag Label",onChange:function(e){y(e.target.value)}})}),(0,I.jsxs)(d.ZP,{item:!0,xs:12,className:l.modalButtonBar,children:[(0,I.jsx)(Y.Z,{type:"button",variant:"outlined",color:"primary",onClick:function(){y(""),f("")},children:"Clear"}),(0,I.jsx)(Y.Z,{type:"submit",variant:"contained",color:"primary",disabled:""===g.trim()||""===p.trim()||w,onClick:function(){F(!0);var e={};e[p]=g;var n=(0,i.Z)((0,i.Z)({},V),e),a=s?r.version_id:"null";v.Z.invoke("PUT","/api/v1/buckets/".concat(o,"/objects/tags?prefix=").concat(U,"&version_id=").concat(a),{tags:n}).then((function(e){t(!0),F(!1)})).catch((function(e){c(e),F(!1)}))},children:"Save new Tag"})]})]})})]})})})}))),pn=t(33032),fn=t(84322),xn=t.n(fn),bn=t(94863),jn={setErrorSnackMessage:B.Ih},vn=(0,o.$j)(null,jn),gn=(0,r.Z)((function(e){return(0,s.Z)((0,i.Z)((0,i.Z)((0,i.Z)({},h.DF),h.ID),h.bK))}))(vn((function(e){var n=e.classes,t=e.closeInspectModalAndRefresh,i=e.inspectOpen,o=e.inspectPath,s=e.volumeName,r=e.setErrorSnackMessage,c=function(){return t(!1)},l=(0,a.useState)(!0),u=(0,x.Z)(l,2),m=u[0],h=u[1],p=(0,a.useState)(""),f=(0,x.Z)(p,2),b=f[0],j=f[1],v=(0,a.useState)(""),g=(0,x.Z)(v,2),y=g[0],C=g[1];if(!o)return null;var k=function(){var e=(0,pn.Z)(xn().mark((function e(n){return xn().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,fetch(n,{method:"GET"});case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),w=function(){var e=(0,pn.Z)(xn().mark((function e(){var n,t,i;return xn().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=encodeURIComponent(o+"/xl.meta"),t=encodeURIComponent(s),i="/api/v1/admin/inspect?volume=".concat(t,"&file=").concat(n,"&encrypt=").concat(m),k(i).then(function(){var e=(0,pn.Z)(xn().mark((function e(n){var t,i,a,o;return xn().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n.ok){e.next=5;break}return e.next=3,n.json();case 3:t=e.sent,r({errorMessage:t.message,detailedError:t.code});case 5:return e.next=7,n.blob();case 7:if(i=e.sent,a=n.headers.get("content-disposition").split('"')[1],o=(0,Z.Do)(a)||"",(0,Z.zZ)(i,a),C(a),""!==o){e.next=15;break}return c(),e.abrupt("return");case 15:j(o);case 16:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}()).catch((function(e){r(e)}));case 4:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();return(0,I.jsxs)(a.Fragment,{children:[!b&&(0,I.jsx)(te.Z,{modalOpen:i,titleIcon:(0,I.jsx)(J.Gp,{}),title:"Inspect Object",onClose:c,children:(0,I.jsxs)("form",{noValidate:!0,autoComplete:"off",onSubmit:function(e){!function(e){e.preventDefault()}(e)},children:["Would you like to encrypt ",(0,I.jsx)("b",{children:(0,Z.le)(o)}),"?"," ",(0,I.jsx)("br",{}),(0,I.jsx)(ie.Z,{label:"Encrypt",indicatorLabels:["Yes","No"],checked:m,value:"encrypt",id:"encrypt",name:"encrypt",onChange:function(e){h(!m)},description:""}),(0,I.jsx)(d.ZP,{item:!0,xs:12,className:n.modalButtonBar,children:(0,I.jsx)(Y.Z,{type:"submit",variant:"contained",color:"primary",onClick:w,children:"Inspect"})})]})}),b?(0,I.jsx)(te.Z,{modalOpen:i,title:"Inspect Decryption Key",onClose:function(){(0,Z.kT)(y),c(),j("")},titleIcon:(0,I.jsx)(S.tv,{}),children:(0,I.jsxs)(je.Z,{children:[(0,I.jsxs)($.Z,{children:["This will be displayed only once. It cannot be recovered.",(0,I.jsx)("br",{}),"Use secure medium to share this key."]}),(0,I.jsx)($.Z,{children:(0,I.jsx)(bn.Z,{value:b})})]})}):null]})}))),Zn={is_latest:!0,last_modified:"",legal_hold_status:"",name:"",retention_mode:"",retention_until_date:"",size:"0",tags:{},version_id:null},yn={setErrorSnackMessage:B.Ih,setSnackBarMessage:B.y1,setNewObject:p.Mc,updateProgress:p.RO,completeObject:p.oK,setVersionsModeEnabled:p.db},Cn=(0,o.$j)((function(e){var n=e.objectBrowser,t=e.system;return{rewindEnabled:m()(n,"rewind.rewindEnabled",!1),rewindDate:m()(n,"rewind.dateToRewind",null),bucketToRewind:m()(n,"rewind.bucketToRewind",""),distributedSetup:m()(t,"distributedSetup",!1),versionsMode:m()(n,"versionsMode",!1),selectedVersion:m()(n,"selectedVersion","")}}),yn)((0,r.Z)((function(){return(0,s.Z)((0,i.Z)((0,i.Z)((0,i.Z)((0,i.Z)((0,i.Z)({ObjectDetailsTitle:{display:"flex",alignItems:"center"},objectNameContainer:{whiteSpace:"nowrap",textOverflow:"ellipsis",overflow:"hidden",alignItems:"center",marginLeft:10},headerForSection:{display:"flex",justifyContent:"space-between",alignItems:"center",paddingBottom:15,borderBottom:"#E2E2E2 2px solid",fontWeight:"bold",fontSize:18,color:"#000",margin:"20px 22px"},capitalizeFirst:{textTransform:"capitalize"}},h.Si),h.OR),h.bK),h.VI),h.$b))}))((function(e){var n=e.classes,t=e.internalPaths,i=e.bucketName,o=e.distributedSetup,s=e.setErrorSnackMessage,r=e.setNewObject,c=e.updateProgress,l=e.completeObject,u=e.versionsMode,h=e.selectedVersion,p=e.onClosePanel,f=e.setVersionsModeEnabled,b=(0,a.useState)(!0),j=(0,x.Z)(b,2),g=j[0],y=j[1],C=(0,a.useState)(!1),k=(0,x.Z)(C,2),w=k[0],F=k[1],P=(0,a.useState)(!1),_=(0,x.Z)(P,2),T=_[0],D=_[1],B=(0,a.useState)(!1),L=(0,x.Z)(B,2),M=L[0],R=L[1],z=(0,a.useState)(!1),A=(0,x.Z)(z,2),W=A[0],U=A[1],V=(0,a.useState)(!1),G=(0,x.Z)(V,2),H=G[0],X=G[1],Q=(0,a.useState)(null),ee=(0,x.Z)(Q,2),ne=ee[0],te=ee[1],ie=(0,a.useState)([]),ae=(0,x.Z)(ie,2),oe=ae[0],se=ae[1],re=(0,a.useState)(null),ce=(0,x.Z)(re,2),le=ce[0],de=ce[1],ue=(0,a.useState)([]),me=(0,x.Z)(ue,2),he=me[0],pe=me[1],fe=(0,a.useState)(!1),xe=(0,x.Z)(fe,2),je=xe[0],ve=xe[1],ge=(0,a.useState)(!1),Ze=(0,x.Z)(ge,2),Ce=Ze[0],ke=Ze[1],we=(0,a.useState)(!1),Ne=(0,x.Z)(we,2),Ee=Ne[0],Pe=Ne[1],_e=(0,a.useState)(""),Te=(0,x.Z)(_e,2),De=Te[0],Be=Te[1],Le=(0,a.useState)(0),Me=(0,x.Z)(Le,2),ze=Me[0],Ae=Me[1],We=((0,Z.le)(t)||"").split("/").pop()||"",Ue=[];ne&&(Ue=ne.name.split("/")),(0,a.useEffect)((function(){""!==i&&t&&y(!0)}),[t,i]),(0,a.useEffect)((function(){if(o&&oe.length>=1){var e=oe.find((function(e){return e.is_latest}))||Zn;""!==h&&(e=oe.find((function(e){return e.version_id===h}))||Zn),te(e)}}),[h,o,oe]),(0,a.useEffect)((function(){g&&""!==t&&v.Z.invoke("GET","/api/v1/buckets/".concat(i,"/objects?prefix=").concat(t).concat(o?"&with_versions=true":"")).then((function(e){var n=m()(e,"objects",[]);if(o){se(n),pe(n);var t=n.reduce((function(e,n){return null!==n&&void 0!==n&&n.size?e+n.size:e}),0);Ae(t)}else te(n[0]),pe([]);y(!1)})).catch((function(e){s(e),y(!1)}))}),[g,i,t,s,o,h]);var Ve=[];ne&&ne.tags&&(Ve=Object.keys(ne.tags));if(!ne)return null;var Ge=Ue.length>0?Ue[Ue.length-1]:ne.name,He=[{action:function(){!function(e){var n=(0,Z.ug)("".concat(i,"-").concat(e.name,"-").concat((new Date).getTime(),"-").concat(Math.random()));r({bucketName:i,done:!1,instanceID:n,percentage:0,prefix:e.name,type:"download",waitingForFile:!0}),(0,O.LR)(i,t,e.version_id,parseInt(e.size||"0"),(function(e){c(n,e)}),(function(){l(n)}))}(ne)},label:"Download",disabled:!!ne.is_delete_marker,icon:(0,I.jsx)(S._8,{}),tooltip:"Download this Object"},{action:function(){F(!0)},label:"Share",disabled:!!ne.is_delete_marker,icon:(0,I.jsx)(S.aA,{}),tooltip:"Share this File"},{action:function(){Pe(!0)},label:"Preview",disabled:!!ne.is_delete_marker||"none"===(0,O.Bg)(We),icon:(0,I.jsx)(S.P9,{}),tooltip:"Preview this File"},{action:function(){U(!0)},label:"Legal Hold",disabled:!!ne.is_delete_marker||"none"===(0,O.Bg)(We)||!(0,N.F)(i,[E.Ft.S3_PUT_OBJECT_LEGAL_HOLD])||""!==h,icon:(0,I.jsx)(S.fN,{}),tooltip:"Change Legal Hold rules for this File"},{action:function(){D(!0)},label:"Retention",disabled:!!ne.is_delete_marker||"none"===(0,O.Bg)(We)||!(0,N.F)(i,[E.Ft.S3_GET_OBJECT_RETENTION])||""!==h,icon:(0,I.jsx)(S.E9,{}),tooltip:"Change Retention rules for this File"},{action:function(){R(!0)},label:"Tags",disabled:!!ne.is_delete_marker||"none"===(0,O.Bg)(We)||""!==h,icon:(0,I.jsx)(S.Dg,{}),tooltip:"Change Tags for this File"},{action:function(){X(!0)},label:"Inspect",disabled:!!ne.is_delete_marker||"none"===(0,O.Bg)(We)||""!==h,icon:(0,I.jsx)(J.Gp,{}),tooltip:"Inspect this file"},{action:function(){f(!u,Ge)},label:u?"Hide Object Versions":"Display Object Versions",icon:(0,I.jsx)(S.cR,{}),disabled:!(ne.version_id&&"null"!==ne.version_id),tooltip:"Display Versions for this file"}];return(0,I.jsxs)(a.Fragment,{children:[w&&ne&&(0,I.jsx)(q.default,{open:w,closeModalAndRefresh:function(){de(null),F(!1)},bucketName:i,dataObject:le||ne}),T&&ne&&(0,I.jsx)(be,{open:T,closeModalAndRefresh:function(e){D(!1),e&&y(!0)},objectName:We,objectInfo:ne,bucketName:i}),je&&(0,I.jsx)(ye,{deleteOpen:je,selectedBucket:i,selectedObject:t,closeDeleteModalAndRefresh:function(e){ve(!1),e&&p(!0)},versioning:o}),W&&ne&&(0,I.jsx)(Se,{open:W,closeModalAndRefresh:function(e){U(!1),e&&y(!0)},objectName:ne.name,bucketName:i,actualInfo:ne}),Ce&&ne&&(0,I.jsx)(Fe,{restoreOpen:Ce,bucketName:i,versionID:De,objectPath:ne.name,onCloseAndUpdate:function(e){ke(!1),Be(""),e&&y(!0)}}),Ee&&ne&&(0,I.jsx)(Ie.default,{open:Ee,bucketName:i,object:{name:ne.name,version_id:ne.version_id||"null",size:parseInt(ne.size||"0"),content_type:"",last_modified:new Date(ne.last_modified)},onClosePreview:function(){Pe(!1)}}),M&&ne&&(0,I.jsx)(hn,{modalOpen:M,bucketName:i,actualInfo:ne,onCloseAndUpdate:function(e){R(!1),e&&y(!0)}}),H&&ne&&(0,I.jsx)(gn,{inspectOpen:H,volumeName:i,inspectPath:ne.name,closeInspectModalAndRefresh:function(e){X(!1),e&&y(!0)}}),!ne&&(0,I.jsx)(d.ZP,{item:!0,xs:12,children:(0,I.jsx)(K.Z,{})}),(0,I.jsx)(Re,{title:(0,I.jsxs)("div",{className:n.ObjectDetailsTitle,children:[rn(Ge,!0),(0,I.jsx)("span",{className:n.objectNameContainer,children:Ge})]}),items:He}),(0,I.jsx)(d.ZP,{item:!0,xs:12,sx:{textAlign:"center"},children:""===h&&(0,I.jsx)(N.s,{resource:i,scopes:[E.Ft.S3_DELETE_OBJECT],matchAll:!0,errorProps:{disabled:!0},children:(0,I.jsx)(Y.Z,{startIcon:(0,I.jsx)(S.pJ,{}),color:"secondary",variant:"outlined",onClick:function(){ve(!0)},disabled:ne.is_delete_marker||""!==h,sx:{width:"calc(100% - 44px)",margin:"8px 0","& svg.min-icon":{width:14,height:14}},children:"Delete"})})}),(0,I.jsxs)(d.ZP,{item:!0,xs:12,className:n.headerForSection,children:[(0,I.jsx)("span",{children:"Object Info"}),(0,I.jsx)(S.Gv,{})]}),(0,I.jsxs)($.Z,{className:n.detailContainer,children:[(0,I.jsx)("strong",{children:"Name:"}),(0,I.jsx)("br",{}),Ge]}),""!==h&&(0,I.jsxs)($.Z,{className:n.detailContainer,children:[(0,I.jsx)("strong",{children:"Version ID:"}),(0,I.jsx)("br",{}),h]}),(0,I.jsxs)($.Z,{className:n.detailContainer,children:[(0,I.jsx)("strong",{children:"Size:"}),(0,I.jsx)("br",{}),(0,Z.ae)(ne.size||"0")]}),ne.version_id&&"null"!==ne.version_id&&""===h&&(0,I.jsxs)($.Z,{className:n.detailContainer,children:[(0,I.jsx)("strong",{children:"Versions:"}),(0,I.jsx)("br",{}),he.length," version",1!==he.length?"s":"",","," ",(0,Z.l5)(ze)]}),""===h&&(0,I.jsxs)($.Z,{className:n.detailContainer,children:[(0,I.jsx)("strong",{children:"Last Modified:"}),(0,I.jsx)("br",{}),function(e){var n=new Date,t=new Date(e),i=n.getTime()-t.getTime();return"".concat((0,Z.nF)(i,"ms")," ago")}(ne.last_modified)]}),(0,I.jsxs)($.Z,{className:n.detailContainer,children:[(0,I.jsx)("strong",{children:"ETAG:"}),(0,I.jsx)("br",{}),ne.etag||"N/A"]}),(0,I.jsxs)($.Z,{className:n.detailContainer,children:[(0,I.jsx)("strong",{children:"Tags:"}),(0,I.jsx)("br",{}),0===Ve.length?"N/A":Ve.map((function(e,n){return(0,I.jsxs)("span",{children:[e,":",m()(ne,"tags.".concat(e),""),n<Ve.length-1?", ":""]},"key-vs-".concat(n.toString()))}))]}),(0,I.jsx)($.Z,{className:n.detailContainer,children:(0,I.jsx)(N.s,{scopes:[E.Ft.S3_GET_OBJECT_LEGAL_HOLD],resource:i,children:(0,I.jsxs)(a.Fragment,{children:[(0,I.jsx)("strong",{children:"Legal Hold:"}),(0,I.jsx)("br",{}),ne.legal_hold_status?"On":"Off"]})})}),(0,I.jsx)($.Z,{className:n.detailContainer,children:(0,I.jsx)(N.s,{scopes:[E.Ft.S3_GET_OBJECT_RETENTION],resource:i,children:(0,I.jsxs)(a.Fragment,{children:[(0,I.jsx)("strong",{children:"Retention Policy:"}),(0,I.jsx)("br",{}),(0,I.jsx)("span",{className:n.capitalizeFirst,children:(ne.version_id&&ne.version_id,(0,I.jsx)(a.Fragment,{children:ne.retention_mode?ne.retention_mode.toLowerCase():"None"}))})]})})}),(0,I.jsxs)(d.ZP,{item:!0,xs:12,className:n.headerForSection,children:[(0,I.jsx)("span",{children:"Metadata"}),(0,I.jsx)(S.fR,{})]}),(0,I.jsx)($.Z,{className:n.detailContainer,children:ne?(0,I.jsx)(Oe,{bucketName:i,internalPaths:t,actualInfo:ne,linear:!0}):null})]})}))),kn=t(87248),Sn=t.n(kn),wn=function(e){return e.name.endsWith("/")?"":(0,I.jsx)(Sn(),{children:e.last_modified})},Nn=function(e){return e.name.endsWith("/")||!e.size?"-":(0,Z.ae)(String(e.size))},En=[{label:"Name",elementKey:"name",renderFunction:rn,enableSort:!0},{label:"Last Modified",elementKey:"last_modified",renderFunction:wn,renderFullObject:!0,enableSort:!0},{label:"Size",elementKey:"size",renderFunction:Nn,renderFullObject:!0,width:60,contentTextAlign:"center",enableSort:!0}],Fn=[{label:"Name",elementKey:"name",renderFunction:rn,enableSort:!0},{label:"Object Date",elementKey:"last_modified",renderFunction:wn,renderFullObject:!0,enableSort:!0},{label:"Size",elementKey:"size",renderFunction:Nn,renderFullObject:!0,width:60,contentTextAlign:"center",enableSort:!0},{label:"Deleted",elementKey:"delete_flag",renderFunction:function(e){return e?"Yes":"No"},width:60,contentTextAlign:"center"}],In=t(18572),Pn=(0,r.Z)((function(e){return(0,s.Z)({mainFileVersionItem:{borderBottom:"#E2E2E2 1px solid",padding:"1rem 0",margin:"0 2rem 0 3.5rem",cursor:"pointer"},versionContainer:{fontSize:16,fontWeight:"bold",color:"#000",display:"flex",alignItems:"center","& svg.min-icon":{width:18,height:18,marginRight:10}},buttonContainer:{textAlign:"right","& button":{marginLeft:"1.5rem"}},versionID:{fontSize:"12px",color:"#000",margin:"2px 0"},versionData:{marginRight:"10px",fontSize:12,color:"#868686"},ctrItem:{position:"relative","&::before":{content:"' '",display:"block",position:"absolute",width:"2px",height:"calc(100% + 2px)",backgroundColor:"#F8F8F8",left:"24px"}}})}))((function(e){var n=e.classes,t=e.fileName,i=e.versionInfo,a=e.onShare,o=e.onDownload,s=e.onRestore,r=e.globalClick,u=e.index,m=i.is_delete_marker,h=[{icon:(0,I.jsx)(S._8,{}),action:o,tooltip:"Download this version"},{icon:(0,I.jsx)(S.aA,{}),action:a,tooltip:"Share this version"},{icon:(0,I.jsx)(S.D7,{}),action:s,tooltip:"Restore this version"}];return(0,I.jsx)(d.ZP,{container:!0,flex:1,className:n.ctrItem,onClick:function(){r(i)},children:(0,I.jsxs)(d.ZP,{item:!0,xs:12,className:n.mainFileVersionItem,children:[(0,I.jsx)(d.ZP,{item:!0,xs:12,justifyContent:"space-between",children:(0,I.jsxs)(d.ZP,{container:!0,children:[(0,I.jsxs)(d.ZP,{item:!0,xs:4,className:n.versionContainer,children:[rn(t,!0)," v",u.toString()]}),(0,I.jsx)(d.ZP,{item:!0,xs:8,className:n.buttonContainer,children:h.map((function(e,t){return(0,I.jsx)(c.Z,{title:e.tooltip,children:(0,I.jsx)(l.Z,{size:"small",id:"version-action-".concat(e.tooltip,"-").concat(t.toString()),className:"".concat(n.spacing," ").concat(m?n.buttonDisabled:""),disabled:m,onClick:function(n){n.stopPropagation(),m?n.preventDefault():e.action(i)},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,I.jsx)(d.ZP,{item:!0,xs:12,className:n.versionID,children:i.version_id}),(0,I.jsxs)(d.ZP,{item:!0,xs:12,children:[(0,I.jsxs)("span",{className:n.versionData,children:[(0,I.jsx)("strong",{children:"Last modified:"})," ",(0,I.jsx)(Sn(),{children:i.last_modified})]}),(0,I.jsxs)("span",{className:n.versionData,children:[(0,I.jsx)("strong",{children:"Deleted:"})," ",i.is_delete_marker?"Yes":"No"]})]})]})})})),_n=t(67754),Tn={is_latest:!0,last_modified:"",legal_hold_status:"",name:"",retention_mode:"",retention_until_date:"",size:"0",tags:{},version_id:null},Dn={setErrorSnackMessage:B.Ih,setSnackBarMessage:B.y1,setNewObject:p.Mc,updateProgress:p.RO,completeObject:p.oK,setSelectedVersion:p.M3},On=(0,o.$j)((function(e){var n=e.system,t=e.objectBrowser;return{distributedSetup:m()(n,"distributedSetup",!1),searchVersions:t.searchVersions}}),Dn)((0,r.Z)((function(e){return(0,s.Z)((0,i.Z)((0,i.Z)((0,i.Z)((0,i.Z)((0,i.Z)((0,i.Z)((0,i.Z)((0,i.Z)((0,i.Z)({versionsContainer:{border:"#EAEDEE 1px solid",padding:10},noBottomBorder:{borderBottom:0},versionsVirtualPanel:{flexGrow:1,height:"calc(100% - 120px)",overflow:"auto"},screenTitleContainer:{position:"relative","&::before":{content:"' '",display:"block",position:"absolute",width:"2px",backgroundColor:"#F8F8F8",left:"24px",height:"52px",bottom:0}},sortByLabel:{color:"#838383",fontWeight:"bold",whiteSpace:"nowrap",marginRight:12,fontSize:14}},h.bp),h.Si),h.OR),h.VX),h.bK),h.VI),h.cx),h.C4),(0,h.Bz)(e.spacing(4))))}))((function(e){var n=e.classes,t=e.distributedSetup,i=e.setErrorSnackMessage,o=e.setNewObject,s=e.updateProgress,r=e.searchVersions,c=e.completeObject,l=e.internalPaths,u=e.bucketName,h=e.setSelectedVersion,p=(0,a.useState)(!0),f=(0,x.Z)(p,2),b=f[0],j=f[1],g=(0,a.useState)(!1),y=(0,x.Z)(g,2),C=y[0],k=y[1],w=(0,a.useState)(null),N=(0,x.Z)(w,2),E=N[0],F=N[1],P=(0,a.useState)(null),_=(0,x.Z)(P,2),T=_[0],D=_[1],B=(0,a.useState)([]),M=(0,x.Z)(B,2),R=M[0],z=M[1],A=(0,a.useState)(!1),W=(0,x.Z)(A,2),U=W[0],V=W[1],G=(0,a.useState)(""),H=(0,x.Z)(G,2),Y=H[0],$=H[1],J=(0,a.useState)("date"),X=(0,x.Z)(J,2),Q=X[0],ee=X[1],ne=[];E&&(ne=E.name.split("/")),(0,a.useEffect)((function(){b&&""!==l&&v.Z.invoke("GET","/api/v1/buckets/".concat(u,"/objects?prefix=").concat(l).concat(t?"&with_versions=true":"")).then((function(e){var n=m()(e,"objects",[]);t?(F(n.find((function(e){return e.is_latest}))||Tn),z(n)):(F(n[0]),z([])),j(!1)})).catch((function(e){i(e),j(!1)}))}),[b,u,l,i,t]);var te=function(e){D(e),k(!0)},ie=function(e){$(e.version_id||""),V(!0)},ae=function(e){!function(e){var n=(0,Z.ug)("".concat(u,"-").concat(e.name,"-").concat((new Date).getTime(),"-").concat(Math.random()));o({bucketName:u,done:!1,instanceID:n,percentage:0,prefix:e.name,type:"download",waitingForFile:!0}),(0,O.LR)(u,l,e.version_id,parseInt(e.size||"0"),(function(e){s(n,e)}),(function(){c(n)}))}(e)},oe=function(e){h(e.version_id||"")},se=R.filter((function(e){return!!e.version_id&&e.version_id.includes(r)})),re=R.reduce((function(e,n){return n.size?e+parseInt(n.size):e}),0);se.sort((function(e,n){switch(Q){case"version":return e.version_id&&n.version_id?e.version_id<n.version_id?-1:e.version_id>n.version_id?1:0:0;case"deleted":return e.is_delete_marker&&!n.is_delete_marker?-1:!e.is_delete_marker&&n.is_delete_marker?1:0;default:var t=new Date(e.last_modified).getTime(),i=new Date(n.last_modified).getTime();return t<i?1:t>i?-1:0}}));return(0,I.jsxs)(a.Fragment,{children:[C&&E&&(0,I.jsx)(q.default,{open:C,closeModalAndRefresh:function(){D(null),k(!1)},bucketName:u,dataObject:T||E}),U&&E&&(0,I.jsx)(Fe,{restoreOpen:U,bucketName:u,versionID:Y,objectPath:E.name,onCloseAndUpdate:function(e){V(!1),$(""),e&&j(!0)}}),(0,I.jsxs)(d.ZP,{container:!0,className:n.versionsContainer,children:[!E&&(0,I.jsx)(d.ZP,{item:!0,xs:12,children:(0,I.jsx)(K.Z,{})}),E&&(0,I.jsxs)(a.Fragment,{children:[(0,I.jsx)(d.ZP,{item:!0,xs:12,className:n.screenTitleContainer,children:(0,I.jsx)(L.Z,{icon:(0,I.jsx)("span",{className:n.listIcon,children:(0,I.jsx)(S.cR,{})}),title:(0,I.jsxs)("span",{className:n.titleSpacer,children:[ne.length>0?ne[ne.length-1]:E.name," ","Versions"]}),subTitle:(0,I.jsx)(a.Fragment,{children:(0,I.jsxs)(d.ZP,{item:!0,xs:12,className:n.bucketDetails,children:[(0,I.jsx)("span",{className:n.detailsSpacer,children:(0,I.jsxs)("strong",{children:[R.length," Version",1===R.length?"":"s","\xa0\xa0\xa0"]})}),(0,I.jsx)("span",{className:n.detailsSpacer,children:(0,I.jsx)("strong",{children:(0,Z.l5)(re)})})]})}),actions:(0,I.jsxs)(a.Fragment,{children:[(0,I.jsx)("span",{className:n.sortByLabel,children:"Sort by"}),(0,I.jsx)(_n.Z,{id:"sort-by",label:"",value:Q,onChange:function(e){ee(e.target.value)},name:"sort-by",options:[{label:"Date",value:"date"},{label:"Version ID",value:"version"},{label:"Deleted",value:"deleted"}]})]}),className:n.noBottomBorder})}),(0,I.jsx)(d.ZP,{item:!0,xs:12,className:n.versionsVirtualPanel,children:E.version_id&&"null"!==E.version_id&&(0,I.jsx)(In.Z,{rowRenderFunction:function(e){var n=se[e],t=R.length-R.indexOf(n);return(0,I.jsx)(Pn,{fileName:(null===E||void 0===E?void 0:E.name)||"",versionInfo:n,index:t,onDownload:ae,onRestore:ie,onShare:te,globalClick:oe})},totalItems:se.length,defaultHeight:110})})]})]})]})}))),Bn=t(54950),Ln=a.lazy((function(){return Promise.resolve().then(t.bind(t,83842))})),Mn=a.lazy((function(){return Promise.resolve().then(t.bind(t,18221))})),Rn=a.lazy((function(){return Promise.resolve().then(t.bind(t,35336))})),zn=(0,F.Z)(a.lazy((function(){return t.e(9193).then(t.bind(t,49193))}))),An=(0,F.Z)(a.lazy((function(){return Promise.resolve().then(t.bind(t,79440))}))),Wn=(0,F.Z)(a.lazy((function(){return Promise.all([t.e(6117),t.e(4837),t.e(7451)]).then(t.bind(t,97451))}))),Un=(0,F.Z)(a.lazy((function(){return Promise.resolve().then(t.bind(t,57767))}))),Vn={borderWidth:2,borderRadius:2,borderColor:"#eeeeee",outline:"none"},Gn={borderStyle:"dashed",backgroundColor:"#fafafa",borderColor:"#2196f3"},Hn={borderStyle:"dashed",backgroundColor:"#fafafa",borderColor:"#00e676"};var Kn=(0,I.jsx)(y.Z,{component:"h3",children:"Loading..."}),Yn={setSnackBarMessage:B.y1,setErrorSnackMessage:B.Ih,resetRewind:p._w,setBucketDetailsLoad:M.d5,setBucketInfo:M.f4,setNewObject:p.Mc,updateProgress:p.RO,completeObject:p.oK,openList:p.LD,setSearchObjects:p.G4,setVersionsModeEnabled:p.db,setShowDeletedObjects:p.mz},$n=(0,o.$j)((function(e){var n=e.objectBrowser,t=e.buckets;return{routesList:m()(n,"routesList",[]),downloadingFiles:m()(n,"downloadingFiles",[]),rewindEnabled:m()(n,"rewind.rewindEnabled",!1),rewindDate:m()(n,"rewind.dateToRewind",null),bucketToRewind:m()(n,"rewind.bucketToRewind",""),versionsMode:m()(n,"versionsMode",!1),loadingBucket:t.bucketDetails.loadingBucket,bucketInfo:t.bucketDetails.bucketInfo,searchObjects:n.searchObjects,showDeleted:n.showDeleted}}),Yn),Jn=(0,j.EN)($n((0,r.Z)((function(e){return(0,s.Z)((0,i.Z)((0,i.Z)((0,i.Z)((0,i.Z)((0,i.Z)((0,i.Z)({browsePaper:{height:"calc(100vh - 210px)","&.actionsPanelOpen":{minHeight:"100%"}},"@global":{".rowLine:hover .iconFileElm":{backgroundImage:"url(/images/ob_file_filled.svg)"},".rowLine:hover .iconFolderElm":{backgroundImage:"url(/images/ob_folder_filled.svg)"}},badgeOverlap:{"& .MuiBadge-badge":{top:10,right:1,width:5,height:5,minWidth:5}},screenTitle:{borderBottom:0,paddingTop:0,paddingLeft:0,paddingRight:0}},h.VX),h.OR),h.qg),{},{searchField:(0,i.Z)((0,i.Z)({},h.qg.searchField),{},{maxWidth:380}),screenTitleContainer:{border:"#EAEDEE 1px solid",borderBottom:0,padding:"0.8rem 15px 0"},labelStyle:{color:"#969FA8",fontSize:"12px"}},h.C4),h.cx),(0,h.Bz)(e.spacing(4))))}))((function(e){var n=e.classes,t=e.match,o=e.history,s=e.rewindEnabled,r=e.rewindDate,c=e.bucketToRewind,l=e.setSnackBarMessage,u=e.setErrorSnackMessage,h=e.resetRewind,p=e.setBucketDetailsLoad,j=e.loadingBucket,k=e.setBucketInfo,w=e.bucketInfo,F=e.setNewObject,P=e.updateProgress,_=e.completeObject,T=e.setSearchObjects,B=e.searchObjects,M=e.versionsMode,z=e.openList,A=e.setVersionsModeEnabled,W=e.showDeleted,U=e.setShowDeletedObjects,K=(0,a.useState)([]),Y=(0,x.Z)(K,2),$=Y[0],J=Y[1],q=(0,a.useState)(!0),X=(0,x.Z)(q,2),Q=X[0],ee=X[1],ne=(0,a.useState)([]),te=(0,x.Z)(ne,2),ie=te[0],ae=te[1],oe=(0,a.useState)(!1),se=(0,x.Z)(oe,2),re=se[0],ce=se[1],le=(0,a.useState)(!1),de=(0,x.Z)(le,2),ue=de[0],me=de[1],he=(0,a.useState)(0),pe=(0,x.Z)(he,2),fe=pe[0],xe=pe[1],be=(0,a.useState)(Kn),je=(0,x.Z)(be,2),ve=je[0],ge=je[1],Ze=(0,a.useState)(!0),ye=(0,x.Z)(Ze,2),Ce=ye[0],ke=ye[1],Se=(0,a.useState)(!1),we=(0,x.Z)(Se,2),Ne=we[0],Ee=we[1],Fe=(0,a.useState)(!1),Ie=(0,x.Z)(Fe,2),Pe=Ie[0],_e=Ie[1],Te=(0,a.useState)([]),De=(0,x.Z)(Te,2),Oe=De[0],Be=De[1],Le=(0,a.useState)(!1),Me=(0,x.Z)(Le,2),ze=Me[0],Ae=Me[1],We=(0,a.useState)(null),Ue=(0,x.Z)(We,2),Ve=Ue[0],Ge=Ue[1],He=(0,a.useState)(!1),Ke=(0,x.Z)(He,2),Ye=Ke[0],$e=Ke[1],Je=(0,a.useState)("ASC"),qe=(0,x.Z)(Je,2),Xe=qe[0],Qe=qe[1],en=(0,a.useState)("name"),nn=(0,x.Z)(en,2),tn=nn[0],an=nn[1],on=(0,a.useState)(!1),sn=(0,x.Z)(on,2),rn=sn[0],cn=sn[1],ln=(0,a.useState)(!1),dn=(0,x.Z)(ln,2),un=dn[0],mn=dn[1],hn=(0,a.useState)(!1),pn=(0,x.Z)(hn,2),fn=pn[0],xn=pn[1],bn=(0,a.useState)(!1),jn=(0,x.Z)(bn,2),vn=jn[0],gn=jn[1],Zn=(0,a.useState)(null),yn=(0,x.Z)(Zn,2),kn=yn[0],Sn=yn[1],wn=(0,a.useState)(null),Nn=(0,x.Z)(wn,2),In=Nn[0],Pn=Nn[1],_n=m()(t.params,"subpaths",""),Tn=t.params.bucketName,Dn=(0,a.useRef)(null),Yn=(0,a.useRef)(null);(0,a.useEffect)((function(){null!==Yn.current&&(Yn.current.setAttribute("directory",""),Yn.current.setAttribute("webkitdirectory",""))}),[Yn]),(0,a.useEffect)((function(){if(1===Oe.length){var e=Oe[0];"none"!==(0,O.Bg)(e)?xn(!0):xn(!1),e.endsWith("/")?mn(!1):mn(!0)}else mn(!1),xn(!1)}),[Oe]),(0,a.useEffect)((function(){In||v.Z.invoke("GET","/api/v1/buckets/".concat(Tn,"/quota")).then((function(e){var n=null;e.quota&&(n=e),Pn(n)})).catch((function(){Pn(null)}))}),[In,Tn]),(0,a.useEffect)((function(){Oe.length>0?gn(!0):0===Oe.length&&null===kn&&gn(!1)}),[Oe,kn]);var $n=(0,N.F)(Tn,[E.Ft.S3_DELETE_OBJECT]),Jn=(0,N.F)(Tn,[E.Ft.S3_LIST_BUCKET]);(0,a.useEffect)((function(){rn||(p(!0),cn(!0))}),[rn,p,cn]),function(e,n){var t=(0,a.useRef)(null);(0,a.useEffect)((function(){t.current=e}),[e]),(0,a.useEffect)((function(){if(null!==n){var e=setInterval((function(){void 0!==t&&t.current&&t.current()}),n);return function(){return clearInterval(e)}}}),[n])}((function(){Q&&function(){var e=Date.now()-fe;e/1e3>=6?ge((0,I.jsx)(a.Fragment,{children:(0,I.jsxs)(y.Z,{component:"h3",children:["This operation is taking longer than expected... (",Math.ceil(e/1e3),"s)"]})})):e/1e3>=3&&ge((0,I.jsx)(y.Z,{component:"h3",children:"This operation is taking longer than expected..."}))}()}),1e3),(0,a.useEffect)((function(){Ce&&(Jn?v.Z.invoke("GET","/api/v1/buckets/".concat(Tn,"/versioning")).then((function(e){Ee(e.is_versioned),ke(!1)})).catch((function(e){u(e),ke(!1)})):ke(!1))}),[Tn,Ce,u,Jn]),(0,a.useEffect)((function(){if(s){if(c!==Tn)return void h();if(r){ce(!0);var e=r.toISOString(),n="";if(_n){var t=(0,Z.le)(_n);n=t.endsWith("/")?t:t+"/"}v.Z.invoke("GET","/api/v1/buckets/".concat(Tn,"/rewind/").concat(e).concat(n?"?prefix=".concat((0,Z.ug)(n)):"")).then((function(e){ce(!1),e.objects?ae(e.objects):ae([])})).catch((function(e){ce(!1),u(e)}))}}}),[s,r,c,Tn,t,u,h,_n]),(0,a.useEffect)((function(){ee(!0),gn(!1),T("")}),[_n,T]),(0,a.useEffect)((function(){if(Q)if(Jn){var e="";if(_n){var n=(0,Z.le)(_n);e=n.endsWith("/")?n:n+"/"}var t=Date.now();xe(t),ge(Kn);var i="/api/v1/buckets/".concat(Tn,"/objects");if(W){var a=(new Date).toISOString();i="/api/v1/buckets/".concat(Tn,"/rewind/").concat(a)}v.Z.invoke("GET","".concat(i).concat(e?"?prefix=".concat((0,Z.ug)(e)):"")).then((function(n){var t=n.objects||[],i=[],a=[];t.forEach((function(e){e.name.endsWith("/")?i.push(e):a.push(e)}));var o=[].concat(i,a);if(J(o),n.objects||""===e)ee(!1);else if(s){var c=r.toISOString(),l="";if(_n){var d=(0,Z.le)(_n);l=d.endsWith("/")?d:d+"/"}v.Z.invoke("GET","/api/v1/buckets/".concat(Tn,"/rewind/").concat(c).concat(l?"?prefix=".concat((0,Z.ug)(l)):"")).then((function(e){e.objects,ce(!1),ee(!1)})).catch((function(e){ce(!1),ee(!1),u(e)}))}else v.Z.invoke("GET","/api/v1/buckets/".concat(Tn,"/objects").concat(_n?"?prefix=".concat(_n):"")).then((function(n){if(n.objects){for(var t=e.slice(0,e.length-1),i=0;i<n.objects.length;i++)n.objects[i].name===t&&!0;1===n.objects.length&&n.objects[0].name.endsWith("/"),ee(!1)}else ee(!1)})).catch((function(e){ee(!1),u(e)}))})).catch((function(e){ee(!1),u(e)}))}else ce(!1),ee(!1)}),[Q,t,u,Tn,s,r,_n,w,W,Jn]),(0,a.useEffect)((function(){j&&v.Z.invoke("GET","/api/v1/buckets/".concat(Tn)).then((function(e){p(!1),k(e)})).catch((function(e){p(!1),u(e)}))}),[Tn,j,p,k,u]);var qn=function(e){if(null!==e&&void 0!==e&&null!==e.target.files&&void 0!==e.target.files){e.preventDefault();for(var n=[],t=0;t<e.target.files.length;t++)n.push(e.target.files[t]);Xn(n,""),e.target.value=""}},Xn=(0,a.useCallback)((function(e,n){var t="";if(_n){var i=(0,Z.le)(_n);t=i.endsWith("/")?i:i+"/"}!function(e,n,t,i){if(e.length>0){z();var a=e.pop();a&&function a(o){return new Promise((function(s,r){var c="api/v1/buckets/".concat(n,"/objects/upload"),d=o.name,u=new Blob([o],{type:o.type}),h="",p=""!==m()(o,"webkitRelativePath","")?m()(o,"webkitRelativePath",""):i;if(""!==t||""!==p){var f=p.split("/").slice(0,-1).join("/");h=(0,Z.ug)("".concat(t).concat(f).concat(f.endsWith("/")?"":"/"))}""!==h&&(c="".concat(c,"?prefix=").concat(h));var x=(0,Z.ug)("".concat(n,"-").concat(h,"-").concat((new Date).getTime(),"-").concat(Math.random()));F({bucketName:n,done:!1,instanceID:x,percentage:0,prefix:"".concat((0,Z.le)(h)).concat(d),type:"upload",waitingForFile:!1});var b=new XMLHttpRequest;b.open("POST",c,!0);var j=e.length>1,v="An error occurred while uploading the file".concat(j?"s":"","."),g="Object".concat(j?"s":""," uploaded successfully.");b.withCredentials=!1,b.onload=function(n){if(401===b.status||403===b.status||400===b.status||500===b.status)if(b.response){var t=JSON.parse(b.response);l(t.detailedMessage)}else l(v);if(413===b.status&&l("Error - File size too large"),200===b.status&&(_(x),0===e.length&&l(g)),s(b.status),e.length>0){var i=e.pop();if(i)return a(i)}},b.upload.addEventListener("error",(function(e){l(v)})),b.upload.addEventListener("progress",(function(e){var n=Math.floor(100*e.loaded/e.total);P(x,n)})),b.onerror=function(){l(v),r(v)},b.onloadend=function(){0===e.length&&ee(!0)};var y=new FormData;void 0!==o.size&&(y.append(o.size.toString(),u,d),b.send(y))}))}(a).then((function(){console.info("done uploading file")})).catch((function(e){console.error("error uploading file,",e)}))}}(e,Tn,t,n)}),[Tn,_,_n,z,F,l,P]),Qn=(0,a.useCallback)((function(e){if(e&&e.length>0){var n=e[0].path;Xn(e,n)}}),[Xn]),et=(0,b.uI)({noClick:!0,onDrop:Qn}),nt=et.getRootProps,tt=et.getInputProps,it=et.isDragActive,at=et.isDragAccept,ot=(0,a.useMemo)((function(){return(0,i.Z)((0,i.Z)((0,i.Z)({},Vn),it?Gn:{}),at?Hn:{})}),[it,at]),st=$.filter((function(e){return""===B||e.name.toLowerCase().indexOf(B.toLowerCase())>=0})),rt=(0,Z.le)(_n),ct=rt.split("/").filter((function(e){return""!==e})),lt=(s?ie:st).sort((0,O.P_)(tn)),dt=[];dt="ASC"===Xe?lt:lt.reverse();var ut=[Tn];ct.length>0&&(ut=ut.concat(ct));var mt=function(e){gn(!1),Sn(null),Be([]),A(!1),e&&ee(!0)},ht=[{type:"view",label:"View",onClick:function(e){if(Be([]),e.endsWith("/")){var n="/buckets/".concat(Tn,"/browse").concat(e?"/".concat((0,Z.ug)(e)):"");o.push(n)}else gn(!0),Sn("".concat(e?"".concat((0,Z.ug)(e)):""))},sendOnlyId:!0}],pt=[{action:function(){if(0!==Oe.length){var e=function(e){return Oe.includes(e.name)};(s?ie.filter(e):st.filter(e)).forEach((function(e){!function(e){var n=(0,Z.ug)("".concat(Tn,"-").concat(e.name,"-").concat((new Date).getTime(),"-").concat(Math.random()));F({bucketName:Tn,done:!1,instanceID:n,percentage:0,prefix:e.name,type:"download",waitingForFile:!0}),(0,O.LR)(Tn,(0,Z.ug)(e.name),e.version_id,e.size,(function(e){P(n,e)}),(function(){_(n)}))}(e)}))}},label:"Download",disabled:0===Oe.length,icon:(0,I.jsx)(S._8,{}),tooltip:"Download Selected"},{action:function(){if(1===Oe.length){var e;(e=st.find((function(e){return Oe.includes(e.name)})))&&(Ge(e),$e(!0))}},label:"Share",disabled:1!==Oe.length||!un,icon:(0,I.jsx)(S.aA,{}),tooltip:"Share Selected File"},{action:function(){if(1===Oe.length){var e;(e=st.find((function(e){return Oe.includes(e.name)})))&&(Ge(e),Ae(!0))}},label:"Preview",disabled:1!==Oe.length||!fn,icon:(0,I.jsx)(S.P9,{}),tooltip:"Preview Selected File"},{action:function(){me(!0)},label:"Delete",icon:(0,I.jsx)(Rn,{}),disabled:!(0,N.F)(Tn,[E.Ft.S3_DELETE_OBJECT])||0===Oe.length||!$n,tooltip:"Delete Selected Files"}];return(0,I.jsxs)(a.Fragment,{children:[Ye&&Ve&&(0,I.jsx)(An,{open:Ye,closeModalAndRefresh:function(){$e(!1),Ge(null)},bucketName:Tn,dataObject:{name:Ve.name,last_modified:"",version_id:Ve.version_id}}),ue&&(0,I.jsx)(zn,{deleteOpen:ue,selectedBucket:Tn,selectedObjects:Oe,closeDeleteModalAndRefresh:function(e){me(!1),e&&(l("Objects deleted successfully."),Be([]),ee(!0))},versioning:Ne}),Pe&&(0,I.jsx)(Wn,{open:Pe,closeModalAndRefresh:function(e){_e(!1)},bucketName:Tn}),ze&&(0,I.jsx)(Un,{open:ze,bucketName:Tn,object:Ve,onClosePreview:function(){Ae(!1),Ge(null)}}),(0,I.jsxs)(R.Z,{children:[(0,I.jsx)(d.ZP,{item:!0,xs:12,className:n.screenTitleContainer,children:(0,I.jsx)(L.Z,{className:n.screenTitle,icon:(0,I.jsx)("span",{className:n.listIcon,children:(0,I.jsx)(S.wN,{})}),title:(0,I.jsx)("span",{className:n.titleSpacer,children:Tn}),subTitle:(0,I.jsx)(a.Fragment,{children:(0,I.jsxs)(d.ZP,{item:!0,xs:12,className:n.bucketDetails,children:[(0,I.jsxs)("span",{className:n.detailsSpacer,children:["Created:\xa0\xa0\xa0",(0,I.jsx)("strong",{children:(null===w||void 0===w?void 0:w.creation_date)||""})]}),(0,I.jsxs)("span",{className:n.detailsSpacer,children:["Access:\xa0\xa0\xa0",(0,I.jsx)("strong",{children:(null===w||void 0===w?void 0:w.access)||""})]}),w&&(0,I.jsx)(a.Fragment,{children:(0,I.jsxs)("span",{className:n.detailsSpacer,children:[w.size&&(0,I.jsx)(a.Fragment,{children:(0,Z.l5)(w.size)}),w.size&&In&&(0,I.jsxs)(a.Fragment,{children:[" / ",(0,Z.l5)(In.quota)]}),w.size&&w.objects?" - ":"",w.objects&&(0,I.jsxs)(a.Fragment,{children:[w.objects,"\xa0Object",w.objects&&1!==w.objects?"s":""]})]})})]})}),actions:(0,I.jsxs)(a.Fragment,{children:[(0,I.jsx)(V.Z,{id:"rewind-objects-list",tooltip:"Rewind Bucket",text:"Rewind",icon:(0,I.jsx)(C.Z,{badgeContent:" ",color:"secondary",variant:"dot",invisible:!s,className:n.badgeOverlap,sx:{height:12},children:(0,I.jsx)(Ln,{})}),color:"primary",variant:"outlined",onClick:function(){_e(!0)},disabled:!Ne||!(0,N.F)(Tn,[E.Ft.S3_PUT_OBJECT])}),(0,I.jsx)(V.Z,{id:"refresh-objects-list",tooltip:"Reload List",text:"Reload",icon:(0,I.jsx)(Mn,{}),color:"primary",variant:"outlined",onClick:function(){ee(!0)},disabled:!(0,N.F)(Tn,[E.Ft.S3_LIST_BUCKET])||s}),(0,I.jsx)("input",{type:"file",multiple:!0,onChange:qn,style:{display:"none"},ref:Dn}),(0,I.jsx)("input",{type:"file",multiple:!0,onChange:qn,style:{display:"none"},ref:Yn}),(0,I.jsx)(G,{bucketName:Tn,uploadPath:ut.join("/"),uploadFileFunction:function(e){Dn&&Dn.current&&Dn.current.click(),e()},uploadFolderFunction:function(e){Yn&&Yn.current&&Yn.current.click(),e()}})]})})}),(0,I.jsx)(d.ZP,{item:!0,xs:12,children:(0,I.jsx)(D,{bucketName:Tn,internalPaths:rt,existingFiles:$||[],additionalOptions:!Ne||s?null:(0,I.jsx)("div",{children:(0,I.jsx)(Bn.Z,{name:"deleted_objects",id:"showDeletedObjects",value:"deleted_on",label:"Show deleted objects on this bucket",onChange:function(){U(!W),mt(!0)},checked:W,overrideLabelClasses:n.labelStyle,noTopMargin:!0})})})}),(0,I.jsxs)("div",(0,i.Z)((0,i.Z)({id:"object-list-wrapper"},nt({style:(0,i.Z)({},ot)})),{},{children:[(0,I.jsx)("input",(0,i.Z)({},tt())),(0,I.jsxs)(d.ZP,{item:!0,xs:12,className:n.tableBlock,children:[M?(0,I.jsx)(a.Fragment,{children:null!==kn&&(0,I.jsx)(On,{internalPaths:kn,bucketName:Tn})}):(0,I.jsx)(N.s,{scopes:[E.Ft.S3_LIST_BUCKET],resource:Tn,errorProps:{disabled:!0},children:(0,I.jsx)(g.Z,{itemActions:ht,columns:s?Fn:En,isLoading:s?re:Q,loadingMessage:ve,entityName:"Objects",idField:"name",records:dt,customPaperHeight:"".concat(n.browsePaper," ").concat(vn?"actionsPanelOpen":""),selectedItems:Oe,onSelect:function(e){var n=e.target,t=n.value,i=n.checked,a=(0,f.Z)(Oe);return i?a.push(t):a=a.filter((function(e){return e!==t})),Be(a),Sn(null),a},customEmptyMessage:"This location is empty".concat(s?"":", please try uploading a new file"),sortConfig:{currentSort:tn,currentDirection:Xe,triggerSort:function(e){var n=m()(e,"sortDirection","DESC");an(e.sortBy),Qe(n),ee(!0)}},onSelectAll:function(){if(Sn(null),Oe.length!==dt.length){var e=dt.map((function(e){return e.name}));Be(e)}else Be([])},rowStyle:function(e){var n,t=e.index;return null!==(n=dt[t])&&void 0!==n&&n.delete_flag?"deleted":""}})}),(0,I.jsx)(N.s,{scopes:[E.Ft.S3_LIST_BUCKET],resource:Tn,errorProps:{disabled:!0},children:(0,I.jsxs)(H,{open:vn,closePanel:function(){mt(!1)},children:[Oe.length>0&&(0,I.jsx)(Re,{items:pt,title:"Selected Objects:"}),null!==kn&&(0,I.jsx)(Cn,{internalPaths:kn,bucketName:Tn,onClosePanel:mt})]})})]})]}))]})]})})))),qn=t(35721),Xn=t(30723),Qn=t(23165),et=t(29316),nt={setVersionsModeEnabled:p.db,setErrorSnackMessage:B.Ih,setSearchObjects:p.G4,setSearchVersions:p.Pr},tt=(0,o.$j)((function(e){var n=e.objectBrowser,t=e.buckets;return{versionsMode:m()(n,"versionsMode",!1),bucketToRewind:m()(n,"rewind.bucketToRewind",""),bucketInfo:t.bucketDetails.bucketInfo,searchObjects:n.searchObjects,versionedFile:n.versionedFile,searchVersions:n.searchVersions}}),nt),it=(0,r.Z)((function(e){return(0,s.Z)((0,i.Z)({breadcrumLink:{textDecoration:"none",color:"black"},backToBuckets:{color:"#000",fontSize:14,padding:0,marginTop:-8}},(0,h.Bz)(e.spacing(4))))}))(tt((function(e){var n=e.versionsMode,t=e.match,i=e.history,o=e.classes,s=e.setVersionsModeEnabled,r=e.searchObjects,u=e.setSearchObjects,h=e.setSearchVersions,p=e.versionedFile,f=e.searchVersions,x=t.params.bucketName,b=m()(t.params,"subpaths","");(0,a.useEffect)((function(){s(!1)}),[b,s]);return(0,I.jsxs)(a.Fragment,{children:[(0,I.jsx)(qn.Z,{label:(0,I.jsx)(et.Z,{label:"Back to Buckets",to:"/buckets",className:o.backToBuckets}),actions:(0,I.jsx)(N.s,{scopes:E.D[E.EI.BUCKET_ADMIN],resource:x,errorProps:{disabled:!0},children:(0,I.jsx)(c.Z,{title:"Configure Bucket",children:(0,I.jsx)(l.Z,{color:"primary","aria-label":"Configure Bucket",component:"span",onClick:function(){i.push("/buckets/".concat(x,"/admin"))},size:"large",children:(0,I.jsx)(Xn.Z,{})})})}),middleComponent:(0,I.jsx)(a.Fragment,{children:n?(0,I.jsx)(a.Fragment,{children:(0,I.jsx)(Qn.Z,{placeholder:"Start typing to filter versions of ".concat(p),onChange:function(e){h(e)},value:f})}):(0,I.jsx)(N.s,{scopes:[E.Ft.S3_LIST_BUCKET],resource:x,errorProps:{disabled:!0},children:(0,I.jsx)(Qn.Z,{placeholder:"Start typing to filter objects in the bucket",onChange:function(e){u(e)},value:r})})})}),(0,I.jsx)(d.ZP,{children:(0,I.jsx)(Jn,{})})]})})))},53224:function(e,n,t){var i=t(18489),a=t(83738),o=(t(50390),t(70758)),s=t(62449),r=t(62559),c=["onClick","text","disabled","tooltip","icon"],l=(0,s.Z)((function(e){return{root:{padding:"7px",color:function(n){return function(n){var t=n.variant,i=n.color,a=e.palette.primary.main;return"primary"===i&&"contained"===t?a=e.palette.primary.contrastText:"primary"===i&&"outlined"===t?a=e.palette.primary.main:"secondary"===i&&(a=e.palette.secondary.main),a}(n)},borderColor:function(n){return"secondary"===n.color?e.palette.secondary.main:e.palette.primary.main},"& svg.min-icon":{width:12,marginLeft:function(e){return e.text?"5px":"0px"},"@media (max-width: 900px)":{width:16,marginLeft:"0px !important"}}}}}));n.Z=function(e){var n=l(e),t=e.onClick,s=e.text,d=void 0===s?"":s,u=e.disabled,m=void 0!==u&&u,h=e.tooltip,p=e.icon,f=void 0===p?null:p,x=(0,a.Z)(e,c);return(0,r.jsxs)(o.Z,(0,i.Z)((0,i.Z)({classes:n,tooltip:h||d,variant:"outlined",onClick:t,disabled:m,color:"secondary",size:"medium",sx:{border:"1px solid #f44336","& span":{fontSize:14,"@media (max-width: 900px)":{display:"none"}}}},x),{},{children:[(0,r.jsx)("span",{children:d})," ",f]}))}},79440:function(e,n,t){t.r(n),t.d(n,{default:function(){return I}});var i=t(23430),a=t(18489),o=t(50390),s=t(38342),r=t.n(s),c=t(34424),l=t(86509),d=t(4285),u=t(33034),m=t.n(u),h=t(25594),p=t(66946),f=t(81378),x=t(72462),b=t(44149),j=t(30324),v=t(51002),g=t(50280),Z=t(36554),y=t(60606),C=t.n(y),k=t(66964),S=t(62559),w=(0,d.Z)((function(e){return(0,l.Z)((0,a.Z)((0,a.Z)((0,a.Z)({},x.YI),x.Hr),{},{labelContainer:{display:"flex",alignItems:"center",marginBottom:15},fieldContainer:(0,a.Z)((0,a.Z)({},x.YI.fieldContainer),{},{display:"flex",alignItems:"center",justifyContent:"space-between",paddingBottom:10,marginTop:11,marginBottom:6}),dateContainer:{height:20,textAlign:"right",color:"#848484"},dateInputContainer:{margin:"0 10px"},durationInputs:{display:"flex",alignItems:"center",justifyContent:"center"},validityIndicator:{display:"flex",alignItems:"center",justifyContent:"center"},invalidDurationText:{marginTop:15,display:"flex",color:"red",fontSize:11},validityText:{fontSize:14,fontWeight:600,marginTop:15,display:"flex",alignItems:"center",justifyContent:"center","@media (max-width: 900px)":{flexFlow:"column"}}}))}))((function(e){var n=e.classes,t=e.id,a=e.initialDate,s=e.label,r=e.maxDays,c=e.entity,l=e.onChange,d=(0,o.useState)(7),u=(0,i.Z)(d,2),m=u[0],p=u[1],f=(0,o.useState)(0),x=(0,i.Z)(f,2),b=x[0],j=x[1],v=(0,o.useState)(0),g=(0,i.Z)(v,2),y=g[0],w=g[1],N=(0,o.useState)(!0),E=(0,i.Z)(N,2),F=E[0],I=E[1],P=(0,o.useState)(C()()),_=(0,i.Z)(P,2),T=_[0],D=_[1];(0,o.useEffect)((function(){D(function(e,n,t,i){return C()(e).add(n,"days").add(t,"hours").add(i,"minutes")}(a,m,b,y))}),[a,m,b,y]),(0,o.useEffect)((function(){F?l(T.format("YYYY-MM-DDTHH:mm:ss"),!0):l("0000-00-00",!1)}),[T,l,F]),(0,o.useEffect)((function(){var e=!0;(m<0||r&&m>r||isNaN(m))&&(e=!1),(b<0||b>23||isNaN(b))&&(e=!1),(y<0||y>59||isNaN(y))&&(e=!1),!r||m!==r||0===b&&0===y||(e=!1),I(e)}),[T,r,l,m,b,y]);var O={style:{textAlign:"center",paddingRight:10,paddingLeft:10,width:25},className:"removeArrows"};return(0,S.jsx)(o.Fragment,{children:(0,S.jsxs)(h.ZP,{container:!0,className:n.fieldContainer,children:[(0,S.jsxs)(h.ZP,{item:!0,xs:12,alignItems:"center",justifyContent:"center",children:[(0,S.jsx)(h.ZP,{item:!0,xs:12,className:n.labelContainer,children:(0,S.jsx)(Z.Z,{htmlFor:t,className:n.inputLabel,children:(0,S.jsx)("span",{children:s})})}),(0,S.jsxs)(h.ZP,{item:!0,xs:12,className:n.durationInputs,children:[(0,S.jsx)(h.ZP,{item:!0,className:n.dateInputContainer,children:(0,S.jsx)(k.Z,{id:t,type:"number",min:"0",max:r?r.toString():"999",label:"Days",name:t,onChange:function(e){p(parseInt(e.target.value))},value:m.toString(),extraInputProps:O,noLabelMinWidth:!0})}),(0,S.jsx)(h.ZP,{item:!0,className:n.dateInputContainer,children:(0,S.jsx)(k.Z,{id:t,type:"number",min:"0",max:"23",label:"Hours",name:t,onChange:function(e){j(parseInt(e.target.value))},value:b.toString(),extraInputProps:O,noLabelMinWidth:!0})}),(0,S.jsx)(h.ZP,{item:!0,className:n.dateInputContainer,children:(0,S.jsx)(k.Z,{id:t,type:"number",min:"0",max:"59",label:"Minutes",name:t,onChange:function(e){w(parseInt(e.target.value))},value:y.toString(),extraInputProps:O,noLabelMinWidth:!0})})]})]}),(0,S.jsx)(h.ZP,{item:!0,xs:12,className:"".concat(n.validityIndicator," ").concat(n.formFieldRow),children:F?(0,S.jsxs)("div",{className:n.validityText,children:[(0,S.jsxs)("div",{className:n.validityLabel,children:[c," will be available until:"]})," ",(0,S.jsx)("div",{className:n.validTill,children:T.format("MM/DD/YYYY HH:mm:ss")})]}):(0,S.jsx)("div",{className:n.invalidDurationText,children:"Please select a valid duration."})})]})})})),N=t(28948),E=o.lazy((function(){return Promise.resolve().then(t.bind(t,24957))})),F=(0,c.$j)((function(e){var n=e.system;return{distributedSetup:r()(n,"distributedSetup",!1)}}),{setModalSnackMessage:b.MK,setModalErrorSnackMessage:b.zb}),I=(0,d.Z)((function(e){return(0,l.Z)((0,a.Z)((0,a.Z)({shareLinkInfo:{fontSize:13,fontWeight:400},copyShareLink:{display:"flex","@media (max-width: 900px)":{flexFlow:"column",alignItems:"center",justifyContent:"center"}},copyShareLinkInput:{"& div:first-child":{marginTop:0},"@media (max-width: 900px)":{minWidth:250}},copyShareLinkBtn:{display:"flex",alignItems:"center",justifyContent:"center","@media (max-width: 900px)":{marginTop:10}}},x.ID),x.DF))}))(F((function(e){var n=e.classes,t=e.open,a=e.closeModalAndRefresh,s=e.bucketName,c=e.dataObject,l=e.distributedSetup,d=e.setModalSnackMessage,u=e.setModalErrorSnackMessage,x=(0,o.useState)(""),b=(0,i.Z)(x,2),Z=b[0],y=b[1],C=(0,o.useState)(!0),k=(0,i.Z)(C,2),F=k[0],I=k[1],P=(0,o.useState)(!1),_=(0,i.Z)(P,2),T=_[0],D=_[1],O=(0,o.useState)(""),B=(0,i.Z)(O,2),L=B[0],M=B[1],R=(0,o.useState)(!0),z=(0,i.Z)(R,2),A=z[0],W=z[1],U=(0,o.useState)("null"),V=(0,i.Z)(U,2),G=V[0],H=V[1],K=new Date;return(0,o.useEffect)((function(){if(void 0===c.version_id)return l?(j.Z.invoke("GET","/api/v1/buckets/".concat(s,"/objects?prefix=").concat((0,N.ug)(c.name)).concat(l?"&with_versions=true":"")).then((function(e){var n=r()(e,"objects",[]).find((function(e){return e.is_latest}));H(n?n.version_id:"null")})).catch((function(e){u(e)})),void I(!1)):(H("null"),void I(!1));H(c.version_id||"null"),I(!1)}),[s,c,l,u]),(0,o.useEffect)((function(){if(A&&!F){D(!0),y("");var e=new Date("".concat(L)),n=new Date,t=Math.ceil((e.getTime()-n.getTime())/1e3);t>0&&j.Z.invoke("GET","/api/v1/buckets/".concat(s,"/objects/share?prefix=").concat((0,N.ug)(c.name),"&version_id=").concat(G).concat(""!==L?"&expires=".concat(t,"s"):"")).then((function(e){y(e),D(!1)})).catch((function(e){u(e),y(""),D(!1)}))}}),[c,L,s,A,y,u,l,F,G]),(0,S.jsx)(o.Fragment,{children:(0,S.jsxs)(v.Z,{title:"Share File",modalOpen:t,onClose:function(){a()},children:[F&&(0,S.jsx)(h.ZP,{item:!0,xs:12,children:(0,S.jsx)(f.Z,{})}),!F&&(0,S.jsxs)(o.Fragment,{children:[(0,S.jsxs)(h.ZP,{item:!0,xs:12,className:n.shareLinkInfo,children:["This is a temporary URL with integrated access credentials for sharing objects valid for up to 7 days.",(0,S.jsx)("br",{}),"The temporary URL expires after the configured time limit."]}),(0,S.jsx)(h.ZP,{item:!0,xs:12,className:n.dateContainer,children:(0,S.jsx)(w,{initialDate:K,id:"date",label:"Active for",maxDays:7,onChange:function(e,n){W(n),n?M(e):(M(""),y(""))},entity:"Link"})}),(0,S.jsxs)(h.ZP,{item:!0,xs:12,className:"".concat(n.copyShareLink," ").concat(n.formFieldRow," "),children:[(0,S.jsx)(h.ZP,{item:!0,xs:10,className:n.copyShareLinkInput,children:(0,S.jsx)(g.Z,{content:Z})}),(0,S.jsx)(h.ZP,{item:!0,xs:2,className:n.copyShareLinkBtn,children:(0,S.jsx)(m(),{text:Z,children:(0,S.jsx)(p.Z,{variant:"contained",color:"primary",endIcon:(0,S.jsx)(E,{}),onClick:function(){d("Share URL Copied to clipboard")},disabled:""===Z||T,children:"Copy"})})})]})]})]})})})))},57767:function(e,n,t){t.r(n),t.d(n,{default:function(){return b}});var i=t(50390),a=t(51002),o=t(36222),s=t(23430),r=t(86509),c=t(4285),l=t(25594),d=t(81378),u=t(3662),m=t(28948),h=t(44977),p=t(62559),f=(0,c.Z)((function(){return(0,r.Z)({iframeContainer:{border:"0px",flex:"1 1 auto",width:"100%",height:250,backgroundColor:"transparent",borderRadius:5,"&.image":{height:500},"&.text":{height:700},"&.audio":{height:150},"&.video":{height:350},"&.fullHeight":{height:"calc(100vh - 185px)"}},iframeBase:{backgroundColor:"#fff"},iframeHidden:{display:"none"}})}))((function(e){var n=e.bucketName,t=e.object,a=e.isFullscreen,r=void 0!==a&&a,c=e.classes,f=(0,i.useState)(!0),x=(0,s.Z)(f,2),b=x[0],j=x[1],v="";if(t){var g=(0,m.ug)(t.name),Z=document.baseURI.replace(window.location.origin,"");v="".concat(window.location.origin).concat(Z,"api/v1/buckets/").concat(n,"/objects/download?preview=true&prefix=").concat(g),t.version_id&&(v=v.concat("&version_id=".concat(t.version_id)))}var y=(0,u.Bg)((null===t||void 0===t?void 0:t.name)||""),C=function(){j(!1)};return(0,p.jsxs)(i.Fragment,{children:[b&&(0,p.jsx)(l.ZP,{item:!0,xs:12,children:(0,p.jsx)(d.Z,{})}),"video"===y&&(0,p.jsx)("video",{style:{width:"100%",height:"auto"},autoPlay:!0,controls:!0,muted:!1,playsInline:!0,onPlay:C,children:(0,p.jsx)("source",{src:v,type:"video/mp4"})}),"audio"===y&&(0,p.jsx)("audio",{style:{width:"100%",height:"auto"},autoPlay:!0,controls:!0,muted:!1,playsInline:!0,onPlay:C,children:(0,p.jsx)("source",{src:v,type:"audio/mpeg"})}),"image"===y&&(0,p.jsx)("img",{style:{width:"100%",height:"auto"},src:v,alt:"preview",onLoad:C}),"video"!==y&&"audio"!==y&&"image"!==y&&(0,p.jsx)("div",{className:(0,h.Z)(c.iframeBase,(0,o.Z)({},c.iframeHidden,b)),children:(0,p.jsx)("iframe",{src:v,title:"File Preview",allowTransparency:!0,className:"".concat(c.iframeContainer," ").concat(r?"fullHeight":y),onLoad:C,children:"File couldn't be loaded. Please try Download instead"})})]})})),x=t(86362),b=function(e){var n=e.open,t=e.bucketName,o=e.object,s=e.onClosePreview;return(0,p.jsx)(i.Fragment,{children:(0,p.jsx)(a.Z,{modalOpen:n,title:"Preview - ".concat(null===o||void 0===o?void 0:o.name),onClose:s,wideLimit:!1,titleIcon:(0,p.jsx)(x.$3,{}),children:(0,p.jsx)(f,{bucketName:t,object:o})})})}},3662:function(e,n,t){t.d(n,{LR:function(){return i},Bg:function(){return a},P_:function(){return o}});var i=function(e,n,t,i,a,o){var s=document.createElement("a");document.body.appendChild(s);var r="/api/v1/buckets/".concat(e,"/objects/download?prefix=").concat(n);t&&(r=r.concat("&version_id=".concat(t)));var c=new XMLHttpRequest;c.open("GET",r,!0),c.addEventListener("progress",(function(e){var n=Math.round(e.loaded/i*100);a&&a(n)}),!1),c.responseType="blob",c.onreadystatechange=function(){if(4===c.readyState&&200===c.status){var e=c.getResponseHeader("Content-Disposition"),n="download";if(e)n=decodeURIComponent(e).split('"')[1];o&&o();var t=document.createElement("a");t.href=window.URL.createObjectURL(c.response),t.download=n,document.body.appendChild(t),t.click(),document.body.removeChild(t)}},c.send()},a=function(e){var n=e.split(".").pop();return n?(n=n.toLowerCase(),["jif","jfif","apng","avif","svg","webp","bmp","ico","jpg","jpe","jpeg","gif","png","heic"].includes(n)?"image":["pdf","txt","json"].includes(n)?"text":["wav","mp3","alac","aiff","dsd","pcm"].includes(n)?"audio":["mp4","avi","mpg","webm","mov","flv","mkv","wmv","avchd","mpeg-4"].includes(n)?"video":"none"):"none"},o=function(e){switch(e){case"name":return function(e,n){return e.name.localeCompare(n.name)};case"last_modified":return function(e,n){return new Date(e.last_modified).getTime()-new Date(n.last_modified).getTime()};case"size":return function(e,n){return(e.size||-1)-(n.size||-1)}}}},70758:function(e,n,t){var i=t(18489),a=t(36222),o=t(83738),s=(t(50390),t(86509)),r=t(4285),c=t(95467),l=t(94187),d=t(44977),u=t(62559),m=["classes","children","variant","tooltip"];n.Z=(0,r.Z)((function(e){return(0,s.Z)({root:{padding:8,marginLeft:8,borderWidth:1,borderColor:"#696969",color:"#696969",borderStyle:"solid",borderRadius:3,"& .min-icon":{width:20},"& .MuiTouchRipple-root span":{backgroundColor:e.palette.primary.main,borderRadius:3,opacity:.3},"&:disabled":{color:"#EBEBEB",borderColor:"#EBEBEB"}},contained:{borderColor:e.palette.primary.main,background:e.palette.primary.main,color:"white","& .MuiTouchRipple-root span":{backgroundColor:e.palette.primary.dark,borderRadius:3,opacity:.3},"&:hover":{backgroundColor:e.palette.primary.light,color:"#FFF"}}})}))((function(e){var n=e.classes,t=e.children,s=e.variant,r=void 0===s?"outlined":s,h=e.tooltip,p=(0,o.Z)(e,m),f=(0,u.jsx)(c.Z,(0,i.Z)((0,i.Z)({},p),{},{className:(0,d.Z)(n.root,(0,a.Z)({},n.contained,"contained"===r)),children:t}));return h&&""!==h?(0,u.jsx)(l.Z,{title:h,children:(0,u.jsx)("span",{children:f})}):f}))},37882:function(e,n,t){var i=t(18489),a=t(50390),o=t(62559);n.Z=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;function t(t){return(0,o.jsx)(a.Suspense,{fallback:n,children:(0,o.jsx)(e,(0,i.Z)({},t))})}return t}},92440:function(e,n,t){var i=t(36222),a=t(18489),o=t(50390),s=t(86509),r=t(4285),c=t(49056),l=t(36554),d=t(94187),u=t(35477),m=t(25594),h=t(72462),p=t(97538),f=t(44977),x=t(62559),b=(0,r.Z)((function(e){return{root:{width:50,height:24,padding:0,margin:0},switchBase:{padding:1,"&$checked":{transform:"translateX(24px)",color:e.palette.common.white,"& + $track":{backgroundColor:"#4CCB92",boxShadow:"inset 0px 1px 4px rgba(0,0,0,0.1)",opacity:1,border:"none"}},"&$focusVisible $thumb":{color:"#4CCB92",border:"6px solid #fff"}},thumb:{width:22,height:22,backgroundColor:"#FAFAFA",border:"2px solid #FFFFFF",marginLeft:1},track:{borderRadius:12,backgroundColor:"#E2E2E2",boxShadow:"inset 0px 1px 4px rgba(0,0,0,0.1)",opacity:1,transition:e.transitions.create(["background-color","border"])},checked:{},focusVisible:{},switchContainer:{display:"flex",alignItems:"center",justifyContent:"flex-end"}}}))(c.Z);n.Z=(0,r.Z)((function(e){return(0,s.Z)((0,a.Z)((0,a.Z)({divContainer:{marginBottom:20},indicatorLabelOn:{fontWeight:"bold",color:"#081C42 !important"},indicatorLabel:{fontSize:12,color:"#E2E2E2",margin:"0 8px 0 10px"},fieldDescription:{marginTop:4,color:"#999999"},tooltip:{fontSize:16}},h.OR),h.YI))}))((function(e){var n=e.label,t=void 0===n?"":n,s=e.onChange,r=e.value,c=e.id,h=e.name,j=e.checked,v=void 0!==j&&j,g=e.disabled,Z=void 0!==g&&g,y=e.switchOnly,C=void 0!==y&&y,k=e.tooltip,S=void 0===k?"":k,w=e.description,N=void 0===w?"":w,E=e.classes,F=e.indicatorLabels,I=e.extraInputProps,P=void 0===I?{}:I,_=(0,x.jsxs)(o.Fragment,{children:[!C&&(0,x.jsx)("span",{className:(0,f.Z)(E.indicatorLabel,(0,i.Z)({},E.indicatorLabelOn,!v)),children:F&&F.length>1?F[1]:"OFF"}),(0,x.jsx)(b,{checked:v,onChange:s,color:"primary",name:h,inputProps:(0,a.Z)({"aria-label":"primary checkbox"},P),disabled:Z,disableRipple:!0,disableFocusRipple:!0,disableTouchRipple:!0,value:r,id:c}),!C&&(0,x.jsx)("span",{className:(0,f.Z)(E.indicatorLabel,(0,i.Z)({},E.indicatorLabelOn,v)),children:F?F[0]:"ON"})]});return C?_:(0,x.jsx)("div",{className:E.divContainer,children:(0,x.jsxs)(m.ZP,{container:!0,alignItems:"center",children:[(0,x.jsx)(m.ZP,{item:!0,xs:!0,children:(0,x.jsxs)(m.ZP,{container:!0,children:[(0,x.jsx)(m.ZP,{item:!0,xs:12,sm:""!==N?4:10,md:""!==N?3:9,children:""!==t&&(0,x.jsxs)(l.Z,{htmlFor:c,className:E.inputLabel,children:[(0,x.jsx)("span",{children:t}),""!==S&&(0,x.jsx)("div",{className:E.tooltipContainer,children:(0,x.jsx)(d.Z,{title:S,placement:"top-start",children:(0,x.jsx)("div",{className:E.tooltip,children:(0,x.jsx)(p.Z,{})})})})]})}),(0,x.jsx)(m.ZP,{item:!0,xs:12,sm:!0,textAlign:"left",children:""!==N&&(0,x.jsx)(u.Z,{component:"p",className:E.fieldDescription,children:N})})]})}),(0,x.jsx)(m.ZP,{item:!0,xs:12,sm:2,textAlign:"right",className:E.switchContainer,children:_})]})})}))},66964:function(e,n,t){var i=t(18489),a=t(50390),o=t(12066),s=t(25594),r=t(36554),c=t(94187),l=t(95467),d=t(86509),u=t(62449),m=t(4285),h=t(72462),p=t(97538),f=t(44977),x=t(62559),b=(0,u.Z)((function(e){return(0,d.Z)((0,i.Z)({},h.gM))}));function j(e){var n=b();return(0,x.jsx)(o.Z,(0,i.Z)({InputProps:{classes:n}},e))}n.Z=(0,m.Z)((function(e){return(0,d.Z)((0,i.Z)((0,i.Z)((0,i.Z)({},h.YI),h.Hr),{},{textBoxContainer:{flexGrow:1,position:"relative"},overlayAction:{position:"absolute",right:5,top:6,"& svg":{maxWidth:15,maxHeight:15},"&.withLabel":{top:5}},inputLabel:(0,i.Z)((0,i.Z)({},h.YI.inputLabel),{},{fontWeight:"normal"})}))}))((function(e){var n=e.label,t=e.onChange,o=e.value,d=e.id,u=e.name,m=e.type,h=void 0===m?"text":m,b=e.autoComplete,v=void 0===b?"off":b,g=e.disabled,Z=void 0!==g&&g,y=e.multiline,C=void 0!==y&&y,k=e.tooltip,S=void 0===k?"":k,w=e.index,N=void 0===w?0:w,E=e.error,F=void 0===E?"":E,I=e.required,P=void 0!==I&&I,_=e.placeholder,T=void 0===_?"":_,D=e.min,O=e.max,B=e.overlayId,L=e.overlayIcon,M=void 0===L?null:L,R=e.overlayObject,z=void 0===R?null:R,A=e.extraInputProps,W=void 0===A?{}:A,U=e.overlayAction,V=e.noLabelMinWidth,G=void 0!==V&&V,H=e.pattern,K=void 0===H?"":H,Y=e.autoFocus,$=void 0!==Y&&Y,J=e.classes,q=e.className,X=void 0===q?"":q,Q=e.onKeyPress,ee=(0,i.Z)({"data-index":N},W);return"number"===h&&D&&(ee.min=D),"number"===h&&O&&(ee.max=O),""!==K&&(ee.pattern=K),(0,x.jsx)(a.Fragment,{children:(0,x.jsxs)(s.ZP,{container:!0,className:(0,f.Z)(""!==X?X:"",""!==F?J.errorInField:J.inputBoxContainer),children:[""!==n&&(0,x.jsxs)(r.Z,{htmlFor:d,className:G?J.noMinWidthLabel:J.inputLabel,children:[(0,x.jsxs)("span",{children:[n,P?"*":""]}),""!==S&&(0,x.jsx)("div",{className:J.tooltipContainer,children:(0,x.jsx)(c.Z,{title:S,placement:"top-start",children:(0,x.jsx)("div",{className:J.tooltip,children:(0,x.jsx)(p.Z,{})})})})]}),(0,x.jsxs)("div",{className:J.textBoxContainer,children:[(0,x.jsx)(j,{id:d,name:u,fullWidth:!0,value:o,autoFocus:$,disabled:Z,onChange:t,type:h,multiline:C,autoComplete:v,inputProps:ee,error:""!==F,helperText:F,placeholder:T,className:J.inputRebase,onKeyPress:Q}),M&&(0,x.jsx)("div",{className:"".concat(J.overlayAction," ").concat(""!==n?"withLabel":""),children:(0,x.jsx)(l.Z,{onClick:U?function(){U()}:function(){return null},id:B,size:"small",disableFocusRipple:!1,disableRipple:!1,disableTouchRipple:!1,children:M})}),z&&(0,x.jsx)("div",{className:"".concat(J.overlayAction," ").concat(""!==n?"withLabel":""),children:z})]})]})})}))},50280:function(e,n,t){var i=t(18489),a=t(50390),o=t(25594),s=t(86509),r=t(4285),c=t(72462),l=t(62559);n.Z=(0,r.Z)((function(e){return(0,s.Z)((0,i.Z)({},c.xx))}))((function(e){var n=e.classes,t=e.label,i=void 0===t?"":t,s=e.content,r=e.multiLine,c=void 0!==r&&r;return(0,l.jsx)(a.Fragment,{children:(0,l.jsxs)(o.ZP,{className:n.prefinedContainer,children:[""!==i&&(0,l.jsx)(o.ZP,{item:!0,xs:12,className:n.predefinedTitle,children:i}),(0,l.jsx)(o.ZP,{item:!0,xs:12,className:n.predefinedList,children:(0,l.jsx)(o.ZP,{item:!0,xs:12,className:c?n.innerContentMultiline:n.innerContent,children:s})})]})})}))},27207:function(e,n,t){var i=t(36222),a=t(18489),o=(t(50390),t(44977)),s=t(25594),r=t(82420),c=t(66695),l=t(98893),d=t(36554),u=t(94187),m=t(86509),h=t(4285),p=t(62449),f=t(72462),x=t(97538),b=t(62559),j=(0,p.Z)((0,a.Z)({root:{"&:hover":{backgroundColor:"transparent"}}},f.FU)),v=function(e){var n=j();return(0,b.jsx)(l.Z,(0,a.Z)({className:n.root,disableRipple:!0,color:"default",checkedIcon:(0,b.jsx)("span",{className:n.radioSelectedIcon}),icon:(0,b.jsx)("span",{className:n.radioUnselectedIcon})},e))};n.Z=(0,h.Z)((function(e){return(0,m.Z)((0,a.Z)((0,a.Z)((0,a.Z)({},f.YI),f.Hr),{},{optionLabel:{"&.Mui-disabled":{"& .MuiFormControlLabel-label":{color:"#9c9c9c"}},"&:last-child":{marginRight:0},"& .MuiFormControlLabel-label":{fontSize:12,color:"#07193E"}},checkedOption:{"& .MuiFormControlLabel-label":{fontSize:12,color:"#07193E",fontWeight:700}}}))}))((function(e){var n=e.selectorOptions,t=void 0===n?[]:n,a=e.currentSelection,l=e.label,m=e.id,h=e.name,p=e.onChange,f=e.tooltip,j=void 0===f?"":f,g=e.disableOptions,Z=void 0!==g&&g,y=e.classes,C=e.displayInColumn,k=void 0!==C&&C;return(0,b.jsxs)(s.ZP,{container:!0,alignItems:"center",children:[(0,b.jsx)(s.ZP,{item:!0,xs:!0,children:(0,b.jsxs)(d.Z,{htmlFor:m,className:y.inputLabel,children:[(0,b.jsx)("span",{children:l}),""!==j&&(0,b.jsx)("div",{className:y.tooltipContainer,children:(0,b.jsx)(u.Z,{title:j,placement:"top-start",children:(0,b.jsx)("div",{children:(0,b.jsx)(x.Z,{})})})})]})}),(0,b.jsx)(s.ZP,{item:!0,xs:!0,className:y.radioOptionsLayout,children:(0,b.jsx)(r.Z,{"aria-label":m,id:m,name:h,value:a,onChange:p,row:!k,style:{display:"block",textAlign:"right"},children:t.map((function(e){return(0,b.jsx)(c.Z,{value:e.value,control:(0,b.jsx)(v,{}),label:e.label,disabled:Z,className:(0,o.Z)(y.optionLabel,(0,i.Z)({},y.checkedOption,e.value===a))},"rd-".concat(h,"-").concat(e.value))}))})})]})}))},67754:function(e,n,t){var i=t(18489),a=t(50390),o=t(25594),s=t(46413),r=t(36554),c=t(94187),l=t(47554),d=t(43965),u=t(31680),m=t(86509),h=t(4285),p=t(72462),f=t(97538),x=t(62559),b=(0,h.Z)((function(e){return(0,m.Z)({root:{height:38,lineHeight:1,"label + &":{marginTop:e.spacing(3)}},input:{height:38,position:"relative",color:"#07193E",fontSize:13,fontWeight:600,padding:"8px 20px 10px 10px",border:"#e5e5e5 1px solid",borderRadius:4,display:"flex",alignItems:"center","&:hover":{borderColor:"#393939"},"&:focus":{backgroundColor:"#fff"}}})}))(s.ZP);n.Z=(0,h.Z)((function(e){return(0,m.Z)((0,i.Z)((0,i.Z)((0,i.Z)({},p.YI),p.Hr),{},{inputLabel:(0,i.Z)((0,i.Z)({},p.YI.inputLabel),{},{"& span":{fontWeight:"normal"}}),fieldContainer:{display:"flex","@media (max-width: 600px)":{flexFlow:"column"}}}))}))((function(e){var n=e.classes,t=e.id,i=e.name,s=e.onChange,m=e.options,h=e.label,p=e.tooltip,j=void 0===p?"":p,v=e.value,g=e.disabled,Z=void 0!==g&&g;return(0,x.jsx)(a.Fragment,{children:(0,x.jsxs)(o.ZP,{item:!0,xs:12,className:n.fieldContainer,children:[""!==h&&(0,x.jsxs)(r.Z,{htmlFor:t,className:n.inputLabel,children:[(0,x.jsx)("span",{children:h}),""!==j&&(0,x.jsx)("div",{className:n.tooltipContainer,children:(0,x.jsx)(c.Z,{title:j,placement:"top-start",children:(0,x.jsx)("div",{className:n.tooltip,children:(0,x.jsx)(f.Z,{})})})})]}),(0,x.jsx)(l.Z,{fullWidth:!0,children:(0,x.jsx)(d.Z,{id:t,name:i,value:v,onChange:s,input:(0,x.jsx)(b,{}),disabled:Z,children:m.map((function(e){return(0,x.jsx)(u.Z,{value:e.value,children:e.label},"select-".concat(i,"-").concat(e.label))}))})})]})})}))},21639:function(e,n,t){var i=t(23430),a=t(50390),o=t(30324);n.Z=function(e,n){var t=(0,a.useState)(!1),s=(0,i.Z)(t,2),r=s[0],c=s[1];return[r,function(t,i,a){c(!0),o.Z.invoke(t,i,a).then((function(n){c(!1),e(n)})).catch((function(e){c(!1),n(e)}))}]}},60656:function(e,n,t){var i=t(18489),a=t(50390),o=t(84402),s=t(78426),r=t(93085),c=t(7887),l=t(66946),d=t(7521),u=t(95467),m=t(21278),h=t(86509),p=t(4285),f=t(72462),x=t(62559);n.Z=(0,p.Z)((function(e){return(0,h.Z)((0,i.Z)({},f.Qw))}))((function(e){var n=e.isOpen,t=void 0!==n&&n,h=e.onClose,p=e.onCancel,f=e.onConfirm,b=e.classes,j=void 0===b?{}:b,v=e.title,g=void 0===v?"":v,Z=e.isLoading,y=e.confirmationContent,C=e.cancelText,k=void 0===C?"Cancel":C,S=e.confirmText,w=void 0===S?"Confirm":S,N=e.confirmButtonProps,E=void 0===N?{}:N,F=e.cancelButtonProps,I=void 0===F?{}:F,P=e.titleIcon,_=void 0===P?null:P;return(0,x.jsxs)(o.Z,{open:t,onClose:function(e,n){"backdropClick"!==n&&h()},className:j.root,sx:{"& .MuiPaper-root":{padding:"1rem 2rem 2rem 1rem"}},children:[(0,x.jsxs)(s.Z,{className:j.title,children:[(0,x.jsxs)("div",{className:j.titleText,children:[_," ",g]}),(0,x.jsx)("div",{className:j.closeContainer,children:(0,x.jsx)(u.Z,{"aria-label":"close",className:j.closeButton,onClick:h,disableRipple:!0,size:"small",children:(0,x.jsx)(m.Z,{})})})]}),(0,x.jsx)(r.Z,{className:j.content,children:y}),(0,x.jsxs)(c.Z,{className:j.actions,children:[(0,x.jsx)(l.Z,(0,i.Z)((0,i.Z)({className:j.cancelButton,onClick:p||h,disabled:Z,type:"button"},I),{},{variant:"outlined",color:"primary",id:"confirm-cancel",children:k})),(0,x.jsx)(d.Z,(0,i.Z)((0,i.Z)({className:j.confirmButton,type:"button",onClick:f,loading:Z,disabled:Z,variant:"outlined",color:"secondary",loadingPosition:"start",startIcon:(0,x.jsx)(a.Fragment,{}),autoFocus:!0,id:"confirm-ok"},E),{},{children:w}))]})]})}))},51002:function(e,n,t){var i=t(23430),a=t(18489),o=t(50390),s=t(34424),r=t(95467),c=t(97771),l=t(84402),d=t(78426),u=t(93085),m=t(86509),h=t(4285),p=t(72462),f=t(44149),x=t(21278),b=t(45980),j=t(62559),v=(0,s.$j)((function(e){return{modalSnackMessage:e.system.modalSnackBar}}),{setModalSnackMessage:f.MK});n.Z=(0,h.Z)((function(e){return(0,m.Z)((0,a.Z)((0,a.Z)({},p.Qw),{},{root:{"& .MuiPaper-root":{padding:"0 2rem 2rem 1rem"}},content:{padding:25,paddingBottom:0},customDialogSize:{width:"100%",maxWidth:765}},p.sN))}))(v((function(e){var n=e.onClose,t=e.modalOpen,s=e.title,m=e.children,h=e.classes,p=e.wideLimit,f=void 0===p||p,v=e.modalSnackMessage,g=e.noContentPadding,Z=e.setModalSnackMessage,y=e.titleIcon,C=void 0===y?null:y,k=(0,o.useState)(!1),S=(0,i.Z)(k,2),w=S[0],N=S[1];(0,o.useEffect)((function(){Z("")}),[Z]),(0,o.useEffect)((function(){if(v){if(""===v.message)return void N(!1);"error"!==v.type&&N(!0)}}),[v]);var E=f?{classes:{paper:h.customDialogSize}}:{maxWidth:"lg",fullWidth:!0},F="";return v&&(F=v.detailedErrorMsg,(""===v.detailedErrorMsg||v.detailedErrorMsg.length<5)&&(F=v.message)),(0,j.jsxs)(l.Z,(0,a.Z)((0,a.Z)({open:t,classes:h},E),{},{scroll:"paper",onClose:function(e,t){"backdropClick"!==t&&n()},className:h.root,children:[(0,j.jsxs)(d.Z,{className:h.title,children:[(0,j.jsxs)("div",{className:h.titleText,children:[C," ",s]}),(0,j.jsx)("div",{className:h.closeContainer,children:(0,j.jsx)(r.Z,{"aria-label":"close",className:h.closeButton,onClick:n,disableRipple:!0,size:"small",children:(0,j.jsx)(x.Z,{})})})]}),(0,j.jsx)(b.Z,{isModal:!0}),(0,j.jsx)(c.Z,{open:w,className:h.snackBarModal,onClose:function(){N(!1),Z("")},message:F,ContentProps:{className:"".concat(h.snackBar," ").concat(v&&"error"===v.type?h.errorSnackBar:"")},autoHideDuration:v&&"error"===v.type?1e4:5e3}),(0,j.jsx)(u.Z,{className:g?"":h.content,children:m})]}))})))},35721:function(e,n,t){var i=t(50390),a=t(34424),o=t(25594),s=t(86509),r=t(4285),c=t(35477),l=t(95467),d=t(26805),u=t(44078),m=t(5265),h=t(86362),p=t(62559),f={toggleList:m.kQ},x=(0,a.$j)((function(e){return{sidebarOpen:e.system.sidebarOpen,operatorMode:e.system.operatorMode,managerObjects:e.objectBrowser.objectManager.objectsToManage,features:e.console.session.features}}),f);n.Z=x((0,r.Z)((function(e){return(0,s.Z)({headerContainer:{width:"100%",minHeight:79,display:"flex",backgroundColor:"#fff",left:0,boxShadow:"rgba(0,0,0,.08) 0 3px 10px"},label:{display:"flex",justifyContent:"flex-start",alignItems:"center"},labelStyle:{color:"#000",fontSize:18,fontWeight:700,marginLeft:34,marginTop:8},rightMenu:{textAlign:"right"},logo:{marginLeft:34,fill:e.palette.primary.main,"& .min-icon":{width:120}},middleComponent:{display:"flex",justifyContent:"center",alignItems:"center"}})}))((function(e){var n=e.classes,t=e.label,a=e.actions,s=e.sidebarOpen,r=e.operatorMode,m=e.managerObjects,f=e.toggleList,x=e.middleComponent;return e.features.includes("hide-menu")?(0,p.jsx)(i.Fragment,{}):(0,p.jsxs)(o.ZP,{container:!0,className:"".concat(n.headerContainer," page-header"),direction:"row",alignItems:"center",children:[(0,p.jsxs)(o.ZP,{item:!0,xs:12,sm:12,md:x?3:6,className:n.label,sx:{paddingTop:["15px","15px","0","0"]},children:[!s&&(0,p.jsx)("div",{className:n.logo,children:r?(0,p.jsx)(d.Z,{}):(0,p.jsx)(u.Z,{})}),(0,p.jsx)(c.Z,{variant:"h4",className:n.labelStyle,children:t})]}),x&&(0,p.jsx)(o.ZP,{item:!0,xs:12,sm:12,md:6,className:n.middleComponent,sx:{marginTop:["10px","10px","0","0"]},children:x}),(0,p.jsxs)(o.ZP,{item:!0,xs:12,sm:12,md:x?3:6,className:n.rightMenu,children:[a&&a,m&&m.length>0&&(0,p.jsx)(l.Z,{color:"primary","aria-label":"Refresh List",component:"span",onClick:function(){f()},size:"large",children:(0,p.jsx)(h.gx,{})})]})]})})))},62702:function(e,n,t){t(50390);var i=t(25594),a=t(86509),o=t(4285),s=t(62559);n.Z=(0,o.Z)((function(e){return(0,a.Z)({headerBarIcon:{marginRight:".7rem",color:e.palette.primary.main,"& .min-icon":{width:44,height:44}},headerBarSubheader:{color:"grey","@media (max-width: 900px)":{maxWidth:200}},screenTitle:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:"1rem",borderBottom:"1px solid #EAEAEA","@media (max-width: 600px)":{flexFlow:"column"}},titleColumn:{height:"auto",justifyContent:"center",display:"flex",flexFlow:"column",alignItems:"flex-start","& h1":{fontSize:19}},leftItems:{display:"flex",alignItems:"center","@media (max-width: 600px)":{flexFlow:"column"}},rightItems:{display:"flex",alignItems:"center"}})}))((function(e){var n=e.classes,t=e.icon,a=e.title,o=e.subTitle,r=e.actions,c=e.className;return(0,s.jsx)(i.ZP,{container:!0,children:(0,s.jsxs)(i.ZP,{item:!0,xs:12,className:"".concat(n.screenTitle," ").concat(c||""),children:[(0,s.jsxs)("div",{className:n.leftItems,children:[t?(0,s.jsx)("div",{className:n.headerBarIcon,children:t}):null,(0,s.jsxs)("div",{className:n.titleColumn,children:[(0,s.jsx)("h1",{style:{margin:0},children:a}),(0,s.jsx)("span",{className:n.headerBarSubheader,children:o})]})]}),(0,s.jsx)("div",{className:n.rightItems,children:r})]})})}))},23165:function(e,n,t){var i=t(36222),a=t(18489),o=(t(50390),t(65771)),s=t(13336),r=t(12066),c=t(4285),l=t(86509),d=t(72462),u=t(62559);n.Z=(0,c.Z)((function(e){return(0,l.Z)({searchField:(0,a.Z)({},d.qg.searchField),adornment:{}})}))((function(e){var n=e.placeholder,t=void 0===n?"":n,a=e.classes,c=e.onChange,l=e.adornmentPosition,d=void 0===l?"end":l,m=e.overrideClass,h=e.value,p=(0,i.Z)({disableUnderline:!0},"".concat(d,"Adornment"),(0,u.jsx)(o.Z,{position:d,className:a.adornment,children:(0,u.jsx)(s.Z,{})}));return(0,u.jsx)(r.Z,{placeholder:t,className:m||a.searchField,id:"search-resource",label:"",InputProps:p,onChange:function(e){c(e.target.value)},variant:"standard",value:h})}))},18572:function(e,n,t){var i=t(50390),a=t(65742),o=t(10106),s=t(33690),r=t(62559),c={};n.Z=function(e){var n=e.rowRenderFunction,t=e.totalItems,l=e.defaultHeight,d=function(e){var t=e.index,i=e.style;return(0,r.jsx)("div",{style:i,children:n(t)})};return(0,r.jsx)(i.Fragment,{children:(0,r.jsx)(o.Z,{isItemLoaded:function(e){return!!c[e]},loadMoreItems:function(e,n){for(var t=e;t<=n;t++)c[t]=1;for(var i=e;i<=n;i++)c[i]=2},itemCount:t,children:function(e){var n=e.onItemsRendered,i=e.ref;return(0,r.jsx)(s.qj,{children:function(e){var o=e.width,s=e.height;return(0,r.jsx)(a.t7,{itemSize:l||220,height:s,itemCount:t,width:o,ref:i,onItemsRendered:n,children:d})}})}})})}},94863:function(e,n,t){var i=t(23430),a=t(56805),o=t(66946),s=t(66964),r=t(86362),c=t(50390),l=t(62559);n.Z=function(e){var n=e.value,t=(0,c.useState)(!1),d=(0,i.Z)(t,2),u=d[0],m=d[1];return(0,l.jsxs)(a.Z,{sx:{display:"flex",alignItems:"center",flexFlow:{sm:"row",xs:"column"}},children:[(0,l.jsx)(s.Z,{id:"inspect-dec-key",name:"inspect-dec-key",placeholder:"",label:"",type:u?"text":"password",onChange:function(){},value:n,overlayIcon:(0,l.jsx)(r.TI,{}),extraInputProps:{readOnly:!0},overlayAction:function(){return navigator.clipboard.writeText(n)}}),(0,l.jsx)(o.Z,{sx:{marginLeft:"10px"},variant:"contained",onClick:function(){return m(!u)},children:"Show/Hide"})]})}}}]);
|
|
//# sourceMappingURL=290.3a78b888.chunk.js.map
|