Files
object-browser/portal-ui/build/static/js/2603.9ebd9b9e.chunk.js
2023-07-06 10:32:39 -07:00

2 lines
107 KiB
JavaScript

"use strict";(self.webpackChunkportal_ui=self.webpackChunkportal_ui||[]).push([[2603],{94619:function(e,t,n){n.r(t);var i=n(29439),o=n(1413),r=n(72791),a=n(56028),s=n(61889),c=n(29945),l=n(21435),d=n(11135),u=n(25787),h=n(23814),f=n(90673),m=n(87995),p=n(81551),x=n(31776),b=n(82342),v=n(80184);t.default=(0,u.Z)((function(e){return(0,d.Z)((0,o.Z)((0,o.Z)({},h.DF),h.ID))}))((function(e){var t=e.modalOpen,n=e.onClose,o=e.classes,d=e.bucket,u=e.prefilledRoute,h=(0,p.TL)(),j=(0,r.useState)(""),g=(0,i.Z)(j,2),_=g[0],S=g[1],Z=(0,r.useState)("readonly"),C=(0,i.Z)(Z,2),w=C[0],y=C[1];(0,r.useEffect)((function(){u&&S(u)}),[u]);return(0,v.jsx)(a.Z,{modalOpen:t,title:"Add Anonymous Access Rule",onClose:n,titleIcon:(0,v.jsx)(c.sR0,{}),children:(0,v.jsxs)(s.ZP,{container:!0,children:[(0,v.jsx)(s.ZP,{item:!0,xs:12,className:o.formFieldRow,children:(0,v.jsx)(l.Z,{value:_,label:"Prefix",id:"prefix",name:"prefix",placeholder:"Enter Prefix",onChange:function(e){S(e.target.value)},tooltip:"Enter '/' to apply the rule to all prefixes and objects at the bucket root. Do not include the wildcard asterisk '*' as part of the prefix *unless* it is an explicit part of the prefix name. The Console automatically appends an asterisk to the appropriate sections of the resulting IAM policy."})}),(0,v.jsx)(s.ZP,{item:!0,xs:12,children:(0,v.jsx)(f.Z,{id:"access",name:"Access",onChange:function(e){y(e.target.value)},label:"Access",value:w,options:[{label:"readonly",value:"readonly"},{label:"writeonly",value:"writeonly"},{label:"readwrite",value:"readwrite"}],disabled:!1})}),(0,v.jsxs)(s.ZP,{item:!0,xs:12,className:o.modalButtonBar,children:[(0,v.jsx)(c.zxk,{id:"clear",type:"button",variant:"regular",onClick:function(){S(""),y("readonly")},label:"Clear"}),(0,v.jsx)(c.zxk,{id:"add-access-save",type:"submit",variant:"callAction",disabled:""===_.trim(),onClick:function(){x.h.bucket.setAccessRuleWithBucket(d,{prefix:_,access:w}).then((function(e){h((0,m.y1)("Access Rule added successfully")),n()})).catch((function(e){h((0,m.Ih)((0,b.g)(e))),n()}))},label:"Save"})]})]})})}))},32603:function(e,t,n){n.r(t),n.d(t,{default:function(){return It}});var i,o=n(1413),r=n(72791),a=n(78687),s=n(57689),c=n(11135),l=n(25787),d=n(81551),u=n(23814),h=n(93433),f=n(29439),m=n(43954),p=n(29945),x=n(99779),b=n(61889),v=n(26181),j=n.n(v),g=n(45248),_=n(63021),S=n(78029),Z=n.n(S),C=n(72455),w=n(11087),y=n(38442),T=n(56087),N=n(75578),F=n(87995),k=n(54756),E=function(e){return(e.match(/\.([^.]*?)(?=\?|#|$)/)||[])[1]},I=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],i=Object.keys(e).reduce((function(n,i){return E(i)&&i.includes(t)&&(n[i]=e[i]),n}),{});return Object.keys(i).filter((function(e){var o=i[e].some((function(e){return n.find((function(t){var n=!1;if(-1!==t.indexOf("*")){var i=t.substring(0,t.length-1);n=e.includes(i)}return n||e===t}))})),r=e.substring(0,e.indexOf("/*."))==="arn:aws:s3:::".concat(t);return o&&(r&&"arn:aws:s3:::*"!==e)}))},O=n(80184),B=(0,N.Z)(r.lazy((function(){return n.e(2185).then(n.bind(n,62185))}))),L=(0,C.Z)((function(e){return(0,c.Z)((0,o.Z)((0,o.Z)({},u.cx),{},{slashSpacingStyle:{margin:"0 5px"}}))})),P=function(e){var t=e.bucketName,n=e.internalPaths,i=e.hidePathButton,o=e.additionalOptions,c=(0,d.TL)(),l=(0,s.s0)(),u=L(),m=(0,a.v9)((function(e){return e.objectBrowser.rewind.rewindEnabled})),x=(0,a.v9)((function(e){return e.objectBrowser.versionsMode})),b=(0,a.v9)((function(e){return e.objectBrowser.versionedFile})),v=(0,a.v9)((function(e){return e.system.anonymousMode})),j=(0,r.useState)(!1),_=(0,f.Z)(j,2),S=_[0],C=_[1],N=[T.Ft.S3_PUT_OBJECT,T.Ft.S3_PUT_ACTIONS],E=(0,a.v9)((function(e){return e.console.session&&e.console.session.permissions||{}})),P=n;""!==n&&(P="/".concat(n));var A=P.split("/").filter((function(e){return""!==e})),D=A.length-1,R=P||t,M=I(E,R,N),U=(0,y.F)([R].concat((0,h.Z)(M)),N)||v,z=A.map((function(e,n){var i="".concat(A.slice(0,n+1).join("/"),"/"),o="/browser/".concat(t,"/").concat(i?"".concat((0,g.LL)(i)):"");return n===D&&e===b?null:(0,O.jsxs)(r.Fragment,{children:[(0,O.jsx)("span",{className:u.slashSpacingStyle,children:"/"}),n===D?(0,O.jsx)("span",{style:{cursor:"default"},children:e}):(0,O.jsx)(w.rU,{to:o,onClick:function(){c((0,k.db)({status:!1,objectName:""}))},children:e})]},"breadcrumbs-".concat(n.toString()))})),G=[];x&&(G=[(0,O.jsx)(r.Fragment,{children:(0,O.jsxs)("span",{children:[(0,O.jsx)("span",{className:u.slashSpacingStyle,children:"/"}),b," - Versions"]})},"breadcrumbs-versionedItem")]);var W=[(0,O.jsx)(r.Fragment,{children:(0,O.jsx)(w.rU,{to:"/browser/".concat(t),onClick:function(){c((0,k.db)({status:!1,objectName:""}))},children:t})},"breadcrumbs-root-path")].concat((0,h.Z)(z),(0,h.Z)(G));return(0,O.jsxs)(r.Fragment,{children:[(0,O.jsxs)("div",{className:u.breadcrumbsMain,children:[S&&(0,O.jsx)(B,{modalOpen:S,bucketName:t,folderName:n,onClose:function(){C(!1)}}),(0,O.jsx)(p.OoM,{goBackFunction:function(){if(x)c((0,k.db)({status:!1,objectName:""}));else{if(0===A.length)return void l("/browser");var e=A.slice(0,-1);l("/browser/".concat(t).concat(e.length>0?"/".concat((0,g.LL)("".concat(e.join("/"),"/"))):""))}},additionalOptions:(0,O.jsxs)(r.Fragment,{children:[(0,O.jsx)(Z(),{text:"".concat(t,"/").concat(A.join("/")),children:(0,O.jsx)(p.zxk,{id:"copy-path",icon:(0,O.jsx)(p.TIy,{style:{width:"12px",height:"12px",fill:"#969FA8",marginTop:-1}}),variant:"regular",onClick:function(){c((0,F.y1)("Path copied to clipboard"))},style:{width:"28px",height:"28px",color:"#969FA8",border:"#969FA8 1px solid",marginRight:5}})}),(0,O.jsx)("div",{className:u.additionalOptions,children:o})]}),children:W}),!i&&(0,O.jsx)(p.ua7,{tooltip:U?"Choose or create a new path":(0,T.MK)([T.Ft.S3_PUT_OBJECT,T.Ft.S3_PUT_ACTIONS],"create a new path"),children:(0,O.jsx)(p.zxk,{id:"new-path",onClick:function(){C(!0)},disabled:!v&&(m||!U),icon:(0,O.jsx)(p.N$q,{style:{fill:"#969FA8"}}),style:{whiteSpace:"nowrap"},variant:"regular",label:"Create new path"})})]}),(0,O.jsx)("div",{className:u.breadcrumbsSecond,children:o})]})},A=n(47922),D=n(71715),R=n(77865),M=n(49900),U=n(57064),z=n(27454),G=(0,l.Z)((function(e){return(0,c.Z)({listUploadIcons:{height:20,"& .min-icon":{width:18,fill:"rgba(0,0,0,0.87)"}}})}))((function(e){var t=e.uploadPath,n=e.bucketName,i=e.forceDisable,o=void 0!==i&&i,s=e.uploadFileFunction,c=e.uploadFolderFunction,l=e.classes,d=e.overrideStyles,u=void 0===d?{}:d,m=(0,a.v9)((function(e){return e.system.anonymousMode})),x=(0,a.v9)((function(e){return e.console.session&&e.console.session.permissions||{}})),b=[T.Ft.S3_PUT_OBJECT,T.Ft.S3_PUT_ACTIONS],v=I(x,t,b),j=(0,r.useState)(null),g=(0,f.Z)(j,2),_=g[0],S=g[1],Z=Boolean(_),C=function(){S(null)},w=(0,y.F)([t].concat((0,h.Z)(v)),b)||m,N=(0,y.F)([n].concat((0,h.Z)(v)),b,!1,!0),F=w||N;return(0,O.jsxs)(r.Fragment,{children:[(0,O.jsx)(z.Z,{tooltip:F?"Upload Files":(0,T.MK)([T.Ft.S3_PUT_OBJECT,T.Ft.S3_PUT_ACTIONS],"upload files to this bucket"),children:(0,O.jsx)(p.zxk,{id:"upload-main","aria-controls":"upload-main-menu","aria-haspopup":"true","aria-expanded":Z?"true":void 0,onClick:function(e){S(e.currentTarget)},label:"Upload",icon:(0,O.jsx)(p.rG2,{}),variant:"callAction",disabled:o||!F,sx:u})}),(0,O.jsxs)(D.Z,{id:"upload-main-menu","aria-labelledby":"upload-main",anchorEl:_,open:Z,onClose:function(){C()},anchorOrigin:{vertical:"bottom",horizontal:"center"},transformOrigin:{vertical:"top",horizontal:"center"},children:[(0,O.jsxs)(R.Z,{onClick:function(){s(C)},disabled:!w||o,children:[(0,O.jsx)(U.Z,{className:l.listUploadIcons,children:(0,O.jsx)(p.rG2,{})}),(0,O.jsx)(M.Z,{children:"Upload File"})]}),(0,O.jsxs)(R.Z,{onClick:function(){c(C)},disabled:!N||o,children:[(0,O.jsx)(U.Z,{className:l.listUploadIcons,children:(0,O.jsx)(p.oXh,{})}),(0,O.jsx)(M.Z,{children:"Upload Folder"})]})]})]})})),W=(0,C.Z)((function(e){return(0,c.Z)({detailsList:{borderColor:"#EAEDEE",borderWidth:0,borderStyle:"solid",borderRadius:3,borderBottomLeftRadius:0,borderBottomRightRadius:0,width:0,transitionDuration:"0.3s",overflowX:"hidden",overflowY:"auto",position:"relative",opacity:0,marginLeft:-1,"&.open":{width:300,minWidth:300,borderLeftWidth:1,opacity:1},"@media (max-width: 799px)":{"&.open":{width:"100%",minWidth:"100%",borderLeftWidth:0}}}})})),K=function(e){var t=e.open,n=e.closePanel,i=e.className,o=void 0===i?"":i,r=e.children,a=W();return(0,O.jsxs)(p.rjZ,{item:!0,className:"".concat(a.detailsList," ").concat(t?"open":""," ").concat(o),children:[(0,O.jsx)(p.zxk,{variant:"text",id:"close-details-list",onClick:n,icon:(0,O.jsx)(p.oto,{}),sx:{position:"absolute",right:5,top:18,padding:0,height:14,"&:hover:not(:disabled)":{backgroundColor:"transparent"}}}),r]})},H=n(64554),V=n(34433),J=[{value:"01",label:"January"},{value:"02",label:"February"},{value:"03",label:"March"},{value:"04",label:"April"},{value:"05",label:"May"},{value:"06",label:"June"},{value:"07",label:"July"},{value:"08",label:"August"},{value:"09",label:"September"},{value:"10",label:"October"},{value:"11",label:"November"},{value:"12",label:"December"}],Y=Array.from(Array(31),(function(e,t){return{value:(t+1).toString(),label:(t+1).toString()}})),q=(new Date).getFullYear(),$=Array.from(Array(50),(function(e,t){return{value:(t+q).toString(),label:(t+q).toString()}})),X=n(56028),Q=n(4942),ee=n(28182),te=(0,r.forwardRef)((function(e,t){var n=e.classes,i=e.id,o=e.label,a=e.disableOptions,s=void 0!==a&&a,c=e.addSwitch,l=void 0!==c&&c,d=e.tooltip,u=void 0===d?"":d,m=e.borderBottom,x=void 0!==m&&m,b=e.onDateChange,v=e.value,j=void 0===v?"":v;(0,r.useImperativeHandle)(t,(function(){return{resetDate:A}}));var g=(0,r.useState)(!1),_=(0,f.Z)(g,2),S=_[0],Z=_[1],C=(0,r.useState)(""),w=(0,f.Z)(C,2),y=w[0],T=w[1],N=(0,r.useState)(""),F=(0,f.Z)(N,2),k=F[0],E=F[1],I=(0,r.useState)(""),B=(0,f.Z)(I,2),L=B[0],P=B[1];(0,r.useEffect)((function(){if(""!==j){var e=j.split("-");P(e[0]),T(e[1]),E("".concat(parseInt(e[2])))}}),[j]),(0,r.useEffect)((function(){var e=function(e,t,n){var i=Date.parse("".concat(e,"-").concat(t,"-").concat(n));if(isNaN(i))return[!1,""];var o=parseInt(t),r=parseInt(n),a=o<10?"0".concat(o):o,s=r<10?"0".concat(r):r,c=new Date(i).toISOString().split("T")[0],l="".concat(e,"-").concat(a,"-").concat(s);return[c===l,l]}(L,y,k),t=(0,f.Z)(e,2),n=t[0],i=t[1];b(i,n)}),[y,k,L,b]);var A=function(){T(""),E(""),P("")},D=function(){return s||!!l&&!S},R=[{value:"",label:"<Month>"}].concat((0,h.Z)(J)),M=[{value:"",label:"<Day>"}].concat((0,h.Z)(Y)),U=[{value:"",label:"<Year>"}].concat((0,h.Z)($));return(0,O.jsxs)(p.rjZ,{item:!0,xs:12,className:(0,ee.Z)(n.fieldContainer,(0,Q.Z)({},n.fieldContainerBorder,x)),children:[(0,O.jsx)("div",{className:n.labelContainer,children:(0,O.jsxs)(p.rjZ,{container:!0,children:[(0,O.jsxs)(p.AZs,{htmlFor:i,children:[(0,O.jsx)("span",{children:o}),""!==u&&(0,O.jsx)("div",{className:n.tooltipContainer,children:(0,O.jsx)(p.ua7,{tooltip:u,placement:"top",children:(0,O.jsx)("div",{className:n.tooltip,children:(0,O.jsx)(p.byK,{})})})})]}),l&&(0,O.jsx)(p.rsf,{indicatorLabels:["Specific Date","Default (7 Days)"],checked:S,value:"date_enabled",id:"date-status",name:"date-status",onChange:function(e){Z(e.target.checked),e.target.checked||b("",!0)},switchOnly:!0})]})}),(0,O.jsxs)(p.xuv,{sx:{display:"flex",gap:12},children:[(0,O.jsx)(p.PhF,{id:"".concat(i,"-month"),name:"".concat(i,"-month"),value:y,onChange:function(e){T(e)},options:R,label:"",disabled:D()}),(0,O.jsx)(p.PhF,{id:"".concat(i,"-day"),name:"".concat(i,"-day"),value:k,onChange:function(e){E(e)},options:M,label:"",disabled:D()}),(0,O.jsx)(p.PhF,{id:"".concat(i,"-year"),name:"".concat(i,"-year"),value:L,onChange:function(e){P(e)},options:U,label:"",disabled:D()})]})]})})),ne=(0,l.Z)((function(e){return(0,c.Z)((0,o.Z)((0,o.Z)((0,o.Z)({},u.YI),u.Hr),{},{fieldContainer:(0,o.Z)((0,o.Z)({},u.YI.fieldContainer),{},{display:"flex",alignItems:"center",justifyContent:"space-between",paddingBottom:10,marginTop:11,marginBottom:6})}))}))(te),ie=n(66315),oe=n(31776),re=n(82342),ae=(0,l.Z)((function(e){return(0,c.Z)((0,o.Z)((0,o.Z)((0,o.Z)({},u.DF),u.ID),u.bK))}))((function(e){var t=e.classes,n=e.open,i=e.closeModalAndRefresh,o=e.objectName,s=e.objectInfo,c=e.bucketName,l=(0,d.TL)(),u=(0,a.v9)((function(e){return e.objectBrowser.retentionConfig})),h=(0,r.useState)(!0),m=(0,f.Z)(h,2),x=m[0],b=m[1],v=(0,r.useState)(""),j=(0,f.Z)(v,2),_=j[0],S=j[1],Z=(0,r.useState)(""),C=(0,f.Z)(Z,2),w=C[0],y=C[1],T=(0,r.useState)(!1),N=(0,f.Z)(T,2),k=N[0],E=N[1],I=(0,r.useState)(!1),B=(0,f.Z)(I,2),L=B[0],P=B[1],A=(0,r.useState)(!1),D=(0,f.Z)(A,2),R=D[0],M=D[1];(0,r.useEffect)((function(){if(s.retention_mode&&(S((null===u||void 0===u?void 0:u.mode)||ie.oO.Governance),M(!0)),s.retention_until_date){var e=new Date(s.retention_until_date);if("Invalid Date"!==e.toString()){var t=e.getFullYear(),n=(o=e.getMonth()+1)<10?"0".concat(o):"".concat(o),i=e.getDate();isNaN(i)||"NaN"===n||isNaN(t)||y("".concat(t,"-").concat(n,"-").concat(i))}M(!0)}var o}),[s,null===u||void 0===u?void 0:u.mode]);var U=(0,r.useRef)(null),z=function(){b(!1),S(ie.oO.Governance),U.current&&U.current.resetDate()},G=R&&("governance"===_||""===_);return(0,O.jsxs)(X.Z,{title:"Set Retention Policy",modalOpen:n,onClose:function(){z(),i(!1)},children:[(0,O.jsxs)("div",{className:t.spacerBottom,children:[(0,O.jsx)("strong",{children:"Selected Object"}),": ",o]}),(0,O.jsxs)("form",{noValidate:!0,autoComplete:"off",onSubmit:function(e){!function(e){e.preventDefault()}(e)},children:[G&&(0,O.jsx)(p.rjZ,{item:!0,xs:12,className:t.formFieldRow,children:(0,O.jsx)(p.rsf,{value:"status",id:"status",name:"status",checked:x,onChange:function(e){b(!x)},label:"Status",indicatorLabels:["Enabled","Disabled"]})}),(0,O.jsx)(p.rjZ,{item:!0,xs:12,className:t.formFieldRow,children:(0,O.jsx)(p.Eep,{currentValue:_,id:"type",name:"type",label:"Type",disableOptions:!x||R&&""!==_,onChange:function(e){S(e.target.value)},selectorOptions:[{label:"Governance",value:ie.oO.Governance},{label:"Compliance",value:ie.oO.Compliance}]})}),(0,O.jsx)(p.rjZ,{item:!0,xs:12,className:"".concat(t.dateSelector," "),children:(0,O.jsx)(ne,{id:"date",label:"Date",disableOptions:!(x&&("governance"===_||"compliance"===_)),ref:U,value:w,borderBottom:!0,onDateChange:function(e,t){E(t),t&&y(e)}})}),(0,O.jsxs)(p.rjZ,{item:!0,xs:12,className:t.modalButtonBar,children:[(0,O.jsx)(p.zxk,{id:"reset",type:"button",variant:"regular",onClick:z,label:"Reset"}),(0,O.jsx)(p.zxk,{id:"save",type:"submit",variant:"callAction",disabled:x&&""===_||x&&!k||L,onClick:function(){P(!0);var e=s.name||"",t=s.version_id||null,n=x||"governance"!==_?"".concat(w,"T23:59:59Z"):"";x||"governance"!==_?function(e,t,n){oe.h.buckets.putObjectRetention(c,{prefix:(0,g.LL)(e),version_id:t||""},{expires:n,mode:_}).then((function(){P(!1),i(!0)})).catch((function(e){l((0,F.zb)((0,re.g)(e.error))),P(!1)}))}(e,t,n):function(e,t){oe.h.buckets.deleteObjectRetention(c,{prefix:(0,g.LL)(e),version_id:t||""}).then((function(){P(!1),i(!0)})).catch((function(e){l((0,F.zb)((0,re.g)(e.error))),P(!1)}))}(e,t)},label:"Save"})]})]})]})})),se=n(23508),ce=n(9505),le=function(e){return"Enabled"===e||"Suspended"===e},de=function(e){var t=e.closeDeleteModalAndRefresh,n=e.deleteOpen,i=e.selectedBucket,o=e.selectedObject,s=e.versioningInfo,c=e.selectedVersion,l=void 0===c?"":c,u=(0,d.TL)(),h=(0,ce.Z)((function(){return t(!0)}),(function(e){u((0,F.Ih)(e)),"Access Denied."===e.detailedError&&t(!0)})),m=(0,f.Z)(h,2),x=m[0],b=m[1],v=(0,r.useState)(!1),j=(0,f.Z)(v,2),_=j[0],S=j[1],Z=(0,r.useState)(!1),C=(0,f.Z)(Z,2),w=C[0],N=C[1],k=(0,a.v9)((function(e){return e.objectBrowser.retentionConfig})),E=(0,y.F)([i],[T.Ft.S3_BYPASS_GOVERNANCE_RETENTION])&&"governance"===(null===k||void 0===k?void 0:k.mode);if(!o)return null;return(0,O.jsx)(se.Z,{title:"Delete Object",confirmText:"Delete",isOpen:n,titleIcon:(0,O.jsx)(p.NvT,{}),isLoading:x,onConfirm:function(){var e=(0,g.IO)(o).endsWith("/");b("DELETE","/api/v1/buckets/".concat(i,"/objects?path=").concat(o).concat(""!==l?"&version_id=".concat(l):"&recursive=".concat(e,"&all_versions=").concat(_)).concat(w?"&bypass=true":""))},onClose:function(){return t(!1)},confirmationContent:(0,O.jsxs)(r.Fragment,{children:["Are you sure you want to delete: ",(0,O.jsx)("br",{}),(0,O.jsx)("b",{children:(0,g.IO)(o)})," ",""!==l?(0,O.jsxs)(r.Fragment,{children:[(0,O.jsx)("br",{}),(0,O.jsx)("br",{}),"Version ID:",(0,O.jsx)("br",{}),(0,O.jsx)("strong",{children:l})]}):"","? ",(0,O.jsx)("br",{}),(0,O.jsx)("br",{}),le(null===s||void 0===s?void 0:s.status)&&""===l&&(0,O.jsx)(r.Fragment,{children:(0,O.jsx)(p.rsf,{label:"Delete All Versions",indicatorLabels:["Yes","No"],checked:_,value:"delete_versions",id:"delete-versions",name:"delete-versions",onChange:function(e){S(!_)},description:""})}),E&&(_||""!==l)&&(0,O.jsx)(r.Fragment,{children:(0,O.jsx)("div",{style:{marginTop:10},children:(0,O.jsx)(p.rsf,{label:"Bypass Governance Mode",indicatorLabels:["Yes","No"],checked:w,value:"bypass_governance",id:"bypass_governance",name:"bypass_governance",onChange:function(e){N(!w)},description:""})})}),_&&(0,O.jsxs)(r.Fragment,{children:[(0,O.jsxs)("div",{style:{marginTop:10,border:"#c83b51 1px solid",borderRadius:3,padding:5,backgroundColor:"#c83b5120",color:"#c83b51"},children:["This will remove the object as well as all of its versions,"," ",(0,O.jsx)("br",{}),"This action is irreversible."]}),(0,O.jsx)("br",{}),"Are you sure you want to continue?"]})]})})},ue=(0,l.Z)((function(e){return(0,c.Z)((0,o.Z)((0,o.Z)((0,o.Z)({},u.DF),u.ID),u.bK))}))((function(e){var t=e.classes,n=e.open,i=e.closeModalAndRefresh,o=e.objectName,a=e.bucketName,s=e.actualInfo,c=(0,d.TL)(),l=(0,r.useState)(!1),u=(0,f.Z)(l,2),h=u[0],m=u[1],x=(0,r.useState)(!1),b=(0,f.Z)(x,2),v=b[0],_=b[1],S=s.version_id;(0,r.useEffect)((function(){var e=j()(s,"legal_hold_status","OFF");m("ON"===e)}),[s]);var Z=function(){m(!1)};return(0,O.jsxs)(X.Z,{title:"Set Legal Hold",modalOpen:n,onClose:function(){Z(),i(!1)},children:[(0,O.jsxs)(p.rjZ,{item:!0,xs:12,className:t.spacerBottom,children:["Object: ",a]}),(0,O.jsxs)("form",{noValidate:!0,autoComplete:"off",onSubmit:function(e){!function(e){e.preventDefault(),_(!0),oe.h.buckets.putObjectLegalHold(a,{prefix:(0,g.LL)(o),version_id:S||""},{status:h?ie.nY.Enabled:ie.nY.Disabled}).then((function(){_(!1),i(!0)})).catch((function(e){c((0,F.zb)((0,re.g)(e.error))),_(!1)}))}(e)},children:[(0,O.jsx)(p.rjZ,{item:!0,xs:12,className:t.formFieldRow,children:(0,O.jsx)(p.rsf,{value:"legalhold",id:"legalhold",name:"legalhold",checked:h,onChange:function(e){m(!h)},label:"Legal Hold Status",indicatorLabels:["Enabled","Disabled"],tooltip:"To enable this feature you need to enable versioning on the bucket before creation"})}),(0,O.jsxs)(p.rjZ,{item:!0,xs:12,className:t.modalButtonBar,children:[(0,O.jsx)(p.zxk,{id:"clear",type:"button",variant:"regular",onClick:Z,label:"Clear"}),(0,O.jsx)(p.zxk,{id:"save",type:"submit",variant:"callAction",disabled:v,label:" Save"})]})]})]})})),he=n(78562),fe=n(79836),me=n(53382),pe=n(35855),xe=n(53994),be=(0,l.Z)((function(e){return(0,c.Z)((0,o.Z)((0,o.Z)({titleItem:{width:"35%"}},u.bK),u.$b))}))((function(e){var t=e.metaData,n=e.classes,i=e.linear,o=void 0!==i&&i,a=Object.keys(t);return o?(0,O.jsx)(r.Fragment,{children:a.map((function(e,i){var o=Array.isArray(t[e])?t[e].map(decodeURIComponent).join(", "):decodeURIComponent(t[e]);return(0,O.jsxs)(H.Z,{className:n.metadataLinear,children:[(0,O.jsx)("strong",{children:e}),(0,O.jsx)("br",{}),o]},"box-meta-".concat(e,"-").concat(i.toString()))}))}):(0,O.jsxs)(b.ZP,{container:!0,children:[(0,O.jsx)(b.ZP,{item:!0,xs:12,sx:{marginTop:"25px",marginBottom:"5px"},children:(0,O.jsx)("h3",{style:{marginTop:"0",marginBottom:"0"},children:"Object Metadata"})}),(0,O.jsx)(b.ZP,{item:!0,xs:12,children:(0,O.jsx)(fe.Z,{className:n.table,"aria-label":"simple table",children:(0,O.jsx)(me.Z,{children:a.map((function(e,i){var o=Array.isArray(t[e])?t[e].map(decodeURIComponent).join(", "):decodeURIComponent(t[e]);return(0,O.jsxs)(pe.Z,{children:[(0,O.jsx)(xe.Z,{component:"th",scope:"row",className:n.titleItem,children:e}),(0,O.jsx)(xe.Z,{align:"right",children:o})]},"tRow-".concat(i.toString()))}))})})})]})})),ve=n(37762),je=(0,l.Z)((function(e){return(0,c.Z)({fileName:{display:"flex",alignItems:"center","& .min-icon":{width:16,height:16,marginRight:4,minWidth:16,minHeight:16}},fileNameText:{whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"}})}))((function(e){var t=e.classes,n=e.icon,i=e.strings;return(0,O.jsxs)("div",{className:t.fileName,children:[n,(0,O.jsx)("span",{className:t.fileNameText,children:(0,g.e3)(i[i.length-1])})]})})),ge=[{icon:(0,O.jsx)(p.n9O,{}),extensions:["mp4","mov","avi","mpeg","mpg"]},{icon:(0,O.jsx)(p.mYf,{}),extensions:["mp3","m4a","aac"]},{icon:(0,O.jsx)(p.UU9,{}),extensions:["pdf"]},{icon:(0,O.jsx)(p.hjP,{}),extensions:["ppt","pptx"]},{icon:(0,O.jsx)(p.hz9,{}),extensions:["xls","xlsx"]},{icon:(0,O.jsx)(p.xDw,{}),extensions:["cer","crt","pem"]},{icon:(0,O.jsx)(p.jG9,{}),extensions:["html","xml","css","py","go","php","cpp","h","java"]},{icon:(0,O.jsx)(p.NqG,{}),extensions:["cfg","yaml"]},{icon:(0,O.jsx)(p.OkY,{}),extensions:["sql"]},{icon:(0,O.jsx)(p.ZAy,{}),extensions:["ttf","otf"]},{icon:(0,O.jsx)(p.p2x,{}),extensions:["doc","docx","txt","rtf"]},{icon:(0,O.jsx)(p.xhr,{}),extensions:["zip","rar","tar","gz"]},{icon:(0,O.jsx)(p.rtI,{}),extensions:["epub","mobi","azw","azw3"]},{icon:(0,O.jsx)(p.q$4,{}),extensions:["jpeg","jpg","gif","tiff","png","heic","dng"]}],_e=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=e,i=(0,O.jsx)(p.MoH,{});e.endsWith("/")&&(i=(0,O.jsx)(p.BI,{}),n=e.slice(0,-1));for(var o=e.toLowerCase(),r=0,a=ge;r<a.length;r++){var s,c=a[r],l=(0,ve.Z)(c.extensions);try{for(l.s();!(s=l.n()).done;){var d=s.value;o.endsWith(".".concat(d))&&(i=c.icon)}}catch(h){l.e(h)}finally{l.f()}}!e.endsWith("/")&&e.indexOf(".")<0&&(i=(0,O.jsx)(p.lrl,{}));var u=n.split("/");return t?i:(0,O.jsx)(je,{icon:i,strings:u})},Se=n(81918),Ze=n(29823),Ce=(0,l.Z)((function(e){return(0,c.Z)((0,o.Z)((0,o.Z)((0,o.Z)({newTileHeader:{fontSize:18,fontWeight:"bold",color:"#000",margin:"35px 0",paddingBottom:15,display:"flex",alignItems:"center","& > svg":{marginRight:10}},tagsForLabel:{fontSize:16,margin:"20px 0 30px",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",width:"100%"},currentTagsContainer:{fontSize:14,fontWeight:"normal"},noTagsForObject:{color:"#858585"},deleteTag:{color:"#C83B51",marginLeft:5}},u.DF),u.ID),u.bK))}))((function(e){var t,n=e.modalOpen,i=e.onCloseAndUpdate,s=e.bucketName,c=e.actualInfo,l=e.classes,u=(0,d.TL)(),h=(0,a.v9)(F.N5),m=(0,r.useState)(""),x=(0,f.Z)(m,2),v=x[0],_=x[1],S=(0,r.useState)(""),Z=(0,f.Z)(S,2),C=Z[0],w=Z[1],N=(0,r.useState)(!1),k=(0,f.Z)(N,2),E=k[0],I=k[1],B=(0,r.useState)(!1),L=(0,f.Z)(B,2),P=L[0],A=L[1],D=(0,r.useState)(""),R=(0,f.Z)(D,2),M=R[0],U=R[1],z=(0,r.useState)(""),G=(0,f.Z)(z,2),W=G[0],K=G[1],V=(0,g.LL)(c.name||""),J=c.tags,Y=Object.keys(J||{}),q=null===(t=c.name)||void 0===t?void 0:t.split("/"),$=(null===q||void 0===q?void 0:q.pop())||"",Q=function(e){return(0,O.jsxs)("div",{className:l.tagsForLabel,children:["Tag",e?"s":""," for: ",(0,O.jsx)("strong",{children:$})]})};return(0,O.jsx)(r.Fragment,{children:(0,O.jsx)(X.Z,{modalOpen:n,title:P?"Delete Tag":"Edit Tags",onClose:function(){i(!0)},titleIcon:P?(0,O.jsx)(p.dRf,{style:{fill:"#C83B51"}}):(0,O.jsx)(p.T0F,{}),children:P?(0,O.jsx)(r.Fragment,{children:(0,O.jsxs)(b.ZP,{container:!0,children:[Q(!1),"Are you sure you want to delete the tag"," ",(0,O.jsxs)("b",{className:l.deleteTag,children:[M," : ",W]})," ","?",(0,O.jsxs)(b.ZP,{item:!0,xs:12,className:l.modalButtonBar,children:[(0,O.jsx)(p.zxk,{id:"cancel",type:"button",variant:"regular",onClick:function(){U(""),K(""),A(!1)},label:"Cancel"}),(0,O.jsx)(p.zxk,{type:"submit",variant:"secondary",onClick:function(){var e=(0,o.Z)({},J);delete e[M];var t=h?c.version_id||"":"null";oe.h.buckets.putObjectTags(s,{prefix:V,version_id:t},{tags:e}).then((function(){i(!0),I(!1)})).catch((function(e){u((0,F.zb)((0,re.g)(e.error))),I(!1)}))},id:"deleteTag",label:"Delete Tag"})]})]})}):(0,O.jsxs)(b.ZP,{container:!0,children:[(0,O.jsx)(y.s,{scopes:[T.Ft.S3_GET_OBJECT_TAGGING,T.Ft.S3_GET_ACTIONS],resource:s,children:(0,O.jsxs)(H.Z,{sx:{display:"flex",flexFlow:"column",width:"100%"},children:[Q(!0),(0,O.jsxs)("div",{className:l.currentTagsContainer,children:["Current Tags:",(0,O.jsx)("br",{}),0===Y.length?(0,O.jsx)("span",{className:l.noTagsForObject,children:"There are no tags for this object"}):(0,O.jsx)(r.Fragment,{}),(0,O.jsx)(H.Z,{sx:{marginTop:"5px",marginBottom:"15px"},children:Y.map((function(e,t){var n=j()(J,"".concat(e),"");return""!==n?(0,O.jsx)(y.s,{scopes:[T.Ft.S3_DELETE_OBJECT_TAGGING],resource:s,errorProps:{deleteIcon:null,onDelete:null},children:(0,O.jsx)(Se.Z,{style:{textTransform:"none",marginRight:"5px",marginBottom:"5px"},size:"small",label:"".concat(e," : ").concat(n),color:"primary",deleteIcon:(0,O.jsx)(Ze.Z,{}),onDelete:function(){!function(e,t){U(e),K(t),A(!0)}(e,n)}})},"chip-".concat(t)):null}))})]})]})}),(0,O.jsx)(y.s,{scopes:[T.Ft.S3_PUT_OBJECT_TAGGING,T.Ft.S3_PUT_ACTIONS],resource:s,errorProps:{disabled:!0,onClick:null},children:(0,O.jsxs)(b.ZP,{container:!0,children:[(0,O.jsx)(p.NZf,{icon:(0,O.jsx)(p.OCT,{}),separator:!1,children:"Add New Tag"}),(0,O.jsx)(b.ZP,{item:!0,xs:12,className:l.formFieldRow,children:(0,O.jsx)(p.Wzg,{value:v,label:"Tag Key",id:"newTagKey",name:"newTagKey",placeholder:"Enter Tag Key",onChange:function(e){_(e.target.value)}})}),(0,O.jsx)(b.ZP,{item:!0,xs:12,className:l.formFieldRow,children:(0,O.jsx)(p.Wzg,{value:C,label:"Tag Label",id:"newTagLabel",name:"newTagLabel",placeholder:"Enter Tag Label",onChange:function(e){w(e.target.value)}})}),(0,O.jsxs)(b.ZP,{item:!0,xs:12,className:l.modalButtonBar,children:[(0,O.jsx)(p.zxk,{id:"clear",type:"button",variant:"regular",color:"primary",onClick:function(){w(""),_("")},label:"Clear"}),(0,O.jsx)(p.zxk,{type:"submit",variant:"callAction",disabled:""===C.trim()||""===v.trim()||E,onClick:function(){I(!0);var e={};e[v]=C;var t=(0,o.Z)((0,o.Z)({},J),e),n=h?c.version_id||"":"null";oe.h.buckets.putObjectTags(s,{prefix:V,version_id:n},{tags:t}).then((function(){i(!0),I(!1)})).catch((function(e){u((0,F.zb)((0,re.g)(e.error))),I(!1)}))},id:"saveTag",label:"Save"})]})]})})]})})})})),we=n(74165),ye=n(15861),Te=n(51691),Ne=n(73669),Fe=(0,l.Z)((function(e){return(0,c.Z)((0,o.Z)((0,o.Z)((0,o.Z)({},u.DF),u.ID),u.bK))}))((function(e){var t=e.classes,n=e.closeInspectModalAndRefresh,i=e.inspectOpen,o=e.inspectPath,a=e.volumeName,s=(0,d.TL)(),c=function(){return n(!1)},l=(0,r.useState)(!0),u=(0,f.Z)(l,2),h=u[0],m=u[1],x=(0,r.useState)(""),b=(0,f.Z)(x,2),v=b[0],j=b[1],_=(0,r.useState)(""),S=(0,f.Z)(_,2),Z=S[0],C=S[1];if(!o)return null;var w=function(){var e=(0,ye.Z)((0,we.Z)().mark((function e(t){return(0,we.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,fetch(t,{method:"GET"});case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),y=function(){var e=(0,ye.Z)((0,we.Z)().mark((function e(){var t,n,i;return(0,we.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=(0,g.LL)(o+"/xl.meta"),n=(0,g.LL)(a),i="/api/v1/admin/inspect?volume=".concat(n,"&file=").concat(t,"&encrypt=").concat(h),w(i).then(function(){var e=(0,ye.Z)((0,we.Z)().mark((function e(t){var n,i,o,r;return(0,we.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t.ok){e.next=5;break}return e.next=3,t.json();case 3:n=e.sent,s((0,F.Ih)({errorMessage:n.message,detailedError:n.code}));case 5:return e.next=7,t.blob();case 7:if(i=e.sent,o=t.headers.get("content-disposition").split('"')[1],r=(0,g.Do)(o)||"",(0,g.zZ)(i,o),C(o),""!==r){e.next=15;break}return c(),e.abrupt("return");case 15:j(r);case 16:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()).catch((function(e){s((0,F.Ih)(e))}));case 4:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();return(0,O.jsxs)(r.Fragment,{children:[!v&&(0,O.jsx)(X.Z,{modalOpen:i,titleIcon:(0,O.jsx)(p.Gp8,{}),title:"Inspect Object",onClose:c,children:(0,O.jsxs)("form",{noValidate:!0,autoComplete:"off",onSubmit:function(e){!function(e){e.preventDefault()}(e)},children:["Would you like to encrypt ",(0,O.jsx)("b",{children:(0,g.IO)(o)}),"?"," ",(0,O.jsx)("br",{}),(0,O.jsx)(p.rsf,{label:"Encrypt",indicatorLabels:["Yes","No"],checked:h,value:"encrypt",id:"encrypt",name:"encrypt",onChange:function(e){m(!h)},description:""}),(0,O.jsx)(p.rjZ,{item:!0,xs:12,className:t.modalButtonBar,children:(0,O.jsx)(p.zxk,{id:"inspect",type:"submit",variant:"callAction",color:"primary",onClick:y,label:"Inspect"})})]})}),v?(0,O.jsx)(X.Z,{modalOpen:i,title:"Inspect Decryption Key",onClose:function(){(0,g.kT)(Z),c(),j("")},titleIcon:(0,O.jsx)(p.tvm,{}),children:(0,O.jsxs)(Te.Z,{children:[(0,O.jsxs)(p.xuv,{children:["This will be displayed only once. It cannot be recovered.",(0,O.jsx)("br",{}),"Use secure medium to share this key."]}),(0,O.jsx)(p.xuv,{children:(0,O.jsx)(Ne.Z,{value:v})})]})}):null]})})),ke=n(21435),Ee=n(81159),Ie=n(76610),Oe=function(e,t,n,i){var o,r=(0,g.LL)("".concat(t,"-").concat(i.name,"-").concat((new Date).getTime(),"-").concat(Math.random()));if(null!==(o=i.name)&&void 0!==o&&o.length)e((0,k.Hg)(!0));else{var a=(0,Ie.YO)(8),s=(0,A.LR)(t,n,i.version_id,i.size||0,null,a,(function(t){e((0,k.RO)({instanceID:r,progress:t}))}),(function(){e((0,k.oK)(r))}),(function(t){e((0,k.qJ)({instanceID:r,msg:t}))}),(function(){e((0,k.Im)(r))}),(function(){e((0,F.y1)("File download will be handled directly by the browser."))}));(0,Ie.EN)(a,s),e((0,k.Mc)({ID:a,bucketName:t,done:!1,instanceID:r,percentage:0,prefix:i.name||"",type:"download",waitingForFile:!0,failed:!1,cancelled:!1,errorMessage:""}))}},Be=(0,C.Z)((function(e){return(0,c.Z)((0,o.Z)((0,o.Z)((0,o.Z)((0,o.Z)({},u.ID),u.DF),u.bK),u.Bz))})),Le=function(e){var t=e.open,n=e.closeModal,i=e.currentItem,o=e.internalPaths,a=e.actualInfo,s=e.bucketName,c=Be(),l=(0,d.TL)(),u=(0,r.useState)(i),h=(0,f.Z)(u,2),m=h[0],x=h[1],v=(0,r.useState)(!1),j=(0,f.Z)(v,2),g=j[0],_=j[1];return(0,O.jsxs)(X.Z,{title:"Rename Download",modalOpen:t,onClose:n,titleIcon:(0,O.jsx)(p.dY8,{}),children:[(0,O.jsxs)("div",{children:["The file you are trying to download has a long name.",(0,O.jsx)("br",{}),"This can cause issues on Windows Systems by trimming the file name after download.",(0,O.jsx)("br",{}),(0,O.jsx)("br",{})," We recommend to rename the file download"]}),(0,O.jsx)("form",{noValidate:!0,autoComplete:"off",onSubmit:function(e){!function(e){e.preventDefault(),Oe(l,s,o,a),n()}(e)},children:(0,O.jsxs)(b.ZP,{container:!0,children:[(0,O.jsxs)(b.ZP,{item:!0,xs:12,className:c.modalFormScrollable,children:[(0,O.jsx)(b.ZP,{item:!0,xs:12,className:c.formFieldRow,children:(0,O.jsx)(ke.Z,{id:"download-filename",name:"download-filename",onChange:function(e){x(e.target.value)},label:"",type:"text",value:m,error:m.length>200&&!g?"Filename should be less than 200 characters long.":""})}),(0,O.jsx)(b.ZP,{item:!0,xs:12,className:c.formFieldRow,children:(0,O.jsx)(Ee.Z,{value:"acceptLongName",id:"acceptLongName",name:"acceptLongName",checked:g,onChange:function(e){_(e.target.checked),e.target.checked&&x(i)},label:"Use Original Name"})})]}),(0,O.jsx)(b.ZP,{item:!0,xs:12,className:c.modalButtonBar,children:(0,O.jsx)(p.zxk,{id:"download-file",type:"submit",variant:"callAction",color:"primary",disabled:m.length>200&&!g,label:"Download File"})})]})})]})},Pe={is_latest:!0,last_modified:"",legal_hold_status:"",name:"",retention_mode:"",retention_until_date:"",size:0,tags:{},version_id:void 0},Ae=(0,l.Z)((function(){return(0,c.Z)((0,o.Z)((0,o.Z)((0,o.Z)((0,o.Z)({ObjectDetailsTitle:{display:"flex",alignItems:"center","& .min-icon":{width:26,height:26,minWidth:26,minHeight:26}},objectNameContainer:{whiteSpace:"nowrap",textOverflow:"ellipsis",overflow:"hidden",alignItems:"center",marginLeft:10},capitalizeFirst:{textTransform:"capitalize"}},u.OR),u.bK),u.VI),u.$b))}))((function(e){var t=e.classes,n=e.internalPaths,i=e.bucketName,o=e.versioningInfo,s=e.locking,c=e.onClosePanel,l=(0,d.TL)(),u=(0,a.v9)(F.N5),h=(0,a.v9)((function(e){return e.objectBrowser.versionsMode})),m=(0,a.v9)((function(e){return e.objectBrowser.selectedVersion})),x=(0,a.v9)((function(e){return e.objectBrowser.loadingObjectInfo})),v=(0,r.useState)(!1),_=(0,f.Z)(v,2),S=_[0],Z=_[1],C=(0,r.useState)(!1),w=(0,f.Z)(C,2),N=w[0],E=w[1],I=(0,r.useState)(!1),B=(0,f.Z)(I,2),L=B[0],P=B[1],D=(0,r.useState)(!1),R=(0,f.Z)(D,2),M=R[0],U=R[1],G=(0,r.useState)(!1),W=(0,f.Z)(G,2),K=W[0],J=W[1],Y=(0,r.useState)(null),q=(0,f.Z)(Y,2),$=q[0],X=q[1],Q=(0,r.useState)([]),ee=(0,f.Z)(Q,2),te=ee[0],ne=ee[1],ie=(0,r.useState)(null),re=(0,f.Z)(ie,2),se=re[0],ce=re[1],le=(0,r.useState)([]),fe=(0,f.Z)(le,2),me=fe[0],pe=fe[1],xe=(0,r.useState)(!1),ve=(0,f.Z)(xe,2),je=ve[0],ge=ve[1],Se=(0,r.useState)(!1),Ze=(0,f.Z)(Se,2),we=Ze[0],ye=Ze[1],Te=(0,r.useState)(0),Ne=(0,f.Z)(Te,2),ke=Ne[0],Ee=Ne[1],Ie=(0,r.useState)(!1),Be=(0,f.Z)(Ie,2),Ae=Be[0],De=Be[1],Re=(0,r.useState)(null),Me=(0,f.Z)(Re,2),Ue=Me[0],ze=Me[1],Ge=(0,r.useState)(!1),We=(0,f.Z)(Ge,2),Ke=We[0],He=We[1],Ve=((0,g.IO)(n)||"").split("/").pop()||"",Je=[];$&&$.name&&(Je=$.name.split("/")),(0,r.useEffect)((function(){if(u&&te&&te.length>=1){var e=te.find((function(e){return e.is_latest}))||Pe;""!==m&&(e=te.find((function(e){return e.version_id===m}))||Pe),e.is_delete_marker||He(!0),X(e)}}),[m,u,te]),(0,r.useEffect)((function(){x&&""!==n&&oe.h.buckets.listObjects(i,{prefix:n,with_versions:u}).then((function(e){var t=e.data.objects||[];if(u){ne(t),pe(t);var n=t.reduce((function(e,t){return null!==t&&void 0!==t&&t.size?e+t.size:e}),0);Ee(n)}else{var i=t[0];X(i),pe([]),i.is_delete_marker||He(!0)}l((0,k.vH)(!1))})).catch((function(e){console.error("Error loading object details",e.error),l((0,k.vH)(!1))}))}),[x,i,n,l,u,m]),(0,r.useEffect)((function(){Ke&&""!==n&&oe.h.buckets.getObjectMetadata(i,{prefix:n}).then((function(e){var t=j()(e.data,"objectMetadata",{});ze(t),He(!1)})).catch((function(e){console.error("Error Getting Metadata Status: ",e.detailedError),He(!1)}))}),[i,n,Ke]);var Ye=[];$&&$.tags&&(Ye=Object.keys($.tags));var qe=(0,O.jsx)("div",{style:{textAlign:"center",marginTop:35},children:(0,O.jsx)(p.aNw,{})});if(!$)return x?qe:null;var $e=Je.length>0?Je[Je.length-1]:$.name,Xe=[i,Ve,[i,$.name].join("/")],Qe=(0,y.F)(i,[T.Ft.S3_PUT_OBJECT_LEGAL_HOLD,T.Ft.S3_PUT_ACTIONS]),et=(0,y.F)(Xe,[T.Ft.S3_PUT_OBJECT_TAGGING,T.Ft.S3_PUT_ACTIONS]),tt=(0,y.F)(Xe,[T.Ft.S3_GET_OBJECT_RETENTION,T.Ft.S3_PUT_OBJECT_RETENTION,T.Ft.S3_GET_ACTIONS,T.Ft.S3_PUT_ACTIONS],!0),nt=(0,y.F)(Xe,[T.Ft.ADMIN_INSPECT_DATA]),it=(0,y.F)(Xe,[T.Ft.S3_GET_BUCKET_VERSIONING,T.Ft.S3_PUT_BUCKET_VERSIONING,T.Ft.S3_GET_OBJECT_VERSION,T.Ft.S3_GET_ACTIONS,T.Ft.S3_PUT_ACTIONS]),ot=(0,y.F)(Xe,[T.Ft.S3_GET_OBJECT,T.Ft.S3_GET_ACTIONS]),rt=(0,y.F)([i,Ve,[i,$.name].join("/")],[T.Ft.S3_DELETE_OBJECT]),at=[{action:function(){Oe(l,i,n,$)},label:"Download",disabled:!!$.is_delete_marker||!ot,icon:(0,O.jsx)(p._8t,{}),tooltip:ot?"Download this Object":(0,T.MK)([T.Ft.S3_GET_OBJECT,T.Ft.S3_GET_ACTIONS],"download this object")},{action:function(){Z(!0)},label:"Share",disabled:!!$.is_delete_marker||!ot,icon:(0,O.jsx)(p.aAc,{}),tooltip:ot?"Share this File":(0,T.MK)([T.Ft.S3_GET_OBJECT,T.Ft.S3_GET_ACTIONS],"share this object")},{action:function(){ye(!0)},label:"Preview",disabled:!!$.is_delete_marker||"none"===(0,A.Bg)(Ve)||!ot,icon:(0,O.jsx)(p.P99,{}),tooltip:ot?"Preview this File":(0,T.MK)([T.Ft.S3_GET_OBJECT,T.Ft.S3_GET_ACTIONS],"preview this object")},{action:function(){U(!0)},label:"Legal Hold",disabled:!s||!u||!!$.is_delete_marker||!Qe||""!==m,icon:(0,O.jsx)(p.fNL,{}),tooltip:Qe?s?"Change Legal Hold rules for this File":"Object Locking must be enabled on this bucket in order to set Legal Hold":(0,T.MK)([T.Ft.S3_PUT_OBJECT_LEGAL_HOLD,T.Ft.S3_PUT_ACTIONS],"change legal hold settings for this object")},{action:function(){E(!0)},label:"Retention",disabled:!u||!!$.is_delete_marker||!tt||""!==m||!s,icon:(0,O.jsx)(p.E9d,{}),tooltip:tt?s?"Change Retention rules for this File":"Object Locking must be enabled on this bucket in order to set Retention Rules":(0,T.MK)([T.Ft.S3_GET_OBJECT_RETENTION,T.Ft.S3_PUT_OBJECT_RETENTION,T.Ft.S3_GET_ACTIONS,T.Ft.S3_PUT_ACTIONS],"change Retention Rules for this object")},{action:function(){P(!0)},label:"Tags",disabled:!!$.is_delete_marker||""!==m||!et,icon:(0,O.jsx)(p.DgT,{}),tooltip:et?"Change Tags for this File":(0,T.MK)([T.Ft.S3_PUT_OBJECT_TAGGING,T.Ft.S3_GET_OBJECT_TAGGING,T.Ft.S3_GET_ACTIONS,T.Ft.S3_PUT_ACTIONS],"set Tags on this object")},{action:function(){J(!0)},label:"Inspect",disabled:!u||!!$.is_delete_marker||""!==m||!nt,icon:(0,O.jsx)(p.Gp8,{}),tooltip:nt?"Inspect this file":(0,T.MK)([T.Ft.ADMIN_INSPECT_DATA],"inspect this file")},{action:function(){l((0,k.db)({status:!h,objectName:$e}))},label:h?"Hide Object Versions":"Display Object Versions",icon:(0,O.jsx)(p.cRd,{}),disabled:!u||!($.version_id&&"null"!==$.version_id)||!it,tooltip:it?$.version_id&&"null"!==$.version_id?"Display Versions for this file":"":(0,T.MK)([T.Ft.S3_GET_BUCKET_VERSIONING,T.Ft.S3_PUT_BUCKET_VERSIONING,T.Ft.S3_GET_OBJECT_VERSION,T.Ft.S3_GET_ACTIONS,T.Ft.S3_PUT_ACTIONS],"display all versions of this object")}];return(0,O.jsxs)(r.Fragment,{children:[S&&$&&(0,O.jsx)(V.default,{open:S,closeModalAndRefresh:function(){ce(null),Z(!1)},bucketName:i,dataObject:se||$}),N&&$&&(0,O.jsx)(ae,{open:N,closeModalAndRefresh:function(e){E(!1),e&&l((0,k.vH)(!0))},objectName:Ve,objectInfo:$,bucketName:i}),je&&(0,O.jsx)(de,{deleteOpen:je,selectedBucket:i,selectedObject:n,closeDeleteModalAndRefresh:function(e){ge(!1),e&&""===m?c(!0):(l((0,k.Eq)(!0)),l((0,k.M3)("")),l((0,k.vH)(!0)))},versioningInfo:u?o:void 0,selectedVersion:m}),M&&$&&(0,O.jsx)(ue,{open:M,closeModalAndRefresh:function(e){U(!1),e&&l((0,k.vH)(!0))},objectName:$.name||"",bucketName:i,actualInfo:$}),we&&$&&(0,O.jsx)(he.default,{open:we,bucketName:i,object:{name:$.name||"",version_id:$.version_id||"null",size:$.size||0,content_type:"",last_modified:$.last_modified||""},onClosePreview:function(){ye(!1)}}),L&&$&&(0,O.jsx)(Ce,{modalOpen:L,bucketName:i,actualInfo:$,onCloseAndUpdate:function(e){P(!1),e&&l((0,k.vH)(!0))}}),K&&$&&(0,O.jsx)(Fe,{inspectOpen:K,volumeName:i,inspectPath:$.name||"",closeInspectModalAndRefresh:function(e){J(!1),e&&l((0,k.vH)(!0))}}),Ae&&$&&(0,O.jsx)(Le,{open:Ae,closeModal:function(){De(!1)},currentItem:Ve,bucketName:i,internalPaths:n,actualInfo:$}),x?(0,O.jsx)(r.Fragment,{children:qe}):(0,O.jsxs)(r.Fragment,{children:[(0,O.jsx)(p.Wk,{title:(0,O.jsxs)("div",{className:t.ObjectDetailsTitle,children:[_e($e||"",!0),(0,O.jsx)("span",{className:t.objectNameContainer,children:$e})]}),items:at}),(0,O.jsx)(z.Z,{tooltip:rt?"":(0,T.MK)([T.Ft.S3_DELETE_OBJECT],"delete this object"),children:(0,O.jsx)(b.ZP,{item:!0,xs:12,sx:{justifyContent:"center",display:"flex"},children:(0,O.jsx)(y.s,{resource:[i,Ve,[i,$.name].join("/")],scopes:[T.Ft.S3_DELETE_OBJECT],errorProps:{disabled:!0},children:(0,O.jsx)(p.zxk,{id:"delete-element-click",icon:(0,O.jsx)(p.pJl,{}),iconLocation:"start",fullWidth:!0,variant:"secondary",onClick:function(){ge(!0)},disabled:""===m&&$.is_delete_marker,sx:{width:"calc(100% - 44px)",margin:"8px 0"},label:"Delete".concat(""!==m?" version":"")})})})}),(0,O.jsx)(p.AG2,{icon:(0,O.jsx)(p.Gvh,{}),label:"Object Info"}),(0,O.jsxs)(H.Z,{className:t.detailContainer,children:[(0,O.jsx)("strong",{children:"Name:"}),(0,O.jsx)("br",{}),(0,O.jsx)("div",{style:{overflowWrap:"break-word"},children:$e})]}),""!==m&&(0,O.jsxs)(H.Z,{className:t.detailContainer,children:[(0,O.jsx)("strong",{children:"Version ID:"}),(0,O.jsx)("br",{}),m]}),(0,O.jsxs)(H.Z,{className:t.detailContainer,children:[(0,O.jsx)("strong",{children:"Size:"}),(0,O.jsx)("br",{}),(0,g.ae)("".concat($.size||"0"))]}),$.version_id&&"null"!==$.version_id&&""===m&&(0,O.jsxs)(H.Z,{className:t.detailContainer,children:[(0,O.jsx)("strong",{children:"Versions:"}),(0,O.jsx)("br",{}),me.length," version",1!==me.length?"s":"",","," ",(0,g.l5)(ke)]}),""===m&&(0,O.jsxs)(H.Z,{className:t.detailContainer,children:[(0,O.jsx)("strong",{children:"Last Modified:"}),(0,O.jsx)("br",{}),function(e){var t=new Date,n=new Date(e),i=t.getTime()-n.getTime(),o=(0,g.nF)(i,"ms");return""!==o.trim()?"".concat(o," ago"):"Just now"}($.last_modified||"")]}),(0,O.jsxs)(H.Z,{className:t.detailContainer,children:[(0,O.jsx)("strong",{children:"ETAG:"}),(0,O.jsx)("br",{}),$.etag||"N/A"]}),(0,O.jsxs)(H.Z,{className:t.detailContainer,children:[(0,O.jsx)("strong",{children:"Tags:"}),(0,O.jsx)("br",{}),0===Ye.length?"N/A":Ye.map((function(e,t){return(0,O.jsxs)("span",{children:[e,":",j()($,"tags.".concat(e),""),t<Ye.length-1?", ":""]},"key-vs-".concat(t.toString()))}))]}),(0,O.jsx)(H.Z,{className:t.detailContainer,children:(0,O.jsx)(y.s,{scopes:[T.Ft.S3_GET_OBJECT_LEGAL_HOLD,T.Ft.S3_GET_ACTIONS],resource:i,children:(0,O.jsxs)(r.Fragment,{children:[(0,O.jsx)("strong",{children:"Legal Hold:"}),(0,O.jsx)("br",{}),$.legal_hold_status?"On":"Off"]})})}),(0,O.jsx)(H.Z,{className:t.detailContainer,children:(0,O.jsx)(y.s,{scopes:[T.Ft.S3_GET_OBJECT_RETENTION,T.Ft.S3_GET_ACTIONS],resource:i,children:(0,O.jsxs)(r.Fragment,{children:[(0,O.jsx)("strong",{children:"Retention Policy:"}),(0,O.jsx)("br",{}),(0,O.jsx)("span",{className:t.capitalizeFirst,children:($.version_id&&$.version_id,(0,O.jsx)(r.Fragment,{children:$.retention_mode?$.retention_mode.toLowerCase():"None"}))})]})})}),!$.is_delete_marker&&(0,O.jsxs)(r.Fragment,{children:[(0,O.jsx)(p.AG2,{label:"Metadata",icon:(0,O.jsx)(p.fRO,{})}),(0,O.jsx)(H.Z,{className:t.detailContainer,children:$&&Ue?(0,O.jsx)(be,{metaData:Ue,linear:!0}):null})]})]})]})})),De=n(40986),Re=(0,l.Z)((function(e){return(0,c.Z)((0,o.Z)({},u.oO))}))((function(e){var t=e.classes,n=e.versionToRestore,i=e.bucketName,o=e.objectPath,a=e.restoreOpen,s=e.onCloseAndUpdate,c=(0,d.TL)(),l=(0,r.useState)(!1),u=(0,f.Z)(l,2),h=u[0],m=u[1];return(0,O.jsx)(se.Z,{title:"Restore File Version",confirmText:"Restore",isOpen:a,isLoading:h,titleIcon:(0,O.jsx)(p.D7Y,{}),onConfirm:function(){m(!0),oe.h.buckets.putObjectRestore(i,{prefix:(0,g.LL)(o),version_id:n.version_id||""}).then((function(){m(!1),s(!0),c((0,k.rI)({prefix:o,objectInfo:n}))})).catch((function(e){c((0,F.Ih)((0,re.g)(e.error))),m(!1)}))},confirmButtonProps:{variant:"secondary",disabled:h},onClose:function(){s(!1)},confirmationContent:(0,O.jsxs)(p.xuv,{id:"alert-dialog-description",children:["Are you sure you want to restore ",(0,O.jsx)("br",{}),(0,O.jsx)("b",{children:o})," ",(0,O.jsx)("br",{})," with Version ID:",(0,O.jsx)("br",{}),(0,O.jsx)("b",{className:t.wrapText,children:n.version_id}),"?"]})})})),Me=n(17691),Ue=function(e){var t="#000",n="";switch(e.type){case"null":t="#07193E",n="NULL VERSION";break;case"deleted":t="#868686",n="DELETED";break;default:t="#174551",n="CURRENT VERSION"}return(0,O.jsx)("span",{style:{backgroundColor:t,padding:"0 5px",display:"inline-block",color:"#FFF",fontWeight:"bold",fontSize:12,borderRadius:2,whiteSpace:"nowrap",margin:"0 10px"},children:n})},ze=n(34866),Ge=Me.ZP.div((function(e){var t=e.theme;return{"&:before":{content:"' '",display:"block",position:"absolute",width:"2px",height:"calc(100% + 2px)",backgroundColor:j()(t,"borderColor","#F8F8F8"),left:"24px"},"& .mainFileVersionItem":{borderBottom:"".concat(j()(t,"borderColor","#F8F8F8")," 1px solid"),padding:"1rem 0",margin:"0 0.5rem 0 2.5rem",cursor:"pointer","&.deleted":{color:"#868686"}},"& .intermediateLayer":{margin:"0 1.5rem 0 1.5rem","&:hover, &.selected":{backgroundColor:j()(t,"boxBackground","#F8F8F8"),"& > div":{borderBottomColor:j()(t,"boxBackground","#F8F8F8")}}},"& .versionContainer":{fontSize:16,fontWeight:"bold",display:"flex",alignItems:"center","& svg.min-icon":{width:18,height:18,minWidth:18,minHeight:18,marginRight:10}},"& .buttonContainer":{textAlign:"right","& button":{marginLeft:"1.5rem"}},"& .versionID":{fontSize:"12px",margin:"2px 0",whiteSpace:"nowrap",textOverflow:"ellipsis",maxWidth:"95%",overflow:"hidden"},"& .versionData":{marginRight:"10px",fontSize:12,color:"#868686"},"@media (max-width: 600px)":{"& .buttonContainer":{"& button":{marginLeft:"5px"}}},"@media (max-width: 799px)":{"&:before":{display:"none"},"& .mainFileVersionItem":{padding:"5px 0px",margin:0},"& .intermediateLayer":{margin:0,"&:hover, &.selected":{backgroundColor:"transparent","& > div":{borderBottomColor:j()(t,"boxBackground","#F8F8F8")}}},"& .versionContainer":{fontSize:14,"& svg.min-icon":{display:"none"}},"& .versionData":{textOverflow:"ellipsis",maxWidth:"95%",overflow:"hidden",whiteSpace:"nowrap"},"& .collapsableInfo":{display:"flex",flexDirection:"column"},"& .versionItem":{display:"none"}}}})),We=function(e){var t=e.fileName,n=e.versionInfo,i=e.isSelected,o=e.checkable,r=e.isChecked,a=e.onCheck,s=e.onShare,c=e.onDownload,l=e.onRestore,d=e.onPreview,u=e.globalClick,h=e.index,f=e.key,m=e.style,b=n.is_delete_marker,v=[{icon:(0,O.jsx)(p.P99,{}),action:d,tooltip:"Preview"},{icon:(0,O.jsx)(p._8t,{}),action:c,tooltip:"Download this version"},{icon:(0,O.jsx)(p.aAc,{}),action:s,tooltip:"Share this version"},{icon:(0,O.jsx)(p.D7Y,{}),action:l,tooltip:"Restore this version"}],j=null;n.is_delete_marker?j="deleted":n.is_latest?j="current":"null"===n.version_id&&(j="null");var _=x.ou.now();return n.last_modified&&(_=x.ou.fromISO(n.last_modified)),(0,O.jsx)(Ge,{children:(0,O.jsx)(p.rjZ,{container:!0,className:"ctrItem",onClick:function(){u(n)},style:m,children:(0,O.jsx)(p.rjZ,{item:!0,xs:12,className:"intermediateLayer".concat(" ",i?"selected":""),children:(0,O.jsxs)(p.rjZ,{item:!0,xs:!0,className:"mainFileVersionItem ".concat(n.is_delete_marker?"deleted":""),children:[(0,O.jsx)(p.rjZ,{item:!0,xs:12,children:(0,O.jsxs)(p.rjZ,{container:!0,children:[(0,O.jsxs)(p.rjZ,{item:!0,xs:!0,md:4,className:"versionContainer",children:[o&&(0,O.jsx)(ze.Z,{checked:r,id:"select-".concat(n.version_id),label:"",name:"select-".concat(n.version_id),onChange:function(e){e.stopPropagation(),e.preventDefault(),a(n.version_id||"")},value:n.version_id||"",disabled:n.is_delete_marker,overrideCheckboxStyles:{paddingLeft:0,height:34,width:25},noTopMargin:!0}),_e(t,!0)," v",h.toString(),(0,O.jsx)("span",{className:"versionItem",children:j&&(0,O.jsx)(Ue,{type:j})})]}),(0,O.jsx)(p.rjZ,{item:!0,xs:10,md:8,className:"buttonContainer",children:v.map((function(e,t){return(0,O.jsx)(p.ua7,{tooltip:e.tooltip,children:(0,O.jsx)(p.hU,{size:"small",id:"version-action-".concat(e.tooltip,"-").concat(t.toString()),className:"spacing".concat(" ",b?"buttonDisabled":""),disabled:b,onClick:function(t){t.stopPropagation(),b?t.preventDefault():e.action(n)},sx:{backgroundColor:"#F8F8F8",borderRadius:"100%",width:"28px",height:"28px",padding:"5px","& .min-icon":{width:"14px",height:"14px"}},children:e.icon})},"version-action-".concat(e.tooltip,"-").concat(t.toString()))}))})]})}),(0,O.jsx)(p.rjZ,{item:!0,xs:12,className:"versionID",children:"null"!==n.version_id?n.version_id:"-"}),(0,O.jsxs)(p.rjZ,{item:!0,xs:12,className:"collapsableInfo",children:[(0,O.jsxs)("span",{className:"versionData",children:[(0,O.jsx)("strong",{children:"Last modified:"})," ",_.toFormat("ccc, LLL dd yyyy HH:mm:ss (ZZZZ)")]}),(0,O.jsxs)("span",{className:"versionData",children:[(0,O.jsx)("strong",{children:"Size:"})," ",(0,g.ae)("".concat(n.size||"0"))]})]})]})})},f)})},Ke=function(e){var t=e.closeDeleteModalAndRefresh,n=e.deleteOpen,i=e.selectedBucket,o=e.selectedObject,s=(0,d.TL)(),c=(0,r.useState)(!1),l=(0,f.Z)(c,2),u=l[0],h=l[1],m=(0,r.useState)(""),x=(0,f.Z)(m,2),b=x[0],v=x[1],j=(0,r.useState)(!1),_=(0,f.Z)(j,2),S=_[0],Z=_[1],C=(0,a.v9)((function(e){return e.objectBrowser.retentionConfig})),w=(0,y.F)([i],[T.Ft.S3_BYPASS_GOVERNANCE_RETENTION])&&"governance"===(null===C||void 0===C?void 0:C.mode);if((0,r.useEffect)((function(){u&&oe.h.buckets.deleteObject(i,{path:o,non_current_versions:!0,bypass:S}).then((function(){t(!0)})).catch((function(e){s((0,F.Ih)((0,re.g)(e.error))),h(!1)}))}),[u,t,s,o,i,S]),!o)return null;return(0,O.jsx)(se.Z,{title:"Delete Non-Current versions",confirmText:"Delete",isOpen:n,titleIcon:(0,O.jsx)(p.NvT,{}),isLoading:u,onConfirm:function(){h(!0)},onClose:function(){return t(!1)},confirmButtonProps:{disabled:"YES, PROCEED"!==b||u},confirmationContent:(0,O.jsxs)(r.Fragment,{children:["Are you sure you want to delete all the non-current versions for:"," ",(0,O.jsx)("b",{children:(0,g.IO)(o)}),"? ",(0,O.jsx)("br",{}),w&&(0,O.jsx)(r.Fragment,{children:(0,O.jsx)("div",{style:{marginTop:10},children:(0,O.jsx)(p.rsf,{label:"Bypass Governance Mode",indicatorLabels:["Yes","No"],checked:S,value:"bypass_governance",id:"bypass_governance",name:"bypass_governance",onChange:function(e){Z(!S)},description:""})})}),(0,O.jsx)("br",{}),"To continue please type ",(0,O.jsx)("b",{children:"YES, PROCEED"})," in the box.",(0,O.jsx)("br",{}),(0,O.jsx)("br",{}),(0,O.jsx)(p.rjZ,{item:!0,xs:12,children:(0,O.jsx)(p.Wzg,{id:"type-confirm",name:"retype-tenant",onChange:function(e){v(e.target.value)},label:"",value:b})})]})})},He=function(e){var t=e.closeDeleteModalAndRefresh,n=e.deleteOpen,i=e.selectedBucket,o=e.selectedVersions,s=e.selectedObject,c=(0,d.TL)(),l=(0,r.useState)(!1),u=(0,f.Z)(l,2),h=u[0],m=u[1],x=(0,r.useState)(!1),b=(0,f.Z)(x,2),v=b[0],j=b[1],g=(0,a.v9)((function(e){return e.objectBrowser.retentionConfig})),_=(0,y.F)([i],[T.Ft.S3_BYPASS_GOVERNANCE_RETENTION])&&"governance"===(null===g||void 0===g?void 0:g.mode);return(0,r.useEffect)((function(){if(h){var e=o.map((function(e){return{path:s,versionID:e,recursive:!1}}));e.length>0&&oe.h.buckets.deleteMultipleObjects(i,e,{all_versions:!1,bypass:v}).then((function(){m(!1),t(!0)})).catch((function(e){c((0,F.Ih)((0,re.g)(e.error))),m(!1)}))}}),[h,t,i,s,o,v,c]),o?(0,O.jsx)(se.Z,{title:"Delete Selected Versions",confirmText:"Delete",isOpen:n,titleIcon:(0,O.jsx)(p.NvT,{}),isLoading:h,onConfirm:function(){m(!0)},onClose:function(){return t(!1)},confirmationContent:(0,O.jsxs)(r.Fragment,{children:["Are you sure you want to delete the selected ",o.length," ","versions for ",(0,O.jsx)("strong",{children:s}),"?",_&&(0,O.jsx)(r.Fragment,{children:(0,O.jsx)("div",{style:{marginTop:10},children:(0,O.jsx)(p.rsf,{label:"Bypass Governance Mode",indicatorLabels:["Yes","No"],checked:v,value:"bypass_governance",id:"bypass_governance",name:"bypass_governance",onChange:function(e){j(!v)},description:""})})})]})}):null},Ve=n(5171),Je={is_latest:!0,last_modified:"",legal_hold_status:"",name:"",retention_mode:"",retention_until_date:"",size:0,tags:{},version_id:void 0},Ye=(0,l.Z)((function(e){return(0,c.Z)((0,o.Z)((0,o.Z)((0,o.Z)((0,o.Z)((0,o.Z)((0,o.Z)((0,o.Z)({versionsContainer:{padding:10,"@media (max-width: 799px)":{minHeight:800}},noBottomBorder:{borderBottom:0},versionsVirtualPanel:{flexGrow:1,height:"calc(100% - 120px)",overflow:"auto","@media (max-width: 799px)":{height:600}},screenTitleContainer:{position:"relative","@media (max-width: 799px)":{"&::before":{display:"none"}}},sortByLabel:{color:"#838383",fontWeight:"bold",whiteSpace:"nowrap",marginRight:12,fontSize:14,"@media (max-width: 600px)":{display:"none"}}},u.OR),u.VX),u.bK),u.VI),u.cx),u.C4),u.Bz))}))((function(e){var t=e.classes,n=e.internalPaths,i=e.bucketName,o=(0,d.TL)(),s=(0,a.v9)((function(e){return e.objectBrowser.searchVersions})),c=(0,a.v9)((function(e){return e.objectBrowser.loadingVersions})),l=(0,a.v9)((function(e){return e.objectBrowser.selectedVersion})),u=(0,a.v9)(F.N5),m=(0,r.useState)(!1),x=(0,f.Z)(m,2),v=x[0],_=x[1],S=(0,r.useState)(null),Z=(0,f.Z)(S,2),C=Z[0],w=Z[1],y=(0,r.useState)(null),T=(0,f.Z)(y,2),N=T[0],E=T[1],I=(0,r.useState)([]),B=(0,f.Z)(I,2),L=B[0],A=B[1],D=(0,r.useState)(!1),R=(0,f.Z)(D,2),M=R[0],U=R[1],G=(0,r.useState)(null),W=(0,f.Z)(G,2),K=W[0],H=W[1],J=(0,r.useState)("date"),Y=(0,f.Z)(J,2),q=Y[0],$=Y[1],X=(0,r.useState)(!1),Q=(0,f.Z)(X,2),ee=Q[0],te=Q[1],ne=(0,r.useState)(!1),ie=(0,f.Z)(ne,2),ae=ie[0],se=ie[1],ce=(0,r.useState)(!1),le=(0,f.Z)(ce,2),de=le[0],ue=le[1],fe=(0,r.useState)([]),me=(0,f.Z)(fe,2),pe=me[0],xe=me[1],be=(0,r.useState)(!1),ve=(0,f.Z)(be,2),je=ve[0],ge=ve[1],_e=[];C&&C.name&&(_e=C.name.split("/")),(0,r.useEffect)((function(){c||C||o((0,k.Eq)(!0))}),[c,C,o]),(0,r.useEffect)((function(){c&&""!==n&&oe.h.buckets.listObjects(i,{prefix:n,with_versions:u}).then((function(e){var t=j()(e.data,"objects",[]),i=(0,g.IO)(n),r=t.filter((function(e){return e.name===i}));u?(w(r.find((function(e){return e.is_latest}))||Je),A(r)):(w(r[0]),A([])),o((0,k.Eq)(!1))})).catch((function(e){o((0,F.Ih)((0,re.g)(e.error))),o((0,k.Eq)(!1))}))}),[c,i,n,o,u]);var Se=function(e){E(e),_(!0)},Ze=function(e){E(e),te(!0)},Ce=function(e){H(e),U(!0)},we=function(e){Oe(o,i,n,e)},ye=function(e){o((0,k.M3)(e.version_id||""))},Te=L.filter((function(e){return!!e.version_id&&e.version_id.includes(s)})),Ne=L.reduce((function(e,t){return t.size?e+t.size:e}),0);Te.sort((function(e,t){if("size"===q)return e.size&&t.size?e.size<t.size?-1:e.size>t.size?1:0:0;var n=new Date(e.last_modified||"").getTime(),i=new Date(t.last_modified||"").getTime();return n<i?1:n>i?-1:0}));var Fe=function(e){if(pe.includes(e)){var t=pe.filter((function(t){return t!==e}));xe(t)}else{var n=(0,h.Z)(pe);n.push(e),xe(n)}};return(0,O.jsxs)(r.Fragment,{children:[v&&C&&(0,O.jsx)(V.default,{open:v,closeModalAndRefresh:function(){E(null),_(!1),te(!1)},bucketName:i,dataObject:N||C}),M&&C&&K&&(0,O.jsx)(Re,{restoreOpen:M,bucketName:i,versionToRestore:K,objectPath:C.name||"",onCloseAndUpdate:function(e){U(!1),H(null),e&&(o((0,k.Eq)(!0)),o((0,k.vH)(!0)))}}),ee&&C&&(0,O.jsx)(he.default,{open:ee,bucketName:i,object:{name:C.name||"",version_id:N&&N.version_id?N.version_id:"null",size:N&&N.size?N.size:0,content_type:"",last_modified:C.last_modified||""},onClosePreview:function(){te(!1)}}),ae&&(0,O.jsx)(Ke,{deleteOpen:ae,closeDeleteModalAndRefresh:function(e){se(!1),e&&(o((0,k.Eq)(!0)),o((0,k.M3)("")),o((0,k.vH)(!0)))},selectedBucket:i,selectedObject:n}),je&&(0,O.jsx)(He,{selectedBucket:i,selectedObject:(0,g.IO)(n),deleteOpen:je,selectedVersions:pe,closeDeleteModalAndRefresh:function(e){ge(!1),e&&(o((0,k.Eq)(!0)),o((0,k.M3)("")),o((0,k.vH)(!0)),xe([]))}}),(0,O.jsxs)(b.ZP,{container:!0,className:t.versionsContainer,children:[!C&&(0,O.jsx)(b.ZP,{item:!0,xs:12,children:(0,O.jsx)(De.Z,{})}),C&&(0,O.jsxs)(r.Fragment,{children:[(0,O.jsx)(b.ZP,{item:!0,xs:12,children:(0,O.jsx)(P,{bucketName:i,internalPaths:(0,g.IO)(n),hidePathButton:!0})}),(0,O.jsx)(b.ZP,{item:!0,xs:12,className:t.screenTitleContainer,children:(0,O.jsx)(p.UHn,{icon:(0,O.jsx)("span",{className:t.listIcon,children:(0,O.jsx)(p.cRd,{})}),title:"".concat(_e.length>0?_e[_e.length-1]:C.name," Versions"),subTitle:(0,O.jsxs)(r.Fragment,{children:[(0,O.jsx)("span",{className:t.detailsSpacer,children:(0,O.jsxs)("strong",{children:[L.length," Version",1===L.length?"":"s","\xa0\xa0\xa0"]})}),(0,O.jsx)("span",{className:t.detailsSpacer,children:(0,O.jsx)("strong",{children:(0,g.l5)(Ne)})})]}),actions:(0,O.jsxs)(r.Fragment,{children:[(0,O.jsx)(z.Z,{tooltip:"Select Multiple Versions",children:(0,O.jsx)(p.zxk,{id:"select-multiple-versions",onClick:function(){ue(!de)},icon:(0,O.jsx)(p.amE,{}),variant:de?"callAction":"regular",style:{marginRight:8}})}),de&&(0,O.jsx)(z.Z,{tooltip:"Delete Selected Versions",children:(0,O.jsx)(p.zxk,{id:"delete-multiple-versions",onClick:function(){ge(!0)},icon:(0,O.jsx)(p.pJl,{}),variant:"secondary",style:{marginRight:8},disabled:0===pe.length})}),(0,O.jsx)(z.Z,{tooltip:"Delete Non Current Versions",children:(0,O.jsx)(p.zxk,{id:"delete-non-current",onClick:function(){se(!0)},icon:(0,O.jsx)(p.utM,{}),variant:"secondary",style:{marginRight:15},disabled:L.length<=1})}),(0,O.jsx)(p.PhF,{id:"sort-by",options:[{label:"Date",value:"date"},{label:"Size",value:"size"}],value:q,label:"Sort by",onChange:function(e){$(e)},noLabelMinWidth:!0})]}),bottomBorder:!1})}),(0,O.jsx)(b.ZP,{item:!0,xs:12,className:t.versionsVirtualPanel,children:C.version_id&&"null"!==C.version_id&&(0,O.jsx)(Ve.aV,{style:{width:"100%"},containerStyle:{width:"100%",maxWidth:"100%"},width:1,height:800,rowCount:Te.length,rowHeight:108,rowRenderer:function(e){var t=e.key,n=e.index,i=(e.isScrolling,e.isVisible,e.style),o=L.length-n;return(0,O.jsx)(We,{style:i,fileName:(null===C||void 0===C?void 0:C.name)||"",versionInfo:Te[n],index:o,onDownload:we,onRestore:Ce,onShare:Se,onPreview:Ze,globalClick:ye,isSelected:l===Te[n].version_id,checkable:de,onCheck:Fe,isChecked:pe.includes(Te[n].version_id||"")},t)}})})]})]})]})})),qe=n(9859),$e=function(e){if(e.name.endsWith("/"))return"";var t=x.ou.now(),n=x.ou.fromISO(e.last_modified);return t.hasSame(n,"day")&&t.hasSame(n,"month")&&t.hasSame(n,"year")?"Today, ".concat(n.toFormat("HH:mm")):n.toFormat("ccc, LLL dd yyyy HH:mm (ZZZZ)")},Xe=function(e){return e.name.endsWith("/")||!e.size?"-":(0,g.ae)(String(e.size))},Qe=[{label:"Name",elementKey:"name",renderFunction:_e,enableSort:!0},{label:"Last Modified",elementKey:"last_modified",renderFunction:$e,renderFullObject:!0,enableSort:!0},{label:"Size",elementKey:"size",renderFunction:Xe,renderFullObject:!0,width:100,enableSort:!0}],et=[{label:"Name",elementKey:"name",renderFunction:_e,enableSort:!0},{label:"Object Date",elementKey:"last_modified",renderFunction:$e,renderFullObject:!0,enableSort:!0},{label:"Size",elementKey:"size",renderFunction:Xe,renderFullObject:!0,width:100,enableSort:!0},{label:"Deleted",elementKey:"delete_flag",renderFunction:function(e){return e?"Yes":"No"},width:60}],tt=n(46078),nt=(0,C.Z)((function(e){return(0,c.Z)({browsePaper:{border:0,"@media (max-width: 800px)":{width:800}},parentWrapper:{position:"relative",height:"calc(100% - 60px)","@media (max-width: 800px)":{overflowX:"auto"},"@media (max-width: 1060px)":{height:"calc(100% - 115px)"}},"@global":{".rowLine:hover .iconFileElm":{backgroundImage:"url(/images/ob_file_filled.svg)"},".rowLine:hover .iconFolderElm":{backgroundImage:"url(/images/ob_folder_filled.svg)"}}})})),it=function(e){var t=e.internalPaths,n=nt(),i=(0,d.TL)(),o=(0,s.UO)(),c=(0,s.s0)(),l=(0,r.useState)("ASC"),u=(0,f.Z)(l,2),m=u[0],x=u[1],b=(0,r.useState)("name"),v=(0,f.Z)(b,2),_=v[0],S=v[1],Z=o.bucketName||"",C=(0,a.v9)((function(e){return e.objectBrowser.objectDetailsOpen})),w=(0,a.v9)((function(e){return e.objectBrowser.loadingObjects})),N=(0,a.v9)(tt.$4),F=!(null===N||void 0===N||!N.includes("object-browser-only")),E=(0,a.v9)((function(e){return e.objectBrowser.rewind.rewindEnabled})),I=(0,a.v9)((function(e){return e.objectBrowser.records})),B=(0,a.v9)((function(e){return e.objectBrowser.searchObjects})),L=(0,a.v9)((function(e){return e.objectBrowser.selectedObjects})),P=(0,a.v9)((function(e){return e.objectBrowser.connectionError})),D=(0,a.v9)((function(e){return e.system.anonymousMode})),R=(0,y.F)(Z,[T.Ft.S3_LIST_BUCKET,T.Ft.S3_ALL_LIST_BUCKET]),M=I.filter((function(e){return""===B||e.name.toLowerCase().indexOf(B.toLowerCase())>=0})).sort((0,A.P_)(_)),U=[];U="ASC"===m?M:M.reverse();var z=[{type:"view",label:"View",onClick:function(e){var n,o=e.name||"",r="/browser/".concat(Z).concat(o?"/".concat((0,g.LL)(o)):"");!D||null===t||null!==(n=e.name)&&void 0!==n&&n.endsWith("/")?(i((0,k.S2)([])),c(r),D||(i((0,k.vb)(!0)),i((0,k.Eq)(!0)),i((0,k.d_)(!0))),i((0,k.EE)("".concat(o?"".concat((0,g.LL)(o)):"")))):Oe(i,Z,"".concat((0,g.LL)(o)),e)},sendOnlyId:!1}],G=R||D?"This location is empty".concat(E?"":", please try uploading a new file"):(0,T.MK)([T.Ft.S3_LIST_BUCKET,T.Ft.S3_ALL_LIST_BUCKET],"view Objects in this bucket");P&&(G="Objects List unavailable. Please review your WebSockets configuration and try again");var W="calc(100vh - 290px)";return F&&(W="calc(100vh - 315px)"),(0,O.jsx)(p.wQF,{itemActions:z,columns:E?et:Qe,isLoading:w,entityName:"Objects",idField:"name",records:U,customPaperHeight:W,selectedItems:L,onSelect:D?void 0:function(e){var t=e.target,n=t.value,o=t.checked,r=(0,h.Z)(L);return o?r.push(n):r=r.filter((function(e){return e!==n})),i((0,k.S2)(r)),i((0,k.EE)(null)),r},customEmptyMessage:G,sortConfig:{currentSort:_,currentDirection:m,triggerSort:function(e){var t=j()(e,"sortDirection","DESC");S(e.sortBy),x(t),i((0,k.Cn)(!0))}},onSelectAll:function(){if(i((0,k.EE)(null)),L.length!==U.length){var e=U.map((function(e){return e.name}));i((0,k.S2)(e))}else i((0,k.S2)([]))},rowStyle:function(e){var t,n=e.index;return null!==(t=U[n])&&void 0!==t&&t.delete_flag?"deleted":""},parentClassName:n.parentWrapper,sx:{minHeight:C?"100%":"initial"},noBackground:!0})},ot=n(96382),rt=(0,ot.hg)("objectBrowser/downloadSelected",function(){var e=(0,ye.Z)((0,we.Z)().mark((function e(t,n){var i,o,r,a,s,c;return(0,we.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=n.getState,n.rejectWithValue,o=n.dispatch,r=i(),a=function(e){var n=(0,g.LL)("".concat(t,"-").concat(e.name,"-").concat((new Date).getTime(),"-").concat(Math.random())),i=(0,Ie.YO)(8),r=(0,A.LR)(t,(0,g.LL)(e.name),e.version_id,e.size,null,i,(function(e){o((0,k.RO)({instanceID:n,progress:e}))}),(function(){o((0,k.oK)(n))}),(function(e){o((0,k.qJ)({instanceID:n,msg:e}))}),(function(){o((0,k.Im)(n))}),(function(){o((0,F.y1)("File download will be handled directly by the browser."))}));(0,Ie.EN)(i,r),o((0,k.Mc)({ID:i,bucketName:t,done:!1,instanceID:n,percentage:0,prefix:e.name,type:"download",waitingForFile:!0,failed:!1,cancelled:!1,errorMessage:""}))},0===r.objectBrowser.selectedObjects.length){e.next=12;break}if(s=[],c=function(e){return r.objectBrowser.selectedObjects.includes(e.name)},1!==(s=r.objectBrowser.records.filter(c)).length){e.next=11;break}if(!(s[0].name.length>200&&(0,g.mv)().toLowerCase().includes("win"))){e.next=11;break}return o((0,k.$y)(s[0])),e.abrupt("return");case 11:s.forEach((function(e){a(e)}));case 12:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}()),at=(0,ot.hg)("objectBrowser/openPreview",function(){var e=(0,ye.Z)((0,we.Z)().mark((function e(t,n){var i,o,r,a,s;return(0,we.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:i=n.getState,n.rejectWithValue,o=n.dispatch,1===(r=i()).objectBrowser.selectedObjects.length&&(s=function(e){return r.objectBrowser.selectedObjects.includes(e.name)},(a=r.objectBrowser.records.find(s))&&(o((0,k.eP)(a)),o((0,k.ei)(!0))));case 3:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}()),st=(0,ot.hg)("objectBrowser/openShare",function(){var e=(0,ye.Z)((0,we.Z)().mark((function e(t,n){var i,o,r,a,s;return(0,we.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:i=n.getState,n.rejectWithValue,o=n.dispatch,1===(r=i()).objectBrowser.selectedObjects.length&&(s=function(e){return r.objectBrowser.selectedObjects.includes(e.name)},(a=r.objectBrowser.records.find(s))&&(o((0,k.eP)(a)),o((0,k.Qf)(!0))));case 3:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}()),ct=(0,ot.hg)("objectBrowser/openAnonymousAccess",function(){var e=(0,ye.Z)((0,we.Z)().mark((function e(t,n){var i,o,r;return(0,we.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:i=n.getState,o=n.dispatch,1===(r=i()).objectBrowser.selectedObjects.length&&r.objectBrowser.selectedObjects[0].endsWith("/")&&o((0,k.xV)(!0));case 3:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}()),lt=n(59114),dt=function(){var e=(0,d.TL)(),t=(0,a.v9)((function(e){return e.objectBrowser.searchObjects}));return(0,O.jsx)(lt.Z,{placeholder:"Start typing to filter objects in the bucket",onChange:function(t){e((0,k.G4)(t))},value:t})},ut=n(94619),ht=(0,N.Z)(r.lazy((function(){return n.e(711).then(n.bind(n,50711))}))),ft=(0,N.Z)(r.lazy((function(){return Promise.resolve().then(n.bind(n,34433))}))),mt=(0,N.Z)(r.lazy((function(){return Promise.all([n.e(7847),n.e(6901)]).then(n.bind(n,26901))}))),pt=(0,N.Z)(r.lazy((function(){return Promise.resolve().then(n.bind(n,78562))}))),xt=(0,C.Z)((function(e){return(0,c.Z)((0,o.Z)((0,o.Z)((0,o.Z)((0,o.Z)((0,o.Z)((0,o.Z)({badgeOverlap:{"& .MuiBadge-badge":{top:10,right:1,width:5,height:5,minWidth:5}}},u.VX),u.OR),u.qg),{},{searchField:(0,o.Z)((0,o.Z)({},u.qg.searchField),{},{maxWidth:380}),screenTitleContainer:{border:"#EAEDEE 1px solid",padding:"0 5px"},labelStyle:{color:"#969FA8",fontSize:"12px"},breadcrumbsContainer:{padding:"12px 14px 5px"},fullContainer:{width:"100%",position:"relative","&.detailsOpen":{"@media (max-width: 799px)":{display:"none"}}},hideListOnSmall:{"@media (max-width: 799px)":{display:"none"}},actionsSection:{display:"flex",justifyContent:"space-between",width:"100%"}},u.C4),u.cx),u.Bz))})),bt={borderWidth:2,borderRadius:2,borderColor:"#eeeeee",outline:"none"},vt={borderStyle:"dashed",backgroundColor:"#fafafa",borderColor:"#2196f3"},jt={borderStyle:"dashed",backgroundColor:"#fafafa",borderColor:"#00e676"},gt=function(){var e,t=xt(),n=(0,d.TL)(),i=(0,s.UO)(),c=(0,s.s0)(),l=(0,s.TH)(),u=(0,a.v9)((function(e){return e.objectBrowser.rewind.rewindEnabled})),v=(0,a.v9)((function(e){return e.objectBrowser.rewind.bucketToRewind})),S=(0,a.v9)((function(e){return e.objectBrowser.versionsMode})),Z=(0,a.v9)((function(e){return e.objectBrowser.showDeleted})),C=(0,a.v9)((function(e){return e.objectBrowser.objectDetailsOpen})),w=(0,a.v9)((function(e){return e.objectBrowser.selectedInternalPaths})),N=(0,a.v9)((function(e){return e.objectBrowser.loadingObjects})),B=(0,a.v9)((function(e){return e.objectBrowser.simplePath})),L=(0,a.v9)((function(e){return e.objectBrowser.versionInfo})),D=(0,a.v9)((function(e){return e.objectBrowser.lockingEnabled})),R=(0,a.v9)((function(e){return e.objectBrowser.downloadRenameModal})),M=(0,a.v9)((function(e){return e.objectBrowser.selectedPreview})),U=(0,a.v9)((function(e){return e.objectBrowser.shareFileModalOpen})),W=(0,a.v9)((function(e){return e.objectBrowser.previewOpen})),H=(0,a.v9)((function(e){return e.objectBrowser.selectedBucket})),V=(0,a.v9)((function(e){return e.system.anonymousMode})),J=(0,a.v9)((function(e){return e.objectBrowser.anonymousAccessOpen})),Y=(0,a.v9)(qe.HQ),q=(0,a.v9)(qe.G6),$=(0,r.useState)(!1),X=(0,f.Z)($,2),Q=X[0],ee=X[1],te=(0,r.useState)(!1),ne=(0,f.Z)(te,2),ie=ne[0],ae=ne[1],se=(0,r.useState)(!1),ce=(0,f.Z)(se,2),de=ce[0],ue=ce[1],he=(0,r.useState)(!1),fe=(0,f.Z)(he,2),me=fe[0],pe=fe[1],xe=(0,r.useState)(!1),be=(0,f.Z)(xe,2),ve=be[0],je=be[1],ge=(0,r.useState)(null),_e=(0,f.Z)(ge,2),Se=_e[0],Ze=_e[1],Ce=le(L.status),we=i.bucketName||"",ye=l.pathname.split("/browser/".concat(we,"/")),Te=2===ye.length?ye[1]:"",Ne=(0,g.IO)(Te),Fe=Ne.split("/").filter((function(e){return""!==e})),ke=[we];Fe.length>0&&(ke=ke.concat(Fe));var Ee=(0,r.useRef)(null),Oe=(0,r.useRef)(null),Be=(0,a.v9)((function(e){return e.console.session&&e.console.session.permissions||{}})),Pe=[T.Ft.S3_PUT_OBJECT,T.Ft.S3_PUT_ACTIONS],De=ke.join("/"),Re=function(e,t){var n=I(e,t,arguments.length>2&&void 0!==arguments[2]?arguments[2]:[]).reduce((function(e,t){var n=E(t);return n&&e.push(".".concat(n)),e}),[]);return(0,h.Z)(new Set(n)).join(",")}(Be,De,Pe),Me=I(Be,De,Pe),Ue=(0,y.F)(we,[T.Ft.S3_GET_OBJECT,T.Ft.S3_GET_ACTIONS]),Ge=(0,y.F)(we,[T.Ft.S3_DELETE_OBJECT]),We=(0,y.F)([De].concat((0,h.Z)(Me)),Pe)||V,Ke=(0,y.F)(we,[T.Ft.S3_DELETE_OBJECT]),He=(0,y.F)(we,[T.Ft.S3_GET_BUCKET_POLICY,T.Ft.S3_PUT_BUCKET_POLICY,T.Ft.S3_GET_ACTIONS,T.Ft.S3_PUT_ACTIONS]),Ve=(0,a.v9)((function(e){return e.objectBrowser.selectedObjects}));(0,r.useEffect)((function(){n((0,k.G4)("")),n((0,k.Cn)(!0)),n((0,k.S2)([]))}),[B,n]),(0,r.useEffect)((function(){u&&v!==we&&n((0,k._w)())}),[u,v,we,n]),(0,r.useEffect)((function(){null!==Oe.current&&(Oe.current.setAttribute("directory",""),Oe.current.setAttribute("webkitdirectory",""))}),[Oe]),(0,r.useEffect)((function(){if(1===Ve.length){var e=Ve[0];"none"!==(0,A.Bg)(e)?je(!0):je(!1),e.endsWith("/")?pe(!1):pe(!0)}else pe(!1),je(!1)}),[Ve]),(0,r.useEffect)((function(){Se||V||oe.h.buckets.getBucketQuota(we).then((function(e){var t=null;e.data.quota&&(t=e.data),Ze(t)})).catch((function(e){console.error("Error Getting Quota Status: ",e.error.detailedMessage),Ze(null)}))}),[Se,we,V]),(0,r.useEffect)((function(){Ve.length>0?n((0,k.vb)(!0)):0!==Ve.length||null!==w||N||n((0,k.vb)(!1))}),[Ve,w,n,N]),(0,r.useEffect)((function(){de||(n((0,qe.d5)(!0)),ue(!0))}),[de,n,ue]),(0,r.useEffect)((function(){!N&&!Y||V||oe.h.buckets.bucketInfo(we).then((function(e){n((0,qe.d5)(!1)),n((0,qe.f4)(e.data)),n((0,k.RS)(we))})).catch((function(e){n((0,qe.d5)(!1)),n((0,F.Ih)((0,re.g)(e)))}))}),[we,Y,n,V,N]),(0,r.useEffect)((function(){""!==H&&oe.h.buckets.getBucketRetentionConfig(H).then((function(e){n((0,k.c8)(e.data))})).catch((function(){n((0,k.c8)(null))}))}),[H,n]);var Je=function(e){if(null!==e&&void 0!==e&&null!==e.target.files&&void 0!==e.target.files){e.preventDefault();for(var t=[],n=0;n<e.target.files.length;n++)t.push(e.target.files[n]);$e(t,""),e.target.value=""}},$e=(0,r.useCallback)((function(e,t){var i="";B&&(i=B.endsWith("/")?B:B+"/");!function(e,t,i,o){var r=function(r){return new Promise((function(a,s){var c="api/v1/buckets/".concat(t,"/objects/upload"),l=r.name,d=new Blob([r],{type:r.type}),u="",h=j()(r,"path",""),f=j()(r,"webkitRelativePath",""),m=o,p=(0,Ie.YO)(8);if(""!==h?m=h:""!==f&&(m=f),""!==i||""!==m){var x=m.split("/").slice(0,-1).join("/"),b=i.endsWith("/")?i.slice(0,-1):i;u=(0,g.LL)("".concat(b).concat(b.endsWith("/")||""===x||x.startsWith("/")?"":"/").concat(x).concat(!x.endsWith("/")||""===x.trim()&&!i.endsWith("/")?"/":""))}""!==u&&(c="".concat(c,"?prefix=").concat(u));var v=(0,g.LL)("".concat(t,"-").concat(u,"-").concat((new Date).getTime(),"-").concat(Math.random())),_=new XMLHttpRequest;_.open("POST",c,!0),V&&_.setRequestHeader("X-Anonymous","1");var S=e.length>1,Z="An error occurred while uploading the file".concat(S?"s":"","."),C={413:"Error - File size too large"};_.withCredentials=!1,_.onload=function(e){if(_.status>=200&&_.status<300)n((0,k.oK)(v)),a({status:_.status}),(0,Ie.GM)(p);else{if(C[_.status])Z=C[_.status];else if(_.response)try{var t=JSON.parse(_.response);Z=t.detailedMessage}catch(i){Z="something went wrong"}n((0,k.qJ)({instanceID:v,msg:Z})),s({status:_.status,message:Z}),(0,Ie.GM)(p)}},_.upload.addEventListener("error",(function(e){s(Z),n((0,k.qJ)({instanceID:v,msg:"A network error occurred."}))})),_.upload.addEventListener("progress",(function(e){var t=Math.floor(100*e.loaded/e.total);n((0,k.RO)({instanceID:v,progress:t}))})),_.onerror=function(){s(Z),n((0,k.qJ)({instanceID:v,msg:"A network error occurred."}))},_.onloadend=function(){0===e.length&&n((0,k.Cn)(!0))},_.onabort=function(){n((0,k.Im)(v))};var w=new FormData;void 0!==r.size&&(w.append(r.size.toString(),d,l),(0,Ie.EN)(p,_),n((0,k.Mc)({ID:p,bucketName:t,done:!1,instanceID:v,percentage:0,prefix:"".concat((0,g.IO)(u)).concat(l),type:"upload",waitingForFile:!1,failed:!1,cancelled:!1,errorMessage:""})),(0,Ie.N5)(p,w))}))},a=[];n((0,k.LD)());for(var s=0;s<e.length;s++){var c=e[s];a.push(r(c))}Promise.allSettled(a).then((function(e){var t=e.filter((function(e){return"rejected"===e.status}));if(t.length>0){var i=a.length,o=a.length-t.length,r={errorMessage:"There were some errors during file upload",detailedError:"Uploaded files ".concat(o,"/").concat(i)};n((0,F.Ih)(r))}n((0,k.Cn)(!0)),n((0,k.S2)([]))}))}(e,we,i,t)}),[we,n,B,V]),Xe=(0,r.useCallback)((function(e){if(e&&e.length>0&&We){var t,i,o=e[0].path,r=[];if((r=Re.length>0?e.filter((function(e){var t=E(e.name);return Re.includes(t)})):e).length)$e(r,o),(t=console).log.apply(t,["".concat(r.length," Allowed Files Processed out of ").concat(e.length,"."),De].concat((0,h.Z)(Me))),r.length!==e.length&&n((0,F.Ih)({errorMessage:"Upload is restricted.",detailedError:(0,T.MK)([T.Ft.S3_PUT_OBJECT,T.Ft.S3_PUT_ACTIONS],"upload objects to this location")}));else n((0,F.Ih)({errorMessage:"Could not process drag and drop.",detailedError:(0,T.MK)([T.Ft.S3_PUT_OBJECT,T.Ft.S3_PUT_ACTIONS],"upload objects to this location")})),(i=console).error.apply(i,["Could not process drag and drop . upload may be restricted.",De].concat((0,h.Z)(Me)))}We||n((0,F.Ih)({errorMessage:"Upload not allowed",detailedError:(0,T.MK)([T.Ft.S3_PUT_OBJECT,T.Ft.S3_PUT_ACTIONS],"upload objects to this location")}))}),[$e]),Qe=(0,m.uI)({noClick:!0,onDrop:Xe}),et=Qe.getRootProps,tt=Qe.getInputProps,nt=Qe.isDragActive,ot=Qe.isDragAccept,lt=(0,r.useMemo)((function(){return(0,o.Z)((0,o.Z)((0,o.Z)({},bt),nt?vt:{}),ot?jt:{})}),[nt,ot]),gt=function(e){if(n((0,k.EE)(null)),n((0,k.db)({status:!1})),C&&null!==w){var t=(0,g.IO)(Te).split("/");t.pop();var i="";t&&t.length>0&&(i="".concat(t.join("/"),"/")),c("/browser/".concat(we,"/").concat((0,g.LL)(i)))}n((0,k.vb)(!1)),n((0,k.S2)([])),e&&n((0,k.Cn)(!0))},_t=x.ou.now();null!==q&&void 0!==q&&q.creation_date&&(_t=x.ou.fromISO(q.creation_date));var St=[{action:function(){n(rt(we))},label:"Download",disabled:!Ue||0===(null===Ve||void 0===Ve?void 0:Ve.length),icon:(0,O.jsx)(p._8t,{}),tooltip:Ue?"Download Selected":(0,T.MK)([T.Ft.S3_GET_OBJECT,T.Ft.S3_GET_ACTIONS],"download objects from this bucket")},{action:function(){n(st())},label:"Share",disabled:1!==Ve.length||!me,icon:(0,O.jsx)(p.aAc,{}),tooltip:me?"Share Selected File":"Sharing unavailable"},{action:function(){n(at())},label:"Preview",disabled:1!==Ve.length||!ve,icon:(0,O.jsx)(p.P99,{}),tooltip:ve?"Preview Selected File":"Preview unavailable"},{action:function(){n(ct())},label:"Anonymous Access",disabled:1!==Ve.length||!Ve[0].endsWith("/")||!He,icon:(0,O.jsx)(p.cuP,{}),tooltip:1===Ve.length&&Ve[0].endsWith("/")?"Set Anonymous Access to this Folder":"Anonymous Access unavailable"},{action:function(){ee(!0)},label:"Delete",icon:(0,O.jsx)(p.pJl,{}),disabled:!Ge||0===Ve.length||!Ke,tooltip:Ge?"Delete Selected Files":(0,T.MK)([T.Ft.S3_DELETE_OBJECT],"delete objects in this bucket")}];return(0,O.jsxs)(r.Fragment,{children:[U&&M&&(0,O.jsx)(ft,{open:U,closeModalAndRefresh:function(){n((0,k.Qf)(!1)),n((0,k.eP)(null))},bucketName:we,dataObject:{name:M.name,last_modified:"",version_id:M.version_id}}),Q&&(0,O.jsx)(ht,{deleteOpen:Q,selectedBucket:we,selectedObjects:Ve,closeDeleteModalAndRefresh:function(e){ee(!1),e&&(n((0,F.y1)("Objects deleted successfully.")),n((0,k.S2)([])),n((0,k.Cn)(!0)))},versioning:L}),ie&&(0,O.jsx)(mt,{open:ie,closeModalAndRefresh:function(){ae(!1)},bucketName:we}),W&&(0,O.jsx)(pt,{open:W,bucketName:we,object:M,onClosePreview:function(){n((0,k.ei)(!1)),n((0,k.eP)(null))}}),!!R&&(0,O.jsx)(Le,{open:!!R,closeModal:function(){n((0,k.$y)(null))},currentItem:(null===(e=R.name.split("/"))||void 0===e?void 0:e.pop())||"",bucketName:we,internalPaths:Te,actualInfo:{name:R.name,last_modified:"",version_id:R.version_id,size:R.size}}),J&&(0,O.jsx)(ut.default,{onClose:function(){n((0,k.xV)(!1))},bucket:we,modalOpen:J,prefilledRoute:"".concat(Ve[0],"*")}),(0,O.jsxs)(p.Xgh,{variant:"full",children:[V&&(0,O.jsx)("div",{style:{paddingBottom:16},children:(0,O.jsx)(dt,{})}),(0,O.jsx)(b.ZP,{item:!0,xs:12,className:t.screenTitleContainer,children:(0,O.jsx)(p.UHn,{icon:(0,O.jsx)("span",{children:(0,O.jsx)(p.wNb,{style:{width:30}})}),title:we,subTitle:V?null:(0,O.jsxs)(r.Fragment,{children:[(0,O.jsxs)("span",{className:t.detailsSpacer,children:["Created on:\xa0\xa0",(0,O.jsx)("strong",{children:null!==q&&void 0!==q&&q.creation_date?_t.toFormat("ccc, LLL dd yyyy HH:mm:ss (ZZZZ)"):""})]}),(0,O.jsxs)("span",{className:t.detailsSpacer,children:["Access:\xa0\xa0\xa0",(0,O.jsx)("strong",{children:(null===q||void 0===q?void 0:q.access)||""})]}),q&&(0,O.jsx)(r.Fragment,{children:(0,O.jsxs)("span",{className:t.detailsSpacer,children:[q.size&&(0,O.jsx)(r.Fragment,{children:(0,g.l5)(q.size)}),q.size&&Se&&(0,O.jsxs)(r.Fragment,{children:[" ","/ ",(0,g.l5)(Se.quota||0)]}),q.size&&q.objects?" - ":"",q.objects&&(0,O.jsxs)(r.Fragment,{children:[q.objects,"\xa0Object",q.objects&&1!==q.objects?"s":""]})]})})]}),actions:(0,O.jsxs)(r.Fragment,{children:[!V&&(0,O.jsx)(z.Z,{tooltip:"Rewind Bucket",children:(0,O.jsx)(p.zxk,{id:"rewind-objects-list",label:"Rewind",icon:(0,O.jsx)(_.Z,{badgeContent:" ",color:"secondary",variant:"dot",invisible:!u,className:t.badgeOverlap,sx:{height:16},children:(0,O.jsx)(p.F_y,{style:{minWidth:16,minHeight:16,width:16,height:16,marginTop:-3}})}),variant:"regular",onClick:function(){ae(!0)},disabled:!Ce||!(0,y.F)(we,[T.Ft.S3_GET_OBJECT,T.Ft.S3_GET_ACTIONS])})}),(0,O.jsx)(z.Z,{tooltip:"Reload List",children:(0,O.jsx)(p.zxk,{id:"refresh-objects-list",label:"Refresh",icon:(0,O.jsx)(p.DuK,{}),variant:"regular",onClick:function(){S?n((0,k.Eq)(!0)):(n((0,k.o_)()),n((0,k._D)(!0)),n((0,k.Cn)(!0)))},disabled:!V&&(!(0,y.F)(we,[T.Ft.S3_LIST_BUCKET,T.Ft.S3_ALL_LIST_BUCKET])||u)})}),(0,O.jsx)("input",{type:"file",multiple:!0,accept:Re||void 0,onChange:Je,style:{display:"none"},ref:Ee}),(0,O.jsx)("input",{type:"file",multiple:!0,onChange:Je,style:{display:"none"},ref:Oe}),(0,O.jsx)(G,{bucketName:we,uploadPath:De,uploadFileFunction:function(e){Ee&&Ee.current&&Ee.current.click(),e()},uploadFolderFunction:function(e){Oe&&Oe.current&&Oe.current.click(),e()}})]}),bottomBorder:!1})}),(0,O.jsxs)("div",(0,o.Z)((0,o.Z)({id:"object-list-wrapper"},et({style:(0,o.Z)({},lt)})),{},{children:[(0,O.jsx)("input",(0,o.Z)({},tt())),(0,O.jsxs)(b.ZP,{item:!0,xs:12,className:t.tableBlock,sx:{border:"#EAEDEE 1px solid",borderTop:0},children:[S?(0,O.jsx)(r.Fragment,{children:null!==w&&(0,O.jsx)(Ye,{internalPaths:w,bucketName:we})}):(0,O.jsx)(y.s,{scopes:[T.Ft.S3_LIST_BUCKET,T.Ft.S3_ALL_LIST_BUCKET],resource:we,errorProps:{disabled:!0},children:(0,O.jsxs)(b.ZP,{item:!0,xs:12,className:"".concat(t.fullContainer," ").concat(C?"detailsOpen":""," "),children:[!V&&(0,O.jsx)(b.ZP,{item:!0,xs:12,className:t.breadcrumbsContainer,children:(0,O.jsx)(P,{bucketName:we,internalPaths:Ne,additionalOptions:!Ce||u?null:(0,O.jsx)("div",{children:(0,O.jsx)(ze.Z,{name:"deleted_objects",id:"showDeletedObjects",value:"deleted_on",label:"Show deleted objects",onChange:function(){n((0,k.o_)()),n((0,k.mz)(!Z)),gt(!0)},checked:Z,overrideLabelClasses:t.labelStyle,className:t.overrideShowDeleted,noTopMargin:!0})}),hidePathButton:!1})}),(0,O.jsx)(it,{internalPaths:w})]})}),!V&&(0,O.jsx)(y.s,{scopes:[T.Ft.S3_LIST_BUCKET,T.Ft.S3_ALL_LIST_BUCKET],resource:we,errorProps:{disabled:!0},children:(0,O.jsxs)(K,{open:C,closePanel:function(){gt(!1)},className:"".concat(S?t.hideListOnSmall:""),children:[Ve.length>0&&(0,O.jsx)(p.Wk,{items:St,title:"Selected Objects:"}),null!==w&&(0,O.jsx)(Ae,{internalPaths:w,bucketName:we,onClosePanel:gt,versioningInfo:L,locking:D})]})})]})]}))]})]})},_t=n(49535),St=n(26824),Zt=n(73996),Ct=n(47974),wt=n(4677),yt=n(99670),Tt=function(e){var t=e.bucketName,n=(0,d.TL)(),i=(0,a.v9)(tt.$4),o=(0,a.v9)((function(e){return e.objectBrowser.versionsMode})),c=(0,a.v9)((function(e){return e.objectBrowser.versionedFile})),l=(0,a.v9)((function(e){return e.objectBrowser.searchVersions})),u=!(null===i||void 0===i||!i.includes("object-browser-only")),h=(0,s.s0)(),f=(0,_t.Z)(t,[T.Ft.S3_GET_BUCKET_POLICY,T.Ft.S3_PUT_BUCKET_POLICY,T.Ft.S3_GET_BUCKET_VERSIONING,T.Ft.S3_PUT_BUCKET_VERSIONING,T.Ft.S3_GET_BUCKET_ENCRYPTION_CONFIGURATION,T.Ft.S3_PUT_BUCKET_ENCRYPTION_CONFIGURATION,T.Ft.S3_DELETE_BUCKET,T.Ft.S3_GET_BUCKET_NOTIFICATIONS,T.Ft.S3_PUT_BUCKET_NOTIFICATIONS,T.Ft.S3_GET_REPLICATION_CONFIGURATION,T.Ft.S3_PUT_REPLICATION_CONFIGURATION,T.Ft.S3_GET_LIFECYCLE_CONFIGURATION,T.Ft.S3_PUT_LIFECYCLE_CONFIGURATION,T.Ft.ADMIN_GET_BUCKET_QUOTA,T.Ft.ADMIN_SET_BUCKET_QUOTA,T.Ft.S3_PUT_BUCKET_TAGGING,T.Ft.S3_GET_BUCKET_TAGGING,T.Ft.S3_LIST_BUCKET_VERSIONS,T.Ft.S3_GET_BUCKET_POLICY_STATUS,T.Ft.S3_DELETE_BUCKET_POLICY,T.Ft.S3_GET_ACTIONS,T.Ft.S3_PUT_ACTIONS]),m=(0,O.jsx)(r.Fragment,{children:o?(0,O.jsx)(r.Fragment,{children:(0,O.jsx)(lt.Z,{placeholder:"Start typing to filter versions of ".concat(c),onChange:function(e){n((0,k.Pr)(e))},value:l})}):(0,O.jsx)(y.s,{scopes:[T.Ft.S3_LIST_BUCKET,T.Ft.S3_ALL_LIST_BUCKET],resource:t,errorProps:{disabled:!0},children:(0,O.jsx)(dt,{})})});return(0,r.useEffect)((function(){n((0,F.Sc)("object_browser"))}),[]),(0,O.jsx)(r.Fragment,{children:u?(0,O.jsxs)(p.rjZ,{container:!0,sx:{padding:"20px 32px 0"},children:[(0,O.jsx)(p.rjZ,{children:(0,O.jsx)(Zt.Z,{marginRight:30,marginTop:10})}),(0,O.jsxs)(p.rjZ,{item:!0,xs:!0,sx:{display:"flex",gap:10},children:[m,(0,O.jsx)(wt.Z,{})]})]}):(0,O.jsx)(Ct.Z,{label:(0,O.jsx)(p.hbI,{label:"Object Browser",onClick:function(){h(T.gA.OBJECT_BROWSER_VIEW)}}),actions:(0,O.jsxs)(r.Fragment,{children:[(0,O.jsx)(y.s,{scopes:T.D[T.EI.BUCKET_ADMIN],resource:t,errorProps:{disabled:!0},children:(0,O.jsx)(z.Z,{tooltip:f?"Configure Bucket":"You do not have the required permissions to configure this bucket. Please contact your MinIO administrator to request "+T.EI.BUCKET_ADMIN+" permisions.",children:(0,O.jsx)(p.zxk,{id:"configure-bucket-main",color:"primary","aria-label":"Configure Bucket",onClick:function(){return h("/buckets/".concat(t,"/admin"))},icon:(0,O.jsx)(p.ewm,{style:{width:20,height:20,marginTop:-3}}),style:{padding:"0 10px"}})})}),(0,O.jsx)(yt.Z,{})]}),middleComponent:m})})},Nt=0,Ft=0,kt=!1,Et=function e(t,n,o){if(!kt){kt=!0;var r=new URL(window.location.toString()),a=r.port,s=new URL(document.baseURI).pathname,c=(0,St.x2)(r.protocol);(i=new WebSocket("".concat(c,"://").concat(r.hostname,":").concat(a).concat(s,"ws/objectManager"))).onopen=function(){kt=!1,t&&t(),Ft=0},n&&(i.onmessage=n);var l=function(){Ft<=5?(e((function(){}),n,o),Ft+=1):(console.error("Websocket not available. Please review that your environment settings are enabled to allow websocket connections and that requests are made from the same origin."),o&&o("Couldn't establish WebSocket connection. Please review your configuration and try again."))};i.onclose=function(){kt=!1,console.warn("Websocket Disconnected. Attempting Reconnection..."),setTimeout(l,3e3)},i.onerror=function(){kt=!1,console.error("Error in websocket connection. Attempting reconnection...")}}},It=(0,l.Z)((function(e){return(0,c.Z)((0,o.Z)({},u.Bz))}))((function(){var e=(0,d.TL)(),t=(0,s.UO)(),n=(0,s.TH)(),o=(0,a.v9)((function(e){return e.objectBrowser.loadingVersioning})),c=(0,a.v9)((function(e){return e.objectBrowser.rewind.rewindEnabled})),l=(0,a.v9)((function(e){return e.objectBrowser.rewind.dateToRewind})),u=(0,a.v9)((function(e){return e.objectBrowser.showDeleted})),h=(0,a.v9)((function(e){return e.console.session.allowResources})),f=(0,a.v9)((function(e){return e.objectBrowser.loadingObjects})),m=(0,a.v9)((function(e){return e.objectBrowser.loadingLocking})),p=(0,a.v9)((function(e){return e.objectBrowser.loadRecords})),x=(0,a.v9)((function(e){return e.objectBrowser.selectedInternalPaths})),b=(0,a.v9)((function(e){return e.objectBrowser.simplePath})),v=(0,a.v9)((function(e){return e.objectBrowser.isOpeningObjectDetail})),j=(0,a.v9)((function(e){return e.system.anonymousMode})),_=t.bucketName||"",S=n.pathname.split("/browser/".concat(_,"/")),Z=2===S.length?S[1]:"",C=(0,r.useCallback)((function(t){e((0,k.Cn)(!1));var n=JSON.parse(t.data.toString());if(Nt===n.request_id){if(n.request_id!==Nt)return;if("The Access Key Id you provided does not exist in our records."===n.error)window.location.reload();else if("Access Denied."===n.error){var i=n.prefix,o="";if(i){var r=(0,g.IO)(i);o=r.endsWith("/")?r:r+"/"}var a=(0,A.kh)(n.bucketName||_,o,h||[]);return void(a&&0!==a.length?e((0,k.ZJ)(a)):e((0,F.Ih)({errorMessage:n.error,detailedError:n.error})))}if(n.request_end)return e((0,k.Cn)(!1)),void e((0,k._D)(!1));n.data&&e((0,k.rW)(n.data))}}),[e,h,_]),w=(0,r.useCallback)((function(t,n){if(i&&1===i.readyState)try{var o=Nt+1;e((0,k.o_)()),e((0,k.ZR)(!1));var r={bucket_name:_,prefix:(0,g.LL)(t),mode:c||u?"rewind":"objects",date:n.toISOString(),request_id:o};i.send(JSON.stringify(r)),Nt=o}catch(a){console.error(a)}else{Et((function(){w(t,n)}),C,(function(t){e((0,F.Ih)({errorMessage:t,detailedError:t})),e((0,k.ZR)(!0))}))}}),[_,c,u,e,C]);(0,r.useEffect)((function(){var t=(0,A.kh)(_,"",h||[]);!_||t&&0!==t.length||(e((0,k.o_)()),e((0,k._D)(!0)),e((0,k.Cn)(!0)),w("",new Date))}),[_,e,w,h]),(0,r.useEffect)((function(){return function(){var e={mode:"cancel",request_id:Nt};i&&1===i.readyState&&i.send(JSON.stringify(e))}}),[]),(0,r.useEffect)((function(){var t=(0,g.IO)(Z);e((0,k.IJ)(!0)),t.endsWith("/")||""===t?(e((0,k.vb)(!1)),e((0,k.EE)(null)),e((0,k.Su)(""===t?"/":t)),e((0,k.Jn)(!0))):(e((0,k.vH)(!0)),e((0,k.vb)(!0)),e((0,k.Eq)(!0)),e((0,k.EE)("".concat(t?"".concat((0,g.LL)(t)):""))),e((0,k.Su)("".concat(t.split("/").slice(0,-1).join("/"),"/"))))}),[_,Z,l,c,e]),(0,r.useEffect)((function(){if(!f&&!p&&!c&&!v){var t=(0,g.IO)(Z);if(!t.endsWith("/")&&b!==t&&""!==t){(0,k._D)(!0);var n="".concat(t.split("/").slice(0,-1).join("/"),"/");w(n,new Date)}}e((0,k.d_)(!1))}),[f,p,e,Z,w,c,b]);var y=(0,_t.Z)(_,[T.Ft.S3_LIST_BUCKET,T.Ft.S3_ALL_LIST_BUCKET])||j;return(0,r.useEffect)((function(){if(f&&y){var t="";if(Z){var n=(0,g.IO)(Z);t=x===Z?"".concat((0,g.IO)(Z).split("/").slice(0,-1).join("/"),"/"):n.endsWith("/")?n:n+"/"}var i=new Date;c&&l&&(i=new Date(l)),w(t,i)}else e((0,k.Cn)(!1))}),[f,Z,e,l,c,y,w]),(0,r.useEffect)((function(){e((0,k.db)({status:!1}))}),[Z,e]),(0,r.useEffect)((function(){o&&!j&&(y?oe.h.buckets.getBucketVersioning(_).then((function(t){e((0,k.lS)(t.data)),e((0,k.IJ)(!1))})).catch((function(t){console.error("Error Getting Object Versioning Status: ",t.error.detailedMessage),e((0,k.IJ)(!1))})):(e((0,k.IJ)(!1)),e((0,k.o_)())))}),[_,o,e,y,j]),(0,r.useEffect)((function(){m&&(y?oe.h.buckets.getBucketObjectLockingStatus(_).then((function(t){e((0,k.lY)(t.data.object_locking_enabled)),e((0,k.Jn)(!1))})).catch((function(t){console.error("Error Getting Object Locking Status: ",t.error.detailedMessage),e((0,k.Jn)(!1))})):(e((0,k.o_)()),e((0,k.Jn)(!1))))}),[_,m,e,y]),(0,O.jsxs)(r.Fragment,{children:[!j&&(0,O.jsx)(Tt,{bucketName:_}),(0,O.jsx)(gt,{})]})}))},34433:function(e,t,n){n.r(t),n.d(t,{default:function(){return Z}});var i=n(29439),o=n(72791),r=n(78687),a=n(29945),s=n(78029),c=n.n(s),l=n(40986),d=n(56028),u=n(1413),h=n(99779),f=n(11135),m=n(25787),p=n(23814),x=n(80184),b=(0,m.Z)((function(e){return(0,f.Z)((0,u.Z)((0,u.Z)((0,u.Z)({},p.YI),p.Hr),{},{labelContainer:{display:"flex",alignItems:"center",marginBottom:15},fieldContainer:(0,u.Z)((0,u.Z)({},p.YI.fieldContainer),{},{display:"flex",alignItems:"center",justifyContent:"space-between",paddingBottom:10,marginTop:11,marginBottom:6}),durationInputs:{display:"flex",alignItems:"flex-start",justifyContent:"flex-start",gap:10},validityIndicator:{display:"flex",alignItems:"center",justifyContent:"flex-start",marginTop:25,marginLeft:10},invalidDurationText:{marginTop:15,display:"flex",color:"red",fontSize:11},reverseInput:{flexFlow:"row-reverse","& > label":{fontWeight:400,marginLeft:15,marginRight:25}},validityText:{fontSize:14,marginTop:15,display:"flex",alignItems:"center",justifyContent:"center","@media (max-width: 900px)":{flexFlow:"column"},"& > .min-icon":{color:"#5E5E5E",width:15,height:15,marginRight:10}},validTill:{fontWeight:"bold",marginLeft:15}}))}))((function(e){var t=e.classes,n=e.id,r=e.initialDate,s=e.label,c=e.maxDays,l=e.entity,d=e.onChange,u=(0,o.useState)(7),f=(0,i.Z)(u,2),m=f[0],p=f[1],b=(0,o.useState)(0),v=(0,i.Z)(b,2),j=v[0],g=v[1],_=(0,o.useState)(0),S=(0,i.Z)(_,2),Z=S[0],C=S[1],w=(0,o.useState)(!0),y=(0,i.Z)(w,2),T=y[0],N=y[1],F=(0,o.useState)(h.ou.now()),k=(0,i.Z)(F,2),E=k[0],I=k[1];(0,o.useEffect)((function(){isNaN(j)||isNaN(m)||isNaN(Z)||I(function(e,t,n,i){return h.ou.fromJSDate(e).plus({days:t,hours:n,minutes:i})}(r,m,j,Z))}),[r,m,j,Z]),(0,o.useEffect)((function(){if(T){var e=E.toFormat("yyyy-MM-dd HH:mm:ss");d(e.split(" ").join("T"),!0)}else d("0000-00-00",!1)}),[E,d,T]),(0,o.useEffect)((function(){var e=!0;(m<0||c&&m>c||isNaN(m))&&(e=!1),(j<0||j>23||isNaN(j))&&(e=!1),(Z<0||Z>59||isNaN(Z))&&(e=!1),!c||m!==c||0===j&&0===Z||(e=!1),m<=0&&j<=0&&Z<=0&&(e=!1),N(e)}),[E,c,d,m,j,Z]);var O={"& .textBoxContainer":{minWidth:0},"& input":{textAlign:"center",paddingRight:10,paddingLeft:10,width:40}};return(0,x.jsx)(o.Fragment,{children:(0,x.jsxs)(a.rjZ,{container:!0,className:t.fieldContainer,children:[(0,x.jsx)(a.rjZ,{item:!0,xs:12,className:t.labelContainer,children:(0,x.jsx)(a.AZs,{htmlFor:n,children:s})}),(0,x.jsxs)(a.rjZ,{item:!0,xs:12,className:t.durationInputs,children:[(0,x.jsx)(a.rjZ,{item:!0,xs:!0,className:t.dateInputContainer,children:(0,x.jsx)(a.Wzg,{id:n,className:"".concat(t.reverseInput," removeArrows"),type:"number",min:"0",max:c?c.toString():"999",label:"Days",name:n,onChange:function(e){p(parseInt(e.target.value))},value:m.toString(),sx:O,noLabelMinWidth:!0})}),(0,x.jsx)(a.rjZ,{item:!0,xs:!0,className:t.dateInputContainer,children:(0,x.jsx)(a.Wzg,{id:n,className:"".concat(t.reverseInput," removeArrows"),type:"number",min:"0",max:"23",label:"Hours",name:n,onChange:function(e){g(parseInt(e.target.value))},value:j.toString(),sx:O,noLabelMinWidth:!0})}),(0,x.jsx)(a.rjZ,{item:!0,xs:!0,className:t.dateInputContainer,children:(0,x.jsx)(a.Wzg,{id:n,className:"".concat(t.reverseInput," removeArrows"),type:"number",min:"0",max:"59",label:"Minutes",name:n,onChange:function(e){C(parseInt(e.target.value))},value:Z.toString(),sx:O,noLabelMinWidth:!0})})]}),(0,x.jsx)(a.rjZ,{item:!0,xs:12,className:"".concat(t.validityIndicator," ").concat(t.formFieldRow),children:T?(0,x.jsxs)("div",{className:t.validityText,children:[(0,x.jsx)(a.xPt,{}),(0,x.jsxs)("div",{className:t.validityLabel,children:[l," will be available until:"]})," ",(0,x.jsx)("div",{className:t.validTill,children:E.toFormat("MM/dd/yyyy HH:mm:ss")})]}):(0,x.jsx)("div",{className:t.invalidDurationText,children:"Please select a valid duration."})})]})})})),v=n(45248),j=n(87995),g=n(81551),_=n(31776),S=n(82342),Z=function(e){var t=e.open,n=e.closeModalAndRefresh,s=e.bucketName,u=e.dataObject,h=(0,g.TL)(),f=(0,r.v9)(j.N5),m=(0,o.useState)(""),p=(0,i.Z)(m,2),Z=p[0],C=p[1],w=(0,o.useState)(!0),y=(0,i.Z)(w,2),T=y[0],N=y[1],F=(0,o.useState)(!1),k=(0,i.Z)(F,2),E=k[0],I=k[1],O=(0,o.useState)(""),B=(0,i.Z)(O,2),L=B[0],P=B[1],A=(0,o.useState)(!0),D=(0,i.Z)(A,2),R=D[0],M=D[1],U=(0,o.useState)("null"),z=(0,i.Z)(U,2),G=z[0],W=z[1],K=new Date;return(0,o.useEffect)((function(){if(void 0===u.version_id)return f?(_.h.buckets.listObjects(s,{prefix:(0,v.LL)(u.name||""),with_versions:f}).then((function(e){var t=(e.data.objects||[]).find((function(e){return e.is_latest}));W(t?"".concat(t.version_id):"null")})).catch((function(e){h((0,j.zb)((0,S.g)(e.error)))})),void N(!1)):(W("null"),void N(!1));W(u.version_id||"null"),N(!1)}),[s,u,f,h]),(0,o.useEffect)((function(){if(R&&!T){I(!0),C("");var e=new Date("".concat(L)),t=new Date,n=Math.ceil((e.getTime()-t.getTime())/1e3);n>0&&_.h.buckets.shareObject(s,{prefix:(0,v.LL)(u.name||""),version_id:G,expires:""!==L?"".concat(n,"s"):""}).then((function(e){C(e.data),I(!1)})).catch((function(e){h((0,j.zb)((0,S.g)(e.error))),C(""),I(!1)}))}}),[u,L,s,R,C,h,f,T,G]),(0,x.jsx)(o.Fragment,{children:(0,x.jsxs)(d.Z,{title:"Share File",titleIcon:(0,x.jsx)(a.aAc,{style:{fill:"#4CCB92"}}),modalOpen:t,onClose:function(){n()},children:[T&&(0,x.jsx)(a.rjZ,{item:!0,xs:12,children:(0,x.jsx)(l.Z,{})}),!T&&(0,x.jsxs)(o.Fragment,{children:[(0,x.jsxs)(a.rjZ,{item:!0,xs:12,sx:{fontSize:14,fontWeight:400},children:["This is a temporary URL with integrated access credentials for sharing objects valid for up to 7 days.",(0,x.jsx)("br",{}),(0,x.jsx)("br",{}),"The temporary URL expires after the configured time limit."]}),(0,x.jsx)("br",{}),(0,x.jsx)(a.rjZ,{item:!0,xs:12,children:(0,x.jsx)(b,{initialDate:K,id:"date",label:"Active for",maxDays:7,onChange:function(e,t){M(t),t?P(e):(P(""),C(""))},entity:"Link"})}),(0,x.jsx)(a.rjZ,{item:!0,xs:12,sx:{marginBottom:10},children:(0,x.jsx)(a.bSr,{actionButton:(0,x.jsx)(c(),{text:Z,children:(0,x.jsx)(a.zxk,{id:"copy-path",variant:"regular",onClick:function(){h((0,j.MK)("Share URL Copied to clipboard"))},disabled:""===Z||E,style:{width:"28px",height:"28px",padding:"0px"},icon:(0,x.jsx)(a.TIy,{})})}),children:Z})})]})]})})}},78562:function(e,t,n){n.r(t),n.d(t,{default:function(){return b}});var i=n(72791),o=n(56028),r=n(4942),a=n(29439),s=n(11135),c=n(25787),l=n(61889),d=n(40986),u=n(47922),h=n(45248),f=n(28182),m=n(80184),p=(0,c.Z)((function(){return(0,s.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 t=e.bucketName,n=e.object,o=e.isFullscreen,s=void 0!==o&&o,c=e.classes,p=(0,i.useState)(!0),x=(0,a.Z)(p,2),b=x[0],v=x[1],j="";if(n){var g=(0,h.LL)(n.name),_=document.baseURI.replace(window.location.origin,"");j="".concat(window.location.origin).concat(_,"api/v1/buckets/").concat(t,"/objects/download?preview=true&prefix=").concat(g),n.version_id&&(j=j.concat("&version_id=".concat(n.version_id)))}var S=(0,u.Bg)((null===n||void 0===n?void 0:n.name)||""),Z=function(){v(!1)};return(0,m.jsxs)(i.Fragment,{children:[b&&(0,m.jsx)(l.ZP,{item:!0,xs:12,children:(0,m.jsx)(d.Z,{})}),(0,m.jsxs)("div",{style:{textAlign:"center"},children:["video"===S&&(0,m.jsx)("video",{style:{width:"auto",height:"auto",maxWidth:"calc(100vw - 100px)",maxHeight:"calc(100vh - 200px)"},autoPlay:!0,controls:!0,muted:!1,playsInline:!0,onPlay:Z,children:(0,m.jsx)("source",{src:j,type:"video/mp4"})}),"audio"===S&&(0,m.jsx)("audio",{style:{width:"100%",height:"auto"},autoPlay:!0,controls:!0,muted:!1,playsInline:!0,onPlay:Z,children:(0,m.jsx)("source",{src:j,type:"audio/mpeg"})}),"image"===S&&(0,m.jsx)("img",{style:{width:"auto",height:"auto",maxWidth:"100vw",maxHeight:"100vh"},src:j,alt:"preview",onLoad:Z}),"video"!==S&&"audio"!==S&&"image"!==S&&(0,m.jsx)("div",{className:(0,f.Z)(c.iframeBase,(0,r.Z)({},c.iframeHidden,b)),children:(0,m.jsx)("iframe",{src:j,title:"File Preview",allowTransparency:!0,className:"".concat(c.iframeContainer," ").concat(s?"fullHeight":S),onLoad:Z,children:"File couldn't be loaded. Please try Download instead"})})]})]})})),x=n(29945),b=function(e){var t=e.open,n=e.bucketName,r=e.object,a=e.onClosePreview;return(0,m.jsx)(i.Fragment,{children:(0,m.jsx)(o.Z,{modalOpen:t,title:"Preview - ".concat(null===r||void 0===r?void 0:r.name),onClose:a,wideLimit:!1,titleIcon:(0,m.jsx)(x.$30,{}),children:(0,m.jsx)(p,{bucketName:n,object:r})})})}},47922:function(e,t,n){n.d(t,{Bg:function(){return p},LR:function(){return f},P_:function(){return x},kh:function(){return b}});var i=n(1413),o=n(74165),r=n(15861),a=n(15671),s=n(43144),c=n(45248),l=n(76610),d=n(90344),u=n.n(d),h=n(81551),f=function(e,t,n,i){var o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:null,r=arguments.length>5?arguments[5]:void 0,a=arguments.length>6?arguments[6]:void 0,s=arguments.length>7?arguments[7]:void 0,l=arguments.length>8?arguments[8]:void 0,d=arguments.length>9?arguments[9]:void 0,u=arguments.length>10?arguments[10]:void 0,f=document.createElement("a");document.body.appendChild(f);var p=document.baseURI.replace(window.location.origin,""),x=h.ZP.getState().system.anonymousMode,b="".concat(window.location.origin).concat(p,"api/v1/buckets/").concat(e,"/objects/download?prefix=").concat(t).concat(null!==o&&""!==o.trim()?"&override_file_name=".concat((0,c.LL)(o||"")):"");return n&&(b=b.concat("&version_id=".concat(n))),new m(b,r,x,i,a,s,l,d,u)},m=function(){function e(t,n,i,o,r,s,c,l,d){(0,a.Z)(this,e),this.aborter=void 0,this.path=void 0,this.id=void 0,this.filename="",this.anonymousMode=void 0,this.fileSize=0,this.writer=null,this.progressCallback=void 0,this.completeCallback=void 0,this.errorCallback=void 0,this.abortCallback=void 0,this.toastCallback=void 0,this.aborter=new AbortController,this.path=t,this.id=n,this.anonymousMode=i,this.fileSize=o,this.progressCallback=r,this.completeCallback=s,this.errorCallback=c,this.abortCallback=l,this.toastCallback=d}return(0,s.Z)(e,[{key:"abort",value:function(){this.aborter.abort(),this.abortCallback(),this.writer&&this.writer.abort()}},{key:"send",value:function(){/^((?!chrome|android).)*safari/i.test(navigator.userAgent)?(this.toastCallback(),this.downloadByBrowser()):this.fileSize?this.download({url:this.path,chunkSize:1610612736}):this.downloadByBrowser()}},{key:"getRangeContent",value:function(){var e=(0,r.Z)((0,o.Z)().mark((function e(t,n,i){var r,a,s,c,l,d;return(0,o.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=this.getRequestInfo(n,i),e.next=3,fetch(t,r);case 3:if(!(a=e.sent).ok||!a.body){e.next=22;break}this.filename||(this.filename=this.getFilename(a)),this.writer||(this.writer=u().createWriteStream(this.filename).getWriter()),s=a.body.getReader();case 8:if(c){e.next=20;break}return e.next=11,s.read();case 11:if(d=e.sent,l=d.value,!(c=d.done)){e.next=16;break}return e.abrupt("break",20);case 16:return e.next=18,this.writer.write(l);case 18:e.next=8;break;case 20:e.next=23;break;case 22:throw new Error("Unexpected response status code (".concat(a.status,")."));case 23:case"end":return e.stop()}}),e,this)})));return function(t,n,i){return e.apply(this,arguments)}}()},{key:"getRequestInfo",value:function(e,t){var n={signal:this.aborter.signal,headers:{range:"bytes=".concat(e,"-").concat(t)}};return this.anonymousMode&&(n.headers=(0,i.Z)((0,i.Z)({},n.headers),{},{"X-Anonymous":"1"})),n}},{key:"getFilename",value:function(e){var t=e.headers.get("Content-Disposition");return t?decodeURIComponent(t).split('"')[1]:"download"}},{key:"download",value:function(){var e=(0,r.Z)((0,o.Z)().mark((function e(t){var n,i,r,a,s,c,d;return(0,o.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=t.url,i=t.chunkSize,r=Math.ceil(this.fileSize/i),this.progressCallback(0),e.prev=3,a=0;case 5:if(!(a<r)){e.next=15;break}return s=a*i,c=a+1===r?this.fileSize-1:(a+1)*i-1,e.next=10,this.getRangeContent(n,s,c);case 10:d=Math.round((a+1)/r*100),this.progressCallback(d);case 12:a++,e.next=5;break;case 15:this.writer.close(),this.completeCallback(),(0,l.GM)(this.id),e.next=23;break;case 20:e.prev=20,e.t0=e.catch(3),this.errorCallback(e.t0.message);case 23:case"end":return e.stop()}}),e,this,[[3,20]])})));return function(t){return e.apply(this,arguments)}}()},{key:"downloadByBrowser",value:function(){var e=document.createElement("a");e.href=this.path,document.body.appendChild(e),e.click(),document.body.removeChild(e),this.completeCallback(),(0,l.GM)(this.id)}}]),e}(),p=function(e){var t=e.split(".").pop();return t?(t=t.toLowerCase(),["jif","jfif","apng","avif","svg","webp","bmp","ico","jpg","jpe","jpeg","gif","png","heic"].includes(t)?"image":["pdf"].includes(t)?"text":["wav","mp3","alac","aiff","dsd","pcm"].includes(t)?"audio":["mp4","avi","mpg","webm","mov","flv","mkv","wmv","avchd","mpeg-4"].includes(t)?"video":"none"):"none"},x=function(e){switch(e){case"name":return function(e,t){return e.name.localeCompare(t.name)};case"last_modified":return function(e,t){return new Date(e.last_modified).getTime()-new Date(t.last_modified).getTime()};case"size":return function(e,t){return(e.size||-1)-(t.size||-1)}}},b=function(e,t,n){if(0===n.length)return null;var i=n.filter((function(t){var n,i;return(null===(n=t.resource)||void 0===n?void 0:n.endsWith(":".concat(e)))||(null===(i=t.resource)||void 0===i?void 0:i.includes(":".concat(e,"/")))}));if(0===i.length)return null;var o=[],r=t.split("/");if(i.forEach((function(e){var n,i,a=null===(n=e.resource)||void 0===n?void 0:n.split(":"),s=((null===a||void 0===a?void 0:a.pop())||"").split("/");(s.length>1&&s.every((function(e,t){return"*"!==e&&((!r[t]||r[t]===e)&&(r[t]||o.push({name:"".concat(e,"/"),size:0,last_modified:"",version_id:""}),!0))})),"StringEquals"===e.conditionOperator||"StringLike"===e.conditionOperator)&&(null===(i=e.prefixes)||void 0===i||i.forEach((function(e){if(""!==e){var n=e.split("/"),i=[],a=t.replace(/\/$/,"");if(!e.startsWith(a)&&""!==t)return;n.every((function(e,t){return!e.includes("*")&&""!==e&&(e!==r[t]?(o.push({name:"".concat(i.join("/")).concat(i.length>0?"/":"").concat(e,"/"),size:0,last_modified:"",version_id:""}),!1):(""!==e&&i.push(e),!0))}))}})))})),o.length>0){var a=[],s=[];o.forEach((function(e){s.includes(e.name)||(a.push(e),s.push(e.name))})),o=a}return o}},75578:function(e,t,n){var i=n(1413),o=n(72791),r=n(80184);t.Z=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return function(n){return(0,r.jsx)(o.Suspense,{fallback:t,children:(0,r.jsx)(e,(0,i.Z)({},n))})}}},34866:function(e,t,n){var i=n(1413),o=n(72791),r=n(61889),a=n(94454),s=n(30829),c=n(20068),l=n(11135),d=n(25787),u=n(23814),h=n(29945),f=n(80184);t.Z=(0,d.Z)((function(e){return(0,l.Z)((0,i.Z)((0,i.Z)((0,i.Z)((0,i.Z)({},u.YI),u.Hr),u.lM),{},{fieldContainer:(0,i.Z)((0,i.Z)({},u.YI.fieldContainer),{},{display:"flex",justifyContent:"flex-start",alignItems:"center",margin:"15px 0",marginBottom:0,flexBasis:"initial",flexWrap:"nowrap"}),noTopMargin:{marginTop:0}}))}))((function(e){var t=e.label,n=e.onChange,i=e.value,l=e.id,d=e.name,u=e.checked,m=void 0!==u&&u,p=e.disabled,x=void 0!==p&&p,b=e.noTopMargin,v=void 0!==b&&b,j=e.tooltip,g=void 0===j?"":j,_=e.overrideLabelClasses,S=void 0===_?"":_,Z=e.overrideCheckboxStyles,C=e.classes,w=e.className;return(0,f.jsx)(o.Fragment,{children:(0,f.jsxs)(r.ZP,{item:!0,xs:12,className:"".concat(C.fieldContainer," ").concat(v?C.noTopMargin:""," ").concat(w||""),children:[(0,f.jsx)("div",{children:(0,f.jsx)(a.Z,{name:d,id:l,value:i,color:"primary",inputProps:{"aria-label":"secondary checkbox"},checked:m,onChange:n,checkedIcon:(0,f.jsx)("span",{className:C.checkedIcon}),icon:(0,f.jsx)("span",{className:C.unCheckedIcon}),disabled:x,disableRipple:!0,disableFocusRipple:!0,focusRipple:!1,centerRipple:!1,disableTouchRipple:!0,style:Z||{}})}),""!==t&&(0,f.jsxs)(s.Z,{htmlFor:l,className:"".concat(C.noMinWidthLabel," ").concat(S),children:[(0,f.jsx)("span",{children:t}),""!==g&&(0,f.jsx)("div",{className:C.tooltipContainer,children:(0,f.jsx)(c.Z,{title:g,placement:"top-start",children:(0,f.jsx)("div",{className:C.tooltip,children:(0,f.jsx)(h.byK,{})})})})]})]})})}))},81159:function(e,t,n){var i=n(4942),o=n(1413),r=n(72791),a=n(11135),s=n(25787),c=n(9955),l=n(30829),d=n(20068),u=n(20890),h=n(61889),f=n(23814),m=n(29945),p=n(28182),x=n(80184),b=(0,s.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);t.Z=(0,s.Z)((function(e){return(0,a.Z)((0,o.Z)((0,o.Z)({indicatorLabelOn:{fontWeight:"bold",color:"#081C42 !important"},indicatorLabel:{fontSize:12,color:"#E2E2E2",margin:"0 8px 0 10px"},fieldDescription:{marginTop:4,color:"#999999"},tooltip:{fontSize:16}},f.OR),f.YI))}))((function(e){var t=e.label,n=void 0===t?"":t,a=e.onChange,s=e.value,c=e.id,f=e.name,v=e.checked,j=void 0!==v&&v,g=e.disabled,_=void 0!==g&&g,S=e.switchOnly,Z=void 0!==S&&S,C=e.tooltip,w=void 0===C?"":C,y=e.description,T=void 0===y?"":y,N=e.classes,F=e.indicatorLabels,k=e.extraInputProps,E=void 0===k?{}:k,I=(0,x.jsxs)(r.Fragment,{children:[!Z&&(0,x.jsx)("span",{className:(0,p.Z)(N.indicatorLabel,(0,i.Z)({},N.indicatorLabelOn,!j)),children:F&&F.length>1?F[1]:"OFF"}),(0,x.jsx)(b,{checked:j,onChange:a,color:"primary",name:f,inputProps:(0,o.Z)({"aria-label":"primary checkbox"},E),disabled:_,disableRipple:!0,disableFocusRipple:!0,disableTouchRipple:!0,value:s,id:c}),!Z&&(0,x.jsx)("span",{className:(0,p.Z)(N.indicatorLabel,(0,i.Z)({},N.indicatorLabelOn,j)),children:F?F[0]:"ON"})]});return Z?I:(0,x.jsx)("div",{children:(0,x.jsxs)(h.ZP,{container:!0,alignItems:"center",children:[(0,x.jsx)(h.ZP,{item:!0,xs:12,sm:8,md:8,children:""!==n&&(0,x.jsxs)(l.Z,{htmlFor:c,className:N.inputLabel,children:[(0,x.jsx)("span",{children:n}),""!==w&&(0,x.jsx)("div",{className:N.tooltipContainer,children:(0,x.jsx)(d.Z,{title:w,placement:"top-start",children:(0,x.jsx)("div",{className:N.tooltip,children:(0,x.jsx)(m.byK,{})})})})]})}),(0,x.jsx)(h.ZP,{item:!0,xs:12,sm:""!==n?4:12,md:""!==n?4:12,textAlign:"right",justifyContent:"end",className:N.switchContainer,children:I}),""!==T&&(0,x.jsx)(h.ZP,{item:!0,xs:12,textAlign:"left",children:(0,x.jsx)(u.Z,{component:"p",className:N.fieldDescription,children:T})})]})})}))},21435:function(e,t,n){var i=n(29439),o=n(1413),r=n(72791),a=n(27391),s=n(61889),c=n(30829),l=n(20068),d=n(13400),u=n(20165),h=n(3579),f=n(11135),m=n(72455),p=n(25787),x=n(23814),b=n(29945),v=n(28182),j=n(80184),g=(0,m.Z)((function(e){return(0,f.Z)((0,o.Z)({},x.gM))}));function _(e){var t=g();return(0,j.jsx)(a.Z,(0,o.Z)({InputProps:{classes:t}},e))}t.Z=(0,p.Z)((function(e){return(0,f.Z)((0,o.Z)((0,o.Z)((0,o.Z)({},x.YI),x.Hr),{},{textBoxContainer:{flexGrow:1,position:"relative"},overlayAction:{position:"absolute",right:5,top:6,"& svg":{maxWidth:15,maxHeight:15},"&.withLabel":{top:5}}}))}))((function(e){var t=e.label,n=e.onChange,a=e.value,f=e.id,m=e.name,p=e.type,x=void 0===p?"text":p,g=e.autoComplete,S=void 0===g?"off":g,Z=e.disabled,C=void 0!==Z&&Z,w=e.multiline,y=void 0!==w&&w,T=e.tooltip,N=void 0===T?"":T,F=e.index,k=void 0===F?0:F,E=e.error,I=void 0===E?"":E,O=e.required,B=void 0!==O&&O,L=e.placeholder,P=void 0===L?"":L,A=e.min,D=e.max,R=e.overlayId,M=e.overlayIcon,U=void 0===M?null:M,z=e.overlayObject,G=void 0===z?null:z,W=e.extraInputProps,K=void 0===W?{}:W,H=e.overlayAction,V=e.noLabelMinWidth,J=void 0!==V&&V,Y=e.pattern,q=void 0===Y?"":Y,$=e.autoFocus,X=void 0!==$&&$,Q=e.classes,ee=e.className,te=void 0===ee?"":ee,ne=e.onKeyPress,ie=e.onFocus,oe=e.onPaste,re=(0,o.Z)({"data-index":k},K),ae=(0,r.useState)(!1),se=(0,i.Z)(ae,2),ce=se[0],le=se[1];"number"===x&&A&&(re.min=A),"number"===x&&D&&(re.max=D),""!==q&&(re.pattern=q);var de=U,ue=x;return"password"===x&&null===U&&(de=ce?(0,j.jsx)(u.Z,{}):(0,j.jsx)(h.Z,{}),ue=ce?"text":"password"),(0,j.jsx)(r.Fragment,{children:(0,j.jsxs)(s.ZP,{container:!0,className:(0,v.Z)(""!==te?te:"",""!==I?Q.errorInField:Q.inputBoxContainer),children:[""!==t&&(0,j.jsxs)(c.Z,{htmlFor:f,className:J?Q.noMinWidthLabel:Q.inputLabel,children:[(0,j.jsxs)("span",{children:[t,B?"*":""]}),""!==N&&(0,j.jsx)("div",{className:Q.tooltipContainer,children:(0,j.jsx)(l.Z,{title:N,placement:"top-start",children:(0,j.jsx)("div",{className:Q.tooltip,children:(0,j.jsx)(b.byK,{})})})})]}),(0,j.jsxs)("div",{className:Q.textBoxContainer,children:[(0,j.jsx)(_,{id:f,name:m,fullWidth:!0,value:a,autoFocus:X,disabled:C,onChange:n,type:ue,multiline:y,autoComplete:S,inputProps:re,error:""!==I,helperText:I,placeholder:P,className:Q.inputRebase,onKeyPress:ne,onFocus:ie,onPaste:oe}),de&&(0,j.jsx)("div",{className:"".concat(Q.overlayAction," ").concat(""!==t?"withLabel":""),children:(0,j.jsx)(d.Z,{onClick:H?function(){H()}:function(){return le(!ce)},id:R,size:"small",disableFocusRipple:!1,disableRipple:!1,disableTouchRipple:!1,children:de})}),G&&(0,j.jsx)("div",{className:"".concat(Q.overlayAction," ").concat(""!==t?"withLabel":""),children:G})]})]})})}))},90673:function(e,t,n){var i=n(1413),o=n(72791),r=n(61889),a=n(886),s=n(30829),c=n(20068),l=n(68096),d=n(58406),u=n(77865),h=n(11135),f=n(25787),m=n(23814),p=n(29945),x=n(80184),b=(0,f.Z)((function(e){return(0,h.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"}}})}))(a.ZP);t.Z=(0,f.Z)((function(e){return(0,h.Z)((0,i.Z)((0,i.Z)((0,i.Z)({},m.YI),m.Hr),{},{fieldContainer:{display:"flex","@media (max-width: 600px)":{flexFlow:"column"}}}))}))((function(e){var t=e.classes,n=e.id,i=e.name,a=e.onChange,h=e.options,f=e.label,m=e.tooltip,v=void 0===m?"":m,j=e.value,g=e.disabled,_=void 0!==g&&g;return(0,x.jsx)(o.Fragment,{children:(0,x.jsxs)(r.ZP,{item:!0,xs:12,className:t.fieldContainer,children:[""!==f&&(0,x.jsxs)(s.Z,{htmlFor:n,className:t.inputLabel,children:[(0,x.jsx)("span",{children:f}),""!==v&&(0,x.jsx)("div",{className:t.tooltipContainer,children:(0,x.jsx)(c.Z,{title:v,placement:"top-start",children:(0,x.jsx)("div",{className:t.tooltip,children:(0,x.jsx)(p.byK,{})})})})]}),(0,x.jsx)(l.Z,{fullWidth:!0,children:(0,x.jsx)(d.Z,{id:n,name:i,value:j,onChange:a,input:(0,x.jsx)(b,{}),disabled:_,children:h.map((function(e){return(0,x.jsx)(u.Z,{value:e.value,children:e.label},"select-".concat(i,"-").concat(e.label))}))})})]})})}))},73669:function(e,t,n){var i=n(29439),o=n(72791),r=n(64554),a=n(29945),s=n(21435),c=n(80184);t.Z=function(e){var t=e.value,n=(0,o.useState)(!1),l=(0,i.Z)(n,2),d=l[0],u=l[1];return(0,c.jsxs)(r.Z,{sx:{display:"flex",alignItems:"center",flexFlow:{sm:"row",xs:"column"}},children:[(0,c.jsx)(s.Z,{id:"inspect-dec-key",name:"inspect-dec-key",placeholder:"",label:"",type:d?"text":"password",onChange:function(){},value:t,overlayIcon:(0,c.jsx)(a.TIy,{}),extraInputProps:{readOnly:!0},overlayAction:function(){return navigator.clipboard.writeText(t)}}),(0,c.jsx)(a.zxk,{id:"show-hide-key",style:{marginLeft:"10px"},variant:"callAction",onClick:function(){return u(!d)},label:"Show/Hide"})]})}},26824:function(e,t,n){n.d(t,{HE:function(){return r},V9:function(){return i},ci:function(){return o},x2:function(){return a}});var i=1006,o=1008,r=1011,a=function(e){var t="ws";return"https:"===e&&(t="wss"),t}}}]);
//# sourceMappingURL=2603.9ebd9b9e.chunk.js.map