aiware-js 2.17.0 → 2.18.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/js-core.esm41.js CHANGED
@@ -1 +1 @@
1
- import{cf as createSelector,O as rootApiSelector,R as graphEndpointSelector,Q as sessionTokenSelector,m as makeStyles,j as jsxRuntime,F as FormattedMessage,g3 as ApplicationTabIcon,g4 as Lock,g5 as SecurityGroup,fU as Group,ch as AIWareThemeProvider,K as lib,A as AIWareIntlProvider,k as useSelector,r as react,eY as panelsSelector,a8 as Tooltip,a9 as IconButton,fw as Hamburger,T as Typography$1,cj as FullscreenExit,ck as Fullscreen,bU as Hide,b0 as Tabs,x as classnames,b1 as Tab,Y as Portal}from"./js-core.esm.js";import{G as GroupsPanel,g as getAdminCenterGroupsModule}from"./js-core.esm34.js";import{PermissionSets,AccessControl,getAdminCenterPermissionsModule}from"./js-core.esm33.js";import{ApplicationsTab,getAdminCenterApplicationsModule}from"./js-core.esm42.js";import"./js-core.esm8.js";import"./js-core.esm21.js";import"./js-core.esm25.js";import"./js-core.esm36.js";import"./js-core.esm30.js";import"./js-core.esm22.js";import"./js-core.esm20.js";!function(){var e={};try{if(process)return process.env=Object.assign({},process.env),Object.assign(process.env,e)}catch(e){}globalThis.process={env:e}}();const selectApiConfigs=createSelector([rootApiSelector,graphEndpointSelector,sessionTokenSelector],(e,t,s)=>({apiRoot:e,graphQLEndpoint:t,token:s})),useStyles$2=makeStyles()((e,{height:t})=>({header:{alignItems:"center",borderBottom:"0.5px solid "+e.palette.divider,display:"flex",height:t,padding:e.spacing(2),position:"relative"},title:{minWidth:"126px"},marginRight:{marginRight:e.spacing(2)},navigationToggle:{marginRight:e.spacing(1)},headerActionContainer:{alignItems:"center",display:"flex",flexGrow:1,height:"100%",justifyContent:"flex-end"},verticalDivider:{borderRight:".5px solid "+e.palette.divider,height:"70%",margin:"0 "+e.spacing(1)}})),Header=({hidePanel:e,isNavExpanded:t,onLeftNavigationToggle:s,onFullScreenToggle:i,isFullScreen:a,height:n})=>{n=useStyles$2({height:n}).classes;return jsxRuntime.exports.jsxs("header",Object.assign({className:n.header,"data-test":"ac-header"},{children:[jsxRuntime.exports.jsx(Tooltip,Object.assign({title:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-browse.navigation.menu",defaultMessage:"Toggle Navigation Menu",description:"Toggle Navigation Menu"})},{children:jsxRuntime.exports.jsx(IconButton,Object.assign({sx:{mr:1},onClick:s,"aria-expanded":t,"aria-labelledby":"ac-header-toggle-nav","data-test":"ac-header-toggle-nav",size:"large"},{children:jsxRuntime.exports.jsx(Hamburger,{})}))})),jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"h1",className:n.title,"data-test":"ac-title"},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-browse.header.title",defaultMessage:"Admin Center",description:"Panel header of the admin center"})})),jsxRuntime.exports.jsxs("div",Object.assign({className:n.headerActionContainer},{children:[jsxRuntime.exports.jsx("div",{className:n.verticalDivider}),jsxRuntime.exports.jsx(Tooltip,Object.assign({title:a?jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-browse.close.full.screen",defaultMessage:"Exit Fullscreen",description:"Exit Fullscreen"}):jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-browse.open.full.screen",defaultMessage:"Enter Fullscreen",description:"Enter Fullscreen"})},{children:jsxRuntime.exports.jsx(IconButton,Object.assign({onClick:i,"aria-labelledby":"ac-toggle-fullscreen","data-test":"ac-fullscreen-toggle",size:"large"},{children:a?jsxRuntime.exports.jsx(FullscreenExit,{}):jsxRuntime.exports.jsx(Fullscreen,{})}))})),jsxRuntime.exports.jsx(Tooltip,Object.assign({title:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-browse.close.panel",defaultMessage:"Close Panel",description:"Close Panel"})},{children:jsxRuntime.exports.jsx(IconButton,Object.assign({onClick:e,"aria-labelledby":"ac-close-panel","data-test-id":"ac-close-panel",size:"large"},{children:jsxRuntime.exports.jsx(Hide,{})}))}))]}))]}))};function __rest(e,t){var s={};for(a in e)Object.prototype.hasOwnProperty.call(e,a)&&t.indexOf(a)<0&&(s[a]=e[a]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,a=Object.getOwnPropertySymbols(e);i<a.length;i++)t.indexOf(a[i])<0&&Object.prototype.propertyIsEnumerable.call(e,a[i])&&(s[a[i]]=e[a[i]]);return s}var AdminCenterView;!function(e){e[e.applications=0]="applications",e[e.permissionSets=1]="permissionSets",e[e.accessControl=2]="accessControl",e[e.groups=3]="groups"}(AdminCenterView=AdminCenterView||{});const tabWidth=197,useStyles$1=makeStyles()((e,{height:t},s)=>({root:{display:"flex",flexGrow:1,height:t,position:"relative"},tabs:{borderRight:".5px solid "+e.palette.divider,transition:".2s ease",width:e.spacing(14),minWidth:e.spacing(14),padding:e.spacing(1.6)+" "+e.spacing(2.5),boxSizing:"border-box"},tabsContainer:{alignItems:"center"},tabIndicator:{background:"transparent"},tabRoot:{opacity:1,borderRadius:4,fontSize:"14px",marginBottom:e.spacing(1),minHeight:e.spacing(9),minWidth:e.spacing(9),paddingTop:e.spacing(1),paddingBottom:e.spacing(1),width:"100%","&:hover":{background:"#F2F5F9"}},tabsExpanded:{width:tabWidth,minWidth:tabWidth,paddingRight:e.spacing(2),paddingLeft:e.spacing(2),["& "+s.tabRoot]:{width:`calc(${tabWidth}px - ${e.spacing(3)})`,flexDirection:"row",textTransform:"capitalize","& svg":{marginRight:e.spacing(2),marginBottom:"0"}}},tabExpandedWrapper:{flexDirection:"row",display:"flex",justifyContent:"flex-start","& svg":{marginBottom:"0 !important",marginRight:e.spacing(2)}},tabSelected:{background:"#F2F5F9",color:e.palette.primary.main,"& svg":{marginBottom:"0 !important",marginRight:"0",color:e.palette.primary.main}},contentPanel:{flexGrow:1},tabExpandedSelected:{background:"#F2F5F9",color:e.palette.primary.main,"& svg":{marginBottom:"0 !important",marginRight:e.spacing(2),color:e.palette.primary.main}},tabWrapper:{flexDirection:"row",display:"flex",justifyContent:"center","& svg":{marginBottom:"0 !important",marginRight:"0"}}})),navList=[{id:AdminCenterView.applications,label:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-browse.applications.view",defaultMessage:"Applications",description:"The label for Application view"}),testLabel:"ac-applications-view",icon:jsxRuntime.exports.jsx(ApplicationTabIcon,{style:{margin:"9px 5px 0 5px"}}),content:e=>jsxRuntime.exports.jsx(ApplicationsTab,{isPanelFullScreen:e})},{id:AdminCenterView.permissionSets,label:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-browse.permission-sets.view",defaultMessage:"Permission Sets",description:"The label for Permission Sets view"}),testLabel:"ac-permission-sets-view",icon:jsxRuntime.exports.jsx(Lock,{}),content:e=>jsxRuntime.exports.jsx(PermissionSets,{isPanelFullScreen:e})},{id:AdminCenterView.accessControl,label:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-browse.access.control.view",defaultMessage:"Access Control",description:"The label of access control tab button."}),testLabel:"ac-access-control-view",icon:jsxRuntime.exports.jsx(SecurityGroup,{}),content:e=>jsxRuntime.exports.jsx(AccessControl,{isPanelFullScreen:e})},{id:AdminCenterView.groups,label:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-browse.groups.view",defaultMessage:"Groups",description:"The label of groups tab button."}),testLabel:"ac-groups-view",icon:jsxRuntime.exports.jsx(Group,{}),content:e=>jsxRuntime.exports.jsx(GroupsPanel,{isPanelFullScreen:e})}],MainTabPanel=({isNavExpanded:t,isFullScreen:s,height:e})=>{const i=useStyles$1({height:e})["classes"],[a,n]=react.exports.useState(AdminCenterView.applications);return jsxRuntime.exports.jsxs("div",Object.assign({className:i.root},{children:[jsxRuntime.exports.jsx(Tabs,Object.assign({id:"adminCenterViewTabs",orientation:"vertical",value:a,onChange:(e,t)=>{n(t)},className:classnames(i.tabs,{[i.tabsExpanded]:t}),classes:{flexContainer:i.tabsContainer,indicator:i.tabIndicator},"aria-label":"admin center tabs","data-test":"ac-nav-tabs-container"},{children:navList.map(e=>jsxRuntime.exports.jsx(Tooltip,Object.assign({placement:"right",title:t?"":e.label,"data-test":"ac-nav-tab-"+e.testLabel},{children:jsxRuntime.exports.jsx(Tab,Object.assign({wrapped:!0},a11yProps(e.id),{label:t?e.label:"",icon:e.icon,classes:{root:i.tabRoot,wrapped:t?i.tabExpandedWrapper:i.tabWrapper,selected:t?i.tabExpandedSelected:i.tabSelected}}))}),e.id))})),navList.map(e=>jsxRuntime.exports.jsx(TabPanel,Object.assign({value:a,index:e.id,className:i.contentPanel},{children:e.content(s)}),e.id))]}))};function TabPanel(e){var{children:t,value:s,index:i}=e,e=__rest(e,["children","value","index"]);return jsxRuntime.exports.jsx("div",Object.assign({role:"tabpanel",hidden:s!==i,id:"admin-center-tabpanel-"+i,"aria-labelledby":"admin-center-tab-"+i},e,{children:s===i&&t}))}function a11yProps(e){return{id:"admin-center-tab-"+e,"aria-controls":"admin-center-tabpanel-"+e}}const Container=({fullScreen:e,classes:t,dimmed:s,children:i})=>e?jsxRuntime.exports.jsx(Portal,{children:jsxRuntime.exports.jsxs("div",Object.assign({role:"presentation","data-test":"ac-widget",className:classnames(t.root,t.panel,t.fullScreen)},{children:[s&&jsxRuntime.exports.jsx("div",{className:t.overlay}),i]}))}):jsxRuntime.exports.jsx("div",Object.assign({role:"presentation","data-test":"ac-widget",className:classnames(t.root,t.panel)},{children:i})),appBarHeight=55,headerHeight=64,borderBottom=5,useStyles=makeStyles()(e=>({root:{width:1020,position:"relative"},panel:{backgroundColor:e.palette.background.paper,boxShadow:"0px 0px 12px rgba(0, 0, 0, 0.25)",height:"100%"},fullScreen:{position:"fixed",width:"100%",height:"100vh",top:0,left:0,right:0,bottom:0,zIndex:1004},overlay:{backgroundColor:e.palette.grey[50],opacity:"0.5 !important",height:"100%",position:"absolute",top:0,width:"100%",zIndex:1001}})),MainLayout=({hidePanel:e})=>{const[t,s]=react.exports.useState(!0),[i,a]=react.exports.useState(!1);var n=useStyles()["classes"];const r=useSelector(panelsSelector)||[];var o=r.find(e=>"ADMIN_CENTER_BROWSE"===e.panelId)||{panelConfig:{dimmed:0}},o=0<(null==(o=null===o?void 0:o.panelConfig)?void 0:o.dimmed),l=`calc(100vh - ${i?25:appBarHeight+borderBottom}px - ${headerHeight}px)`;return jsxRuntime.exports.jsxs(Container,Object.assign({dimmed:o,fullScreen:i,classes:n},{children:[jsxRuntime.exports.jsx(Header,{height:headerHeight,hidePanel:e,isNavExpanded:t,onLeftNavigationToggle:()=>{s(!t)},isFullScreen:i,onFullScreenToggle:()=>{a(!i)}}),jsxRuntime.exports.jsx(MainTabPanel,{height:l,isNavExpanded:t,isFullScreen:i})]}))},Content=e=>{var{apiRoot:t,graphQLEndpoint:s,token:i}=useSelector(selectApiConfigs);return t&&s&&i?jsxRuntime.exports.jsx(MainLayout,Object.assign({},e)):null},AdminCenterBrowse=e=>jsxRuntime.exports.jsx(AIWareThemeProvider,{children:jsxRuntime.exports.jsx(lib.DynamicModuleLoader,Object.assign({modules:[getAdminCenterGroupsModule(),getAdminCenterPermissionsModule(),getAdminCenterApplicationsModule()]},{children:jsxRuntime.exports.jsx(AIWareIntlProvider,{children:jsxRuntime.exports.jsx(Content,Object.assign({},e))})}))});export{AdminCenterBrowse};
1
+ import{z as createSvgIcon,C as interopRequireDefault,j as jsxRuntime,H as createSlice,D as createAction,cd as combineReducers,ce as createSelector,O as rootApiSelector,R as graphEndpointSelector,Q as sessionTokenSelector,dg as channel,m as makeStyles,di as VideoCamera,dj as Image,dk as Sound,dl as Description,bw as CacheProvider,bx as muiCache,cg as AIWareThemeProvider,K as lib,A as AIWareIntlProvider,r as react,k as useSelector,M as preferredLanguageSelector,f$ as initialConfigSelector,eI as authSelector,i as useDispatch,fh as betaFeaturesSelector,x as classnames,B as Box$1,q as Alert,T as Typography$1,F as FormattedMessage,a8 as Tooltip,a9 as IconButton,ch as Close,a2 as all,Z as List,G as Grid,at as Button$1,aR as Dialog,aS as DialogTitle,aT as DialogContent,cr as DialogContentText,aU as DialogActions,g0 as ConfirmationModal,bU as Hide,bM as Avatar,fG as FolderOpen,g1 as EnumHelpers,bV as showMessage,bW as MessageSeverity,dy as guid,cq as mountPanel,w as TextField,af as takeLatest$1,d4 as takeEvery$1,d7 as take,ah as put,dq as UnknownDocument,$ as ListItem,eO as ListItemAvatar,a1 as ListItemText,g2 as formatBytes,eT as ListItemSecondaryAction,cu as Edit,cw as Delete,g3 as NotInterested,a7 as Divider,b4 as AIWareFormatMessage,g4 as mountPanelForResponse,s as store,ai as select,ak as call,dr as sdkEventManager,ds as SdkEvents,dt as SdkError,eY as panelsSelector,eh as hidePanel,cB as baseGraphQLApiWithError}from"./js-core.esm.js";import{selectors,actions as actions$4}from"./js-core.esm35.js";import{getAdminCenterPermissionsModule,PermissionsWidget,setACLsOnResources}from"./js-core.esm37.js";import{d as default_1$4}from"./js-core.esm42.js";import{C as Card}from"./js-core.esm9.js";import{C as Chip$1}from"./js-core.esm26.js";import{L as LinearProgress}from"./js-core.esm32.js";import"./js-core.esm24.js";import"./js-core.esm36.js";import"./js-core.esm27.js";import"./js-core.esm21.js";import"./js-core.esm38.js";import"./js-core.esm8.js";import"./js-core.esm40.js";import"./js-core.esm39.js";import"./js-core.esm12.js";import"./js-core.esm16.js";import"./js-core.esm15.js";import"./js-core.esm33.js";var LoadingStatus,ImporterView,FileItemTypeNames,MimeType,AddCircleOutline={},_interopRequireDefault$3=interopRequireDefault.exports,default_1$3=(Object.defineProperty(AddCircleOutline,"__esModule",{value:!0}),AddCircleOutline.default=void 0),_createSvgIcon$3=_interopRequireDefault$3(createSvgIcon),_jsxRuntime$3=jsxRuntime.exports,_default$3=(0,_createSvgIcon$3.default)((0,_jsxRuntime$3.jsx)("path",{d:"M13 7h-2v4H7v2h4v4h2v-4h4v-2h-4V7zm-1-5C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8z"}),"AddCircleOutline"),default_1$3=AddCircleOutline.default=_default$3,ErrorOutline={},_interopRequireDefault$2=interopRequireDefault.exports,default_1$2=(Object.defineProperty(ErrorOutline,"__esModule",{value:!0}),ErrorOutline.default=void 0),_createSvgIcon$2=_interopRequireDefault$2(createSvgIcon),_jsxRuntime$2=jsxRuntime.exports,_default$2=(0,_createSvgIcon$2.default)((0,_jsxRuntime$2.jsx)("path",{d:"M11 15h2v2h-2zm0-8h2v6h-2zm.99-5C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}),"ErrorOutline"),default_1$2=ErrorOutline.default=_default$2,RefreshOutlined={},_interopRequireDefault$1=interopRequireDefault.exports,default_1$1=(Object.defineProperty(RefreshOutlined,"__esModule",{value:!0}),RefreshOutlined.default=void 0),_createSvgIcon$1=_interopRequireDefault$1(createSvgIcon),_jsxRuntime$1=jsxRuntime.exports,_default$1=(0,_createSvgIcon$1.default)((0,_jsxRuntime$1.jsx)("path",{d:"M17.65 6.35C16.2 4.9 14.21 4 12 4c-4.42 0-7.99 3.58-7.99 8s3.57 8 7.99 8c3.73 0 6.84-2.55 7.73-6h-2.08c-.82 2.33-3.04 4-5.65 4-3.31 0-6-2.69-6-6s2.69-6 6-6c1.66 0 3.14.69 4.22 1.78L13 11h7V4l-2.35 2.35z"}),"RefreshOutlined"),default_1$1=RefreshOutlined.default=_default$1,CloudUploadOutlined={},_interopRequireDefault=interopRequireDefault.exports,default_1=(Object.defineProperty(CloudUploadOutlined,"__esModule",{value:!0}),CloudUploadOutlined.default=void 0),_createSvgIcon=_interopRequireDefault(createSvgIcon),_jsxRuntime=jsxRuntime.exports,_default=(0,_createSvgIcon.default)((0,_jsxRuntime.jsx)("path",{d:"M19.35 10.04C18.67 6.59 15.64 4 12 4 9.11 4 6.6 5.64 5.35 8.04 2.34 8.36 0 10.91 0 14c0 3.31 2.69 6 6 6h13c2.76 0 5-2.24 5-5 0-2.64-2.05-4.78-4.65-4.96zM19 18H6c-2.21 0-4-1.79-4-4 0-2.05 1.53-3.76 3.56-3.97l1.07-.11.5-.95C8.08 7.14 9.94 6 12 6c2.62 0 4.88 1.86 5.39 4.43l.3 1.5 1.53.11c1.56.1 2.78 1.41 2.78 2.96 0 1.65-1.35 3-3 3zM8 13h2.55v3h2.9v-3H16l-4-4z"}),"CloudUploadOutlined"),default_1=CloudUploadOutlined.default=_default;!function(){var e={};try{if(process)return process.env=Object.assign({},process.env),Object.assign(process.env,e)}catch(e){}globalThis.process={env:e}}();const SLICE_NAME="dataCenterImporter",DEFAULT_ACCEPTABLE_FILE_TYPES=(!function(e){e.Failed="failed",e.Idle="idle",e.Pending="pending"}(LoadingStatus=LoadingStatus||{}),!function(e){e[e.browseFiles=0]="browseFiles",e[e.filesSelected=1]="filesSelected",e[e.folders=2]="folders"}(ImporterView=ImporterView||{}),!function(e){e.Image="image",e.Video="video",e.Audio="audio",e.Text="text"}(FileItemTypeNames=FileItemTypeNames||{}),!function(e){e.ApplicationJson="application/json",e.ApplicationMsWord="application/msword",e.ApplicationPdf="application/pdf",e.ApplicationRtf="application/rtf",e.ApplicationSmil="application/smil+xml",e.ApplicationTtml="application/ttml+xml",e.ApplicationVeritoneAion="application/vnd.veritone.aion+json",e.ApplicationMsOutlook="application/vnd.ms-outlook",e.ApplicationMsPowerpoint="application/vnd.ms-powerpoint",e.ApplicationDocument="application/vnd.openxmlformats-officedocument.wordprocessingml.document",e.ApplicationSpreadsheet="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",e.ApplicationPresentation="application/vnd.openxmlformats-officedocument.presentationml.presentation",e.ApplicationOasisDoc="application/vnd.oasis.opendocument.text",e.ApplicationOasisSpreadsheet="application/vnd.oasis.opendocument.spreadsheet",e.ApplicationXFlv="application/x-flv",e.ApplicationXml="application/xml",e.ApplicationFormUrlEncoded="application/x-www-form-urlencoded",e.ImageJpeg="image/jpeg",e.ImagePng="image/png",e.ImageTiff="image/tiff",e.ImageGig="image/gif",e.TextPlain="text/plain",e.TextHtml="text/html",e.TextCsv="text/csv",e.TextPlainCharset="text/plain; charset=utf-8",e.AudioAac="audio/aac",e.AudioFlac="audio/flac",e.AudioMidi="audio/midi",e.AudioMp4="audio/mp4",e.AudioMpeg="audio/mpeg",e.AudioWav="audio/wav",e.AudioXWav="audio/x-wav",e.AudioWebm="audio/webm",e.VideoMp4="video/mp4",e.VideoMpeg="video/mpeg",e.VideoOgg="video/ogg",e.VideoQuicktime="video/quicktime",e.VideoWebm="video/webm",e.VideoM4v="video/x-m4v",e.VideoMsWmv="video/x-ms-wmv",e.VideoMsvideo="video/x-msvideo",e.Message="message/rfc822"}(MimeType=MimeType||{}),[{name:"Image",type:FileItemTypeNames.Image,extensions:[MimeType.ImageJpeg,MimeType.ImagePng,MimeType.ImageTiff,MimeType.ImageGig]},{name:"Video",type:FileItemTypeNames.Video,extensions:[MimeType.VideoMp4,MimeType.VideoMpeg,MimeType.VideoOgg,MimeType.VideoQuicktime,MimeType.VideoWebm,MimeType.VideoM4v,MimeType.VideoMsWmv,MimeType.VideoMsvideo]},{name:"Audio",type:FileItemTypeNames.Audio,extensions:[MimeType.AudioAac,MimeType.AudioFlac,MimeType.AudioMidi,MimeType.AudioMp4,MimeType.AudioMpeg,MimeType.AudioWav,MimeType.AudioXWav,MimeType.AudioWebm]},{name:"Documents",type:FileItemTypeNames.Text,extensions:[MimeType.TextPlain,MimeType.TextHtml,MimeType.TextCsv,MimeType.TextPlainCharset,MimeType.ApplicationJson,MimeType.ApplicationMsWord,MimeType.ApplicationPdf,MimeType.ApplicationRtf,MimeType.ApplicationSmil,MimeType.ApplicationTtml,MimeType.ApplicationVeritoneAion,MimeType.ApplicationMsOutlook,MimeType.ApplicationMsPowerpoint,MimeType.ApplicationDocument,MimeType.ApplicationSpreadsheet,MimeType.ApplicationPresentation,MimeType.ApplicationOasisDoc,MimeType.ApplicationOasisSpreadsheet,MimeType.ApplicationXFlv,MimeType.ApplicationXml,MimeType.ApplicationFormUrlEncoded,MimeType.Message]}]),namespace$3="uiState",initialState$2={status:LoadingStatus.Idle,currentView:ImporterView.browseFiles},slice$2=createSlice({name:SLICE_NAME+"/"+namespace$3,initialState:initialState$2,reducers:{setCurrentView(e,{payload:t}){e.currentView=t},fileUploadFailed(e){e.status=LoadingStatus.Failed},fileUploadSucceed(e){e.status=LoadingStatus.Idle},fileUploadStart(e){e.status=LoadingStatus.Pending},fileUploadAbortFailed(e){e.status=LoadingStatus.Failed},tdoCreateStart(e,{payload:t}){e.status=LoadingStatus.Pending,console.log("Starting to create TDOs for: ",t.filesSelected.map(e=>e.id).join("\n"))},tdoCreateSucceed(e){e.status=LoadingStatus.Idle},tdoCreateFailed(e){e.status=LoadingStatus.Failed},retryTDOCreateForFiles(e,{payload:t}){e.status=LoadingStatus.Pending,console.log("Retrying to create TDOs for: ",t.filesSelected.map(e=>e.id).join("\n"))},fileMetaSaveSucceeded(e){e.status=LoadingStatus.Idle},fileMetaSaveFailed(e){e.status=LoadingStatus.Failed},fileMetaSaveIsProcessing(e){e.status=LoadingStatus.Pending},tdoPermissionsSucceeded(e){e.status=LoadingStatus.Idle},tdoPermissionsFailed(e){e.status=LoadingStatus.Failed}}}),actions$3=slice$2.actions;var uiState=slice$2.reducer;const namespace$2="filesSelectedState",initialState$1={files:[],tdoIds:[],permissions:{}},slice$1=createSlice({name:SLICE_NAME+"/"+namespace$2,initialState:initialState$1,reducers:{setFilesSelected(e,{payload:t}){e.files=[...e.files,...t.filesSelected]},deleteFileSelected(e,{payload:t}){var a=e.files.filter(e=>e.id!==t.id);e.files=a},deleteFailedFiles(e){var t=e.files.filter(e=>e.status!==LoadingStatus.Failed);e.files=t},updateFile(t,{payload:a}){const i=t.files.findIndex(e=>e.id===a.id);-1!==i&&Object.keys(a).forEach(e=>{t.files[i][e]=a[e]})},retryFileUpload(e,{payload:t}){console.log("Retrying the files:",t.filesSelected.map(e=>e.id).join("/n"))},abortFileUpload(e,t){},addMetadataAction(e,t){console.log("nothing")},addMetadataToSelectedFile(e,t){const{id:a,meta:i}=t.payload;e.files.forEach(e=>{e.id===a&&(e.meta=i)})},setUploadedFilesTdoIds(e,t){t=t.payload.tdoIds;e.tdoIds=t},setPermissionsPayload(e,t){t=t.payload;e.permissions=t}}}),actions$2=slice$1.actions;var filesSelectedState=slice$1.reducer;const namespace$1="rootFolderState",initialState={rootFolder:null,status:LoadingStatus.Idle},slice=createSlice({name:SLICE_NAME+"/"+namespace$1,initialState:initialState,reducers:{startRootFolderFetch(e){e.status=LoadingStatus.Pending},rootFolderFetchSucceed(e,{payload:t}){e.rootFolder=t.rootFolder,e.status=LoadingStatus.Idle},rootFolderFetchFailed(e){e.status=LoadingStatus.Failed},updateRootFolder(e,{payload:t}){e.rootFolder=t.activeFolder}},extraReducers:e=>{e.addCase(createAction("DATA_CENTER_FOLDERS_AND_FILES_RESPONSE"),(e,{payload:t})=>{e.rootFolder=t.folder})}}),actions$1=slice.actions;var rootFolderState=slice.reducer;const namespace=SLICE_NAME,actions={[namespace$3]:actions$3,[namespace$2]:actions$2,[namespace$1]:actions$1},rootReducer=combineReducers({[namespace$3]:uiState,[namespace$2]:filesSelectedState,[namespace$1]:rootFolderState});function __awaiter(e,r,n,l){return new(n=n||Promise)(function(a,t){function i(e){try{o(l.next(e))}catch(e){t(e)}}function s(e){try{o(l.throw(e))}catch(e){t(e)}}function o(e){var t;e.done?a(e.value):((t=e.value)instanceof n?t:new n(function(e){e(t)})).then(i,s)}o((l=l.apply(e,r||[])).next())})}function getSignedWritableUrls(t,a){return __awaiter(this,void 0,void 0,function*(){var e="getSignedWritableUrls";return(yield baseGraphQLApiWithError(Object.assign({query:"query getSignedWritableUrls($count: Int!) {\n getSignedWritableUrls(number: $count) {\n bucket,\n expiresInSeconds,\n getUrl,\n key,\n unsignedUrl,\n url,\n }\n }",variables:{count:a},operationName:e},t)))[e]})}function uploadFileToS3(i,s,{onProgress:o,onError:r,onAbort:n,onUpload:l}){return __awaiter(this,void 0,void 0,function*(){const e=new XMLHttpRequest,t=(e.upload.onload=()=>{l&&l(`The upload is completed: ${e.status} `+e.response)},e.upload.onerror=()=>{r&&r("Upload failed.")},e.upload.onabort=()=>{n&&n("Upload cancelled.")},e.upload.onprogress=e=>{o&&o(e.loaded/e.total*100)},e.open("PUT",i.url,!0),e.setRequestHeader("Content-Type",s.type),yield fetch(s.fileUrl));var a=yield t.blob();return e.send(a),e})}function getOrgCmsRootFolder(a){var i;return __awaiter(this,void 0,void 0,function*(){var e="getOrgCmsRootFolder",t="createRootFolders",e=yield baseGraphQLApiWithError(Object.assign({query:"mutation getOrgCmsRootFolder{\n createRootFolders(rootFolderType: cms) {\n id\n name\n modifiedDateTime\n treeObjectId\n ownerId\n }\n }\n ",operationName:e},a));return{orgRootFolder:null==(i=e[t])?void 0:i.find(e=>!e.ownerId),errors:e.errors||null}})}function createTDOWithAsset(i,s){var o,r,n,l,d,c;return __awaiter(this,void 0,void 0,function*(){try{var e="createTDOWithAsset",t={input:Object.assign(Object.assign({addToIndex:!0,contentType:s.contentType,name:s.name,uri:s.uri,parentFolderId:s.parentFolderId,startDateTime:null!=(o=null==s?void 0:s.meta)&&o.startDateTime?null==(r=null==s?void 0:s.meta)?void 0:r.startDateTime:s.startDateTime,assetType:"media"},null!=(n=null==s?void 0:s.meta)&&n.thumbnailUrl?{thumbnailUrl:null==(l=null==s?void 0:s.meta)?void 0:l.thumbnailUrl}:{}),{details:{veritoneFile:{filename:null==(d=null==s?void 0:s.meta)?void 0:d.fileName,mimetype:s.contentType,size:s.size},tags:null==(c=null==s?void 0:s.meta)?void 0:c.tags}})},a=yield baseGraphQLApiWithError(Object.assign({query:'mutation ($input: CreateTDOWithAsset!) {\n createTDOWithAsset(input: $input) {\n id\n name\n details\n modifiedDateTime\n primaryAsset(assetType: "media") {\n contentType\n signedUri\n }\n folders{\n folderPath{\n name\n id\n }\n }\n sourceData {\n source {\n id\n sourceTypeId\n }\n }\n thumbnailUrl\n }\n }\n ',variables:t},i));return{data:a[e],errors:a.errors||null}}catch(e){return{data:null,errors:e.message||"Unable to create TDO"}}})}const THUMBNAIL_ENGINE_ID="fd891cb5-ff80-48ae-b5cd-ac3c7d190d55";function createThumbnailJob(i,s){var o;return __awaiter(this,void 0,void 0,function*(){var e="createThumbailJob",t="createJob",a={input:{targetId:s,tasks:[{engineId:THUMBNAIL_ENGINE_ID}]}},a=yield baseGraphQLApiWithError(Object.assign({query:"\n mutation createThumbailJob($input: CreateJob) {\n createJob(input: $input) {\n id\n }\n }\n ",variables:a,operationName:e},i));return null==(o=a[t])?void 0:o.id})}const selectUIStateStatus=e=>e[namespace].uiState.status,selectCurrentView=e=>e[namespace].uiState.currentView,rootFolderSelector=e=>e[namespace].rootFolderState.rootFolder,selectSelectedFiles=e=>e[namespace].filesSelectedState.files,selectUploadedFilesTdoIds=e=>{return null==(e=null==(e=e[namespace])?void 0:e.filesSelectedState)?void 0:e.tdoIds},selectPermissions=e=>{return null==(e=null==(e=e[namespace])?void 0:e.filesSelectedState)?void 0:e.permissions},selectApiConfigs=createSelector([rootApiSelector,graphEndpointSelector,sessionTokenSelector],(e,t,a)=>({apiRoot:e,graphQLEndpoint:t,token:a}));function*rootFolderFetch(){var e,t=yield select(selectApiConfigs),a=yield select(preferredLanguageSelector);const i=AIWareFormatMessage(a);try{const{orgRootFolder:s,errors:o}=yield call(getOrgCmsRootFolder,t);s&&(s.isRoot=!0,yield put(actions.rootFolderState.rootFolderFetchSucceed({rootFolder:s}))),o&&(e=Array.isArray(o)?null===o||void 0===o?void 0:o.map(e=>e.message).join("\n"):i({id:"os-data-center-importer.snackbar.locationFolderFetchError",defaultMessage:[{type:0,value:"Error during the root folder fetch!"}]}),yield put(showMessage({content:e,severity:MessageSeverity.Error})),yield put(actions.rootFolderState.rootFolderFetchFailed()))}catch(e){yield put(actions.rootFolderState.rootFolderFetchFailed())}}function*watchFetchRootFolder(){yield takeLatest$1(actions.rootFolderState.startRootFolderFetch.type,rootFolderFetch)}function*createTDOs(e){var t;const o=yield select(selectApiConfigs),a=yield select(rootFolderSelector),i=e.payload.filesSelected,r=(e,t,a)=>(put(actions.filesSelectedState.updateFile(Object.assign({id:e},t))),{values:t,data:a});try{var s=i.reduce((e,t)=>(t.status===LoadingStatus.Idle&&(e[t.id]=call(createTDOWithAsset,o,{contentType:t.type,name:t.name,uri:t.unsignedUrl,parentFolderId:a.id,startDateTime:(new Date).toISOString(),size:t.size,meta:null==t?void 0:t.meta})),e),{});const c=yield all(s),p=[];var n,l=Object.keys(c).map(e=>{var t=null==(t=null==(t=c[e])?void 0:t.data)?void 0:t.id;const a=null==(i=c[e])?void 0:i.data;var i=c[e].errors;if(null!==a&&void 0!==a&&a.details&&(a.name=(null==(s=null==(s=a.details)?void 0:s.veritoneFile)?void 0:s.filename)||(null==(s=null==(s=a.details)?void 0:s.veritoneFile)?void 0:s.fileName)||a.name),!t||i)return sdkEventManager.dispatch(SdkEvents.tdoCreated,new SdkError(i||"TDO creation failed!"),{fileId:e,tdoId:t}),r(e,{tdoStatus:LoadingStatus.Failed});var s=t;try{createThumbnailJob(o,s)}catch(e){console.log("Error while launching thumbnail generation job",e)}return sdkEventManager.dispatch(SdkEvents.tdoCreated,null,{fileId:e,tdoId:t}),r(e,{tdoId:t,tdoStatus:LoadingStatus.Idle},a)}),d=yield all(l);for(let e=0;e<d.length;e++)d[e].values.tdoStatus===LoadingStatus.Idle&&(n=d[e].values.tdoId,p.push(n),yield put(actions$4.viewMyFiles.addTdoFolder({folderId:a.id,tdoId:n})),yield put(actions$4.entities.addTdoImported({file:null==(t=d[e])?void 0:t.data})));yield put(actions.filesSelectedState.setUploadedFilesTdoIds({tdoIds:p})),yield call(applyPermissionsToTDOs),yield put(actions.uiState.tdoCreateSucceed())}catch(e){console.log(e),yield put(actions.uiState.tdoCreateFailed())}}function*closeImporterPanel(){const e=yield select(panelsSelector);var t=e.find(e=>"DATA_CENTER_IMPORTER"===e.microFrontend.name);t&&t.panelId&&(t=t["panelId"],yield put(hidePanel(t)))}function*getUrlBuckets(e){var t=yield select(selectApiConfigs);return yield call(getSignedWritableUrls,t,e)}function*applyPermissionsToTDOs(){var e=yield select(selectApiConfigs),t=yield select(selectUploadedFilesTdoIds),a=yield select(selectPermissions),a=Object.assign(Object.assign({},a),{ids:t,type:"TDO"});try{yield call(setACLsOnResources,e,a),yield put(actions.uiState.tdoPermissionsSucceeded())}catch(e){yield put(actions.uiState.tdoPermissionsFailed())}}function*closeFileMetadataPanel(){const e=yield select(panelsSelector);var t=e.find(e=>"EDIT_FILE_METADATA"===e.microFrontend.name);t&&t.panelId&&(t=t["panelId"],yield put(hidePanel(t)))}function*addMetadataToFile(e){var t=yield select(preferredLanguageSelector),e=e["payload"];const{id:a,meta:i}=e,s=AIWareFormatMessage(t);try{var[o]=yield call(getUrlBuckets,1);yield put(actions.uiState.fileMetaSaveIsProcessing()),i.thumbnailImg&&(yield call(handleMetaFileS3Upload,i.thumbnailImg,o)),i.thumbnailUrl=o.unsignedUrl,i.runTime&&i.runDate&&(i.startDateTime=new Date(i.runDate+" "+i.runTime).toISOString()),yield put(actions.filesSelectedState.addMetadataToSelectedFile({id:a,meta:i})),yield put(actions.uiState.fileMetaSaveSucceeded())}catch(e){yield put(showMessage({content:s({id:"os-data-center-importer.snackbar.fileMetaError",defaultMessage:[{type:0,value:"Something went wrong while saving your changes."}]}),severity:MessageSeverity.Error}))}}function*handleMetaFileS3Upload(e,t){yield uploadFileToS3(t,Object.assign(Object.assign({},e),{getUrl:t.getUrl,expiresInSeconds:t.expiresInSeconds,key:t.key,unsignedUrl:t.unsignedUrl,url:t.url}),{})}function*watchSetFileMetadata(){yield takeLatest$1(actions.filesSelectedState.addMetadataAction.type,addMetadataToFile)}function*watchFileMetadataSuccess(){yield takeEvery$1(actions.uiState.fileMetaSaveSucceeded.type,closeFileMetadataPanel)}function*watchTDOCreateStart(){yield takeLatest$1(actions.uiState.tdoCreateStart.type,createTDOs)}function*watchRetryTDOCreation(){yield takeEvery$1(actions.uiState.retryTDOCreateForFiles.type,createTDOs)}function*watchTdoCreateSuccess(){yield takeEvery$1(actions.uiState.tdoCreateSucceed.type,closeImporterPanel)}const root="undefined"!=typeof window?window:global,fileUploadChannel=(root.xhrInstances={},channel());function*filesSelected(t){var a=t.payload.filesSelected,i=t.payload.sdkFiles;try{yield put(actions.uiState.fileUploadStart());var s=yield call(getUrlBuckets,a.length);let e=0;for(const r of s){const n=a[e],l=(e++,yield put(actions.filesSelectedState.updateFile({id:n.id,status:LoadingStatus.Pending,percentComplete:0,expiresInSeconds:r.expiresInSeconds,getUrl:r.getUrl,key:r.key,unsignedUrl:r.unsignedUrl,url:r.url})),Object.assign(Object.assign({},i),{expiresInSeconds:r.expiresInSeconds,getUrl:r.getUrl,key:r.key,unsignedUrl:r.unsignedUrl,url:r.url})),d=e=>{fileUploadChannel.put(actions.filesSelectedState.updateFile(Object.assign({id:n.id},e)))};var o=yield uploadFileToS3(r,n,{onProgress:e=>{d({percentComplete:e}),sdkEventManager.dispatch(SdkEvents.fileUploadProgress,null,e)},onAbort:e=>{d({status:LoadingStatus.Idle}),sdkEventManager.dispatch(SdkEvents.fileUpload,new SdkError(e,"abort"),l)},onError:e=>{d({status:LoadingStatus.Failed}),sdkEventManager.dispatch(SdkEvents.fileUpload,new SdkError(e),l)},onUpload:e=>{d({status:LoadingStatus.Idle}),sdkEventManager.dispatch(SdkEvents.fileUpload,null,l)}});root.xhrInstances[n.id]=o,yield put(actions.uiState.fileUploadSucceed())}}catch(e){t=(null==e?void 0:e.message)||"";console.error(t),yield put(actions.uiState.fileUploadFailed())}}function*abortFileUpload({payload:e}){try{var t=null==e?void 0:e.id;const a=root.xhrInstances[t];null!==a&&void 0!==a&&a.abort(),yield put(actions.filesSelectedState.deleteFileSelected({id:t}))}catch(e){yield put(actions.uiState.fileUploadAbortFailed())}}function*watchFilesSelected(){yield takeEvery$1(actions.filesSelectedState.setFilesSelected.type,filesSelected)}function*watchRetryFileUpload(){yield takeEvery$1(actions.filesSelectedState.retryFileUpload.type,filesSelected)}function*watchProgressChannel(){for(;;){var e=yield take(fileUploadChannel);yield put(e)}}function*watchFileAbort(){yield takeEvery$1(actions.filesSelectedState.abortFileUpload.type,abortFileUpload)}function*rootSaga(){yield all([watchFilesSelected(),watchProgressChannel(),watchRetryFileUpload(),watchFileAbort(),watchFetchRootFolder(),watchTDOCreateStart(),watchRetryTDOCreation(),watchTdoCreateSuccess(),watchSetFileMetadata(),watchFileMetadataSuccess()])}function getDataCenterImporterModule(){return{id:SLICE_NAME,reducerMap:{[SLICE_NAME]:rootReducer},sagas:[rootSaga],initialActions:[]}}const useStyles$a=makeStyles()(e=>({buttonContainer:{position:"relative",margin:"16px"},fileButton:{border:"1px solid #1871E8!important",borderRadius:e.shape.borderRadius,fontWeight:600,fontSize:"12px!important",background:e.palette.background.paper,color:"#1871E8!important",padding:"6px 15px!important"},hiddenFileButton:{visibility:"hidden",position:"absolute",left:0,width:"100%",height:"100%"}})),UploadButton=({id:e,labelCss:t,onUpload:a,render:i,imageOnly:s=!1,isUploadEnabled:o=!0})=>{const r=react.exports.useRef();var n=useStyles$a()["classes"];return react.exports.useEffect(()=>{o||(r.current.value=null)},[r,o]),jsxRuntime.exports.jsxs("label",Object.assign({htmlFor:"upload-file-input-"+e,className:t,onClick:e=>{o||e.preventDefault()}},{children:[i&&i({handleButtonClick:()=>{o&&r.current.click()}}),jsxRuntime.exports.jsx("input",{id:"upload-file-input-"+e,"data-test":"data-center-importer-local-upload-file-input-"+e,type:"file",multiple:!0,accept:s?"image/*":"",className:n.hiddenFileButton,onChange:a,ref:e=>r.current=e})]}))},useStyles$9=makeStyles()(e=>({progress:{width:"117px",height:"10px",borderRadius:8,backgroundColor:"#F2F7FE",display:"inline-block"},listItem:{padding:e.spacing(3,1)},avatar:{backgroundColor:"#FAFAFA",color:e.palette.secondary.main},errorIcon:{backgroundColor:"#FEF2F2","& svg:hover":{color:e.palette.error.main}},secondaryAction:{right:"0"},filename:{width:"330px",overflow:"hidden",whiteSpace:"nowrap",userSelect:"none"},caption:{userSelect:"none"}})),icons={video:jsxRuntime.exports.jsx(VideoCamera,{}),image:jsxRuntime.exports.jsx(Image,{}),audio:jsxRuntime.exports.jsx(Sound,{}),text:jsxRuntime.exports.jsx(Description,{}),application:jsxRuntime.exports.jsx(Description,{})},FileItemIcon=({filetype:e})=>{var[e]=e.split("/");return e&&icons[e]?icons[e]:jsxRuntime.exports.jsx(UnknownDocument,{})};function FileItem({item:e,onDelete:t,onRetry:a,onAbort:i,onEdit:s,showDivider:o=!0,uiStateStatus:r}){const{id:n,percentComplete:l,status:d,tdoStatus:c,size:p,type:u,meta:m}=e;let x=e["name"];m&&m.fileName&&(x=m.fileName);var g=useStyles$9()["classes"],f=[d,c].includes(LoadingStatus.Failed);return jsxRuntime.exports.jsxs(react.exports.Fragment,{children:[jsxRuntime.exports.jsxs(ListItem,Object.assign({className:g.listItem},{children:[jsxRuntime.exports.jsx(ListItemAvatar,{children:f?jsxRuntime.exports.jsx(Avatar,Object.assign({"data-test":"file-item-failed-icon",className:g.errorIcon},{children:jsxRuntime.exports.jsx(default_1$2,{color:"error"})})):jsxRuntime.exports.jsx(Avatar,Object.assign({"data-test":"file-item-avatar",className:g.avatar},{children:jsxRuntime.exports.jsx(FileItemIcon,{filetype:u})}))}),jsxRuntime.exports.jsx(ListItemText,{primary:jsxRuntime.exports.jsx(Tooltip,Object.assign({title:30<x.length?x:"",placement:"bottom-end"},{children:jsxRuntime.exports.jsx(Typography$1,Object.assign({"data-test":"file-item-title",className:g.filename,variant:"body1"},{children:30<x.length?x.substring(0,30)+"...":x}))})),secondary:jsxRuntime.exports.jsx(Typography$1,Object.assign({"data-test":"file-item-size",variant:"caption",className:g.caption},{children:formatBytes(p)}))}),jsxRuntime.exports.jsxs(ListItemSecondaryAction,Object.assign({className:g.secondaryAction},{children:[f&&jsxRuntime.exports.jsx(Tooltip,Object.assign({title:"Retry uploading"},{children:jsxRuntime.exports.jsx(IconButton,Object.assign({"data-test":"file-item-retry",onClick:()=>a(e),size:"large"},{children:jsxRuntime.exports.jsx(default_1$1,{})}))})),d===LoadingStatus.Idle&&jsxRuntime.exports.jsx(IconButton,Object.assign({"data-test":"file-item-edit",onClick:()=>s(e),size:"large"},{children:jsxRuntime.exports.jsx(Edit,{})})),([LoadingStatus.Failed,LoadingStatus.Idle].includes(d)||r===LoadingStatus.Failed)&&jsxRuntime.exports.jsx(IconButton,Object.assign({"data-test":"file-item-delete",onClick:()=>t(n),size:"large"},{children:jsxRuntime.exports.jsx(Delete,{})})),d===LoadingStatus.Pending&&jsxRuntime.exports.jsxs(jsxRuntime.exports.Fragment,{children:[jsxRuntime.exports.jsx(LinearProgress,{"data-test":"file-item-progress",className:g.progress,variant:"determinate",value:l}),jsxRuntime.exports.jsx(IconButton,Object.assign({"data-test":"file-item-abort",title:"Cancel Import",onClick:()=>i(e),size:"large"},{children:jsxRuntime.exports.jsx(NotInterested,{})}))]})]}))]})),o&&jsxRuntime.exports.jsx(Divider,{})]})}const useStyles$8=makeStyles()(e=>({fileItemListContainer:{paddingLeft:e.spacing(4),paddingRight:e.spacing(4),height:300,overflowY:"scroll",marginRight:5,marginTop:5,"&::-webkit-scrollbar":{width:3},"&::-webkit-scrollbar-track":{background:"transparent"},"&::-webkit-scrollbar-thumb":{background:"#D5DFE9",padding:5,borderRadius:50},"&::-webkit-scrollbar-thumb:hover":{background:"#919ca8"}},shadowGradient:{display:"block",position:"absolute",top:-1,left:0,width:"100%",height:28,background:"linear-gradient(180deg, rgba(255, 255, 255, 0) 0%, #FFFFFF 100%)",transform:"translateY(-100%)"},footerWrapper:{borderTop:"0.5px solid #D5DFE9",position:"relative",padding:"13px 30px"},viewFormatsBtn:{cursor:"pointer",color:"#6098D1",fontSize:14,"&:hover":{color:e.palette.primary.main}},retryButton:{border:"1px solid",borderColor:e.palette.secondary.main,borderRadius:e.shape.borderRadius,fontWeight:600,fontSize:"12px!important",background:e.palette.background.paper,color:e.palette.secondary.main,padding:"6px 15px!important"},refreshIcon:{marginRight:e.spacing(2),color:e.palette.secondary.main,"&:hover":{color:e.palette.secondary.main}},addFilesIcon:{marginRight:e.spacing(2),color:e.palette.primary.main,"&:hover":{color:e.palette.primary.main}},addFilesBtn:{paddingLeft:0,paddingRight:0},addFilesLabel:{alignItems:"center",display:"flex",cursor:"pointer",paddingLeft:e.spacing(2),paddingRight:e.spacing(2)},addIcon:{display:"block",marginRight:e.spacing(1)},filePickerInput:{display:"none"}})),FileItemList=({onUpload:t,fileItems:a,onDelete:i,onRetryFailedsClick:e,onRetry:s,onAbort:o,onEdit:r,uiStateStatus:n})=>{const l=useStyles$8()["classes"],d=useStyles$a()["classes"];var c=a.some(e=>e.status===LoadingStatus.Failed);return jsxRuntime.exports.jsxs(jsxRuntime.exports.Fragment,{children:[jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"h2",color:"textPrimary","data-test":"data-center-file-item-list-title"},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-data-center-importer.eAju+6",defaultMessage:"Local Machine",description:"Title of a list of files that user is uploading from their local machine"})})),jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"body2",color:"textSecondary","data-test":"data-center-file-item-list-subheader"},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-data-center-importer.Khv+RJ",defaultMessage:"Choose files from your computer to import into your account",description:"A short description of local machine upload"})})),jsxRuntime.exports.jsxs(Box$1,Object.assign({mt:6,borderRadius:"4px",border:"0.5px solid #D5DFE9"},{children:[jsxRuntime.exports.jsx(List,Object.assign({disablePadding:!0,className:l.fileItemListContainer,"data-test":"data-center-file-item-list-wrapper"},{children:null==a?void 0:a.map((e,t)=>jsxRuntime.exports.jsx(FileItem,{item:e,showDivider:t!==a.length-1,onDelete:i,onRetry:s,onAbort:o,onEdit:r,uiStateStatus:n},t))})),jsxRuntime.exports.jsxs(Grid,Object.assign({direction:"row",justifyContent:"flex-end",alignItems:"center",item:!0,container:!0,className:l.footerWrapper},{children:[jsxRuntime.exports.jsx("span",{className:l.shadowGradient}),c&&jsxRuntime.exports.jsxs(Button$1,Object.assign({"data-test":"data-center-importer-local-retry-button",variant:"outlined",className:l.retryButton,onClick:e},{children:[jsxRuntime.exports.jsx(default_1$1,{fontSize:"small",className:l.refreshIcon}),jsxRuntime.exports.jsx(FormattedMessage,{id:"os-data-center-importer.nJrtcz",defaultMessage:"Retry Failed Items",description:"Text of the label `Retry Failed Items`"})]})),jsxRuntime.exports.jsx(UploadButton,{onUpload:e=>{e=Array.from(e.target.files);t(e)},id:"file-item-list-upload-button",render:({handleButtonClick:e})=>jsxRuntime.exports.jsxs(Button$1,Object.assign({id:"file-item-list-upload-button",variant:"outlined",className:d.fileButton,onClick:e},{children:[jsxRuntime.exports.jsx(default_1$3,{fontSize:"small",className:l.addFilesIcon}),jsxRuntime.exports.jsx(FormattedMessage,{id:"os-data-center-importer.ydDseD",defaultMessage:"Add Files",description:"Text of the label `Add Files`"})]}))})]}))]}))]})},useStyles$7=makeStyles()(e=>({footer:{position:"absolute",right:e.spacing(6),bottom:e.spacing(6)},closeButton:{marginRight:e.spacing(2),color:e.palette.text.primary},dialogTitle:{padding:`${e.spacing(6)} ${e.spacing(6)} ${e.spacing(1)}px !important `},dialogContent:{padding:`${e.spacing(1)} ${e.spacing(6)} !important `},dialogTitleText:{fontWeight:600},dialogAction:{padding:e.spacing(4)+" !important"}})),Footer=({fileItems:e,onClosePanel:t,onImportFiles:a,onIgnoreAndContinue:i,onRetry:s,uiStateStatus:o})=>{const[r,n]=react.exports.useState(!1),[l,d]=react.exports.useState(!1);var c=useStyles$7()["classes"],p=e.some(e=>e.status===LoadingStatus.Pending);const u=()=>{n(!1)};react.exports.useEffect(()=>{u()},[s,i]);p=0===e.length||p||[LoadingStatus.Pending,LoadingStatus.Failed].includes(o);return jsxRuntime.exports.jsxs("div",Object.assign({className:c.footer},{children:[jsxRuntime.exports.jsx(Button$1,Object.assign({onClick:()=>{e.length?d(!0):t()},variant:"text",size:"large",className:c.closeButton,"data-test":"data-center-importer-cancel-btn"},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-data-center-importer.0EGcHs",defaultMessage:"Close",description:"Close Panel"})})),jsxRuntime.exports.jsx(Button$1,Object.assign({onClick:()=>{e.some(e=>e.status===LoadingStatus.Failed)?n(!0):a()},disabled:p,size:"large",variant:"contained",color:"primary","data-test":"data-center-importer-import-btn"},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-data-center-importer.pcbRZH",defaultMessage:"Import",description:"Import uploaded files"})})),jsxRuntime.exports.jsxs(Dialog,Object.assign({open:r,maxWidth:"xs",onClose:u,"aria-labelledby":"dialog-title","aria-describedby":"dialog-description"},{children:[jsxRuntime.exports.jsx(DialogTitle,Object.assign({id:"dialog-title","data-test":"data-center-importer-dialog-title",className:c.dialogTitle},{children:jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"h2",className:c.dialogTitleText},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-data-center-importer.cl4DGP",defaultMessage:"Errors Detected",description:"title for Error Detected Dialog"})}))})),jsxRuntime.exports.jsx(DialogContent,Object.assign({className:c.dialogContent},{children:jsxRuntime.exports.jsx(DialogContentText,Object.assign({id:"dialog-description"},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-data-center-importer.N9Drr+",defaultMessage:"Some of your files have errors, would you like to fix these errors or continue?",description:"description for Error Detected Dialog"})}))})),jsxRuntime.exports.jsxs(DialogActions,Object.assign({className:c.dialogAction},{children:[jsxRuntime.exports.jsx(Button$1,Object.assign({onClick:s,variant:"text",size:"large","data-test":"data-center-importer-dialog-cancel-btn"},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-data-center-importer.7+A+C3",defaultMessage:"Retry Errors",description:"button text for retry failed files"})})),jsxRuntime.exports.jsx(Button$1,Object.assign({onClick:i,size:"large",variant:"contained",color:"primary","data-test":"data-center-importer-dialog-confirm-btn"},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-data-center-importer.E9hwYl",defaultMessage:"Ignore Errors and Continue",description:"button text for ignore failed files and kick of the importing progress"})}))]}))]})),jsxRuntime.exports.jsx(ConfirmationModal,{showConfirmationModal:l,closeConfirmationModal:()=>{d(!1)},onClosePanel:t,classes:c})]}))},useStyles$6=makeStyles()(e=>({root:{width:"720px",height:"auto"},configurationContainer:{minHeight:"650px"},mainContainer:{margin:e.spacing(6)},spacer:{marginTop:e.spacing(6)},header:{alignItems:"center",borderBottom:"0.5px solid "+e.palette.divider,backgroundColor:"#FAFAFA !important",display:"flex",height:64,padding:e.spacing(2)},headerTitle:{paddingLeft:e.spacing(4)},headerActionContainer:{alignItems:"center",display:"flex",flexGrow:1,height:"100%",justifyContent:"flex-end"},alert:{color:e.palette.error.main,userSelect:"none","& svg, & svg:hover":{color:e.palette.error.main}},permissionsContainer:{marginTop:"30px"},description:{fontWeight:400,marginBlockStart:"16px",userSelect:"none"}})),visuallyHidden={border:0,clip:"rect(0 0 0 0)",height:"1px",margin:-1,overflow:"hidden",padding:0,position:"absolute",whiteSpace:"nowrap",width:"1px"};var visuallyHidden$1=visuallyHidden;const SHARED_TEXT={panelHeaderTitle:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"os-data-center-importer.UQliO+",defaultMessage:"Local Machine Importer",description:"Local Machine Importer"}),closePanel:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"os-data-center-importer.kOsSpC",defaultMessage:"Close Panel",description:"Close Panel"}),locationFolderTitle:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"os-data-center-importer.UR2j6X",defaultMessage:"Location Folder",description:"Location Folder"}),locationFolderSubheader:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"os-data-center-importer.zEHvrp",defaultMessage:"Choose the Data Center folder location where this content will be stored.",description:"Choose the Data Center folder location where this content will be stored."}),locationFolderLabel:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"os-data-center-importer.UR2j6Z",defaultMessage:"Folder",description:"Folder"}),locationFolderReselect:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"os-data-center-importer.gtjP09",defaultMessage:"Change",description:"Change"}),editFileMetadataHeader:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"os-data-center-importer.WUHjl4",defaultMessage:"Edit Metadata",description:"Edit Metadata"}),editFileMetadataCancelBtn:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"os-data-center-importer.6PdOcy",defaultMessage:"Cancel",description:"Cancel"}),editFileMetadataSaveBtn:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"os-data-center-importer.kxBKrN",defaultMessage:"Save Changes",description:"Save file metadata changes"}),editFileMetadataAddBtn:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"os-data-center-importer.rntBSe",defaultMessage:"Add",description:"Add tags to metadata"}),editFileMetadataTagsHeading:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"os-data-center-importer.fXL811",defaultMessage:"Tags",description:"Tags heading"}),editFileMetadataTagsSubHeading:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"os-data-center-importer.WFj+x5",defaultMessage:"Add searchable tags to better organize this data. Separate each tag with a comma.",description:"Tags sub heading"}),editFileMetadataDisplayTimeHeading:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"os-data-center-importer.8aqtJF",defaultMessage:"Media Display Time",description:"Media Display Time heading"}),editFileMetadataDisplayTimeSubHeading:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"os-data-center-importer.mhUvxM",defaultMessage:"The actual time the content occurred.",description:"Media Display Time sub heading"}),supportedFilesTitle:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"os-data-center-importer.1riZqU",defaultMessage:"Supported File Types",description:"The title for the container of supported files"})},Header=({onPanelClose:e})=>{var t=useStyles$6()["classes"];return jsxRuntime.exports.jsxs("div",Object.assign({className:t.header,"data-test":"data-center-importer-header"},{children:[jsxRuntime.exports.jsx(Typography$1,Object.assign({className:t.headerTitle,variant:"h1",color:"secondary","data-test":"data-center-importer-title"},{children:SHARED_TEXT.panelHeaderTitle()})),jsxRuntime.exports.jsxs("div",Object.assign({className:t.headerActionContainer},{children:[jsxRuntime.exports.jsx(Typography$1,Object.assign({style:visuallyHidden$1,id:"data-center-importer-close-panel"},{children:SHARED_TEXT.closePanel()})),jsxRuntime.exports.jsx(Tooltip,Object.assign({title:SHARED_TEXT.closePanel()},{children:jsxRuntime.exports.jsx(IconButton,Object.assign({onClick:e,"aria-labelledby":"data-center-importer-close-panel","data-test":"data-center-importer-close-panel",size:"large"},{children:jsxRuntime.exports.jsx(Hide,{})}))}))]}))]}))},useStyles$5=makeStyles()(e=>({title:{userSelect:"none"},description:{fontWeight:400,marginBlockStart:"16px",userSelect:"none"},card:{border:"0.5px solid #D5DFE9!important",boxShadow:"none!important",borderRadius:"4px!important",display:"flex",flexDirection:"column",alignItems:"center",padding:32},focusedCard:{backgroundColor:"#D5DFE9",border:"0.5px solid #D5DFE9!important",boxShadow:"none!important",borderRadius:"4px!important",display:"flex",flexDirection:"column",alignItems:"center",padding:32},uploadIcon:{fontSize:"30px","&:hover":{color:"inherit"}},iconCircle:{color:e.palette.secondary.main,backgroundColor:"#ffffff !important",fontSize:"30px !important",width:"70px !important",height:"70px !important",border:"6px solid #E8E8E8"},selectMessage:{fontWeight:600,marginBlockStart:"12px"},subtitle:{fontSize:"12px",fontWeight:400},fileFormatsButton:{color:"#6098D1",fontSize:"10px",marginTop:10}})),LocalFileUpload=({onUpload:t,onViewSupportedFiles:e})=>{const[a,i]=react.exports.useState(!1),s=react.exports.useRef();var o=useStyles$5()["classes"];const r=useStyles$a()["classes"];react.exports.useEffect(()=>{const e=e=>{e.preventDefault(),t(Array.from(e.dataTransfer.files)),i(!1)};return window.addEventListener("drop",e),()=>{window.removeEventListener("drop",e)}},[i,t]),react.exports.useEffect(()=>{const e=e=>{e.preventDefault(),i(!0)},t=e=>{e.preventDefault(),i(!1)};return s.current&&(s.current.addEventListener("dragover",e),s.current.addEventListener("dragleave",t)),()=>{try{s.current.removeEventListener("dragover",e),s.current.removeEventListener("dragleave",t)}catch(e){}}},[i]);return jsxRuntime.exports.jsxs(jsxRuntime.exports.Fragment,{children:[jsxRuntime.exports.jsx(Typography$1,Object.assign({"data-test":"data-center-importer-local-upload-title",variant:"h2",className:o.title},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-data-center-importer.ylbMu5",defaultMessage:"Local Machine",description:"Import files into the Data Center from your computer"})})),jsxRuntime.exports.jsx(Typography$1,Object.assign({"data-test":"data-center-importer-local-upload-description",variant:"body2",paragraph:!0,className:o.description},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-data-center-importer.OcKW8X",defaultMessage:"Choose files from your computer to import and process within your aiWARE account.",description:"Choose files from your computer to import and process within your aiWARE account."})})),jsxRuntime.exports.jsxs(Card,Object.assign({"data-test":"data-center-importer-local-upload-card",className:a?o.focusedCard:o.card,ref:e=>s.current=e},{children:[jsxRuntime.exports.jsx(Avatar,Object.assign({className:o.iconCircle},{children:jsxRuntime.exports.jsx(default_1,{fontSize:"inherit",className:o.uploadIcon})})),jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"body1",className:o.selectMessage},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-data-center-importer.vKgOOW",defaultMessage:"Select a file from your computer",description:"Local Machine File Importer: Select a file from your computer to be uploaded into the Data Center"})})),jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"body2",className:o.subtitle},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-data-center-importer.9cCClM",defaultMessage:"or drag and drop an image here",description:"Local Machine File Importer: files can be dragged and dropped here to upload them"})})),jsxRuntime.exports.jsx(UploadButton,{id:"local-file-upload-upload-btn",onUpload:e=>{t(Array.from(e.target.files))},render:({handleButtonClick:e})=>jsxRuntime.exports.jsx(Button$1,Object.assign({"data-test":"data-center-importer-local-upload-button",variant:"outlined",className:r.fileButton,style:{marginTop:"15px"},onClick:e},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-data-center-importer.261ANF",defaultMessage:"Browse Files",description:"Local Machine File Importer: Click here to select the files to upload"})}))}),jsxRuntime.exports.jsx(Button$1,Object.assign({variant:"text",className:o.fileFormatsButton,onClick:e},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-data-center-importer.OVCv+Y",defaultMessage:"View Supported File Formats",description:"Local Machine File Importer: View a list of all the File Formats that can be uploaded"})}))]}))]})},useStyles$4=makeStyles()(e=>({title:{userSelect:"none"},subheader:{userSelect:"none"},locationFolderWrapper:{width:"100%",marginTop:e.spacing(4),padding:e.spacing(2),border:"1px solid #D5DFE9",borderRadius:4,display:"flex",alignItems:"center",position:"relative"},locationFolderWrapperDisabled:{opacity:.7,pointerEvents:"none",userSelect:"none"},spacer:{display:"block",flex:1},folderIcon:{marginRight:e.spacing(2)},folderLabel:{fontFamily:"Nunito",display:"block",color:"#5C6269",fontSize:12,position:"absolute",top:-10,left:e.spacing(1),paddingLeft:e.spacing(1),paddingRight:e.spacing(1),background:"#fff"},folderInputLabel:{fontFamily:"Nunito",cursor:"pointer",color:"#6098D1",fontSize:14,"&:hover":{color:"#1871E8"}}})),LocationFolder=({folder:e,onChangeBtnClick:t,disabled:a=!1})=>{var i=useStyles$4()["classes"];return e?jsxRuntime.exports.jsxs(jsxRuntime.exports.Fragment,{children:[jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"h2",color:"textPrimary","data-test":"data-center-location-folder-title",className:i.title},{children:SHARED_TEXT.locationFolderTitle()})),jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"body2",color:"textSecondary","data-test":"data-center-location-folder-subheader",className:i.subheader},{children:SHARED_TEXT.locationFolderSubheader()})),jsxRuntime.exports.jsxs("div",Object.assign({"data-test":"data-center-location-folder",className:classnames(i.locationFolderWrapper,a?i.locationFolderWrapperDisabled:null)},{children:[jsxRuntime.exports.jsx("span",Object.assign({className:i.folderLabel,"data-test":"data-center-location-folder-label"},{children:SHARED_TEXT.locationFolderLabel()})),jsxRuntime.exports.jsx(FolderOpen,{className:i.folderIcon}),jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"body1",color:"textPrimary","data-test":"data-center-location-folder-path"},{children:null!=e&&e.isRoot?"Home":null==e?void 0:e.name})),jsxRuntime.exports.jsx("span",{className:i.spacer}),jsxRuntime.exports.jsx("span",Object.assign({className:i.folderInputLabel,onClick:t,role:"button","data-test":"data-center-location-select-btn"},{children:SHARED_TEXT.locationFolderReselect()}))]}))]}):null},validateMimeTypes=(e,t)=>{const a=new Set;return null!=e&&e.forEach(e=>{e.type?t.includes(e.type)||a.add(e.type):a.add(e.name.split(".").pop())}),Array.from(a.values())},DEFAULT_MAX_FILE_COUNT=100,MAX_VERITONE_FILE_COUNT_ALLOWED=1e3,MainLayout=({hidePanel:e,activeFolder:t,fileLimit:s=DEFAULT_MAX_FILE_COUNT})=>{var a=useStyles$6()["classes"];const[i,o]=react.exports.useState(null);var r=useSelector(preferredLanguageSelector);const n=useSelector(initialConfigSelector),l=useSelector(selectors.uiState.selectIsFullScreen),d=useSelector(selectSelectedFiles);var c=useSelector(selectUIStateStatus),p=useSelector(selectCurrentView),u=useSelector(rootFolderSelector);const m=useSelector(authSelector),x=useDispatch(),g=react.exports.useCallback(()=>{e&&e()},[e]),f=AIWareFormatMessage(r);r=useSelector(betaFeaturesSelector);const[j,h]=react.exports.useState(!1);react.exports.useEffect(()=>{var e;m&&null!=(e=null==(e=null==(e=null===m||void 0===m?void 0:m.user)?void 0:e.organization)?void 0:e.kvp)&&e.features&&(e=m.user.organization.kvp["features"],"enabled"===e.enableRBACFeature&&h(!0))},[m]),react.exports.useEffect(()=>{d&&d.length?x(actions.uiState.setCurrentView(ImporterView.filesSelected)):x(actions.uiState.setCurrentView(ImporterView.browseFiles))},[x,d]),react.exports.useEffect(()=>{n.baseUrl&&(t&&t.id?x(actions.rootFolderState.updateRootFolder({activeFolder:t})):x(actions.rootFolderState.startRootFolderFetch()))},[n,t,x]);var y=e=>{let t=e;var a=EnumHelpers.getNames(MimeType);const i=validateMimeTypes(e,a);0<(null===i||void 0===i?void 0:i.length)&&(x(showMessage({content:f({id:"os-data-center-importer.snackbar.disallowedFilesMessage",defaultMessage:[{type:0,value:"The following file types are not allowed: "},{type:1,value:"disallowedFiles"}]},{disallowedFiles:Array.from(i.values()).join(",")}),severity:MessageSeverity.Warning})),t=e.filter(e=>e.type&&!i.includes(e.type))),e.length>s?(x(showMessage({content:f({id:"os-data-center-importer.snackbar.fileLimitError",defaultMessage:[{type:0,value:"You can only upload files up to "},{type:1,value:"fileLimit"},{type:0,value:" files at once! Only the first "},{type:1,value:"fileLimit"},{type:0,value:" files will be uploaded."}]},{fileLimit:""+s}),severity:MessageSeverity.Warning})),t=e.slice(0,s)):e.length>MAX_VERITONE_FILE_COUNT_ALLOWED&&(x(showMessage({content:f({id:"os-data-center-importer.snackbar.fileCountError",defaultMessage:[{type:0,value:"You have exceeded the maxium allowable files per upload. Only the first "},{type:1,value:"maxFileCount"},{type:0,value:" files will be uploaded."}]},{maxFileCount:""+MAX_VERITONE_FILE_COUNT_ALLOWED}),severity:MessageSeverity.Warning})),t=e.slice(0,MAX_VERITONE_FILE_COUNT_ALLOWED));a=t.map(e=>{var t=URL.createObjectURL(e);return{id:guid(),fileUrl:t,name:e.name,size:e.size,type:e.type,percentComplete:0}});x(actions.filesSelectedState.setFilesSelected({filesSelected:a,sdkFiles:t}))},S=()=>{var e=d.filter(e=>e.status===LoadingStatus.Failed);x(actions.filesSelectedState.retryFileUpload({filesSelected:e}))};const v=()=>{x(actions.uiState.tdoCreateStart({filesSelected:d}))};return react.exports.useEffect(()=>{var e;i&&(null!=(e=null===i||void 0===i?void 0:i.entries)&&e.length?x(actions.filesSelectedState.setPermissionsPayload(i)):o(null))},[i,x]),jsxRuntime.exports.jsxs("div",Object.assign({role:"presentation","data-test":"data-center-importer-widget",className:classnames(a.root)},{children:[jsxRuntime.exports.jsx(Header,{onPanelClose:g}),jsxRuntime.exports.jsxs("div",Object.assign({className:a.mainContainer},{children:[c===LoadingStatus.Failed&&jsxRuntime.exports.jsx(Box$1,Object.assign({mb:4},{children:jsxRuntime.exports.jsx(Alert,Object.assign({variant:"outlined",severity:"error",className:a.alert},{children:"Error while uploading your file(s)."}))})),p===ImporterView.browseFiles&&jsxRuntime.exports.jsx(LocalFileUpload,{onViewSupportedFiles:()=>{var e={name:"SUPPORTED_FILE_TYPES",config:{name:"Local Importer",fileTypes:DEFAULT_ACCEPTABLE_FILE_TYPES}},t={type:"APP_BAR_PANEL_TEMPLATE",marginTop:l?0:55,marginStart:l?0:80,size:"medium",zIndex:l?1011:1002,parentPanelId:"DATA_CENTER_IMPORTER",dimmed:0,dimmedStatus:"dimParent"};x(mountPanel({panelId:"SUPPORTED_FILE_TYPES_PANEL",microFrontend:e,panelConfig:t}))},onUpload:y}),p===ImporterView.filesSelected&&jsxRuntime.exports.jsxs(jsxRuntime.exports.Fragment,{children:[jsxRuntime.exports.jsx(FileItemList,{onUpload:y,fileItems:d,onDelete:e=>{x(actions.filesSelectedState.deleteFileSelected({id:e}))},onRetryFailedsClick:S,onRetry:e=>{e.status===LoadingStatus.Failed?x(actions.filesSelectedState.retryFileUpload({filesSelected:[e]})):e.tdoStatus===LoadingStatus.Failed&&x(actions.uiState.retryTDOCreateForFiles({filesSelected:[e]}))},onAbort:e=>{x(actions.filesSelectedState.abortFileUpload(e))},onEdit:e=>{var e={name:"EDIT_FILE_METADATA",config:{name:"Local Importer",file:e=e}},t={type:"APP_BAR_PANEL_TEMPLATE",marginTop:l?0:55,marginStart:l?0:80,size:"small",zIndex:l?1011:1002,parentPanelId:"DATA_CENTER_IMPORTER",dimmed:0,dimmedStatus:"dimParent"};x(mountPanel({panelId:"EDIT_FILE_METADATA",microFrontend:e,panelConfig:t}))},uiStateStatus:c}),jsxRuntime.exports.jsx("div",{className:a.spacer}),jsxRuntime.exports.jsx(LocationFolder,{folder:u,onChangeBtnClick:()=>__awaiter(void 0,void 0,void 0,function*(){try{yield mountPanelForResponse({panelId:"DATA_CENTER_FOLDERS_AND_FILES",microFrontend:{name:"DATA_CENTER_FOLDERS_AND_FILES",config:{viewType:"folders"}},panelConfig:{panelId:"DATA_CENTER_FOLDERS_AND_FILES",disableHide:!1,parentPanelId:"DATA_CENTER_IMPORTER",type:"APP_BAR_PANEL_TEMPLATE",size:"small",marginTop:l?0:55,marginStart:l?0:80,height:600,header:{title:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-data-center-importer.headerTitle.chooseLocation",defaultMessage:"Choose a Location",description:"The title for the choose location panel"})},dimmed:0,zIndex:l?1011:1002,dimmedStatus:"dimParent"}},store)}catch(e){console.log(e)}})})]}),p===ImporterView.filesSelected&&j&&jsxRuntime.exports.jsx("div",Object.assign({className:a.permissionsContainer},{children:r&&jsxRuntime.exports.jsxs(jsxRuntime.exports.Fragment,{children:[jsxRuntime.exports.jsx(Typography$1,Object.assign({"data-testid":"ui-permissions-widget-title",variant:"h2"},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:"ui-permissions-widget-title",defaultMessage:"Permissions",description:"Permissions widget title"})})),jsxRuntime.exports.jsx(Typography$1,Object.assign({"data-test":"data-center-importer-local-upload-description",variant:"body2",paragraph:!0,className:a.description},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:"ui-permissions-widget-description",defaultMessage:"Manage who can access and permissions to these objects ",description:"Permissions widget description"})})),jsxRuntime.exports.jsx(PermissionsWidget,{onGetPermissionPayload:e=>{o(e)},permissionType:"TDO",parentPanelId:"DATA_CENTER_IMPORTER",isFullScreen:l,zIndex:1002,zIndexFullScreen:1012})]})})),jsxRuntime.exports.jsx(Footer,{uiStateStatus:c,fileItems:d,onClosePanel:()=>{if(d.length)for(const e of d)e.status===LoadingStatus.Pending&&x(actions.filesSelectedState.abortFileUpload(e));g()},onImportFiles:v,onIgnoreAndContinue:()=>{x(actions.filesSelectedState.deleteFailedFiles()),v()},onRetry:S})]}))]}))},DataCenterImporter=e=>jsxRuntime.exports.jsx(CacheProvider,Object.assign({value:muiCache},{children:jsxRuntime.exports.jsx(AIWareThemeProvider,{children:jsxRuntime.exports.jsx(lib.DynamicModuleLoader,Object.assign({modules:[getDataCenterImporterModule(),getAdminCenterPermissionsModule()]},{children:jsxRuntime.exports.jsx(AIWareIntlProvider,{children:jsxRuntime.exports.jsx(MainLayout,Object.assign({},e))})}))})})),useStyles$3=makeStyles()(e=>({supportedFilesTypeHeader:{display:"flex",alignItems:"center",flexDirection:"row",justifyContent:"space-between",padding:"0px 10px",marginBottom:20},supportedFilesTypeWrapper:{padding:"8px 20px 20px 20px"},fileTypeItem:{border:"1px solid #D5DFE9",borderRadius:5,marginBottom:20,overflow:"hidden"},fileTypeItemHeader:{padding:18,borderBottom:"1px solid #D5DFE9",background:"#FAFAFA",display:"flex",alignItems:"center"},fileTypeItemBody:{display:"flex",alignItems:"center",padding:"26px 0",flexWrap:"wrap"},fileTypeItemExtension:{width:"50%",padding:"4px 0 4px 54px"},fileTypeItemExtensionFullWidth:{width:"100%"},fileItemTypeName:{marginLeft:12}})),FileTypeItem=({fileItemType:a})=>{var e;const i=useStyles$3()["classes"];return jsxRuntime.exports.jsxs("div",Object.assign({className:i.fileTypeItem,"data-test":"data-center-importer-supported-file-item"},{children:[jsxRuntime.exports.jsxs("header",Object.assign({className:i.fileTypeItemHeader},{children:[jsxRuntime.exports.jsx("span",Object.assign({"data-test":"data-center-importer-file-item-icon"},{children:jsxRuntime.exports.jsx(FileItemIcon,{filetype:a.type})})),jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"h2",color:"textPrimary",className:i.fileItemTypeName,"data-test":"data-center-importer-file-type-name"},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-data-center-browse.fileTypes.${name}",defaultMessage:"{name}",description:"Label for {name} type",values:{name:a.name}})}))]})),jsxRuntime.exports.jsx("div",Object.assign({className:i.fileTypeItemBody,"data-test":"data-center-importer-extension-list"},{children:null==(e=null==a?void 0:a.extensions)?void 0:e.map((e,t)=>jsxRuntime.exports.jsxs(Typography$1,Object.assign({variant:"body2",color:"textPrimary",className:classnames(i.fileTypeItemExtension,{[i.fileTypeItemExtensionFullWidth]:a.type===FileItemTypeNames.Text})},{children:[".",e]}),t))}))]}))},SupportedFileTypesContent=({fileTypes:e,hidePanel:t})=>{var a=useStyles$3()["classes"];return jsxRuntime.exports.jsxs("div",Object.assign({className:a.supportedFilesTypeWrapper},{children:[jsxRuntime.exports.jsxs("div",Object.assign({className:a.supportedFilesTypeHeader},{children:[jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"h1",color:"secondary","data-test":"data-center-importer-supported-files-title"},{children:SHARED_TEXT.supportedFilesTitle()})),jsxRuntime.exports.jsx(Tooltip,Object.assign({title:SHARED_TEXT.closePanel()},{children:jsxRuntime.exports.jsx(IconButton,Object.assign({onClick:t,"aria-labelledby":"data-center-importer-close-panel","data-test":"data-center-importer-close-panel",size:"large"},{children:jsxRuntime.exports.jsx(Close,{})}))}))]})),e.map((e,t)=>jsxRuntime.exports.jsx(FileTypeItem,{fileItemType:e},t))]}))},SupportedFileTypes=e=>jsxRuntime.exports.jsx(AIWareThemeProvider,{children:jsxRuntime.exports.jsx(AIWareIntlProvider,{children:jsxRuntime.exports.jsx(CacheProvider,Object.assign({value:muiCache},{children:jsxRuntime.exports.jsx(SupportedFileTypesContent,{hidePanel:e.hidePanel,fileTypes:e.fileTypes})}))})}),inputFieldBorderColor="#D5DFE9",useStyles$2=makeStyles()(e=>({editMetadataContainer:{padding:"5px 30px"},avatarImage:{display:"flex",justifyContent:"center",alignItems:"center",width:"135px",height:"119px",marginRight:"10px"},coverImage:{flexGrow:1,display:"flex",justifyContent:"center",alignItems:"center",height:"119px"},inputFieldBorder:{border:"1px solid "+inputFieldBorderColor},fileName:{width:"100%",border:"1px solid "+inputFieldBorderColor,height:"52px",borderRadius:"4px",boxSizing:"border-box",padding:"15px"},tagInput:{marginRight:"10px",flexGrow:1},tags:{paddingLeft:"0px","& > li":{listStyleType:"none",display:"inline",marginRight:"5px"}},tag:{backgroundColor:"#D5DFE9",fontSize:"12px",marginBottom:"5px"},runDate:{marginRight:"5px"},runTime:{"& input":{padding:"18.5px 10px !important"}},cancelBtn:{marginRight:e.spacing(2)},header:{display:"flex",alignItems:"center",flexDirection:"row",justifyContent:"space-between",padding:"0px"},footer:{position:"absolute",right:"30px",bottom:e.spacing(6)},topMarginSm:{marginTop:"15px"},topMarginLg:{marginTop:"15px"},flex:{display:"flex"},flexFill:{flexGrow:1},heading:{color:"#2A323C",fontSize:"14px",fontWeight:600,lineHeight:"20px"},subHeading:{color:"#5C6269",fontSize:"14px",fontWeight:"normal",lineHeight:"20px"},closePanel:{transform:"translateX(15px)"}})),useStyles$1=makeStyles()(e=>({container:{position:"relative",borderRadius:"5px",zIndex:2}})),AddImageIcon=({id:e,color:t="black",size:a=55})=>{var i=useStyles$1()["classes"];return jsxRuntime.exports.jsx("div",Object.assign({id:"addImageIcon-"+e,className:i.container},{children:jsxRuntime.exports.jsx("svg",Object.assign({version:"1.2",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 500 500",width:a,height:a},{children:jsxRuntime.exports.jsx("path",{fill:t,fillRule:"evenodd",d:"M249.5 62c147.7 0 151.1 0 157.5 1.9 3.6 1.1 8.9 3.7 11.9 5.8 3 2.1 7.3 6.1 9.6 8.8 2.3 2.7 5.2 7.7 9 17l.3 101c.1 55.6.1 101.4-.2 102-.2.7-4.1.6-11.2-.3-6-.7-14-1-17.9-.7-3.9.3-8.4.8-13 1.6V104.5h-291v291H297l-.7 8c-.5 4.4-.8 9.8-.8 12 0 2.2.4 8.2 1.5 22.5h-97.3c-82.7 0-98.2-.3-104.2-1.5-3.8-.9-9-2.8-11.5-4.2-2.5-1.5-6-4.1-7.9-5.8-1.9-1.6-5.2-5.7-7.3-9-2.5-3.9-4.4-8.5-5.4-13-1.3-6.1-1.4-26.2-.9-309l2.4-6c1.4-3.3 4.3-8.3 6.6-11 2.3-2.8 6.6-6.7 9.6-8.8 3-2.1 8.1-4.6 11.4-5.7 5.8-1.8 11.6-1.9 157-2zm45.4 185c.3 0 12.2 15.8 52.6 70.3l-4 3.1c-2.2 1.7-7.7 6.7-12.3 11.1-4.6 4.4-10.6 11.3-18.7 22.5h-93.8c-90.2 0-93.7-.1-92.5-1.8.7-1 14.7-19 31-40 16.4-21 30-38.2 30.3-38.2.3 0 7.8 8.9 16.7 19.8 8.9 10.8 18.7 22.7 21.7 26.5 3.1 3.7 5.8 6.7 6.1 6.7.3-.1 14.4-18.1 31.4-40.1 17-21.9 31.2-39.9 31.5-39.9zm122.6 87.5c13.3.3 15.8.7 22 3 3.9 1.5 9.3 3.8 12 5.2 2.8 1.4 8.4 5.1 12.4 8.2 4.1 3.1 10 8.7 13.1 12.6 3 3.9 7.1 10.1 9.1 14 2 3.9 4.7 9.9 6 13.5 2.1 5.9 2.3 8.2 2.3 24.5s-.2 18.6-2.3 24.5c-1.3 3.6-4 9.6-6 13.5-2 3.9-6.1 10.1-9.1 14-3.1 3.9-9 9.5-13.1 12.5-4 3.1-9.6 6.7-12.4 8.2-2.7 1.5-8.1 3.9-12 5.4-6.8 2.7-7.6 2.8-26 2.8s-19.2-.1-26-2.8c-3.9-1.5-9.2-3.9-12-5.3-2.7-1.4-8.4-5.1-12.4-8.2-4.1-3.1-10-8.7-13.1-12.6-3-3.9-7.1-10.1-9.1-14-2-3.9-4.7-9.9-6-13.5-2.1-5.9-2.3-8.2-2.3-24.5s.2-18.6 2.3-24.5c1.3-3.6 4-9.6 6-13.5 2-3.9 6.1-10.1 9.1-14 3.1-3.9 9-9.5 13.1-12.5 4-3.1 9.7-6.7 12.4-8.2 2.8-1.4 7.5-3.6 10.5-4.8 3-1.2 8-2.6 11-3 3-.5 12.3-.7 20.5-.5zM390 355.6c-3.6 1.6-8.5 4-11 5.4-2.5 1.4-7.4 5.4-11 9-3.9 3.8-8.2 9.6-10.6 14-2.3 4.1-5 10-6 13-1.3 4.2-1.8 8.7-1.8 18.5s.5 14.3 1.8 18.5c1 3 3.7 8.9 5.9 13 2.7 4.8 6.8 10.1 11.3 14.5 5.2 5.1 9.3 8.1 15.5 11.1 4.6 2.3 10.2 4.7 12.4 5.5 2.5.8 8.8 1.3 17 1.3s14.5-.5 17-1.3c2.2-.8 7.8-3.2 12.4-5.5 6.5-3.1 10.2-5.9 16-11.7 5.8-5.7 8.6-9.6 11.8-16 2.3-4.6 4.7-10.2 5.4-12.4.7-2.4 1.3-9.3 1.3-17 0-7.7-.6-14.6-1.3-17-.7-2.2-3.1-7.8-5.4-12.4-3.2-6.4-6-10.3-11.8-16-5.6-5.7-9.6-8.6-15.5-11.5-4.3-2.1-9.7-4.5-11.9-5.3-2.2-.7-8.5-1.5-14-1.7-5.5-.3-12.5-.1-15.5.3s-8.4 2.1-12 3.7zm15 18.4h17v33h33v17h-33v33h-17v-33h-33v-17h33z"})}))}))},useStyles=makeStyles()(e=>({addImageBoxContainer:{display:"flex",justifyContent:"flex-start",flexDirection:"column"},addImageBoxTitle:{padding:"0px",margin:"0px",color:"rgb(92, 98, 105)",fontSize:"12px",fontWeight:400,textAlign:"left",paddingLeft:"5px",paddingBottom:"3px"},addImageBoxSizeAvatar:{width:"135px"},addImageBoxSizeCover:{width:"100%"},addImageBoxIconDiv:{height:"180px",display:"flex",alignItems:"center",justifyContent:"center",border:"1px solid #D5DFE9",overflow:"hidden",position:"relative",textAlign:"left",borderRadius:"4px"},addImageBoxBackground:{position:"absolute",height:"100%",width:"100%",top:0,left:0,backgroundSize:"cover"},addImageBoxShadow:{background:"rgba(0,0,0,0.35)",position:"absolute",width:"100%",height:"100%",zIndex:1},iconButtonContainer:{width:"100%",padding:0},deleteIconContainer:{position:"absolute",top:0,left:0,width:"100%",height:"100%",background:"transparent",zIndex:10,display:"flex",justifyContent:"center",alignItems:"center"},deleteIcon:{color:"white",fontSize:"24px"}})),AddImageBox=({title:e,backgroundImgUrl:t="",aspectRatio:a="avatar",onClick:i,onDelete:s})=>{var o=useStyles()["classes"];const[r,n]=react.exports.useState(!1);var l=!!t,d=r&&t,c=r&&t,p=!t||r&&t,u=t?{backgroundImage:`url(${t})`}:{};return jsxRuntime.exports.jsxs("div",Object.assign({className:o.addImageBoxContainer},{children:[jsxRuntime.exports.jsx(Typography$1,Object.assign({id:`file-item-meta-${a}-image-title`,variant:"body2",className:o.addImageBoxTitle,color:"secondary","data-test":`file-item-meta-${a}-image-title`},{children:e})),jsxRuntime.exports.jsx(Button$1,Object.assign({className:o.iconButtonContainer,onClick:i},{children:jsxRuntime.exports.jsxs("div",Object.assign({onMouseEnter:()=>n(!0),onMouseLeave:()=>n(!1),className:o.addImageBoxIconDiv+" "+("avatar"===a?o.addImageBoxSizeAvatar:o.addImageBoxSizeCover)},{children:[p&&!c&&jsxRuntime.exports.jsx(AddImageIcon,{id:`add-${a}-img`,color:t?"#fff":"#2A323C",size:45}),c&&jsxRuntime.exports.jsx("div",Object.assign({className:o.deleteIconContainer,onClick:s},{children:jsxRuntime.exports.jsx(default_1$4,{style:{fontSize:42},className:o.deleteIcon,color:"inherit"})})),d&&jsxRuntime.exports.jsx("div",{className:o.addImageBoxShadow}),l&&jsxRuntime.exports.jsx("div",{className:o.addImageBoxBackground,style:u})]}))}))]}))},FileItemMeta=({file:t,onSave:a,onCancel:e,onClosePanel:i})=>{const s=useStyles$2()["classes"];var o=useSelector(preferredLanguageSelector);const[r,n]=react.exports.useState(null),[l,d]=react.exports.useState(""),[c,p]=react.exports.useState(""),[u,m]=react.exports.useState((()=>{var[e,t,a]=(new Date).toLocaleDateString("en-US",{year:"numeric",month:"2-digit",day:"2-digit"}).split("/");return a+`-${e}-`+t})()),[x,g]=react.exports.useState((()=>{const[e,t]=(new Date).toLocaleTimeString("en-US",{hour:"2-digit",minute:"2-digit",hour12:!1}).split(":");return e+":"+t.slice(0,2)})()),[f,j]=react.exports.useState([]),h=AIWareFormatMessage(o);react.exports.useEffect(()=>{var e;t&&(e=t["meta"],n(null==e?void 0:e.thumbnailImg),d(null!=e&&e.fileName?e.fileName:t.name),null!=e&&e.runDate&&m(null==e?void 0:e.runDate),null!=e&&e.runTime&&g(null==e?void 0:e.runTime),j((null==e?void 0:e.tags)||[]))},[t]);var o=react.exports.useCallback(()=>{var e;a&&(e={fileId:null==t?void 0:t.id,fileName:l,thumbnailImg:r,runDate:u,runTime:x,tags:f},a(e))},[a,l,u,x,f,r,t]),y=react.exports.useCallback(()=>{e&&(F(),e())},[e]),S=react.exports.useCallback(()=>{i&&(F(),i())},[i]);const v=react.exports.useCallback(()=>{if(c){const t=function(e){const t=e.includes(",")?e.split(","):[e],a=f.map(e=>e.value),i=[];return null===t||void 0===t||t.forEach(e=>{e=e.trim();""===e||a.includes(e)||(i.push({value:e}),a.push(e))}),i}(c);j(e=>[...e,...t]),p("")}},[c]),b=()=>{n(null)};return jsxRuntime.exports.jsxs("div",Object.assign({className:s.editMetadataContainer},{children:[jsxRuntime.exports.jsxs("header",Object.assign({className:s.header},{children:[jsxRuntime.exports.jsx(Typography$1,Object.assign({id:"file-item-meta-title",variant:"h1",color:"secondary","data-test":"file-item-meta-title"},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-data-center-importer.WUHjl4",defaultMessage:"Edit Metadata",description:"Edit Metadata"})})),jsxRuntime.exports.jsx(Tooltip,Object.assign({title:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-data-center-importer.kOsSpC",defaultMessage:"Close Panel",description:"Close Panel"})},{children:jsxRuntime.exports.jsx(IconButton,Object.assign({id:"file-item-meta-close-panel",onClick:S,"aria-labelledby":"file-item-meta-close-panel","data-test":"file-item-meta-close-panel",className:s.closePanel,size:"large"},{children:jsxRuntime.exports.jsx(Close,{})}))}))]})),jsxRuntime.exports.jsx("section",{children:jsxRuntime.exports.jsx(UploadButton,{id:"file-item-meta-avatar-image-upload",imageOnly:!0,onUpload:e=>{e=e.target.files[0],t=URL.createObjectURL(e);var t,e=t={id:guid(),fileUrl:t,name:e.name,size:e.size,type:e.type,percentComplete:0};n(e)},isUploadEnabled:!r,render:({handleButtonClick:e})=>jsxRuntime.exports.jsx(AddImageBox,{title:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-data-center-importer.uK8+3P",defaultMessage:"Thumbnail Image",description:"Thumbnail Image"}),backgroundImgUrl:r?null===r||void 0===r?void 0:r.fileUrl:"",aspectRatio:"cover",onClick:e,onDelete:b})})}),jsxRuntime.exports.jsx("section",Object.assign({className:s.topMarginSm},{children:jsxRuntime.exports.jsx(TextField,{id:"file-item-meta-file-name",InputLabelProps:{shrink:!0},autoComplete:"off",label:h({id:"os-data-center-importer.label.fileName",defaultMessage:[{type:0,value:"File name"}]}),value:l,style:{width:"100%"},onChange:e=>{d(e.target.value)}})})),jsxRuntime.exports.jsxs("section",Object.assign({className:s.topMarginLg},{children:[jsxRuntime.exports.jsx(Typography$1,Object.assign({"data-test":"file-item-meta-display-time-heading",variant:"subtitle1",color:"textSecondary",className:s.heading},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-data-center-importer.8aqtJF",defaultMessage:"Media Display Time",description:"Media Display Time heading"})})),jsxRuntime.exports.jsx(Typography$1,Object.assign({"data-test":"file-item-meta-display-time-sub-heading",variant:"subtitle2",color:"textSecondary",className:s.subHeading},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-data-center-importer.mhUvxM",defaultMessage:"The actual time the content occurred.",description:"Media Display Time sub heading"})})),jsxRuntime.exports.jsxs("div",Object.assign({className:s.topMarginSm+" "+s.flex},{children:[jsxRuntime.exports.jsx(TextField,{id:"file-item-meta-run-date",label:h({id:"os-data-center-importer.label.runDate",defaultMessage:[{type:0,value:"Run Date"}]}),type:"date",value:u,className:s.runDate,onChange:e=>m(e.target.value),InputLabelProps:{shrink:!0}}),jsxRuntime.exports.jsx(TextField,{id:"file-item-meta-run-time",label:h({id:"os-data-center-importer.label.runTime",defaultMessage:[{type:0,value:"Run Time"}]}),type:"time",value:x,onChange:e=>g(e.target.value),className:s.runTime,InputLabelProps:{shrink:!0}})]}))]})),jsxRuntime.exports.jsxs("section",Object.assign({className:s.topMarginLg},{children:[jsxRuntime.exports.jsx(Typography$1,Object.assign({"data-test":"file-item-meta-tags-heading",variant:"subtitle1",color:"textSecondary",className:s.heading},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-data-center-importer.fXL811",defaultMessage:"Tags",description:"Tags heading"})})),jsxRuntime.exports.jsx(Typography$1,Object.assign({"data-test":"file-item-meta-tags-sub-heading",variant:"subtitle2",color:"textSecondary",className:s.subHeading},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-data-center-importer.WFj+x5",defaultMessage:"Add searchable tags to better organize this data. Separate each tag with a comma.",description:"Tags sub heading"})})),jsxRuntime.exports.jsxs("div",Object.assign({className:s.topMarginSm+" "+s.flex},{children:[jsxRuntime.exports.jsx(TextField,{id:"file-item-meta-tags",autoComplete:"off",value:c,className:s.tagInput,onChange:e=>{p(e.target.value)},size:"small",onKeyPress:e=>{"Enter"===e.key&&v()}}),jsxRuntime.exports.jsx(Button$1,Object.assign({id:"file-item-meta-tags-addBtn",variant:"outlined",color:"primary",disabled:!c,onClick:v},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-data-center-importer.rntBSe",defaultMessage:"Add",description:"Add tags to metadata"})}))]})),jsxRuntime.exports.jsx("ul",Object.assign({id:"tags",className:s.tags+" "+s.topMarginSm},{children:null===f||void 0===f?void 0:f.map(t=>jsxRuntime.exports.jsx("li",{children:jsxRuntime.exports.jsx(Chip$1,{id:guid(),label:t.value,size:"small",className:s.tag,onDelete:()=>{j(f.filter(e=>e.value!==t.value))}})},t.value))}))]})),jsxRuntime.exports.jsxs("footer",Object.assign({className:s.footer},{children:[jsxRuntime.exports.jsx(Button$1,Object.assign({id:"file-item-meta-cancel-btn",onClick:y,variant:"text",size:"large",className:s.cancelBtn,"data-test":"file-item-meta-cancel-btn"},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-data-center-importer.6PdOcy",defaultMessage:"Cancel",description:"Cancel"})})),jsxRuntime.exports.jsx(Button$1,Object.assign({id:"file-item-meta-save-btn",onClick:o,disabled:!1,size:"large",variant:"contained",color:"primary","data-test":"file-item-meta-save-btn"},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-data-center-importer.kxBKrN",defaultMessage:"Save Changes",description:"Save file metadata changes"})}))]}))]}));function F(){n(null),d(""),m("2021-12-22"),g("12:00"),j([])}},FileItemMetaContainer=({hidePanel:e,file:t})=>{const a=useDispatch();var i=useSelector(selectUIStateStatus);return jsxRuntime.exports.jsx(FileItemMeta,{file:t,status:i,onSave:function(e){e&&a(actions.filesSelectedState.addMetadataAction({id:null==t?void 0:t.id,meta:e}))},onCancel:function(){e()},onClosePanel:function(){e()}})},EditFileMetadata=e=>jsxRuntime.exports.jsx(AIWareThemeProvider,{children:jsxRuntime.exports.jsx(AIWareIntlProvider,{children:jsxRuntime.exports.jsx(CacheProvider,Object.assign({value:muiCache},{children:jsxRuntime.exports.jsx(FileItemMetaContainer,Object.assign({},e))}))})});export{DataCenterImporter,EditFileMetadata,SupportedFileTypes};
package/js-core.esm42.js CHANGED
@@ -1,51 +1 @@
1
- import{H as createSlice,cf as createSelector,O as rootApiSelector,R as graphEndpointSelector,Q as sessionTokenSelector,ce as combineReducers,j as jsxRuntime,F as FormattedMessage,m as makeStyles,B as Box$1,T as Typography$1,eJ as injectIntl,k as useSelector,i as useDispatch,r as react,ae as Skeleton$1,a7 as Divider,fR as ErrorState,a8 as Tooltip,a9 as IconButton,bU as Hide,ch as AIWareThemeProvider,K as lib,A as AIWareIntlProvider,bw as CacheProvider,bx as muiCache,a2 as all,fQ as selectIsUserAdmin,dG as useIntl,bi as React,cy as CustomTabs,w as TextField,cn as InputAdornment,cm as default_1,cl as TabPanel,eE as userSelector,at as Button$1,G as Grid$1,g6 as NoApps,eo as hidePanel,Z as List,dv as takeEvery$1,cz as useBackupImg,cA as img$1u,p as lodash,S as Switch,fP as selectOrgId,$ as ListItem,eO as ListItemAvatar,bM as Avatar,a1 as ListItemText,g7 as green,g4 as Lock,eT as ListItemSecondaryAction,cr as mountPanel,ai as select,ah as put,ak as call$g,cC as baseGraphQLApiWithError}from"./js-core.esm.js";import{C as Container}from"./js-core.esm22.js";import{S as Stack}from"./js-core.esm20.js";import{C as Chip$1}from"./js-core.esm25.js";!function(){var e={};try{if(process)return process.env=Object.assign({},process.env),Object.assign(process.env,e)}catch(e){}globalThis.process={env:e}}();var match,version,store,wmget,wmhas,wmset,set$1,get,has,STATE,activeXDocument,IteratorPrototype$2,PrototypeOfArrayIteratorPrototype,arrayIterator,commonjsGlobal="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},check=function(e){return e&&e.Math==Math&&e},global$k=check("object"==typeof globalThis&&globalThis)||check("object"==typeof window&&window)||check("object"==typeof self&&self)||check("object"==typeof commonjsGlobal&&commonjsGlobal)||function(){return this}()||Function("return this")(),objectGetOwnPropertyDescriptor={},fails$g=function(e){try{return!!e()}catch(e){return!0}},fails$f=fails$g,descriptors=!fails$g(function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}),fails$e=fails$g,functionBindNative=!fails$g(function(){var e=function(){}.bind();return"function"!=typeof e||e.hasOwnProperty("prototype")}),NATIVE_BIND$3=functionBindNative,call$f=Function.prototype.call,functionCall=NATIVE_BIND$3?call$f.bind(call$f):function(){return call$f.apply(call$f,arguments)},objectPropertyIsEnumerable={},$propertyIsEnumerable={}.propertyIsEnumerable,getOwnPropertyDescriptor$2=Object.getOwnPropertyDescriptor,NASHORN_BUG=getOwnPropertyDescriptor$2&&!$propertyIsEnumerable.call({1:2},1),createPropertyDescriptor$4=(objectPropertyIsEnumerable.f=NASHORN_BUG?function(e){e=getOwnPropertyDescriptor$2(this,e);return!!e&&e.enumerable}:$propertyIsEnumerable,function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}),NATIVE_BIND$2=functionBindNative,FunctionPrototype$2=Function.prototype,bind$5=FunctionPrototype$2.bind,call$e=FunctionPrototype$2.call,uncurryThis$h=NATIVE_BIND$2&&bind$5.bind(call$e,call$e),functionUncurryThis=NATIVE_BIND$2?function(e){return e&&uncurryThis$h(e)}:function(e){return e&&function(){return call$e.apply(e,arguments)}},uncurryThis$g=functionUncurryThis,toString$5=uncurryThis$g({}.toString),stringSlice$1=uncurryThis$g("".slice),classofRaw$1=function(e){return stringSlice$1(toString$5(e),8,-1)},uncurryThis$f=functionUncurryThis,fails$d=fails$g,classof$6=classofRaw$1,$Object$4=Object,split=functionUncurryThis("".split),indexedObject=fails$d(function(){return!$Object$4("z").propertyIsEnumerable(0)})?function(e){return"String"==classof$6(e)?split(e,""):$Object$4(e)}:$Object$4,$TypeError$e=TypeError,requireObjectCoercible$3=function(e){if(null==e)throw $TypeError$e("Can't call method on "+e);return e},IndexedObject$2=indexedObject,requireObjectCoercible$2=requireObjectCoercible$3,toIndexedObject$5=function(e){return IndexedObject$2(requireObjectCoercible$2(e))},isCallable$l=function(e){return"function"==typeof e},isCallable$k=isCallable$l,isObject$8=function(e){return"object"==typeof e?null!==e:isCallable$k(e)},global$j=global$k,isCallable$j=isCallable$l,aFunction=function(e){return isCallable$j(e)?e:void 0},getBuiltIn$8=function(e,t){return arguments.length<2?aFunction(global$j[e]):global$j[e]&&global$j[e][t]},uncurryThis$e=functionUncurryThis,objectIsPrototypeOf=functionUncurryThis({}.isPrototypeOf),getBuiltIn$7=getBuiltIn$8,engineUserAgent=getBuiltIn$8("navigator","userAgent")||"",global$i=global$k,userAgent$5=engineUserAgent,process$4=global$i.process,Deno$1=global$i.Deno,versions=process$4&&process$4.versions||Deno$1&&Deno$1.version,v8=versions&&versions.v8,engineV8Version=version=!(version=v8?0<(match=v8.split("."))[0]&&match[0]<4?1:+(match[0]+match[1]):version)&&userAgent$5&&(!(match=userAgent$5.match(/Edge\/(\d+)/))||74<=match[1])&&(match=userAgent$5.match(/Chrome\/(\d+)/))?+match[1]:version,V8_VERSION$1=engineV8Version,fails$c=fails$g,nativeSymbol=!!Object.getOwnPropertySymbols&&!fails$c(function(){var e=Symbol();return!String(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&V8_VERSION$1&&V8_VERSION$1<41}),NATIVE_SYMBOL$2=nativeSymbol,useSymbolAsUid=nativeSymbol&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,getBuiltIn$6=getBuiltIn$8,isCallable$i=isCallable$l,isPrototypeOf$4=objectIsPrototypeOf,USE_SYMBOL_AS_UID$1=useSymbolAsUid,$Object$3=Object,isSymbol$2=useSymbolAsUid?function(e){return"symbol"==typeof e}:function(e){var t=getBuiltIn$6("Symbol");return isCallable$i(t)&&isPrototypeOf$4(t.prototype,$Object$3(e))},$String$3=String,tryToString$5=function(e){try{return $String$3(e)}catch(e){return"Object"}},isCallable$h=isCallable$l,tryToString$4=tryToString$5,$TypeError$d=TypeError,aCallable$9=function(e){if(isCallable$h(e))return e;throw $TypeError$d(tryToString$4(e)+" is not a function")},aCallable$8=aCallable$9,getMethod$3=function(e,t){e=e[t];return null==e?void 0:aCallable$8(e)},call$d=functionCall,isCallable$g=isCallable$l,isObject$7=isObject$8,$TypeError$c=TypeError,ordinaryToPrimitive$1=function(e,t){var n,r;if("string"===t&&isCallable$g(n=e.toString)&&!isObject$7(r=call$d(n,e)))return r;if(isCallable$g(n=e.valueOf)&&!isObject$7(r=call$d(n,e)))return r;if("string"!==t&&isCallable$g(n=e.toString)&&!isObject$7(r=call$d(n,e)))return r;throw $TypeError$c("Can't convert object to primitive value")},shared$3={exports:{}},global$h=global$k,defineProperty$6=Object.defineProperty,defineGlobalProperty$3=function(t,n){try{defineProperty$6(global$h,t,{value:n,configurable:!0,writable:!0})}catch(e){global$h[t]=n}return n},global$g=global$k,defineGlobalProperty$2=defineGlobalProperty$3,SHARED="__core-js_shared__",store$3=global$k[SHARED]||defineGlobalProperty$2(SHARED,{}),sharedStore=store$3,store$2=sharedStore,requireObjectCoercible$1=((shared$3.exports=function(e,t){return store$2[e]||(store$2[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.24.1",mode:"global",copyright:"© 2014-2022 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.24.1/LICENSE",source:"https://github.com/zloirock/core-js"}),requireObjectCoercible$3),$Object$2=Object,toObject$5=function(e){return $Object$2(requireObjectCoercible$1(e))},uncurryThis$d=functionUncurryThis,toObject$4=toObject$5,hasOwnProperty=functionUncurryThis({}.hasOwnProperty),hasOwnProperty_1=Object.hasOwn||function(e,t){return hasOwnProperty(toObject$4(e),t)},uncurryThis$c=functionUncurryThis,id=0,postfix=Math.random(),toString$4=uncurryThis$c(1..toString),uid$2=function(e){return"Symbol("+(void 0===e?"":e)+")_"+toString$4(++id+postfix,36)},global$f=global$k,shared$2=shared$3.exports,hasOwn$b=hasOwnProperty_1,uid$1=uid$2,NATIVE_SYMBOL$1=nativeSymbol,USE_SYMBOL_AS_UID=useSymbolAsUid,WellKnownSymbolsStore=shared$2("wks"),Symbol$1=global$f.Symbol,symbolFor=Symbol$1&&Symbol$1.for,createWellKnownSymbol=USE_SYMBOL_AS_UID?Symbol$1:Symbol$1&&Symbol$1.withoutSetter||uid$1,wellKnownSymbol$g=function(e){var t;return hasOwn$b(WellKnownSymbolsStore,e)&&(NATIVE_SYMBOL$1||"string"==typeof WellKnownSymbolsStore[e])||(t="Symbol."+e,NATIVE_SYMBOL$1&&hasOwn$b(Symbol$1,e)?WellKnownSymbolsStore[e]=Symbol$1[e]:WellKnownSymbolsStore[e]=(USE_SYMBOL_AS_UID&&symbolFor?symbolFor:createWellKnownSymbol)(t)),WellKnownSymbolsStore[e]},call$c=functionCall,isObject$6=isObject$8,isSymbol$1=isSymbol$2,getMethod$2=getMethod$3,ordinaryToPrimitive=ordinaryToPrimitive$1,wellKnownSymbol$f=wellKnownSymbol$g,$TypeError$b=TypeError,TO_PRIMITIVE=wellKnownSymbol$g("toPrimitive"),toPrimitive$1=function(e,t){if(!isObject$6(e)||isSymbol$1(e))return e;var n=getMethod$2(e,TO_PRIMITIVE);if(n){if(n=call$c(n,e,t=void 0===t?"default":t),!isObject$6(n)||isSymbol$1(n))return n;throw $TypeError$b("Can't convert object to primitive value")}return ordinaryToPrimitive(e,t=void 0===t?"number":t)},toPrimitive=toPrimitive$1,isSymbol=isSymbol$2,toPropertyKey$3=function(e){e=toPrimitive(e,"string");return isSymbol(e)?e:e+""},global$e=global$k,isObject$5=isObject$8,document$3=global$k.document,EXISTS$1=isObject$5(document$3)&&isObject$5(document$3.createElement),documentCreateElement$2=function(e){return EXISTS$1?document$3.createElement(e):{}},DESCRIPTORS$b=descriptors,fails$b=fails$g,createElement$1=documentCreateElement$2,ie8DomDefine=!descriptors&&!fails$g(function(){return 7!=Object.defineProperty(createElement$1("div"),"a",{get:function(){return 7}}).a}),DESCRIPTORS$a=descriptors,call$b=functionCall,propertyIsEnumerableModule$1=objectPropertyIsEnumerable,createPropertyDescriptor$3=createPropertyDescriptor$4,toIndexedObject$4=toIndexedObject$5,toPropertyKey$2=toPropertyKey$3,hasOwn$a=hasOwnProperty_1,IE8_DOM_DEFINE$1=ie8DomDefine,$getOwnPropertyDescriptor$1=Object.getOwnPropertyDescriptor,objectDefineProperty=(objectGetOwnPropertyDescriptor.f=DESCRIPTORS$a?$getOwnPropertyDescriptor$1:function(e,t){if(e=toIndexedObject$4(e),t=toPropertyKey$2(t),IE8_DOM_DEFINE$1)try{return $getOwnPropertyDescriptor$1(e,t)}catch(e){}if(hasOwn$a(e,t))return createPropertyDescriptor$3(!call$b(propertyIsEnumerableModule$1.f,e,t),e[t])},{}),DESCRIPTORS$9=descriptors,fails$a=fails$g,v8PrototypeDefineBug=descriptors&&fails$g(function(){return 42!=Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype}),isObject$4=isObject$8,$String$2=String,$TypeError$a=TypeError,anObject$c=function(e){if(isObject$4(e))return e;throw $TypeError$a($String$2(e)+" is not an object")},DESCRIPTORS$8=descriptors,IE8_DOM_DEFINE=ie8DomDefine,V8_PROTOTYPE_DEFINE_BUG$1=v8PrototypeDefineBug,anObject$b=anObject$c,toPropertyKey$1=toPropertyKey$3,$TypeError$9=TypeError,$defineProperty=Object.defineProperty,$getOwnPropertyDescriptor=Object.getOwnPropertyDescriptor,ENUMERABLE="enumerable",CONFIGURABLE$1="configurable",WRITABLE="writable",DESCRIPTORS$7=(objectDefineProperty.f=DESCRIPTORS$8?V8_PROTOTYPE_DEFINE_BUG$1?function(e,t,n){var r;return anObject$b(e),t=toPropertyKey$1(t),anObject$b(n),"function"==typeof e&&"prototype"===t&&"value"in n&&WRITABLE in n&&!n[WRITABLE]&&((r=$getOwnPropertyDescriptor(e,t))&&r[WRITABLE]&&(e[t]=n.value,n={configurable:(CONFIGURABLE$1 in n?n:r)[CONFIGURABLE$1],enumerable:(ENUMERABLE in n?n:r)[ENUMERABLE],writable:!1})),$defineProperty(e,t,n)}:$defineProperty:function(e,t,n){if(anObject$b(e),t=toPropertyKey$1(t),anObject$b(n),IE8_DOM_DEFINE)try{return $defineProperty(e,t,n)}catch(e){}if("get"in n||"set"in n)throw $TypeError$9("Accessors not supported");return"value"in n&&(e[t]=n.value),e},descriptors),definePropertyModule$5=objectDefineProperty,createPropertyDescriptor$2=createPropertyDescriptor$4,createNonEnumerableProperty$4=DESCRIPTORS$7?function(e,t,n){return definePropertyModule$5.f(e,t,createPropertyDescriptor$2(1,n))}:function(e,t,n){return e[t]=n,e},makeBuiltIn$2={exports:{}},DESCRIPTORS$6=descriptors,hasOwn$9=hasOwnProperty_1,FunctionPrototype$1=Function.prototype,getDescriptor=DESCRIPTORS$6&&Object.getOwnPropertyDescriptor,EXISTS=hasOwn$9(FunctionPrototype$1,"name"),PROPER=EXISTS&&"something"===function(){}.name,CONFIGURABLE=EXISTS&&(!DESCRIPTORS$6||getDescriptor(FunctionPrototype$1,"name").configurable),functionName={EXISTS:EXISTS,PROPER:PROPER,CONFIGURABLE:CONFIGURABLE},uncurryThis$b=functionUncurryThis,isCallable$f=isCallable$l,store$1=sharedStore,functionToString=functionUncurryThis(Function.toString),inspectSource$4=(isCallable$f(store$1.inspectSource)||(store$1.inspectSource=function(e){return functionToString(e)}),store$1.inspectSource),global$d=global$k,isCallable$e=isCallable$l,inspectSource$3=inspectSource$4,WeakMap$1=global$k.WeakMap,nativeWeakMap=isCallable$e(WeakMap$1)&&/native code/.test(inspectSource$3(WeakMap$1)),shared$1=shared$3.exports,uid=uid$2,keys=shared$1("keys"),sharedKey$3=function(e){return keys[e]||(keys[e]=uid(e))},hiddenKeys$4={},NATIVE_WEAK_MAP=nativeWeakMap,global$c=global$k,uncurryThis$a=functionUncurryThis,isObject$3=isObject$8,createNonEnumerableProperty$3=createNonEnumerableProperty$4,hasOwn$8=hasOwnProperty_1,shared=sharedStore,sharedKey$2=sharedKey$3,hiddenKeys$3=hiddenKeys$4,OBJECT_ALREADY_INITIALIZED="Object already initialized",TypeError$2=global$c.TypeError,WeakMap=global$c.WeakMap,enforce=function(e){return has(e)?get(e):set$1(e,{})},getterFor=function(t){return function(e){if(isObject$3(e)&&(e=get(e)).type===t)return e;throw TypeError$2("Incompatible receiver, "+t+" required")}},internalState=(has=NATIVE_WEAK_MAP||shared.state?(store=shared.state||(shared.state=new WeakMap),wmget=uncurryThis$a(store.get),wmhas=uncurryThis$a(store.has),wmset=uncurryThis$a(store.set),set$1=function(e,t){if(wmhas(store,e))throw new TypeError$2(OBJECT_ALREADY_INITIALIZED);return t.facade=e,wmset(store,e,t),t},get=function(e){return wmget(store,e)||{}},function(e){return wmhas(store,e)}):(STATE=sharedKey$2("state"),hiddenKeys$3[STATE]=!0,set$1=function(e,t){if(hasOwn$8(e,STATE))throw new TypeError$2(OBJECT_ALREADY_INITIALIZED);return t.facade=e,createNonEnumerableProperty$3(e,STATE,t),t},get=function(e){return hasOwn$8(e,STATE)?e[STATE]:{}},function(e){return hasOwn$8(e,STATE)}),{set:set$1,get:get,has:has,enforce:enforce,getterFor:getterFor}),fails$9=fails$g,isCallable$d=isCallable$l,hasOwn$7=hasOwnProperty_1,DESCRIPTORS$5=descriptors,CONFIGURABLE_FUNCTION_NAME$1=functionName.CONFIGURABLE,inspectSource$2=inspectSource$4,InternalStateModule$2=internalState,enforceInternalState=InternalStateModule$2.enforce,getInternalState$1=InternalStateModule$2.get,defineProperty$5=Object.defineProperty,CONFIGURABLE_LENGTH=DESCRIPTORS$5&&!fails$9(function(){return 8!==defineProperty$5(function(){},"length",{value:8}).length}),TEMPLATE=String(String).split("String"),makeBuiltIn$1=makeBuiltIn$2.exports=function(e,t,n){"Symbol("===String(t).slice(0,7)&&(t="["+String(t).replace(/^Symbol\(([^)]*)\)/,"$1")+"]"),n&&n.getter&&(t="get "+t),n&&n.setter&&(t="set "+t),(!hasOwn$7(e,"name")||CONFIGURABLE_FUNCTION_NAME$1&&e.name!==t)&&(DESCRIPTORS$5?defineProperty$5(e,"name",{value:t,configurable:!0}):e.name=t),CONFIGURABLE_LENGTH&&n&&hasOwn$7(n,"arity")&&e.length!==n.arity&&defineProperty$5(e,"length",{value:n.arity});try{n&&hasOwn$7(n,"constructor")&&n.constructor?DESCRIPTORS$5&&defineProperty$5(e,"prototype",{writable:!1}):e.prototype&&(e.prototype=void 0)}catch(e){}n=enforceInternalState(e);return hasOwn$7(n,"source")||(n.source=TEMPLATE.join("string"==typeof t?t:"")),e},isCallable$c=(Function.prototype.toString=makeBuiltIn$1(function(){return isCallable$d(this)&&getInternalState$1(this).source||inspectSource$2(this)},"toString"),isCallable$l),definePropertyModule$4=objectDefineProperty,makeBuiltIn=makeBuiltIn$2.exports,defineGlobalProperty$1=defineGlobalProperty$3,defineBuiltIn$6=function(e,t,n,r){var o=(r=r||{}).enumerable,i=void 0!==r.name?r.name:t;if(isCallable$c(n)&&makeBuiltIn(n,i,r),r.global)o?e[t]=n:defineGlobalProperty$1(t,n);else{try{r.unsafe?e[t]&&(o=!0):delete e[t]}catch(e){}o?e[t]=n:definePropertyModule$4.f(e,t,{value:n,enumerable:!1,configurable:!r.nonConfigurable,writable:!r.nonWritable})}return e},objectGetOwnPropertyNames={},ceil=Math.ceil,floor$1=Math.floor,mathTrunc=Math.trunc||function(e){e=+e;return(0<e?floor$1:ceil)(e)},trunc=mathTrunc,toIntegerOrInfinity$2=function(e){e=+e;return e!=e||0==e?0:trunc(e)},toIntegerOrInfinity$1=toIntegerOrInfinity$2,max$1=Math.max,min$1=Math.min,toAbsoluteIndex$2=function(e,t){e=toIntegerOrInfinity$1(e);return e<0?max$1(e+t,0):min$1(e,t)},toIntegerOrInfinity=toIntegerOrInfinity$2,min=Math.min,toLength$1=function(e){return 0<e?min(toIntegerOrInfinity(e),9007199254740991):0},toLength=toLength$1,lengthOfArrayLike$5=function(e){return toLength(e.length)},toIndexedObject$3=toIndexedObject$5,toAbsoluteIndex$1=toAbsoluteIndex$2,lengthOfArrayLike$4=lengthOfArrayLike$5,createMethod$1=function(s){return function(e,t,n){var r,o=toIndexedObject$3(e),i=lengthOfArrayLike$4(o),a=toAbsoluteIndex$1(n,i);if(s&&t!=t){for(;a<i;)if((r=o[a++])!=r)return!0}else for(;a<i;a++)if((s||a in o)&&o[a]===t)return s||a||0;return!s&&-1}},arrayIncludes={includes:createMethod$1(!0),indexOf:createMethod$1(!1)},uncurryThis$9=functionUncurryThis,hasOwn$6=hasOwnProperty_1,toIndexedObject$2=toIndexedObject$5,indexOf=arrayIncludes.indexOf,hiddenKeys$2=hiddenKeys$4,push$1=uncurryThis$9([].push),objectKeysInternal=function(e,t){var n,r=toIndexedObject$2(e),o=0,i=[];for(n in r)!hasOwn$6(hiddenKeys$2,n)&&hasOwn$6(r,n)&&push$1(i,n);for(;t.length>o;)!hasOwn$6(r,n=t[o++])||~indexOf(i,n)||push$1(i,n);return i},enumBugKeys$3=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],internalObjectKeys$1=objectKeysInternal,enumBugKeys$2=enumBugKeys$3,hiddenKeys$1=enumBugKeys$3.concat("length","prototype"),objectGetOwnPropertySymbols=(objectGetOwnPropertyNames.f=Object.getOwnPropertyNames||function(e){return internalObjectKeys$1(e,hiddenKeys$1)},{}),getBuiltIn$5=(objectGetOwnPropertySymbols.f=Object.getOwnPropertySymbols,getBuiltIn$8),uncurryThis$8=functionUncurryThis,getOwnPropertyNamesModule=objectGetOwnPropertyNames,getOwnPropertySymbolsModule$1=objectGetOwnPropertySymbols,anObject$a=anObject$c,concat$1=functionUncurryThis([].concat),ownKeys$1=getBuiltIn$5("Reflect","ownKeys")||function(e){var t=getOwnPropertyNamesModule.f(anObject$a(e)),n=getOwnPropertySymbolsModule$1.f;return n?concat$1(t,n(e)):t},hasOwn$5=hasOwnProperty_1,ownKeys=ownKeys$1,getOwnPropertyDescriptorModule=objectGetOwnPropertyDescriptor,definePropertyModule$3=objectDefineProperty,copyConstructorProperties$2=function(e,t,n){for(var r=ownKeys(t),o=definePropertyModule$3.f,i=getOwnPropertyDescriptorModule.f,a=0;a<r.length;a++){var s=r[a];hasOwn$5(e,s)||n&&hasOwn$5(n,s)||o(e,s,i(t,s))}},fails$8=fails$g,isCallable$b=isCallable$l,replacement=/#|\.prototype\./,isForced$2=function(e,t){e=data[normalize(e)];return e==POLYFILL||e!=NATIVE&&(isCallable$b(t)?fails$8(t):!!t)},normalize=isForced$2.normalize=function(e){return String(e).replace(replacement,".").toLowerCase()},data=isForced$2.data={},NATIVE=isForced$2.NATIVE="N",POLYFILL=isForced$2.POLYFILL="P",isForced_1=isForced$2,global$b=global$k,getOwnPropertyDescriptor$1=objectGetOwnPropertyDescriptor.f,createNonEnumerableProperty$2=createNonEnumerableProperty$4,defineBuiltIn$5=defineBuiltIn$6,defineGlobalProperty=defineGlobalProperty$3,copyConstructorProperties$1=copyConstructorProperties$2,isForced$1=isForced_1,_export=function(e,t){var n,r,o,i=e.target,a=e.global,s=e.stat,l=a?global$b:s?global$b[i]||defineGlobalProperty(i,{}):(global$b[i]||{}).prototype;if(l)for(n in t){if(r=t[n],o=e.dontCallGetSet?(o=getOwnPropertyDescriptor$1(l,n))&&o.value:l[n],!isForced$1(a?n:i+(s?".":"#")+n,e.forced)&&void 0!==o){if(typeof r==typeof o)continue;copyConstructorProperties$1(r,o)}(e.sham||o&&o.sham)&&createNonEnumerableProperty$2(r,"sham",!0),defineBuiltIn$5(l,n,r,e)}},internalObjectKeys=objectKeysInternal,enumBugKeys$1=enumBugKeys$3,objectKeys$2=Object.keys||function(e){return internalObjectKeys(e,enumBugKeys$1)},DESCRIPTORS$4=descriptors,uncurryThis$7=functionUncurryThis,call$a=functionCall,fails$7=fails$g,objectKeys$1=objectKeys$2,getOwnPropertySymbolsModule=objectGetOwnPropertySymbols,propertyIsEnumerableModule=objectPropertyIsEnumerable,toObject$3=toObject$5,IndexedObject$1=indexedObject,$assign=Object.assign,defineProperty$4=Object.defineProperty,concat=uncurryThis$7([].concat),objectAssign=!$assign||fails$7(function(){if(DESCRIPTORS$4&&1!==$assign({b:1},$assign(defineProperty$4({},"a",{enumerable:!0,get:function(){defineProperty$4(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var e={},t={},n=Symbol(),r="abcdefghijklmnopqrst";return e[n]=7,r.split("").forEach(function(e){t[e]=e}),7!=$assign({},e)[n]||objectKeys$1($assign({},t)).join("")!=r})?function(e,t){for(var n=toObject$3(e),r=arguments.length,o=1,i=getOwnPropertySymbolsModule.f,a=propertyIsEnumerableModule.f;o<r;)for(var s,l=IndexedObject$1(arguments[o++]),c=i?concat(objectKeys$1(l),i(l)):objectKeys$1(l),p=c.length,u=0;u<p;)s=c[u++],DESCRIPTORS$4&&!call$a(a,l,s)||(n[s]=l[s]);return n}:$assign,$$b=_export,assign=objectAssign,objectDefineProperties=(_export({target:"Object",stat:!0,arity:2,forced:Object.assign!==assign},{assign:assign}),{}),DESCRIPTORS$3=descriptors,V8_PROTOTYPE_DEFINE_BUG=v8PrototypeDefineBug,definePropertyModule$2=objectDefineProperty,anObject$9=anObject$c,toIndexedObject$1=toIndexedObject$5,objectKeys=objectKeys$2,getBuiltIn$4=(objectDefineProperties.f=DESCRIPTORS$3&&!V8_PROTOTYPE_DEFINE_BUG?Object.defineProperties:function(e,t){anObject$9(e);for(var n,r=toIndexedObject$1(t),o=objectKeys(t),i=o.length,a=0;a<i;)definePropertyModule$2.f(e,n=o[a++],r[n]);return e},getBuiltIn$8),html$2=getBuiltIn$8("document","documentElement"),anObject$8=anObject$c,definePropertiesModule=objectDefineProperties,enumBugKeys=enumBugKeys$3,hiddenKeys=hiddenKeys$4,html$1=html$2,documentCreateElement$1=documentCreateElement$2,sharedKey$1=sharedKey$3,GT=">",LT="<",PROTOTYPE="prototype",SCRIPT="script",IE_PROTO$1=sharedKey$3("IE_PROTO"),EmptyConstructor=function(){},scriptTag=function(e){return LT+SCRIPT+GT+e+LT+"/"+SCRIPT+GT},NullProtoObjectViaActiveX=function(e){e.write(scriptTag("")),e.close();var t=e.parentWindow.Object;return e=null,t},NullProtoObjectViaIFrame=function(){var e=documentCreateElement$1("iframe"),t="java"+SCRIPT+":";return e.style.display="none",html$1.appendChild(e),e.src=String(t),(t=e.contentWindow.document).open(),t.write(scriptTag("document.F=Object")),t.close(),t.F},NullProtoObject=function(){try{activeXDocument=new ActiveXObject("htmlfile")}catch(e){}NullProtoObject="undefined"==typeof document||document.domain&&activeXDocument?NullProtoObjectViaActiveX(activeXDocument):NullProtoObjectViaIFrame();for(var e=enumBugKeys.length;e--;)delete NullProtoObject[PROTOTYPE][enumBugKeys[e]];return NullProtoObject()},objectCreate=(hiddenKeys[IE_PROTO$1]=!0,Object.create||function(e,t){var n;return null!==e?(EmptyConstructor[PROTOTYPE]=anObject$8(e),n=new EmptyConstructor,EmptyConstructor[PROTOTYPE]=null,n[IE_PROTO$1]=e):n=NullProtoObject(),void 0===t?n:definePropertiesModule.f(n,t)}),wellKnownSymbol$e=wellKnownSymbol$g,create$1=objectCreate,defineProperty$3=objectDefineProperty.f,UNSCOPABLES=wellKnownSymbol$e("unscopables"),ArrayPrototype$1=Array.prototype,addToUnscopables$1=(null==ArrayPrototype$1[UNSCOPABLES]&&defineProperty$3(ArrayPrototype$1,UNSCOPABLES,{configurable:!0,value:create$1(null)}),function(e){ArrayPrototype$1[UNSCOPABLES][e]=!0}),iterators={},fails$6=fails$g,correctPrototypeGetter=!fails$g(function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype}),hasOwn$4=hasOwnProperty_1,isCallable$a=isCallable$l,toObject$2=toObject$5,sharedKey=sharedKey$3,CORRECT_PROTOTYPE_GETTER=correctPrototypeGetter,IE_PROTO=sharedKey$3("IE_PROTO"),$Object$1=Object,ObjectPrototype=$Object$1.prototype,objectGetPrototypeOf=CORRECT_PROTOTYPE_GETTER?$Object$1.getPrototypeOf:function(e){e=toObject$2(e);if(hasOwn$4(e,IE_PROTO))return e[IE_PROTO];var t=e.constructor;return isCallable$a(t)&&e instanceof t?t.prototype:e instanceof $Object$1?ObjectPrototype:null},fails$5=fails$g,isCallable$9=isCallable$l,getPrototypeOf$1=objectGetPrototypeOf,defineBuiltIn$4=defineBuiltIn$6,wellKnownSymbol$d=wellKnownSymbol$g,ITERATOR$5=wellKnownSymbol$g("iterator"),BUGGY_SAFARI_ITERATORS$1=!1,NEW_ITERATOR_PROTOTYPE=([].keys&&("next"in(arrayIterator=[].keys())?(PrototypeOfArrayIteratorPrototype=getPrototypeOf$1(getPrototypeOf$1(arrayIterator)))!==Object.prototype&&(IteratorPrototype$2=PrototypeOfArrayIteratorPrototype):BUGGY_SAFARI_ITERATORS$1=!0),null==IteratorPrototype$2||fails$5(function(){var e={};return IteratorPrototype$2[ITERATOR$5].call(e)!==e})),iteratorsCore=(isCallable$9((IteratorPrototype$2=NEW_ITERATOR_PROTOTYPE?{}:IteratorPrototype$2)[ITERATOR$5])||defineBuiltIn$4(IteratorPrototype$2,ITERATOR$5,function(){return this}),{IteratorPrototype:IteratorPrototype$2,BUGGY_SAFARI_ITERATORS:BUGGY_SAFARI_ITERATORS$1}),defineProperty$2=objectDefineProperty.f,hasOwn$3=hasOwnProperty_1,wellKnownSymbol$c=wellKnownSymbol$g,TO_STRING_TAG$3=wellKnownSymbol$g("toStringTag"),setToStringTag$3=function(e,t,n){(e=e&&!n?e.prototype:e)&&!hasOwn$3(e,TO_STRING_TAG$3)&&defineProperty$2(e,TO_STRING_TAG$3,{configurable:!0,value:t})},IteratorPrototype$1=iteratorsCore.IteratorPrototype,create=objectCreate,createPropertyDescriptor$1=createPropertyDescriptor$4,setToStringTag$2=setToStringTag$3,Iterators$4=iterators,returnThis$1=function(){return this},createIteratorConstructor$1=function(e,t,n,r){t+=" Iterator";return e.prototype=create(IteratorPrototype$1,{next:createPropertyDescriptor$1(+!r,n)}),setToStringTag$2(e,t,!1),Iterators$4[t]=returnThis$1,e},isCallable$8=isCallable$l,$String$1=String,$TypeError$8=TypeError,aPossiblePrototype$1=function(e){if("object"==typeof e||isCallable$8(e))return e;throw $TypeError$8("Can't set "+$String$1(e)+" as a prototype")},uncurryThis$6=functionUncurryThis,anObject$7=anObject$c,aPossiblePrototype=aPossiblePrototype$1,objectSetPrototypeOf=Object.setPrototypeOf||("__proto__"in{}?function(){var n,r=!1,e={};try{(n=uncurryThis$6(Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set))(e,[]),r=e instanceof Array}catch(e){}return function(e,t){return anObject$7(e),aPossiblePrototype(t),r?n(e,t):e.__proto__=t,e}}():void 0),$$a=_export,call$9=functionCall,FunctionName=functionName,isCallable$7=isCallable$l,createIteratorConstructor=createIteratorConstructor$1,getPrototypeOf=objectGetPrototypeOf,setPrototypeOf$1=objectSetPrototypeOf,setToStringTag$1=setToStringTag$3,createNonEnumerableProperty$1=createNonEnumerableProperty$4,defineBuiltIn$3=defineBuiltIn$6,wellKnownSymbol$b=wellKnownSymbol$g,Iterators$3=iterators,IteratorsCore=iteratorsCore,PROPER_FUNCTION_NAME$1=FunctionName.PROPER,CONFIGURABLE_FUNCTION_NAME=FunctionName.CONFIGURABLE,IteratorPrototype=IteratorsCore.IteratorPrototype,BUGGY_SAFARI_ITERATORS=IteratorsCore.BUGGY_SAFARI_ITERATORS,ITERATOR$4=wellKnownSymbol$b("iterator"),KEYS="keys",VALUES="values",ENTRIES="entries",returnThis=function(){return this},defineIterator$1=function(e,t,n,r,o,i,a){createIteratorConstructor(n,t,r);function s(e){if(e===o&&$)return $;if(!BUGGY_SAFARI_ITERATORS&&e in u)return u[e];switch(e){case KEYS:case VALUES:case ENTRIES:return function(){return new n(this,e)}}return function(){return new n(this)}}var l,c,r=t+" Iterator",p=!1,u=e.prototype,d=u[ITERATOR$4]||u["@@iterator"]||o&&u[o],$=!BUGGY_SAFARI_ITERATORS&&d||s(o),g="Array"==t&&u.entries||d;if(g&&(g=getPrototypeOf(g.call(new e)))!==Object.prototype&&g.next&&(getPrototypeOf(g)!==IteratorPrototype&&(setPrototypeOf$1?setPrototypeOf$1(g,IteratorPrototype):isCallable$7(g[ITERATOR$4])||defineBuiltIn$3(g,ITERATOR$4,returnThis)),setToStringTag$1(g,r,!0)),PROPER_FUNCTION_NAME$1&&o==VALUES&&d&&d.name!==VALUES&&(CONFIGURABLE_FUNCTION_NAME?createNonEnumerableProperty$1(u,"name",VALUES):(p=!0,$=function(){return call$9(d,this)})),o)if(l={values:s(VALUES),keys:i?$:s(KEYS),entries:s(ENTRIES)},a)for(c in l)!BUGGY_SAFARI_ITERATORS&&!p&&c in u||defineBuiltIn$3(u,c,l[c]);else $$a({target:t,proto:!0,forced:BUGGY_SAFARI_ITERATORS||p},l);return u[ITERATOR$4]!==$&&defineBuiltIn$3(u,ITERATOR$4,$,{name:o}),Iterators$3[t]=$,l},toIndexedObject=toIndexedObject$5,addToUnscopables=addToUnscopables$1,Iterators$2=iterators,InternalStateModule$1=internalState,defineProperty$1=objectDefineProperty.f,defineIterator=defineIterator$1,DESCRIPTORS$2=descriptors,ARRAY_ITERATOR="Array Iterator",setInternalState$1=InternalStateModule$1.set,getInternalState=InternalStateModule$1.getterFor(ARRAY_ITERATOR),es_array_iterator=defineIterator(Array,"Array",function(e,t){setInternalState$1(this,{type:ARRAY_ITERATOR,target:toIndexedObject(e),index:0,kind:t})},function(){var e=getInternalState(this),t=e.target,n=e.kind,r=e.index++;return!t||r>=t.length?{value:e.target=void 0,done:!0}:"keys"==n?{value:r,done:!1}:"values"==n?{value:t[r],done:!1}:{value:[r,t[r]],done:!1}},"values"),values=Iterators$2.Arguments=Iterators$2.Array;if(addToUnscopables("keys"),addToUnscopables("values"),addToUnscopables("entries"),DESCRIPTORS$2&&"values"!==values.name)try{defineProperty$1(values,"name",{value:"values"})}catch(e){}var COLLECTION_NAME,domIterables={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0},documentCreateElement=documentCreateElement$2,classList=documentCreateElement$2("span").classList,DOMTokenListPrototype$1=classList&&classList.constructor&&classList.constructor.prototype,domTokenListPrototype=DOMTokenListPrototype$1===Object.prototype?void 0:DOMTokenListPrototype$1,global$a=global$k,DOMIterables=domIterables,DOMTokenListPrototype=domTokenListPrototype,ArrayIteratorMethods=es_array_iterator,createNonEnumerableProperty=createNonEnumerableProperty$4,wellKnownSymbol$a=wellKnownSymbol$g,ITERATOR$3=wellKnownSymbol$a("iterator"),TO_STRING_TAG$2=wellKnownSymbol$a("toStringTag"),ArrayValues=ArrayIteratorMethods.values,handlePrototype=function(t,e){if(t){if(t[ITERATOR$3]!==ArrayValues)try{createNonEnumerableProperty(t,ITERATOR$3,ArrayValues)}catch(e){t[ITERATOR$3]=ArrayValues}if(t[TO_STRING_TAG$2]||createNonEnumerableProperty(t,TO_STRING_TAG$2,e),DOMIterables[e])for(var n in ArrayIteratorMethods)if(t[n]!==ArrayIteratorMethods[n])try{createNonEnumerableProperty(t,n,ArrayIteratorMethods[n])}catch(e){t[n]=ArrayIteratorMethods[n]}}};for(COLLECTION_NAME in DOMIterables)handlePrototype(global$a[COLLECTION_NAME]&&global$a[COLLECTION_NAME].prototype,COLLECTION_NAME);handlePrototype(DOMTokenListPrototype,"DOMTokenList");var EmptyStringDescriptionStore,SymbolWrapper,NATIVE_SYMBOL,symbolToString,symbolValueOf,regexp,replace,stringSlice,EApplicationStatus,EConfigTypes,isObject$2=isObject$8,classof$5=classofRaw$1,wellKnownSymbol$9=wellKnownSymbol$g,MATCH$1=wellKnownSymbol$g("match"),isRegexp=function(e){var t;return isObject$2(e)&&(void 0!==(t=e[MATCH$1])?!!t:"RegExp"==classof$5(e))},isRegExp=isRegexp,$TypeError$7=TypeError,notARegexp=function(e){if(isRegExp(e))throw $TypeError$7("The method doesn't accept regular expressions");return e},wellKnownSymbol$8=wellKnownSymbol$g,TO_STRING_TAG$1=wellKnownSymbol$g("toStringTag"),test$1={},toStringTagSupport=(test$1[TO_STRING_TAG$1]="z","[object z]"===String(test$1)),TO_STRING_TAG_SUPPORT=toStringTagSupport,isCallable$6=isCallable$l,classofRaw=classofRaw$1,wellKnownSymbol$7=wellKnownSymbol$g,TO_STRING_TAG=wellKnownSymbol$g("toStringTag"),$Object=Object,CORRECT_ARGUMENTS="Arguments"==classofRaw(function(){return arguments}()),tryGet=function(e,t){try{return e[t]}catch(e){}},classof$4=TO_STRING_TAG_SUPPORT?classofRaw:function(e){var t;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(t=tryGet(e=$Object(e),TO_STRING_TAG))?t:CORRECT_ARGUMENTS?classofRaw(e):"Object"==(t=classofRaw(e))&&isCallable$6(e.callee)?"Arguments":t},classof$3=classof$4,$String=String,toString$3=function(e){if("Symbol"===classof$3(e))throw TypeError("Cannot convert a Symbol value to a string");return $String(e)},wellKnownSymbol$6=wellKnownSymbol$g,MATCH=wellKnownSymbol$g("match"),correctIsRegexpLogic=function(t){var n=/./;try{"/./"[t](n)}catch(e){try{return n[MATCH]=!1,"/./"[t](n)}catch(e){}}return!1},$$9=_export,uncurryThis$5=functionUncurryThis,notARegExp=notARegexp,requireObjectCoercible=requireObjectCoercible$3,toString$2=toString$3,correctIsRegExpLogic=correctIsRegexpLogic,stringIndexOf=functionUncurryThis("".indexOf),$$8=($$9({target:"String",proto:!0,forced:!correctIsRegExpLogic("includes")},{includes:function(e){return!!~stringIndexOf(toString$2(requireObjectCoercible(this)),toString$2(notARegExp(e)),1<arguments.length?arguments[1]:void 0)}}),_export),DESCRIPTORS$1=descriptors,global$9=global$k,uncurryThis$4=functionUncurryThis,hasOwn$2=hasOwnProperty_1,isCallable$5=isCallable$l,isPrototypeOf$3=objectIsPrototypeOf,toString$1=toString$3,defineProperty=objectDefineProperty.f,copyConstructorProperties=copyConstructorProperties$2,NativeSymbol=global$9.Symbol,SymbolPrototype=NativeSymbol&&NativeSymbol.prototype,anObject$6=(!DESCRIPTORS$1||!isCallable$5(NativeSymbol)||"description"in SymbolPrototype&&void 0===NativeSymbol().description||(EmptyStringDescriptionStore={},copyConstructorProperties(SymbolWrapper=function(){var e=arguments.length<1||void 0===arguments[0]?void 0:toString$1(arguments[0]),t=isPrototypeOf$3(SymbolPrototype,this)?new NativeSymbol(e):void 0===e?NativeSymbol():NativeSymbol(e);return""===e&&(EmptyStringDescriptionStore[t]=!0),t},NativeSymbol),(SymbolWrapper.prototype=SymbolPrototype).constructor=SymbolWrapper,NATIVE_SYMBOL="Symbol(test)"==String(NativeSymbol("test")),symbolToString=uncurryThis$4(SymbolPrototype.toString),symbolValueOf=uncurryThis$4(SymbolPrototype.valueOf),regexp=/^Symbol\((.*)\)[^)]+$/,replace=uncurryThis$4("".replace),stringSlice=uncurryThis$4("".slice),defineProperty(SymbolPrototype,"description",{configurable:!0,get:function(){var e=symbolValueOf(this),t=symbolToString(e);if(hasOwn$2(EmptyStringDescriptionStore,e))return"";e=NATIVE_SYMBOL?stringSlice(t,7,-1):replace(t,regexp,"$1");return""===e?void 0:e}}),$$8({global:!0,constructor:!0,forced:!0},{Symbol:SymbolWrapper})),anObject$c),regexpFlags=function(){var e=anObject$6(this),t="";return e.hasIndices&&(t+="d"),e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.dotAll&&(t+="s"),e.unicode&&(t+="u"),e.unicodeSets&&(t+="v"),e.sticky&&(t+="y"),t},call$8=functionCall,hasOwn$1=hasOwnProperty_1,isPrototypeOf$2=objectIsPrototypeOf,regExpFlags=regexpFlags,RegExpPrototype$1=RegExp.prototype,regexpGetFlags=function(e){var t=e.flags;return void 0!==t||"flags"in RegExpPrototype$1||hasOwn$1(e,"flags")||!isPrototypeOf$2(RegExpPrototype$1,e)?t:call$8(regExpFlags,e)},PROPER_FUNCTION_NAME=functionName.PROPER,defineBuiltIn$2=defineBuiltIn$6,anObject$5=anObject$c,$toString=toString$3,fails$4=fails$g,getRegExpFlags=regexpGetFlags,TO_STRING="toString",RegExpPrototype=RegExp.prototype,n$ToString=RegExpPrototype[TO_STRING],NOT_GENERIC=fails$4(function(){return"/a/b"!=n$ToString.call({source:"a",flags:"b"})}),INCORRECT_NAME=PROPER_FUNCTION_NAME&&n$ToString.name!=TO_STRING;(NOT_GENERIC||INCORRECT_NAME)&&defineBuiltIn$2(RegExp.prototype,TO_STRING,function(){var e=anObject$5(this);return"/"+$toString(e.source)+"/"+$toString(getRegExpFlags(e))},{unsafe:!0});const ApplicationListItem=({app:e,onOpenApplicationDetailPanel:t,showInstalledChip:n=!1,isAppInstalled:r})=>{const{name:o,description:i,iconUrl:a,id:s,ownerOrganizationId:l}=e,c=useSelector(selectOrgId);var e=c&&l&&l.toString()===c.toString(),p={height:"18px",borderRadius:"30px",mb:1},u={fontWeight:"800",fontSize:"9px",lineHeight:"12px",textTransform:"uppercase"};return jsxRuntime.exports.jsxs(react.exports.Fragment,{children:[jsxRuntime.exports.jsxs(ListItem,Object.assign({alignItems:"center",sx:{minHeight:"134px",p:4}},{children:[jsxRuntime.exports.jsx(ListItemAvatar,Object.assign({sx:{alignSelf:"flex-start"}},{children:jsxRuntime.exports.jsx(Avatar,Object.assign({src:a,alt:o},{children:jsxRuntime.exports.jsx(Avatar,{children:o[0]})}))})),jsxRuntime.exports.jsx(ListItemText,{sx:{display:"inline",maxWidth:"390px",alignSelf:"flex-start",m:0},primary:jsxRuntime.exports.jsxs(react.exports.Fragment,{children:[jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"body2",sx:{color:"#2A323C",fontWeight:"400"}},{children:o})),jsxRuntime.exports.jsxs(Stack,Object.assign({direction:"row",spacing:1},{children:[n&&r&&r(s)&&jsxRuntime.exports.jsx(Chip$1,{label:jsxRuntime.exports.jsx(Typography$1,Object.assign({sx:Object.assign({color:green[700]},u)},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:"admin-center-applications-installed-badge-123132",defaultMessage:"Installed",description:"installed application badge"})})),color:"success",size:"small",sx:Object.assign({background:"rgba(27, 94, 32, 0.2)",width:"70px"},p)}),e&&jsxRuntime.exports.jsx(Chip$1,{icon:jsxRuntime.exports.jsx(Lock,{style:{height:"12px",width:"12px"}}),label:jsxRuntime.exports.jsx(Typography$1,Object.assign({sx:Object.assign({color:"#4F5863"},u)},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:"admin-center-applications-org-owned-badge-123112",defaultMessage:"org owned",description:"org owned application badge"})})),variant:"outlined",size:"small",sx:Object.assign({width:"90px"},p)})]}))]}),secondary:jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"body2",sx:{mt:1}},{children:i}))}),jsxRuntime.exports.jsx(ListItemSecondaryAction,{children:jsxRuntime.exports.jsx(Button$1,Object.assign({onClick:t,variant:"outlined",color:"primary","data-testid":"admin-center-application-details-panel-open-button"},{children:"View Details"}))})]})),jsxRuntime.exports.jsx(Divider,{})]})},LoaderSkeletonItem=()=>jsxRuntime.exports.jsxs(ListItem,Object.assign({alignItems:"center",sx:{height:"134px"}},{children:[jsxRuntime.exports.jsx(ListItemAvatar,{children:jsxRuntime.exports.jsx(Skeleton$1,{variant:"circular",width:40,height:40})}),jsxRuntime.exports.jsx(ListItemText,{children:jsxRuntime.exports.jsx(Skeleton$1,{variant:"text",width:150,height:30})}),jsxRuntime.exports.jsx(ListItemSecondaryAction,{children:jsxRuntime.exports.jsx(Skeleton$1,{variant:"rectangular",width:87,height:35})})]})),LoaderSkeleton=()=>jsxRuntime.exports.jsxs(List,{children:[jsxRuntime.exports.jsx(LoaderSkeletonItem,{}),jsxRuntime.exports.jsx(Divider,{}),jsxRuntime.exports.jsx(LoaderSkeletonItem,{}),jsxRuntime.exports.jsx(Divider,{}),jsxRuntime.exports.jsx(LoaderSkeletonItem,{}),jsxRuntime.exports.jsx(Divider,{})]}),ApplicationList=({apps:e,uiStatus:t,onRetry:n,showInstalledChip:r=!1,isAppInstalled:o})=>{const i=useDispatch();return"loading"===t?jsxRuntime.exports.jsx(LoaderSkeleton,{}):"failure"===t?jsxRuntime.exports.jsx(ErrorState,{onRetry:n,errorMessage:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-applications.error-message",defaultMessage:"Something went wrong while loading applications.",description:"admin center applications error state"})}):jsxRuntime.exports.jsx(List,Object.assign({sx:{maxHeight:"95%",overflowY:"auto"}},{children:e.map(e=>jsxRuntime.exports.jsx(ApplicationListItem,{app:e,onOpenApplicationDetailPanel:(e=>()=>{i(mountPanel({panelId:"APPLICATION_DETAILS_PANEL",microFrontend:{name:"APPLICATION_DETAILS_PANEL",config:{applicationId:e.id,initValue:e}},panelConfig:{type:"APP_BAR_PANEL_TEMPLATE",marginTop:55,marginStart:80,size:"large",zIndex:1002,parentPanelId:"ADMIN_CENTER_BROWSE",dimmed:0,dimmedStatus:"dimParent",borderBottom:!0}}))})(e),showInstalledChip:r,isAppInstalled:o}))}))},SLICE_NAME$1="adminCenterApplication",namespace$2=(!function(e){e.active="active",e.draft="draft",e.deleted="deleted",e.pending="pending",e.rejected="rejected",e.approved="approved",e.disabled="disabled"}(EApplicationStatus=EApplicationStatus||{}),!function(e){e.string="String",e.json="JSON",e.boolean="Boolean"}(EConfigTypes=EConfigTypes||{}),"adminCenterApplications"),initialState$2={allApplications:[],installedApplications:[],allAppStatus:"idle",installedAppStatus:"idle"},adminCenterApplicationSlice=createSlice({name:SLICE_NAME$1+"/"+namespace$2,initialState:initialState$2,reducers:{fetchAllApplicationsStart(e){e.allAppStatus="loading"},fetchAllApplicationsSuccess(e,t){e.allAppStatus="success",e.allApplications=t.payload},fetchAllApplicationsFailure(e){e.allAppStatus="failure"},fetchInstalledApplicationsStart(e){e.installedAppStatus="loading"},fetchInstalledApplicationsSuccess(e,t){e.installedAppStatus="success",e.installedApplications=t.payload},fetchInstalledApplicationsFailure(e){e.installedAppStatus="failure"}}}),actions$2=adminCenterApplicationSlice.actions;var Status,adminCenterApplications_state=adminCenterApplicationSlice.reducer;const selectInstalledApps=e=>{return null==(e=null==(e=null==e?void 0:e[SLICE_NAME$1])?void 0:e[namespace$2])?void 0:e.installedApplications},selectAllApps=e=>{return null==(e=null==(e=null==e?void 0:e[SLICE_NAME$1])?void 0:e[namespace$2])?void 0:e.allApplications},selectAllAppsUiStatus=e=>{return null==(e=null==(e=null==e?void 0:e[SLICE_NAME$1])?void 0:e[namespace$2])?void 0:e.allAppStatus},selectInstalledAppsUiStatus=e=>{return null==(e=null==(e=null==e?void 0:e[SLICE_NAME$1])?void 0:e[namespace$2])?void 0:e.installedAppStatus},selectApiConfigs=createSelector([rootApiSelector,graphEndpointSelector,sessionTokenSelector],(e,t,n)=>({apiRoot:e,graphQLEndpoint:t,token:n}));function __rest(e,t){var n={};for(o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var r=0,o=Object.getOwnPropertySymbols(e);r<o.length;r++)t.indexOf(o[r])<0&&Object.prototype.propertyIsEnumerable.call(e,o[r])&&(n[o[r]]=e[o[r]]);return n}function __awaiter(e,a,s,l){return new(s=s||Promise)(function(n,t){function r(e){try{i(l.next(e))}catch(e){t(e)}}function o(e){try{i(l.throw(e))}catch(e){t(e)}}function i(e){var t;e.done?n(e.value):((t=e.value)instanceof s?t:new s(function(e){e(t)})).then(r,o)}i((l=l.apply(e,a||[])).next())})}const SLICE_NAME="applications",namespace$1=(!function(e){e.idle="idle",e.loading="loading",e.success="success",e.failure="failure"}(Status=Status||{}),"applicationDetail"),initialState$1={status:"idle",application:{},ownerOrganization:{name:""}},applicationDetailSlice=createSlice({name:SLICE_NAME+"/"+namespace$1,initialState:initialState$1,reducers:{setInitialApplicationValue(e,t){var n=t.payload,r=n["ownerOrganization"],n=__rest(n,["ownerOrganization"]);e.initValue=t.payload,e.application=n,e.ownerOrganization=r,e.status=Status.success},fetchApplicationStart(e,t){var n,{applicationId:t,initValue:r}=t.payload;e.applicationId=t,r?(t=r["ownerOrganization"],n=__rest(r,["ownerOrganization"]),e.initValue=r,e.application=n,e.ownerOrganization=t,e.status=Status.success):e.status=Status.loading},fetchApplicationSuccess(e,t){var{application:t,organization:n}=t.payload;e.application=t,e.ownerOrganization=n,e.status=Status.success},fetchApplicationError(e,t){e.status=Status.failure},setStatus(e,t){e.status=t.payload},installAppStart(e,t){e.status=Status.loading},installAppSuccess(e,t){e.status=Status.success,e.application=t.payload},installAppFailure(e){e.status=Status.failure}}}),actions$1=applicationDetailSlice.actions;var applicationDetailsPanelReducer=applicationDetailSlice.reducer;const namespace=SLICE_NAME$1,initialState={[namespace$2]:initialState$2,[namespace$1]:initialState$1},actions={[namespace$2]:actions$2,[namespace$1]:actions$1},rootReducer=combineReducers({[namespace$2]:adminCenterApplications_state,[namespace$1]:applicationDetailsPanelReducer});var location,defer,channel,port,tryToString$3=tryToString$5,$TypeError$6=TypeError,deletePropertyOrThrow$1=function(e,t){if(!delete e[t])throw $TypeError$6("Cannot delete property "+tryToString$3(t)+" of "+tryToString$3(e))},toPropertyKey=toPropertyKey$3,definePropertyModule$1=objectDefineProperty,createPropertyDescriptor=createPropertyDescriptor$4,createProperty$1=function(e,t,n){t=toPropertyKey(t);t in e?definePropertyModule$1.f(e,t,createPropertyDescriptor(0,n)):e[t]=n},toAbsoluteIndex=toAbsoluteIndex$2,lengthOfArrayLike$3=lengthOfArrayLike$5,createProperty=createProperty$1,$Array=Array,max=Math.max,arraySliceSimple=function(e,t,n){for(var r=lengthOfArrayLike$3(e),o=toAbsoluteIndex(t,r),i=toAbsoluteIndex(void 0===n?r:n,r),a=$Array(max(i-o,0)),s=0;o<i;o++,s++)createProperty(a,s,e[o]);return a.length=s,a},arraySlice$2=arraySliceSimple,floor=Math.floor,mergeSort=function(e,t){var n=e.length,r=floor(n/2);return n<8?insertionSort(e,t):merge(e,mergeSort(arraySlice$2(e,0,r),t),mergeSort(arraySlice$2(e,r),t),t)},insertionSort=function(e,t){for(var n,r,o=e.length,i=1;i<o;){for(n=e[r=i];r&&0<t(e[r-1],n);)e[r]=e[--r];r!==i++&&(e[r]=n)}return e},merge=function(e,t,n,r){for(var o=t.length,i=n.length,a=0,s=0;a<o||s<i;)e[a+s]=a<o&&s<i?r(t[a],n[s])<=0?t[a++]:n[s++]:a<o?t[a++]:n[s++];return e},arraySort=mergeSort,fails$3=fails$g,arrayMethodIsStrict$2=function(e,t){var n=[][e];return!!n&&fails$3(function(){n.call(null,t||function(){return 1},1)})},userAgent$4=engineUserAgent,firefox=engineUserAgent.match(/firefox\/(\d+)/i),engineFfVersion=!!firefox&&+firefox[1],UA=engineUserAgent,engineIsIeOrEdge=/MSIE|Trident/.test(UA),userAgent$3=engineUserAgent,webkit=engineUserAgent.match(/AppleWebKit\/(\d+)\./),engineWebkitVersion=!!webkit&&+webkit[1],$$7=_export,uncurryThis$3=functionUncurryThis,aCallable$7=aCallable$9,toObject$1=toObject$5,lengthOfArrayLike$2=lengthOfArrayLike$5,deletePropertyOrThrow=deletePropertyOrThrow$1,toString=toString$3,fails$2=fails$g,internalSort=arraySort,arrayMethodIsStrict$1=arrayMethodIsStrict$2,FF=engineFfVersion,IE_OR_EDGE=engineIsIeOrEdge,V8=engineV8Version,WEBKIT=engineWebkitVersion,test=[],un$Sort=uncurryThis$3(test.sort),push=uncurryThis$3(test.push),FAILS_ON_UNDEFINED=fails$2(function(){test.sort(void 0)}),FAILS_ON_NULL=fails$2(function(){test.sort(null)}),STRICT_METHOD$1=arrayMethodIsStrict$1("sort"),STABLE_SORT=!fails$2(function(){if(V8)return V8<70;if(!(FF&&3<FF)){if(IE_OR_EDGE)return!0;if(WEBKIT)return WEBKIT<603;for(var e,t,n,r="",o=65;o<76;o++){switch(e=String.fromCharCode(o),o){case 66:case 69:case 70:case 72:t=3;break;case 68:case 71:t=4;break;default:t=2}for(n=0;n<47;n++)test.push({k:e+n,v:t})}for(test.sort(function(e,t){return t.v-e.v}),n=0;n<test.length;n++)e=test[n].k.charAt(0),r.charAt(r.length-1)!==e&&(r+=e);return"DGBEFHACIJK"!==r}}),FORCED=FAILS_ON_UNDEFINED||!FAILS_ON_NULL||!STRICT_METHOD$1||!STABLE_SORT,getSortCompare=function(n){return function(e,t){return void 0===t?-1:void 0===e?1:void 0!==n?+n(e,t)||0:toString(e)>toString(t)?1:-1}},classof$2=($$7({target:"Array",proto:!0,forced:FORCED},{sort:function(e){void 0!==e&&aCallable$7(e);var t=toObject$1(this);if(STABLE_SORT)return void 0===e?un$Sort(t):un$Sort(t,e);for(var n,r=[],o=lengthOfArrayLike$2(t),i=0;i<o;i++)i in t&&push(r,t[i]);for(internalSort(r,getSortCompare(e)),n=r.length,i=0;i<n;)t[i]=r[i++];for(;i<o;)deletePropertyOrThrow(t,i++);return t}}),classofRaw$1),global$8=global$k,engineIsNode="process"==classofRaw$1(global$k.process),getBuiltIn$3=getBuiltIn$8,definePropertyModule=objectDefineProperty,wellKnownSymbol$5=wellKnownSymbol$g,DESCRIPTORS=descriptors,SPECIES$2=wellKnownSymbol$g("species"),setSpecies$1=function(e){var e=getBuiltIn$3(e),t=definePropertyModule.f;DESCRIPTORS&&e&&!e[SPECIES$2]&&t(e,SPECIES$2,{configurable:!0,get:function(){return this}})},isPrototypeOf$1=objectIsPrototypeOf,$TypeError$5=TypeError,anInstance$1=function(e,t){if(isPrototypeOf$1(t,e))return e;throw $TypeError$5("Incorrect invocation")},uncurryThis$2=functionUncurryThis,fails$1=fails$g,isCallable$4=isCallable$l,classof$1=classof$4,getBuiltIn$2=getBuiltIn$8,inspectSource$1=inspectSource$4,noop=function(){},empty=[],construct=getBuiltIn$8("Reflect","construct"),constructorRegExp=/^\s*(?:class|function)\b/,exec=uncurryThis$2(constructorRegExp.exec),INCORRECT_TO_STRING=!constructorRegExp.exec(noop),isConstructorModern=function(e){if(!isCallable$4(e))return!1;try{return construct(noop,empty,e),!0}catch(e){return!1}},isConstructorLegacy=function(e){if(!isCallable$4(e))return!1;switch(classof$1(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return INCORRECT_TO_STRING||!!exec(constructorRegExp,inspectSource$1(e))}catch(e){return!0}},isConstructor$1=(isConstructorLegacy.sham=!0,!construct||fails$1(function(){var e;return isConstructorModern(isConstructorModern.call)||!isConstructorModern(Object)||!isConstructorModern(function(){e=!0})||e})?isConstructorLegacy:isConstructorModern),isConstructor=isConstructor$1,tryToString$2=tryToString$5,$TypeError$4=TypeError,aConstructor$1=function(e){if(isConstructor(e))return e;throw $TypeError$4(tryToString$2(e)+" is not a constructor")},anObject$4=anObject$c,aConstructor=aConstructor$1,wellKnownSymbol$4=wellKnownSymbol$g,SPECIES$1=wellKnownSymbol$g("species"),speciesConstructor$1=function(e,t){var e=anObject$4(e).constructor;return void 0===e||null==(e=anObject$4(e)[SPECIES$1])?t:aConstructor(e)},NATIVE_BIND$1=functionBindNative,FunctionPrototype=Function.prototype,apply$1=FunctionPrototype.apply,call$7=FunctionPrototype.call,functionApply="object"==typeof Reflect&&Reflect.apply||(NATIVE_BIND$1?call$7.bind(apply$1):function(){return call$7.apply(apply$1,arguments)}),uncurryThis$1=functionUncurryThis,aCallable$6=aCallable$9,NATIVE_BIND=functionBindNative,bind$4=functionUncurryThis(functionUncurryThis.bind),functionBindContext=function(e,t){return aCallable$6(e),void 0===t?e:NATIVE_BIND?bind$4(e,t):function(){return e.apply(t,arguments)}},uncurryThis=functionUncurryThis,arraySlice$1=functionUncurryThis([].slice),$TypeError$3=TypeError,validateArgumentsLength$1=function(e,t){if(e<t)throw $TypeError$3("Not enough arguments");return e},userAgent$2=engineUserAgent,engineIsIos=/(?:ipad|iphone|ipod).*applewebkit/i.test(userAgent$2),global$7=global$k,apply=functionApply,bind$3=functionBindContext,isCallable$3=isCallable$l,hasOwn=hasOwnProperty_1,fails=fails$g,html=html$2,arraySlice=arraySlice$1,createElement=documentCreateElement$2,validateArgumentsLength=validateArgumentsLength$1,IS_IOS$1=engineIsIos,IS_NODE$4=engineIsNode,set=global$7.setImmediate,clear=global$7.clearImmediate,process$3=global$7.process,Dispatch=global$7.Dispatch,Function$1=global$7.Function,MessageChannel=global$7.MessageChannel,String$1=global$7.String,counter=0,queue$1={},ONREADYSTATECHANGE="onreadystatechange";try{location=global$7.location}catch(e){}var flush,head,last,notify$1,toggle,node,promise,then,Internal,OwnPromiseCapability,PromiseWrapper,nativeThen,run=function(e){var t;hasOwn(queue$1,e)&&(t=queue$1[e],delete queue$1[e],t())},runner=function(e){return function(){run(e)}},listener=function(e){run(e.data)},post=function(e){global$7.postMessage(String$1(e),location.protocol+"//"+location.host)},task$1=(set&&clear||(set=function(e){validateArgumentsLength(arguments.length,1);var t=isCallable$3(e)?e:Function$1(e),n=arraySlice(arguments,1);return queue$1[++counter]=function(){apply(t,void 0,n)},defer(counter),counter},clear=function(e){delete queue$1[e]},IS_NODE$4?defer=function(e){process$3.nextTick(runner(e))}:Dispatch&&Dispatch.now?defer=function(e){Dispatch.now(runner(e))}:MessageChannel&&!IS_IOS$1?(port=(channel=new MessageChannel).port2,channel.port1.onmessage=listener,defer=bind$3(port.postMessage,port)):global$7.addEventListener&&isCallable$3(global$7.postMessage)&&!global$7.importScripts&&location&&"file:"!==location.protocol&&!fails(post)?(defer=post,global$7.addEventListener("message",listener,!1)):defer=ONREADYSTATECHANGE in createElement("script")?function(e){html.appendChild(createElement("script"))[ONREADYSTATECHANGE]=function(){html.removeChild(this),run(e)}}:function(e){setTimeout(runner(e),0)}),{set:set,clear:clear}),userAgent$1=engineUserAgent,global$6=global$k,engineIsIosPebble=/ipad|iphone|ipod/i.test(userAgent$1)&&void 0!==global$6.Pebble,userAgent=engineUserAgent,engineIsWebosWebkit=/web0s(?!.*chrome)/i.test(userAgent),global$5=global$k,bind$2=functionBindContext,getOwnPropertyDescriptor=objectGetOwnPropertyDescriptor.f,macrotask=task$1.set,IS_IOS=engineIsIos,IS_IOS_PEBBLE=engineIsIosPebble,IS_WEBOS_WEBKIT=engineIsWebosWebkit,IS_NODE$3=engineIsNode,MutationObserver=global$5.MutationObserver||global$5.WebKitMutationObserver,document$2=global$5.document,process$2=global$5.process,Promise$1=global$5.Promise,queueMicrotaskDescriptor=getOwnPropertyDescriptor(global$5,"queueMicrotask"),queueMicrotask=queueMicrotaskDescriptor&&queueMicrotaskDescriptor.value,microtask$1=(queueMicrotask||(flush=function(){var e,t;for(IS_NODE$3&&(e=process$2.domain)&&e.exit();head;){t=head.fn,head=head.next;try{t()}catch(e){throw head?notify$1():last=void 0,e}}last=void 0,e&&e.enter()},notify$1=IS_IOS||IS_NODE$3||IS_WEBOS_WEBKIT||!MutationObserver||!document$2?!IS_IOS_PEBBLE&&Promise$1&&Promise$1.resolve?((promise=Promise$1.resolve(void 0)).constructor=Promise$1,then=bind$2(promise.then,promise),function(){then(flush)}):IS_NODE$3?function(){process$2.nextTick(flush)}:(macrotask=bind$2(macrotask,global$5),function(){macrotask(flush)}):(toggle=!0,node=document$2.createTextNode(""),new MutationObserver(flush).observe(node,{characterData:!0}),function(){node.data=toggle=!toggle})),queueMicrotask||function(e){e={fn:e,next:void 0};last&&(last.next=e),head||(head=e,notify$1()),last=e}),global$4=global$k,hostReportErrors$1=function(e,t){var n=global$4.console;n&&n.error&&(1==arguments.length?n.error(e):n.error(e,t))},perform$3=function(e){try{return{error:!1,value:e()}}catch(e){return{error:!0,value:e}}},Queue$1=function(){this.head=null,this.tail=null},queue=(Queue$1.prototype={add:function(e){e={item:e,next:null};this.head?this.tail.next=e:this.head=e,this.tail=e},get:function(){var e=this.head;if(e)return this.head=e.next,this.tail===e&&(this.tail=null),e.item}},Queue$1),global$3=global$k,promiseNativeConstructor=global$k.Promise,engineIsDeno="object"==typeof Deno&&Deno&&"object"==typeof Deno.version,IS_DENO$1=engineIsDeno,IS_NODE$2=engineIsNode,engineIsBrowser=!engineIsDeno&&!engineIsNode&&"object"==typeof window&&"object"==typeof document,global$2=global$k,NativePromiseConstructor$3=promiseNativeConstructor,isCallable$2=isCallable$l,isForced=isForced_1,inspectSource=inspectSource$4,wellKnownSymbol$3=wellKnownSymbol$g,IS_BROWSER=engineIsBrowser,IS_DENO=engineIsDeno,V8_VERSION=engineV8Version,SPECIES=(NativePromiseConstructor$3&&NativePromiseConstructor$3.prototype,wellKnownSymbol$3("species")),SUBCLASSING=!1,NATIVE_PROMISE_REJECTION_EVENT$1=isCallable$2(global$2.PromiseRejectionEvent),FORCED_PROMISE_CONSTRUCTOR$5=isForced("Promise",function(){var e=inspectSource(NativePromiseConstructor$3),t=e!==String(NativePromiseConstructor$3);if(!t&&66===V8_VERSION)return!0;if(!V8_VERSION||V8_VERSION<51||!/native code/.test(e)){function n(e){e(function(){},function(){})}e=new NativePromiseConstructor$3(function(e){e(1)});if((e.constructor={})[SPECIES]=n,!(SUBCLASSING=e.then(function(){})instanceof n))return!0}return!t&&(IS_BROWSER||IS_DENO)&&!NATIVE_PROMISE_REJECTION_EVENT$1}),promiseConstructorDetection={CONSTRUCTOR:FORCED_PROMISE_CONSTRUCTOR$5,REJECTION_EVENT:NATIVE_PROMISE_REJECTION_EVENT$1,SUBCLASSING:SUBCLASSING},newPromiseCapability$2={},aCallable$5=aCallable$9,PromiseCapability=function(e){var n,r;this.promise=new e(function(e,t){if(void 0!==n||void 0!==r)throw TypeError("Bad Promise constructor");n=e,r=t}),this.resolve=aCallable$5(n),this.reject=aCallable$5(r)},$$6=(newPromiseCapability$2.f=function(e){return new PromiseCapability(e)},_export),IS_NODE$1=engineIsNode,global$1=global$k,call$6=functionCall,defineBuiltIn$1=defineBuiltIn$6,setPrototypeOf=objectSetPrototypeOf,setToStringTag=setToStringTag$3,setSpecies=setSpecies$1,aCallable$4=aCallable$9,isCallable$1=isCallable$l,isObject$1=isObject$8,anInstance=anInstance$1,speciesConstructor=speciesConstructor$1,task=task$1.set,microtask=microtask$1,hostReportErrors=hostReportErrors$1,perform$2=perform$3,Queue=queue,InternalStateModule=internalState,NativePromiseConstructor$2=promiseNativeConstructor,PromiseConstructorDetection=promiseConstructorDetection,newPromiseCapabilityModule$3=newPromiseCapability$2,PROMISE="Promise",FORCED_PROMISE_CONSTRUCTOR$4=PromiseConstructorDetection.CONSTRUCTOR,NATIVE_PROMISE_REJECTION_EVENT=PromiseConstructorDetection.REJECTION_EVENT,NATIVE_PROMISE_SUBCLASSING=PromiseConstructorDetection.SUBCLASSING,getInternalPromiseState=InternalStateModule.getterFor(PROMISE),setInternalState=InternalStateModule.set,NativePromisePrototype$1=NativePromiseConstructor$2&&NativePromiseConstructor$2.prototype,PromiseConstructor=NativePromiseConstructor$2,PromisePrototype=NativePromisePrototype$1,TypeError$1=global$1.TypeError,document$1=global$1.document,process$1=global$1.process,newPromiseCapability$1=newPromiseCapabilityModule$3.f,newGenericPromiseCapability=newPromiseCapability$1,DISPATCH_EVENT=!!(document$1&&document$1.createEvent&&global$1.dispatchEvent),UNHANDLED_REJECTION="unhandledrejection",REJECTION_HANDLED="rejectionhandled",PENDING=0,FULFILLED=1,REJECTED=2,HANDLED=1,UNHANDLED=2,isThenable=function(e){var t;return!(!isObject$1(e)||!isCallable$1(t=e.then))&&t},callReaction=function(e,t){var n,r,o,i=t.value,a=t.state==FULFILLED,s=a?e.ok:e.fail,l=e.resolve,c=e.reject,p=e.domain;try{s?(a||(t.rejection===UNHANDLED&&onHandleUnhandled(t),t.rejection=HANDLED),!0===s?n=i:(p&&p.enter(),n=s(i),p&&(p.exit(),o=!0)),n===e.promise?c(TypeError$1("Promise-chain cycle")):(r=isThenable(n))?call$6(r,n,l,c):l(n)):c(i)}catch(e){p&&!o&&p.exit(),c(e)}},notify=function(n,r){n.notified||(n.notified=!0,microtask(function(){for(var e,t=n.reactions;e=t.get();)callReaction(e,n);n.notified=!1,r&&!n.rejection&&onUnhandled(n)}))},dispatchEvent=function(e,t,n){var r;DISPATCH_EVENT?((r=document$1.createEvent("Event")).promise=t,r.reason=n,r.initEvent(e,!1,!0),global$1.dispatchEvent(r)):r={promise:t,reason:n},!NATIVE_PROMISE_REJECTION_EVENT&&(t=global$1["on"+e])?t(r):e===UNHANDLED_REJECTION&&hostReportErrors("Unhandled promise rejection",n)},onUnhandled=function(r){call$6(task,global$1,function(){var e=r.facade,t=r.value,n=isUnhandled(r);if(n&&(n=perform$2(function(){IS_NODE$1?process$1.emit("unhandledRejection",t,e):dispatchEvent(UNHANDLED_REJECTION,e,t)}),r.rejection=IS_NODE$1||isUnhandled(r)?UNHANDLED:HANDLED,n.error))throw n.value})},isUnhandled=function(e){return e.rejection!==HANDLED&&!e.parent},onHandleUnhandled=function(t){call$6(task,global$1,function(){var e=t.facade;IS_NODE$1?process$1.emit("rejectionHandled",e):dispatchEvent(REJECTION_HANDLED,e,t.value)})},bind$1=function(t,n,r){return function(e){t(n,e,r)}},internalReject=function(e,t,n){e.done||(e.done=!0,(e=n?n:e).value=t,e.state=REJECTED,notify(e,!0))},internalResolve=function(n,e,t){if(!n.done){n.done=!0,t&&(n=t);try{if(n.facade===e)throw TypeError$1("Promise can't be resolved itself");var r=isThenable(e);r?microtask(function(){var t={done:!1};try{call$6(r,e,bind$1(internalResolve,t,n),bind$1(internalReject,t,n))}catch(e){internalReject(t,e,n)}}):(n.value=e,n.state=FULFILLED,notify(n,!1))}catch(e){internalReject({done:!1},e,n)}}};if(FORCED_PROMISE_CONSTRUCTOR$4&&(PromisePrototype=(PromiseConstructor=function(e){anInstance(this,PromisePrototype),aCallable$4(e),call$6(Internal,this);var t=getInternalPromiseState(this);try{e(bind$1(internalResolve,t),bind$1(internalReject,t))}catch(e){internalReject(t,e)}}).prototype,(Internal=function(e){setInternalState(this,{type:PROMISE,done:!1,notified:!1,parent:!1,reactions:new Queue,rejection:!1,state:PENDING,value:void 0})}).prototype=defineBuiltIn$1(PromisePrototype,"then",function(e,t){var n=getInternalPromiseState(this),r=newPromiseCapability$1(speciesConstructor(this,PromiseConstructor));return n.parent=!0,r.ok=!isCallable$1(e)||e,r.fail=isCallable$1(t)&&t,r.domain=IS_NODE$1?process$1.domain:void 0,n.state==PENDING?n.reactions.add(r):microtask(function(){callReaction(r,n)}),r.promise}),OwnPromiseCapability=function(){var e=new Internal,t=getInternalPromiseState(e);this.promise=e,this.resolve=bind$1(internalResolve,t),this.reject=bind$1(internalReject,t)},newPromiseCapabilityModule$3.f=newPromiseCapability$1=function(e){return e===PromiseConstructor||e===PromiseWrapper?new OwnPromiseCapability(e):newGenericPromiseCapability(e)},isCallable$1(NativePromiseConstructor$2)&&NativePromisePrototype$1!==Object.prototype)){nativeThen=NativePromisePrototype$1.then,NATIVE_PROMISE_SUBCLASSING||defineBuiltIn$1(NativePromisePrototype$1,"then",function(e,t){var n=this;return new PromiseConstructor(function(e,t){call$6(nativeThen,n,e,t)}).then(e,t)},{unsafe:!0});try{delete NativePromisePrototype$1.constructor}catch(e){}setPrototypeOf&&setPrototypeOf(NativePromisePrototype$1,PromisePrototype)}$$6({global:!0,constructor:!0,wrap:!0,forced:FORCED_PROMISE_CONSTRUCTOR$4},{Promise:PromiseConstructor}),setToStringTag(PromiseConstructor,PROMISE,!1),setSpecies(PROMISE);var wellKnownSymbol$2=wellKnownSymbol$g,Iterators$1=iterators,ITERATOR$2=wellKnownSymbol$g("iterator"),ArrayPrototype=Array.prototype,isArrayIteratorMethod$1=function(e){return void 0!==e&&(Iterators$1.Array===e||ArrayPrototype[ITERATOR$2]===e)},classof=classof$4,getMethod$1=getMethod$3,Iterators=iterators,wellKnownSymbol$1=wellKnownSymbol$g,ITERATOR$1=wellKnownSymbol$g("iterator"),getIteratorMethod$2=function(e){if(null!=e)return getMethod$1(e,ITERATOR$1)||getMethod$1(e,"@@iterator")||Iterators[classof(e)]},call$5=functionCall,aCallable$3=aCallable$9,anObject$3=anObject$c,tryToString$1=tryToString$5,getIteratorMethod$1=getIteratorMethod$2,$TypeError$2=TypeError,getIterator$1=function(e,t){var n=arguments.length<2?getIteratorMethod$1(e):t;if(aCallable$3(n))return anObject$3(call$5(n,e));throw $TypeError$2(tryToString$1(e)+" is not iterable")},call$4=functionCall,anObject$2=anObject$c,getMethod=getMethod$3,iteratorClose$1=function(e,t,n){var r,o;anObject$2(e);try{if(!(r=getMethod(e,"return"))){if("throw"===t)throw n;return n}r=call$4(r,e)}catch(e){o=!0,r=e}if("throw"===t)throw n;if(o)throw r;return anObject$2(r),n},bind=functionBindContext,call$3=functionCall,anObject$1=anObject$c,tryToString=tryToString$5,isArrayIteratorMethod=isArrayIteratorMethod$1,lengthOfArrayLike$1=lengthOfArrayLike$5,isPrototypeOf=objectIsPrototypeOf,getIterator=getIterator$1,getIteratorMethod=getIteratorMethod$2,iteratorClose=iteratorClose$1,$TypeError$1=TypeError,Result=function(e,t){this.stopped=e,this.result=t},ResultPrototype=Result.prototype,iterate$2=function(e,t,n){function r(e){return i&&iteratorClose(i,"normal",e),new Result(!0,e)}function o(e){return d?(anObject$1(e),f?y(e[0],e[1],r):y(e[0],e[1])):f?y(e,r):y(e)}var i,a,s,l,c,p,u=n&&n.that,d=!(!n||!n.AS_ENTRIES),$=!(!n||!n.IS_RECORD),g=!(!n||!n.IS_ITERATOR),f=!(!n||!n.INTERRUPTED),y=bind(t,u);if($)i=e.iterator;else if(g)i=e;else{if(!(n=getIteratorMethod(e)))throw $TypeError$1(tryToString(e)+" is not iterable");if(isArrayIteratorMethod(n)){for(a=0,s=lengthOfArrayLike$1(e);a<s;a++)if((l=o(e[a]))&&isPrototypeOf(ResultPrototype,l))return l;return new Result(!1)}i=getIterator(e,n)}for(c=($?e:i).next;!(p=call$3(c,i)).done;){try{l=o(p.value)}catch(e){iteratorClose(i,"throw",e)}if("object"==typeof l&&l&&isPrototypeOf(ResultPrototype,l))return l}return new Result(!1)},wellKnownSymbol=wellKnownSymbol$g,ITERATOR=wellKnownSymbol$g("iterator"),SAFE_CLOSING=!1;try{var called=0,iteratorWithReturn={next:function(){return{done:!!called++}},return:function(){SAFE_CLOSING=!0}};iteratorWithReturn[ITERATOR]=function(){return this},Array.from(iteratorWithReturn,function(){throw 2})}catch(e){}var method,checkCorrectnessOfIteration$1=function(e,t){if(!t&&!SAFE_CLOSING)return!1;var n=!1;try{var r={};r[ITERATOR]=function(){return{next:function(){return{done:n=!0}}}},e(r)}catch(e){}return n},NativePromiseConstructor$1=promiseNativeConstructor,checkCorrectnessOfIteration=checkCorrectnessOfIteration$1,FORCED_PROMISE_CONSTRUCTOR$3=promiseConstructorDetection.CONSTRUCTOR,promiseStaticsIncorrectIteration=FORCED_PROMISE_CONSTRUCTOR$3||!checkCorrectnessOfIteration(function(e){NativePromiseConstructor$1.all(e).then(void 0,function(){})}),$$5=_export,call$2=functionCall,aCallable$2=aCallable$9,newPromiseCapabilityModule$2=newPromiseCapability$2,perform$1=perform$3,iterate$1=iterate$2,PROMISE_STATICS_INCORRECT_ITERATION$1=promiseStaticsIncorrectIteration,$$4=(_export({target:"Promise",stat:!0,forced:promiseStaticsIncorrectIteration},{all:function(e){var s=this,t=newPromiseCapabilityModule$2.f(s),l=t.resolve,c=t.reject,n=perform$1(function(){var r=aCallable$2(s.resolve),o=[],i=0,a=1;iterate$1(e,function(e){var t=i++,n=!1;a++,call$2(r,s,e).then(function(e){n||(n=!0,o[t]=e,--a||l(o))},c)}),--a||l(o)});return n.error&&c(n.value),t.promise}}),_export),FORCED_PROMISE_CONSTRUCTOR$2=promiseConstructorDetection.CONSTRUCTOR,NativePromiseConstructor=promiseNativeConstructor,getBuiltIn$1=getBuiltIn$8,isCallable=isCallable$l,defineBuiltIn=defineBuiltIn$6,NativePromisePrototype=NativePromiseConstructor&&NativePromiseConstructor.prototype,$$3=($$4({target:"Promise",proto:!0,forced:FORCED_PROMISE_CONSTRUCTOR$2,real:!0},{catch:function(e){return this.then(void 0,e)}}),isCallable(NativePromiseConstructor)&&(method=getBuiltIn$1("Promise").prototype.catch,NativePromisePrototype.catch!==method&&defineBuiltIn(NativePromisePrototype,"catch",method,{unsafe:!0})),_export),call$1=functionCall,aCallable$1=aCallable$9,newPromiseCapabilityModule$1=newPromiseCapability$2,perform=perform$3,iterate=iterate$2,PROMISE_STATICS_INCORRECT_ITERATION=promiseStaticsIncorrectIteration,$$2=(_export({target:"Promise",stat:!0,forced:promiseStaticsIncorrectIteration},{race:function(e){var n=this,r=newPromiseCapabilityModule$1.f(n),o=r.reject,t=perform(function(){var t=aCallable$1(n.resolve);iterate(e,function(e){call$1(t,n,e).then(r.resolve,o)})});return t.error&&o(t.value),r.promise}}),_export),call=functionCall,newPromiseCapabilityModule=newPromiseCapability$2,FORCED_PROMISE_CONSTRUCTOR$1=promiseConstructorDetection.CONSTRUCTOR,anObject=($$2({target:"Promise",stat:!0,forced:FORCED_PROMISE_CONSTRUCTOR$1},{reject:function(e){var t=newPromiseCapabilityModule.f(this);return call(t.reject,void 0,e),t.promise}}),anObject$c),isObject=isObject$8,newPromiseCapability=newPromiseCapability$2,promiseResolve$1=function(e,t){if(anObject(e),isObject(t)&&t.constructor===e)return t;e=newPromiseCapability.f(e);return(0,e.resolve)(t),e.promise},$$1=_export,getBuiltIn=getBuiltIn$8,FORCED_PROMISE_CONSTRUCTOR=promiseConstructorDetection.CONSTRUCTOR,promiseResolve=promiseResolve$1;function fetchOrgsApplications(n,r){return __awaiter(this,void 0,void 0,function*(){var e="fetchOrgsApplications",t="applications";return(yield baseGraphQLApiWithError(Object.assign({query:`
2
- query ${e} ${`($owned: Boolean $limit: Int${n?" $status: ApplicationStatus":""})`}{
3
- ${t} ${`(owned: $owned limit: $limit${n?" status: $status":""})`} {
4
- records {
5
- id
6
- name
7
- description
8
- iconUrl
9
- isPublic
10
- ownerOrganizationId
11
- status
12
- }
13
- }
14
- }
15
- `,variables:{owned:!1,limit:100,status:n||void 0},operationName:e},r)))[t]})}getBuiltIn("Promise"),$$1({target:"Promise",stat:!0,forced:FORCED_PROMISE_CONSTRUCTOR},{resolve:function(e){return promiseResolve(this,e)}});const fetchAllApplications=(n,r)=>__awaiter(void 0,void 0,void 0,function*(){try{const e=yield fetch(n+"/v1/admin/applications?allActive=true&limit=99999&offset=0",{method:"GET",headers:Object.assign({"Content-Type":"application/json"},r&&{Authorization:"Bearer "+r}),credentials:"include"}),t=yield e.json();return t.records=t.results.map(e=>Object.assign({name:e.applicationName,iconUrl:e.applicationIconUrl,id:e.applicationId,isPublic:e.public,description:e.applicationDescription},e)),t}catch(e){throw console.error(e),new Error("Something went wrong while loading apps")}});function*fetchInstalledAppsSaga(){try{const e=yield fetchOrgsApplications("active",yield select(selectApiConfigs));e.records=e.records.sort((e,t)=>e.name.localeCompare(t.name)),yield put(actions.adminCenterApplications.fetchInstalledApplicationsSuccess(e.records))}catch(e){yield put(actions.adminCenterApplications.fetchInstalledApplicationsFailure()),console.log(e)}}function*fetchAllAppsSaga(){try{var e=yield select(selectApiConfigs),t=yield fetchAllApplications(e.apiRoot,e.token);yield put(actions.adminCenterApplications.fetchAllApplicationsSuccess(t.records))}catch(e){yield put(actions.adminCenterApplications.fetchAllApplicationsFailure()),console.log(e)}}function*getInstalledAppsWatcher(){yield takeEvery$1(actions.adminCenterApplications.fetchInstalledApplicationsStart.type,fetchInstalledAppsSaga)}function*getAllAppsWatcher(){yield takeEvery$1(actions.adminCenterApplications.fetchAllApplicationsStart.type,fetchAllAppsSaga)}function*rootSaga(){yield all([getInstalledAppsWatcher(),getAllAppsWatcher()])}const appDetailsResponseFields=`records {
16
- id
17
- name
18
- description
19
- status
20
- iconUrl
21
- isPublic
22
- applicationConfig {
23
- records {
24
- configKey
25
- configType
26
- description
27
- value
28
- valueJSON
29
- configLevel
30
- required
31
- secured
32
- }
33
- }
34
- entityTags {
35
- tagKey
36
- tagValue
37
- }
38
- ownerOrganizationId
39
- }`;function getApplicationById(o,i){return __awaiter(this,void 0,void 0,function*(){var e="getApplicationById",t="applications",n={id:i},r=`
40
- query ${e} ($id: ID!){
41
- ${t} (owned: false, id: $id) {
42
- ${appDetailsResponseFields}
43
- }
44
- }
45
- `;try{return(yield baseGraphQLApiWithError(Object.assign({query:r,operationName:e,variables:n},o)))[t]}catch(e){throw console.log(e),new Error("Something went wrong while loading app details")}})}function getOrganizationName(n,r){return __awaiter(this,void 0,void 0,function*(){var e="getOrganizationName",t={id:r};try{return yield baseGraphQLApiWithError(Object.assign({query:"\n query getOrganizationName ($id: ID!){\n organization (id: $id) {\n id\n name\n }\n }\n ",operationName:e,variables:t},n))}catch(e){console.log(e)}})}function installApp(n,r){return __awaiter(this,void 0,void 0,function*(){var e="installApp",t=`
46
- query ${e} ($orgId: ID! $appId: ID! $configs: [ApplicationConfigInput!]) {
47
- applicationAddToOrg (orgId: $orgId appId: $appId configs: $configs) {
48
- ${appDetailsResponseFields}
49
- }
50
- }
51
- `;try{return yield baseGraphQLApiWithError(Object.assign({query:t,operationName:e,variables:r},n))}catch(e){console.log(e)}})}function*fetchOwnerOrganization(e,t){let n={};try{var r=(yield call$g(getOrganizationName,e,t))["organization"];n=r}catch(e){n={id:t,name:" "},console.log(e)}return n}function*fetchApplicationDetailsSaga(e){try{var t=yield select(selectApiConfigs),[n]=(yield call$g(getApplicationById,t,e.payload.applicationId)).records,r=yield call$g(fetchOwnerOrganization,t,n.ownerOrganizationId);yield put(actions$1.fetchApplicationSuccess({application:n,organization:r}))}catch(e){yield put(actions$1.fetchApplicationError()),console.log(e)}}function*installAppSaga(e){try{var t=yield select(selectApiConfigs),[n]=(yield call$g(installApp,t,e.payload)).records;yield put(actions$1.installAppSuccess(n))}catch(e){yield put(actions$1.installAppFailure()),console.log(e)}}function*getApplicationDetailsWatcher(){yield takeEvery$1(actions$1.fetchApplicationStart.type,fetchApplicationDetailsSaga)}function*installAppWatcher(){yield takeEvery$1(actions$1.installAppStart.type,installAppSaga)}function*applicationDetailsPanelRootSaga(){yield all([getApplicationDetailsWatcher(),installAppWatcher()])}function getAdminCenterApplicationsModule(){return{id:SLICE_NAME$1,reducerMap:{[SLICE_NAME$1]:rootReducer},sagas:[rootSaga],initialActions:[]}}function getApplicationDetailsPanelModule(){return{id:SLICE_NAME,reducerMap:{[SLICE_NAME]:applicationDetailsPanelReducer},sagas:[applicationDetailsPanelRootSaga],initialActions:[]}}const tabsList$1=[{label:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-applications.lpZXMd",defaultMessage:"All Applications",description:"Admin center all applications label"}),disabled:!1,id:"All Applications"},{label:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-applications.lpZXMy",defaultMessage:"Installed Applications",description:"Admin center installed applications label"}),disabled:!1,id:"Installed Applications"}],ApplicationsTable=()=>{const[r,t]=react.exports.useState(0),[o,i]=react.exports.useState(["",""]),[e,a]=react.exports.useState([]),[n,s]=react.exports.useState([]),l=useSelector(selectIsUserAdmin),c=useSelector(selectInstalledApps),p=useSelector(selectAllApps);var u=useSelector(selectInstalledAppsUiStatus),d=useSelector(selectAllAppsUiStatus);const $=useDispatch(),g=useIntl();var f=g.formatMessage({id:"os-admin-center-panel.applications.search.label",defaultMessage:[{type:0,value:"Search App Name"}]});react.exports.useEffect(()=>{a(p)},[p]),react.exports.useEffect(()=>{s(c)},[c]),react.exports.useEffect(()=>{$(actions.adminCenterApplications.fetchInstalledApplicationsStart()),l&&$(actions.adminCenterApplications.fetchAllApplicationsStart())},[$]);return jsxRuntime.exports.jsxs(React.Fragment,{children:[jsxRuntime.exports.jsxs(Box$1,Object.assign({sx:{borderBottom:"1px solid #e8e8e8",display:"flex",flexDirection:"row",justifyContent:"space-between",alignItems:"center"}},{children:[jsxRuntime.exports.jsx(Box$1,Object.assign({sx:{"& .Sdk-MuiTab-root.Mui-selected":{color:"text.primary",fontWeight:600},width:l?"350px":"180px"}},{children:jsxRuntime.exports.jsx(CustomTabs,{selectedId:r,onChangeTab:e=>{t(e)},tabsList:l?tabsList$1:[tabsList$1[1]]})})),jsxRuntime.exports.jsx(Box$1,Object.assign({sx:{width:"190px",mr:6}},{children:jsxRuntime.exports.jsx(TextField,{sx:{"& fieldset":{borderRadius:"20px"},"& .Sdk-MuiInputBase-root":{height:"30px"}},size:"small",fullWidth:!0,id:"outlined-basic","data-testid":"admin-center-applications-search-app-name-input",variant:"outlined",value:o[r],onChange:e=>{const t=e.target.value,n=o;if(n[r]=t,i(n),!l)return e=c.filter(e=>e.name.toLowerCase().includes(t.toLowerCase())),void s(e);0===r?(e=p.filter(e=>e.name.toLowerCase().includes(o[0].toLowerCase())),a(e)):(e=c.filter(e=>e.name.toLowerCase().includes(o[1].toLowerCase())),s(e))},placeholder:f,InputProps:{startAdornment:jsxRuntime.exports.jsx(InputAdornment,Object.assign({position:"start"},{children:jsxRuntime.exports.jsx(default_1,{})}))}})}))]})),jsxRuntime.exports.jsx(TabPanel,Object.assign({value:r,index:0},{children:l?jsxRuntime.exports.jsx(ApplicationList,{apps:e,uiStatus:d,onRetry:()=>$(actions.adminCenterApplications.fetchAllApplicationsStart()),showInstalledChip:!0,isAppInstalled:t=>-1!==n.findIndex(e=>e.id===t)}):jsxRuntime.exports.jsx(ApplicationList,{apps:n,uiStatus:u,onRetry:()=>$(actions.adminCenterApplications.fetchInstalledApplicationsStart())})})),jsxRuntime.exports.jsx(TabPanel,Object.assign({value:r,index:1},{children:jsxRuntime.exports.jsx(ApplicationList,{apps:n,uiStatus:u,onRetry:()=>$(actions.adminCenterApplications.fetchInstalledApplicationsStart())})}))]})},useStyles$2=makeStyles()(e=>({root:{display:"flex",flexDirection:"column",height:"100%"},header:{display:"flex",justifyContent:"space-between",padding:e.spacing(4),borderBottom:"0.5px solid "+e.palette.divider},tableWrapper:{overflow:"hidden"},toolbar:{alignItems:"baseline","& button svg":{marginRight:"5px"},display:"flex",justifyContent:"center"}}));function ApplicationsTab({}){var e=useStyles$2()["classes"];return jsxRuntime.exports.jsxs("section",Object.assign({className:e.root},{children:[jsxRuntime.exports.jsx("header",Object.assign({className:e.header},{children:jsxRuntime.exports.jsxs(Box$1,Object.assign({sx:{mr:15}},{children:[jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"h5","data-testid":"org-applications.header"},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-panel.applications.table.header",defaultMessage:"Applications",description:"Application Header"})})),jsxRuntime.exports.jsx(Typography$1,Object.assign({sx:{mt:1},variant:"subtitle1","data-testid":"org-applications.description"},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-panel.applications.table.description",defaultMessage:"Browse and manage the applications that are enabled for this Organization and its users.",description:"Applications Tab Description"})}))]}))})),jsxRuntime.exports.jsx("div",Object.assign({className:e.tableWrapper},{children:jsxRuntime.exports.jsx(ApplicationsTable,{})}))]}))}var aCallable=aCallable$9,toObject=toObject$5,IndexedObject=indexedObject,lengthOfArrayLike=lengthOfArrayLike$5,$TypeError=TypeError,createMethod=function(c){return function(e,t,n,r){aCallable(t);var o=toObject(e),i=IndexedObject(o),a=lengthOfArrayLike(o),s=c?a-1:0,l=c?-1:1;if(n<2)for(;;){if(s in i){r=i[s],s+=l;break}if(s+=l,c?s<0:a<=s)throw $TypeError("Reduce of empty array with no initial value")}for(;c?0<=s:s<a;s+=l)s in i&&(r=t(r,i[s],s,o));return r}},arrayReduce={left:createMethod(!1),right:createMethod(!0)},$=_export,$reduce=arrayReduce.left,arrayMethodIsStrict=arrayMethodIsStrict$2,CHROME_VERSION=engineV8Version,IS_NODE=engineIsNode,STRICT_METHOD=arrayMethodIsStrict$2("reduce"),CHROME_BUG=!IS_NODE&&79<CHROME_VERSION&&CHROME_VERSION<83;$({target:"Array",proto:!0,forced:!STRICT_METHOD||CHROME_BUG},{reduce:function(e){var t=arguments.length;return $reduce(this,e,t,1<t?arguments[1]:void 0)}});const useStyles$1=makeStyles()((e,{isEmpty:t})=>({panelRoot:{width:"100%"},panelLoading:{height:300},panelContainer:{display:"flex",flexDirection:"column",width:"100%",padding:e.spacing(2)},panelHeader:{display:"flex",justifyContent:"space-between",alignItems:"center",paddingLeft:e.spacing(1),marginBottom:e.spacing(1),"&.with-secondary-title":{alignItems:"flex-start"}},panelHeaderLine:{minHeight:"16px"},panelContent:{width:"100%"},panelBody:{display:"flex",flexGrow:1},divider:{marginBottom:e.spacing(2)},engineHeader:{minHeight:"120px"},headerInfo:{paddingLeft:e.spacing(4),flexGrow:1},headerOwner:{color:"#0c53b0",minHeight:"16px"},detailInfo:{paddingTop:e.spacing(3)},detailInfoBody:{paddingLeft:e.spacing(4),paddingTop:e.spacing(3)},detailOverview:{paddingTop:e.spacing(6),paddingBottom:e.spacing(6),minHeight:"120px"},sectionTitle:{paddingBottom:e.spacing(3)},textContent:{fontStyle:"normal",fontWeight:400,fontSize:14,lineHeight:20},titleInline:{fontWeight:600,marginRight:e.spacing(1)},contentRow:{paddingBottom:e.spacing(3)},engineDescription:{paddingTop:e.spacing(2),paddingBottom:e.spacing(2)},engineVersion:{paddingLeft:e.spacing(3)},mainLayout:{paddingTop:e.spacing(2)},tabPanels:{width:"100%"},detailHeaderContainer:{paddingLeft:e.spacing(3),paddingTop:e.spacing(2),alignItems:"center"},taskTabPanels:{marginTop:e.spacing(2),paddingLeft:e.spacing(2),paddingRight:e.spacing(2),width:"100%",maxHeight:"160px",maxWidth:"660px",overflow:"auto",background:"#F4F4F4",border:"1px solid #D5DFE9","box-sizing":"border-box","border-radius":"4px"},metricsList:{paddingTop:e.spacing(6)},taskFitlerContainer:{marginTop:e.spacing(4),marginBottom:e.spacing(2),height:"40px",lineHeight:"40px",display:"flex","flex-wrap":"wrap","flex-direction":"row","justify-content":"flex-end"},taskFitlerItem:{marginRight:e.spacing(2)},tabsContainer:{"& .Sdk-Mui-selected":{color:"black"},"& .Sdk-MuiTabs-indicator":{backgroundColor:"#000"}},tabsParent:{padding:e.spacing(0,3,0,3),"& div":{borderBottom:"none"},"& div button":{fontFamily:"Nunito",fontWeight:400,flex:"0 1 auto !important",minWidth:"unset"}},configName:{marginBottom:"4px"},configDescription:{marginBottom:"9px"},configContainer:{paddingLeft:"21px",marginBottom:"21px"},configDivider:{marginTop:"21px"},configInput:{"& input":{borderColor:"#E1E6ED",paddingTop:"18px",paddingBottom:"18px",minWidth:"320px"}},requiredLabel:{color:"#9CA8B4",marginLeft:"6px"},helperText:{paddingLeft:"15px",fontSize:"12px",fontWeight:"bold"},noConfigs:{textAlign:"center",marginTop:"30px","& svg":{width:"160px",height:"160px",marginBottom:"20px"}},uninstallBtn:{marginTop:t?"40px":"0",padding:"8px 15px"},actionButtons:{"& button":{padding:"8px 15px",lineHeight:"20px"},display:"flex",justifyContent:"right"},appSettingsContainer:{display:"flex",justifyContent:"space-between",flexDirection:"column",height:"calc(100vh - 55px - 250px)"}})),selectStatus=e=>{return null==(e=null==e?void 0:e[SLICE_NAME])?void 0:e.status},selectApplication=e=>{return null==(e=null==e?void 0:e[SLICE_NAME])?void 0:e.application},selectOwnerOrganization=e=>{return null==(e=null==e?void 0:e[SLICE_NAME])?void 0:e.ownerOrganization},useStyles=makeStyles()(e=>({root:{borderRadius:"50%",border:"2px solid #D5DFE9",display:"flex",justifyContent:"center",alignItems:"center",overflow:"hidden"},small:{width:e.spacing(6),height:e.spacing(6)},medium:{width:e.spacing(9),height:e.spacing(9)},large:{width:e.spacing(12),height:e.spacing(12)},xlarge:{width:e.spacing(16),height:e.spacing(16)},logo:{maxWidth:"100%",maxHeight:"100%"},veritoneLogo:{maxWidth:"75%",maxHeight:"75%"}})),Logo=({size:e="xlarge",path:t="",altText:n})=>{var r=useStyles()["classes"],[t,o]=useBackupImg(t,img$1u);return jsxRuntime.exports.jsx("div",Object.assign({className:r.root+" "+r[e]},{children:jsxRuntime.exports.jsx("img",{className:r.logo+" "+(t===img$1u&&r.veritoneLogo),src:t,alt:n,onError:o})}))},getSignedUriPath=n=>{const e=["iconUrl"].map(e=>e);return e.reduce((e,t)=>n[t]||e,void 0)},DetailHeader=({installationConfig:t})=>{const n=useSelector(selectApplication),e=useSelector(selectInstalledApps);var r=e.some(e=>e.id===(null===n||void 0===n?void 0:n.id)),o=useSelector(selectOwnerOrganization);const i=(useSelector(userSelector)||{})["organization"];var a=useStyles$1({})["classes"],s=null==(s=n.entityTags)?void 0:s.map(e=>e.tagKey).join(", "),l=getSignedUriPath(n);const c=useDispatch();return jsxRuntime.exports.jsxs(Box$1,Object.assign({display:"flex",flexDirection:"row",className:a.detailHeaderContainer,"data-testid":"application-details-header"},{children:[jsxRuntime.exports.jsx("div",{children:jsxRuntime.exports.jsx(Logo,{path:l,altText:n.name+" Logo"})}),jsxRuntime.exports.jsxs("div",Object.assign({className:a.headerInfo},{children:[jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"h1","data-testid":"application-details-header-name"},{children:n.name})),jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"caption",className:a.headerOwner,"data-testid":"application-details-header-owner"},{children:null==o?void 0:o.name})),jsxRuntime.exports.jsx(Box$1,Object.assign({display:"flex",flexDirection:"row",className:a.panelHeaderLine},{children:jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"caption"},{children:s}))}))]})),jsxRuntime.exports.jsx("div",{children:!r&&jsxRuntime.exports.jsx(Button$1,Object.assign({color:"primary",variant:"contained",onClick:()=>{var e;c(actions$1.installAppStart({appId:n.id,orgId:(null==(e=null===i||void 0===i?void 0:i.organizationId)?void 0:e.toString())||"",configs:t||[]}))}},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:"admin-center.applications.install-btn",defaultMessage:"Install App",description:"Install App button label"})}))})]}))},InfoItem=({dataTest:e,title:t,value:n})=>jsxRuntime.exports.jsxs(Grid$1,Object.assign({item:!0,xs:6},{children:[jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"caption","data-testid":`application-details-panel-detail-info-${e}-caption`},{children:t})),jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"h5","data-testid":"application-details-panel-detail-info-"+e},{children:n}))]})),BasicInfo=()=>{var e=useSelector(selectApplication),t=useStyles$1({})["classes"];return jsxRuntime.exports.jsxs(Box$1,Object.assign({"data-test":"application-details-panel-basic-info-content"},{children:[jsxRuntime.exports.jsxs(Box$1,Object.assign({className:t.detailOverview,"data-testid":"application-details-panel-overview"},{children:[jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"h3",className:t.sectionTitle},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-applications.application-detail-panel-overview-title",defaultMessage:"Overview",description:"title of the Overview section on the application details panel"})})),jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"h5"},{children:e.description}))]})),jsxRuntime.exports.jsx(Divider,{}),jsxRuntime.exports.jsxs(Box$1,Object.assign({className:t.detailInfo,"data-testid":"application-details-panel-basic-info-details"},{children:[jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"h3",className:t.sectionTitle},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-applications.application-detail-panel-basic-info-details-title",defaultMessage:"Information",description:"The title of the Information section in the application details panel basic info"})})),jsxRuntime.exports.jsxs(Grid$1,Object.assign({container:!0,spacing:4,className:t.detailInfoBody},{children:[jsxRuntime.exports.jsx(InfoItem,{dataTest:"name",title:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-applications.application-detail-panel-info-name-title",defaultMessage:"Name",description:"The title of the name field in the application details panel basic info"}),value:e.name}),jsxRuntime.exports.jsx(InfoItem,{dataTest:"app-id",title:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-applications.application-detail-panel-info-app-id-title",defaultMessage:"App ID",description:"The title of the app id field in the application details panel basic info"}),value:e.id}),jsxRuntime.exports.jsx(InfoItem,{dataTest:"tags",title:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-applications.application-detail-panel-info-tags-title",defaultMessage:"Tags",description:"The title of the tags field in the application details panel basic info"}),value:null==(t=e.entityTags)?void 0:t.map(e=>e.tagKey).join(", ")})]}))]}))]}))},formattedMessages=e=>({fieldIsRequired:e.formatMessage({id:"admin-center-applcations.application-details-panel.settings-tab.required-field-error",defaultMessage:[{type:0,value:"This field is required"}]})}),SettingsTab=({intl:e,setInstallationConfig:t})=>{const n=formattedMessages(e)["fieldIsRequired"],r=useSelector(selectApplication),[o,i]=react.exports.useState([]),[a,s]=react.exports.useState([]),[l,c]=react.exports.useState(!1),p=useStyles$1({isEmpty:0===o.length})["classes"],u=(react.exports.useEffect(()=>{var e;r&&null!=(e=null===r||void 0===r?void 0:r.applicationConfig)&&e.records&&(i(null==(e=null===r||void 0===r?void 0:r.applicationConfig)?void 0:e.records),l||(c(!0),s(null==(e=null===r||void 0===r?void 0:r.applicationConfig)?void 0:e.records)))},[r]),t=>{var e;return null==(e=o.find(e=>e.configKey===t))?void 0:e.value}),d=(n,t)=>{const r=o.findIndex(e=>e.configKey===t);-1!==r&&i(e=>{const t=[...e];e=Object.assign(Object.assign({},t[r]),{value:n});return t[r]=e,t})};const $=e=>e.required&&!u(e.configKey);return jsxRuntime.exports.jsxs(Box$1,Object.assign({"data-testid":"application-details-panel.app-settings.container",className:p.appSettingsContainer},{children:[jsxRuntime.exports.jsxs("div",{children:[jsxRuntime.exports.jsxs(Box$1,Object.assign({className:p.detailOverview,"data-test":"application-details-panel-overview"},{children:[jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"h3",className:p.sectionTitle},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-applications.application-detail-panel-app-settings-title",defaultMessage:"App Settings",description:"title of the App Settings section on the application details panel"})})),jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"h5"},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-applications.application-detail-panel-basic-info-details-title",defaultMessage:"Set your Organization settings that will be applied to all users of this application.",description:"App settings description text"})}))]})),jsxRuntime.exports.jsxs(Box$1,Object.assign({"data-test":"application-details-panel-app-settings-details"},{children:[o.length?o.map(e=>jsxRuntime.exports.jsxs("div",Object.assign({className:p.configContainer,"data-testid":"application-config-container"},{children:[jsxRuntime.exports.jsxs(Grid$1,Object.assign({container:!0},{children:[jsxRuntime.exports.jsx(Grid$1,Object.assign({item:!0},{children:jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"h3",className:p.configName},{children:e.configKey}))})),jsxRuntime.exports.jsx(Grid$1,Object.assign({item:!0},{children:jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"h3",className:p.requiredLabel},{children:e.required?jsxRuntime.exports.jsxs(jsxRuntime.exports.Fragment,{children:["(",jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-applications.application-detail-panel-app-settings.required-label",defaultMessage:"Required",description:"Required label for the app config"}),")"]}):null}))}))]})),jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"body2",className:p.configDescription},{children:e.description})),(t=>{switch(t.configType){case EConfigTypes.string:return jsxRuntime.exports.jsx(TextField,{value:u(t.configKey),onChange:e=>d(e.target.value,t.configKey),disabled:t.secured,className:p.configInput,error:$(t),label:$(t)?n:void 0});case EConfigTypes.json:return;case EConfigTypes.boolean:return jsxRuntime.exports.jsx(Switch,{checked:u(t.configKey),disabled:t.secured,onChange:e=>d(e.target.checked,t.configKey)});default:return null}})(e),jsxRuntime.exports.jsx(Divider,{className:p.configDivider})]}),e.configKey)):jsxRuntime.exports.jsxs("div",Object.assign({className:p.noConfigs},{children:[jsxRuntime.exports.jsx(NoApps,{fontSize:"large"}),jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"body2",className:p.helperText},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:"admin-center-applications.application-details.no-configs",defaultMessage:"This app does not have any configs.",description:"No Applciation configs"})}))]})),jsxRuntime.exports.jsx("div",{children:jsxRuntime.exports.jsx(Button$1,Object.assign({variant:"outlined",className:p.uninstallBtn,"data-testid":"admin-center-applications-details-uninstall-btn"},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:"admin-center-applications.application-details.uninstall-btn",defaultMessage:"Uninstall Application",description:"Uninstall Application button label"})}))})]}))]}),jsxRuntime.exports.jsxs("div",Object.assign({className:p.actionButtons},{children:[jsxRuntime.exports.jsx(Button$1,Object.assign({variant:"text",sx:{color:"black",marginRight:"15px",fontWeight:400},onClick:()=>i(a),"data-testid":"admin-center-applications-details-cancel-button"},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:"admin-center-applications.application-details.cancel-btn",defaultMessage:"Cancel",description:"Cancel button label"})})),jsxRuntime.exports.jsx(Button$1,Object.assign({variant:"contained",disabled:lodash.exports.isEqual(a,o)||!!o.find(e=>e.required&&!e.value&&"boolean"!=typeof e.value),onClick:()=>{t(o),s(o)},"data-testid":"admin-center-applications-details-save-button"},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:"admin-center-applications.application-details.save-btn",defaultMessage:"Save",description:"Save button label"})}))]}))]}))};var AppSettings=injectIntl(SettingsTab);const tabsList=[{label:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-applications.application-detail-basic-info",defaultMessage:"Basic Info",description:"the title of the Basic Info tab on the application details panel"}),disabled:!1,id:"application-details-tab-label-basic-info"}],settingsTab={label:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-applications.application-detail.app-settings",defaultMessage:"App Settings",description:"the title of the App Settings tab on the application details panel"}),disabled:!1,id:"application-details-tab-label-app-settings"},MainLayout=({setInstallationConfig:e})=>{const t=useSelector(selectApplication),[n,r]=react.exports.useState(0);var o=useStyles$1({})["classes"];const[i,a]=react.exports.useState(tabsList),[s,l]=react.exports.useState(!1);const c=()=>(null===t||void 0===t?void 0:t.status)!==EApplicationStatus.active;return react.exports.useEffect(()=>{c()||s||(l(!0),a([...i,settingsTab]))},[t]),jsxRuntime.exports.jsxs(Box$1,Object.assign({className:o.mainLayout},{children:[jsxRuntime.exports.jsx("div",Object.assign({className:o.tabsContainer,"data-testid":"application-details-panel-tabs-list"},{children:jsxRuntime.exports.jsx("div",Object.assign({className:o.tabsParent},{children:jsxRuntime.exports.jsx(CustomTabs,{selectedId:n,onChangeTab:e=>{r(e)},tabsList:i})}))})),jsxRuntime.exports.jsx(Divider,{className:o.divider}),jsxRuntime.exports.jsxs(Box$1,Object.assign({className:o.tabPanels},{children:[jsxRuntime.exports.jsx(TabPanel,Object.assign({value:n,index:0},{children:jsxRuntime.exports.jsx(BasicInfo,{})})),!c()&&jsxRuntime.exports.jsx(TabPanel,Object.assign({value:n,index:1},{children:jsxRuntime.exports.jsx(AppSettings,{setInstallationConfig:e})}))]}))]}))},Content=({applicationId:e,initValue:t})=>{var n=useSelector(selectStatus);const r=useDispatch();var o=useStyles$1({})["classes"],[i,a]=(react.exports.useEffect(()=>{e?r(actions$1.fetchApplicationStart({applicationId:e,initValue:t})):t&&r(actions$1.setInitialApplicationValue(t))},[r,e,t]),react.exports.useState([]));return n===Status.loading&&jsxRuntime.exports.jsxs(Container,Object.assign({className:o.panelLoading},{children:[jsxRuntime.exports.jsx(Skeleton$1,{variant:"rectangular",animation:"wave",width:400,height:200}),jsxRuntime.exports.jsx(Divider,{sx:{my:2}}),jsxRuntime.exports.jsx(Skeleton$1,{variant:"rectangular",animation:"wave",width:960,height:300})]}))||n===Status.success&&jsxRuntime.exports.jsxs(Container,Object.assign({className:o.panelContent},{children:[jsxRuntime.exports.jsx(DetailHeader,{installationConfig:i}),jsxRuntime.exports.jsx(MainLayout,{setInstallationConfig:a})]}))||n===Status.failure&&jsxRuntime.exports.jsx(Container,{children:jsxRuntime.exports.jsx(ErrorState,{onRetry:()=>{r(actions$1.fetchApplicationStart({applicationId:e,initValue:t}))},errorMessage:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-applications.application-details-panel-error-message",defaultMessage:"Something went wrong while loading your application details.",description:"error message shown when the application details panel encounters a load error"})})})||jsxRuntime.exports.jsx(Container,{children:"Please wait..."})},PanelContainer=({children:e})=>{const t=useDispatch();var n=useStyles$1({})["classes"];return jsxRuntime.exports.jsx("div",Object.assign({className:n.panelRoot,"data-testid":"application-details-panel"},{children:jsxRuntime.exports.jsxs("div",Object.assign({className:n.panelContainer},{children:[jsxRuntime.exports.jsxs("div",Object.assign({className:n.panelHeader},{children:[jsxRuntime.exports.jsx(Typography$1,Object.assign({"data-testid":"application-details-panel-title",variant:"h1"},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-applications.detail-panel-title",defaultMessage:"Application Details",description:"The title of the Application Details panel"})})),jsxRuntime.exports.jsx(Tooltip,Object.assign({title:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-applications.detail-panel-close",defaultMessage:"Close Panel",description:"The title of the Application Details panel close button"})},{children:jsxRuntime.exports.jsx(IconButton,Object.assign({onClick:()=>{t(hidePanel("APPLICATION_DETAILS_PANEL"))},"aria-labelledby":"group-details-close-panel","data-testid":"group-details-close-panel",size:"large"},{children:jsxRuntime.exports.jsx(Hide,{})}))}))]})),jsxRuntime.exports.jsx("div",Object.assign({className:n.panelBody},{children:e}))]}))}))},ApplicationDetailsPanel=({applicationId:e,initValue:t})=>jsxRuntime.exports.jsx(AIWareThemeProvider,{children:jsxRuntime.exports.jsx(lib.DynamicModuleLoader,Object.assign({modules:[getApplicationDetailsPanelModule()]},{children:jsxRuntime.exports.jsx(AIWareIntlProvider,{children:jsxRuntime.exports.jsx(CacheProvider,Object.assign({value:muiCache},{children:jsxRuntime.exports.jsx(PanelContainer,{children:jsxRuntime.exports.jsx(Content,{applicationId:e,initValue:t})})}))})}))});export{ApplicationDetailsPanel,ApplicationsTab,Content,PanelContainer,actions,getAdminCenterApplicationsModule,getApplicationDetailsPanelModule,initialState,namespace,rootReducer};
1
+ import{z as createSvgIcon,C as interopRequireDefault,j as jsxRuntime}from"./js-core.esm.js";var Delete={},_interopRequireDefault=interopRequireDefault.exports,default_1=(Object.defineProperty(Delete,"__esModule",{value:!0}),Delete.default=void 0),_createSvgIcon=_interopRequireDefault(createSvgIcon),_jsxRuntime=jsxRuntime.exports,_default=(0,_createSvgIcon.default)((0,_jsxRuntime.jsx)("path",{d:"M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6v12zM19 4h-3.5l-1-1h-5l-1 1H5v2h14V4z"}),"Delete"),default_1=Delete.default=_default;export{default_1 as d};