aiware-js 2.23.0 → 2.25.1
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/index.esm.css +300 -0
- package/index.esm.js +1 -1
- package/js-core.esm.js +5 -5
- package/js-core.esm12.js +1 -1
- package/js-core.esm13.js +1 -1
- package/js-core.esm14.js +1 -1
- package/js-core.esm15.js +1 -1
- package/js-core.esm16.js +1 -1
- package/js-core.esm17.js +1 -1
- package/js-core.esm18.js +1 -230
- package/js-core.esm19.js +1 -78
- package/js-core.esm20.js +230 -1
- package/js-core.esm21.js +78 -1
- package/js-core.esm22.js +1 -1
- package/js-core.esm23.js +1 -1
- package/js-core.esm24.js +1 -1
- package/js-core.esm25.js +1 -1
- package/js-core.esm26.js +1 -1
- package/js-core.esm27.js +1 -1
- package/js-core.esm28.js +1 -1
- package/js-core.esm29.js +1 -1
- package/js-core.esm30.js +1 -14
- package/js-core.esm31.js +1 -12
- package/js-core.esm32.js +7 -47
- package/js-core.esm33.js +12 -1
- package/js-core.esm34.js +54 -1
- package/js-core.esm35.js +1 -108
- package/js-core.esm36.js +1 -1
- package/js-core.esm37.js +92 -198
- package/js-core.esm38.js +1 -1
- package/js-core.esm39.js +214 -1
- package/js-core.esm40.js +1 -37
- package/js-core.esm41.js +1 -1
- package/js-core.esm42.js +1 -1
- package/js-core.esm43.js +37 -1
- package/js-core.esm44.js +1 -1
- package/js-core.esm45.js +1 -31
- package/js-core.esm46.js +1 -32
- package/js-core.esm47.js +1 -53
- package/js-core.esm48.js +31 -1
- package/js-core.esm49.js +27 -115
- package/js-core.esm5.js +1 -1
- package/js-core.esm50.js +73 -75
- package/js-core.esm51.js +1 -1
- package/js-core.esm52.js +131 -14
- package/js-core.esm53.js +87 -0
- package/js-core.esm54.js +1 -0
- package/js-core.esm55.js +15 -0
- package/js-core.esm56.js +10 -0
- package/js-core.esm7.js +4 -4
- package/js-core.umd.css +392 -92
- package/js-core.umd.js +195 -142
- package/locales/en.json +1 -1
- package/locales/es.json +1 -1
- package/locales/fr.json +1 -1
- package/package.json +4 -2
package/js-core.esm49.js
CHANGED
|
@@ -1,120 +1,32 @@
|
|
|
1
|
-
import{a as generateUtilityClasses,g as generateUtilityClass,b as styled,_ as _extends$1,r as react,u as useThemeProps,e as _objectWithoutPropertiesLoose,T as Typography,j as jsxRuntime,f as clsx,h as composeClasses,z as createSvgIcon,C as interopRequireDefault,H as createSlice,p as lodash,cc as combineReducers,cd as createSelector,O as rootApiSelector,R as graphEndpointSelector,Q as sessionTokenSelector,ce as fork,dg as channel,m as makeStyles,cf as AIWareThemeProvider,K as lib,A as AIWareIntlProvider,bw as CacheProvider,bx as muiCache,i as useDispatch,k as useSelector,G as Grid,cg as Stack,F as FormattedMessage,a9 as IconButton,aY as default_1$2,v as FormControl$1,w as TextField,cm as InputAdornment,bD as CircularProgress,cl as default_1$3,aq as FormControlLabel,ar as Checkbox,a7 as Divider,af as takeLatest$1,B as Box$1,cn as unmountPanel,co as AvailableComponents,M as preferredLanguageSelector,a8 as Tooltip,ch as Close,aW as MenuItem,bJ as map_1,bK as keys_1,at as Button,bI as get_1,aF as TableRow,ft as MoreHor,dh as useIntl,bY as Radio,cp as delay,ah as put,ai as select,ak as call,bV as showMessage,bW as MessageSeverity,cq as mountPanel,a2 as all,dn as ProgressStepper,b4 as AIWareFormatMessage,d7 as take,cH as Collapse,cz as img$1u,cB as baseGraphQLApiWithError,dr as sdkEventManager,ds as SdkEvents,dt as SdkError,ap as FormGroup,an as FormLabel,gc as Copy,gd as ArrowForward,S as Switch,x as classNames,bB as isEmpty_1,dy as guid}from"./js-core.esm.js";import{s as set_1,c as InputText,e as InputSelect,S as SchemaOrText,f as InputCheckbox,g as InputRadioGroup,H as Heading,E as EntityTags,L as ListField,h as uploadFileToS3,i as getSignedWritableUrl,o as orderBy_1,l as lowerCase_1}from"./js-core.esm19.js";import{u as useForm,F as FormProvider}from"./js-core.esm13.js";import{a as findIndex_1}from"./js-core.esm14.js";import{d as default_1$4}from"./js-core.esm39.js";import{d as default_1$5}from"./js-core.esm8.js";import{C as Card}from"./js-core.esm9.js";import{C as CardContent}from"./js-core.esm10.js";import{C as Chip$1}from"./js-core.esm26.js";import"./js-core.esm27.js";import"./js-core.esm24.js";import"./js-core.esm23.js";import"./js-core.esm20.js";import"./js-core.esm25.js";function getCardHeaderUtilityClass(e){return generateUtilityClass("MuiCardHeader",e)}const cardHeaderClasses=generateUtilityClasses("MuiCardHeader",["root","avatar","action","content","title","subheader"]);var cardHeaderClasses$1=cardHeaderClasses;const _excluded=["action","avatar","className","component","disableTypography","subheader","subheaderTypographyProps","title","titleTypographyProps"],useUtilityClasses=e=>{e=e.classes;return composeClasses({root:["root"],avatar:["avatar"],action:["action"],content:["content"],title:["title"],subheader:["subheader"]},getCardHeaderUtilityClass,e)},CardHeaderRoot=styled("div",{name:"MuiCardHeader",slot:"Root",overridesResolver:(e,t)=>_extends$1({["& ."+cardHeaderClasses$1.title]:t.title,["& ."+cardHeaderClasses$1.subheader]:t.subheader},t.root)})({display:"flex",alignItems:"center",padding:16}),CardHeaderAvatar=styled("div",{name:"MuiCardHeader",slot:"Avatar",overridesResolver:(e,t)=>t.avatar})({display:"flex",flex:"0 0 auto",marginRight:16}),CardHeaderAction=styled("div",{name:"MuiCardHeader",slot:"Action",overridesResolver:(e,t)=>t.action})({flex:"0 0 auto",alignSelf:"flex-start",marginTop:-4,marginRight:-8,marginBottom:-4}),CardHeaderContent=styled("div",{name:"MuiCardHeader",slot:"Content",overridesResolver:(e,t)=>t.content})({flex:"1 1 auto"}),CardHeader=react.exports.forwardRef(function(e,t){var e=useThemeProps({props:e,name:"MuiCardHeader"}),{action:a,avatar:s,className:n,component:i="div",disableTypography:o=!1,subheader:r,subheaderTypographyProps:l,title:p,titleTypographyProps:d}=e,c=_objectWithoutPropertiesLoose(e,_excluded),e=_extends$1({},e,{component:i,disableTypography:o}),u=useUtilityClasses(e);let x=p,m=(null==x||x.type===Typography||o||(x=jsxRuntime.exports.jsx(Typography,_extends$1({variant:s?"body2":"h5",className:u.title,component:"span",display:"block"},d,{children:x}))),r);return null==m||m.type===Typography||o||(m=jsxRuntime.exports.jsx(Typography,_extends$1({variant:s?"body2":"body1",className:u.subheader,color:"text.secondary",component:"span",display:"block"},l,{children:m}))),jsxRuntime.exports.jsxs(CardHeaderRoot,_extends$1({className:clsx(u.root,n),as:i,ref:t,ownerState:e},c,{children:[s&&jsxRuntime.exports.jsx(CardHeaderAvatar,{className:u.avatar,ownerState:e,children:s}),jsxRuntime.exports.jsxs(CardHeaderContent,{className:u.content,ownerState:e,children:[x,m]}),a&&jsxRuntime.exports.jsx(CardHeaderAction,{className:u.action,ownerState:e,children:a})]}))});var LoadingStatus,ModuleRepo,ContextMenuExtensionType,UiInfo,FormStatus,FormValidations,DeploymentModel,IconImportStatus,AppConfigType,AppConfigLevel,CardHeader$1=CardHeader,VisibilityOffOutlined={},_interopRequireDefault$1=interopRequireDefault.exports,default_1$1=(Object.defineProperty(VisibilityOffOutlined,"__esModule",{value:!0}),VisibilityOffOutlined.default=void 0),_createSvgIcon$1=_interopRequireDefault$1(createSvgIcon),_jsxRuntime$1=jsxRuntime.exports,_default$1=(0,_createSvgIcon$1.default)((0,_jsxRuntime$1.jsx)("path",{d:"M12 6c3.79 0 7.17 2.13 8.82 5.5-.59 1.22-1.42 2.27-2.41 3.12l1.41 1.41c1.39-1.23 2.49-2.77 3.18-4.53C21.27 7.11 17 4 12 4c-1.27 0-2.49.2-3.64.57l1.65 1.65C10.66 6.09 11.32 6 12 6zm-1.07 1.14L13 9.21c.57.25 1.03.71 1.28 1.28l2.07 2.07c.08-.34.14-.7.14-1.07C16.5 9.01 14.48 7 12 7c-.37 0-.72.05-1.07.14zM2.01 3.87l2.68 2.68C3.06 7.83 1.77 9.53 1 11.5 2.73 15.89 7 19 12 19c1.52 0 2.98-.29 4.32-.82l3.42 3.42 1.41-1.41L3.42 2.45 2.01 3.87zm7.5 7.5 2.61 2.61c-.04.01-.08.02-.12.02-1.38 0-2.5-1.12-2.5-2.5 0-.05.01-.08.01-.13zm-3.4-3.4 1.75 1.75c-.23.55-.36 1.15-.36 1.78 0 2.48 2.02 4.5 4.5 4.5.63 0 1.23-.13 1.77-.36l.98.98c-.88.24-1.8.38-2.75.38-3.79 0-7.17-2.13-8.82-5.5.7-1.43 1.72-2.61 2.93-3.53z"}),"VisibilityOffOutlined"),default_1$1=VisibilityOffOutlined.default=_default$1,FilterList={},_interopRequireDefault=interopRequireDefault.exports,default_1=(Object.defineProperty(FilterList,"__esModule",{value:!0}),FilterList.default=void 0),_createSvgIcon=_interopRequireDefault(createSvgIcon),_jsxRuntime=jsxRuntime.exports,_default=(0,_createSvgIcon.default)((0,_jsxRuntime.jsx)("path",{d:"M10 18h4v-2h-4v2zM3 6v2h18V6H3zm3 7h12v-2H6v2z"}),"FilterList"),default_1=FilterList.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="appCenterNew";function isNpmRepoModule(e){return e.moduleRepo===ModuleRepo.NPM}function isGithubModule(e){return e.moduleRepo===ModuleRepo.Github}!function(e){e.Failed="failed",e.Idle="idle",e.Pending="pending"}(LoadingStatus=LoadingStatus||{}),function(e){e.NPM="npm",e.Github="github"}(ModuleRepo=ModuleRepo||{}),function(e){e.mention="mention",e.watchlist="watchlist",e.collection="collection",e.tdo="tdo"}(ContextMenuExtensionType=ContextMenuExtensionType||{}),function(e){e.PanelClosed="closed",e.PanelOpen="open"}(UiInfo=UiInfo||{}),function(e){e[e.Pending=0]="Pending",e[e.Submitting=1]="Submitting",e[e.Success=2]="Success",e[e.Error=3]="Error"}(FormStatus=FormStatus||{}),function(e){e.Pending="pending",e.EmptyFieldError="This field should not be empty",e.SpecialCharError="This field cannot contain special characters"}(FormValidations=FormValidations||{}),function(e){e.FullyNetworkIsolated="FullyNetworkIsolated",e.MostlyNetworkIsolated="MostlyNetworkIsolated",e.NonNetworkIsolated="NonNetworkIsolated",e.HumanReview="HumanReview"}(DeploymentModel=DeploymentModel||{}),function(e){e.Idle="idle",e.Uploading="uploading",e.Uploaded="uploaded",e.Failed="failed",e.Aborted="aborted"}(IconImportStatus=IconImportStatus||{}),function(e){e.String="String",e.Boolean="Boolean",e.Date="Date",e.Integer="Integer",e.JSON="JSON",e.Float="Float"}(AppConfigType=AppConfigType||{}),function(e){e.Organization="Organization",e.User="User"}(AppConfigLevel=AppConfigLevel||{});const namespace$7="uiState",initialState$6={status:LoadingStatus.Idle},slice$6=createSlice({name:SLICE_NAME+"/"+namespace$7,initialState:initialState$6,reducers:{}}),actions$7=slice$6.actions;var uiState=slice$6.reducer;const namespace$6="appFormState",initialState$5={app:{id:"",configFields:[],name:"",description:"",iconPath:"",url:"",headerbarEnabled:!0,aiwareHeader:{name:"",elementId:"",title:"",backgroundColor:"",zIndex:null,logoSrc:"",help:!1,notification:!1,hidePasswordReset:!1,displaySupportChat:!1},authMethod:"none",oauthUrl:"",nodeModules:[],flows:[],schemas:[],engines:[],entityTags:[]},step:[],isLoadingExistingAppData:!1,isEditForm:!1,formValidations:FormValidations.Pending,formStatus:FormStatus.Pending,uiInfo:UiInfo.PanelClosed,currentComponents:{engines:[],dataRegistries:[]}},slice$5=createSlice({name:SLICE_NAME+"/"+namespace$6,initialState:initialState$5,reducers:{createNewApp(e){e.formStatus=FormStatus.Submitting},editApp(e,t){e.isLoadingExistingAppData=!0,e.isEditForm=!0},setEditAppExistingData(e,t){e.isLoadingExistingAppData=!1,lodash.exports.merge(e.app,t.payload)},updateAppStart(e,t){e.formStatus=FormStatus.Submitting,e.isEditForm=!0},createAppStart(e,t){e.formStatus=FormStatus.Submitting},createAppSuccess(e,{payload:t}){e.formStatus=FormStatus.Success,lodash.exports.set(e.app,"id",t)},createAppFailed(e,t){e.formStatus=FormStatus.Error},stepper(e,t){e.step=t.payload},updateAppFormField(e,t){var{field:t,value:a}=t.payload;lodash.exports.set(e.app,lodash.exports.camelCase(t),a)},updateAiwareHeader(e,t){var{field:t,value:a}=t.payload;lodash.exports.set(e.app.aiwareHeader,lodash.exports.camelCase(t),a)},addConfigField(e,t){e.app.configFields=lodash.exports.concat(e.app.configFields,t.payload)},createConfigField(e,t){e.app.configFields=lodash.exports.concat(e.app.configFields,t.payload.newConfigField)},updateConfigField(e,t){var{configFields:t,index:a}=t.payload;lodash.exports.set(e,`app.configFields[${a}]`,t)},removeConfigField(e,t){e.app.configFields.splice(t.payload.removeIndex,1)},clearConfigFields(e){e.app.configFields=[]},addNodeModule(e,t){e.app.nodeModules=lodash.exports.concat(e.app.nodeModules,t.payload)},updateNodeModule(e,t){var{nodeModules:t,index:a}=t.payload;lodash.exports.set(e,`app.nodeModules[${a}]`,t)},removeNodeModule(e,t){e.app.nodeModules.splice(t.payload,1)}}}),actions$6=slice$5.actions;var appFormState=slice$5.reducer;const namespace$5="flowLinkingPanelState",initialState$4={searchTerm:"",isLoadingSearchResults:!1,sortOrder:"asc",searchResults:[]},slice$4=createSlice({name:SLICE_NAME+"/"+namespace$5,initialState:initialState$4,reducers:{searchByTerm(e,t){set_1(e,"searchTerm",t.payload)},fetchingStart(e){set_1(e,"isLoadingSearchResults",!0)},fetchingDone(e){set_1(e,"isLoadingSearchResults",!1)},toggleSortOrder(e,t){set_1(e,"sortOrder",lodash.exports.isNil(t.payload)?"asc"===e.sortOrder?"desc":"asc":t.payload)},updateFlowLinkingPanelField(e,t){var{field:t,value:a}=t.payload;set_1(e,t,a)}}}),actions$5=slice$4.actions;var flowLinkingPanelState=slice$4.reducer;const namespace$4="schemaLinkingPanelState",initialState$3={searchTerm:"",isLoadingSearchResults:!1,sortOrder:"asc",searchResults:[]},slice$3=createSlice({name:SLICE_NAME+"/"+namespace$4,initialState:initialState$3,reducers:{searchByTerm(e,t){set_1(e,"searchTerm",t.payload)},fetchingStart(e){set_1(e,"isLoadingSearchResults",!0)},fetchingDone(e){set_1(e,"isLoadingSearchResults",!1)},toggleSortOrder(e,t){set_1(e,"sortOrder",lodash.exports.isNil(t.payload)?"asc"===e.sortOrder?"desc":"asc":t.payload)},updateSchemaLinkingPanelField(e,t){var{field:t,value:a}=t.payload;set_1(e,t,a)}}}),actions$4=slice$3.actions;var schemaLinkingPanelState=slice$3.reducer;const namespace$3="engineLinkingPanelState",initialState$2={searchTerm:"",isLoadingSearchResults:!1,sortOrder:"asc",searchResults:[]},slice$2=createSlice({name:SLICE_NAME+"/"+namespace$3,initialState:initialState$2,reducers:{searchByTerm(e,t){set_1(e,"searchTerm",t.payload)},fetchingStart(e){set_1(e,"isLoadingSearchResults",!0)},fetchingDone(e){set_1(e,"isLoadingSearchResults",!1)},toggleSortOrder(e,t){set_1(e,"sortOrder",lodash.exports.isNil(t.payload)?"asc"===e.sortOrder?"desc":"asc":t.payload)},updateEngineLinkingPanelField(e,t){var{field:t,value:a}=t.payload;set_1(e,t,a)}}}),actions$3=slice$2.actions;var engineLinkingPanelState=slice$2.reducer;const namespace$2="appEventsPanelState",initialState$1={getEvents:!1,isLoadingSearchResults:!1,sortOrder:"asc",handlers:[],searchResults:[]},slice$1=createSlice({name:SLICE_NAME+"/"+namespace$2,initialState:initialState$1,reducers:{getEvents(e,t){set_1(e,"getEvents",t.payload)},fetchingStart(e){set_1(e,"isLoadingSearchResults",!0)},fetchingDone(e){set_1(e,"isLoadingSearchResults",!1)},addHandler(e,t){const a=JSON.parse(JSON.stringify(e.handlers));var{eventIds:t,eventNames:s,eventType:n,webhook:i,automateFlowName:o,automateFlowId:r}=t.payload;a.push({eventIds:t,eventNames:s,eventType:n,webhook:i,automateFlowName:o,automateFlowId:r}),set_1(e,"handlers",a)},editHandler(e,t){var{handler:t,index:a}=t.payload;set_1(e,`handlers[${a}]`,t)},deleteHandler(e,t){t=t.payload;const a=JSON.parse(JSON.stringify(e.handlers));a.splice(t,1),set_1(e,"handlers",a)},updateEventsPanelField(e,t){var{field:t,value:a}=t.payload;set_1(e,t,a)}}}),actions$2=slice$1.actions;var eventsPanelState=slice$1.reducer;const namespace$1="iconUploadState",initialState={file:null,status:IconImportStatus.Idle},slice=createSlice({name:SLICE_NAME+"/"+namespace$1,initialState:initialState,reducers:{uploadIconStart(e,{payload:t}){e.file=t.file,e.status=IconImportStatus.Uploading},updateIcon(e,{payload:t}){e.file=Object.assign(Object.assign({},e.file),t)},uploadIconSuccess(e){e.status=IconImportStatus.Uploaded},uploadIconFailed(e,{payload:t}){e.file=null,e.error=t,e.status=IconImportStatus.Failed},deleteLocalIcon(e){e.file=null}}}),actions$1=slice.actions;var iconUploadState=slice.reducer;const namespace=SLICE_NAME,actions={[namespace$7]:actions$7,[namespace$6]:actions$6,[namespace$5]:actions$5,[namespace$4]:actions$4,[namespace$3]:actions$3,[namespace$1]:actions$1,[namespace$2]:actions$2},rootReducer=combineReducers({[namespace$7]:uiState,[namespace$6]:appFormState,[namespace$3]:engineLinkingPanelState,[namespace$5]:flowLinkingPanelState,[namespace$4]:schemaLinkingPanelState,[namespace$1]:iconUploadState,[namespace$2]:eventsPanelState}),selectApp=e=>e[namespace].appFormState.app,selectIsEditForm=e=>lodash.exports.pick(e[namespace].appFormState,"isEditForm"),selectIsLoadingExistingAppData=e=>lodash.exports.pick(e[namespace].appFormState,"isLoadingExistingAppData"),selectConfigFields=e=>e[namespace].appFormState.app.configFields,selectAppUrl=e=>e[namespace].appFormState.app.url,selectNodeModules=e=>e[namespace].appFormState.app.nodeModules,selectFlowLinkingPanel=e=>e[namespace].flowLinkingPanelState,selectSchemaLinkingPanel=e=>e[namespace].schemaLinkingPanelState,selectEngineLinkingPanel=e=>e[namespace].engineLinkingPanelState,selectEventPanel=e=>e[namespace].appEventsPanelState,selectIcon=e=>e[namespace].iconUploadState.file,selectApiConfigs=createSelector([rootApiSelector,graphEndpointSelector,sessionTokenSelector],(e,t,a)=>({apiRoot:e,graphQLEndpoint:t,token:a}));function __awaiter(e,o,r,l){return new(r=r||Promise)(function(a,t){function s(e){try{i(l.next(e))}catch(e){t(e)}}function n(e){try{i(l.throw(e))}catch(e){t(e)}}function i(e){var t;e.done?a(e.value):((t=e.value)instanceof r?t:new r(function(e){e(t)})).then(s,n)}i((l=l.apply(e,o||[])).next())})}const getEnginesByName=(a,s={name:""})=>__awaiter(void 0,void 0,void 0,function*(){var e={name:s.name},t="getEngines";return yield baseGraphQLApiWithError(Object.assign({query:"\n query getEngines($name:String){\n engines(\n name: $name,\n orderBy: {\n field: name,\n direction: asc\n }\n ) {\n records {\n id\n name\n modifiedDateTime\n edgeVersion\n iconPath\n description\n category {\n id\n }\n }\n }\n }\n ",variables:e,operationName:t},a))}),getFlowsByName=(a,s={name:""})=>__awaiter(void 0,void 0,void 0,function*(){var e={name:s.name},t="getFlows";return yield baseGraphQLApiWithError(Object.assign({query:'\n query getFlows($name:String){\n engines(\n name: $name,\n categoryId: "c5458876-43d2-41e8-a340-f734702df04a",\n orderBy: {\n field: name,\n direction: asc\n }\n ) {\n records {\n id,\n name,\n modifiedDateTime,\n edgeVersion\n }\n }\n }\n ',variables:e,operationName:t},a))}),createApplication=(t,a)=>__awaiter(void 0,void 0,void 0,function*(){var e="createApplication";return(yield baseGraphQLApiWithError(Object.assign({query:"\n mutation createApplication ($input: CreateApplication!) {\n createApplication (input: $input) {\n id\n }\n }\n ",variables:{input:a},operationName:e},t)))[e]}),updateAppComponents=(o,r)=>__awaiter(void 0,void 0,void 0,function*(){const{engines:t,dataRegistries:a,id:s}=r,n="updateApplicationComponent";let i="";lodash.exports.forEach(lodash.exports.keys(t),e=>{lodash.exports.isEmpty(t[e])||(i+=`
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
1
|
+
import{bZ as createSvgIcon,j as jsxRuntime,m as makeStyles,H as createSlice,g2 as md5,cc as combineReducers,i as useDispatch,k as useSelector,eC as userSelector,r as react,B as Box$1,T as Typography,F as FormattedMessage,at as Button,g3 as AddUser,cf as AIWareThemeProvider,a2 as all,G as Grid,a7 as Divider,cq as mountPanel,d5 as takeEvery$1,fP as ErrorState,ai as select,ff as selectApiConfigs,ah as put,bC as CircularProgress,bL as Avatar,a8 as Tooltip,a9 as IconButton,cC as baseGraphQLApiWithError,fk as Popover,fl as MenuList,aW as MenuItem,g4 as Users,g5 as ApplicationTabIcon,fU as Lock,g6 as SecurityGroup,fS as Group,K as lib,A as AIWareIntlProvider,eV as panelsSelector,fs as Hamburger,ci as FullscreenExit,cj as Fullscreen,bT as Hide,fh as betaFeaturesSelector,b0 as Tabs,x as classNames,b1 as Tab,Y as Portal,ak as call$b}from"./js-core.esm.js";import{GroupsPanel,getAdminCenterGroupsModule}from"./js-core.esm43.js";import{PermissionSets,AccessControl,getAdminCenterPermissionsModule}from"./js-core.esm39.js";import{ApplicationsTab,getAdminCenterApplicationsModule}from"./js-core.esm50.js";import{organizationSelectors as organizations_selector,actions as actions$3,getOrganizationPanelModule}from"./js-core.esm33.js";import{A as AutoSizer,I as InfiniteLoader}from"./js-core.esm40.js";import{V as VariableSizeList}from"./js-core.esm27.js";import"./js-core.esm8.js";import"./js-core.esm22.js";import"./js-core.esm28.js";import"./js-core.esm44.js";import"./js-core.esm35.js";import"./js-core.esm23.js";import"./js-core.esm6.js";import"./js-core.esm9.js";import"./js-core.esm10.js";import"./js-core.esm11.js";var match,version,store,wmget,wmhas,wmset,set,get,has,STATE,activeXDocument,IteratorPrototype$2,PrototypeOfArrayIteratorPrototype,arrayIterator,MoreVert=createSvgIcon(jsxRuntime.exports.jsx("path",{d:"M12 8c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"}),"MoreVert"),commonjsGlobal=(!function(){var e={};try{if(process)return process.env=Object.assign({},process.env),Object.assign(process.env,e)}catch(e){}globalThis.process={env:e}}(),"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$f=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$i=function(e){try{return!!e()}catch(e){return!0}},fails$h=fails$i,descriptors=!fails$i(function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}),fails$g=fails$i,functionBindNative=!fails$i(function(){var e=function(){}.bind();return"function"!=typeof e||e.hasOwnProperty("prototype")}),NATIVE_BIND$2=functionBindNative,call$a=Function.prototype.call,functionCall=NATIVE_BIND$2?call$a.bind(call$a):function(){return call$a.apply(call$a,arguments)},objectPropertyIsEnumerable={},$propertyIsEnumerable={}.propertyIsEnumerable,getOwnPropertyDescriptor$1=Object.getOwnPropertyDescriptor,NASHORN_BUG=getOwnPropertyDescriptor$1&&!$propertyIsEnumerable.call({1:2},1),createPropertyDescriptor$4=(objectPropertyIsEnumerable.f=NASHORN_BUG?function(e){e=getOwnPropertyDescriptor$1(this,e);return!!e&&e.enumerable}:$propertyIsEnumerable,function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}),NATIVE_BIND$1=functionBindNative,FunctionPrototype$2=Function.prototype,bind=FunctionPrototype$2.bind,call$9=FunctionPrototype$2.call,uncurryThis$i=NATIVE_BIND$1&&bind.bind(call$9,call$9),functionUncurryThis=NATIVE_BIND$1?function(e){return e&&uncurryThis$i(e)}:function(e){return e&&function(){return call$9.apply(e,arguments)}},uncurryThis$h=functionUncurryThis,toString$7=uncurryThis$h({}.toString),stringSlice$3=uncurryThis$h("".slice),classofRaw$1=function(e){return stringSlice$3(toString$7(e),8,-1)},uncurryThis$g=functionUncurryThis,fails$f=fails$i,classof$5=classofRaw$1,$Object$4=Object,split=functionUncurryThis("".split),indexedObject=fails$f(function(){return!$Object$4("z").propertyIsEnumerable(0)})?function(e){return"String"==classof$5(e)?split(e,""):$Object$4(e)}:$Object$4,$TypeError$8=TypeError,requireObjectCoercible$5=function(e){if(null==e)throw $TypeError$8("Can't call method on "+e);return e},IndexedObject$1=indexedObject,requireObjectCoercible$4=requireObjectCoercible$5,toIndexedObject$5=function(e){return IndexedObject$1(requireObjectCoercible$4(e))},isCallable$h=function(e){return"function"==typeof e},isCallable$g=isCallable$h,isObject$6=function(e){return"object"==typeof e?null!==e:isCallable$g(e)},global$e=global$f,isCallable$f=isCallable$h,aFunction=function(e){return isCallable$f(e)?e:void 0},getBuiltIn$5=function(e,t){return arguments.length<2?aFunction(global$e[e]):global$e[e]&&global$e[e][t]},uncurryThis$f=functionUncurryThis,objectIsPrototypeOf=functionUncurryThis({}.isPrototypeOf),getBuiltIn$4=getBuiltIn$5,engineUserAgent=getBuiltIn$5("navigator","userAgent")||"",global$d=global$f,userAgent=engineUserAgent,process$1=global$d.process,Deno=global$d.Deno,versions=process$1&&process$1.versions||Deno&&Deno.version,v8=versions&&versions.v8,engineV8Version=version=!(version=v8?0<(match=v8.split("."))[0]&&match[0]<4?1:+(match[0]+match[1]):version)&&userAgent&&(!(match=userAgent.match(/Edge\/(\d+)/))||74<=match[1])&&(match=userAgent.match(/Chrome\/(\d+)/))?+match[1]:version,V8_VERSION=version,fails$e=fails$i,nativeSymbol=!!Object.getOwnPropertySymbols&&!fails$e(function(){var e=Symbol();return!String(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&V8_VERSION&&V8_VERSION<41}),NATIVE_SYMBOL$1=nativeSymbol,useSymbolAsUid=nativeSymbol&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,getBuiltIn$3=getBuiltIn$5,isCallable$e=isCallable$h,isPrototypeOf=objectIsPrototypeOf,USE_SYMBOL_AS_UID$1=useSymbolAsUid,$Object$3=Object,isSymbol$2=useSymbolAsUid?function(e){return"symbol"==typeof e}:function(e){var t=getBuiltIn$3("Symbol");return isCallable$e(t)&&isPrototypeOf(t.prototype,$Object$3(e))},$String$3=String,tryToString$2=function(e){try{return $String$3(e)}catch(e){return"Object"}},isCallable$d=isCallable$h,tryToString$1=tryToString$2,$TypeError$7=TypeError,aCallable$1=function(e){if(isCallable$d(e))return e;throw $TypeError$7(tryToString$1(e)+" is not a function")},aCallable=aCallable$1,getMethod$2=function(e,t){e=e[t];return null==e?void 0:aCallable(e)},call$8=functionCall,isCallable$c=isCallable$h,isObject$5=isObject$6,$TypeError$6=TypeError,ordinaryToPrimitive$1=function(e,t){var r,n;if("string"===t&&isCallable$c(r=e.toString)&&!isObject$5(n=call$8(r,e)))return n;if(isCallable$c(r=e.valueOf)&&!isObject$5(n=call$8(r,e)))return n;if("string"!==t&&isCallable$c(r=e.toString)&&!isObject$5(n=call$8(r,e)))return n;throw $TypeError$6("Can't convert object to primitive value")},shared$4={exports:{}},global$c=global$f,defineProperty$5=Object.defineProperty,defineGlobalProperty$3=function(t,r){try{defineProperty$5(global$c,t,{value:r,configurable:!0,writable:!0})}catch(e){global$c[t]=r}return r},global$b=global$f,defineGlobalProperty$2=defineGlobalProperty$3,SHARED="__core-js_shared__",store$3=global$f[SHARED]||defineGlobalProperty$2(SHARED,{}),sharedStore=store$3,store$2=sharedStore,requireObjectCoercible$3=((shared$4.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$5),$Object$2=Object,toObject$3=function(e){return $Object$2(requireObjectCoercible$3(e))},uncurryThis$e=functionUncurryThis,toObject$2=toObject$3,hasOwnProperty=functionUncurryThis({}.hasOwnProperty),hasOwnProperty_1=Object.hasOwn||function(e,t){return hasOwnProperty(toObject$2(e),t)},uncurryThis$d=functionUncurryThis,id=0,postfix=Math.random(),toString$6=uncurryThis$d(1..toString),uid$2=function(e){return"Symbol("+(void 0===e?"":e)+")_"+toString$6(++id+postfix,36)},global$a=global$f,shared$3=shared$4.exports,hasOwn$8=hasOwnProperty_1,uid$1=uid$2,NATIVE_SYMBOL=nativeSymbol,USE_SYMBOL_AS_UID=useSymbolAsUid,WellKnownSymbolsStore=shared$3("wks"),Symbol$2=global$a.Symbol,symbolFor=Symbol$2&&Symbol$2.for,createWellKnownSymbol=USE_SYMBOL_AS_UID?Symbol$2:Symbol$2&&Symbol$2.withoutSetter||uid$1,wellKnownSymbol$b=function(e){var t;return hasOwn$8(WellKnownSymbolsStore,e)&&(NATIVE_SYMBOL||"string"==typeof WellKnownSymbolsStore[e])||(t="Symbol."+e,NATIVE_SYMBOL&&hasOwn$8(Symbol$2,e)?WellKnownSymbolsStore[e]=Symbol$2[e]:WellKnownSymbolsStore[e]=(USE_SYMBOL_AS_UID&&symbolFor?symbolFor:createWellKnownSymbol)(t)),WellKnownSymbolsStore[e]},call$7=functionCall,isObject$4=isObject$6,isSymbol$1=isSymbol$2,getMethod$1=getMethod$2,ordinaryToPrimitive=ordinaryToPrimitive$1,wellKnownSymbol$a=wellKnownSymbol$b,$TypeError$5=TypeError,TO_PRIMITIVE=wellKnownSymbol$b("toPrimitive"),toPrimitive$1=function(e,t){if(!isObject$4(e)||isSymbol$1(e))return e;var r=getMethod$1(e,TO_PRIMITIVE);if(r){if(r=call$7(r,e,t=void 0===t?"default":t),!isObject$4(r)||isSymbol$1(r))return r;throw $TypeError$5("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$9=global$f,isObject$3=isObject$6,document$1=global$f.document,EXISTS$1=isObject$3(document$1)&&isObject$3(document$1.createElement),documentCreateElement$2=function(e){return EXISTS$1?document$1.createElement(e):{}},DESCRIPTORS$9=descriptors,fails$d=fails$i,createElement=documentCreateElement$2,ie8DomDefine=!descriptors&&!fails$i(function(){return 7!=Object.defineProperty(createElement("div"),"a",{get:function(){return 7}}).a}),DESCRIPTORS$8=descriptors,call$6=functionCall,propertyIsEnumerableModule$1=objectPropertyIsEnumerable,createPropertyDescriptor$3=createPropertyDescriptor$4,toIndexedObject$4=toIndexedObject$5,toPropertyKey$2=toPropertyKey$3,hasOwn$7=hasOwnProperty_1,IE8_DOM_DEFINE$1=ie8DomDefine,$getOwnPropertyDescriptor$1=Object.getOwnPropertyDescriptor,objectDefineProperty=(objectGetOwnPropertyDescriptor.f=DESCRIPTORS$8?$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$7(e,t))return createPropertyDescriptor$3(!call$6(propertyIsEnumerableModule$1.f,e,t),e[t])},{}),DESCRIPTORS$7=descriptors,fails$c=fails$i,v8PrototypeDefineBug=descriptors&&fails$i(function(){return 42!=Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype}),isObject$2=isObject$6,$String$2=String,$TypeError$4=TypeError,anObject$9=function(e){if(isObject$2(e))return e;throw $TypeError$4($String$2(e)+" is not an object")},DESCRIPTORS$6=descriptors,IE8_DOM_DEFINE=ie8DomDefine,V8_PROTOTYPE_DEFINE_BUG$1=v8PrototypeDefineBug,anObject$8=anObject$9,toPropertyKey$1=toPropertyKey$3,$TypeError$3=TypeError,$defineProperty=Object.defineProperty,$getOwnPropertyDescriptor=Object.getOwnPropertyDescriptor,ENUMERABLE="enumerable",CONFIGURABLE$1="configurable",WRITABLE="writable",DESCRIPTORS$5=(objectDefineProperty.f=DESCRIPTORS$6?V8_PROTOTYPE_DEFINE_BUG$1?function(e,t,r){var n;return anObject$8(e),t=toPropertyKey$1(t),anObject$8(r),"function"==typeof e&&"prototype"===t&&"value"in r&&WRITABLE in r&&!r[WRITABLE]&&((n=$getOwnPropertyDescriptor(e,t))&&n[WRITABLE]&&(e[t]=r.value,r={configurable:(CONFIGURABLE$1 in r?r:n)[CONFIGURABLE$1],enumerable:(ENUMERABLE in r?r:n)[ENUMERABLE],writable:!1})),$defineProperty(e,t,r)}:$defineProperty:function(e,t,r){if(anObject$8(e),t=toPropertyKey$1(t),anObject$8(r),IE8_DOM_DEFINE)try{return $defineProperty(e,t,r)}catch(e){}if("get"in r||"set"in r)throw $TypeError$3("Accessors not supported");return"value"in r&&(e[t]=r.value),e},descriptors),definePropertyModule$4=objectDefineProperty,createPropertyDescriptor$2=createPropertyDescriptor$4,createNonEnumerableProperty$5=DESCRIPTORS$5?function(e,t,r){return definePropertyModule$4.f(e,t,createPropertyDescriptor$2(1,r))}:function(e,t,r){return e[t]=r,e},makeBuiltIn$2={exports:{}},DESCRIPTORS$4=descriptors,hasOwn$6=hasOwnProperty_1,FunctionPrototype$1=Function.prototype,getDescriptor=DESCRIPTORS$4&&Object.getOwnPropertyDescriptor,EXISTS=hasOwn$6(FunctionPrototype$1,"name"),PROPER=EXISTS&&"something"===function(){}.name,CONFIGURABLE=EXISTS&&(!DESCRIPTORS$4||getDescriptor(FunctionPrototype$1,"name").configurable),functionName={EXISTS:EXISTS,PROPER:PROPER,CONFIGURABLE:CONFIGURABLE},uncurryThis$c=functionUncurryThis,isCallable$b=isCallable$h,store$1=sharedStore,functionToString=functionUncurryThis(Function.toString),inspectSource$3=(isCallable$b(store$1.inspectSource)||(store$1.inspectSource=function(e){return functionToString(e)}),store$1.inspectSource),global$8=global$f,isCallable$a=isCallable$h,inspectSource$2=inspectSource$3,WeakMap$1=global$f.WeakMap,nativeWeakMap=isCallable$a(WeakMap$1)&&/native code/.test(inspectSource$2(WeakMap$1)),shared$2=shared$4.exports,uid=uid$2,keys=shared$2("keys"),sharedKey$3=function(e){return keys[e]||(keys[e]=uid(e))},hiddenKeys$4={},NATIVE_WEAK_MAP=nativeWeakMap,global$7=global$f,uncurryThis$b=functionUncurryThis,isObject$1=isObject$6,createNonEnumerableProperty$4=createNonEnumerableProperty$5,hasOwn$5=hasOwnProperty_1,shared$1=sharedStore,sharedKey$2=sharedKey$3,hiddenKeys$3=hiddenKeys$4,OBJECT_ALREADY_INITIALIZED="Object already initialized",TypeError$1=global$7.TypeError,WeakMap=global$7.WeakMap,enforce=function(e){return has(e)?get(e):set(e,{})},getterFor=function(t){return function(e){if(isObject$1(e)&&(e=get(e)).type===t)return e;throw TypeError$1("Incompatible receiver, "+t+" required")}},internalState=(has=NATIVE_WEAK_MAP||shared$1.state?(store=shared$1.state||(shared$1.state=new WeakMap),wmget=uncurryThis$b(store.get),wmhas=uncurryThis$b(store.has),wmset=uncurryThis$b(store.set),set=function(e,t){if(wmhas(store,e))throw new TypeError$1(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=function(e,t){if(hasOwn$5(e,STATE))throw new TypeError$1(OBJECT_ALREADY_INITIALIZED);return t.facade=e,createNonEnumerableProperty$4(e,STATE,t),t},get=function(e){return hasOwn$5(e,STATE)?e[STATE]:{}},function(e){return hasOwn$5(e,STATE)}),{set:set,get:get,has:has,enforce:enforce,getterFor:getterFor}),fails$b=fails$i,isCallable$9=isCallable$h,hasOwn$4=hasOwnProperty_1,DESCRIPTORS$3=descriptors,CONFIGURABLE_FUNCTION_NAME$1=functionName.CONFIGURABLE,inspectSource$1=inspectSource$3,InternalStateModule$1=internalState,enforceInternalState=InternalStateModule$1.enforce,getInternalState$2=InternalStateModule$1.get,defineProperty$4=Object.defineProperty,CONFIGURABLE_LENGTH=DESCRIPTORS$3&&!fails$b(function(){return 8!==defineProperty$4(function(){},"length",{value:8}).length}),TEMPLATE=String(String).split("String"),makeBuiltIn$1=makeBuiltIn$2.exports=function(e,t,r){"Symbol("===String(t).slice(0,7)&&(t="["+String(t).replace(/^Symbol\(([^)]*)\)/,"$1")+"]"),r&&r.getter&&(t="get "+t),r&&r.setter&&(t="set "+t),(!hasOwn$4(e,"name")||CONFIGURABLE_FUNCTION_NAME$1&&e.name!==t)&&(DESCRIPTORS$3?defineProperty$4(e,"name",{value:t,configurable:!0}):e.name=t),CONFIGURABLE_LENGTH&&r&&hasOwn$4(r,"arity")&&e.length!==r.arity&&defineProperty$4(e,"length",{value:r.arity});try{r&&hasOwn$4(r,"constructor")&&r.constructor?DESCRIPTORS$3&&defineProperty$4(e,"prototype",{writable:!1}):e.prototype&&(e.prototype=void 0)}catch(e){}r=enforceInternalState(e);return hasOwn$4(r,"source")||(r.source=TEMPLATE.join("string"==typeof t?t:"")),e},isCallable$8=(Function.prototype.toString=makeBuiltIn$1(function(){return isCallable$9(this)&&getInternalState$2(this).source||inspectSource$1(this)},"toString"),isCallable$h),definePropertyModule$3=objectDefineProperty,makeBuiltIn=makeBuiltIn$2.exports,defineGlobalProperty$1=defineGlobalProperty$3,defineBuiltIn$4=function(e,t,r,n){var s=(n=n||{}).enumerable,o=void 0!==n.name?n.name:t;if(isCallable$8(r)&&makeBuiltIn(r,o,n),n.global)s?e[t]=r:defineGlobalProperty$1(t,r);else{try{n.unsafe?e[t]&&(s=!0):delete e[t]}catch(e){}s?e[t]=r:definePropertyModule$3.f(e,t,{value:r,enumerable:!1,configurable:!n.nonConfigurable,writable:!n.nonWritable})}return e},objectGetOwnPropertyNames={},ceil=Math.ceil,floor=Math.floor,mathTrunc=Math.trunc||function(e){e=+e;return(0<e?floor:ceil)(e)},trunc=mathTrunc,toIntegerOrInfinity$3=function(e){e=+e;return e!=e||0==e?0:trunc(e)},toIntegerOrInfinity$2=toIntegerOrInfinity$3,max$1=Math.max,min$2=Math.min,toAbsoluteIndex$2=function(e,t){e=toIntegerOrInfinity$2(e);return e<0?max$1(e+t,0):min$2(e,t)},toIntegerOrInfinity$1=toIntegerOrInfinity$3,min$1=Math.min,toLength$2=function(e){return 0<e?min$1(toIntegerOrInfinity$1(e),9007199254740991):0},toLength$1=toLength$2,lengthOfArrayLike$2=function(e){return toLength$1(e.length)},toIndexedObject$3=toIndexedObject$5,toAbsoluteIndex$1=toAbsoluteIndex$2,lengthOfArrayLike$1=lengthOfArrayLike$2,createMethod$2=function(a){return function(e,t,r){var n,s=toIndexedObject$3(e),o=lengthOfArrayLike$1(s),i=toAbsoluteIndex$1(r,o);if(a&&t!=t){for(;i<o;)if((n=s[i++])!=n)return!0}else for(;i<o;i++)if((a||i in s)&&s[i]===t)return a||i||0;return!a&&-1}},arrayIncludes={includes:createMethod$2(!0),indexOf:createMethod$2(!1)},uncurryThis$a=functionUncurryThis,hasOwn$3=hasOwnProperty_1,toIndexedObject$2=toIndexedObject$5,indexOf$1=arrayIncludes.indexOf,hiddenKeys$2=hiddenKeys$4,push$1=uncurryThis$a([].push),objectKeysInternal=function(e,t){var r,n=toIndexedObject$2(e),s=0,o=[];for(r in n)!hasOwn$3(hiddenKeys$2,r)&&hasOwn$3(n,r)&&push$1(o,r);for(;t.length>s;)!hasOwn$3(n,r=t[s++])||~indexOf$1(o,r)||push$1(o,r);return o},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$2=(objectGetOwnPropertySymbols.f=Object.getOwnPropertySymbols,getBuiltIn$5),uncurryThis$9=functionUncurryThis,getOwnPropertyNamesModule=objectGetOwnPropertyNames,getOwnPropertySymbolsModule$1=objectGetOwnPropertySymbols,anObject$7=anObject$9,concat$1=functionUncurryThis([].concat),ownKeys$1=getBuiltIn$2("Reflect","ownKeys")||function(e){var t=getOwnPropertyNamesModule.f(anObject$7(e)),r=getOwnPropertySymbolsModule$1.f;return r?concat$1(t,r(e)):t},hasOwn$2=hasOwnProperty_1,ownKeys=ownKeys$1,getOwnPropertyDescriptorModule=objectGetOwnPropertyDescriptor,definePropertyModule$2=objectDefineProperty,copyConstructorProperties$1=function(e,t,r){for(var n=ownKeys(t),s=definePropertyModule$2.f,o=getOwnPropertyDescriptorModule.f,i=0;i<n.length;i++){var a=n[i];hasOwn$2(e,a)||r&&hasOwn$2(r,a)||s(e,a,o(t,a))}},fails$a=fails$i,isCallable$7=isCallable$h,replacement=/#|\.prototype\./,isForced$1=function(e,t){e=data[normalize(e)];return e==POLYFILL||e!=NATIVE&&(isCallable$7(t)?fails$a(t):!!t)},normalize=isForced$1.normalize=function(e){return String(e).replace(replacement,".").toLowerCase()},data=isForced$1.data={},NATIVE=isForced$1.NATIVE="N",POLYFILL=isForced$1.POLYFILL="P",isForced_1=isForced$1,global$6=global$f,getOwnPropertyDescriptor=objectGetOwnPropertyDescriptor.f,createNonEnumerableProperty$3=createNonEnumerableProperty$5,defineBuiltIn$3=defineBuiltIn$4,defineGlobalProperty=defineGlobalProperty$3,copyConstructorProperties=copyConstructorProperties$1,isForced=isForced_1,_export=function(e,t){var r,n,s,o=e.target,i=e.global,a=e.stat,l=i?global$6:a?global$6[o]||defineGlobalProperty(o,{}):(global$6[o]||{}).prototype;if(l)for(r in t){if(n=t[r],s=e.dontCallGetSet?(s=getOwnPropertyDescriptor(l,r))&&s.value:l[r],!isForced(i?r:o+(a?".":"#")+r,e.forced)&&void 0!==s){if(typeof n==typeof s)continue;copyConstructorProperties(n,s)}(e.sham||s&&s.sham)&&createNonEnumerableProperty$3(n,"sham",!0),defineBuiltIn$3(l,r,n,e)}},internalObjectKeys=objectKeysInternal,enumBugKeys$1=enumBugKeys$3,objectKeys$2=Object.keys||function(e){return internalObjectKeys(e,enumBugKeys$1)},DESCRIPTORS$2=descriptors,uncurryThis$8=functionUncurryThis,call$5=functionCall,fails$9=fails$i,objectKeys$1=objectKeys$2,getOwnPropertySymbolsModule=objectGetOwnPropertySymbols,propertyIsEnumerableModule=objectPropertyIsEnumerable,toObject$1=toObject$3,IndexedObject=indexedObject,$assign=Object.assign,defineProperty$3=Object.defineProperty,concat=uncurryThis$8([].concat),objectAssign=!$assign||fails$9(function(){if(DESCRIPTORS$2&&1!==$assign({b:1},$assign(defineProperty$3({},"a",{enumerable:!0,get:function(){defineProperty$3(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var e={},t={},r=Symbol(),n="abcdefghijklmnopqrst";return e[r]=7,n.split("").forEach(function(e){t[e]=e}),7!=$assign({},e)[r]||objectKeys$1($assign({},t)).join("")!=n})?function(e,t){for(var r=toObject$1(e),n=arguments.length,s=1,o=getOwnPropertySymbolsModule.f,i=propertyIsEnumerableModule.f;s<n;)for(var a,l=IndexedObject(arguments[s++]),c=o?concat(objectKeys$1(l),o(l)):objectKeys$1(l),u=c.length,p=0;p<u;)a=c[p++],DESCRIPTORS$2&&!call$5(i,l,a)||(r[a]=l[a]);return r}:$assign,$$3=_export,assign=objectAssign,wellKnownSymbol$9=(_export({target:"Object",stat:!0,arity:2,forced:Object.assign!==assign},{assign:assign}),wellKnownSymbol$b),TO_STRING_TAG$3=wellKnownSymbol$b("toStringTag"),test={},toStringTagSupport=(test[TO_STRING_TAG$3]="z","[object z]"===String(test)),TO_STRING_TAG_SUPPORT=toStringTagSupport,isCallable$6=isCallable$h,classofRaw=classofRaw$1,wellKnownSymbol$8=wellKnownSymbol$b,TO_STRING_TAG$2=wellKnownSymbol$b("toStringTag"),$Object$1=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$1(e),TO_STRING_TAG$2))?t:CORRECT_ARGUMENTS?classofRaw(e):"Object"==(t=classofRaw(e))&&isCallable$6(e.callee)?"Arguments":t},classof$3=classof$4,$String$1=String,toString$5=function(e){if("Symbol"===classof$3(e))throw TypeError("Cannot convert a Symbol value to a string");return $String$1(e)},anObject$6=anObject$9,regexpFlags$1=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},fails$8=fails$i,global$5=global$f,$RegExp$2=global$f.RegExp,UNSUPPORTED_Y$2=fails$8(function(){var e=$RegExp$2("a","y");return e.lastIndex=2,null!=e.exec("abcd")}),MISSED_STICKY=UNSUPPORTED_Y$2||fails$8(function(){return!$RegExp$2("a","y").sticky}),BROKEN_CARET=UNSUPPORTED_Y$2||fails$8(function(){var e=$RegExp$2("^r","gy");return e.lastIndex=2,null!=e.exec("str")}),regexpStickyHelpers={BROKEN_CARET:BROKEN_CARET,MISSED_STICKY:MISSED_STICKY,UNSUPPORTED_Y:UNSUPPORTED_Y$2},objectDefineProperties={},DESCRIPTORS$1=descriptors,V8_PROTOTYPE_DEFINE_BUG=v8PrototypeDefineBug,definePropertyModule$1=objectDefineProperty,anObject$5=anObject$9,toIndexedObject$1=toIndexedObject$5,objectKeys=objectKeys$2,getBuiltIn$1=(objectDefineProperties.f=DESCRIPTORS$1&&!V8_PROTOTYPE_DEFINE_BUG?Object.defineProperties:function(e,t){anObject$5(e);for(var r,n=toIndexedObject$1(t),s=objectKeys(t),o=s.length,i=0;i<o;)definePropertyModule$1.f(e,r=s[i++],n[r]);return e},getBuiltIn$5),html$1=getBuiltIn$5("document","documentElement"),anObject$4=anObject$9,definePropertiesModule=objectDefineProperties,enumBugKeys=enumBugKeys$3,hiddenKeys=hiddenKeys$4,html=html$1,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.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 r;return null!==e?(EmptyConstructor[PROTOTYPE]=anObject$4(e),r=new EmptyConstructor,EmptyConstructor[PROTOTYPE]=null,r[IE_PROTO$1]=e):r=NullProtoObject(),void 0===t?r:definePropertiesModule.f(r,t)}),fails$7=fails$i,global$4=global$f,$RegExp$1=global$f.RegExp,regexpUnsupportedDotAll=fails$7(function(){var e=$RegExp$1(".","s");return!(e.dotAll&&e.exec("\n")&&"s"===e.flags)}),fails$6=fails$i,global$3=global$f,$RegExp=global$f.RegExp,regexpUnsupportedNcg=fails$6(function(){var e=$RegExp("(?<a>b)","g");return"b"!==e.exec("b").groups.a||"bc"!=="b".replace(e,"$<a>c")}),call$4=functionCall,uncurryThis$7=functionUncurryThis,toString$4=toString$5,regexpFlags=regexpFlags$1,stickyHelpers$1=regexpStickyHelpers,shared=shared$4.exports,create$2=objectCreate,getInternalState$1=internalState.get,UNSUPPORTED_DOT_ALL=regexpUnsupportedDotAll,UNSUPPORTED_NCG=regexpUnsupportedNcg,nativeReplace=shared("native-string-replace",String.prototype.replace),nativeExec=RegExp.prototype.exec,patchedExec=nativeExec,charAt$2=uncurryThis$7("".charAt),indexOf=uncurryThis$7("".indexOf),replace$1=uncurryThis$7("".replace),stringSlice$2=uncurryThis$7("".slice),UPDATES_LAST_INDEX_WRONG=function(){var e=/a/,t=/b*/g;return call$4(nativeExec,e,"a"),call$4(nativeExec,t,"a"),0!==e.lastIndex||0!==t.lastIndex}(),UNSUPPORTED_Y$1=stickyHelpers$1.BROKEN_CARET,NPCG_INCLUDED=void 0!==/()??/.exec("")[1],PATCH=UPDATES_LAST_INDEX_WRONG||NPCG_INCLUDED||UNSUPPORTED_Y$1||UNSUPPORTED_DOT_ALL||UNSUPPORTED_NCG,regexpExec$3=patchedExec=PATCH?function(e){var t,r,n,s,o,i,a=this,l=getInternalState$1(a),e=toString$4(e),c=l.raw;if(c)return c.lastIndex=a.lastIndex,p=call$4(patchedExec,c,e),a.lastIndex=c.lastIndex,p;var u=l.groups,c=UNSUPPORTED_Y$1&&a.sticky,p=call$4(regexpFlags,a),l=a.source,d=0,$=e;if(c&&(p=replace$1(p,"y",""),-1===indexOf(p,"g")&&(p+="g"),$=stringSlice$2(e,a.lastIndex),0<a.lastIndex&&(!a.multiline||a.multiline&&"\n"!==charAt$2(e,a.lastIndex-1))&&(l="(?: "+l+")",$=" "+$,d++),t=new RegExp("^(?:"+l+")",p)),NPCG_INCLUDED&&(t=new RegExp("^"+l+"$(?!\\s)",p)),UPDATES_LAST_INDEX_WRONG&&(r=a.lastIndex),n=call$4(nativeExec,c?t:a,$),c?n?(n.input=stringSlice$2(n.input,d),n[0]=stringSlice$2(n[0],d),n.index=a.lastIndex,a.lastIndex+=n[0].length):a.lastIndex=0:UPDATES_LAST_INDEX_WRONG&&n&&(a.lastIndex=a.global?n.index+n[0].length:r),NPCG_INCLUDED&&n&&1<n.length&&call$4(nativeReplace,n[0],t,function(){for(s=1;s<arguments.length-2;s++)void 0===arguments[s]&&(n[s]=void 0)}),n&&u)for(n.groups=o=create$2(null),s=0;s<u.length;s++)o[(i=u[s])[0]]=n[i[1]];return n}:patchedExec,$$2=_export,exec$3=regexpExec$3,NATIVE_BIND=(_export({target:"RegExp",proto:!0,forced:/./.exec!==exec$3},{exec:exec$3}),functionBindNative),FunctionPrototype=Function.prototype,apply$1=FunctionPrototype.apply,call$3=FunctionPrototype.call,functionApply="object"==typeof Reflect&&Reflect.apply||(NATIVE_BIND?call$3.bind(apply$1):function(){return call$3.apply(apply$1,arguments)}),uncurryThis$6=functionUncurryThis,defineBuiltIn$2=defineBuiltIn$4,regexpExec$2=regexpExec$3,fails$5=fails$i,wellKnownSymbol$7=wellKnownSymbol$b,createNonEnumerableProperty$2=createNonEnumerableProperty$5,SPECIES$1=wellKnownSymbol$7("species"),RegExpPrototype=RegExp.prototype,fixRegexpWellKnownSymbolLogic=function(r,e,t,n){var i,s=wellKnownSymbol$7(r),a=!fails$5(function(){var e={};return e[s]=function(){return 7},7!=""[r](e)}),o=a&&!fails$5(function(){var e=!1,t=/a/;return"split"===r&&((t={constructor:{}}).constructor[SPECIES$1]=function(){return t},t.flags="",t[s]=/./[s]),t.exec=function(){return e=!0,null},t[s](""),!e});a&&o&&!t||(i=uncurryThis$6(/./[s]),o=e(s,""[r],function(e,t,r,n,s){var e=uncurryThis$6(e),o=t.exec;return o===regexpExec$2||o===RegExpPrototype.exec?a&&!s?{done:!0,value:i(t,r,n)}:{done:!0,value:e(r,t,n)}:{done:!1}}),defineBuiltIn$2(String.prototype,r,o[0]),defineBuiltIn$2(RegExpPrototype,s,o[1])),n&&createNonEnumerableProperty$2(RegExpPrototype[s],"sham",!0)},isObject=isObject$6,classof$2=classofRaw$1,wellKnownSymbol$6=wellKnownSymbol$b,MATCH=wellKnownSymbol$b("match"),isRegexp=function(e){var t;return isObject(e)&&(void 0!==(t=e[MATCH])?!!t:"RegExp"==classof$2(e))},uncurryThis$5=functionUncurryThis,fails$4=fails$i,isCallable$5=isCallable$h,classof$1=classof$4,getBuiltIn=getBuiltIn$5,inspectSource=inspectSource$3,noop=function(){},empty=[],construct=getBuiltIn$5("Reflect","construct"),constructorRegExp=/^\s*(?:class|function)\b/,exec$2=uncurryThis$5(constructorRegExp.exec),INCORRECT_TO_STRING=!constructorRegExp.exec(noop),isConstructorModern=function(e){if(!isCallable$5(e))return!1;try{return construct(noop,empty,e),!0}catch(e){return!1}},isConstructorLegacy=function(e){if(!isCallable$5(e))return!1;switch(classof$1(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return INCORRECT_TO_STRING||!!exec$2(constructorRegExp,inspectSource(e))}catch(e){return!0}},isConstructor$1=(isConstructorLegacy.sham=!0,!construct||fails$4(function(){var e;return isConstructorModern(isConstructorModern.call)||!isConstructorModern(Object)||!isConstructorModern(function(){e=!0})||e})?isConstructorLegacy:isConstructorModern),isConstructor=isConstructor$1,tryToString=tryToString$2,$TypeError$2=TypeError,aConstructor$1=function(e){if(isConstructor(e))return e;throw $TypeError$2(tryToString(e)+" is not a constructor")},anObject$3=anObject$9,aConstructor=aConstructor$1,wellKnownSymbol$5=wellKnownSymbol$b,SPECIES=wellKnownSymbol$b("species"),speciesConstructor$1=function(e,t){var e=anObject$3(e).constructor;return void 0===e||null==(e=anObject$3(e)[SPECIES])?t:aConstructor(e)},uncurryThis$4=functionUncurryThis,toIntegerOrInfinity=toIntegerOrInfinity$3,toString$3=toString$5,requireObjectCoercible$2=requireObjectCoercible$5,charAt$1=uncurryThis$4("".charAt),charCodeAt=uncurryThis$4("".charCodeAt),stringSlice$1=uncurryThis$4("".slice),createMethod$1=function(s){return function(e,t){var r,e=toString$3(requireObjectCoercible$2(e)),t=toIntegerOrInfinity(t),n=e.length;return t<0||n<=t?s?"":void 0:(r=charCodeAt(e,t))<55296||56319<r||t+1===n||(n=charCodeAt(e,t+1))<56320||57343<n?s?charAt$1(e,t):r:s?stringSlice$1(e,t,t+2):n-56320+(r-55296<<10)+65536}},stringMultibyte={codeAt:createMethod$1(!1),charAt:createMethod$1(!0)},charAt=stringMultibyte.charAt,advanceStringIndex$1=function(e,t,r){return t+(r?charAt(e,t).length:1)},toPropertyKey=toPropertyKey$3,definePropertyModule=objectDefineProperty,createPropertyDescriptor$1=createPropertyDescriptor$4,createProperty$1=function(e,t,r){t=toPropertyKey(t);t in e?definePropertyModule.f(e,t,createPropertyDescriptor$1(0,r)):e[t]=r},toAbsoluteIndex=toAbsoluteIndex$2,lengthOfArrayLike=lengthOfArrayLike$2,createProperty=createProperty$1,$Array=Array,max=Math.max,arraySliceSimple=function(e,t,r){for(var n=lengthOfArrayLike(e),s=toAbsoluteIndex(t,n),o=toAbsoluteIndex(void 0===r?n:r,n),i=$Array(max(o-s,0)),a=0;s<o;s++,a++)createProperty(i,a,e[s]);return i.length=a,i},call$2=functionCall,anObject$2=anObject$9,isCallable$4=isCallable$h,classof=classofRaw$1,regexpExec$1=regexpExec$3,$TypeError$1=TypeError,regexpExecAbstract=function(e,t){var r=e.exec;if(isCallable$4(r))return null!==(r=call$2(r,e,t))&&anObject$2(r),r;if("RegExp"===classof(e))return call$2(regexpExec$1,e,t);throw $TypeError$1("RegExp#exec called on incompatible receiver")},apply=functionApply,call$1=functionCall,uncurryThis$3=functionUncurryThis,fixRegExpWellKnownSymbolLogic=fixRegexpWellKnownSymbolLogic,isRegExp=isRegexp,anObject$1=anObject$9,requireObjectCoercible$1=requireObjectCoercible$5,speciesConstructor=speciesConstructor$1,advanceStringIndex=advanceStringIndex$1,toLength=toLength$2,toString$2=toString$5,getMethod=getMethod$2,arraySlice=arraySliceSimple,callRegExpExec=regexpExecAbstract,regexpExec=regexpExec$3,stickyHelpers=regexpStickyHelpers,fails$3=fails$i,UNSUPPORTED_Y=regexpStickyHelpers.UNSUPPORTED_Y,MAX_UINT32=4294967295,min=Math.min,$push=[].push,exec$1=uncurryThis$3(/./.exec),push=uncurryThis$3($push),stringSlice=uncurryThis$3("".slice),SPLIT_WORKS_WITH_OVERWRITTEN_EXEC=!fails$3(function(){var e=/(?:)/,t=e.exec,e=(e.exec=function(){return t.apply(this,arguments)},"ab".split(e));return 2!==e.length||"a"!==e[0]||"b"!==e[1]}),wellKnownSymbol$4=(fixRegExpWellKnownSymbolLogic("split",function(s,g,b){var m="c"=="abbc".split(/(b)*/)[1]||4!="test".split(/(?:)/,-1).length||2!="ab".split(/(?:ab)*/).length||4!=".".split(/(.?)(.?)/).length||1<".".split(/()()/).length||"".split(/.?/).length?function(e,t){var r=toString$2(requireObjectCoercible$1(this)),n=void 0===t?MAX_UINT32:t>>>0;if(0===n)return[];if(void 0===e)return[r];if(!isRegExp(e))return call$1(g,r,e,n);for(var s,o,i,a=[],t=(e.ignoreCase?"i":"")+(e.multiline?"m":"")+(e.unicode?"u":"")+(e.sticky?"y":""),l=0,c=new RegExp(e.source,t+"g");(s=call$1(regexpExec,c,r))&&!(l<(o=c.lastIndex)&&(push(a,stringSlice(r,l,s.index)),1<s.length&&s.index<r.length&&apply($push,a,arraySlice(s,1)),i=s[0].length,l=o,n<=a.length));)c.lastIndex===s.index&&c.lastIndex++;return l===r.length?!i&&exec$1(c,"")||push(a,""):push(a,stringSlice(r,l)),n<a.length?arraySlice(a,0,n):a}:"0".split(void 0,0).length?function(e,t){return void 0===e&&0===t?[]:call$1(g,this,e,t)}:g;return[function(e,t){var r=requireObjectCoercible$1(this),n=null==e?void 0:getMethod(e,s);return n?call$1(n,e,r,t):call$1(m,toString$2(r),e,t)},function(e,t){var r=anObject$1(this),n=toString$2(e),e=b(m,r,n,t,m!==g);if(e.done)return e.value;var e=speciesConstructor(r,RegExp),s=r.unicode,o=(r.ignoreCase?"i":"")+(r.multiline?"m":"")+(r.unicode?"u":"")+(UNSUPPORTED_Y?"g":"y"),i=new e(UNSUPPORTED_Y?"^(?:"+r.source+")":r,o),a=void 0===t?MAX_UINT32:t>>>0;if(0===a)return[];if(0===n.length)return null===callRegExpExec(i,n)?[n]:[];for(var l=0,c=0,u=[];c<n.length;){i.lastIndex=UNSUPPORTED_Y?0:c;var p,d=callRegExpExec(i,UNSUPPORTED_Y?stringSlice(n,c):n);if(null===d||(p=min(toLength(i.lastIndex+(UNSUPPORTED_Y?c:0)),n.length))===l)c=advanceStringIndex(n,c,s);else{if(push(u,stringSlice(n,l,c)),u.length===a)return u;for(var $=1;$<=d.length-1;$++)if(push(u,d[$]),u.length===a)return u;c=l=p}}return push(u,stringSlice(n,l)),u}]},!SPLIT_WORKS_WITH_OVERWRITTEN_EXEC,UNSUPPORTED_Y),wellKnownSymbol$b),create$1=objectCreate,defineProperty$2=objectDefineProperty.f,UNSCOPABLES=wellKnownSymbol$4("unscopables"),ArrayPrototype=Array.prototype,addToUnscopables$1=(null==ArrayPrototype[UNSCOPABLES]&&defineProperty$2(ArrayPrototype,UNSCOPABLES,{configurable:!0,value:create$1(null)}),function(e){ArrayPrototype[UNSCOPABLES][e]=!0}),iterators={},fails$2=fails$i,correctPrototypeGetter=!fails$i(function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype}),hasOwn$1=hasOwnProperty_1,isCallable$3=isCallable$h,toObject=toObject$3,sharedKey=sharedKey$3,CORRECT_PROTOTYPE_GETTER=correctPrototypeGetter,IE_PROTO=sharedKey$3("IE_PROTO"),$Object=Object,ObjectPrototype=$Object.prototype,objectGetPrototypeOf=CORRECT_PROTOTYPE_GETTER?$Object.getPrototypeOf:function(e){e=toObject(e);if(hasOwn$1(e,IE_PROTO))return e[IE_PROTO];var t=e.constructor;return isCallable$3(t)&&e instanceof t?t.prototype:e instanceof $Object?ObjectPrototype:null},fails$1=fails$i,isCallable$2=isCallable$h,getPrototypeOf$1=objectGetPrototypeOf,defineBuiltIn$1=defineBuiltIn$4,wellKnownSymbol$3=wellKnownSymbol$b,ITERATOR$3=wellKnownSymbol$b("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$1(function(){var e={};return IteratorPrototype$2[ITERATOR$3].call(e)!==e})),iteratorsCore=(isCallable$2((IteratorPrototype$2=NEW_ITERATOR_PROTOTYPE?{}:IteratorPrototype$2)[ITERATOR$3])||defineBuiltIn$1(IteratorPrototype$2,ITERATOR$3,function(){return this}),{IteratorPrototype:IteratorPrototype$2,BUGGY_SAFARI_ITERATORS:BUGGY_SAFARI_ITERATORS$1}),defineProperty$1=objectDefineProperty.f,hasOwn=hasOwnProperty_1,wellKnownSymbol$2=wellKnownSymbol$b,TO_STRING_TAG$1=wellKnownSymbol$b("toStringTag"),setToStringTag$2=function(e,t,r){(e=e&&!r?e.prototype:e)&&!hasOwn(e,TO_STRING_TAG$1)&&defineProperty$1(e,TO_STRING_TAG$1,{configurable:!0,value:t})},IteratorPrototype$1=iteratorsCore.IteratorPrototype,create=objectCreate,createPropertyDescriptor=createPropertyDescriptor$4,setToStringTag$1=setToStringTag$2,Iterators$2=iterators,returnThis$1=function(){return this},createIteratorConstructor$1=function(e,t,r,n){t+=" Iterator";return e.prototype=create(IteratorPrototype$1,{next:createPropertyDescriptor(+!n,r)}),setToStringTag$1(e,t,!1),Iterators$2[t]=returnThis$1,e},isCallable$1=isCallable$h,$String=String,$TypeError=TypeError,aPossiblePrototype$1=function(e){if("object"==typeof e||isCallable$1(e))return e;throw $TypeError("Can't set "+$String(e)+" as a prototype")},uncurryThis$2=functionUncurryThis,anObject=anObject$9,aPossiblePrototype=aPossiblePrototype$1,objectSetPrototypeOf=Object.setPrototypeOf||("__proto__"in{}?function(){var r,n=!1,e={};try{(r=uncurryThis$2(Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set))(e,[]),n=e instanceof Array}catch(e){}return function(e,t){return anObject(e),aPossiblePrototype(t),n?r(e,t):e.__proto__=t,e}}():void 0),$$1=_export,call=functionCall,FunctionName=functionName,isCallable=isCallable$h,createIteratorConstructor=createIteratorConstructor$1,getPrototypeOf=objectGetPrototypeOf,setPrototypeOf=objectSetPrototypeOf,setToStringTag=setToStringTag$2,createNonEnumerableProperty$1=createNonEnumerableProperty$5,defineBuiltIn=defineBuiltIn$4,wellKnownSymbol$1=wellKnownSymbol$b,Iterators$1=iterators,IteratorsCore=iteratorsCore,PROPER_FUNCTION_NAME=FunctionName.PROPER,CONFIGURABLE_FUNCTION_NAME=FunctionName.CONFIGURABLE,IteratorPrototype=IteratorsCore.IteratorPrototype,BUGGY_SAFARI_ITERATORS=IteratorsCore.BUGGY_SAFARI_ITERATORS,ITERATOR$2=wellKnownSymbol$1("iterator"),KEYS="keys",VALUES="values",ENTRIES="entries",returnThis=function(){return this},defineIterator$1=function(e,t,r,n,s,o,i){createIteratorConstructor(r,t,n);function a(e){if(e===s&&$)return $;if(!BUGGY_SAFARI_ITERATORS&&e in p)return p[e];switch(e){case KEYS:case VALUES:case ENTRIES:return function(){return new r(this,e)}}return function(){return new r(this)}}var l,c,n=t+" Iterator",u=!1,p=e.prototype,d=p[ITERATOR$2]||p["@@iterator"]||s&&p[s],$=!BUGGY_SAFARI_ITERATORS&&d||a(s),g="Array"==t&&p.entries||d;if(g&&(g=getPrototypeOf(g.call(new e)))!==Object.prototype&&g.next&&(getPrototypeOf(g)!==IteratorPrototype&&(setPrototypeOf?setPrototypeOf(g,IteratorPrototype):isCallable(g[ITERATOR$2])||defineBuiltIn(g,ITERATOR$2,returnThis)),setToStringTag(g,n,!0)),PROPER_FUNCTION_NAME&&s==VALUES&&d&&d.name!==VALUES&&(CONFIGURABLE_FUNCTION_NAME?createNonEnumerableProperty$1(p,"name",VALUES):(u=!0,$=function(){return call(d,this)})),s)if(l={values:a(VALUES),keys:o?$:a(KEYS),entries:a(ENTRIES)},i)for(c in l)!BUGGY_SAFARI_ITERATORS&&!u&&c in p||defineBuiltIn(p,c,l[c]);else $$1({target:t,proto:!0,forced:BUGGY_SAFARI_ITERATORS||u},l);return p[ITERATOR$2]!==$&&defineBuiltIn(p,ITERATOR$2,$,{name:s}),Iterators$1[t]=$,l},toIndexedObject=toIndexedObject$5,addToUnscopables=addToUnscopables$1,Iterators=iterators,InternalStateModule=internalState,defineProperty=objectDefineProperty.f,defineIterator=defineIterator$1,DESCRIPTORS=descriptors,ARRAY_ITERATOR="Array Iterator",setInternalState=InternalStateModule.set,getInternalState=InternalStateModule.getterFor(ARRAY_ITERATOR),es_array_iterator=defineIterator(Array,"Array",function(e,t){setInternalState(this,{type:ARRAY_ITERATOR,target:toIndexedObject(e),index:0,kind:t})},function(){var e=getInternalState(this),t=e.target,r=e.kind,n=e.index++;return!t||n>=t.length?{value:e.target=void 0,done:!0}:"keys"==r?{value:n,done:!1}:"values"==r?{value:t[n],done:!1}:{value:[n,t[n]],done:!1}},"values"),values=Iterators.Arguments=Iterators.Array;if(addToUnscopables("keys"),addToUnscopables("values"),addToUnscopables("entries"),DESCRIPTORS&&"values"!==values.name)try{defineProperty(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$2=global$f,DOMIterables=domIterables,DOMTokenListPrototype=domTokenListPrototype,ArrayIteratorMethods=es_array_iterator,createNonEnumerableProperty=createNonEnumerableProperty$5,wellKnownSymbol=wellKnownSymbol$b,ITERATOR$1=wellKnownSymbol("iterator"),TO_STRING_TAG=wellKnownSymbol("toStringTag"),ArrayValues=ArrayIteratorMethods.values,handlePrototype=function(t,e){if(t){if(t[ITERATOR$1]!==ArrayValues)try{createNonEnumerableProperty(t,ITERATOR$1,ArrayValues)}catch(e){t[ITERATOR$1]=ArrayValues}if(t[TO_STRING_TAG]||createNonEnumerableProperty(t,TO_STRING_TAG,e),DOMIterables[e])for(var r in ArrayIteratorMethods)if(t[r]!==ArrayIteratorMethods[r])try{createNonEnumerableProperty(t,r,ArrayIteratorMethods[r])}catch(e){t[r]=ArrayIteratorMethods[r]}}};for(COLLECTION_NAME in DOMIterables)handlePrototype(global$2[COLLECTION_NAME]&&global$2[COLLECTION_NAME].prototype,COLLECTION_NAME);handlePrototype(DOMTokenListPrototype,"DOMTokenList");const useStyles$4=makeStyles()(()=>({active:{background:"rgba(27, 94, 32, 0.2)",color:"rgba(56, 142, 60, 1)",fontSize:"9px",borderRadius:"30px",height:"20px",width:"fit-content",padding:"0px 10px",fontWeight:800},suspended:{background:"rgba(249, 168, 37, 0.2)",color:"rgba(245, 124, 0, 1)",fontSize:"9px",borderRadius:"30px",height:"20px",width:"fit-content",padding:"0px 10px",fontWeight:800},deactivated:{background:"rgba(183, 28, 28, 0.2)",color:"rgba(183, 28, 28, 1)",fontSize:"9px",borderRadius:"30px",height:"20px",width:"fit-content",padding:"0px 10px",fontWeight:800},deleted:{background:"rgba(33, 33, 33, 0.1)",color:"rgba(33, 33, 33, 1)",fontSize:"9px",borderRadius:"30px",height:"20px",width:"fit-content",padding:"0px 10px",fontWeight:800}})),UserStatusBadge=({status:e})=>{var t=useStyles$4()["classes"];return jsxRuntime.exports.jsx(Box$1,Object.assign({className:t[e],"data-testid":"admin-center.users.user-status-badge"},{children:e.toUpperCase()}))},SLICE_NAME$1="adminCenterUsers",PAGE_LIMIT=30;var whitespaces$2="\t\n\v\f\r \u2028\u2029\ufeff",uncurryThis$1=functionUncurryThis,requireObjectCoercible=requireObjectCoercible$5,toString$1=toString$5,whitespaces$1=whitespaces$2,replace=functionUncurryThis("".replace),whitespace="["+whitespaces$1+"]",ltrim=RegExp("^"+whitespace+whitespace+"*"),rtrim=RegExp(whitespace+whitespace+"*$"),createMethod=function(t){return function(e){e=toString$1(requireObjectCoercible(e));return 1&t&&(e=replace(e,ltrim,"")),e=2&t?replace(e,rtrim,""):e}},stringTrim={start:createMethod(1),end:createMethod(2),trim:createMethod(3)},global$1=global$f,fails=fails$i,uncurryThis=functionUncurryThis,toString=toString$5,trim=stringTrim.trim,whitespaces=whitespaces$2,$parseInt$1=global$1.parseInt,Symbol$1=global$1.Symbol,ITERATOR=Symbol$1&&Symbol$1.iterator,hex=/^[+-]?0x/i,exec=uncurryThis(hex.exec),FORCED=8!==$parseInt$1(whitespaces+"08")||22!==$parseInt$1(whitespaces+"0x16")||ITERATOR&&!fails(function(){$parseInt$1(Object(ITERATOR))}),numberParseInt=FORCED?function(e,t){e=trim(toString(e));return $parseInt$1(e,t>>>0||(exec(hex,e)?16:10))}:$parseInt$1,$=_export,$parseInt=numberParseInt;_export({global:!0,forced:parseInt!=numberParseInt},{parseInt:numberParseInt});const namespace$1="adminCenterUsers",avatarColors=["#f94144ff","#f3722cff","#f8961eff","#f9844aff","#f9c74fff","#90be6dff","#43aa8bff","#4d908eff","#577590ff","#277da1ff"];let prevIndex=0;const initialState$1={status:"idle",users:[],offset:0,hasMore:!0},adminCenterSlice=createSlice({name:SLICE_NAME$1+"/"+namespace$1,initialState:initialState$1,reducers:{fetchOrgUsersStart(e){e.status="loading"},fetchOrgUsersSuccess(e,t){e.status="success";const r=[];for(const i of t.payload.records){var n=md5((i.id||"")+(i.email||"")+i.lastLoginDateTime+(i.firstName||""));let e=parseInt(n,16)%avatarColors.length;e===prevIndex&&(e+1>avatarColors.length-1?--e:e+=1),prevIndex=e,r.push(Object.assign(Object.assign({},i),{avatarColor:avatarColors[e]}))}const s=[...e.users,...r];var o=[...new Map(s.map(e=>[e.id,e])).values()];e.users=o,e.hasMore=t.payload.hasMore,e.offset=t.payload.nextOffset},fetchOrgUsersFailure(e){e.status="failure"},removeUserFromOrgStart(e,t){e.status="loading"},removeUserFromOrgSuccess(e,t){e.status="success",e.users=[...e.users].filter(e=>e.id!==t.payload),e.offset=e.offset-1},removeUserFromOrgFailure(e){e.status="failure"},updateUserStatusStart(e,t){e.status="loading"},updateUserStatusSuccess(e,t){e.status="success";var r=e.users.findIndex(e=>e.id===t.payload.id);if(-1!==r){const n=[...e.users];n[r]=Object.assign(Object.assign({},n[r]),{status:t.payload.status}),e.users=n}},updateUserStatusFailure(e){e.status="failure"}}}),actions$1=adminCenterSlice.actions;var AdminCenterView,adminCenterUsers_state=adminCenterSlice.reducer;const actions$2={[namespace$1]:actions$1},rootReducer$1=combineReducers({[namespace$1]:adminCenterUsers_state});function __awaiter$1(e,i,a,l){return new(a=a||Promise)(function(r,t){function n(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?r(e.value):((t=e.value)instanceof a?t:new a(function(e){e(t)})).then(n,s)}o((l=l.apply(e,i||[])).next())})}function fetchOrgUsers(t,r,n){return __awaiter$1(this,void 0,void 0,function*(){var e="fetchOrgUsers";return(yield baseGraphQLApiWithError(Object.assign({query:`
|
|
2
|
+
query ${e} {
|
|
3
|
+
users (offset: ${r}, limit: ${n}) {
|
|
4
|
+
records {
|
|
5
|
+
id
|
|
6
|
+
imageUrl
|
|
7
|
+
firstName
|
|
8
|
+
lastName
|
|
9
|
+
email
|
|
10
|
+
lastLoginDateTime
|
|
11
|
+
status
|
|
12
|
+
organizationGuids
|
|
13
|
+
organization {
|
|
14
|
+
guid
|
|
15
|
+
}
|
|
16
|
+
}
|
|
11
17
|
}
|
|
12
18
|
}
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
componentIds: [${lodash.exports.join(lodash.exports.map(a[e],e=>`"${e}"`),",")}]
|
|
18
|
-
type: dataRegistries
|
|
19
|
-
action: ${e}
|
|
20
|
-
}) {
|
|
21
|
-
dataRegistries {
|
|
22
|
-
records {
|
|
23
|
-
id
|
|
19
|
+
`,operationName:e},t))).users})}function removeUserFromOrg(r,n,s){return __awaiter$1(this,void 0,void 0,function*(){var e="removeUserFromOrg",t="removeUserFromOrg";return(yield baseGraphQLApiWithError(Object.assign({query:`
|
|
20
|
+
mutation ${e} {
|
|
21
|
+
${t} (userId: "${n}", organizationGuid: "${s}") {
|
|
22
|
+
id
|
|
24
23
|
}
|
|
25
24
|
}
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
description
|
|
33
|
-
entityTags {
|
|
34
|
-
tagKey
|
|
35
|
-
tagValue
|
|
36
|
-
}
|
|
37
|
-
applicationConfig {
|
|
38
|
-
records {
|
|
39
|
-
applicationId
|
|
40
|
-
configKey
|
|
41
|
-
configType
|
|
42
|
-
configLevel
|
|
43
|
-
required
|
|
44
|
-
description
|
|
45
|
-
secured
|
|
46
|
-
defaultValue
|
|
47
|
-
defaultValueJSON
|
|
48
|
-
}
|
|
49
|
-
offset
|
|
50
|
-
limit
|
|
51
|
-
count
|
|
52
|
-
}
|
|
53
|
-
status
|
|
54
|
-
url
|
|
55
|
-
signedIconUrl
|
|
56
|
-
oauth2RedirectUrls
|
|
57
|
-
iconSvg
|
|
58
|
-
iconUrl
|
|
59
|
-
key
|
|
60
|
-
clientSecret
|
|
61
|
-
validStateActions
|
|
62
|
-
createdDateTime
|
|
63
|
-
modifiedDateTime
|
|
64
|
-
headerbarEnabled
|
|
65
|
-
components {
|
|
66
|
-
engines {
|
|
67
|
-
records {
|
|
68
|
-
id
|
|
69
|
-
name
|
|
70
|
-
description
|
|
71
|
-
state
|
|
72
|
-
iconPath
|
|
73
|
-
signedIconPath
|
|
74
|
-
deployedVersion
|
|
75
|
-
displayName
|
|
76
|
-
edgeVersion
|
|
77
|
-
categoryId
|
|
78
|
-
modifiedDateTime
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
dataRegistries {
|
|
82
|
-
records {
|
|
83
|
-
id
|
|
84
|
-
name
|
|
85
|
-
description
|
|
86
|
-
modifiedDateTime
|
|
87
|
-
publishedSchema {
|
|
88
|
-
majorVersion
|
|
89
|
-
minorVersion
|
|
90
|
-
status
|
|
91
|
-
}
|
|
92
|
-
}
|
|
93
|
-
}
|
|
94
|
-
contextMenuExtensions {
|
|
95
|
-
id
|
|
96
|
-
label
|
|
97
|
-
url
|
|
98
|
-
type
|
|
99
|
-
}
|
|
100
|
-
}
|
|
101
|
-
nodeModules {
|
|
102
|
-
moduleId
|
|
103
|
-
moduleRepo
|
|
104
|
-
moduleName
|
|
105
|
-
moduleVersion
|
|
106
|
-
isPrivateRepo
|
|
107
|
-
isPrivateRegistry
|
|
108
|
-
scope
|
|
109
|
-
accessToken
|
|
110
|
-
registryUrl
|
|
111
|
-
sshUrl
|
|
112
|
-
}
|
|
113
|
-
}`,getApplication=(a,s)=>__awaiter(void 0,void 0,void 0,function*(){var e="application",t=`
|
|
114
|
-
${applicationFieldsFragment}
|
|
115
|
-
query ${e} ($id: ID!) {
|
|
116
|
-
${e}(id: $id) {
|
|
117
|
-
...applicationFields
|
|
25
|
+
`,operationName:e},r)))[t]})}function updateUserStatus(r,n,s){return __awaiter$1(this,void 0,void 0,function*(){var e="updateUserStatus",t="updateUserStatus";return(yield baseGraphQLApiWithError(Object.assign({query:`
|
|
26
|
+
mutation ${e} {
|
|
27
|
+
${t} (input: {id: "${n}" status: ${s}}) {
|
|
28
|
+
id
|
|
29
|
+
status
|
|
30
|
+
}
|
|
118
31
|
}
|
|
119
|
-
}
|
|
120
|
-
`;return(yield baseGraphQLApiWithError(Object.assign({query:t,variables:{id:s},operationName:e},a))).application}),updateApplication=(t,a)=>__awaiter(void 0,void 0,void 0,function*(){var e="updateApplication";return(yield baseGraphQLApiWithError(Object.assign({query:"\n mutation updateApplication ($input: UpdateApplication!) {\n updateApplication (input: $input) {\n id\n }\n }\n ",variables:{input:a},operationName:e},t)))[e]}),deleteConfigField=(t,a,s)=>__awaiter(void 0,void 0,void 0,function*(){var e="applicationConfigDefinitionDelete";return yield baseGraphQLApiWithError(Object.assign({query:"\n mutation applicationConfigDefinitionDelete($appId: ID! $configKey: String!) {\n applicationConfigDefinitionDelete(\n input: {\n appId: $appId\n configKey: $configKey\n }\n )\n {\n success\n code\n msg\n }\n }\n ",variables:{appId:a,configKey:s},operationName:e},t))}),updateConfigField=(t,a)=>__awaiter(void 0,void 0,void 0,function*(){var e="applicationConfigDefinitionUpdate";return yield baseGraphQLApiWithError(Object.assign({query:"\n mutation applicationConfigDefinitionUpdate($input: [ApplicationConfigDefinitionUpdateInput]) {\n applicationConfigDefinitionUpdate(input: $input)\n {\n records {\n applicationId\n configKey\n }\n }\n }",variables:{input:a},operationName:e},t))}),getApplicationConfigFields=(t,a)=>__awaiter(void 0,void 0,void 0,function*(){var e="applicationConfigDefinition";return yield baseGraphQLApiWithError(Object.assign({query:"\n query applicationConfigDefinition ($appId: ID!) {\n applicationConfigDefinition(appId: $appId) {\n records {\n applicationId\n configKey\n configType\n configLevel\n description\n defaultValue\n defaultValueJSON\n required\n secured\n }\n }\n\n }\n ",variables:{appId:a},operationName:e},t))}),getOAuthClientSecret=(t,a)=>__awaiter(void 0,void 0,void 0,function*(){var e="getApplicationOatuhClientSecret";return yield baseGraphQLApiWithError(Object.assign({query:"query getApplicationOatuhClientSecret($id: ID!, $password: String!) {\n application(id: $id) {\n id,\n clientSecret(password: $password)\n }\n }",variables:a,operationName:e},t))}),getSchemasByName=(a,s={name:""})=>__awaiter(void 0,void 0,void 0,function*(){var e={name:s.name},t="getSchemasByDataRegistryName";return yield baseGraphQLApiWithError(Object.assign({query:"\n query getSchemasByDataRegistryName($name:String){\n dataRegistries(\n name: $name\n ){\n records {\n id\n name\n modifiedDateTime\n schemas {\n records {\n id\n dataRegistryId\n modifiedDateTime\n majorVersion\n minorVersion\n }\n }\n }\n }\n }\n ",variables:e,operationName:t},a))}),getEvents$1=t=>__awaiter(void 0,void 0,void 0,function*(){var e="systemEvents";return yield baseGraphQLApiWithError(Object.assign({query:'\n query systemEvents {\n events (application: "system", limit: 9999) {\n records {\n id\n eventName\n eventType\n description\n }\n }\n }\n ',operationName:e},t))});function*searchFlows(e){yield delay(200),yield put(actions.flowLinkingPanelState.fetchingStart());var t=yield select(selectApiConfigs);try{var a=yield call(getFlowsByName,t,{name:e.payload});yield put(actions.flowLinkingPanelState.updateFlowLinkingPanelField({field:"searchResults",value:a.engines.records})),yield put(actions.flowLinkingPanelState.fetchingDone())}catch(e){console.log(e.message),yield put(showMessage({content:e.message,severity:MessageSeverity.Error})),yield put(actions.flowLinkingPanelState.fetchingDone())}}function*watchSearchFlows(){yield takeLatest$1(actions.flowLinkingPanelState.searchByTerm.type,searchFlows)}const flowsSagas=[fork(watchSearchFlows)];function*searchSchemas(e){yield delay(200),yield put(actions.schemaLinkingPanelState.fetchingStart());var t=yield select(selectApiConfigs);try{var a=yield call(getSchemasByName,t,{name:e.payload});yield put(actions.schemaLinkingPanelState.updateSchemaLinkingPanelField({field:"searchResults",value:lodash.exports.map(a.dataRegistries.records,e=>{var t=lodash.exports.reduce(e.schemas.records,(e,t)=>t.majorVersion>e.majorVersion||t.majorVersion==e.majorVersion&&t.minorVersion>e.minorVersion?t:e);return{id:t.id,dataRegistryId:t.dataRegistryId,name:e.name,modifiedDateTime:t.modifiedDateTime,version:`v${t.majorVersion}.`+t.minorVersion}})})),yield put(actions.schemaLinkingPanelState.fetchingDone())}catch(e){console.log(e.message),yield put(showMessage({content:e.message,severity:MessageSeverity.Error})),yield put(actions.schemaLinkingPanelState.fetchingDone())}}function*watchSearchSchemas(){yield takeLatest$1(actions.schemaLinkingPanelState.searchByTerm.type,searchSchemas)}const schemasSagas=[fork(watchSearchSchemas)];function*searchEngines(e){yield delay(200),yield put(actions.engineLinkingPanelState.fetchingStart());var t=yield select(selectApiConfigs);try{var a=yield call(getEnginesByName,t,{name:e.payload}),s=lodash.exports.filter(a.engines.records,e=>"c5458876-43d2-41e8-a340-f734702df04a"!==e.category.id);yield put(actions.engineLinkingPanelState.updateEngineLinkingPanelField({field:"searchResults",value:s})),yield put(actions.engineLinkingPanelState.fetchingDone())}catch(e){console.log(e.message),yield put(showMessage({content:e.message,severity:MessageSeverity.Error})),yield put(actions.engineLinkingPanelState.fetchingDone())}}function*watchSearchEngines(){yield takeLatest$1(actions.engineLinkingPanelState.searchByTerm.type,searchEngines)}const enginesSagas=[fork(watchSearchEngines)];function*getEvents(e){yield delay(0),yield put(actions.appEventsPanelState.fetchingStart());var t=yield select(selectApiConfigs);try{var a=yield call(getEvents$1,t);yield put(actions.appEventsPanelState.updateEventsPanelField({field:"searchResults",value:a.events.records})),yield put(actions.appEventsPanelState.fetchingDone())}catch(e){console.log(e.message),yield put(showMessage({content:e.message,severity:MessageSeverity.Error})),yield put(actions.appEventsPanelState.fetchingDone())}}function*watchGetEvents(){yield takeLatest$1(actions.appEventsPanelState.getEvents.type,getEvents)}const appEventsSagas=[fork(watchGetEvents)],supportedAppFields$1=["id","name","isPublic","key","category","description","iconUrl","iconSvg","url","oauth2RedirectUrls","checkPermissions","deploymentModel","contextMenuExtensions","eventEndpoint","entityTags","headerbarEnabled","nodeModules"],formatApp$1=t=>{const a={checkPermissions:t.checkPermissions||!1,name:t.name,key:lodash.exports.snakeCase(t.name)};return supportedAppFields$1.forEach(e=>{lodash.exports.isNil(t[e])||(a[e]=t[e])}),lodash.exports.isNil(t.iconPath)||(a.iconUrl=t.iconPath),lodash.exports.isNil(t.oauthUrl)||lodash.exports.isEmpty(t.oauthUrl)||(a.oauth2RedirectUrls=[t.oauthUrl]),a};function*createNewApplication(e){var t=yield select(preferredLanguageSelector);const a=AIWareFormatMessage(t||"en");t=e.payload.app;if(lodash.exports.isNil(t))throw new Error("Empty app not allowed!");e=yield select(selectApiConfigs);try{var s=formatApp$1(t),n=yield call(createApplication,e,s),{flows:i,engines:o,schemas:r}=t;if(!(lodash.exports.isEmpty(i)||lodash.exports.isEmpty(o)||lodash.exports.isEmpty(r))){const l={id:n.id};lodash.exports.isEmpty(i)||lodash.exports.isEmpty(o)||(l.engines={add:[...lodash.exports.map(i,e=>e.id),...lodash.exports.map(o,e=>e.id)],remove:[]}),lodash.exports.isEmpty(r)||(l.dataRegistries={add:lodash.exports.map(r,e=>e.dataRegistryId),remove:[]}),yield call(updateAppComponents,e,l)}lodash.exports.isEmpty(t.configFields)||(yield call(createAppConfig,e,n.id,t.configFields)),yield put(actions.appFormState.createAppSuccess(n.id)),yield put(showMessage({content:a({id:"os-app-center-new.snackbar.appCreateSuccess",defaultMessage:[{type:0,value:"Application successfully created"}]}),severity:MessageSeverity.Success})),yield put(unmountPanel("APP_CENTER_NEW"))}catch(e){yield put(actions.appFormState.createAppFailed(e.message)),yield put(showMessage({content:a({id:"os-app-center-new.snackbar.appOnboardingFailed",defaultMessage:[{type:0,value:"Application onboarding failed"}]}),severity:MessageSeverity.Error}))}}function*watchNewApplicationCreateStart(){yield takeLatest$1(actions.appFormState.createAppStart.type,createNewApplication)}const newApplicationSagas=[fork(watchNewApplicationCreateStart)],root="undefined"!=typeof window?window:global,fileUploadChannel=(root.xhrInstances={},channel());function*uploadIcon(e){const t=e.payload.file;e=yield select(preferredLanguageSelector);const a=AIWareFormatMessage(e);try{var s=yield call(getUrlBucket,t.name);const i=Object.assign(Object.assign({},t),{status:IconImportStatus.Uploading,percentComplete:0,expiresInSeconds:s.expiresInSeconds,getUrl:s.getUrl,key:s.key,unsignedUrl:s.unsignedUrl,url:s.url}),o=(yield put(actions.iconUploadState.updateIcon(i)),e=>{fileUploadChannel.put(actions.iconUploadState.updateIcon(Object.assign({id:t.id},e)))});var n=yield uploadFileToS3(s,t,{onProgress:e=>{o({percentComplete:e}),sdkEventManager.dispatch(SdkEvents.fileUploadProgress,null,e)},onAbort:e=>{o({status:IconImportStatus.Aborted}),sdkEventManager.dispatch(SdkEvents.fileUpload,new SdkError(e,"abort"),i)},onError:e=>{o({status:IconImportStatus.Failed}),sdkEventManager.dispatch(SdkEvents.fileUpload,new SdkError(e),i)},onUpload:e=>{o({status:IconImportStatus.Uploaded}),sdkEventManager.dispatch(SdkEvents.fileUpload,null,i)}});root.xhrInstances[t.id]=n,yield put(actions.iconUploadState.uploadIconSuccess()),yield put(actions.appFormState.updateAppFormField({field:"iconPath",value:i.getUrl}))}catch(e){yield put(actions.iconUploadState.uploadIconFailed(e.message)),yield put(showMessage({content:a({id:"os-app-center-new.snackbar.iconUploadFail",defaultMessage:[{type:0,value:"Icon upload failed, please try again."}]}),severity:MessageSeverity.Error}))}}function*getUrlBucket(e){var t=yield select(selectApiConfigs);return yield call(getSignedWritableUrl,t,e)}function*watchUploadIconStart(){yield takeLatest$1(actions.iconUploadState.uploadIconStart.type,uploadIcon)}function*watchProgressChannel(){var e=yield take(fileUploadChannel);yield put(e)}const supportedAppFields=["id","name","isPublic","category","description","iconUrl","iconSvg","url","oauth2RedirectUrls","checkPermissions","deploymentModel","contextMenuExtensions","eventEndpoint","entityTags","headerbarEnabled","nodeModules"],formatApp=t=>{const a={checkPermissions:t.checkPermissions||!1,name:t.name,id:t.id};return supportedAppFields.forEach(e=>{lodash.exports.isNil(t[e])||(a[e]=t[e])}),lodash.exports.isNil(t.iconPath)||(a.iconUrl=t.iconPath),a},decodeApp=(e,t)=>{const a=[],s=[];lodash.exports.map(lodash.exports.get(e.components.engines,"records"),e=>{("c5458876-43d2-41e8-a340-f734702df04a"===e.categoryId?a:s).push(e)});t=lodash.exports.map(lodash.exports.get(t.applicationConfigDefinition,"records"),e=>{return{id:e.applicationId,name:e.configKey,type:e.configType,configLevel:AppConfigLevel[e.configLevel],required:e.required,description:e.description,defaultValue:e.defaultValue,secured:!1}});return{id:e.id,name:e.name,description:e.description,entityTags:lodash.exports.map(e.entityTags,e=>({tagKey:e.tagKey,tagValue:e.tagValue})),configFields:t,status:e.status,url:e.url,oauth2RedirectUrls:e.oauth2RedirectUrls,iconSvg:e.iconSvg,iconPath:e.iconUrl,key:e.key,clientSecret:e.clientSecret,validStateActions:e.validStateActions,createdDateTime:e.createdDateTime,modifiedDateTime:e.modifiedDateTime,flows:a,engines:s,headerbarEnabled:e.headerbarEnabled,schemas:lodash.exports.map(lodash.exports.get(e.components.dataRegistries,"records"),e=>{return{dataRegistryId:e.id,name:e.name,modifiedDateTime:e.modifiedDateTime,version:(e=e.publishedSchema)?e.majorVersion+"."+e.minorVersion:""}}),contextMenuExtensions:e.contextMenuExtensions,nodeModules:e.nodeModules}};function*queryAppDetails(e){var t=yield select(selectApiConfigs);return yield call(getApplication,t,e)}function*queryAppConfigFieldDetails(e){var t=yield select(selectApiConfigs);return yield call(getApplicationConfigFields,t,e)}function*editApp(e){var t=yield queryAppDetails(e.payload),e=yield queryAppConfigFieldDetails(e.payload);yield put(actions.appFormState.setEditAppExistingData(decodeApp(t,e)))}function*updateApp(e){var t=yield select(preferredLanguageSelector);const a=AIWareFormatMessage(t||"en");t=e.payload.app,e=yield select(selectApiConfigs);try{var s=formatApp(t),n=yield call(updateApplication,e,s),{flows:i,engines:o,schemas:r}=t;if(!(lodash.exports.isEmpty(i)||lodash.exports.isEmpty(o)||lodash.exports.isEmpty(r))){const d={id:n.id};lodash.exports.isEmpty(i)||lodash.exports.isEmpty(o)||(d.engines={add:[...lodash.exports.map(i,e=>e.id),...lodash.exports.map(o,e=>e.id)],remove:[]}),lodash.exports.isEmpty(r)||(d.dataRegistries={add:lodash.exports.map(r,e=>e.dataRegistryId),remove:[]}),yield call(updateAppComponents,e,d)}yield put(actions.appFormState.createAppSuccess(n.id)),yield put(showMessage({content:a({id:"os-app-center-new.app-update-success",defaultMessage:[{type:0,value:"App successfully updated"}]}),severity:MessageSeverity.Success}));var l="APP_CENTER_DETAILS",p={name:l,config:{appId:n.id}};yield put(mountPanel({panelId:l,microFrontend:p,panelConfig:{type:"APP_BAR_PANEL_TEMPLATE",marginTop:55,marginStart:0,size:"xlarge"}})),yield put(unmountPanel("APP_CENTER_NEW"))}catch(e){yield put(actions.appFormState.createAppFailed(e.message)),yield put(showMessage({content:a({id:"os-app-center-new.app-updating-failed",defaultMessage:[{type:0,value:"App updating failed"}]}),severity:MessageSeverity.Error}))}}function*deleteAppConfigField(e){var e=e["payload"],t=yield select(selectApiConfigs),a=yield select(preferredLanguageSelector);const s=AIWareFormatMessage(a);if(t&&e.configToDelete.id)try{yield call(deleteConfigField,t,e.configToDelete.id,e.configToDelete.name)}catch(e){yield put(showMessage({content:s({id:"os-app-center-new.config-field-delete-fail",defaultMessage:[{type:0,value:"Config field failed to be deleted"}]}),severity:MessageSeverity.Error}))}}function*updateAppConfigField(e){var e=e["payload"],t=yield select(selectApiConfigs),a=yield select(preferredLanguageSelector);const s=AIWareFormatMessage(a);if(t&&e.configFields.id){a={configKey:e.configFields.name,description:e.configFields.description,configLevel:e.configFields.configLevel,configType:AppConfigType[e.configFields.type],defaultValue:e.configFields.defaultValue,required:e.configFields.required,secured:!1},e={input:[{filter:{appId:e.configFields.id,configKey:e.name},update:a}]};try{yield call(updateConfigField,t,e.input)}catch(e){yield put(showMessage({content:s({id:"os-app-center-new.config-field-update-fail",defaultMessage:[{type:0,value:"Config field failed to be updated"}]}),severity:MessageSeverity.Error}))}}}function*addAppConfigField(e){var e=e["payload"],t=yield select(selectApiConfigs),a=yield select(preferredLanguageSelector);const s=AIWareFormatMessage(a);if(t)try{yield call(createAppConfig,t,e.appId,[e.newConfigField])}catch(e){yield put(showMessage({content:s({id:"os-app-center-new.config-field-create-fail",defaultMessage:[{type:0,value:"Config field failed to be created"}]}),severity:MessageSeverity.Error}))}}function*watchEditApp(){yield takeLatest$1(actions.appFormState.editApp.type,editApp)}function*watchUpdateAppStart(){yield takeLatest$1(actions.appFormState.updateAppStart.type,updateApp)}function*watchDeleteConfigField(){yield takeLatest$1(actions.appFormState.removeConfigField.type,deleteAppConfigField)}function*watchUpdateConfigField(){yield takeLatest$1(actions.appFormState.updateConfigField.type,updateAppConfigField)}function*watchCreateConfigField(){yield takeLatest$1(actions.appFormState.createConfigField.type,addAppConfigField)}const editAppSagas=[fork(watchEditApp),fork(watchUpdateAppStart),fork(watchDeleteConfigField),fork(watchUpdateConfigField),fork(watchCreateConfigField)];function*rootSaga(){yield all([watchUploadIconStart(),watchProgressChannel(),...appEventsSagas,...flowsSagas,...enginesSagas,...newApplicationSagas,...schemasSagas,...editAppSagas])}function getAppCenterNewModule(){return{id:SLICE_NAME,reducerMap:{[SLICE_NAME]:rootReducer},sagas:[rootSaga],initialActions:[]}}const formattedMessageIdPrefix$3="toggle-switch.",Toggle=e=>{var t=makeStyles()(e=>({switch:{padding:2,height:34,width:123,"& .Sdk-MuiSwitch-switchBase":{padding:3,borderRadius:16,transform:"translateX(57px)"},"& .Sdk-MuiSwitch-track":{borderRadius:13,height:30,width:119,backgroundColor:"#EEEEEF",opacity:1},"& .Sdk-MuiSwitch-switchBase.Mui-checked + .MuiSwitch-track":{backgroundColor:"#EEEEEF",opacity:1},"& .Sdk-MuiSwitch-thumb":{backgroundColor:"white",boxShadow:"none",width:57,height:26,borderRadius:13,margin:1},"& .Sdk-MuiSwitch-switchBase.Mui-checked":{transform:"translateX(0px)","& .Sdk-MuiSwitch-thumb":{backgroundColor:"white"}}},switchLabel:{zIndex:10,color:"#5C6269",pointerEvents:"none","&.Mui-focused":{color:"#2A323C"},"& *":{cursor:"pointer"}}}))()["classes"],{checked:a,onChange:s}=e;return jsxRuntime.exports.jsxs(Stack,Object.assign({direction:"row",spacing:-8.5,marginX:4.25,alignItems:"center"},{children:[jsxRuntime.exports.jsx(FormLabel,Object.assign({color:"secondary",className:t.switchLabel,htmlFor:"toggle-aiware-headerbar"},{children:jsxRuntime.exports.jsx(Typography,Object.assign({variant:"h6",sx:{color:a?null:"#5C6269"}},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:formattedMessageIdPrefix$3+"on",defaultMessage:"On",description:"On lable for aiware headerbar toggle switch"})}))})),jsxRuntime.exports.jsx(Switch,Object.assign({color:"secondary",id:"toggle-aiware-headerbar",className:classNames(t.switch,e.className),onChange:s},lodash.exports.omit(e,"className"))),jsxRuntime.exports.jsx(FormLabel,Object.assign({color:"secondary",className:t.switchLabel,htmlFor:"toggle-aiware-headerbar"},{children:jsxRuntime.exports.jsx(Typography,Object.assign({variant:"h6",sx:{color:a?"#5C6269":null}},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:formattedMessageIdPrefix$3+"off",defaultMessage:"Off",description:"Off lable for aiware headerbar toggle switch"})}))}))]}))},formattedMessageIdPrefix$2="os-app-center-new.headerbar-step.headerbar-toggle.";var AiWareHeaderbarToggle=({checked:e=!0,onChange:t})=>jsxRuntime.exports.jsxs(Box$1,Object.assign({width:"100%","data-test":formattedMessageIdPrefix$2+"container"},{children:[jsxRuntime.exports.jsx(Typography,Object.assign({variant:"h4"},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:formattedMessageIdPrefix$2+"title",defaultMessage:"aiWARE Headerbar",description:"Title of the aiware headerbar toggle section"})})),jsxRuntime.exports.jsx(Typography,Object.assign({variant:"body1"},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:formattedMessageIdPrefix$2+"instructions",defaultMessage:"This allows the aiWARE header to wrap around your app, keeping it self contained.",description:"Instructions of the aiware headerbar toggle section"})})),jsxRuntime.exports.jsx(FormGroup,{children:jsxRuntime.exports.jsx(FormControl$1,{children:jsxRuntime.exports.jsx(Toggle,{checked:e,onChange:t,"data-test":formattedMessageIdPrefix$2+"toggle"})})})]}));const useStyles$b=makeStyles()(e=>({editorImg:{maxWidth:"100%",height:"auto"},container:{"& input, textarea":{fontWeight:400},"& fieldset":{borderColor:"#D5DFE9"}},"& fieldset":{borderColor:"#D5DFE9"},textInput:{padding:14.5,boxSizing:"content-box"}})),formattedMessageIdPrefix$1="os-app-center-new.headerbar-step.customize-headerbar.";var _path,_g,_path2,_path3,_tspan,_tspan2,_tspan3,_tspan4,_tspan5,_tspan6,_tspan7,_tspan8,_tspan9,_tspan10,_tspan11,_tspan12,_tspan13,_tspan14,_tspan15,_tspan16,_tspan17,_tspan18,_tspan19,_tspan20,_tspan21,_tspan22,_tspan23,_tspan24,_tspan25,_tspan26,_defs,CustomizeAIWareHeaderbar=({handleOnValidate:e})=>{var t=useStyles$b()["classes"];const a=useDispatch(),s=useSelector(selectApp);var n={name:s.aiwareHeader.name,elementId:s.aiwareHeader.elementId,title:s.aiwareHeader.title,backgroundColor:s.aiwareHeader.backgroundColor,zIndex:s.aiwareHeader.zIndex,logoSrc:s.aiwareHeader.logoSrc,help:s.aiwareHeader.help,notification:s.aiwareHeader.notification,hidePasswordReset:s.aiwareHeader.hidePasswordReset,displaySupportChat:s.aiwareHeader.displaySupportChat};const i=useForm({mode:"onChange",defaultValues:n});react.exports.useEffect(()=>{s.headerbarEnabled?null!=e&&e(i.formState.isValid):null!=e&&e(!0)},[i.formState.isValid,s.headerbarEnabled]);var n=e=>{var{name:e,value:t}=e.target;a(actions.appFormState.updateAiwareHeader({field:e,value:t}))},o=e=>{var{name:e,checked:t}=e.target;a(actions.appFormState.updateAiwareHeader({field:e,value:t}))};return jsxRuntime.exports.jsxs(Stack,Object.assign({spacing:3,"data-test":formattedMessageIdPrefix$1+"container"},{children:[jsxRuntime.exports.jsxs(Box$1,Object.assign({sx:{opacity:s.headerbarEnabled?1:.5}},{children:[jsxRuntime.exports.jsxs(Stack,Object.assign({direction:"row",alignItems:"center",spacing:1},{children:[jsxRuntime.exports.jsx(Typography,Object.assign({variant:"h4"},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:formattedMessageIdPrefix$1+"title",defaultMessage:"Customize the aiWARE Header",description:"Title of the Customize aiware headerbar section"})})),jsxRuntime.exports.jsx(Typography,Object.assign({variant:"body1"},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:formattedMessageIdPrefix$1+"optional",defaultMessage:"(Optional)",description:"Optional modifier for titles"})}))]})),jsxRuntime.exports.jsx(Typography,Object.assign({variant:"body1"},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:formattedMessageIdPrefix$1+"instructions",defaultMessage:"Your inputs will be injected into the header as JSON and can be used to customize the user interface and functionality.",description:"Instructions of the Customize aiware header bar section"})}))]})),s.headerbarEnabled&&jsxRuntime.exports.jsx(Box$1,{children:jsxRuntime.exports.jsx(FormProvider,Object.assign({},i,{children:jsxRuntime.exports.jsxs(Grid,Object.assign({className:t.container,container:!0,spacing:5,"data-test":formattedMessageIdPrefix$1+"form-container"},{children:[jsxRuntime.exports.jsxs(Grid,Object.assign({item:!0,xs:12},{children:[jsxRuntime.exports.jsx(Typography,Object.assign({variant:"h6",gutterBottom:!0},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:formattedMessageIdPrefix$1+"headerbar-name",defaultMessage:"Name",description:"You can set a headerbar name"})})),jsxRuntime.exports.jsx(InputText,{variant:"outlined",type:"text",name:"name",fullWidth:!0,"data-test":"app-center-new.aiware-headerbar-name",inputProps:{maxLength:250,className:t.textInput},rules:{required:!0},onChange:n})]})),jsxRuntime.exports.jsxs(Grid,Object.assign({item:!0,xs:12},{children:[jsxRuntime.exports.jsx(Typography,Object.assign({variant:"h6",gutterBottom:!0},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:formattedMessageIdPrefix$1+"headerbar-elementId",defaultMessage:"Element ID",description:"You can set a headerbar element id"})})),jsxRuntime.exports.jsx(InputText,{variant:"outlined",name:"elementId",fullWidth:!0,"data-test":"app-center-new.aiware-headerbar-elementId",inputProps:{maxLength:250,className:t.textInput},rules:{required:!0},onChange:n})]})),jsxRuntime.exports.jsxs(Grid,Object.assign({item:!0,xs:12},{children:[jsxRuntime.exports.jsx(Typography,Object.assign({variant:"h6",gutterBottom:!0},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:formattedMessageIdPrefix$1+"headerbar-title",defaultMessage:"Title",description:"You can set a headerbar title"})})),jsxRuntime.exports.jsx(InputText,{variant:"outlined",type:"text",name:"title",fullWidth:!0,"data-test":"app-center-new.aiware-headerbar-title",inputProps:{maxLength:250,className:t.textInput},rules:{required:!0},onChange:n})]})),jsxRuntime.exports.jsxs(Grid,Object.assign({item:!0,xs:12},{children:[jsxRuntime.exports.jsx(Typography,Object.assign({variant:"h6",gutterBottom:!0},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:formattedMessageIdPrefix$1+"headerbar-backgroundColor",defaultMessage:"Background Color",description:"You can set a headerbar background color"})})),jsxRuntime.exports.jsx(InputText,{variant:"outlined",type:"text",name:"backgroundColor",fullWidth:!0,"data-test":"app-center-new.aiware-headerbar-backgroundColor",inputProps:{maxLength:250,className:t.textInput},onChange:n})]})),jsxRuntime.exports.jsxs(Grid,Object.assign({item:!0,xs:12},{children:[jsxRuntime.exports.jsx(Typography,Object.assign({variant:"h6",gutterBottom:!0},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:formattedMessageIdPrefix$1+"headerbar-zIndex",defaultMessage:"Z-Index",description:"You can set a headerbar z-index"})})),jsxRuntime.exports.jsx(InputText,{variant:"outlined",type:"number",name:"zIndex",fullWidth:!0,"data-test":"app-center-new.aiware-headerbar-zIndex",inputProps:{maxLength:250,className:t.textInput},onChange:n})]})),jsxRuntime.exports.jsxs(Grid,Object.assign({item:!0,xs:12},{children:[jsxRuntime.exports.jsx(Typography,Object.assign({variant:"h6",gutterBottom:!0},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:formattedMessageIdPrefix$1+"headerbar-logoSource",defaultMessage:"Logo Source",description:"You can set a headerbar logo source"})})),jsxRuntime.exports.jsx(InputText,{variant:"outlined",type:"text",name:"logoSrc",fullWidth:!0,"data-test":"app-center-new.aiware-headerbar-logoSrc",inputProps:{maxLength:5e3,className:t.textInput},onChange:n})]})),jsxRuntime.exports.jsx(Grid,Object.assign({item:!0,xs:12,style:{padding:"25px 0 0 25px"}},{children:jsxRuntime.exports.jsxs(Box$1,Object.assign({display:"flex",justifyContent:"start",alignItems:"center"},{children:[jsxRuntime.exports.jsx(InputCheckbox,{name:"help",checked:s.aiwareHeader.help,onChange:o,"data-test":"app-center-new.aiware-headerbar-checkbox-help",label:jsxRuntime.exports.jsx(FormattedMessage,{id:formattedMessageIdPrefix$1+"checkbox-help",defaultMessage:"Help",description:"Help field checkbox"})}),jsxRuntime.exports.jsx(InputCheckbox,{name:"notification",checked:s.aiwareHeader.notification,onChange:o,"data-test":"app-center-new.aiware-headerbar-checkbox-notification",label:jsxRuntime.exports.jsx(FormattedMessage,{id:formattedMessageIdPrefix$1+"checkbox-notification",defaultMessage:"Notification",description:"Notification field checkbox"})}),jsxRuntime.exports.jsx(InputCheckbox,{name:"displaySupportChat",checked:s.aiwareHeader.displaySupportChat,onChange:o,"data-test":"app-center-new.aiware-headerbar-checkbox-displaySupportChat",label:jsxRuntime.exports.jsx(FormattedMessage,{id:formattedMessageIdPrefix$1+"checkbox-displaySupportChat",defaultMessage:"Display Support Chat",description:"Display support chat field checkbox"})}),jsxRuntime.exports.jsx(InputCheckbox,{name:"hidePasswordReset",checked:s.aiwareHeader.hidePasswordReset,onChange:o,"data-test":"app-center-new.aiware-headerbar-checkbox-hidePasswordReset",label:jsxRuntime.exports.jsx(FormattedMessage,{id:formattedMessageIdPrefix$1+"checkbox-hidePasswordReset",defaultMessage:"Hide Password Reset",description:"Hide password reset field checkbox"})})]}))}))]}))}))})]}))};function _extends(){return(_extends=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var a,s=arguments[t];for(a in s)Object.prototype.hasOwnProperty.call(s,a)&&(e[a]=s[a])}return e}).apply(this,arguments)}var SvgEditorDummy=function(e){return react.exports.createElement("svg",_extends({width:660,height:233,fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),_path=_path||react.exports.createElement("path",{fill:"#E5E5E5",d:"M0 0h660v233H0z"}),_g=_g||react.exports.createElement("g",{filter:"url(#editorDummy_svg__a)"},react.exports.createElement("path",{fill:"#fff",d:"M-30-690h720V348H-30z"})),_path2=_path2||react.exports.createElement("path",{opacity:.4,d:"M0 4a4 4 0 0 1 4-4h652a4 4 0 0 1 4 4v225a4 4 0 0 1-4 4H4a4 4 0 0 1-4-4V4Z",fill:"#303841"}),_path3=_path3||react.exports.createElement("path",{opacity:.4,d:"M0 4a4 4 0 0 1 4-4h27v233H4a4 4 0 0 1-4-4V4Z",fill:"#242C35"}),react.exports.createElement("text",{opacity:.4,fill:"#fff",xmlSpace:"preserve",style:{whiteSpace:"pre"},fontFamily:"Nunito Sans",fontSize:10,fontWeight:600,letterSpacing:0},_tspan=_tspan||react.exports.createElement("tspan",{x:13.004,y:33.29},"1"),_tspan2=_tspan2||react.exports.createElement("tspan",{x:13.004,y:59.29},"2"),_tspan3=_tspan3||react.exports.createElement("tspan",{x:13.004,y:85.29},"3"),_tspan4=_tspan4||react.exports.createElement("tspan",{x:13.004,y:111.29},"4"),_tspan5=_tspan5||react.exports.createElement("tspan",{x:13.004,y:137.29},"5"),_tspan6=_tspan6||react.exports.createElement("tspan",{x:13.004,y:163.29},"6"),_tspan7=_tspan7||react.exports.createElement("tspan",{x:13.004,y:189.29},"7"),_tspan8=_tspan8||react.exports.createElement("tspan",{x:13.004,y:215.29},"8")),react.exports.createElement("g",{opacity:.4,fontFamily:"Nunito Sans",fontSize:14,letterSpacing:0},react.exports.createElement("text",{fill:"#fff",xmlSpace:"preserve",style:{whiteSpace:"pre"}},_tspan9=_tspan9||react.exports.createElement("tspan",{x:62.352,y:58.606}," {"),_tspan10=_tspan10||react.exports.createElement("tspan",{x:46,y:84.606}),_tspan11=_tspan11||react.exports.createElement("tspan",{x:84.186,y:84.606},": blue;"),_tspan12=_tspan12||react.exports.createElement("tspan",{x:46,y:110.606}),_tspan13=_tspan13||react.exports.createElement("tspan",{x:164.098,y:110.606},": yellow;"),_tspan14=_tspan14||react.exports.createElement("tspan",{x:46,y:136.606}),_tspan15=_tspan15||react.exports.createElement("tspan",{x:94.699,y:136.606},": 1px solid black;"),_tspan16=_tspan16||react.exports.createElement("tspan",{x:46,y:162.606},"}"),_tspan17=_tspan17||react.exports.createElement("tspan",{x:54.162,y:188.606}," {"),_tspan18=_tspan18||react.exports.createElement("tspan",{x:46,y:214.606}),_tspan19=_tspan19||react.exports.createElement("tspan",{x:84.186,y:214.606},": red;")),react.exports.createElement("text",{fill:"#B39DDB",xmlSpace:"preserve",style:{whiteSpace:"pre"}},_tspan20=_tspan20||react.exports.createElement("tspan",{x:46,y:58.606},"h1"),_tspan21=_tspan21||react.exports.createElement("tspan",{x:46,y:188.606},"p")),react.exports.createElement("text",{fill:"#EF9A9A",xmlSpace:"preserve",style:{whiteSpace:"pre"}},_tspan22=_tspan22||react.exports.createElement("tspan",{x:53.191,y:84.606},"color"),_tspan23=_tspan23||react.exports.createElement("tspan",{x:53.191,y:110.606},"background-color"),_tspan24=_tspan24||react.exports.createElement("tspan",{x:53.191,y:136.606},"border"),_tspan25=_tspan25||react.exports.createElement("tspan",{x:53.191,y:214.606},"color")),react.exports.createElement("text",{fill:"#5C6269",xmlSpace:"preserve",style:{whiteSpace:"pre"}},_tspan26=_tspan26||react.exports.createElement("tspan",{x:46,y:32.606},"\x3c!-- Default CSS --\x3e"))),_defs=_defs||react.exports.createElement("defs",null,react.exports.createElement("filter",{id:"editorDummy_svg__a",x:-44,y:-704,width:748,height:1066,filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB"},react.exports.createElement("feFlood",{floodOpacity:0,result:"BackgroundImageFix"}),react.exports.createElement("feColorMatrix",{in:"SourceAlpha",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0",result:"hardAlpha"}),react.exports.createElement("feOffset",null),react.exports.createElement("feGaussianBlur",{stdDeviation:7}),react.exports.createElement("feColorMatrix",{values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.25 0"}),react.exports.createElement("feBlend",{in2:"BackgroundImageFix",result:"effect1_dropShadow_2227_22407"}),react.exports.createElement("feBlend",{in:"SourceGraphic",in2:"effect1_dropShadow_2227_22407",result:"shape"}))))};const formattedMessageIdPrefix="os-app-center-new.headerbar-step.customize-headerbar-styles.";var CustomizeAIWareHeaderbarStyles=()=>jsxRuntime.exports.jsxs(Stack,Object.assign({spacing:3,"data-test":formattedMessageIdPrefix+"container"},{children:[jsxRuntime.exports.jsxs(Box$1,Object.assign({sx:{opacity:.5}},{children:[jsxRuntime.exports.jsxs(Stack,Object.assign({direction:"row",alignItems:"center",spacing:1},{children:[jsxRuntime.exports.jsx(Typography,Object.assign({variant:"h4"},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:formattedMessageIdPrefix+"title",defaultMessage:"Customize the aiWARE Header Styles (CSS)",description:"Title of the Customize aiware headerbar styles section"})})),jsxRuntime.exports.jsx(Typography,Object.assign({variant:"body1"},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:formattedMessageIdPrefix+"optional",defaultMessage:"(Optional)",description:"Optional modifier for titles"})})),jsxRuntime.exports.jsx(Chip$1,{color:"primary",label:"Coming Soon"})]})),jsxRuntime.exports.jsx(Typography,Object.assign({variant:"body1"},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:formattedMessageIdPrefix+"instructions",defaultMessage:"Your JSON will be injected into the header to customize the user interface and functionality. View customizable options",description:"Instructions of the Customize aiware headerbar styles section"})}))]})),jsxRuntime.exports.jsxs(Stack,Object.assign({spacing:1,alignItems:"flex-start"},{children:[jsxRuntime.exports.jsx(SvgEditorDummy,{}),jsxRuntime.exports.jsx(Button,Object.assign({variant:"text",sx:{opacity:.5}},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:formattedMessageIdPrefix+"restore-default-css-button-label",defaultMessage:"Restore Default CSS",description:"Button label for the restore default css button on the headerbar styles page of app onboarding"})}))]}))]}));const useStyles$a=makeStyles()(e=>({container:{padding:e.spacing(6),maxWidth:"100%"},divider:{width:"60rem",margin:e.spacing(5,5,1,6)},list:{width:"60rem",padding:e.spacing(6,0),marginLeft:e.spacing(6)}}));var HeaderbarStep=({handleOnValidate:e})=>{const t=useDispatch();var a=useSelector(selectApp),s=useStyles$a()["classes"];return jsxRuntime.exports.jsxs(Grid,Object.assign({container:!0,flexDirection:"column",rowSpacing:5,columnSpacing:6,className:s.container,"data-test":"app-new-headerbar-step-container"},{children:[jsxRuntime.exports.jsx(Grid,Object.assign({item:!0,flexShrink:0},{children:jsxRuntime.exports.jsx(AiWareHeaderbarToggle,{checked:a.headerbarEnabled,onChange:e=>{t(actions.appFormState.updateAppFormField({field:"headerbarEnabled",value:e.target.checked}))}})})),jsxRuntime.exports.jsx(Grid,Object.assign({item:!0,flexShrink:0},{children:jsxRuntime.exports.jsx(CustomizeAIWareHeaderbar,{handleOnValidate:e})})),jsxRuntime.exports.jsx(Grid,Object.assign({item:!0,flexShrink:0},{children:jsxRuntime.exports.jsx(CustomizeAIWareHeaderbarStyles,{})}))]}))};const useStyles$9=makeStyles()(e=>({container:{padding:e.spacing(6),maxWidth:"100%"},divider:{width:"60rem",margin:e.spacing(5,5,1,6)},list:{width:"60rem",padding:e.spacing(6,0),marginLeft:e.spacing(6)},chip:{marginLeft:"10px"},inputContainer:{paddingTop:"10px"},root:{"&":{width:"100%"}},grayText:{color:"gray"},textInput:{boxSizing:"content-box"}})),ConfigFields=()=>{const a=useDispatch(),s=useSelector(selectConfigFields),e=e=>lodash.exports.map(e,e=>({name:e.name,configLevel:e.configLevel,type:e.type,default:isEmpty_1(e.defaultValue)?"N/A":e.defaultValue})),[n,i]=react.exports.useState(e(s));react.exports.useEffect(()=>{i(e(s))},[s]);const t=(e=!1,t=-1)=>{e={name:"APP_CENTER_CONFIG_FIELDS_FORM",config:{name:"Custom Fields",isEdit:e,editIndex:t}};a(mountPanel({panelId:"APP_CENTER_CONFIG_FIELDS_FORM",microFrontend:e,panelConfig:{type:"APP_BAR_PANEL_TEMPLATE",marginTop:55,marginStart:0,zIndex:1010}}))};return jsxRuntime.exports.jsx(ListField,{idPrefix:"aob-functionality-config-fields",heading:"Application Config Fields",description:"Does your application require config fields? If so, specify them here. Leave blank if not..",actionButtonLabel:"Add Config",items:n,columnNames:["Name","Config Level","Type","Default","",""],canEdit:!0,canDelete:!0,onActionClick:()=>t(),onEditClick:e=>{e=n[e],e=findIndex_1(s,{name:e.name,type:e.type});0<=e&&t(!0,e)},onDeleteClick:e=>{var t=n[e],t=findIndex_1(s,{name:t.name,type:t.type});0<=t&&a(actions.appFormState.removeConfigField({removeIndex:t,configToDelete:s[e]}))},onRequestSort:(e,t)=>{i(orderBy_1(n,lowerCase_1(e),t))}})},urlRegex$1=/[(http(s)?):\/\/(www\.)?a-zA-Z0-9@:%._\+~#=]{2,256}\.[a-z]{2,6}\b([-a-zA-Z0-9@:%_\+.~#?&//=]*)/,semverRegex=/^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$/,npmModuleNameRegex=/^(@[a-z0-9-~][a-z0-9-._~]*\/)?[a-z0-9-~][a-z0-9-._~]*$/,githubSshUrlRegex=/^git@github.com:[a-zA-Z0-9-._~/]+?.git$/,uriScopeRegex=/^(\/[a-zA-Z0-9-_.~]+)+$/,FunctionalityStep=({handleOnValidate:e})=>{var t=useStyles$9()["classes"];const a=useDispatch();var s=useSelector(selectAppUrl);const n=useForm({mode:"onChange",defaultValues:{url:s}});react.exports.useEffect(()=>{null!=e&&e(n.formState.isValid)},[n.formState.isValid]);s=e=>{var{name:e,value:t}=e.target;a(actions.appFormState.updateAppFormField({field:e,value:t}))};return jsxRuntime.exports.jsx(FormProvider,Object.assign({},n,{children:jsxRuntime.exports.jsxs(Grid,Object.assign({container:!0,rowSpacing:5,columnSpacing:6,className:t.container,"data-test":"os-app-center-new-functionality-step-container"},{children:[jsxRuntime.exports.jsxs(Grid,Object.assign({item:!0,xs:12},{children:[jsxRuntime.exports.jsx(Typography,Object.assign({variant:"h6",gutterBottom:!0,"data-test":"os-app-center-new.application-type-title"},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-app-center-new.application-type-title-formattedMessage",defaultMessage:"Application Type",description:"Application Type title"})})),jsxRuntime.exports.jsx(Typography,Object.assign({variant:"caption","data-test":"os-app-center-new.application-type-description"},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-app-center-new.application-type-description-formattedMessage",defaultMessage:"Please select the application type from the list below:",description:"Application Type description"})})),jsxRuntime.exports.jsx("div",Object.assign({className:t.inputContainer},{children:jsxRuntime.exports.jsxs(InputSelect,Object.assign({className:t.root,onChange:s,"data-test":"os-app-center-new.app-type-input",fullWidth:!0,value:"web",name:"app-type"},{children:[jsxRuntime.exports.jsxs(MenuItem,Object.assign({value:"web"},{children:[jsxRuntime.exports.jsx("b",{children:"Web Application"})," ",jsxRuntime.exports.jsx("span",Object.assign({className:t.grayText},{children:"(Accessible via Browser)"}))]})),jsxRuntime.exports.jsxs(MenuItem,Object.assign({disabled:!0},{children:[jsxRuntime.exports.jsx("b",{children:"Docker Application"})," (Run on aiWARE)"," ",jsxRuntime.exports.jsx(Chip$1,{color:"primary",className:t.chip,size:"small",label:"Coming Soon"})]})),jsxRuntime.exports.jsxs(MenuItem,Object.assign({disabled:!0},{children:[jsxRuntime.exports.jsx("b",{children:"Kubernetes"})," ",jsxRuntime.exports.jsx(Chip$1,{color:"primary",className:t.chip,size:"small",label:"Coming Soon"})]}))]}))}))]})),jsxRuntime.exports.jsxs(Grid,Object.assign({item:!0,xs:12},{children:[jsxRuntime.exports.jsx(Typography,Object.assign({variant:"h6",gutterBottom:!0,"data-test":"os-app-center-new.application-url-title"},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-app-center-new.application-url-title-formattedMessage",defaultMessage:"Application URL",description:"Application url title"})})),jsxRuntime.exports.jsx(Typography,Object.assign({variant:"caption","data-test":"os-app-center-new.application-url-description"},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-app-center-new.integration-description-formattedMessage",defaultMessage:"Provide the url to access your application. Include http or https.",description:"Application url description"})})),jsxRuntime.exports.jsx("div",Object.assign({className:t.inputContainer},{children:jsxRuntime.exports.jsx(InputText,{className:t.textInput,required:!0,type:"url","data-test":"os-app-center-new.url-input",rules:{required:!0,pattern:{value:urlRegex$1,message:"Must be a valid URL including protocol."}},onChange:s,placeholder:"URL",name:"url",fullWidth:!0})}))]})),jsxRuntime.exports.jsx(Grid,Object.assign({item:!0,xs:12},{children:jsxRuntime.exports.jsx(ConfigFields,{})}))]}))}))},useStyles$8=makeStyles()(e=>({container:{padding:e.spacing(6),maxWidth:"100%"},divider:{width:"60rem",margin:e.spacing(5,5,1,6)},list:{width:"60rem",padding:e.spacing(6,0),marginLeft:e.spacing(6)},chip:{marginLeft:"10px",marginTop:"9px",marginRight:"15px",background:"#214167"},inputContainer:{paddingTop:"10px"},root:{"&":{width:"100%"}},checked:{color:"#6098D1"},textInput:{boxSizing:"content-box"}})),useOneClickCopy=a=>{const[t,s]=react.exports.useState(!1);return[e=>{var t;navigator.clipboard.writeText(null!=(t=a.current.dataset.copyToClipboardText)?t:a.current.innerText),s(!0)},e=>jsxRuntime.exports.jsx(Tooltip,Object.assign({open:t,onClose:()=>{s(!1)},title:jsxRuntime.exports.jsx(FormattedMessage,{id:"copied-to-clipboard",defaultMessage:"Copied to clipboard",description:"Copied to clipboard"})},e,{children:e.children}))]};var OAuthClientSecret=({appId:a,disabled:e})=>{const s=useSelector(selectApiConfigs),[t,n]=react.exports.useState(""),[i,o]=react.exports.useState(!1),[r,l]=react.exports.useState(!1),[p,d]=react.exports.useState(!1);var c=react.exports.useRef();const[u,x]=useOneClickCopy(c);react.exports.useEffect(()=>{!lodash.exports.isEmpty(t)&&p&&(u(null),d(!1))});const m=react.exports.useRef();const[g,h]=react.exports.useState(!1),[j,f]=react.exports.useState(!1);const[b,y]=react.exports.useState(!1);return jsxRuntime.exports.jsxs(Stack,Object.assign({direction:"column",spacing:2,"data-test":"oauth-client-secret-retrival-tool"},{children:[jsxRuntime.exports.jsx(FormLabel,Object.assign({htmlFor:"clientSecret"},{children:jsxRuntime.exports.jsx(Typography,Object.assign({variant:"h6"},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-app-center-new.oauth-client-secret-label-formattedMessage",defaultMessage:"Client Secret: OAuth",description:"Lable for the client secret input when selecting OAuth"})}))})),jsxRuntime.exports.jsxs(Stack,Object.assign({direction:"row",spacing:2,alignItems:"center",width:"60%"},{children:[jsxRuntime.exports.jsx(x,{children:jsxRuntime.exports.jsx(InputText,{name:"oauthClientSecret",fullWidth:!0,disabled:!0,ref:c,"data-copy-to-clipboard-text":t,id:"clientSecret",color:"secondary",style:{backgroundColor:"#F2F5F9"},type:j?"text":"password",size:"small",value:t,InputProps:{endAdornment:jsxRuntime.exports.jsx(InputAdornment,Object.assign({position:"end"},{children:jsxRuntime.exports.jsx(IconButton,Object.assign({"data-test":"oauth-client-secret-reveal","aria-label":"toggle client secret visibility",onClick:()=>{lodash.exports.isEmpty(t)?h(!0):f(!j)},disabled:e},{children:j?jsxRuntime.exports.jsx(default_1$4,{}):jsxRuntime.exports.jsx(default_1$1,{})}))}))}})}),jsxRuntime.exports.jsx(IconButton,Object.assign({"aria-label":"copy client secret",onClick:e=>{if(lodash.exports.isEmpty(t))return d(!0),void h(!0);u(e)},disabled:e,"data-test":"oauth-client-secret-copy"},{children:jsxRuntime.exports.jsx(Copy,{})}))]})),jsxRuntime.exports.jsxs(Collapse,Object.assign({in:g},{children:[jsxRuntime.exports.jsx(FormLabel,Object.assign({htmlFor:"clientSecret"},{children:jsxRuntime.exports.jsx(Typography,Object.assign({variant:"h6"},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-app-center-new.oauth-client-secret-password-input-label-formattedMessage",defaultMessage:"Please enter your account password to reveal client secret",description:"Lable for the client secret password input when selecting OAuth"})}))})),jsxRuntime.exports.jsx("form",Object.assign({onSubmit:e=>{e.preventDefault();var t,e=null==(e=m.current)?void 0:e.value;lodash.exports.isEmpty(e)||(t=e,__awaiter(void 0,void 0,void 0,function*(){console.log("handleFetchClientSecret Start");try{o(!0);var e=yield getOAuthClientSecret(s,{id:a,password:t});console.log("Result:",e),n(e.application.clientSecret),h(!1)}catch(e){m.current.focus(),l(!0)}finally{o(!1)}}))}},{children:jsxRuntime.exports.jsxs(Stack,Object.assign({direction:"row",spacing:2},{children:[jsxRuntime.exports.jsx(InputText,{name:"password",InputProps:{endAdornment:jsxRuntime.exports.jsx(InputAdornment,Object.assign({position:"end"},{children:jsxRuntime.exports.jsx(IconButton,Object.assign({"aria-label":"toggle password visibility",onClick:()=>{y(!b)},"data-test":"oauth-client-secret-password-reveal"},{children:b?jsxRuntime.exports.jsx(default_1$4,{}):jsxRuntime.exports.jsx(default_1$1,{})}))}))},inputRef:m,id:"password",color:r?"error":"secondary",type:b?"text":"password",size:"small"}),i?jsxRuntime.exports.jsx(CircularProgress,{color:"secondary"}):jsxRuntime.exports.jsx(IconButton,Object.assign({"aria-label":"submit password",type:"submit","data-test":"oauth-client-secret-password-submit"},{children:jsxRuntime.exports.jsx(ArrowForward,{})}))]}))}))]}))]}))};const AuthenticationStep=({handleOnValidate:e})=>{var t=useStyles$8()["classes"],a=useSelector(selectApp),s=useSelector(selectIsEditForm)["isEditForm"];const n=useDispatch();const i=useForm({mode:"onChange",defaultValues:{oauthUrl:"",authMethod:"none"}});react.exports.useEffect(()=>{null!=e&&e(i.formState.isValid)},[i.formState.isValid]);var o=e=>{var{name:e,value:t}=e.target;n(actions.appFormState.updateAppFormField({field:e,value:t}))};return jsxRuntime.exports.jsx(Box$1,Object.assign({"data-test":"os-app-center-new-authentication-step-container"},{children:jsxRuntime.exports.jsx(FormProvider,Object.assign({},i,{children:jsxRuntime.exports.jsxs(Grid,Object.assign({container:!0,rowSpacing:5,columnSpacing:6,className:t.container},{children:[jsxRuntime.exports.jsxs(Grid,Object.assign({item:!0,xs:12},{children:[jsxRuntime.exports.jsx(Heading,{title:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-app-center-new.authentication-title-formattedMessage",defaultMessage:"Authentication",description:"Authentication title"}),description:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-app-center-new.authentication-description-formattedMessage",defaultMessage:"Default authentication is None. OAuth and JWT authentication protocols coming soon",description:"authentication description"}),testName:"os-app-center-new.authentication"}),jsxRuntime.exports.jsx(Typography,{variant:"h6",gutterBottom:!0,"data-test":"os-app-center-new.authentication-title"}),jsxRuntime.exports.jsx(Typography,{variant:"caption","data-test":"os-app-center-new.authentication-description"}),jsxRuntime.exports.jsx("div",Object.assign({className:t.inputContainer},{children:jsxRuntime.exports.jsxs(InputRadioGroup,Object.assign({"data-test":"authentication-radio-group",name:"authMethod",value:a.authMethod,onChange:o,rules:{required:!0},row:!0},{children:[jsxRuntime.exports.jsx(FormControlLabel,{value:"none",control:jsxRuntime.exports.jsx(Radio,{"data-test":"radio-none"}),label:jsxRuntime.exports.jsx(Typography,Object.assign({variant:"h6",color:"textSecondary"},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-app-center-new.radio-None-formattedMessage",defaultMessage:"None",description:"None"})}))}),jsxRuntime.exports.jsx(FormControlLabel,{value:"oauth",control:jsxRuntime.exports.jsx(Radio,{"data-test":"radio-oauth"}),label:jsxRuntime.exports.jsx(Typography,Object.assign({variant:"h6"},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-app-center-new.radio-OAuth-formattedMessage",defaultMessage:"OAuth",description:"OAuth"})}))}),jsxRuntime.exports.jsx(FormControlLabel,{value:"jwt",disabled:!0,control:jsxRuntime.exports.jsx(Radio,{"data-test":"radio-jwt"}),label:jsxRuntime.exports.jsx(Typography,Object.assign({variant:"h6",style:{color:"lightgray"}},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-app-center-new.radio-JWT-formattedMessage",defaultMessage:"JWT",description:"JWT"})}))}),jsxRuntime.exports.jsx(Chip$1,{color:"primary",className:t.chip,size:"small",label:"Coming Soon"})]}))}))]})),jsxRuntime.exports.jsx(Grid,Object.assign({item:!0,xs:12},{children:jsxRuntime.exports.jsx(Collapse,Object.assign({in:lodash.exports.isEqual(a.authMethod,"oauth")},{children:jsxRuntime.exports.jsxs(Stack,Object.assign({spacing:5,"data-test":"authentication-oauth-section"},{children:[jsxRuntime.exports.jsx(InputText,{inputProps:{className:t.textInput},name:"oauthUrl",value:a.oauthUrl,onChange:o,fullWidth:!0,variant:"outlined",label:jsxRuntime.exports.jsx(Typography,Object.assign({variant:"h2",style:{color:"lightgray"}},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-app-center-new.oauth-url-formattedMessage",defaultMessage:"OAuth URL",description:"Lable for the oauth url input when selecting OAuth"})})),InputLabelProps:{disableAnimation:!1},rules:{required:lodash.exports.isEqual(a.authMethod,"oauth"),pattern:{value:urlRegex$1,message:"Must be a valid URL including protocol."},maxLength:1e3}}),s?jsxRuntime.exports.jsx(OAuthClientSecret,{appId:a.id}):jsxRuntime.exports.jsxs(Box$1,{children:[jsxRuntime.exports.jsx(OAuthClientSecret,{appId:"",disabled:!0}),jsxRuntime.exports.jsx(Typography,Object.assign({color:"secondary"},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-app-center-new.oauth-client-secret-not-available-formattedMessage",defaultMessage:"You will be able to retrieve the oauth client secret here after submitting this application.",description:"Instruction durring application onboarding on how to find oauth client secret after application submission."})}))]})]}))}))}))]}))}))}))},useStyles$7=makeStyles()(e=>({container:{width:"100%",padding:"25px 30px"},subheading:{maxWidth:"100%",minWidth:"48.75rem",padding:"30px 0"},titleDesc:{width:"60%",display:"inline-block"},appLogo:{width:"40%",display:"inline-block"},text:{width:"39.5rem",padding:"14px 0",borderBottom:"0.5px solid #D5DFE9",fontWeight:400},textCollapsible:{width:"39.5rem",padding:"8px 0",borderBottom:"0.5px solid #D5DFE9",cursor:"pointer"},collapse:{width:"39.5rem"},collapseContent:{maxHeight:200,overflow:"auto"},pre:{whiteSpace:"pre-line"},asterisk:{color:"#D43060",margin:"0 2px"}})),useStyles$6=makeStyles()(e=>({root:{borderRadius:"50%",border:"1px solid #D5DFE9",display:"flex",justifyContent:"center",alignItems:"center",overflow:"hidden",width:e.spacing(8),height:e.spacing(8)},logo:{maxWidth:"100%",maxHeight:"100%"},veritoneLogo:{maxWidth:"100%",maxHeight:"100%"}})),AppLogo=({path:e})=>{var t=useStyles$6()["classes"];return jsxRuntime.exports.jsx("div",Object.assign({className:t.root},{children:jsxRuntime.exports.jsx("img",{className:t.logo+" "+(!e&&t.veritoneLogo),src:e||img$1u,alt:"app logo"})}))},Row=({label:e,value:t,style:a,testName:s,icon:n,asterisk:i,handleOpenCollapse:o,textTransformValue:r="capitalize"})=>jsxRuntime.exports.jsxs(Box$1,Object.assign({display:"flex",justifyContent:"space-between",alignItems:"center",textTransform:r,"data-test":s+"-container"},{children:[jsxRuntime.exports.jsx(Typography,Object.assign({variant:"h6","data-test":"label-"+s},{children:e})),jsxRuntime.exports.jsxs(Box$1,Object.assign({className:a,display:"flex",justifyContent:"space-between",alignItems:"center",onClick:o},{children:[jsxRuntime.exports.jsxs(Typography,Object.assign({variant:"h6",sx:{fontWeight:400}},{children:[t,i]})),jsxRuntime.exports.jsx(IconButton,Object.assign({"aria-label":"expand row",size:"small",onClick:o,"data-test":s+"-expand-action-trigger"},{children:n}))]}))]})),ConfirmationStep=()=>{var e=useStyles$7()["classes"],t=useSelector(selectApp);return jsxRuntime.exports.jsxs(Box$1,Object.assign({className:e.container,"data-test":"os-app-center-new-confirmation-step-container"},{children:[jsxRuntime.exports.jsxs(Grid,Object.assign({className:e.subheading},{children:[jsxRuntime.exports.jsxs("div",Object.assign({className:e.titleDesc},{children:[jsxRuntime.exports.jsx(Box$1,Object.assign({display:"flex",alignItems:"center",textTransform:"capitalize","data-test":"os-app-center-new-confirmation-step.app-name"},{children:jsxRuntime.exports.jsx(Typography,Object.assign({variant:"h2"},{children:lodash.exports.isEmpty(t.name)?"-":t.name}))})),jsxRuntime.exports.jsx(Box$1,Object.assign({"data-test":"os-app-center-new-confirmation-step.app-description"},{children:jsxRuntime.exports.jsx(Typography,Object.assign({variant:"caption",color:"#2A323C"},{children:lodash.exports.isEmpty(t.description)?"-":t.description}))}))]})),jsxRuntime.exports.jsx("div",Object.assign({"data-test":"os-app-center-new-confirmation-step.app-logo",className:e.appLogo},{children:jsxRuntime.exports.jsx(AppLogo,{path:t.iconPath})}))]})),jsxRuntime.exports.jsxs(Box$1,Object.assign({sx:{width:"100%"},"data-test":"os-app-center-new-confirmation-step.row-container"},{children:[jsxRuntime.exports.jsx(Row,{label:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-app-center-new-confirmation-step.app-url-formattedMessage",defaultMessage:"Application URL:",description:"application url"}),textTransformValue:"none",value:lodash.exports.isEmpty(t.url)?"-":t.url,style:e.text,testName:"os-app-center-new-confirmation-step.app-url"}),jsxRuntime.exports.jsx(Row,{label:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-app-center-new-confirmation-step.custom-fields-formattedMessage",defaultMessage:"Custom Fields:",description:"Custom Fields"}),value:lodash.exports.isEmpty(t.configFields)?"-":lodash.exports.join(lodash.exports.map(t.configFields,e=>e.name),", "),style:e.text,testName:"os-app-center-new-confirmation-step.app-custom-fields"}),jsxRuntime.exports.jsx(Row,{label:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-app-center-new-confirmation-step.app-headerbar-formattedMessage",defaultMessage:"Headerbar:",description:"headerbar"}),value:t.headerbarEnabled?"On (Default)":"Off",style:e.text,testName:"os-app-center-new-confirmation-step.app-headerbar"}),jsxRuntime.exports.jsx(Row,{label:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-app-center-new-confirmation-step.app-auth-formattedMessage",defaultMessage:"Authentication:",description:"auth"}),value:"None (Default)",style:e.text,testName:"os-app-center-new-confirmation-step.app-auth"}),jsxRuntime.exports.jsx(Row,{label:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-app-center-new.confirmation-step-app-packages-formattedMessage",defaultMessage:"App Packages:",description:"app packages"}),value:lodash.exports.isEmpty(t.flows)&&lodash.exports.isEmpty(t.engines)&&lodash.exports.isEmpty(t.schemas)?"-":`Automate Flows (${t.flows.length}), Engines (${t.engines.length}), Schemas (${t.schemas.length})`,style:e.text,testName:"os-app-center-new-confirmation-step.app-packages"})]}))]}))},formatDate=e=>{if(!e)return"--/--/-- --:-- --";const t=new Date(e);return t.toLocaleDateString()+" "+t.toLocaleTimeString("en-US",{hour:"numeric",minute:"numeric",hour12:!0})};var EngineLinking=()=>{const e=useDispatch();var t=useSelector(selectApp)["engines"];const[a,s]=react.exports.useState(lodash.exports.map(t,e=>({name:e.name,edgeVersion:e.edgeVersion,modifiedDateTime:formatDate(e.modifiedDateTime)})));return jsxRuntime.exports.jsx(ListField,{idPrefix:"aob.engine-linking-list.engines",heading:"aiWARE Engines to Include with App Package",description:"Select engines that interface with your application to be included with your application package.",actionButtonLabel:"Add Engine",items:a,columnNames:["Name","Version","Last Updated"],canEdit:!1,canDelete:!1,onActionClick:()=>{e(mountPanel({panelId:"APP_CENTER_ADD_ENGINE_PANEL",microFrontend:{name:"APP_CENTER_ADD_ENGINE_PANEL",config:{name:"Add Engine"}},panelConfig:{type:"APP_BAR_PANEL_TEMPLATE",marginTop:55,marginStart:0,size:"large",zIndex:1001}}))},onRequestSort:(t,e)=>{s(lodash.exports.orderBy(a,[e=>lodash.exports.lowerCase(e[lodash.exports.camelCase(t)])],e))}})},FlowLinking=()=>{const e=useDispatch();var t=useSelector(selectApp)["flows"];const[a,s]=react.exports.useState(lodash.exports.map(t,e=>({name:e.name,version:e.edgeVersion,lastUpdated:formatDate(e.modifiedDateTime)})));return jsxRuntime.exports.jsx(ListField,{idPrefix:"aob.engine-linking-list.flows",heading:"Automate Flows to Include with App Package",description:"Select Automate flows that interface with your application to be included with your application package.",actionButtonLabel:"Add Flow",items:a,columnNames:["Name","Version","Last Updated"],canEdit:!1,canDelete:!1,onDeleteClick:lodash.exports.noop,onEditClick:lodash.exports.noop,onActionClick:()=>{e(mountPanel({panelId:"APP_CENTER_ADD_FLOW_PANEL",microFrontend:{name:"APP_CENTER_ADD_FLOW_PANEL",config:{name:"Add Flow"}},panelConfig:{type:"APP_BAR_PANEL_TEMPLATE",marginTop:55,marginStart:0,size:"large",zIndex:1001}}))},onRequestSort:(t,e)=>{s(lodash.exports.orderBy(a,[e=>lodash.exports.lowerCase(e[lodash.exports.camelCase(t)])],e))}})},Schema=()=>{const e=useDispatch();var t=useSelector(selectApp)["schemas"];const[a,s]=react.exports.useState(lodash.exports.map(t,e=>({name:e.name,version:e.version,lastUpdated:formatDate(e.modifiedDateTime)})));return jsxRuntime.exports.jsx(ListField,{idPrefix:"aob.engine-linking-list.schemas",heading:"aiWARE Data Schema to Include with App Package",description:"Select Data Schemas that interface with your application to be included with your application package.",actionButtonLabel:"Add Schema",items:a,columnNames:["Name","Version","Last Updated"],canEdit:!1,canDelete:!1,onEditClick:lodash.exports.noop,onDeleteClick:lodash.exports.noop,onActionClick:()=>{e(mountPanel({panelId:"APP_CENTER_ADD_SCHEMA_PANEL",microFrontend:{name:"APP_CENTER_ADD_SCHEMA_PANEL",config:{name:"Add Schema"}},panelConfig:{type:"APP_BAR_PANEL_TEMPLATE",marginTop:55,marginStart:0,size:"large",zIndex:1001}}))},onRequestSort:(t,e)=>{s(lodash.exports.orderBy(a,[e=>lodash.exports.lowerCase(e[lodash.exports.camelCase(t)])],e))}})},AppPackagesStep=()=>jsxRuntime.exports.jsxs(Stack,Object.assign({spacing:5,p:6,"data-test":"app-package"},{children:[jsxRuntime.exports.jsx(Box$1,{children:jsxRuntime.exports.jsx(FlowLinking,{})}),jsxRuntime.exports.jsx(Box$1,{children:jsxRuntime.exports.jsx(EngineLinking,{})}),jsxRuntime.exports.jsx(Box$1,{children:jsxRuntime.exports.jsx(Schema,{})})]}));const useBasicInfoStyles=makeStyles()(e=>({container:{padding:e.spacing(6),justifyContent:"space-around","& input, textarea":{fontWeight:400},"& fieldset":{borderColor:"#D5DFE9"}},textInput:{padding:26},labelRow:{display:"flex",gap:e.spacing(2),alignItems:"flex-end"},optional:{fontSize:10,marginBottom:e.spacing(1)},select:{"& > div":{fontWeight:400,width:"280px"}}})),useIconImporterStyles=makeStyles()(e=>({iconBox:{display:"flex",justifyContent:"center",alignItems:"center",width:200,height:200,padding:e.spacing(3),border:"1px dashed #D5DFE9",borderRadius:5,transition:"all .2s ease","&:hover":{border:"1px solid #dde6ee"}},innerBox:{position:"relative",background:"#F5F5F5",width:"100%",height:"100%",borderRadius:5,display:"flex",justifyContent:"center",alignItems:"center",transition:"all .2s ease","&:hover":{background:"#dde6ee"}},fileInput:{display:"none"},addIcon:{color:"#555F7C",height:42,width:42,"&:hover":{color:"#555F7C"}},iconPreview:{objectFit:"cover",borderRadius:5,width:"100%",maxHeight:"100%"},removeIcon:{position:"absolute",top:10,right:10}})),useDragAndDrop=({acceptedFileTypes:i})=>{const t=react.exports.useRef(),e=react.exports.useRef(),o=useDispatch();var a=useSelector(preferredLanguageSelector);const r=AIWareFormatMessage(a),s=react.exports.useCallback(e=>{var t,a,s,n;e&&(i.includes(e.type)?5e6<=e.size?o(showMessage({content:r({id:"os-app-center-new.snackbar.unsupportedFileSize",defaultMessage:[{type:0,value:"File file size must be less than 5 MB"}]}),severity:MessageSeverity.Warning})):({name:t,size:a,type:s}=e,n=URL.createObjectURL(e),n={id:guid(),previewUrl:n,name:t,size:a,type:s},o(actions.iconUploadState.uploadIconStart({file:n}))):o(showMessage({content:r({id:"os-app-center-new.snackbar.unsupportedFileType",defaultMessage:[{type:1,value:"type"},{type:0,value:" is not a supported image type."}]},{type:e.type}),severity:MessageSeverity.Warning})))},[i,o]),n=react.exports.useCallback(e=>{e.preventDefault();e=e.dataTransfer.files[0];s(e)},[s]);const l=e=>{e.preventDefault()};return react.exports.useEffect(()=>{const e=t.current;return e.addEventListener("drop",n),()=>{e.removeEventListener("drop",n)}},[n]),react.exports.useEffect(()=>{const e=t.current;return e&&(e.addEventListener("dragover",l),e.addEventListener("dragleave",l)),()=>{e.removeEventListener("dragover",l),e.removeEventListener("dragleave",l)}},[]),{dropZoneRef:t,fileInputRef:e,handleRemoveFile:e=>{e.stopPropagation(),o(actions.iconUploadState.deleteLocalIcon()),o(actions.appFormState.updateAppFormField({field:"iconPath",value:""}))},handleOpenFilePicker:()=>{e.current.click()},handleIconSelect:e=>{e=e.target.files[0];s(e)}}},acceptedFileTypes=["image/jpeg","image/png","image/gif","image/svg+xml"],IconImporter=({iconPath:e})=>{var t=useSelector(selectIcon),a=useIconImporterStyles()["classes"],{dropZoneRef:s,fileInputRef:n,handleRemoveFile:i,handleIconSelect:o,handleOpenFilePicker:r}=useDragAndDrop({acceptedFileTypes:acceptedFileTypes});return jsxRuntime.exports.jsx("div",Object.assign({className:a.iconBox,ref:s,"data-test":"app-description-icon-dropzone"},{children:e||null!=t&&t.previewUrl?jsxRuntime.exports.jsxs("div",Object.assign({className:a.innerBox,style:{backgroundColor:"transparent"}},{children:[jsxRuntime.exports.jsx(IconButton,Object.assign({"data-test":"app-description-icon-remove",className:a.removeIcon,size:"small",onClick:i},{children:jsxRuntime.exports.jsx(default_1$2,{})})),jsxRuntime.exports.jsx("img",{src:(null==t?void 0:t.previewUrl)||e,alt:(null==t?void 0:t.name)||"Icon",className:a.iconPreview,"data-test":"app-description-icon-preview"})]})):jsxRuntime.exports.jsxs(Button,Object.assign({className:a.innerBox,onClick:r},{children:[jsxRuntime.exports.jsx("input",{accept:"image/jpeg, image/png",type:"file",ref:n,className:a.fileInput,onChange:o}),jsxRuntime.exports.jsx(default_1$5,{className:a.addIcon})]}))}))},BasicInfo=({onValidate:e})=>{var t=useBasicInfoStyles()["classes"];const a=useDispatch();var s=useSelector(selectApp),n={name:s.name,description:s.description};const i=useForm({mode:"onChange",defaultValues:n});react.exports.useEffect(()=>{e(i.formState.isValid)},[i.formState.isValid]);n=e=>{var{name:e,value:t}=e.target;e=e,t=t,a(actions.appFormState.updateAppFormField({field:e,value:t}))};return jsxRuntime.exports.jsx(Box$1,Object.assign({"data-test":"basic-info"},{children:jsxRuntime.exports.jsx(FormProvider,Object.assign({},i,{children:jsxRuntime.exports.jsxs(Grid,Object.assign({className:t.container,container:!0,rowSpacing:4,columnSpacing:10,"data-test":"app-description"},{children:[jsxRuntime.exports.jsxs(Grid,Object.assign({container:!0,item:!0,xs:12,sm:8,rowSpacing:2,columnSpacing:6},{children:[jsxRuntime.exports.jsxs(Grid,Object.assign({item:!0,xs:12,sm:6},{children:[jsxRuntime.exports.jsx(Typography,Object.assign({variant:"h6",gutterBottom:!0},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-app-center-new.name-description-label",defaultMessage:"Name & Description",description:"Name & Description"})})),jsxRuntime.exports.jsx(Typography,Object.assign({variant:"caption",paragraph:!0},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-app-center-new.application-description-caption",defaultMessage:"Provide a name and description to let users know what your application does.",description:"application name and description caption"})}))]})),jsxRuntime.exports.jsx(Grid,Object.assign({item:!0,xs:12},{children:jsxRuntime.exports.jsx(InputText,{inputProps:{className:t.textInput},"data-test":"app-description-input-name",variant:"outlined",sx:{marginBottom:3},placeholder:"Application Name",name:"name",value:s.name,onChange:n,fullWidth:!0,rules:{required:!0,maxLength:100}})})),jsxRuntime.exports.jsx(Grid,Object.assign({item:!0,xs:12},{children:jsxRuntime.exports.jsx(InputText,{InputProps:{className:t.textInput},"data-test":"app-description-input-description",variant:"outlined",placeholder:"Description",name:"description",fullWidth:!0,multiline:!0,rows:10,value:s.description,onChange:n,rules:{required:!0,maxLength:250}})}))]})),jsxRuntime.exports.jsx(Grid,Object.assign({container:!0,item:!0,xs:12,sm:4,rowSpacing:4,columnSpacing:6},{children:jsxRuntime.exports.jsxs(Grid,Object.assign({item:!0,xs:12},{children:[jsxRuntime.exports.jsxs(Box$1,Object.assign({sx:{py:1}},{children:[jsxRuntime.exports.jsx(Typography,Object.assign({variant:"h6",gutterBottom:!0},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-app-center-new.icon-image-label",defaultMessage:"App Icon",description:"App Icon"})})),jsxRuntime.exports.jsx(Typography,Object.assign({variant:"caption",paragraph:!0},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-app-center-new.image-recommended-label",defaultMessage:"Recommended image size:{br}300x300 .png or .jpg",description:"Recommended image size:{br} 300x300 .png or .jpg",values:{br:jsxRuntime.exports.jsx("br",{})}})}))]})),jsxRuntime.exports.jsx(IconImporter,{iconPath:s.iconPath})]}))})),jsxRuntime.exports.jsx(Grid,Object.assign({item:!0,xs:12},{children:jsxRuntime.exports.jsx(EntityTags,{selectedTags:s.entityTags,setSelectedTags:e=>{a(actions.appFormState.updateAppFormField({field:"entityTags",value:e}))}})}))]}))}))}))},PaletteIntegration=()=>{const a=useDispatch();var e=useSelector(selectApp)["nodeModules"];const[s,n]=react.exports.useState(lodash.exports.map(e,(e,t)=>isNpmRepoModule(e)?{name:e.moduleName,editIndex:t}:isGithubModule(e)?{name:e.sshUrl,editIndex:t}:{name:"ERR: unknown package name!",editIndex:t}));const t=(e=!1,t=-1)=>{e={name:"APP_CENTER_AUTOMATE_PALETTE_INTEGRATION_PANEL",config:{name:"Add Module",isEdit:e,editIndex:t}};a(mountPanel({panelId:"APP_CENTER_AUTOMATE_PALETTE_INTEGRATION_PANEL",microFrontend:e,panelConfig:{type:"APP_BAR_PANEL_TEMPLATE",marginTop:55,marginStart:0,size:"small",zIndex:1001}}))};return jsxRuntime.exports.jsx(Box$1,Object.assign({m:5,"data-test":"automate"},{children:jsxRuntime.exports.jsx(ListField,{idPrefix:"aob.automate-palette-integration",heading:"aiWARE Automate Palette Integration",description:"Please specify all the npm packages to install in Automate when this application is enabled in the organization.",actionButtonLabel:"Add Module",items:lodash.exports.map(s,e=>lodash.exports.omit(e,"editIndex")),columnNames:["Palette","",""],canEdit:!0,canDelete:!0,onActionClick:()=>t(),onEditClick:e=>{e=s[e].editIndex;0<=e&&t(!0,e)},onDeleteClick:e=>{e=s[e].editIndex;0<=e&&a(actions.appFormState.removeNodeModule(e))},onRequestSort:(t,e)=>{n(lodash.exports.orderBy(s,[e=>lodash.exports.lowerCase(e[lodash.exports.camelCase(t)])],e))}})}))},AppEventsStep=()=>{const a=useDispatch(),s=useSelector(selectEventPanel)["handlers"],e=e=>{if(0===e.length)return[];const t={webhook:"Webhook",flow:"Automate Flow"};return lodash.exports.map(e,e=>({handler:t[e.eventType],event:e.eventNames&&e.eventNames.join(", ")}))},[n,i]=react.exports.useState(e(s)),o=(react.exports.useEffect(()=>{i(e(s))},[s]),(e=!1,t=-1)=>{e={name:"APP_CENTER_EVENT_PANEL",config:{name:"Add Aiware Event",isEdit:e,editIndex:t}};a(mountPanel({panelId:"APP_CENTER_EVENT_PANEL",microFrontend:e,panelConfig:{type:"APP_BAR_PANEL_TEMPLATE",marginTop:55,marginStart:0,size:"large",zIndex:1010}}))});return jsxRuntime.exports.jsx(Box$1,Object.assign({m:5,"data-test":"app-event-step"},{children:jsxRuntime.exports.jsx(ListField,{idPrefix:"aob-functionality-event-handlers",heading:"aiWARE Event Handlers",description:"Webhooks (Events) allow external services to be notified when certain events happen in aiWARE. When the specified events happen, we'll send a POST request to each of the URLs & Flows you provide.",actionButtonLabel:"Add Handler",items:n,columnNames:["Handler","Event","",""],canEdit:!0,canDelete:!0,onActionClick:()=>o(),onEditClick:t=>{var e=findIndex_1(s,e=>{return("Webhook"===n[t].handler?"webhook":"flow")===e.eventType&&n[t].event===e.eventNames.join(", ")});o(!0,e)},onDeleteClick:t=>{var e=findIndex_1(s,e=>{return("Webhook"===n[t].handler?"webhook":"flow")===e.eventType&&n[t].event===e.eventNames.join(", ")});a(actions.appEventsPanelState.deleteHandler(e))},onRequestSort:(e,t)=>{i(orderBy_1(n,lowerCase_1(e),t))}})}))},AppOnboardingFlow=()=>{const t=useDispatch(),a=useSelector(selectApp),s=useSelector(selectIsEditForm)["isEditForm"],[e,n]=react.exports.useState(!1);var i=e=>n(e);var o=({handleOnValidate:e,children:t})=>(react.exports.useEffect(()=>{e(!0)},[]),t),o=[jsxRuntime.exports.jsx(BasicInfo,{onValidate:i}),jsxRuntime.exports.jsx(FunctionalityStep,{handleOnValidate:i}),jsxRuntime.exports.jsx(HeaderbarStep,{handleOnValidate:i}),jsxRuntime.exports.jsx(AuthenticationStep,{handleOnValidate:i}),jsxRuntime.exports.jsx(o,Object.assign({handleOnValidate:i},{children:jsxRuntime.exports.jsx(PaletteIntegration,{})})),jsxRuntime.exports.jsx(Box$1,Object.assign({"data-test":"app-events"},{children:jsxRuntime.exports.jsx(AppEventsStep,{})})),jsxRuntime.exports.jsx(o,Object.assign({handleOnValidate:i},{children:jsxRuntime.exports.jsx(Box$1,Object.assign({"data-test":"app-package"},{children:jsxRuntime.exports.jsx(AppPackagesStep,{})}))})),jsxRuntime.exports.jsx(ConfirmationStep,{})],i=[jsxRuntime.exports.jsx(Button,Object.assign({"data-test":"app-new-submit-app-button",variant:"contained",color:"primary",onClick:()=>{var[e=!1]=[];s?t(actions.appFormState.updateAppStart({app:a,openBuildPanel:e})):t(actions.appFormState.createAppStart({app:a,openBuildPanel:e}))}},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-app-center-new.{idPrefix}-app-button",defaultMessage:"{verb}",description:"{verb} app button text",values:{idPrefix:s?"update":"submit",verb:s?"Update":"Submit"}})}),"submit-app-button")];return jsxRuntime.exports.jsx(ProgressStepper,{steps:["Basic Info","Functionality","Headerbar","Authentication","Automate","App Events","App Package","Review"],stepContent:o,customFinalStepButtons:i,nextButtonDisabled:!e,idPrefix:"app-center-new-aob"})},appBarHeight$3=55,headerHeight=64,borderBottom$3=5,useStyles$5=makeStyles()(e=>({ecnPanel:{height:`calc(100vh - ${appBarHeight$3}px - ${headerHeight}px - ${borderBottom$3}px)`}})),MainLayout=({appId:e})=>{var t=useStyles$5()["classes"];const a=useDispatch();var s=useSelector(selectIsLoadingExistingAppData)["isLoadingExistingAppData"];return react.exports.useEffect(()=>{e?a(actions.appFormState.editApp(e)):a(actions.appFormState.createNewApp())},[]),jsxRuntime.exports.jsx("div",Object.assign({role:"presentation","data-test":"app-center-new-widget",className:t.ecnPanel},{children:s?jsxRuntime.exports.jsx(Box$1,Object.assign({sx:{display:"flex",alignItems:"center",justifyContent:"center",height:"100%"}},{children:jsxRuntime.exports.jsx(CircularProgress,{})})):jsxRuntime.exports.jsx(AppOnboardingFlow,{})}))},AppCenterNew=e=>jsxRuntime.exports.jsx(AIWareThemeProvider,{children:jsxRuntime.exports.jsx(lib.DynamicModuleLoader,Object.assign({modules:[getAppCenterNewModule()]},{children:jsxRuntime.exports.jsx(AIWareIntlProvider,{children:jsxRuntime.exports.jsx(CacheProvider,Object.assign({value:muiCache},{children:jsxRuntime.exports.jsx(MainLayout,Object.assign({},e))}))})}))}),AddFlowPanel=()=>{const s=useDispatch(),n=useSelector(selectApp),{searchTerm:e,searchResults:i,isLoadingSearchResults:t,sortOrder:a}=useSelector(selectFlowLinkingPanel);const o=e=>{var t=lodash.exports.findIndex(i,{id:e.target.value});const a=[...n.flows];lodash.exports.includes(lodash.exports.map(a,e=>e.id),i[t].id)?a.splice(lodash.exports.findIndex(a,{id:e.target.value}),1):a.unshift(Object.assign({},i[t])),s(actions.appFormState.updateAppFormField({field:"flows",value:a}))};const r="os-app-center-new.add-flow-panel.";return jsxRuntime.exports.jsxs(Grid,Object.assign({container:!0,spacing:3,p:6,"data-test":r+"container"},{children:[jsxRuntime.exports.jsx(Grid,Object.assign({item:!0,xs:12},{children:jsxRuntime.exports.jsxs(Stack,Object.assign({direction:"row",alignItems:"center",justifyContent:"space-between"},{children:[jsxRuntime.exports.jsx(Typography,Object.assign({variant:"h1"},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-app-center-new.add-flow-panel.title",description:"Add Flow Panel Title",defaultMessage:"Add Flow"})})),jsxRuntime.exports.jsx(IconButton,Object.assign({"data-test":r+"close",onClick:()=>{s(unmountPanel(AvailableComponents.APP_CENTER_ADD_FLOW_PANEL))}},{children:jsxRuntime.exports.jsx(default_1$2,{})}))]}))})),jsxRuntime.exports.jsx(Grid,Object.assign({item:!0,xs:6},{children:jsxRuntime.exports.jsx(FormControl$1,Object.assign({variant:"outlined",fullWidth:!0},{children:jsxRuntime.exports.jsx(TextField,{"data-test":r+"search",id:"search-input",placeholder:"Search",type:"search",value:e,onChange:e=>{s(actions.flowLinkingPanelState.searchByTerm(e.target.value))},size:"small",InputProps:{startAdornment:jsxRuntime.exports.jsx(InputAdornment,Object.assign({position:"start"},{children:t?jsxRuntime.exports.jsx(CircularProgress,{size:24}):jsxRuntime.exports.jsx(default_1$3,{})})),style:{borderRadius:100}}})}))})),jsxRuntime.exports.jsx(Grid,Object.assign({item:!0},{children:jsxRuntime.exports.jsx(IconButton,Object.assign({"data-test":r+"sort-toggle",onClick:e=>{s(actions.flowLinkingPanelState.toggleSortOrder())}},{children:jsxRuntime.exports.jsx(default_1,{})}))})),jsxRuntime.exports.jsx(Grid,Object.assign({item:!0,xs:12},{children:jsxRuntime.exports.jsx(FormControl$1,Object.assign({variant:"outlined"},{children:jsxRuntime.exports.jsx(FormControlLabel,{label:"Select All",control:jsxRuntime.exports.jsx(Checkbox,{"data-test":r+"select-all",onClick:e=>{var t=lodash.exports.isEmpty(lodash.exports.difference(lodash.exports.map(i,e=>e.id),lodash.exports.map(n.flows,e=>e.id)))?[]:lodash.exports.uniqBy([...n.flows,...i],"id");s(actions.appFormState.updateAppFormField({field:"flows",value:t}))},checked:!lodash.exports.isEmpty(n.flows),indeterminate:!lodash.exports.isEmpty(n.flows)&&!lodash.exports.isEmpty(lodash.exports.difference(lodash.exports.map(i,e=>e.id),lodash.exports.map(n.flows,e=>e.id)))})})}))})),jsxRuntime.exports.jsx(Grid,Object.assign({item:!0,xs:12},{children:jsxRuntime.exports.jsx(Divider,{})})),jsxRuntime.exports.jsx(Grid,Object.assign({item:!0},{children:jsxRuntime.exports.jsx(Stack,Object.assign({direction:"column"},{children:lodash.exports.map(lodash.exports.orderBy(i,"name",a),e=>jsxRuntime.exports.jsx(FormControl$1,Object.assign({variant:"outlined"},{children:jsxRuntime.exports.jsx(FormControlLabel,{label:e.name,control:jsxRuntime.exports.jsx(Checkbox,{"data-test":r+"flow",value:e.id,checked:lodash.exports.includes(lodash.exports.map(n.flows,e=>e.id),e.id),onChange:o})})}),e.id))}))}))]}))},AddSchemaPanel=()=>{const s=useDispatch(),n=useSelector(selectApp),{searchTerm:e,searchResults:i,isLoadingSearchResults:t,sortOrder:a}=useSelector(selectSchemaLinkingPanel);const o=e=>{var t=lodash.exports.findIndex(i,{id:e.target.value});const a=[...n.schemas];lodash.exports.includes(lodash.exports.map(a,e=>e.id),i[t].id)?a.splice(lodash.exports.findIndex(a,{id:e.target.value}),1):a.unshift(Object.assign({},i[t])),s(actions.appFormState.updateAppFormField({field:"schemas",value:a}))};const r="os-app-center-new.add-schema-panel.";return jsxRuntime.exports.jsxs(Grid,Object.assign({container:!0,spacing:3,p:6,"data-test":r+"container"},{children:[jsxRuntime.exports.jsx(Grid,Object.assign({item:!0,xs:12},{children:jsxRuntime.exports.jsxs(Stack,Object.assign({direction:"row",alignItems:"center",justifyContent:"space-between"},{children:[jsxRuntime.exports.jsx(Typography,Object.assign({variant:"h1"},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-app-center-new.add-schema-panel.title",description:"Add Schema Panel Title",defaultMessage:"Add Schema"})})),jsxRuntime.exports.jsx(IconButton,Object.assign({"data-test":r+"close",onClick:()=>{s(unmountPanel(AvailableComponents.APP_CENTER_ADD_SCHEMA_PANEL))}},{children:jsxRuntime.exports.jsx(default_1$2,{})}))]}))})),jsxRuntime.exports.jsx(Grid,Object.assign({item:!0,xs:6},{children:jsxRuntime.exports.jsx(FormControl$1,Object.assign({variant:"outlined",fullWidth:!0},{children:jsxRuntime.exports.jsx(TextField,{"data-test":r+"search",id:"search-input",placeholder:"Search",type:"search",value:e,onChange:e=>{s(actions.schemaLinkingPanelState.searchByTerm(e.target.value))},size:"small",InputProps:{startAdornment:jsxRuntime.exports.jsx(InputAdornment,Object.assign({position:"start"},{children:t?jsxRuntime.exports.jsx(CircularProgress,{size:24}):jsxRuntime.exports.jsx(default_1$3,{})})),style:{borderRadius:100}}})}))})),jsxRuntime.exports.jsx(Grid,Object.assign({item:!0},{children:jsxRuntime.exports.jsx(IconButton,Object.assign({"data-test":r+"sort-toggle",onClick:e=>{s(actions.schemaLinkingPanelState.toggleSortOrder())}},{children:jsxRuntime.exports.jsx(default_1,{})}))})),jsxRuntime.exports.jsx(Grid,Object.assign({item:!0,xs:12},{children:jsxRuntime.exports.jsx(FormControl$1,Object.assign({variant:"outlined"},{children:jsxRuntime.exports.jsx(FormControlLabel,{label:"Select All",control:jsxRuntime.exports.jsx(Checkbox,{"data-test":r+"select-all",onClick:e=>{var t=lodash.exports.isEmpty(lodash.exports.difference(lodash.exports.map(i,e=>e.id),lodash.exports.map(n.schemas,e=>e.id)))?[]:lodash.exports.uniqBy([...n.schemas,...i],"id");s(actions.appFormState.updateAppFormField({field:"schemas",value:t}))},checked:!lodash.exports.isEmpty(n.schemas),indeterminate:!lodash.exports.isEmpty(n.schemas)&&!lodash.exports.isEmpty(lodash.exports.difference(lodash.exports.map(i,e=>e.id),lodash.exports.map(n.schemas,e=>e.id)))})})}))})),jsxRuntime.exports.jsx(Grid,Object.assign({item:!0,xs:12},{children:jsxRuntime.exports.jsx(Divider,{})})),jsxRuntime.exports.jsx(Grid,Object.assign({item:!0},{children:jsxRuntime.exports.jsx(Stack,Object.assign({direction:"column"},{children:lodash.exports.map(lodash.exports.orderBy(i,"name",a),e=>jsxRuntime.exports.jsx(FormControl$1,Object.assign({variant:"outlined"},{children:jsxRuntime.exports.jsx(FormControlLabel,{label:e.name,control:jsxRuntime.exports.jsx(Checkbox,{"data-test":r+"schema",value:e.id,checked:lodash.exports.includes(lodash.exports.map(n.schemas,e=>e.id),e.id),onChange:o})})}),e.id))}))}))]}))},appBarHeight$2=55,borderBottom$2=5,mainHeight$2=`calc(100vh - ${appBarHeight$2+borderBottom$2}px)`,useStyles$4=makeStyles()(e=>({root:{display:"flex",flexFlow:"column",height:mainHeight$2},container:{padding:e.spacing(5),"& input, textarea":{fontWeight:400},"& fieldset":{borderColor:"#D5DFE9"}},"& fieldset":{borderColor:"#D5DFE9"},textInput:{padding:14.5},header:{display:"flex",alignItems:"center",justifyContent:"space-between",width:"100%",marginBottom:20},addButtonWrapper:{flexGrow:1,display:"flex",justifyContent:"flex-end",alignItems:"flex-end",padding:"0px 20px 20px 20px"},inputSelect:{width:"100%"},optional:{fontSize:12,marginBottom:e.spacing(1),marginLeft:e.spacing(1),color:"#9CA8B4"}})),ConfigFieldsForm=({hidePanel:t,isEdit:a=!1,editIndex:s=-1})=>{var e=useStyles$4()["classes"],n=useSelector(preferredLanguageSelector);const i=AIWareFormatMessage(n),o=useDispatch(),r=useSelector(selectApp),l=useSelector(selectConfigFields);var n=()=>a&&0<=s?l[s]:{name:"",configLevel:AppConfigLevel.Organization,type:AppConfigType.String,required:!1,defaultValue:""},p=n();const d=useForm({mode:"onChange",defaultValues:p}),[c,u]=react.exports.useState(n().type),[x,m]=react.exports.useState(n().configLevel);return jsxRuntime.exports.jsx(FormProvider,Object.assign({},d,{children:jsxRuntime.exports.jsxs("form",Object.assign({className:e.root,onSubmit:d.handleSubmit(e=>{a?o(actions.appFormState.updateConfigField({configFields:e,index:s,name:l[s].name})):lodash.exports.isEmpty(r.id)?o(actions.appFormState.addConfigField(e)):o(actions.appFormState.createConfigField({newConfigField:e,appId:r.id})),t()})},{children:[jsxRuntime.exports.jsxs(Grid,Object.assign({className:e.container,container:!0,spacing:5,"data-test":"app-new-config-fields-form-container"},{children:[jsxRuntime.exports.jsx(Grid,Object.assign({item:!0,xs:12},{children:jsxRuntime.exports.jsxs(Box$1,Object.assign({className:e.header},{children:[jsxRuntime.exports.jsx(Typography,Object.assign({variant:"h1",color:"secondary","data-test":"app-new-config-fields-header-title"},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:"app-center-new.config-fields.form-title",defaultMessage:"{label} Config Fields",description:"Form label for supported file types",values:{label:a?"Edit":"Add"}})})),jsxRuntime.exports.jsx(Tooltip,Object.assign({title:jsxRuntime.exports.jsx(FormattedMessage,{id:"app-center-new.config-fields.form-title-close",defaultMessage:"Close",description:"Form label for close tooltip label"})},{children:jsxRuntime.exports.jsx(IconButton,Object.assign({onClick:t,"aria-labelledby":"app-center-new-close-panel","data-test":"app-description-input-icon"},{children:jsxRuntime.exports.jsx(Close,{})}))}))]}))})),jsxRuntime.exports.jsxs(Grid,Object.assign({item:!0,xs:12},{children:[jsxRuntime.exports.jsx(Typography,Object.assign({variant:"h6",gutterBottom:!0,"data-test":"app-new-config-fields-header-name"},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:"app-center-new.config-fields.field-name",defaultMessage:"Name",description:"You can set a field name"})})),jsxRuntime.exports.jsx(InputText,{inputProps:{maxLength:50,className:e.textInput},variant:"outlined",type:"text",name:"name",fullWidth:!0,"data-test":"app-new-config-fields-name-content",rules:{required:!0,maxLength:50,validate:{isNameSame:a=>{return!l.find((e,t)=>t!==s&&e.name===a)||i({id:"os-app-center-new.config-name-error",defaultMessage:[{type:0,value:"Please select a different name"}]})}}}})]})),jsxRuntime.exports.jsxs(Grid,Object.assign({item:!0,xs:12},{children:[jsxRuntime.exports.jsx(Typography,Object.assign({variant:"h6",gutterBottom:!0,"data-test":"app-new-config-fields-header-description"},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:"app-center-new.config-fields.field-description",defaultMessage:"Description",description:"You can set a field description"})})),jsxRuntime.exports.jsx(InputText,{variant:"outlined",name:"description",fullWidth:!0,multiline:!0,rows:5,"data-test":"app-new-config-fields-description-content",inputProps:{maxLength:250},InputProps:{className:e.textInput},rules:{maxLength:250}})]})),jsxRuntime.exports.jsxs(Grid,Object.assign({item:!0,xs:12},{children:[jsxRuntime.exports.jsx(Typography,Object.assign({variant:"h6",gutterBottom:!0,"data-test":"app-new-config-fields-header-config-level"},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:"app-center-new.config-fields.config-level",defaultMessage:"Config Level",description:"You can set a config level"})})),jsxRuntime.exports.jsxs(InputSelect,Object.assign({inputProps:{maxLength:50,className:e.textInput},className:e.inputSelect,type:"text",name:"configLevel",value:x,defaultValue:x,onChange:e=>{d.setValue("configLevel",e.target.value),m(e.target.value)},style:{minWidth:"100%"},"data-test":"app-new-config-level-content",rules:{required:!0}},{children:[jsxRuntime.exports.jsx(MenuItem,Object.assign({value:"Organization"},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:"app-center-new.config-fields.menu-item-organization",defaultMessage:"Organization",description:"You can set a config level"})})),jsxRuntime.exports.jsx(MenuItem,Object.assign({value:"User"},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:"app-center-new.config-fields.menu-item-user",defaultMessage:"User",description:"You can set a config level"})}))]}))]})),jsxRuntime.exports.jsxs(Grid,Object.assign({item:!0,xs:12},{children:[jsxRuntime.exports.jsx(Typography,Object.assign({variant:"h6",gutterBottom:!0,"data-test":"app-new-config-fields-header-type"},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:"app-center-new.config-fields.field-type",defaultMessage:"Type",description:"You can set a field type"})})),jsxRuntime.exports.jsx(InputSelect,Object.assign({inputProps:{maxLength:50,className:e.textInput},className:e.inputSelect,type:"text",name:"type",value:c,onChange:e=>{d.setValue("type",e.target.value),u(e.target.value)},style:{minWidth:"100%"},"data-test":"app-new-config-fields-type-content",rules:{required:!0}},{children:map_1(keys_1(AppConfigType),(e,t)=>jsxRuntime.exports.jsx(MenuItem,Object.assign({value:AppConfigType[e]},{children:AppConfigType[e]}),t))}))]})),jsxRuntime.exports.jsx(Grid,Object.assign({item:!0,xs:12},{children:jsxRuntime.exports.jsx(SchemaOrText,{})})),jsxRuntime.exports.jsx(Grid,Object.assign({item:!0,xs:12,style:{padding:"12.5px 0 0 25px"}},{children:jsxRuntime.exports.jsx(Box$1,Object.assign({display:"flex",justifyContent:"start",alignItems:"center"},{children:jsxRuntime.exports.jsx(InputCheckbox,{name:"required",defaultChecked:p.required,label:jsxRuntime.exports.jsx(FormattedMessage,{id:"app-center-new.config-fields.required-checkbox",defaultMessage:"Make Required",description:"Required field checkbox"})})}))}))]})),jsxRuntime.exports.jsx(Box$1,Object.assign({className:e.addButtonWrapper},{children:jsxRuntime.exports.jsx(Button,Object.assign({type:"submit",disabled:!get_1(d,"formState.isValid"),variant:"contained",color:"primary","data-test":"app-new-config-fields-button-submit"},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-app-center-new-config-fields.submit-button-label",defaultMessage:"{label}",description:"{label} Config Fields",values:{label:a?"Update":"Add"}})}))}))]}))}))},AppCenterConfigFieldsForm=e=>jsxRuntime.exports.jsx(CacheProvider,Object.assign({value:muiCache},{children:jsxRuntime.exports.jsx(AIWareThemeProvider,{children:jsxRuntime.exports.jsx(AIWareIntlProvider,{children:jsxRuntime.exports.jsx(ConfigFieldsForm,{hidePanel:e.hidePanel,isEdit:e.isEdit,editIndex:e.editIndex})})})})),useStyles$3=makeStyles()(e=>({header:{display:"flex",alignItems:"center",justifyContent:"space-between",width:"100%",marginBottom:e.spacing(4)},moreIcon:{width:"32px",height:e.spacing(3),background:"#E2E2E2",borderRadius:e.spacing(6),cursor:"pointer"},card:{width:360,background:"#465364",boxShadow:"0px 4px 10px rgba(0, 0, 0, 0.25)",borderRadius:"4px",color:"#FFFFFF"},hide:{display:"none"}})),useStyles$2=makeStyles()(e=>({root:{borderRadius:"50%",border:"1px solid #D5DFE9",display:"flex",justifyContent:"center",alignItems:"center",overflow:"hidden",width:e.spacing(6),height:e.spacing(6)},logo:{maxWidth:"100%",maxHeight:"100%"},veritoneLogo:{maxWidth:"75%",maxHeight:"75%"}})),EngineLogo=({path:e})=>{var t=useStyles$2()["classes"];return jsxRuntime.exports.jsx("div",Object.assign({className:t.root},{children:jsxRuntime.exports.jsx("img",{className:t.logo+" "+(!e&&t.veritoneLogo),src:e||img$1u,alt:"engine logo"})}))},TooltipCard=({engine:e,className:t})=>jsxRuntime.exports.jsxs(Card,Object.assign({className:t},{children:[jsxRuntime.exports.jsx(CardHeader$1,{sx:{paddingBottom:2},avatar:jsxRuntime.exports.jsx(EngineLogo,{path:e.iconPath}),title:e.name,subheader:jsxRuntime.exports.jsxs(Typography,Object.assign({fontSize:"10px",color:"#FFFFFF",lineHeight:"16px"},{children:["Version: ",e.edgeVersion," Modified: ",e.modifiedDateTime]}))}),jsxRuntime.exports.jsx(CardContent,Object.assign({sx:{marginLeft:9.5,paddingTop:0}},{children:jsxRuntime.exports.jsx(Typography,Object.assign({variant:"body2",fontSize:"10px",color:"#FFFFFF",lineHeight:"16px"},{children:e.description}))}))]})),AddEngineForm=({hidePanel:e})=>{const t=useStyles$3()["classes"],s=useDispatch(),n=useSelector(selectApp),{searchTerm:a,searchResults:i,isLoadingSearchResults:o,sortOrder:r}=useSelector(selectEngineLinkingPanel),[l,p]=react.exports.useState(null);const d=e=>{var t=lodash.exports.findIndex(i,{id:e.target.value});const a=[...n.engines];lodash.exports.includes(lodash.exports.map(a,e=>e.id),i[t].id)?a.splice(lodash.exports.findIndex(a,{id:e.target.value}),1):a.unshift(i[t]),s(actions.appFormState.updateAppFormField({field:"engines",value:a}))};const c="os-app-center-new.add-engine-panel.";return jsxRuntime.exports.jsxs(Grid,Object.assign({container:!0,spacing:3,p:6,"data-test":c+"container"},{children:[jsxRuntime.exports.jsxs(Grid,Object.assign({item:!0,xs:12,pl:5},{children:[jsxRuntime.exports.jsx(Grid,Object.assign({item:!0,xs:12,mb:4},{children:jsxRuntime.exports.jsxs(Box$1,Object.assign({className:t.header},{children:[jsxRuntime.exports.jsx(Typography,Object.assign({variant:"h1",color:"secondary","data-test":"engine-new-custom-fields-header-title"},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:"engine-center-new.custom-fields.form-title",defaultMessage:"Add Engine",description:"Form label for supported file types"})})),jsxRuntime.exports.jsx(Tooltip,Object.assign({title:jsxRuntime.exports.jsx(FormattedMessage,{id:"engine-center-new.custom-fields.form-title-close",defaultMessage:"Close",description:"Form label for close tooltip label"})},{children:jsxRuntime.exports.jsx(IconButton,Object.assign({onClick:e,"aria-labelledby":"engine-center-new-close-panel","data-test":"engine-description-input-icon"},{children:jsxRuntime.exports.jsx(Close,{})}))}))]}))})),jsxRuntime.exports.jsxs(Box$1,Object.assign({display:"flex"},{children:[jsxRuntime.exports.jsx(Grid,Object.assign({item:!0,xs:6,mb:4},{children:jsxRuntime.exports.jsx(FormControl$1,Object.assign({variant:"outlined",fullWidth:!0},{children:jsxRuntime.exports.jsx(TextField,{"data-test":c+"search",id:"search-input",placeholder:"Search",type:"search",value:a,onChange:e=>{s(actions.engineLinkingPanelState.searchByTerm(e.target.value))},size:"small",InputProps:{startAdornment:jsxRuntime.exports.jsx(InputAdornment,Object.assign({position:"start"},{children:o?jsxRuntime.exports.jsx(CircularProgress,{size:24}):jsxRuntime.exports.jsx(default_1$3,{})})),style:{borderRadius:100}}})}))})),jsxRuntime.exports.jsx(Grid,Object.assign({item:!0,sx:{marginLeft:4}},{children:jsxRuntime.exports.jsx(IconButton,Object.assign({"data-test":c+"sort-toggle",onClick:e=>{s(actions.engineLinkingPanelState.toggleSortOrder())}},{children:jsxRuntime.exports.jsx(default_1,{})}))}))]})),jsxRuntime.exports.jsx(Grid,Object.assign({item:!0,xs:12},{children:jsxRuntime.exports.jsx(FormControl$1,Object.assign({variant:"outlined"},{children:jsxRuntime.exports.jsx(FormControlLabel,{label:"Select All",control:jsxRuntime.exports.jsx(Checkbox,{"data-test":c+"select-all",onClick:e=>{var t=lodash.exports.isEmpty(lodash.exports.difference(lodash.exports.map(i,e=>e.id),lodash.exports.map(n.engines,e=>e.id)))?[]:lodash.exports.uniqBy([...n.engines,...i],"id");s(actions.appFormState.updateAppFormField({field:"engines",value:t}))},checked:!lodash.exports.isEmpty(n.engines),indeterminate:!lodash.exports.isEmpty(n.engines)&&!lodash.exports.isEmpty(lodash.exports.difference(lodash.exports.map(i,e=>e.id),lodash.exports.map(n.engines,e=>e.id)))})})}))})),jsxRuntime.exports.jsx(Grid,Object.assign({item:!0,xs:12,sx:{margin:"20px 0"}},{children:jsxRuntime.exports.jsx(Divider,{})}))]})),jsxRuntime.exports.jsx(Grid,Object.assign({xs:12},{children:jsxRuntime.exports.jsx(Stack,Object.assign({direction:"column"},{children:lodash.exports.map(lodash.exports.orderBy(i,"name",r),e=>jsxRuntime.exports.jsxs(TableRow,Object.assign({onMouseOver:()=>p(e.id),onMouseOut:()=>p(null),hover:!0,"data-test":"engines-list-table-row",sx:{display:"flex",justifyContent:"space-between",alignItems:"center",padding:"0 25px"}},{children:[jsxRuntime.exports.jsx(FormControl$1,Object.assign({variant:"outlined"},{children:jsxRuntime.exports.jsx(FormControlLabel,{label:e.name,control:jsxRuntime.exports.jsx(Checkbox,{"data-test":c+"engine",value:e.id,checked:lodash.exports.includes(lodash.exports.map(n.engines,e=>e.id),e.id),onChange:d})})}),e.id),jsxRuntime.exports.jsx(Tooltip,Object.assign({title:jsxRuntime.exports.jsx(TooltipCard,{engine:e,className:e.id===l?t.card:t.hide}),placement:"left",componentsProps:{tooltip:{sx:{padding:0}}}},{children:jsxRuntime.exports.jsx(MoreHor,{className:e.id===l?t.moreIcon:t.hide})}))]}),e.id))}))}))]}))},AppCenterAddEnginePanel=e=>jsxRuntime.exports.jsx(CacheProvider,Object.assign({value:muiCache},{children:jsxRuntime.exports.jsx(AIWareThemeProvider,{children:jsxRuntime.exports.jsx(AIWareIntlProvider,{children:jsxRuntime.exports.jsx(AddEngineForm,{hidePanel:e.hidePanel})})})})),appBarHeight$1=55,borderBottom$1=5,mainHeight$1=`calc(100vh - ${appBarHeight$1+borderBottom$1}px)`,useStyles$1=makeStyles()(e=>({root:{display:"flex",flexFlow:"column",height:mainHeight$1},container:{padding:e.spacing(6),"& input, textarea":{fontWeight:400},"& fieldset":{borderColor:"#D5DFE9"}},"& fieldset":{borderColor:"#D5DFE9"},textInput:{padding:14.5,boxSizing:"content-box"},header:{display:"flex",alignItems:"center",justifyContent:"space-between",width:"100%",marginBottom:30},heading:{fontWeight:600,fontSize:"14px",lineHeight:"20px",letterSpacing:"-1.30385e-09px",color:"#2A323C"},description:{marginBottom:"5px",fontWeight:400,fontSize:"12px",lineHeight:"16px",color:"#5C6269"},label:{fontWeight:400,fontSize:"12px",lineHeight:"16px",color:"#2A323C"},addButtonWrapper:{display:"flex",justifyContent:"flex-end",padding:"0 30px"}})),APP_CENTER_NEW_TEXT={labelPublic:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"app-center-new.pallet-integration-label.public",defaultMessage:"Public",description:"Label for pallet integration public"}),labelToken:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"app-center-new.pallet-integration-label.token",defaultMessage:"Token",description:"Label for pallet integration token"}),tooltipTitle:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"app-center-new.pallet-integration.form-title-close",defaultMessage:"Close",description:"Form label for close tooltip label"}),formControlLabelName:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"app-center-new.pallet-integration.npm-npmjs-label",defaultMessage:"NPM Package stored on NPMJS.COM",description:"NPM Package stored on NPMJS.COM"}),formControlLabelUri:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"app-center-new.pallet-integration.npm-uri-label",defaultMessage:"NPM Package stored at URI",description:"NPM Package stored at URI"}),labelNPM:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"app-center-new.pallet-integration.npm-label",defaultMessage:"NPM",description:"NPM radio button label"}),labelGithub:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"app-center-new.pallet-integration.github-label",defaultMessage:"Github",description:"Github radio button label"}),labelPackageName:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"app-center-new.pallet-integration.package-name-label",defaultMessage:"Package Name",description:"Package name input label"}),labelGithubRepoSshUrl:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"app-center-new.pallet-integration.github-ssh-label",defaultMessage:"Github Repo ssh url",description:"Github repo ssh url input label"}),labelVersionOptional:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"app-center-new.pallet-integration.version-optional-label",defaultMessage:"Version (Optional)",description:"Version (Optional) input label"}),labelPrivate:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"app-center-new.pallet-integration.private-label",defaultMessage:"Private",description:"Private input label"}),labelScope:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"app-center-new.pallet-integration.scope-label",defaultMessage:"Scope",description:"Scope input label"}),labelAccessToken:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"app-center-new.pallet-integration.access-token-label",defaultMessage:"Access Token",description:"Access Token input label"}),labelMainNpmRegistry:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"app-center-new.pallet-integration.main-npm-registry-label",defaultMessage:"Main NPM Registry",description:"Main NPM Registry input label"}),labelPrivateRegistry:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"app-center-new.pallet-integration.private-registry-label",defaultMessage:"Private Registry",description:"Private Registry input label"}),labelRegistryUrl:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"app-center-new.pallet-integration.registry-url-label",defaultMessage:"Registry Url",description:"Registry Url input label"})},PaletteIntegrationForm=({hidePanel:t,isEdit:a=!1,editIndex:s=-1})=>{const n=useStyles$1()["classes"],i=useDispatch(),e=useIntl(),o=useSelector(selectNodeModules);var r=e=>"app-new-palette-integration-form-"+e;const l=a&&0<=s?o[s]:{moduleRepo:ModuleRepo.NPM,isPrivateRepo:!1,isPrivateRegistry:!1,moduleName:"",moduleVersion:"",scope:"",accessToken:"",registryUrl:"",sshUrl:""},p=useForm({mode:"onChange",defaultValues:l});const[d,c]=react.exports.useState(l.moduleRepo===ModuleRepo.NPM?ModuleRepo.NPM:ModuleRepo.Github),[u,x]=react.exports.useState(l.isPrivateRepo),[m,g]=react.exports.useState(l.isPrivateRegistry);var h=({children:e})=>jsxRuntime.exports.jsx(Typography,Object.assign({className:n.label},{children:e})),j=jsxRuntime.exports.jsxs(jsxRuntime.exports.Fragment,{children:[jsxRuntime.exports.jsx(Grid,Object.assign({item:!0,xs:12},{children:jsxRuntime.exports.jsxs(Stack,Object.assign({spacing:2},{children:[jsxRuntime.exports.jsx(InputText,{fullWidth:!0,"data-test":r("package-name-input"),name:"moduleName",variant:"outlined",label:APP_CENTER_NEW_TEXT.labelPackageName(),InputLabelProps:{disableAnimation:!1},inputProps:{maxLength:500,className:n.textInput},rules:{required:!0,pattern:{value:npmModuleNameRegex,message:e.formatMessage({id:"/home/ubuntu/runner/_work/aiware-apps/aiware-apps/libs/os/app-center/new/src/lib/components/AutomateStep/PaletteIntegration/PaletteIntegrationForm/.yQi0CM",defaultMessage:[{type:0,value:"Package name must be a valid npm or github package name and cannot use invalid url characters."}]})},maxLength:500}}),jsxRuntime.exports.jsx(InputText,{fullWidth:!0,"data-test":r("package-version-input"),name:"moduleVersion",variant:"outlined",label:APP_CENTER_NEW_TEXT.labelVersionOptional(),InputLabelProps:{disableAnimation:!1},inputProps:{maxLength:255,className:n.textInput},rules:{required:!1,pattern:{value:semverRegex,message:e.formatMessage({id:"/home/ubuntu/runner/_work/aiware-apps/aiware-apps/libs/os/app-center/new/src/lib/components/AutomateStep/PaletteIntegration/PaletteIntegrationForm/.ui6Ndd",defaultMessage:[{type:0,value:"Invalid semantic version number."}]})},maxLength:255}})]}))})),jsxRuntime.exports.jsxs(Grid,Object.assign({item:!0,xs:12},{children:[jsxRuntime.exports.jsx(InputRadioGroup,Object.assign({name:"isPrivateRepo",onChange:e=>{if("public"!==e.target.value&&"private"!==e.target.value)throw new Error("Event target value outside accepted values");x("private"===e.target.value)},value:u?"private":"public"},{children:jsxRuntime.exports.jsxs(Stack,Object.assign({direction:"row"},{children:[jsxRuntime.exports.jsx(FormControlLabel,{"data-test":r("public-repo-radio"),label:jsxRuntime.exports.jsx(h,{children:APP_CENTER_NEW_TEXT.labelPublic()}),control:jsxRuntime.exports.jsx(Radio,{}),value:"public"}),jsxRuntime.exports.jsx(FormControlLabel,{"data-test":r("private-repo-radio"),label:jsxRuntime.exports.jsx(h,{children:APP_CENTER_NEW_TEXT.labelPrivate()}),control:jsxRuntime.exports.jsx(Radio,{}),value:"private"})]}))})),jsxRuntime.exports.jsxs(Stack,Object.assign({spacing:2},{children:[jsxRuntime.exports.jsx(InputText,{fullWidth:!0,"data-test":r("scope-input"),disabled:!u,name:"scope",variant:"outlined",label:APP_CENTER_NEW_TEXT.labelScope(),InputLabelProps:{disableAnimation:!1},inputProps:{maxLength:1e3,className:n.textInput},rules:{required:u,pattern:{value:uriScopeRegex,message:e.formatMessage({id:"/home/ubuntu/runner/_work/aiware-apps/aiware-apps/libs/os/app-center/new/src/lib/components/AutomateStep/PaletteIntegration/PaletteIntegrationForm/.9Z06cz",defaultMessage:[{type:0,value:"Must be a valid uri scope segment including initial '/'."}]})},maxLength:1e3}}),jsxRuntime.exports.jsx(InputText,{fullWidth:!0,"data-test":r("access-token-input"),disabled:!u,name:"accessToken",variant:"outlined",label:APP_CENTER_NEW_TEXT.labelAccessToken(),InputLabelProps:{disableAnimation:!1},inputProps:{maxLength:1e3,className:n.textInput},rules:{required:u,maxLength:1e3}})]}))]})),jsxRuntime.exports.jsxs(Grid,Object.assign({item:!0,xs:12},{children:[jsxRuntime.exports.jsx(InputRadioGroup,Object.assign({name:"isPrivateRegistry",onChange:e=>{if("mainRegistry"!==e.target.value&&"privateRegistry"!==e.target.value)throw new Error("Event target value outside accepted values");g("privateRegistry"===e.target.value)},value:m?"privateRegistry":"mainRegistry"},{children:jsxRuntime.exports.jsxs(Stack,Object.assign({direction:"row"},{children:[jsxRuntime.exports.jsx(FormControlLabel,{"data-test":r("main-registry-radio"),label:jsxRuntime.exports.jsx(h,{children:APP_CENTER_NEW_TEXT.labelMainNpmRegistry()}),control:jsxRuntime.exports.jsx(Radio,{}),value:"mainRegistry"}),jsxRuntime.exports.jsx(FormControlLabel,{"data-test":r("private-registry-radio"),label:jsxRuntime.exports.jsx(h,{children:APP_CENTER_NEW_TEXT.labelPrivateRegistry()}),control:jsxRuntime.exports.jsx(Radio,{}),value:"privateRegistry"})]}))})),jsxRuntime.exports.jsx(InputText,{fullWidth:!0,"data-test":r("registry-url-input"),disabled:!m,name:"registryUrl",variant:"outlined",label:APP_CENTER_NEW_TEXT.labelRegistryUrl(),InputLabelProps:{disableAnimation:!1},inputProps:{maxLength:500,className:n.textInput},rules:{required:m,pattern:{value:urlRegex$1,message:e.formatMessage({id:"/home/ubuntu/runner/_work/aiware-apps/aiware-apps/libs/os/app-center/new/src/lib/components/AutomateStep/PaletteIntegration/PaletteIntegrationForm/.gTI7jJ",defaultMessage:[{type:0,value:"Must be a valid URL including protocol."}]})},maxLength:500}})]}))]}),f=jsxRuntime.exports.jsx(Grid,Object.assign({item:!0,xs:12},{children:jsxRuntime.exports.jsxs(Stack,Object.assign({spacing:2},{children:[jsxRuntime.exports.jsx(InputText,{fullWidth:!0,"data-test":r("github-ssh-url-input"),name:"sshUrl",variant:"outlined",label:APP_CENTER_NEW_TEXT.labelGithubRepoSshUrl(),InputLabelProps:{disableAnimation:!1},inputProps:{maxLength:500,className:n.textInput},rules:{required:!0,pattern:{value:githubSshUrlRegex,message:e.formatMessage({id:"/home/ubuntu/runner/_work/aiware-apps/aiware-apps/libs/os/app-center/new/src/lib/components/AutomateStep/PaletteIntegration/PaletteIntegrationForm/.ZE+aFP",defaultMessage:[{type:0,value:"Must be a valid github ssh url."}]})},maxLength:500}},"github-ssh-url"),jsxRuntime.exports.jsx(InputText,{fullWidth:!0,"data-test":r("github-token-input"),name:"accessToken",variant:"outlined",label:APP_CENTER_NEW_TEXT.labelToken(),InputLabelProps:{disableAnimation:!1},inputProps:{maxLength:5e3,className:n.textInput},rules:{required:!0,maxLength:5e3}},"github-token"),jsxRuntime.exports.jsx(InputText,{fullWidth:!0,"data-test":r("package-version-input"),name:"moduleVersion",variant:"outlined",label:APP_CENTER_NEW_TEXT.labelVersionOptional(),InputLabelProps:{disableAnimation:!1},inputProps:{maxLength:255,className:n.textInput},rules:{required:!1,pattern:{value:semverRegex,message:e.formatMessage({id:"/home/ubuntu/runner/_work/aiware-apps/aiware-apps/libs/os/app-center/new/src/lib/components/AutomateStep/PaletteIntegration/PaletteIntegrationForm/.ui6Ndd",defaultMessage:[{type:0,value:"Invalid semantic version number."}]})},maxLength:255}},"github-package-version")]}))}));return jsxRuntime.exports.jsx(FormProvider,Object.assign({},p,{children:jsxRuntime.exports.jsxs("form",Object.assign({className:n.root,onSubmit:p.handleSubmit(e=>{e={moduleId:l.moduleId,moduleRepo:e.moduleRepo,isPrivateRepo:u,isPrivateRegistry:m,moduleName:e.moduleName,moduleVersion:e.moduleVersion,scope:e.scope,accessToken:e.accessToken,registryUrl:e.registryUrl,sshUrl:e.sshUrl};a?i(actions.appFormState.updateNodeModule({nodeModules:e,index:s})):i(actions.appFormState.addNodeModule(e)),t()})},{children:[jsxRuntime.exports.jsxs(Grid,Object.assign({className:n.container,container:!0,rowSpacing:5,"data-test":"app-new-palette-integration-form-container"},{children:[jsxRuntime.exports.jsxs(Box$1,Object.assign({className:n.header},{children:[jsxRuntime.exports.jsx(Typography,Object.assign({variant:"h1",color:"secondary","data-test":"app-new-palette-integration-header-title"},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:"app-center-new.palette-integration.form-title",defaultMessage:"{label} Npm Module",description:"Form label for supported file types",values:{label:a?"Edit":"Add"}})})),jsxRuntime.exports.jsx(Tooltip,Object.assign({title:APP_CENTER_NEW_TEXT.tooltipTitle()},{children:jsxRuntime.exports.jsx(IconButton,Object.assign({onClick:t,"aria-labelledby":"app-center-new-close-panel","data-test":"app-description-input-icon"},{children:jsxRuntime.exports.jsx(Close,{})}))}))]})),jsxRuntime.exports.jsxs(Box$1,{children:[jsxRuntime.exports.jsx(Typography,Object.assign({variant:"h6",gutterBottom:!0,className:n.heading,"data-test":"app-new-palette-integration-header-name"},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:"app-center-new.palette-integration-title.field-name",defaultMessage:"NPM Package or URI",description:"NPM Package/URI title"})})),jsxRuntime.exports.jsx(Typography,Object.assign({className:n.description},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:"app-center-new.palette-integration-description.field-name",defaultMessage:"Please specify where the package is stored and choose the access level.",description:"NPM Package/URI description"})}))]}),jsxRuntime.exports.jsx(Box$1,{children:jsxRuntime.exports.jsx(InputRadioGroup,Object.assign({name:"moduleRepo",onChange:e=>{if("npm"!==e.target.value&&"github"!==e.target.value)throw new Error("Event target value outside accepted values");c(e.target.value===ModuleRepo.NPM?ModuleRepo.NPM:ModuleRepo.Github)},value:d,rules:{required:!0}},{children:jsxRuntime.exports.jsxs(Stack,Object.assign({direction:"row"},{children:[jsxRuntime.exports.jsx(FormControlLabel,{"data-test":r("npm-repo-radio"),label:jsxRuntime.exports.jsx(h,{children:APP_CENTER_NEW_TEXT.labelNPM()}),control:jsxRuntime.exports.jsx(Radio,{}),value:"npm"}),jsxRuntime.exports.jsx(FormControlLabel,{"data-test":r("github-repo-radio"),label:jsxRuntime.exports.jsx(h,{children:APP_CENTER_NEW_TEXT.labelGithub()}),control:jsxRuntime.exports.jsx(Radio,{}),value:"github"})]}))}))}),"npm"===d?j:f]})),jsxRuntime.exports.jsx(Box$1,Object.assign({className:n.addButtonWrapper},{children:jsxRuntime.exports.jsx(Button,Object.assign({type:"submit",disabled:!get_1(p,"formState.isValid"),variant:"contained",color:"primary","data-test":"app-new-palette-integration-button-submit"},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-app-center-new-palette-integration.submit-button-label",defaultMessage:"{label}",description:"{label} Config Fields",values:{label:a?"Update":"Add"}})}))}))]}))}))},AppCenterPaletteIntegrationPanel=e=>jsxRuntime.exports.jsx(CacheProvider,Object.assign({value:muiCache},{children:jsxRuntime.exports.jsx(AIWareThemeProvider,{children:jsxRuntime.exports.jsx(AIWareIntlProvider,{children:jsxRuntime.exports.jsx(PaletteIntegrationForm,{hidePanel:e.hidePanel,isEdit:e.isEdit,editIndex:e.editIndex})})})})),appBarHeight=55,borderBottom=5,mainHeight=`calc(100vh - ${appBarHeight+borderBottom}px)`,useStyles=makeStyles()(e=>({root:{display:"flex",flexFlow:"column",height:mainHeight},container:{padding:e.spacing(5),"& input, textarea":{fontWeight:400},"& fieldset":{borderColor:"#D5DFE9"}},"& fieldset":{borderColor:"#D5DFE9"},textInput:{padding:14.5},headerTable:{verticalAlign:"bottom",paddingTop:"10px",fontWeight:"bold",fontSize:"14px"},tableText:{verticalAlign:"bottom",paddingTop:"10px",fontSize:"14px"},header:{display:"flex",alignItems:"center",justifyContent:"space-between",width:"100%",marginBottom:20},addButtonWrapper:{flexGrow:1,display:"flex",justifyContent:"flex-end",alignItems:"flex-end",padding:"0px 20px 20px 20px"},inputSelect:{width:"100%"},optional:{fontSize:12,marginBottom:e.spacing(1),marginLeft:e.spacing(1),color:"#9CA8B4"},description:{fontWeight:400,fontSize:"12px",lineHeight:"16px",color:"#5C6269"},hrLight:{opacity:.3,marginTop:"0px"}})),urlRegex=/[(http(s)?):\/\/(www\.)?a-zA-Z0-9@:%._\+~#=]{2,256}\.[a-z]{2,6}\b([-a-zA-Z0-9@:%_\+.~#?&//=]*)/,AppEventForm=({hidePanel:s,isEdit:i=!1,editIndex:o=-1})=>{const e=useStyles()["classes"],r=useDispatch(),{searchResults:t,handlers:l}=useSelector(selectEventPanel),a=useSelector(selectFlowLinkingPanel)["searchResults"];react.exports.useEffect(()=>{if(i){const{automateFlowId:e,eventIds:t,eventType:a,webhook:s}=l[o],n=(u(s),{});t.forEach(e=>{n[e]=!0}),f(e),d(a),v(n)}r(actions.appEventsPanelState.getEvents(!0)),r(actions.flowLinkingPanelState.searchByTerm(""))},[]),react.exports.useEffect(()=>{m(t)},[t]),react.exports.useEffect(()=>{h(a)},[a]);const n=useForm({mode:"onChange",defaultValues:{eventType:"webhook",flow:"none"}}),[p,d]=react.exports.useState("webhook"),[c,u]=react.exports.useState(""),[x,m]=react.exports.useState(t),[g,h]=react.exports.useState(a),[j,f]=react.exports.useState("none"),[b,y]=react.exports.useState("none"),[R,v]=react.exports.useState({});var S=e=>{let t={};t="webhook"===p?{webhook:c}:{automateFlowName:b,automateFlowId:j};const a=[];x.forEach(e=>{R[e.id]&&a.push(e.eventName)}),t=Object.assign(Object.assign({},t),{eventIds:Object.keys(R),eventNames:a,eventType:p}),i?r(actions.appEventsPanelState.editHandler({handler:t,index:o})):r(actions.appEventsPanelState.addHandler(t)),s()};return jsxRuntime.exports.jsx(FormProvider,Object.assign({},n,{children:jsxRuntime.exports.jsxs("form",Object.assign({className:e.root,onSubmit:n.handleSubmit(S)},{children:[jsxRuntime.exports.jsxs(Grid,Object.assign({className:e.container,container:!0,spacing:5,"data-test":"os-app-center-new.add-event-panel.form-container"},{children:[jsxRuntime.exports.jsxs(Grid,Object.assign({item:!0,xs:12},{children:[jsxRuntime.exports.jsxs(Box$1,Object.assign({className:e.header},{children:[jsxRuntime.exports.jsx(Typography,Object.assign({variant:"h1",color:"secondary","data-test":"os-app-center-new.add-event-panel.header-title"},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-app-center-new.add-event-panel..form-title",defaultMessage:"{label} AIWARE EVENT",description:"Form label for supported file types",values:{label:i?"Edit":"Add"}})})),jsxRuntime.exports.jsx(Tooltip,Object.assign({title:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-app-center-new.add-event-panel..form-title-close",defaultMessage:"Close",description:"Form label for close tooltip label"})},{children:jsxRuntime.exports.jsx(IconButton,Object.assign({onClick:s,"aria-labelledby":"os-app-center-new.add-event-panel..close-panel","data-test":"app-center-new-close-icon"},{children:jsxRuntime.exports.jsx(Close,{})}))}))]})),jsxRuntime.exports.jsx(Typography,Object.assign({variant:"h6",gutterBottom:!0,"data-test":"os-app-center-new.add-event-panel.handler-type-header"},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-app-center-new.add-event-panel.handler-type",defaultMessage:"Choose a handler type",description:"choose handler"})})),jsxRuntime.exports.jsxs(InputRadioGroup,Object.assign({"data-test":"os-app-center-new.add-event-panel.handler-type","aria-labelledby":"os-app-center-new.add-event-panel.radio-buttons-group-label",name:"eventType",value:p,onChange:e=>{d(e.target.value)},rules:{required:!0},row:!0},{children:[jsxRuntime.exports.jsx(FormControlLabel,{value:"webhook",control:jsxRuntime.exports.jsx(Radio,{"data-test":"radio-webhook",name:"eventType",value:"webhook"}),label:jsxRuntime.exports.jsx(Typography,Object.assign({variant:"h6",color:"textSecondary"},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-app-center-new.add-event-panel.radio-webhook-formattedMessage",defaultMessage:"Webhook",description:"Webhook"})}))}),jsxRuntime.exports.jsx(InputText,{sx:{pb:4},disabled:"webhook"!==p,inputProps:{maxLength:50,className:e.textInput},variant:"outlined",type:"text",name:"webhook",fullWidth:!0,value:c,onChange:e=>{e=e.target.value;u(e)},"data-test":"os-app-center-new.add-event-panel.webhook-input",rules:{required:"webhook"===p,pattern:{value:urlRegex,message:"Must be a valid URL including protocol."}}}),jsxRuntime.exports.jsx(FormControlLabel,{value:"flow",control:jsxRuntime.exports.jsx(Radio,{"data-test":"radio-flow",name:"eventType",value:"flow"}),label:jsxRuntime.exports.jsx(Typography,Object.assign({variant:"h6",color:"textSecondary"},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-app-center-new.add-event-panel.-radio-automateFlow-formattedMessage",defaultMessage:"Automate Flow",description:"Automate Flow"})}))}),jsxRuntime.exports.jsxs(Grid,Object.assign({item:!0,xs:12},{children:[jsxRuntime.exports.jsx(Typography,Object.assign({sx:{pb:2},variant:"h6",gutterBottom:!0,"data-test":"os-app-center-new.add-event-panel.automate-flow-header"},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-app-center-new.add-event-panel..automate-flow-header",defaultMessage:"Automate Flow Handlers",description:"Automate Flow Handlers"})})),jsxRuntime.exports.jsxs(InputSelect,Object.assign({disabled:"flow"!==p,inputProps:{maxLength:50},className:e.inputSelect,name:"flow",value:j,onChange:e=>{f(e.target.value),y(e.target["data-test"])},placeholder:"Select an Automate Flow",style:{minWidth:"100%"},"data-test":"os-app-center-new.add-event-panel.flow-input",rules:{required:"flow"===p,validate:{isNone:e=>"flow"!==p||"none"!==e||"Please select a value"}}},{children:[jsxRuntime.exports.jsx(MenuItem,Object.assign({value:"none",disabled:!0},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-app-center-new.add-event-panel..menu-item-placeholder",defaultMessage:"Select an Automate Flow",description:"Select an Automate Flow"})})),map_1(g,e=>jsxRuntime.exports.jsx(MenuItem,Object.assign({value:e.id,"data-test":e.name},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-app-center-new.add-event-panel..menu-item-placeholder-{id}",defaultMessage:"{name}",description:"{name}",values:{name:e.name}})}),"flow-"+e.id))]}))]}))]}))]})),jsxRuntime.exports.jsxs(Grid,Object.assign({item:!0,xs:12},{children:[jsxRuntime.exports.jsx(Typography,Object.assign({variant:"h6",gutterBottom:!0,"data-test":"os-app-center-new.add-event-panel.choose-events-header"},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-app-center-new.add-event-panel..events-header",defaultMessage:"Choose Events to Send",description:"Choose events to send"})})),jsxRuntime.exports.jsx(Typography,Object.assign({"data-test":"app-event-description",className:e.description},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-app-center-new.add-event-panel..events-description",defaultMessage:"Which events would you like to trigger this webhook?",description:"Which events would you like to trigger this webhook?"})}))]})),jsxRuntime.exports.jsxs(Grid,Object.assign({item:!0,xs:12},{children:[jsxRuntime.exports.jsxs(Grid,Object.assign({container:!0},{children:[jsxRuntime.exports.jsx(Grid,Object.assign({item:!0,xs:1},{children:jsxRuntime.exports.jsx(InputCheckbox,{checked:x.length===Object.keys(R).length,label:"",onClick:()=>{{const t=JSON.parse(JSON.stringify(R));return void(x.length===Object.keys(t).length?v({}):(x.forEach(e=>{t[e.id]=!0}),v(t)))}}})})),jsxRuntime.exports.jsx(Grid,Object.assign({className:e.headerTable,item:!0,xs:2},{children:"Event Type"})),jsxRuntime.exports.jsx(Grid,Object.assign({className:e.headerTable,item:!0,xs:4},{children:"Event Name"})),jsxRuntime.exports.jsx(Grid,Object.assign({className:e.headerTable,item:!0,xs:5},{children:"Description"}))]})),jsxRuntime.exports.jsx("hr",{className:e.hrLight}),map_1(x,s=>jsxRuntime.exports.jsxs(Grid,Object.assign({container:!0},{children:[jsxRuntime.exports.jsx(Grid,Object.assign({item:!0,xs:1},{children:jsxRuntime.exports.jsx(InputCheckbox,{label:"",value:s.id,checked:!!R[s.id],onClick:e=>{{var t=s.id;const a=JSON.parse(JSON.stringify(R));return e.target.checked?a[t]=!0:delete a[t],void v(a)}}})})),jsxRuntime.exports.jsx(Grid,Object.assign({className:e.tableText,item:!0,xs:2},{children:s.eventType})),jsxRuntime.exports.jsx(Grid,Object.assign({className:e.tableText,item:!0,xs:4},{children:s.eventName})),jsxRuntime.exports.jsx(Grid,Object.assign({className:e.tableText,item:!0,xs:5},{children:s.description}))]}),"event-"+s.id))]}))]})),jsxRuntime.exports.jsx(Box$1,Object.assign({className:e.addButtonWrapper},{children:jsxRuntime.exports.jsx(Button,Object.assign({type:"submit",disabled:!get_1(n,"formState.isValid"),onSubmit:S,variant:"contained",color:"primary","data-test":"os-app-center-new.add-event-panel.button-submit"},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-app-center-events.submit-button-label",defaultMessage:"{label}",description:"{label} text button",values:{label:i?"Update":"Add"}})}))}))]}))}))},AppEventPanel=e=>jsxRuntime.exports.jsx(CacheProvider,Object.assign({value:muiCache},{children:jsxRuntime.exports.jsx(AIWareThemeProvider,{children:jsxRuntime.exports.jsx(AIWareIntlProvider,{children:jsxRuntime.exports.jsx(AppEventForm,{hidePanel:e.hidePanel,isEdit:e.isEdit,editIndex:e.editIndex})})})}));export{AppCenterAddEnginePanel,AddFlowPanel as AppCenterAddFlowPanel,AddSchemaPanel as AppCenterAddSchemaPanel,AppCenterConfigFieldsForm,AppEventPanel as AppCenterEventPanel,AppCenterNew,AppCenterPaletteIntegrationPanel};
|
|
32
|
+
`,operationName:e},r)))[t]})}const selectOrgUsers=e=>{var{users:e,hasMore:t,offset:r}=null==(e=null==e?void 0:e[SLICE_NAME$1])?void 0:e[namespace$1];return{users:e,hasMore:t,offset:r}},selectStatus=e=>{return null==(e=null==e?void 0:e[SLICE_NAME$1])?void 0:e[namespace$1].status};function*fetchUsersSaga(e){try{var t,r=yield select(selectApiConfigs),{offset:n,hasMore:s}=yield select(selectOrgUsers);s&&(t=(yield fetchOrgUsers(r,n,PAGE_LIMIT))["records"],yield put(actions$2.adminCenterUsers.fetchOrgUsersSuccess({records:t,hasMore:PAGE_LIMIT===t.length,nextOffset:n+PAGE_LIMIT})))}catch(e){console.log(e),yield put(actions$2.adminCenterUsers.fetchOrgUsersFailure())}}function*removeUserFromOrgSaga(e){var{userId:e,orgGuid:t}=e.payload;try{var r=(yield removeUserFromOrg(yield select(selectApiConfigs),e,t))["id"];yield put(actions$2.adminCenterUsers.removeUserFromOrgSuccess(r||""))}catch(e){console.log(e),yield put(actions$2.adminCenterUsers.removeUserFromOrgFailure())}}function*updateUserStatusSaga(e){var{userId:e,status:t}=e.payload;try{var{id:r,status:n}=yield updateUserStatus(yield select(selectApiConfigs),e,t);r&&n&&(yield put(actions$2.adminCenterUsers.updateUserStatusSuccess({id:r,status:n})))}catch(e){console.log(e),yield put(actions$2.adminCenterUsers.updateUserStatusFailure())}}function*fetchUsersWatcher(){yield takeEvery$1(actions$2.adminCenterUsers.fetchOrgUsersStart.type,fetchUsersSaga)}function*removeUserFromOrgWatcher(){yield takeEvery$1(actions$2.adminCenterUsers.removeUserFromOrgStart.type,removeUserFromOrgSaga)}function*updateUserStatusWatcher(){yield takeEvery$1(actions$2.adminCenterUsers.updateUserStatusStart.type,updateUserStatusSaga)}function*rootSaga$1(){yield all([fetchUsersWatcher(),removeUserFromOrgWatcher(),updateUserStatusWatcher()])}function getAdminCenterUsersModule(){return{id:SLICE_NAME$1,reducerMap:{[SLICE_NAME$1]:rootReducer$1},sagas:[rootSaga$1],initialActions:[]}}const useStyles$3=makeStyles()(e=>({menuList:{width:e.spacing(34),padding:e.spacing(1.5)},menuItem:{borderRadius:4,padding:e.spacing(1),"& > svg":{marginRight:e.spacing(2)},textTransform:"none"}})),UserRowContextMenu=({anchorEl:e,id:t,open:r,onClose:n,userId:s,disableRemoval:o,orgGuid:i,status:a})=>{var l=useStyles$3()["classes"];const c=useDispatch();return jsxRuntime.exports.jsx(Popover,Object.assign({anchorEl:e,id:t,open:r,onClose:n,anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"right"}},{children:jsxRuntime.exports.jsxs(MenuList,Object.assign({role:"menu",className:l.menuList,"data-testid":"admin-center-user.menu"},{children:[jsxRuntime.exports.jsx(MenuItem,Object.assign({"data-testid":"admin-center-user.menu-item.status-update",onClick:()=>{c(actions$2.adminCenterUsers.updateUserStatusStart({userId:s,status:"deactivated"===a?"active":"deactivated"}))},className:l.menuItem,"data-test":"context-menu-item",sx:{cursor:"pointer"}},{children:"deactivated"===a?jsxRuntime.exports.jsx(FormattedMessage,{id:"ac-users.user-row.activate-btn",defaultMessage:"Activate",description:"Activate button in the user row context menu"}):jsxRuntime.exports.jsx(FormattedMessage,{id:"ac-users.user-row.deactivate-btn",defaultMessage:"Deactivate",description:"Deactivate button in the user row context menu"})})),jsxRuntime.exports.jsx(MenuItem,Object.assign({onClick:()=>{c(actions$2.adminCenterUsers.removeUserFromOrgStart({userId:s,orgGuid:i}))},className:l.menuItem,"data-test":"context-menu-item",disabled:o,sx:{cursor:o?"not-allowed":"pointer"},"data-testid":"admin-center-user.menu-item.remove-from-org"},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:"ac-users.user-row.remove-from-org-btn",defaultMessage:"Remove from Org",description:"Remove from Org button in the user row context menu"})}))]}))}))},useStyles$2$1=makeStyles()((e,{})=>({userAvatar:{border:"2px solid #FFFFFF",height:"40px",width:"40px",marginRight:"14px",fontSize:"14px",color:"white"},row:{padding:"13px"},userName:{alignSelf:"center"},truncate:{paddingRight:"20px","& p":{whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"}}})),UserRow=({user:{id:e,imageUrl:t,firstName:r,lastName:n,email:s,lastLoginDateTime:o,status:i,organizationGuids:a=[],organization:l,avatarColor:c}})=>{var u=useStyles$2$1({status:i})["classes"];const[p,d]=react.exports.useState(null);var $=p?"contextMenuId-"+e:void 0;return jsxRuntime.exports.jsxs("div",Object.assign({"data-testid":"ac-user-row-"+e},{children:[jsxRuntime.exports.jsxs(Grid,Object.assign({direction:"row",justifyContent:"space-between",alignItems:"center",item:!0,container:!0,xs:12,"data-testid":"admin-center-org-user-row",className:u.row},{children:[jsxRuntime.exports.jsxs(Grid,Object.assign({sx:{display:"flex"},xs:4,item:!0,className:u.truncate,"data-testid":"admin-center-org-user.avatar-name-col"},{children:[t?jsxRuntime.exports.jsx(Avatar,{alt:r+" "+n,src:t,className:u.userAvatar}):jsxRuntime.exports.jsx(Avatar,Object.assign({className:u.userAvatar,sx:{background:c}},{children:(t=n||"",""+(null==(c=null==(c=r||"")?void 0:c.charAt(0))?void 0:c.toUpperCase())+(null==(c=null==t?void 0:t.charAt(0))?void 0:c.toUpperCase()))})),jsxRuntime.exports.jsx(Tooltip,Object.assign({title:r+" "+n,arrow:!0},{children:jsxRuntime.exports.jsx(Typography,Object.assign({className:u.userName,variant:"body2",sx:{fontWeight:400},"data-testid":"admin-center-org-user.user-name"},{children:r+" "+n}))}))]})),jsxRuntime.exports.jsx(Grid,Object.assign({xs:3,item:!0,className:u.truncate,"data-testid":"admin-center-org-user.email-col"},{children:jsxRuntime.exports.jsx(Tooltip,Object.assign({title:s||"",arrow:!0},{children:jsxRuntime.exports.jsx(Typography,Object.assign({variant:"body2",sx:{fontWeight:400}},{children:s}))}))})),jsxRuntime.exports.jsx(Grid,Object.assign({xs:3,item:!0,"data-testid":"admin-center-org-user.last-login-col"},{children:o&&jsxRuntime.exports.jsxs(jsxRuntime.exports.Fragment,{children:[jsxRuntime.exports.jsx(Typography,Object.assign({variant:"body2",sx:{mb:"-6px",fontWeight:400}},{children:new Date(o).toLocaleDateString()})),jsxRuntime.exports.jsx(Typography,Object.assign({variant:"caption"},{children:(e=>{const t=e.toLocaleTimeString().split(" ");return t[0]=t[0].split(":"),t[0].pop(),t[0]=t[0].join(":"),t[0]+" "+t[1]})(new Date(o))}))]})})),jsxRuntime.exports.jsx(Grid,Object.assign({xs:1,item:!0,"data-testid":"admin-center-org-user.status-col"},{children:jsxRuntime.exports.jsx(UserStatusBadge,{status:i})})),jsxRuntime.exports.jsxs(Grid,Object.assign({xs:1,sx:{textAlign:"end"},item:!0,"data-testid":"admin-center-org-user.menu-col"},{children:[jsxRuntime.exports.jsx(IconButton,Object.assign({"data-testid":"user-row-menu-button-"+e,onClick:e=>d(e.currentTarget),size:"small"},{children:jsxRuntime.exports.jsx(MoreVert,{fontSize:"small"})})),jsxRuntime.exports.jsx(UserRowContextMenu,{anchorEl:p,id:$,open:!!p,onClose:()=>d(null),disableRemoval:a.length<2,userId:e||"",orgGuid:(null==l?void 0:l.guid)||"",status:i,"data-testid":"admin-center-org-user.menu-icon"})]}))]})),jsxRuntime.exports.jsx(Divider,{})]}))},useStyles$1$1=makeStyles()(e=>({root:{height:"100%"},loader:{display:"flex",marginTop:e.spacing(1),justifyContent:"center"}})),UserTable=()=>{const{users:r=[],hasMore:t}=useSelector(selectOrgUsers),e=useSelector(selectStatus),s=useDispatch(),n=useStyles$1$1()["classes"],o=(react.exports.useEffect(()=>{s(actions$1.fetchOrgUsersStart())},[s]),e=>!t||e<r.length),i=t?r.length+1:r.length,a=({index:e,style:t})=>o(e)?jsxRuntime.exports.jsx("div",Object.assign({style:Object.assign({},t)},{children:jsxRuntime.exports.jsx(UserRow,{user:r[e]})}),e):jsxRuntime.exports.jsx("div",Object.assign({"data-test":"users-table-row-loader",style:Object.assign(Object.assign({},t),{top:0}),className:n.loader},{children:jsxRuntime.exports.jsx(CircularProgress,{size:36})}));return jsxRuntime.exports.jsxs("div",Object.assign({className:n.root},{children:[jsxRuntime.exports.jsxs(Grid,Object.assign({direction:"row",justifyContent:"space-between",alignItems:"center",item:!0,container:!0,xs:12,"data-testid":"admin-center-org-user-table-header",sx:{pl:"13px",pr:"13px"}},{children:[jsxRuntime.exports.jsx(Grid,Object.assign({xs:4,item:!0},{children:jsxRuntime.exports.jsx(Typography,Object.assign({variant:"caption"},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:"ac-user-table.header.name-col",defaultMessage:"Name",description:"Name column header"})}))})),jsxRuntime.exports.jsx(Grid,Object.assign({xs:3,item:!0},{children:jsxRuntime.exports.jsx(Typography,Object.assign({variant:"caption"},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:"ac-user-table.header.email-col",defaultMessage:"Email",description:"Email column header"})}))})),jsxRuntime.exports.jsx(Grid,Object.assign({xs:3,item:!0},{children:jsxRuntime.exports.jsx(Typography,Object.assign({variant:"caption"},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:"ac-user-table.header.last-login-col",defaultMessage:"Last Login",description:"Last Login column header"})}))})),jsxRuntime.exports.jsx(Grid,Object.assign({xs:1,item:!0},{children:jsxRuntime.exports.jsx(Typography,Object.assign({variant:"caption"},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:"ac-user-table.header.status-col",defaultMessage:"Status",description:"Status column header"})}))})),jsxRuntime.exports.jsx(Grid,{xs:1,item:!0})]})),jsxRuntime.exports.jsx(Divider,{}),"failure"===e?jsxRuntime.exports.jsx(ErrorState,{onRetry:()=>s(actions$1.fetchOrgUsersStart()),errorMessage:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center.users.error-message",defaultMessage:"Something went wrong while loading user list.",description:"Admin Center Users table loading error"})}):jsxRuntime.exports.jsx(AutoSizer,{children:({height:r,width:n})=>jsxRuntime.exports.jsx(InfiniteLoader,Object.assign({isItemLoaded:o,itemCount:i,loadMoreItems:()=>{"success"===e&&s(actions$1.fetchOrgUsersStart())}},{children:({onItemsRendered:e,ref:t})=>jsxRuntime.exports.jsx("div",Object.assign({"data-testid":"list-wrapper"},{children:jsxRuntime.exports.jsx(VariableSizeList,Object.assign({height:r-40,itemCount:i,itemSize:()=>60,initialScrollOffset:0,onItemsRendered:e,ref:t,width:n},{children:a}))}))}))})]}))},inviteUsersPanel="INVITE_USERS_PANEL",inviteRequestsPanel="INVITE_REQUESTS_PANEL",handleClickInviteUsers=(e,t)=>{var r={name:inviteUsersPanel,config:{name:"Invite Users"}},t={type:"APP_BAR_PANEL_TEMPLATE",marginTop:t?0:55,marginStart:t?0:80,size:"medium",zIndex:t?1010:1001,parentPanelId:"ADMIN_CENTER_BROWSE",dimmed:0,dimmedStatus:"dimParent"};e(mountPanel({panelId:inviteUsersPanel,microFrontend:r,panelConfig:t}))},handleViewRequests=(e,t)=>{var r={name:inviteRequestsPanel,config:{name:"Invite Requests"}},t={type:"APP_BAR_PANEL_TEMPLATE",marginTop:t?0:55,marginStart:t?0:80,size:"medium",zIndex:t?1010:1001,parentPanelId:"ADMIN_CENTER_BROWSE",dimmed:0,dimmedStatus:"dimParent",header:{title:jsxRuntime.exports.jsx(FormattedMessage,{id:"admin-center.users.button.invite-requests",defaultMessage:"Invite Requests",description:"Invite Requests header title"})}};e(mountPanel({panelId:inviteRequestsPanel,microFrontend:r,panelConfig:t}))},useStyles$5=makeStyles()(e=>({root:{display:"flex",flexDirection:"column"},header:{display:"flex",justifyContent:"space-between",padding:e.spacing(4),borderBottom:"0.5px solid "+e.palette.divider,"& button":{height:"28px"}},tableWrapper:{height:"calc(100vh - 55px - 64px - 69px - 22px)",overflow:"hidden"},toolbar:{alignItems:"baseline","& button svg":{marginRight:"5px"},display:"flex",justifyContent:"center"},addUserBtn:{"& svg":{marginRight:"10px",height:"14px",width:"14px"}}})),UsersPanel=({isPanelFullScreen:e})=>{var t=useStyles$5()["classes"];const r=useDispatch();var n=useSelector(organizations_selector.selectPendingOrgInvites);const s=useSelector(userSelector);react.exports.useEffect(()=>{r(actions$3.organizationInvitesState.fetchPendingInvitesStart(s.organization.organizationId))},[]);n=jsxRuntime.exports.jsxs(jsxRuntime.exports.Fragment,{children:[jsxRuntime.exports.jsx("section",Object.assign({className:t.root},{children:jsxRuntime.exports.jsxs("header",Object.assign({className:t.header},{children:[jsxRuntime.exports.jsx(Box$1,Object.assign({sx:{mr:15,display:"flex",verticalAlign:"center","& h5":{lineHeight:"28px"}}},{children:jsxRuntime.exports.jsx(Typography,Object.assign({variant:"h5","data-testid":"org-applications.header"},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-panel.users.table.header",defaultMessage:"Users",description:"Users Header"})}))})),jsxRuntime.exports.jsxs(Box$1,{children:[jsxRuntime.exports.jsxs(Button,Object.assign({variant:"outlined",onClick:()=>handleViewRequests(r,e)},{children:[jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-panel.users.user-requests.btn",defaultMessage:"User Requests",description:"User Requests tab button"})," ","(",n.length,")"]})),jsxRuntime.exports.jsxs(Button,Object.assign({variant:"contained",sx:{ml:"13px"},className:t.addUserBtn,onClick:()=>handleClickInviteUsers(r,e)},{children:[jsxRuntime.exports.jsx(AddUser,{}),jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-panel.users.invite-user.btn",defaultMessage:"Invite User",description:"Invite User tab button"})]}))]})]}))})),jsxRuntime.exports.jsx("div",Object.assign({className:t.tableWrapper},{children:jsxRuntime.exports.jsx(UserTable,{})}))]});return e?jsxRuntime.exports.jsx(AIWareThemeProvider,{children:n}):n},useStyles$2=(!function(){var e={};try{if(process)return process.env=Object.assign({},process.env),Object.assign(process.env,e)}catch(e){}globalThis.process={env:e}}(),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:r,onFullScreenToggle:n,isFullScreen:s,height:o})=>{o=useStyles$2({height:o}).classes;return jsxRuntime.exports.jsxs("header",Object.assign({className:o.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:r,"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,Object.assign({variant:"h1",className:o.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:o.headerActionContainer},{children:[jsxRuntime.exports.jsx("div",{className:o.verticalDivider}),jsxRuntime.exports.jsx(Tooltip,Object.assign({title:s?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:n,"aria-labelledby":"ac-toggle-fullscreen","data-test":"ac-fullscreen-toggle",size:"large"},{children:s?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 r={};for(s in e)Object.prototype.hasOwnProperty.call(e,s)&&t.indexOf(s)<0&&(r[s]=e[s]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var n=0,s=Object.getOwnPropertySymbols(e);n<s.length;n++)t.indexOf(s[n])<0&&Object.prototype.propertyIsEnumerable.call(e,s[n])&&(r[s[n]]=e[s[n]]);return r}function __awaiter(e,i,a,l){return new(a=a||Promise)(function(r,t){function n(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?r(e.value):((t=e.value)instanceof a?t:new a(function(e){e(t)})).then(n,s)}o((l=l.apply(e,i||[])).next())})}!function(e){e[e.users=0]="users",e[e.applications=1]="applications",e[e.permissionSets=2]="permissionSets",e[e.accessControl=3]="accessControl",e[e.groups=4]="groups"}(AdminCenterView=AdminCenterView||{});const SLICE_NAME="browse",namespace="browseDetail",initialState={status:"idle",olpFeature:"disabled"},browseSlice=createSlice({name:SLICE_NAME+"/"+namespace,initialState:initialState,reducers:{fetchOlpAvailabilityStart(e){e.status="loading"},fetchOlpAvailabilitySuccess(e,t){e.status="success",e.olpFeature=t.payload},fetchOlpAvailabilityFailure(e){e.status="failure"}}}),actions=browseSlice.actions;var browse_state=browseSlice.reducer;const rootReducer=combineReducers({[namespace]:browse_state});function checkOlpAvailability(t){return __awaiter(this,void 0,void 0,function*(){var e="checkOlpAvailability";return(yield baseGraphQLApiWithError(Object.assign({query:"\n query checkOlpAvailability {\n me {\n organization { \n jsondata \n } \n }\n }\n ",operationName:e},t))).me.organization.jsondata.features.enableRBACFeature})}function*fetchOlpAvailabilitySaga(e){try{var t=yield select(selectApiConfigs),r=yield call$b(checkOlpAvailability,t);yield put(actions.fetchOlpAvailabilitySuccess(r))}catch(e){yield put(actions.fetchOlpAvailabilityFailure()),console.log(e)}}function*fetchOlpAvailabilityWatcher(){yield takeEvery$1(actions.fetchOlpAvailabilityStart.type,fetchOlpAvailabilitySaga)}function*rootSaga(){yield all([fetchOlpAvailabilityWatcher()])}const selectOlpAvailability=e=>{return null==(e=null==(e=null==e?void 0:e[SLICE_NAME])?void 0:e[namespace])?void 0:e.olpFeature};function getAdminCenterBrowseModule(){return{id:SLICE_NAME,reducerMap:{[SLICE_NAME]:rootReducer},sagas:[rootSaga],initialActions:[]}}const tabWidth=197,useStyles$1=makeStyles()((e,{height:t},r)=>({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),["& "+r.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.users,label:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-browse.users.view",defaultMessage:"Users",description:"The label of users tab button."}),testLabel:"ac-users-view",icon:jsxRuntime.exports.jsx(Users,{}),content:e=>jsxRuntime.exports.jsx(UsersPanel,{isPanelFullScreen:e})},{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})}],olpNavList=[{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.system-access.view",defaultMessage:"System Access",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:r,height:e})=>{const n=useStyles$1({height:e})["classes"],[s,o]=react.exports.useState(AdminCenterView.users),[i,a]=react.exports.useState(navList),l=useSelector(selectOlpAvailability);e=useSelector(betaFeaturesSelector);return react.exports.useEffect(()=>{"enabled"===l&&a(e=>[...e,...olpNavList])},[l,e]),jsxRuntime.exports.jsxs("div",Object.assign({className:n.root},{children:[jsxRuntime.exports.jsx(Tabs,Object.assign({id:"adminCenterViewTabs",orientation:"vertical",value:s,onChange:(e,t)=>{o(t)},className:classNames(n.tabs,{[n.tabsExpanded]:t}),classes:{flexContainer:n.tabsContainer,indicator:n.tabIndicator},"aria-label":"admin center tabs","data-test":"ac-nav-tabs-container"},{children:i.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:n.tabRoot,wrapped:t?n.tabExpandedWrapper:n.tabWrapper,selected:t?n.tabExpandedSelected:n.tabSelected}}))}),e.id))})),i.map(e=>jsxRuntime.exports.jsx(TabPanel,Object.assign({value:s,index:e.id,className:n.contentPanel},{children:e.content(r)}),e.id))]}))};function TabPanel(e){var{children:t,value:r,index:n}=e,e=__rest(e,["children","value","index"]);return jsxRuntime.exports.jsx("div",Object.assign({role:"tabpanel",hidden:r!==n,id:"admin-center-tabpanel-"+n,"aria-labelledby":"admin-center-tab-"+n},e,{children:r===n&&t}))}function a11yProps(e){return{id:"admin-center-tab-"+e,"aria-controls":"admin-center-tabpanel-"+e}}const Container=({fullScreen:e,classes:t,dimmed:r,children:n})=>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:[r&&jsxRuntime.exports.jsx("div",{className:t.overlay}),n]}))}):jsxRuntime.exports.jsx("div",Object.assign({role:"presentation","data-test":"ac-widget",className:classNames(t.root,t.panel)},{children:n})),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,r]=react.exports.useState(!0),[n,s]=react.exports.useState(!1);var o=useStyles()["classes"];const i=useSelector(panelsSelector)||[];var a=i.find(e=>"ADMIN_CENTER_BROWSE"===e.panelId)||{panelConfig:{dimmed:0}},a=0<(null==(a=null===a?void 0:a.panelConfig)?void 0:a.dimmed),l=`calc(100vh - ${n?25:appBarHeight+borderBottom}px - ${headerHeight}px)`;return jsxRuntime.exports.jsxs(Container,Object.assign({dimmed:a,fullScreen:n,classes:o},{children:[jsxRuntime.exports.jsx(Header,{height:headerHeight,hidePanel:e,isNavExpanded:t,onLeftNavigationToggle:()=>{r(!t)},isFullScreen:n,onFullScreenToggle:()=>{s(!n)}}),jsxRuntime.exports.jsx(MainTabPanel,{height:l,isNavExpanded:t,isFullScreen:n})]}))},Content=e=>{var{apiRoot:t,graphQLEndpoint:r,token:n}=useSelector(selectApiConfigs);const s=useDispatch();return react.exports.useEffect(()=>{s(actions.fetchOlpAvailabilityStart())},[]),t&&r&&n?jsxRuntime.exports.jsx(MainLayout,Object.assign({},e)):null},AdminCenterBrowse=e=>jsxRuntime.exports.jsx(AIWareThemeProvider,{children:jsxRuntime.exports.jsx(lib.DynamicModuleLoader,Object.assign({modules:[getAdminCenterUsersModule(),getAdminCenterGroupsModule(),getAdminCenterPermissionsModule(),getAdminCenterApplicationsModule(),getAdminCenterBrowseModule(),getOrganizationPanelModule()]},{children:jsxRuntime.exports.jsx(AIWareIntlProvider,{children:jsxRuntime.exports.jsx(Content,Object.assign({},e))})}))});export{AdminCenterBrowse};
|