aiware-js 1.0.0-master.1666 → 1.0.0-master.1667
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/js-core.esm135.js +1 -1
- package/js-core.esm135.js.gz +0 -0
- package/js-core.esm20.js +1 -1
- package/js-core.esm20.js.gz +0 -0
- package/locales/es.json +1 -1
- package/locales/fr.json +1 -1
- package/package.json +1 -1
package/js-core.esm135.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as jsxRuntimeExports,c as createAction,L as createReducer,a4 as createSlice,aL as store,P as Provider,r as reactExports,u as useSelector,aa as selectApiConfigs,bQ as automateUrlSelector,b4 as controllerUrlSelector,b3 as automateControllerUrlSelector,c3 as getBrowserSafeControllerUrl,B as Box,aj as preferredLanguageSelector,c4 as baseUrlSelector,ah as rootApiSelector,b2 as controllerNodeRedImageSelector,c5 as flowCenterDialogSelector,ar as betaFeaturesSelector,c6 as ENGINE_OWNER_TYPES,ak as lodashExports,c7 as flowCenterDialogReducer,c8 as ClickAwayListener,c9 as flowCenterDialogAction,ca as img$G,cb as img$H,cc as img$n,cd as img$D,ce as img$E,cf as ENGINE_FILTER_TYPES,cg as FormattedDate,ch as img$x,ci as img$10,cj as setApiEndpoint,_ as all,a8 as sessionTokenSelector,ck as fetchTemplateGallery,cl as img$B,C as CircularProgress,cm as img$r,bR as img$w,cn as img$I,co as img$F,cp as img$1a,cq as img$c,cr as img$d,cs as img$Y,ct as img$y,cu as img$A,cv as img$1e,a9 as graphEndpointSelector,cw as deleteEngine,cx as fetchEngine,cy as img$z,al as showMessage,am as MessageSeverity,an as AIWareFormatMessage,ao as takeLatest$1,N as put,cz as fetchAllTags,K as select,cA as fetchFlows$1,a6 as call,cB as isRevisionsExistOnServerRequest,aS as appIdSelector,cC as fetchVeritoneGraphQLApi}from"./js-core.esm4.js";import{a_ as requireCreateSvgIcon,a$ as interopRequireDefaultExports,m as makeStyles,D as DynamicModuleLoader,A as AIWareIntlProvider,c2 as flowStyles,T as Typography,M as MemoizedFormattedMessage,ag as TableContainer,ah as Table,ai as TableBody,l as TableRow,n as TableCell,c3 as NoResults,H as Dialog,J as DialogTitle,K as DialogContent,O as DialogActions,B as Button,P as Portal,L as List,aj as TableHead,bb as Fade,a as Paper,w as Divider,a5 as TableSortLabel,a6 as default_1$c,f as FormControl,G as Grid,C as Card,S as Select,e as MenuItem,as as Tabs,at as Tab}from"./js-core.esm7.js";import{f as Skeleton,ac as LoadingButton,a0 as ListItemIcon,c as Tooltip,d as Chip,I as IconButton,aG as Popper,M as DateTime_1,a9 as FormLabel,b8 as default_1$d,aa as FormGroup,a7 as FormControlLabel,a8 as Checkbox,m as devErrorLogger,a as Snackbar,au as Search,b9 as Close$1,T as TextField}from"./js-core.esm9.js";import{c as default_1$b,C as CardContent,e as CardActions,f as default_1$f,d as default_1$g}from"./js-core.esm29.js";import{T as TablePagination,a as Toolbar$1,A as App$1,S as StatusPill,g as getFlowStatus}from"./js-core.esm136.js";import{d as default_1$a}from"./js-core.esm72.js";import{d as default_1$e}from"./js-core.esm53.js";import{I as IFlowWidgetTabs,a as IFlowWidgetActivityTabs}from"./js-core.esm13.js";import{L as ListItem,c as ListItemText,v as LinearProgress}from"./js-core.esm8.js";import{A as AppBar}from"./js-core.esm121.js";import{u as useDispatch}from"./js-core.esm15.js";import"./js-core.esm24.js";import"./js-core.esm125.js";import"./js-core.esm17.js";import"./js-core.esm18.js";import"./js-core.esm44.js";import"./js-core.esm16.js";var WorkOutlineOutlined={},_interopRequireDefault$9=interopRequireDefaultExports,default_1$9=(Object.defineProperty(WorkOutlineOutlined,"__esModule",{value:!0}),WorkOutlineOutlined.default=void 0),_createSvgIcon$9=_interopRequireDefault$9(requireCreateSvgIcon()),_jsxRuntime$9=jsxRuntimeExports,_default$9=(0,_createSvgIcon$9.default)((0,_jsxRuntime$9.jsx)("path",{d:"M14 6V4h-4v2h4zM4 8v11h16V8H4zm16-2c1.11 0 2 .89 2 2v11c0 1.11-.89 2-2 2H4c-1.11 0-2-.89-2-2l.01-11c0-1.11.88-2 1.99-2h4V4c0-1.11.89-2 2-2h4c1.11 0 2 .89 2 2v2h4z"}),"WorkOutlineOutlined"),default_1$9=WorkOutlineOutlined.default=_default$9,PeopleAltOutlined={},_interopRequireDefault$8=interopRequireDefaultExports,default_1$8=(Object.defineProperty(PeopleAltOutlined,"__esModule",{value:!0}),PeopleAltOutlined.default=void 0),_createSvgIcon$8=_interopRequireDefault$8(requireCreateSvgIcon()),_jsxRuntime$8=jsxRuntimeExports,_default$8=(0,_createSvgIcon$8.default)((0,_jsxRuntime$8.jsx)("path",{d:"M16.67 13.13C18.04 14.06 19 15.32 19 17v3h4v-3c0-2.18-3.57-3.47-6.33-3.87zM15 12c2.21 0 4-1.79 4-4s-1.79-4-4-4c-.47 0-.91.1-1.33.24C14.5 5.27 15 6.58 15 8s-.5 2.73-1.33 3.76c.42.14.86.24 1.33.24zm-6 0c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0-6c1.1 0 2 .9 2 2s-.9 2-2 2-2-.9-2-2 .9-2 2-2zm0 7c-2.67 0-8 1.34-8 4v3h16v-3c0-2.66-5.33-4-8-4zm6 5H3v-.99C3.2 16.29 6.3 15 9 15s5.8 1.29 6 2v1z"}),"PeopleAltOutlined"),default_1$8=PeopleAltOutlined.default=_default$8,PersonOutlineOutlined={},_interopRequireDefault$7=interopRequireDefaultExports,default_1$7=(Object.defineProperty(PersonOutlineOutlined,"__esModule",{value:!0}),PersonOutlineOutlined.default=void 0),_createSvgIcon$7=_interopRequireDefault$7(requireCreateSvgIcon()),_jsxRuntime$7=jsxRuntimeExports,_default$7=(0,_createSvgIcon$7.default)((0,_jsxRuntime$7.jsx)("path",{d:"M12 5.9c1.16 0 2.1.94 2.1 2.1s-.94 2.1-2.1 2.1S9.9 9.16 9.9 8s.94-2.1 2.1-2.1m0 9c2.97 0 6.1 1.46 6.1 2.1v1.1H5.9V17c0-.64 3.13-2.1 6.1-2.1M12 4C9.79 4 8 5.79 8 8s1.79 4 4 4 4-1.79 4-4-1.79-4-4-4zm0 9c-2.67 0-8 1.34-8 4v3h16v-3c0-2.66-5.33-4-8-4z"}),"PersonOutlineOutlined"),default_1$7=PersonOutlineOutlined.default=_default$7,HistoryOutlined={},_interopRequireDefault$6=interopRequireDefaultExports,default_1$6=(Object.defineProperty(HistoryOutlined,"__esModule",{value:!0}),HistoryOutlined.default=void 0),_createSvgIcon$6=_interopRequireDefault$6(requireCreateSvgIcon()),_jsxRuntime$6=jsxRuntimeExports,_default$6=(0,_createSvgIcon$6.default)((0,_jsxRuntime$6.jsx)("path",{d:"M13 3c-4.97 0-9 4.03-9 9H1l3.89 3.89.07.14L9 12H6c0-3.87 3.13-7 7-7s7 3.13 7 7-3.13 7-7 7c-1.93 0-3.68-.79-4.94-2.06l-1.42 1.42C8.27 19.99 10.51 21 13 21c4.97 0 9-4.03 9-9s-4.03-9-9-9zm-1 5v5l4.25 2.52.77-1.28-3.52-2.09V8z"}),"HistoryOutlined"),default_1$6=HistoryOutlined.default=_default$6,Warning={},_interopRequireDefault$5=interopRequireDefaultExports,default_1$5=(Object.defineProperty(Warning,"__esModule",{value:!0}),Warning.default=void 0),_createSvgIcon$5=_interopRequireDefault$5(requireCreateSvgIcon()),_jsxRuntime$5=jsxRuntimeExports,_default$5=(0,_createSvgIcon$5.default)((0,_jsxRuntime$5.jsx)("path",{d:"M1 21h22L12 2 1 21zm12-3h-2v-2h2v2zm0-4h-2v-4h2v4z"}),"Warning"),default_1$5=Warning.default=_default$5,OpenInNew={},_interopRequireDefault$4=interopRequireDefaultExports,default_1$4=(Object.defineProperty(OpenInNew,"__esModule",{value:!0}),OpenInNew.default=void 0),_createSvgIcon$4=_interopRequireDefault$4(requireCreateSvgIcon()),_jsxRuntime$4=jsxRuntimeExports,_default$4=(0,_createSvgIcon$4.default)((0,_jsxRuntime$4.jsx)("path",{d:"M19 19H5V5h7V3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2v-7h-2v7zM14 3v2h3.59l-9.83 9.83 1.41 1.41L19 6.41V10h2V3h-7z"}),"OpenInNew"),default_1$4=OpenInNew.default=_default$4,StopCircle={},_interopRequireDefault$3=interopRequireDefaultExports,default_1$3=(Object.defineProperty(StopCircle,"__esModule",{value:!0}),StopCircle.default=void 0),_createSvgIcon$3=_interopRequireDefault$3(requireCreateSvgIcon()),_jsxRuntime$3=jsxRuntimeExports,_default$3=(0,_createSvgIcon$3.default)((0,_jsxRuntime$3.jsx)("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm4 14H8V8h8v8z"}),"StopCircle"),default_1$3=StopCircle.default=_default$3,FilterListOutlined={},_interopRequireDefault$2=interopRequireDefaultExports,default_1$2=(Object.defineProperty(FilterListOutlined,"__esModule",{value:!0}),FilterListOutlined.default=void 0),_createSvgIcon$2=_interopRequireDefault$2(requireCreateSvgIcon()),_jsxRuntime$2=jsxRuntimeExports,_default$2=(0,_createSvgIcon$2.default)((0,_jsxRuntime$2.jsx)("path",{d:"M10 18h4v-2h-4v2zM3 6v2h18V6H3zm3 7h12v-2H6v2z"}),"FilterListOutlined"),default_1$2=FilterListOutlined.default=_default$2,Refresh={},_interopRequireDefault$1=interopRequireDefaultExports,default_1$1=(Object.defineProperty(Refresh,"__esModule",{value:!0}),Refresh.default=void 0),_createSvgIcon$1=_interopRequireDefault$1(requireCreateSvgIcon()),_jsxRuntime$1=jsxRuntimeExports,_default$1=(0,_createSvgIcon$1.default)((0,_jsxRuntime$1.jsx)("path",{d:"M17.65 6.35C16.2 4.9 14.21 4 12 4c-4.42 0-7.99 3.58-7.99 8s3.57 8 7.99 8c3.73 0 6.84-2.55 7.73-6h-2.08c-.82 2.33-3.04 4-5.65 4-3.31 0-6-2.69-6-6s2.69-6 6-6c1.66 0 3.14.69 4.22 1.78L13 11h7V4l-2.35 2.35z"}),"Refresh"),default_1$1=Refresh.default=_default$1,Dashboard={},_interopRequireDefault=interopRequireDefaultExports,default_1=(Object.defineProperty(Dashboard,"__esModule",{value:!0}),Dashboard.default=void 0),_createSvgIcon=_interopRequireDefault(requireCreateSvgIcon()),_jsxRuntime=jsxRuntimeExports,_default=(0,_createSvgIcon.default)((0,_jsxRuntime.jsx)("path",{d:"M3 13h8V3H3v10zm0 8h8v-6H3v6zm10 0h8V11h-8v10zm0-18v6h8V3h-8z"}),"Dashboard");function _array_like_to_array$a(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function _array_without_holes$2(e){if(Array.isArray(e))return _array_like_to_array$a(e)}function _define_property$8(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _iterable_to_array$2(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function _non_iterable_spread$2(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _object_spread$7(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{},n=Object.keys(r);(n="function"==typeof Object.getOwnPropertySymbols?n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})):n).forEach(function(e){_define_property$8(t,e,r[e])})}return t}function ownKeys$2(e,t){var r=Object.keys(e);return Object.getOwnPropertySymbols&&(e=Object.getOwnPropertySymbols(e),r.push.apply(r,e)),r}function _object_spread_props$2(t,r){return r=null!=r?r:{},Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):ownKeys$2(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}),t}function _to_consumable_array$2(e){return _array_without_holes$2(e)||_iterable_to_array$2(e)||_unsupported_iterable_to_array$a(e)||_non_iterable_spread$2()}function _unsupported_iterable_to_array$a(e,t){var r;if(e)return"string"==typeof e?_array_like_to_array$a(e,t):"Map"===(r="Object"===(r=Object.prototype.toString.call(e).slice(8,-1))&&e.constructor?e.constructor.name:r)||"Set"===r?Array.from(r):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?_array_like_to_array$a(e,t):void 0}function _ts_generator$7(n,o){var a,s,i,l={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]},e={next:t(0),throw:t(1),return:t(2)};return"function"==typeof Symbol&&(e[Symbol.iterator]=function(){return this}),e;function t(r){return function(e){var t=[r,e];if(a)throw new TypeError("Generator is already executing.");for(;l;)try{if(a=1,s&&(i=2&t[0]?s.return:t[0]?s.throw||((i=s.return)&&i.call(s),0):s.next)&&!(i=i.call(s,t[1])).done)return i;switch(s=0,(t=i?[2&t[0],i.value]:t)[0]){case 0:case 1:i=t;break;case 4:return l.label++,{value:t[1],done:!1};case 5:l.label++,s=t[1],t=[0];continue;case 7:t=l.ops.pop(),l.trys.pop();continue;default:if(!(i=0<(i=l.trys).length&&i[i.length-1])&&(6===t[0]||2===t[0])){l=0;continue}if(3===t[0]&&(!i||t[1]>i[0]&&t[1]<i[3]))l.label=t[1];else if(6===t[0]&&l.label<i[1])l.label=i[1],i=t;else{if(!(i&&l.label<i[2])){i[2]&&l.ops.pop(),l.trys.pop();continue}l.label=i[2],l.ops.push(t)}}t=o.call(n,l)}catch(e){t=[6,e],s=0}finally{a=i=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}}}var _obj,default_1=Dashboard.default=_default,FETCH_FLOWS="flow-center/FETCH_FLOWS",ADD_NEW_FLOW="flow-center/ADD_NEW_FLOW",IS_REVISIONS_EXIST_ON_SERVER="flow-center/IS_REVISIONS_EXIST_ON_SERVER",SET_IS_REVISIONS_EXIST_ON_SERVER="flow-center/SET_IS_REVISIONS_EXIST_ON_SERVER",SET_FETCHING_FLOWS="flow-center/SET_FETCHING_FLOWS",SET_OPEN_TEMPLATE="flow-center/SET_OPEN_TEMPLATE",SET_TEMPLATE_SELECTED="flow-center/SET_TEMPLATE_SELECTED",SET_TEMPLATES="flow-center/SET_TEMPLATES",SET_FILTERED_TEMPLATES_ACTION="flow-center/SET_FILTERED_TEMPLATES_ACTION",FETCH_TAGS="flow-center/FETCH_TAGS",SET_TAGS="flow-center/SET_TAGS",SET_TAGS_TO_STORE="flow-center/SET_TAGS_TO_STORE",SET_CATEGORIES="flow-center/SET_CATEGORIES",SET_TEMPLATES_AUTHORS="flow-center/SET_TEMPLATES_AUTHORS",SET_SELECTED_FILTERS="flow-center/SET_SELECTED_FILTERS",SET_TAG="flow-center/SET_TAG",SET_FLOWS="flow-center/SET_FLOWS",SET_NOTEBOOKS="flow-center/SET_NOTEBOOKS",FETCH_NOTEBOOKS="flow-center/FETCH_NOTEBOOKS",TOGGLE_IS_SEARCHING="flow-center/TOGGLE_IS_SEARCHING",TOGGLE_IS_SEARCHING_LOADING="flow-center/TOGGLE_IS_SEARCHING_LOADING",SEARCH_TEMPLATES="flow-center/SEARCH_TEMPLATES",SET_SEARCHED="flow-center/SET_SEARCHED",SET_SEARCHED_TEMPLATES="flow-center/SET_SEARCHED_TEMPLATES",SET_CONFIG="flow-center/SET_CONFIG",TOGGLE_STATE_CREATE_NEW_FLOW="flow-center/TOGGLE_STATE_CREATE_NEW_FLOW",SET_SHOULD_CREATE_INITIAL_FLOWS="flow-center/SET_SHOULD_CREATE_INITIAL_FLOWS",GET_NODE_RED_VERSION_EDGE="flow-center/GET_NODE_RED_VERSION_EDGE",setFetchingFlows=createAction(SET_FETCHING_FLOWS),isRevisionsExistOnServer=createAction(IS_REVISIONS_EXIST_ON_SERVER),setOpenTemplate=createAction(SET_OPEN_TEMPLATE),setTemplateSelected=createAction(SET_TEMPLATE_SELECTED),setTemplatesAction=createAction(SET_TEMPLATES),setFilteredTemplatesAction=createAction(SET_FILTERED_TEMPLATES_ACTION),setTags=(createAction(FETCH_TAGS),createAction(SET_TAGS)),setTagsToStore=createAction(SET_TAGS_TO_STORE),setCategories=createAction(SET_CATEGORIES),setTemplatesAuthors=createAction(SET_TEMPLATES_AUTHORS),setSelectedFilters=createAction(SET_SELECTED_FILTERS),fetchFlows=(createAction(SET_TAG),createAction(FETCH_FLOWS)),fetchNotebooks=createAction(FETCH_NOTEBOOKS),setFlows=createAction(SET_FLOWS),setNotebooks=createAction(SET_NOTEBOOKS),addNewFlow=createAction(ADD_NEW_FLOW),toggleIsSearching=createAction(TOGGLE_IS_SEARCHING),toggleIsSearchingLoading=createAction(TOGGLE_IS_SEARCHING_LOADING),searchTemplates=createAction(SEARCH_TEMPLATES),setSearched=createAction(SET_SEARCHED),setSearchedTemplates=createAction(SET_SEARCHED_TEMPLATES),setFlowCenterConfig=createAction(SET_CONFIG),toggleStateCreateNewFlow=createAction(TOGGLE_STATE_CREATE_NEW_FLOW),setShouldCreateInitialFlows=createAction(SET_SHOULD_CREATE_INITIAL_FLOWS),flowsReducer=(createAction(GET_NODE_RED_VERSION_EDGE),createReducer({flows:[],notebooks:[],shouldCreateInitialFlows:!1,fetchingFlows:!1,templateToOpen:{},isTemplateSelected:!1,tags:[],categories:[],templatesAuthors:[],templates:[],filteredTemplates:[],selectedFilters:{},isSearching:!1,isSearchingLoading:!1,searched:"",searchedTemplates:null,config:{isFullScreen:!1,automateFullScreen:!1,zIndex:0,graphQLEndpoint:"",defaultCluster:""},isLoadingCreateNewFlow:!1,isRevisionsExistOnServer:!1},(_define_property$8(_obj={},FETCH_FLOWS,function(e){return _object_spread$7({},e)}),_define_property$8(_obj,ADD_NEW_FLOW,function(e,t){t=t.payload;return _object_spread_props$2(_object_spread$7({},e),{flows:[t].concat(_to_consumable_array$2(e.flows))})}),_define_property$8(_obj,SET_FETCHING_FLOWS,function(e,t){t=t.payload;return _object_spread_props$2(_object_spread$7({},e),{fetchingFlows:t})}),_define_property$8(_obj,SET_OPEN_TEMPLATE,function(e,t){t=t.payload;return _object_spread_props$2(_object_spread$7({},e),{templateToOpen:t})}),_define_property$8(_obj,SET_TEMPLATE_SELECTED,function(e,t){t=t.payload;return _object_spread_props$2(_object_spread$7({},e),{isTemplateSelected:t})}),_define_property$8(_obj,SET_TAGS,function(e,t){t=t.payload;return _object_spread_props$2(_object_spread$7({},e),{tags:t})}),_define_property$8(_obj,SET_TAGS_TO_STORE,function(e,t){t=t.payload;return _object_spread_props$2(_object_spread$7({},e),{tags:t})}),_define_property$8(_obj,SET_CATEGORIES,function(e,t){t=t.payload;return _object_spread_props$2(_object_spread$7({},e),{categories:t})}),_define_property$8(_obj,SET_TEMPLATES_AUTHORS,function(e,t){t=t.payload;return _object_spread_props$2(_object_spread$7({},e),{templatesAuthors:t})}),_define_property$8(_obj,SET_SELECTED_FILTERS,function(e,t){t=t.payload;return _object_spread_props$2(_object_spread$7({},e),{selectedFilters:t})}),_define_property$8(_obj,SET_TEMPLATES,function(e,t){t=t.payload;return _object_spread_props$2(_object_spread$7({},e),{templates:t})}),_define_property$8(_obj,SET_FILTERED_TEMPLATES_ACTION,function(e,t){t=t.payload;return _object_spread_props$2(_object_spread$7({},e),{filteredTemplates:t})}),_define_property$8(_obj,SET_TAG,function(e,t){t=t.payload;return _object_spread_props$2(_object_spread$7({},e),{tag:t})}),_define_property$8(_obj,SET_FLOWS,function(e,t){t=t.payload;return _object_spread_props$2(_object_spread$7({},e),{flows:t})}),_define_property$8(_obj,SET_NOTEBOOKS,function(e,t){t=t.payload;return _object_spread_props$2(_object_spread$7({},e),{notebooks:t})}),_define_property$8(_obj,TOGGLE_IS_SEARCHING,function(e,t){t=t.payload;return _object_spread_props$2(_object_spread$7({},e),{isSearching:t})}),_define_property$8(_obj,TOGGLE_IS_SEARCHING_LOADING,function(e,t){t=t.payload;return _object_spread_props$2(_object_spread$7({},e),{isSearchingLoading:t})}),_define_property$8(_obj,SET_SEARCHED,function(e,t){t=t.payload;return _object_spread_props$2(_object_spread$7({},e),{searched:t})}),_define_property$8(_obj,SET_SEARCHED_TEMPLATES,function(e,t){t=t.payload;return _object_spread_props$2(_object_spread$7({},e),{searchedTemplates:t})}),_define_property$8(_obj,SET_CONFIG,function(e,t){t=t.payload;return _object_spread_props$2(_object_spread$7({},e),{config:t})}),_define_property$8(_obj,TOGGLE_STATE_CREATE_NEW_FLOW,function(e,t){t=t.payload;return _object_spread_props$2(_object_spread$7({},e),{isLoadingCreateNewFlow:t})}),_define_property$8(_obj,SET_IS_REVISIONS_EXIST_ON_SERVER,function(e,t){t=t.payload;return _object_spread_props$2(_object_spread$7({},e),{isRevisionsExistOnServer:t})}),_define_property$8(_obj,SET_SHOULD_CREATE_INITIAL_FLOWS,function(e,t){t=t.payload;return _object_spread_props$2(_object_spread$7({},e),{shouldCreateInitialFlows:t})}),_obj))),namespace$2="flows";function fetchTagsSaga(){var n;return _ts_generator$7(this,function(e){switch(e.label){case 0:return[4,select(sessionTokenSelector)];case 1:return n=e.sent(),[4,takeLatest$1(FETCH_TAGS,function(t){var r;return _ts_generator$7(this,function(e){switch(e.label){case 0:return[4,fetchAllTags(t.payload.ids,n)];case 1:return void 0===(r=e.sent())?[3,3]:[4,put(setTags(r))];case 2:e.sent(),e.label=3;case 3:return[2]}})})];case 2:return e.sent(),[2]}})}function fetchFlowsSaga(){return _ts_generator$7(this,function(e){switch(e.label){case 0:return[4,takeLatest$1(FETCH_FLOWS,function(t){var r,n,o;return _ts_generator$7(this,function(e){switch(e.label){case 0:return[4,put(setFetchingFlows(!0))];case 1:return e.sent(),[4,select(sessionTokenSelector)];case 2:switch(r=e.sent(),o=300,t.payload.ownerType){case ENGINE_OWNER_TYPES.ORGANIZATION:return[3,3];case ENGINE_OWNER_TYPES.MINE:return[3,5];case ENGINE_OWNER_TYPES.SHARED:return[3,7];case ENGINE_OWNER_TYPES.NOTEBOOKS:return[3,9]}return[3,11];case 3:return[4,fetchFlows$1({name:t.payload.name,owned:!1,offset:0,limit:o,authToken:r})];case 4:return n=e.sent(),[3,12];case 5:return[4,fetchFlows$1({name:t.payload.name,owned:!0,offset:0,limit:o,authToken:r})];case 6:return n=e.sent(),[3,12];case 7:return[4,fetchFlows$1({name:t.payload.name,owned:!1,offset:0,limit:o,authToken:r})];case 8:return n=e.sent(),[3,12];case 9:return[4,fetchFlows$1({name:t.payload.name,owned:!0,offset:0,limit:o,authToken:r,isNotebook:!0})];case 10:return n=e.sent(),[3,12];case 11:return[3,12];case 12:return void 0!==n&&n?0!==n.data.engines.records.length||t.payload.name?[3,14]:[4,put(setShouldCreateInitialFlows(!0))]:[3,18];case 13:e.sent(),e.label=14;case 14:return t.payload.ownerType!==ENGINE_OWNER_TYPES.NOTEBOOKS?[3,16]:[4,put(setNotebooks(n.data.engines.records))];case 15:return e.sent(),[3,18];case 16:return[4,put(setFlows(n.data.engines.records))];case 17:e.sent(),e.label=18;case 18:return[4,put(toggleIsSearchingLoading(!1))];case 19:return e.sent(),[4,put(setFetchingFlows(!1))];case 20:return e.sent(),[2]}})})];case 1:return e.sent(),[2]}})}function fetchNotebooksSaga(){return _ts_generator$7(this,function(e){switch(e.label){case 0:return[4,takeLatest$1(FETCH_NOTEBOOKS,function(t){var r;return _ts_generator$7(this,function(e){switch(e.label){case 0:return[4,select(sessionTokenSelector)];case 1:return r=e.sent(),[4,fetchFlows$1({name:t.payload.name,owned:!0,offset:0,limit:300,authToken:r,isNotebook:!0})];case 2:return void 0!==(r=e.sent())&&r?[4,put(setNotebooks(r.data.engines.records))]:[3,4];case 3:e.sent(),e.label=4;case 4:return[4,put(toggleIsSearchingLoading(!1))];case 5:return e.sent(),[2]}})})];case 1:return e.sent(),[2]}})}function searchTemplatesSaga(){return _ts_generator$7(this,function(e){switch(e.label){case 0:return[4,takeLatest$1(SEARCH_TEMPLATES,function(){var t,r;return _ts_generator$7(this,function(e){switch(e.label){case 0:return[4,select(sessionTokenSelector)];case 1:return t=e.sent(),[4,call(fetchTemplateGallery,t,{isPublic:!0,limit:200})];case 2:return(r=e.sent())&&r.data&&r.data.flowTemplates&&r.data.flowTemplates.records&&0<r.data.flowTemplates.records.length?[4,put(setTemplatesAction(r.data.flowTemplates.records))]:[3,5];case 3:return e.sent(),[4,put(setFilteredTemplatesAction(r.data.flowTemplates.records))];case 4:e.sent(),e.label=5;case 5:return[2]}})})];case 1:return e.sent(),[2]}})}function isRevisionsExistOnServerSaga(){return _ts_generator$7(this,function(e){switch(e.label){case 0:return[4,takeLatest$1(IS_REVISIONS_EXIST_ON_SERVER,function(){var t,r;return _ts_generator$7(this,function(e){switch(e.label){case 0:return[4,select(sessionTokenSelector)];case 1:r=e.sent(),e.label=2;case 2:return e.trys.push([2,4,,6]),[4,call(isRevisionsExistOnServerRequest,r)];case 3:return t=e.sent(),[3,6];case 4:return e.sent(),[4,put({type:SET_IS_REVISIONS_EXIST_ON_SERVER,payload:!1})];case 5:return e.sent(),[3,6];case 6:return lodashExports.get(t,"data.flowRevisions","")?[4,put({type:SET_IS_REVISIONS_EXIST_ON_SERVER,payload:!0})]:[3,8];case 7:e.sent(),e.label=8;case 8:return[2]}})})];case 1:return e.sent(),[2]}})}function flowsSaga(){return _ts_generator$7(this,function(e){switch(e.label){case 0:return[4,all([fetchTagsSaga(),fetchNotebooksSaga(),fetchFlowsSaga(),searchTemplatesSaga(),isRevisionsExistOnServerSaga()])];case 1:return e.sent(),[2]}})}function _ts_generator$6(n,o){var a,s,i,l={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]},e={next:t(0),throw:t(1),return:t(2)};return"function"==typeof Symbol&&(e[Symbol.iterator]=function(){return this}),e;function t(r){return function(e){var t=[r,e];if(a)throw new TypeError("Generator is already executing.");for(;l;)try{if(a=1,s&&(i=2&t[0]?s.return:t[0]?s.throw||((i=s.return)&&i.call(s),0):s.next)&&!(i=i.call(s,t[1])).done)return i;switch(s=0,(t=i?[2&t[0],i.value]:t)[0]){case 0:case 1:i=t;break;case 4:return l.label++,{value:t[1],done:!1};case 5:l.label++,s=t[1],t=[0];continue;case 7:t=l.ops.pop(),l.trys.pop();continue;default:if(!(i=0<(i=l.trys).length&&i[i.length-1])&&(6===t[0]||2===t[0])){l=0;continue}if(3===t[0]&&(!i||t[1]>i[0]&&t[1]<i[3]))l.label=t[1];else if(6===t[0]&&l.label<i[1])l.label=i[1],i=t;else{if(!(i&&l.label<i[2])){i[2]&&l.ops.pop(),l.trys.pop();continue}l.label=i[2],l.ops.push(t)}}t=o.call(n,l)}catch(e){t=[6,e],s=0}finally{a=i=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}}}function flowCenterRootSaga(){return _ts_generator$6(this,function(e){switch(e.label){case 0:return[4,all([flowsSaga()])];case 1:return e.sent(),[2]}})}var namespace$1="newFlowClusterID",initialState$1={newFlowClusterID:""},newFlowClusterIDSlice=createSlice({name:namespace$1,initialState:initialState$1,reducers:{newFlowClusterIDAction:function(e,t){e.newFlowClusterID=t.payload}}}),newFlowClusterIDSelector=function(e){return(null==e?void 0:e[namespace$1])||null},newFlowClusterIDAction=newFlowClusterIDSlice.actions.newFlowClusterIDAction,newFlowClusterIDnReducer=newFlowClusterIDSlice.reducer,namespace="engineDistributionType",initialState={engineDistributionType:"instance_locked"},engineDistributionSlice=createSlice({name:namespace,initialState:initialState,reducers:{engineDistributionTypeAction:function(e,t){e.engineDistributionType=t.payload}}}),engineDistributionTypeReducer=(engineDistributionSlice.actions.engineDistributionTypeAction,engineDistributionSlice.reducer);function _define_property$7(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var newFlowClusterIDNameSpace="newFlowClusterID",engineDistributionTypeNameSpace="engineDistributionType",flowCenterDialogNameSpace="flowCenterDialog";function getFlowCenterModule(){var e;return{id:"flow-center",reducerMap:(_define_property$7(e={},namespace$2,flowsReducer),_define_property$7(e,newFlowClusterIDNameSpace,newFlowClusterIDnReducer),_define_property$7(e,engineDistributionTypeNameSpace,engineDistributionTypeReducer),_define_property$7(e,flowCenterDialogNameSpace,flowCenterDialogReducer),e),sagas:[flowCenterRootSaga],initialActions:[]}}function _array_like_to_array$9(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function _array_with_holes$9(e){if(Array.isArray(e))return e}function _array_without_holes$1(e){if(Array.isArray(e))return _array_like_to_array$9(e)}function _define_property$6(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _iterable_to_array$1(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function _iterable_to_array_limit$9(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,a=[],s=!0,i=!1;try{for(r=r.call(e);!(s=(n=r.next()).done)&&(a.push(n.value),!t||a.length!==t);s=!0);}catch(e){i=!0,o=e}finally{try{s||null==r.return||r.return()}finally{if(i)throw o}}return a}}function _non_iterable_rest$9(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _non_iterable_spread$1(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _object_spread$6(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{},n=Object.keys(r);(n="function"==typeof Object.getOwnPropertySymbols?n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})):n).forEach(function(e){_define_property$6(t,e,r[e])})}return t}function _sliced_to_array$9(e,t){return _array_with_holes$9(e)||_iterable_to_array_limit$9(e,t)||_unsupported_iterable_to_array$9(e,t)||_non_iterable_rest$9()}function _to_consumable_array$1(e){return _array_without_holes$1(e)||_iterable_to_array$1(e)||_unsupported_iterable_to_array$9(e)||_non_iterable_spread$1()}function _unsupported_iterable_to_array$9(e,t){var r;if(e)return"string"==typeof e?_array_like_to_array$9(e,t):"Map"===(r="Object"===(r=Object.prototype.toString.call(e).slice(8,-1))&&e.constructor?e.constructor.name:r)||"Set"===r?Array.from(r):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?_array_like_to_array$9(e,t):void 0}store.addModules([getFlowCenterModule()]);var useStyles$e=makeStyles()(function(){return{icon:{fontSize:"16px!important",minWidth:"0px!important",paddingLeft:"8px!important",paddingRight:"8px!important","& svg":{fill:"#555F7C!important"}},text:{fontSize:"14px!important"},listItemText:{fontFamily:"Nunito",fontStyle:"normal!important",fontWeight:"normal!important",fontSize:"14px!important",lineHeight:"19px!important",letterSpacing:"-1.30385e-09px!important"},listItemTextFilters:{fontFamily:"Nunito",fontStyle:"normal!important",fontWeight:"normal!important",fontSize:"12px!important",lineHeight:"16px!important",letterSpacing:"-1.30385e-09px!important",wordBreak:"break-word"},category:{fontFamily:"Nunito",fontStyle:"normal!important",color:"#2A323C!important",fontSize:"14px!important",marginright:"6px!important",fontWeight:"500!important",paddingLeft:"8px!important"},formControl:{marginBottom:"10px!important",marginTop:"10px!important"},marginLeft:{paddingLeft:"8px!important",paddingRight:"8px!important"},boxBackground:{height:"100%!important"},paddingLeft:{paddingLeft:"0px!important",minWidth:"0px!important",borderRadius:"4px!important"},fullScreenMode:{marginTop:"64.5px!important"},selectedPaddingLeft:{background:"#F2F5F9 !important",color:"#1871E8 !important"},group:{paddingLeft:"8px!important"},filterTitleContainer:{display:"flex",alignItems:"center!important"},expandIconClass:{display:"flex",paddingLeft:"5px!important","&:hover":{cursor:"pointer!important"}},scroll:{overflowY:"auto",overflowX:"hidden"}}});function Navigation(e){var t=e.categories,r=e.filterers,n=e.screen,o=e.onSetType,a=e.showNavigation,s=e.fullScreen,e=e.automateFullScreen,i=useStyles$e().classes,l=useDispatch(),c=_sliced_to_array$9(reactExports.useState([]),2),u=c[0],p=c[1],d=useSelector(function(e){return e.flows.selectedFilters}),m=useSelector(function(e){return e.flows.isSearching});var f=function(t){var r=u.indexOf(t);p(-1===r?function(e){return e.push(t),_to_consumable_array$1(e)}:function(e){return e.splice(r,1),_to_consumable_array$1(e)})},x=function(e,t){var r=_object_spread$6({},d),n=d[e];r[e]=[],n&&(r[e]=_to_consumable_array$1(n)),r[e].includes(t)?r[e].splice(r[e].indexOf(t),1):r[e].push(t),0===r[e].length&&delete r[e],l(setSelectedFilters(r))};reactExports.useEffect(function(){x(ENGINE_FILTER_TYPES.PUBLIC,"1")},[]);return jsxRuntimeExports.jsx(Box,{className:i.boxBackground,children:jsxRuntimeExports.jsxs(Box,{className:i.marginLeft,children:[jsxRuntimeExports.jsx(List,{className:e?i.fullScreenMode:"",children:t.map(function(e){var t=e.key,e=e.text;return jsxRuntimeExports.jsxs(ListItem,{id:"flow-center-navigation-listItem-conatiner","data-test":"flow-center-navigation-tabs-".concat(t),button:!0,disableRipple:!0,selected:n.toLowerCase()===t&&!m,onClick:function(){return e=t,l(toggleIsSearching(!1)),l(toggleIsSearchingLoading(!1)),l(setSearched("")),l(setSearchedTemplates(null)),l(fetchFlows("notebooks"===e?{name:"",ownerType:ENGINE_OWNER_TYPES.NOTEBOOKS}:{name:"",ownerType:ENGINE_OWNER_TYPES.MINE})),void o(e);var e},className:i.paddingLeft,classes:{selected:i.selectedPaddingLeft},children:[jsxRuntimeExports.jsx(ListItemIcon,{className:i.icon,children:(e=>{switch(e){case"mine":return n.toLowerCase()!==e||m?jsxRuntimeExports.jsx("img",{width:"24px",height:"24px",src:img$H,alt:"myFlowsBlue"}):jsxRuntimeExports.jsx("img",{width:"24px",height:"24px",src:img$G,alt:"myFlows"});case"templates":return n.toLowerCase()!==e||m?jsxRuntimeExports.jsx("img",{width:"24px",height:"24px",src:img$E,alt:"templatesBlue"}):jsxRuntimeExports.jsx("img",{width:"24px",height:"24px",src:img$D,alt:"templates"});case"containers":return jsxRuntimeExports.jsx("img",{width:"24px",height:"24px",src:img$n,alt:"containerDashboard"});case"notebooks":return n.toLowerCase()!==e||m?jsxRuntimeExports.jsx("img",{width:"24px",height:"24px",src:img$H,alt:"myFlowsBlue"}):jsxRuntimeExports.jsx("img",{width:"24px",height:"24px",src:img$G,alt:"myFlows"});case"WorkOutlineOutlinedIcon":return jsxRuntimeExports.jsx(default_1$9,{});case"PeopleAltOutlinedIcon":return jsxRuntimeExports.jsx(default_1$8,{});case"PersonOutlineOutlinedIcon":return jsxRuntimeExports.jsx(default_1$7,{});default:return jsxRuntimeExports.jsx(default_1$6,{})}})(t)}),jsxRuntimeExports.jsx(ListItemText,{"data-test":"flow-center-navigation-listItemText",className:"flow-center-navigation-listItemText",primary:e,classes:{primary:i.listItemText}})]},t)})}),a&&(c=e?"calc(100vh - 64px - 16px - 86px - 8px - 54px":"calc(100vh - 64px - 16px - 86px - 8px - ".concat(s?"0px":"54px",")"),jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(Divider,{}),jsxRuntimeExports.jsx("div",{className:i.scroll,style:{height:c},children:r.map(function(e,n){var t=e.text,o=e.group,e=e.options;return jsxRuntimeExports.jsx("div",{children:jsxRuntimeExports.jsxs(FormControl,{component:"fieldset",className:i.formControl,"data-test":"flow-center-".concat(o,"-container"),id:"flow-center-".concat(o,"-container"),children:[jsxRuntimeExports.jsxs("div",{className:i.filterTitleContainer,children:[jsxRuntimeExports.jsx(FormLabel,{className:i.category,component:"legend",children:t}),jsxRuntimeExports.jsx("div",{className:i.expandIconClass,onClick:function(){return f(n)},children:u.includes(n)?jsxRuntimeExports.jsx(default_1$d,{fontSize:"small",style:{fill:"#555F7C",width:"18px!important",height:"18px!important"}}):jsxRuntimeExports.jsx(default_1$c,{fontSize:"small",style:{fill:"#555F7C",width:"18px!important",height:"18px!important"}})})]}),jsxRuntimeExports.jsx("div",{children:jsxRuntimeExports.jsx(FormGroup,{className:i.group,children:e.map(function(e){var t=e.text,r=e.value;if(!u.includes(n))return jsxRuntimeExports.jsx(FormControlLabel,{control:jsxRuntimeExports.jsx(Checkbox,{checked:d[o]&&d[o].includes(r),name:r,color:"primary",onClick:function(){return x(o,r)}}),label:jsxRuntimeExports.jsx(Typography,{"data-test":"flow-center-flows-table-optionText",className:i.listItemTextFilters,children:t}),"data-test":"flow-center-filter-item",id:"flow-center-filter-item"},"".concat(o,"-").concat(r))})})})]},o+n)},o+n)})})]}))]})})}function _array_like_to_array$8(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function _array_with_holes$8(e){if(Array.isArray(e))return e}function _iterable_to_array_limit$8(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,a=[],s=!0,i=!1;try{for(r=r.call(e);!(s=(n=r.next()).done)&&(a.push(n.value),!t||a.length!==t);s=!0);}catch(e){i=!0,o=e}finally{try{s||null==r.return||r.return()}finally{if(i)throw o}}return a}}function _non_iterable_rest$8(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _sliced_to_array$8(e,t){return _array_with_holes$8(e)||_iterable_to_array_limit$8(e,t)||_unsupported_iterable_to_array$8(e,t)||_non_iterable_rest$8()}function _unsupported_iterable_to_array$8(e,t){var r;if(e)return"string"==typeof e?_array_like_to_array$8(e,t):"Map"===(r="Object"===(r=Object.prototype.toString.call(e).slice(8,-1))&&e.constructor?e.constructor.name:r)||"Set"===r?Array.from(r):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?_array_like_to_array$8(e,t):void 0}var MIN_NUM_ITEM_ON_ROW=3,useStyles$d=makeStyles()(function(e){return{container:{marginLeft:"12px!important"},cardRoot:{display:"flex",flexDirection:"column",justifyContent:"center!important",border:"0.5px solid #D5DFE9!important",boxShadow:"none!important",borderRadius:"4px!important",marginRight:"10px!important"},cardContainer:{marginTop:"20px!important",marginLeft:"20px!important",marginBottom:"15px!important",marginRight:"20px!important",maxHeight:"150px",minHeight:"150px",display:"flex",flexDirection:"column"},title:{fontFamily:"Nunito",fontStyle:"normal!important",fontWeight:600,fontSize:"16px!important",lineHeight:"22px!important",letterSpacing:"-1.30385e-09px!important",wordBreak:"break-word!important",cursor:"pointer",color:"#2A323C!important"},subtitle:{fontFamily:"Nunito",fontStyle:"normal!important",fontWeight:500,fontSize:"12px!important",lineHeight:"16px!important",letterSpacing:"-1.30385e-09px!important",color:"#5C6269!important",wordWrap:"break-word!important"},veritoneCertifiedContainer:{display:"flex",marginTop:"10px!important"},veritoneCertified:{fontFamily:"Nunito",fontStyle:"normal!important",fontWeight:500,fontSize:"10px!important",lineHeight:"18px!important",letterSpacing:"-1.30385e-09px!important",wordWrap:"break-word!important",color:"#2A323C!important",marginLeft:"4px!important"},pos:{marginBottom:12},centerButton:{justifyContent:"center!important"},cardContent:{padding:"0px!important",height:"120px!important",textOverflow:"ellipsis!important"},titleContent:{height:"82px!important",overflow:"auto"},bottomButton:{marginTop:"10px",padding:"0px!important",display:"flex",height:"30px!important"},box:{display:"flex",marginTop:e.spacing(3.2),marginBottom:e.spacing(3.2)},viewAllButton:{color:"#6098D1!important",textTransform:"none!important",fontFamily:"Nunito",fontStyle:"normal!important",fontWeight:"normal!important",fontSize:"12px!important",lineHeight:"16px!important",marginRight:"24px!important",letterSpacing:"-1.30385e-09px!important"},createFlowButton:{textTransform:"none!important",fontFamily:"Nunito",fontStyle:"normal!important",fontWeight:600,fontSize:"12px!important",lineHeight:"16px!important",marginLeft:"0px!important",padding:"6px 12px 6px 12px!important",background:e.palette.background.paper,color:"#1871E8!important",letterSpacing:"0.02857em"},viewDetailsButton:{textTransform:"none!important",fontFamily:"Nunito",fontStyle:"normal!important",fontWeight:600,fontSize:"12px!important",lineHeight:"16px!important",background:e.palette.background.paper,color:"#6098D1!important",letterSpacing:"0.02857em"},createBlankFlowButton:{display:"flex",justifyContent:"center!important","& svg":{fill:"#555F7C!important"}},createBlankFlowLayout:{display:"flex",flexDirection:"column"},lowercaseButton:{textTransform:"none!important",fontFamily:"Nunito",fontStyle:"normal!important",fontWeight:600,fontSize:"14px!important",lineHeight:"19px!important",letterSpacing:"-1.30385e-09px!important"},text:{fontFamily:"Nunito",fontStyle:"normal!important",fontWeight:400,fontSize:"16px!important",lineHeight:"22px!important",letterSpacing:"-1.30385e-09px!important",color:"#2A323C!important"}}}),TemplateGallery=function(e){function t(e,t){e.data[t].records&&p(e.data[t].records),m(Math.min(MIN_NUM_ITEM_ON_ROW,e.data[t].records.length))}function r(e){s(ENGINE_OWNER_TYPES.TEMPLATES),l(setOpenTemplate({id:e.id,title:e.title})),i(!0)}function n(e){a(e)}var o=e.goToTemplateList,a=e.handleOpenFlowNameDialog,s=e.setScreen,i=e.handleOpenTemplateDetails,l=useDispatch(),c=useStyles$d().classes,e=_sliced_to_array$8(reactExports.useState([]),2),u=e[0],p=e[1],e=_sliced_to_array$8(reactExports.useState(0),2),d=e[0],m=e[1],f=useSelector(sessionTokenSelector),e=_sliced_to_array$8(reactExports.useState(!0),2),x=e[0],g=e[1];reactExports.useEffect(function(){u.length?setTimeout(function(){g(!1)},3e3):fetchTemplateGallery(f,{isPublic:!0}).then(function(e){setTimeout(function(){g(!1)},3e3),t(e,"flowTemplates")}).catch(function(e){devErrorLogger("error fetching flow templates: ".concat(JSON.stringify(e)))})},[t]);return jsxRuntimeExports.jsxs("div",{className:c.container,children:[jsxRuntimeExports.jsxs(Box,{mt:2,mb:2,className:c.box,children:[jsxRuntimeExports.jsx(Typography,{"data-test":"flow-center-flows-table-populatTemplates",className:c.text,style:{flexGrow:1},children:jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.1v6wsw",defaultMessage:"Popular Templates",description:"Templates screen"})}),jsxRuntimeExports.jsx(Button,{"data-test":"flow-center-template-gallery-viewAllTemplates",size:"small",className:c.viewAllButton,onClick:o,children:jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.viewall",defaultMessage:"View All",description:"View All Templates Button"})})]}),jsxRuntimeExports.jsx(Grid,{"data-test":"flow-center-templates-on-flows-page",container:!0,id:"flow-center-templates",children:u.slice(0,d).map(function(e,t){return jsxRuntimeExports.jsx(Grid,{"data-test":"flow-center-templatesGallery",item:!0,xs:4,children:jsxRuntimeExports.jsx(Card,{className:c.cardRoot,id:"flow-center-template-card",children:jsxRuntimeExports.jsxs("div",{className:c.cardContainer,children:[jsxRuntimeExports.jsxs(CardContent,{className:c.cardContent,children:[jsxRuntimeExports.jsxs("div",{className:c.titleContent,children:[x?jsxRuntimeExports.jsx(Skeleton,{variant:"rectangular",animation:"wave",width:80,height:15}):jsxRuntimeExports.jsx(Typography,{"data-test":"flow-center-flows-templateGallery-title",className:c.title,gutterBottom:!0,onClick:function(){return r(e)},children:null==e?void 0:e.title}),x?jsxRuntimeExports.jsx(Skeleton,{variant:"rectangular",animation:"wave",width:80,height:15,sx:{mt:"5px"}}):jsxRuntimeExports.jsx(Typography,{"data-test":"flow-center-flows-templateGallery-subtitle",className:c.subtitle,"aria-multiline":!0,variant:"body2",component:"p",children:e.subtitle})]}),jsxRuntimeExports.jsx("div",{className:c.veritoneCertifiedContainer,children:x?jsxRuntimeExports.jsx(Skeleton,{variant:"rectangular",animation:"wave",width:120,height:15}):jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx("img",{src:img$B,alt:"veritoneCertifiedIcon"}),jsxRuntimeExports.jsx(Typography,{"data-test":"flow-center-flows-templateGallery-veritoneCertified",className:c.veritoneCertified,component:"p",children:jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.veritonecertified",defaultMessage:"Veritone Certified",description:"Veritone Certified Template Text"})})]})})]}),jsxRuntimeExports.jsxs(CardActions,{className:c.bottomButton,children:[x?jsxRuntimeExports.jsx(Skeleton,{variant:"rectangular",animation:"wave",width:120,height:20}):jsxRuntimeExports.jsx(Button,{"data-test":"flow-center-template-gallery-createFlowFromTemplate-".concat(t),onClick:function(){return n(e.id)},id:"flow-center-create-flow-btn-".concat(t),size:"small",variant:"outlined",color:"primary",className:c.createFlowButton,children:jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.createflow",defaultMessage:"Create Flow",description:"Complete Flow Button Text"})}),x?jsxRuntimeExports.jsx(Skeleton,{variant:"rectangular",animation:"wave",width:120,height:15}):jsxRuntimeExports.jsx(Button,{"data-test":"flow-center-template-gallery-viewDetailsForTemplate-".concat(t),onClick:function(){return r(e)},size:"small",color:"primary",className:c.viewDetailsButton,children:jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.viewdetails",defaultMessage:"View Details",description:"View Details Button Text"})})]})]})})},e.title+t)})})]})},SHARED_MESSAGES={noTags:function(){return jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.ImtbH0",defaultMessage:"No Tags",description:"No Tags"})},createFlowFromTemplate:function(){return jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.CNPhK1",defaultMessage:"Create Flow From Template",description:"Create Flow From Template"})},overview:function(){return jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.6+BhsD",defaultMessage:"Overview",description:"Overview"})},developer:function(){return jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.GKqAH1",defaultMessage:"Developer",description:"Developer"})},certified:function(){return jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.1tTedK",defaultMessage:"Certified",description:"Certified"})},yes:function(){return jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.9U4lyw",defaultMessage:"Yes",description:"Yes"})},category:function(){return jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.RYa6+l",defaultMessage:"Category",description:"Category"})},tags:function(){return jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.ImtbH1",defaultMessage:"Tags",description:"Tags"})},active:function(){return jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.UkeQP9",defaultMessage:"Active",description:"Active"})},ready:function(){return jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.readymessage",defaultMessage:"Ready",description:"Ready"})},pending:function(){return jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.pendingmessage",defaultMessage:"Pending",description:"Pending"})},draft:function(){return jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.draftonotactive",defaultMessage:"Not active",description:"Draft to not active translation"})},viewDetails:function(){return jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.yFa4dd",defaultMessage:"View Details",description:"View Details"})},version:function(){return jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.i8EBVW",defaultMessage:"Version",description:"Version"})},openFlow:function(){return jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.IEIrEm",defaultMessage:"Open Flow",description:"Open Flow"})},alwaysUpFlow:function(){return jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.TYFJtu",defaultMessage:"Schedule Always Up Flow",description:"Schedule Always Up Flow"})},createFlowTemplate:function(){return jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.XSJ4Aa",defaultMessage:"Create Flow Template",description:"Create Flow Template"})},openFlowAdv:function(){return jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.IEIfEt",defaultMessage:"Open With Cluster",description:"Open With Cluster"})},deleteFlow:function(){return jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.MPiXf5",defaultMessage:"Delete Flow",description:"Delete Flow"})},confirmDelete:function(){return jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.mPEQWb",defaultMessage:"Confirm Delete",description:"Confirm Delete"})},exitFullScreen:function(){return jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.awe7uYa",defaultMessage:"Exit Fullscreen",description:"Exit Fullscreen"})},enterFullScreen:function(){return jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.stiZt+d",defaultMessage:"Enter Fullscreen",description:"Enter Fullscreen"})},closePanel:function(){return jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.kOsSpC",defaultMessage:"Close Panel",description:"Close Panel"})},copyFlowID:function(){return jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.1mDYO7",defaultMessage:"Copy Flow ID",description:"Copy Flow ID"})},hideFilters:function(){return jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.Iy59d3",defaultMessage:"Hide Filter",description:"Hide Filter"})},showFilters:function(){return jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.g5zZtA",defaultMessage:"Show Filter",description:"Show Filter"})},showMoreInformation:function(){return jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.ParFja",defaultMessage:"More Information",description:"More Information"})},hideMoreInformation:function(){return jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.DXuAKS",defaultMessage:"Close More Information",description:"Close More Information"})},engineIdHasBeenCopied:function(){return jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.CRvRbB",defaultMessage:"Engine ID has been copied",description:"copy of the engine id"})},cancel:function(){return jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.6PdOcy",defaultMessage:"Cancel",description:"Cancel"})},delete:function(){return jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.qviIFp",defaultMessage:"Delete",description:"Delete"})},noFlowsFound:function(){return jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.WX6wfG",defaultMessage:"No Flows Found",description:"No Flows Found"})},noFlowsFoundSubtitle:function(){return jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.54mq63",defaultMessage:"Click the ‘Create New Flow’ button below to create your first flow",description:"Click the ‘Create New Flow’ button below to create your first flow"})},createNewFlow:function(){return jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.54mq64",defaultMessage:"Create New Flow",description:"Create New Flow"})},chooseATemplate:function(){return jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.jhiPmN",defaultMessage:"Choose a Template",description:"Choose a Template"})},newFlow:function(){return jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.54mq65",defaultMessage:"New Flow",description:"New Flow"})},newNotebook:function(){return jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.newNotebookButton",defaultMessage:"New Notebook",description:"New Notebook"})},noSearchResultsFound:function(){return jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.OYovRP",defaultMessage:"No results found",description:"No results found"})},noSearchResultsFoundSubtitle:function(){return jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.No+Hwv",defaultMessage:"Sorry, there are no results for this search. Please try another search.",description:"Sorry, there are no results for this search. Please try another search."})},flowsCount:function(e){return jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.flowscount",defaultMessage:"Flows {flowsCount}",description:"Flows Count",values:{flowsCount:e}})},templatesCount:function(e){return jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.templatescount",defaultMessage:"Templates {templatesCount}",description:"Templates Count",values:{templatesCount:e}})},notebookCount:function(e){return jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.notebookCount",defaultMessage:"Notebooks {notebookCount}",description:"Notebook Count",values:{notebookCount:e}})}},useCommonStyles=makeStyles()(function(e){return{title:{fontFamily:"Nunito",fontStyle:"normal",fontWeight:600,fontSize:"18px!important",lineHeight:"24px!important",letterSpacing:"-1.30385e-09px!important",color:"#2A323C!important",paddingBottom:"2px!important",paddingLeft:"0px!important",paddingRight:"0px!important",paddingTop:"0px!important"},content:{fontFamily:"Nunito",fontWeight:"normal",fontStyle:"normal",fontSize:"14px!important",lineHeight:"20px!important",letterSpacing:"-1.30385e-09px!important",color:"#5C6269!important",paddingLeft:"0px!important",paddingRight:"0px!important",paddingBottom:"0px!important"},cancelButton:{fontFamily:"Nunito",fontStyle:"normal!important",fontWeight:600,fontSize:"14px!important",lineHeight:"19px!important",padding:"8px 15px!important",letterSpacing:"-1.30385e-09px!important",color:"#2A323C!important",textTransform:"none"},confirmationButton:{textTransform:"none!important",justifyContent:"start!important",borderRadius:e.shape.borderRadius,fontFamily:"Nunito",fontStyle:"normal!important",fontWeight:600,fontSize:"14px!important",lineHeight:"20px!important",letterSpacing:"-1.30385e-09px!important",background:"#0D62D2!important",color:e.palette.background.paper,padding:"8px 15px!important",marginLeft:"22px!important"},disabledButton:{background:"#efefef4d!important",color:"#00000042",textTransform:"none!important",justifyContent:"start!important",borderRadius:e.shape.borderRadius,fontFamily:"Nunito",fontStyle:"normal!important",fontWeight:600,fontSize:"14px!important",lineHeight:"20px!important",letterSpacing:"-1.30385e-09px!important",padding:"8px 15px!important",marginLeft:"22px!important"},actions:{padding:"0px!important",marginTop:"30px!important"},container:{padding:"30px!important"},active:{margin:"auto 10px",fontSize:"15px!important",color:"".concat(e.palette.success.main," !important"),lineHeight:"18px"},inactive:{margin:"auto 10px",fontSize:"15px!important",color:"".concat(e.palette.error.main," !important"),lineHeight:"18px"}}}),SHARED_DATE_TIME={getDate:function(e){return jsxRuntimeExports.jsx(FormattedDate,{value:e,day:"2-digit",month:"numeric",year:"numeric",hour:"2-digit",minute:"2-digit",hour12:!1})}};function _array_like_to_array$7(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function _array_with_holes$7(e){if(Array.isArray(e))return e}function asyncGeneratorStep$5(e,t,r,n,o,a,s){try{var i=e[a](s),l=i.value}catch(e){return void r(e)}i.done?t(l):Promise.resolve(l).then(n,o)}function _async_to_generator$5(i){return function(){var e=this,s=arguments;return new Promise(function(t,r){var n=i.apply(e,s);function o(e){asyncGeneratorStep$5(n,t,r,o,a,"next",e)}function a(e){asyncGeneratorStep$5(n,t,r,o,a,"throw",e)}o(void 0)})}}function _define_property$5(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _iterable_to_array_limit$7(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,a=[],s=!0,i=!1;try{for(r=r.call(e);!(s=(n=r.next()).done)&&(a.push(n.value),!t||a.length!==t);s=!0);}catch(e){i=!0,o=e}finally{try{s||null==r.return||r.return()}finally{if(i)throw o}}return a}}function _non_iterable_rest$7(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _object_spread$5(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{},n=Object.keys(r);(n="function"==typeof Object.getOwnPropertySymbols?n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})):n).forEach(function(e){_define_property$5(t,e,r[e])})}return t}function ownKeys$1(e,t){var r=Object.keys(e);return Object.getOwnPropertySymbols&&(e=Object.getOwnPropertySymbols(e),r.push.apply(r,e)),r}function _object_spread_props$1(t,r){return r=null!=r?r:{},Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):ownKeys$1(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}),t}function _sliced_to_array$7(e,t){return _array_with_holes$7(e)||_iterable_to_array_limit$7(e,t)||_unsupported_iterable_to_array$7(e,t)||_non_iterable_rest$7()}function _unsupported_iterable_to_array$7(e,t){var r;if(e)return"string"==typeof e?_array_like_to_array$7(e,t):"Map"===(r="Object"===(r=Object.prototype.toString.call(e).slice(8,-1))&&e.constructor?e.constructor.name:r)||"Set"===r?Array.from(r):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?_array_like_to_array$7(e,t):void 0}function _ts_generator$5(n,o){var a,s,i,l={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]},e={next:t(0),throw:t(1),return:t(2)};return"function"==typeof Symbol&&(e[Symbol.iterator]=function(){return this}),e;function t(r){return function(e){var t=[r,e];if(a)throw new TypeError("Generator is already executing.");for(;l;)try{if(a=1,s&&(i=2&t[0]?s.return:t[0]?s.throw||((i=s.return)&&i.call(s),0):s.next)&&!(i=i.call(s,t[1])).done)return i;switch(s=0,(t=i?[2&t[0],i.value]:t)[0]){case 0:case 1:i=t;break;case 4:return l.label++,{value:t[1],done:!1};case 5:l.label++,s=t[1],t=[0];continue;case 7:t=l.ops.pop(),l.trys.pop();continue;default:if(!(i=0<(i=l.trys).length&&i[i.length-1])&&(6===t[0]||2===t[0])){l=0;continue}if(3===t[0]&&(!i||t[1]>i[0]&&t[1]<i[3]))l.label=t[1];else if(6===t[0]&&l.label<i[1])l.label=i[1],i=t;else{if(!(i&&l.label<i[2])){i[2]&&l.ops.pop(),l.trys.pop();continue}l.label=i[2],l.ops.push(t)}}t=o.call(n,l)}catch(e){t=[6,e],s=0}finally{a=i=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}}}var useStyles$c=makeStyles()(function(){return{disabledButton:{background:"#efefef4d!important",color:"#00000042"},fullWidth:{width:"100%"},paddingDiv:{paddingTop:"20px"},buttonDiv:{display:"flex"}}}),FlowList=function(e){function t(e){return jsxRuntimeExports.jsx(TableSortLabel,{active:y===e,IconComponent:default_1$c,direction:y===e?S:"asc",onClick:function(){return le(e)},classes:{icon:x.sortIcon}})}function r(e){X(!1),e&&deleteEngine(b,_).then(function(t){var e,r;t.data&&t.data.deleteEngine&&t.data.deleteEngine.id?(e=lodashExports.findIndex(E,function(e){return e.id===t.data.deleteEngine.id}),(r=JSON.parse(JSON.stringify(E))).splice(e,1),f(setFlows(r)),T("FLOW_DELETED_SUCCESS")):(v(""),T("FLOW_DELETED_FAIL"))}).catch(function(e){e.message.includes("engine state")?fetchEngine(b,1,_).then(function(e){v(e.data.engine.state),T("FLOW_DELETED_FAIL")}).catch(function(e){v(""),T("FLOW_DELETED_FAIL")}):(v(""),T("FLOW_DELETED_FAIL"))}).finally(function(){R(!0)})}function n(){R(!1)}function i(e){var e=e||b,t=w?"latest":ue(e),r="".concat(h,"/flow/").concat(e,"/").concat(t);s&&(r="".concat(h,"/notebook/").concat(e,"/").concat(t)),window.open(r,"_blank","noopener,noreferrer")}function l(e){return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(Typography,{"data-test":"flow-widget-executions-table-time",className:x.dateTime,children:e?SHARED_DATE_TIME.getDate(e):null}),jsxRuntimeExports.jsx(Typography,{"data-test":"flow-widget-executions-table-time-caption",variant:"caption",className:x.dateTimeSmall,children:e?DateTime_1.fromISO(e).toLocaleString(DateTime_1.TIME_SIMPLE):null})]})}function D(e,t){te(t)}function L(e){re(parseInt(e.target.value,10)),te(0)}var o,a,c=e.onSelectFlow,k=e.simpleMode,P=e.screenName,u=e.selectedFlowId,s=e.notebooks,B=e.setFirstFlowId,z=e.zIndex,p=e.showTitle,p=void 0===p||p,G=e.setOpenFlowDetails,d=e.createFlowTemplate,m=e.setOpenAlwaysUpFlow,W=e.betaFeatures,f=useDispatch(),x=flowStyles().classes,g=useCommonStyles().classes,e=useStyles$c().classes,_=useSelector(sessionTokenSelector),E=useSelector(function(e){return s?e.flows.notebooks:e.flows.flows}),h=useSelector(automateUrlSelector),w=useSelector(function(e){return e.flows.isRevisionsExistOnServer}),j=_sliced_to_array$7(reactExports.useState(null),2),H=j[0],U=j[1],j=_sliced_to_array$7(reactExports.useState("desc"),2),S=j[0],Y=j[1],j=_sliced_to_array$7(reactExports.useState("modifiedDateTime"),2),y=j[0],V=j[1],j=_sliced_to_array$7(reactExports.useState(!1),2),q=j[0],K=j[1],j=_sliced_to_array$7(reactExports.useState(""),2),b=j[0],Q=j[1],j=_sliced_to_array$7(reactExports.useState(!1),2),J=j[0],X=j[1],j=_sliced_to_array$7(reactExports.useState(!1),2),Z=j[0],R=j[1],j=_sliced_to_array$7(reactExports.useState(""),2),ee=j[0],T=j[1],j=_sliced_to_array$7(reactExports.useState(""),2),F=j[0],v=j[1],j=_sliced_to_array$7(reactExports.useState(0),2),N=j[0],te=j[1],j=_sliced_to_array$7(reactExports.useState(100),2),C=j[0],re=j[1],I=useSelector(newFlowClusterIDSelector)||null,j=_sliced_to_array$7(reactExports.useState([]),2),j=j[0],$=_sliced_to_array$7(reactExports.useState(!1),2),ne=$[0],oe=$[1],$=_sliced_to_array$7(reactExports.useState(!1),2),ae=$[0],se=$[1],M=useSelector(controllerUrlSelector),$=useSelector(automateControllerUrlSelector),M=getBrowserSafeControllerUrl({controllerUrl:M,automateControllerUrl:$,automateUrl:h}),ie=(o=_async_to_generator$5(function(t,r,n){var o;return _ts_generator$5(this,function(e){switch(e.label){case 0:return o="".concat(t,"/edge/v1/flow/").concat(n,"/always-up/api/status"),[4,getFlowStatus(o,r)];case 1:return(o=e.sent())&&"started"===o.status?se(!0):se(!1),[2]}})}),function(e,t,r){return o.apply(this,arguments)}),A=(reactExports.useEffect(function(){ie(M,_,b)},[b,_,M]),function(){oe(!1),f(newFlowClusterIDAction(""))}),$={EMPTY:null,ENGINE_COPIED:jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.sGx+Oj",defaultMessage:"Engine ID has been copied",description:"msg delete flow"}),FLOW_DELETED_SUCCESS:jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.2Trjxv",defaultMessage:"Flow has been successfully deleted",description:"msg delete flow"}),FLOW_DELETED_FAIL:F?jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.himmqH1",defaultMessage:"Flow has not been deleted. Invalid Delete State: {flowState}. Pause the flow and try again.",description:"msg delete flow failed from invalid state",values:{flowState:F}}):jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.himmqH",defaultMessage:"Flow has not been deleted",description:"msg delete flow failed"})},F={OPEN_FLOW_SETTINGS:jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center-header.hirqzH",defaultMessage:"Flow Settings",description:"msg flow settings"}),CANCEL_SELECT_CLUSTER:jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center-header.hiqxrt",defaultMessage:"Cancel",description:"msg cancel select cluster"}),OPEN_FLOW:jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center-header.jbxqqH",defaultMessage:"Open Flow",description:"msg open flow"}),CREATE_FLOW_ADVANCED:jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center-header.jbxqty",defaultMessage:"Create Flow Advanced",description:"msg create flow Advanced"})},le=function(e){Y(y===e&&"asc"===S?"desc":"asc"),V(e)},ce=function(e,t,r){return t[r]<e[r]?-1:e[r]<t[r]?1:0},ue=function(t){var e=E.find(function(e){return e.id===t});if(e)return(e=e.builds).records.length?null==(e=e.records[0])?void 0:e.id:"latest"},O=E.find(function(e){return e.id===b});return E&&0===E.length?jsxRuntimeExports.jsx(NoResults,{}):jsxRuntimeExports.jsxs(Box,{mt:p?2:0,children:[p&&jsxRuntimeExports.jsx(Typography,{"data-test":"flow-center-screenName",className:x.text,style:{flexGrow:1},children:jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.+YGVPH",defaultMessage:"Screen Name: {screenName}",description:"{screenName}",values:{screenName:P}})}),jsxRuntimeExports.jsx(TableContainer,{id:"flow-center-flows-table","data-test":"flow-center-flows-table",children:jsxRuntimeExports.jsxs(Table,{className:x.table,children:[jsxRuntimeExports.jsx(TableHead,{children:jsxRuntimeExports.jsxs(TableRow,{children:[jsxRuntimeExports.jsxs(TableCell,{className:"".concat(x.title," ").concat(x.firstTitle," ").concat(x.borderBottomLineHeader),children:[jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.n60v17",defaultMessage:"Flow Name",description:"Flow Name"}),jsxRuntimeExports.jsx(TableSortLabel,{active:"name"===y,direction:"name"===y?S:"asc",onClick:function(){return le("name")},IconComponent:default_1$c,classes:{icon:x.sortIcon}})]}),jsxRuntimeExports.jsxs(TableCell,{className:"".concat(x.title," ").concat(x.borderBottomLineHeader),children:[jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.w+rzfS",defaultMessage:"Status",description:"Status"}),t("state")]}),jsxRuntimeExports.jsxs(TableCell,{className:"".concat(x.title," ").concat(x.borderBottomLineHeader),children:[jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.Pzb4Cj",defaultMessage:"Last Updated",description:"Last Updated"}),t("modifiedDateTime")]}),jsxRuntimeExports.jsxs(TableCell,{className:"".concat(x.title," ").concat(x.borderBottomLineHeader),children:[jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.Dj0J2e",defaultMessage:"Date Created",description:"Date Created"}),t("createdDateTime")]}),jsxRuntimeExports.jsx(TableCell,{className:"".concat(x.title," ").concat(x.borderBottomLineHeader)})]})}),jsxRuntimeExports.jsx(TableBody,{children:E&&((e,n)=>((e=e.map(function(e,t){return[e,t]})).sort(function(e,t){var r=n(e[0],t[0]);return 0!==r?r:e[1]-t[1]}),null!=e&&e.length&&B(e[0][0].id),e.map(function(e){return e[0]})))(E,(a=y,"desc"===S?function(e,t){return ce(e,t,a)}:function(e,t){return-ce(e,t,a)})).slice(N*C,N*C+C).map(function(e,t){var r=e.name,n=e.state,o=e.modifiedDateTime,a=e.createdDateTime,s=e.id,e=e.builds;return jsxRuntimeExports.jsxs(TableRow,{id:"flow-center-flow-item","data-test":"flow-center-flow-item",hover:!0,className:"".concat(u===s?x.tableRowClass:""," ").concat(x.tableRow," ").concat(x.borderBottomLineRow),classes:{selected:x.tableRowSelected},selected:u===s||b===s,onClick:function(e){k?c(s,!1):i(s)},children:[jsxRuntimeExports.jsx(TableCell,{className:x.borderBottomLine,children:jsxRuntimeExports.jsxs("div",{className:"".concat(x.boxCell," ").concat(x.firstColumn),children:[jsxRuntimeExports.jsx("p",{className:x.flowName,children:r}),jsxRuntimeExports.jsxs("div",{className:x.boxSubtitle,children:[jsxRuntimeExports.jsx(Tooltip,{title:SHARED_MESSAGES.copyFlowID(),children:jsxRuntimeExports.jsx("img",{src:img$w,alt:"copyID",draggable:"false",onClick:function(e){var t=s;e.stopPropagation(),(e=document.createElement("textarea")).value=t,document.body.appendChild(e),e.select(),document.execCommand("copy"),document.body.removeChild(e),R(!0),T("ENGINE_COPIED"),setTimeout(function(){R(!1),T("EMPTY")},2e3)}})}),(e=e,jsxRuntimeExports.jsxs("p",{className:x.flowVersion,children:[SHARED_MESSAGES.version()," ",lodashExports.get(e,"records[0].version",0)]}))]})]})}),jsxRuntimeExports.jsx(TableCell,{className:x.borderBottomLine,children:jsxRuntimeExports.jsx(StatusPill,{dataTest:"flow-center-flows-table-state",state:n,colorSelector:void 0,backgroundSelector:void 0})}),jsxRuntimeExports.jsx(TableCell,{className:x.borderBottomLine,children:a&&l(o)}),jsxRuntimeExports.jsx(TableCell,{className:x.borderBottomLine,children:a&&l(a)}),jsxRuntimeExports.jsx(TableCell,{className:x.borderBottomLine,children:jsxRuntimeExports.jsx(IconButton,{className:x.moreActionsBtn,"data-test":"flow-center-action-btn-toggleOpenMenu",onClick:function(e){return t=s,(e=e).stopPropagation(),K(!0),U(e.currentTarget),void Q(t);var t},size:"large",children:jsxRuntimeExports.jsx(default_1$b,{})})})]},"".concat(r," + ").concat(t))})})]})}),jsxRuntimeExports.jsx(TablePagination,{className:x.title,rowsPerPageOptions:[10,25,50,100,200],component:"div",count:E.length,rowsPerPage:C,page:N,onPageChange:D,onRowsPerPageChange:L}),jsxRuntimeExports.jsx(Popper,{disablePortal:!0,style:{zIndex:z},open:q,anchorEl:H,transition:!0,placement:"bottom-end",children:function(e){e=e.TransitionProps;return jsxRuntimeExports.jsx(ClickAwayListener,{onClickAway:function(){K(!1),c("",!1),Q(""),G(!1),m(!1)},children:jsxRuntimeExports.jsx(Fade,_object_spread_props$1(_object_spread$5({},e),{timeout:350,children:jsxRuntimeExports.jsxs(Paper,{className:x.paperContainer,children:[jsxRuntimeExports.jsx(Button,{"data-test":"flow-center-flow-list-viewDetails",onClick:function(){c(b,!1)},startIcon:jsxRuntimeExports.jsx("img",{className:x.popperIcon,src:img$I,alt:"openInNewIcon"}),className:x.popperBtns,children:SHARED_MESSAGES.viewDetails()}),jsxRuntimeExports.jsx(Button,{"data-test":"flow-center-flow-list-viewRunningInstances",onClick:function(){c(b,!0)},startIcon:jsxRuntimeExports.jsx("img",{className:x.popperIcon,src:img$F,alt:"openInNewIcon"}),className:x.popperBtns,children:jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"fc.flowList.runningInstances",defaultMessage:"View Running Instances",description:"View Running Instances"})}),jsxRuntimeExports.jsx(Button,{"data-test":"flow-center-flow-list-openFlow",className:x.popperBtns,startIcon:jsxRuntimeExports.jsx("img",{className:x.popperIcon,src:img$1a,alt:"openInNewIcon"}),onClick:function(e){i()},children:SHARED_MESSAGES.openFlow()}),W&&jsxRuntimeExports.jsxs(Button,{"data-test":"flow-center-flow-list-always-up-flow",onClick:function(){m(!0,b)},startIcon:jsxRuntimeExports.jsx("img",{className:x.popperIcon,src:img$c,alt:"alwaysUpFlow"}),className:x.popperBtns,children:[SHARED_MESSAGES.alwaysUpFlow(),jsxRuntimeExports.jsx(Tooltip,{title:"Changes can take up to 5 min to enact.",placement:"bottom",children:jsxRuntimeExports.jsx(default_1$f,{className:ae?g.active:g.inactive})})]}),jsxRuntimeExports.jsx(Button,{"data-test":"flow-center-flow-list-createFlowTemplate",className:x.popperBtns,startIcon:jsxRuntimeExports.jsx("img",{className:x.popperIcon,src:img$d,alt:"openInNewIcon"}),onClick:function(e){var t;t=b,d&&d(t||b)},children:SHARED_MESSAGES.createFlowTemplate()}),jsxRuntimeExports.jsx("hr",{className:x.popperHr}),jsxRuntimeExports.jsx(Button,{"data-test":"flow-center-flow-list-open-deleteFlow",className:x.popperBtns,startIcon:jsxRuntimeExports.jsx("img",{className:x.popperIcon,src:img$Y,alt:"deleteIcon"}),onClick:function(){X(!0)},children:SHARED_MESSAGES.deleteFlow()})]})}))})}}),O&&jsxRuntimeExports.jsxs(Dialog,{role:"presentation",disablePortal:!0,disableEscapeKeyDown:!0,open:J,classes:{paper:g.container},onClose:function(){return r(!1)},"aria-labelledby":"alert-dialog-title","aria-describedby":"alert-dialog-description",children:[jsxRuntimeExports.jsx(DialogTitle,{className:g.title,children:SHARED_MESSAGES.confirmDelete()}),jsxRuntimeExports.jsx(DialogContent,{className:g.content,children:jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.jFIlbR",defaultMessage:"Are you sure you want to delete {flowName}? This action can not be undone.",description:"Are you sure you want to delete [Engine_Name]? This action can not be undone.”",values:{flowName:(null==O?void 0:O.name)||""}})}),jsxRuntimeExports.jsxs(DialogActions,{className:g.actions,children:[jsxRuntimeExports.jsx(Button,{"data-test":"flow-center-flow-list-cancelDeleteFlow",onClick:function(){return r(!1)},className:g.cancelButton,children:SHARED_MESSAGES.cancel()}),jsxRuntimeExports.jsx(Button,{"data-test":"flow-center-flow-list-submitDeleteFlow",onClick:function(){return r(!0)},className:g.confirmationButton,autoFocus:!0,children:SHARED_MESSAGES.delete()})]})]}),O&&ne&&jsxRuntimeExports.jsxs(Dialog,{role:"presentation",disablePortal:!0,disableEscapeKeyDown:!0,open:ne,classes:{paper:g.container},onClose:function(){return A()},"aria-labelledby":"alert-dialog-title","aria-describedby":"alert-dialog-description",children:[jsxRuntimeExports.jsx(DialogTitle,{className:g.title,children:F.OPEN_FLOW_SETTINGS}),jsxRuntimeExports.jsxs(DialogContent,{className:g.content,children:[jsxRuntimeExports.jsx("div",{className:"".concat(e.paddingDiv),children:jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center-header.jFdgxR",defaultMessage:"Select an edge cluster to be used to run your flow",description:"Select an edge cluster to be used to run your flow"})}),jsxRuntimeExports.jsx("div",{className:"".concat(e.paddingDiv),children:jsxRuntimeExports.jsx(Select,{id:"os-flow-center-header-cluster-select.hGcgxR",value:I.newFlowClusterID,onChange:function(e){f(newFlowClusterIDAction(e.target.value))},className:"".concat(e.fullWidth),children:null==j?void 0:j.map(function(e){return jsxRuntimeExports.jsx(MenuItem,{value:null==e?void 0:e.id,children:null==e?void 0:e.name},null==e?void 0:e.id)})})})]}),jsxRuntimeExports.jsxs(DialogActions,{className:g.actions,children:[jsxRuntimeExports.jsx(Button,{"data-test":"flow-center-flow-list-cancelSelectCluster",onClick:function(){return A()},className:g.cancelButton,children:F.CANCEL_SELECT_CLUSTER}),jsxRuntimeExports.jsx(Button,{"data-test":"flow-center-flow-list-openFlowAdvDialog",onClick:function(){return e=(e=null==O?void 0:O.id)||b,t=w?"latest":ue(e),r="".concat(h,"/flow/").concat(e,"/").concat(t),s&&(r="".concat(h,"/notebook/").concat(e,"/").concat(t)),I.newFlowClusterID?(window.open("".concat(h,"/flow/").concat(e,"/").concat(t,"/").concat(I.newFlowClusterID,"/default-cluster"),"_blank","noopener"),f(newFlowClusterIDAction(""))):window.open(r,"_blank","noopener,noreferrer"),void A();var e,t,r},className:g.confirmationButton,autoFocus:!0,children:F.OPEN_FLOW})]})]}),jsxRuntimeExports.jsx(Snackbar,{anchorOrigin:{vertical:"bottom",horizontal:"left"},open:Z,autoHideDuration:6e3,onClose:n,message:$[ee],action:jsxRuntimeExports.jsx(IconButton,{size:"small","aria-label":"close",color:"inherit","data-test":"flow-center-action-btn-close",onClick:n,children:jsxRuntimeExports.jsx(default_1$g,{fontSize:"small"})})})]})};function _array_like_to_array$6(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function _array_with_holes$6(e){if(Array.isArray(e))return e}function _iterable_to_array_limit$6(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,a=[],s=!0,i=!1;try{for(r=r.call(e);!(s=(n=r.next()).done)&&(a.push(n.value),!t||a.length!==t);s=!0);}catch(e){i=!0,o=e}finally{try{s||null==r.return||r.return()}finally{if(i)throw o}}return a}}function _non_iterable_rest$6(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _sliced_to_array$6(e,t){return _array_with_holes$6(e)||_iterable_to_array_limit$6(e,t)||_unsupported_iterable_to_array$6(e,t)||_non_iterable_rest$6()}function _unsupported_iterable_to_array$6(e,t){var r;if(e)return"string"==typeof e?_array_like_to_array$6(e,t):"Map"===(r="Object"===(r=Object.prototype.toString.call(e).slice(8,-1))&&e.constructor?e.constructor.name:r)||"Set"===r?Array.from(r):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?_array_like_to_array$6(e,t):void 0}var useStyles$b=makeStyles()(function(e){return{typography:{marginBottom:"25px!important",fontFamily:"Nunito",fontStyle:"normal!important",fontWeight:600,fontSize:"16px!important",lineHeight:"24px!important",color:"#2A323C!important",letterSpacing:"-1.30385e-09px!important",display:"flex!important"},firstColumn:{paddingLeft:"12px!important"},bold:{fontWeight:600,color:"#2A323C!important",minWidth:"110px!important"},borderRight:{borderWidth:"0px!important",borderRightWidth:"1px!important",borderColor:"#aaa!important",borderStyle:"solid!important"},boxSubtitle:{fontFamily:"Nunito",fontStyle:"normal!important",fontSize:"16px!important",lineHeight:"22px!important",color:"#5C6269!important",fontWeight:400,letterSpacing:"-1.30385e-09px!important"},boxEngineTitle:{fontFamily:"Nunito",fontStyle:"normal!important",fontWeight:500,fontSize:"18px!important",lineHeight:"24px!important",color:"#2A323C!important",letterSpacing:"-1.30385e-09px!important",marginBottom:"10px!important"},engineTitle:{fontFamily:"Nunito",fontStyle:"normal!important",fontWeight:400,fontSize:"16px!important",lineHeight:"22px!important",color:"#2A323C!important",letterSpacing:"-1.30385e-09px!important"},boxTitle:{fontFamily:"Nunito",fontStyle:"normal!important",fontWeight:600,fontSize:"28px!important",lineHeight:"22px!important",color:"#2A323C!important",letterSpacing:"-1.30385e-09px!important"},button:{textTransform:"none!important",marginTop:"17px!important",marginBottom:"12px!important",border:"1px solid #1871E8!important",borderRadius:e.shape.borderRadius,fontFamily:"Nunito",fontStyle:"normal!important",fontWeight:600,fontSize:"14px!important",lineHeight:"19px!important",letterSpacing:"-1.30385e-09px!important",background:e.palette.background.paper,color:"#1871E8!important",padding:"6px 10px!important"},enginesAndFlowWidgetContainer:{display:"flex",width:"100%!important",height:"100%!important"},flowWidgetContainer:{flex:"0 0 720px!important",borderLeft:"0.5px solid #D5DFE9!important",overflowY:"auto!important"},enginesContainer:{width:"100%!important",overflowY:"auto!important"},table:{border:"none!important"},tableRow:{"&:hover":{cursor:"pointer",backgroundColor:"#EEF3F9!important","& td":{backgroundColor:"#EEF3F9!important"}}},boxCell:{marginTop:"20px!important",marginBottom:"20px!important"},borderBottomLine:{padding:"0px!important",paddingLeft:"16px!important"},tableRowClass:{backgroundColor:"#F2F5F9!important"},templateSelected:{background:"#F2F5F9!important",borderRadius:"4px!important",borderTop:"3px solid #F2F5F9!important",borderBottom:"3px solid #F2F5F9!important"},infoValue:{width:"80%",borderBottom:"0.5px solid #D5DFE9!important",paddingBottom:"22px!important",color:"#2A323C!important",fontWeight:"normal!important","& div":{marginLeft:"8px!important"}},infoValueContainer:{display:"flex",alignItems:"center","& img":{marginLeft:"8px!important"}},lastUpdated:{marginTop:"3px!important",fontFamily:"Nunito",fontSize:"12px!important",lineHeight:"18px!important",display:"flex!important",color:"#5C6269!important"},wrapperOverview:{marginTop:"15px!important",marginBottom:"21px!important"},flowWidgetContent:{height:"100%!important",marginTop:e.spacing(6.4),marginLeft:e.spacing(6.4)},title:{fontFamily:"Nunito",fontStyle:"normal",fontWeight:"normal",fontSize:"12px!important",lineHeight:"16px!important",letterSpacing:"-1.30385e-09px!important",color:"#5C6269!important"}}}),TemplateList=function(e){function n(){return f.findIndex(function(e){return e.id===u.id})}function o(e){return e.filter(function(e){return!e.tags||!e.tags.includes("Alteryx")})}function a(t){var r=[];return f.map(function(e){e[t]&&e[t].length&&e[t].forEach(function(e){r.includes(e)||""===e||r.push(e)})}),r}var t=e.handleOpenFlowNameDialog,r=e.openFirstTemplate,s=e.onSelectedTemplate,i=e.isDeselectedTemplate,l=useDispatch(),c=useStyles$b().classes,u=useSelector(function(e){return e.flows.templateToOpen}),e=useSelector(function(e){return e.flows.searchedTemplates}),p=useSelector(function(e){return e.flows.isSearching}),d=useSelector(sessionTokenSelector),m=_sliced_to_array$6(reactExports.useState([]),2),f=m[0],x=m[1],m=_sliced_to_array$6(reactExports.useState([]),2),g=m[0],_=m[1],m=_sliced_to_array$6(reactExports.useState({}),2),E=(m[0],m[1]),m=_sliced_to_array$6(reactExports.useState(n()),2),h=m[0],w=m[1],m=useSelector(function(e){return e.flows.filteredTemplates}),j=_sliced_to_array$6(reactExports.useState(0),2),S=j[0],y=j[1],j=_sliced_to_array$6(reactExports.useState(100),2),b=j[0],R=j[1],T=function(e){t(e)},F=(reactExports.useEffect(function(){f.length||fetchTemplateGallery(d,{isPublic:!0,limit:300}).then(function(e){var t=e,r="flowTemplates";t=e.data[r].records,r=o(t),x(r),setFilteredTemplatesAction(r),w(n())}).catch(function(e){devErrorLogger("error fetching flow templates: ".concat(JSON.stringify(e)))})},[f]),reactExports.useEffect(function(){w(n())},[f,n]),reactExports.useEffect(function(){lodashExports.isEmpty(u)&&(r?null!=f&&f.length&&(E(f[0]),w(0),l(setOpenTemplate({id:f[0].id,title:f[0].title}))):(w(-1),l(setOpenTemplate({id:null,title:null}))))},[l,r,f,u]),reactExports.useEffect(function(){!h||i||u||(w(-1),l(setOpenTemplate({id:null,title:null})))},[i,l,h]),useSelector(function(e){return e.flows.selectedFilters})),j=(reactExports.useEffect(function(){var e,t,r,n;f&&0<f.length&&(e=a("tags"),t=a("categories"),n=[],f.map(function(e){e.author&&(e=e.author.trim(),n.includes(e)||""===e||n.push(e))}),r=n,l(setTagsToStore(e)),l(setCategories(t)),l(setTemplatesAuthors(r))),l(setTemplatesAction(f))},[f,l]),reactExports.useEffect(function(){var e={isPublic:!(!F.public||"1"!==F.public[0]),categories:null==F?void 0:F.categories,tags:null==F?void 0:F.tags,developers:null==F?void 0:F.author,limit:300};fetchTemplateGallery(d,e).then(function(e){e=e.data.flowTemplates.records,e=o(e);setFilteredTemplatesAction(e),_(e)}).catch(function(e){devErrorLogger("error fetching flow templates: ".concat(JSON.stringify(e)))})},[l,F]),reactExports.useEffect(function(){l(setFilteredTemplatesAction(g.filter(function(e){return null!=e})))},[S,b,g]),[]),j=p?e:m,v=jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(TableContainer,{children:jsxRuntimeExports.jsxs(Table,{className:c.table,children:[jsxRuntimeExports.jsx(TableHead,{}),jsxRuntimeExports.jsx(TableBody,{children:j&&j.slice(S*b,S*b+b).map(function(e,t){return r=e,n=t,jsxRuntimeExports.jsx(TableRow,{hover:!0,className:"".concat(n===h?c.tableRowClass:""," ").concat(c.tableRow),selected:n===h,id:"flow-center-templates-list-item","data-test":"flow-center-templates-list-item",children:jsxRuntimeExports.jsx(TableCell,{className:c.borderBottomLine,onClick:function(){E(r),w(n),l(setOpenTemplate({id:r.id,title:r.title})),s(!0)},children:jsxRuntimeExports.jsx(Box,{className:"".concat(c.boxCell," ").concat(c.firstColumn),children:jsxRuntimeExports.jsx(Typography,{"data-test":"flow-center-flows-templateList-title",className:c.engineTitle,children:r.title})})})},"".concat(r.id,"-").concat(n));var r,n})})]})}),jsxRuntimeExports.jsx(TablePagination,{className:c.title,rowsPerPageOptions:[10,25,50,100,200],component:"div",count:m.length,rowsPerPage:b,page:S,onPageChange:function(e,t){y(t)},onRowsPerPageChange:function(e){R(parseInt(e.target.value,10)),y(0)}})]}),p=function(){return jsxRuntimeExports.jsx(Grid,{"data-test":"flow-center-templates-list-container",container:!0,id:"flow-center-templates-list-container",children:jsxRuntimeExports.jsx(Grid,{"data-test":"flow-center-templates-list-subcontainer",item:!0,xs:12,children:jsxRuntimeExports.jsx(Box,{children:v})})})},j=function(){var e;return jsxRuntimeExports.jsxs("div",{className:c.enginesAndFlowWidgetContainer,children:[jsxRuntimeExports.jsx("div",{className:c.enginesContainer,children:jsxRuntimeExports.jsx(Box,{className:-1===h?c.borderRight:"",children:v})}),jsxRuntimeExports.jsx("div",{"data-test":"flow-center-flows-templateList-selected-container",className:c.flowWidgetContainer,children:jsxRuntimeExports.jsxs(Box,{mt:4,ml:4,className:c.flowWidgetContent,children:[jsxRuntimeExports.jsx(Box,{display:"flex",alignItems:"center",children:jsxRuntimeExports.jsx(Box,{id:"template-widget-title","data-test":"template-widget-title",children:jsxRuntimeExports.jsx(Typography,{"data-test":"flow-center-flows-templateList-selectedTitle",className:c.boxTitle,children:null==(e=f[h])?void 0:e.title})})}),jsxRuntimeExports.jsx(Box,{m:1,ml:0,mb:0,children:jsxRuntimeExports.jsx(Button,{"data-test":"flow-center-template-list-createFlowFromTemplate-".concat(null==(e=f[h])?void 0:e.title),color:"primary",onClick:function(){return T?T(f[h].id):""},className:c.button,startIcon:jsxRuntimeExports.jsx("img",{src:img$z,alt:"plus icon"}),children:SHARED_MESSAGES.createFlowFromTemplate()})}),jsxRuntimeExports.jsxs(Box,{my:4,children:[jsxRuntimeExports.jsxs(Typography,{"data-test":"flow-center-flows-templateList-overview",variant:"subtitle1",className:c.typography,children:[jsxRuntimeExports.jsxs("span",{className:c.bold,children:[SHARED_MESSAGES.overview(),":"]}),jsxRuntimeExports.jsx("div",{className:c.infoValue,children:jsxRuntimeExports.jsx("div",{children:null==(e=f[h])?void 0:e.subtitle})})]}),jsxRuntimeExports.jsxs(Typography,{"data-test":"flow-center-flows-templateList-developer",variant:"subtitle1",className:c.typography,children:[jsxRuntimeExports.jsxs("span",{className:c.bold,children:[SHARED_MESSAGES.developer(),":"]}),jsxRuntimeExports.jsx("div",{className:c.infoValue,children:jsxRuntimeExports.jsx("div",{children:null==(e=f[h])?void 0:e.author})})]}),jsxRuntimeExports.jsxs(Typography,{"data-test":"flow-center-flows-templateList-certified",variant:"subtitle1",className:c.typography,children:[jsxRuntimeExports.jsxs("span",{className:c.bold,children:[SHARED_MESSAGES.certified(),":"]}),jsxRuntimeExports.jsxs("div",{className:"".concat(c.infoValue," ").concat(c.infoValueContainer),children:[jsxRuntimeExports.jsx("div",{children:SHARED_MESSAGES.yes()}),jsxRuntimeExports.jsx("img",{src:img$B,alt:"veritoneCertifiedIcon"})]})]}),f[h]&&f[h].categories&&f[h].categories.length&&""!==f[h].categories[0]&&jsxRuntimeExports.jsxs(Typography,{"data-test":"flow-center-flows-templateList-category",variant:"subtitle1",className:c.typography,children:[jsxRuntimeExports.jsxs("span",{className:c.bold,children:[SHARED_MESSAGES.category(),":"]}),jsxRuntimeExports.jsx("div",{className:c.infoValue,children:jsxRuntimeExports.jsx("div",{children:null==(e=f[h])?void 0:e.categories.join(", ")})})]}),jsxRuntimeExports.jsxs(Typography,{"data-test":"flow-center-flows-templateList-tags",variant:"subtitle1",className:c.typography,children:[jsxRuntimeExports.jsxs("span",{className:c.bold,children:[SHARED_MESSAGES.tags(),":"]}),jsxRuntimeExports.jsx("div",{className:c.infoValue,children:jsxRuntimeExports.jsx("div",{children:(null==(e=f[h])||null==(e=e.tags)?void 0:e.join(", "))||SHARED_MESSAGES.noTags()})})]}),jsxRuntimeExports.jsxs(Typography,{"data-test":"flow-center-flows-templateList-infoValue",variant:"subtitle1",className:c.typography,children:[jsxRuntimeExports.jsxs("span",{className:c.bold,children:[SHARED_MESSAGES.active(),":"]}),jsxRuntimeExports.jsx("div",{className:c.infoValue,children:jsxRuntimeExports.jsx("div",{children:SHARED_MESSAGES.yes()})})]})]}),jsxRuntimeExports.jsx("img",{style:{width:"100%"},src:null==(e=f[h])?void 0:e.image,alt:""})]})})]})};return e&&0===e.length?jsxRuntimeExports.jsx(NoResults,{}):(-1===h?p:j)()},useStyles$a=makeStyles()(function(e){return{progressBar:{height:8,borderRadius:4,marginTop:4,marginBottom:4},progressBarGreen:{"& .MuiLinearProgress-bar":{backgroundColor:e.palette.success.main},backgroundColor:"rgba(76, 175, 80, 0.2)"},progressBarYellow:{"& .MuiLinearProgress-bar":{backgroundColor:e.palette.warning.main},backgroundColor:"rgba(255, 152, 0, 0.2)"},progressBarRed:{"& .MuiLinearProgress-bar":{backgroundColor:e.palette.error.main},backgroundColor:"rgba(244, 67, 54, 0.2)"},warningCell:{backgroundColor:"rgba(244, 67, 54, 0.1)"},truncatedId:{fontSize:"0.875rem"},copyIcon:{fontSize:"1rem",cursor:"pointer",marginLeft:"4px",verticalAlign:"middle"},metricsValue:{textAlign:"right"},rightAlignedCell:{textAlign:"right"},emptyProgressBar:{height:8,borderRadius:4,marginTop:4,marginBottom:4,backgroundColor:"rgba(0, 0, 0, 0.1)"},naPlaceholder:{color:"#9e9e9e",fontWeight:400},metricsColumn:{minWidth:"180px",width:"180px",paddingLeft:"16px !important",paddingRight:"16px !important"},flowNameColumn:{minWidth:"250px",width:"250px"}}});function asyncGeneratorStep$4(e,t,r,n,o,a,s){try{var i=e[a](s),l=i.value}catch(e){return void r(e)}i.done?t(l):Promise.resolve(l).then(n,o)}function _async_to_generator$4(i){return function(){var e=this,s=arguments;return new Promise(function(t,r){var n=i.apply(e,s);function o(e){asyncGeneratorStep$4(n,t,r,o,a,"next",e)}function a(e){asyncGeneratorStep$4(n,t,r,o,a,"throw",e)}o(void 0)})}}function _define_property$4(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _object_spread$4(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{},n=Object.keys(r);(n="function"==typeof Object.getOwnPropertySymbols?n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})):n).forEach(function(e){_define_property$4(t,e,r[e])})}return t}function _ts_generator$4(n,o){var a,s,i,l={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]},e={next:t(0),throw:t(1),return:t(2)};return"function"==typeof Symbol&&(e[Symbol.iterator]=function(){return this}),e;function t(r){return function(e){var t=[r,e];if(a)throw new TypeError("Generator is already executing.");for(;l;)try{if(a=1,s&&(i=2&t[0]?s.return:t[0]?s.throw||((i=s.return)&&i.call(s),0):s.next)&&!(i=i.call(s,t[1])).done)return i;switch(s=0,(t=i?[2&t[0],i.value]:t)[0]){case 0:case 1:i=t;break;case 4:return l.label++,{value:t[1],done:!1};case 5:l.label++,s=t[1],t=[0];continue;case 7:t=l.ops.pop(),l.trys.pop();continue;default:if(!(i=0<(i=l.trys).length&&i[i.length-1])&&(6===t[0]||2===t[0])){l=0;continue}if(3===t[0]&&(!i||t[1]>i[0]&&t[1]<i[3]))l.label=t[1];else if(6===t[0]&&l.label<i[1])l.label=i[1],i=t;else{if(!(i&&l.label<i[2])){i[2]&&l.ops.pop(),l.trys.pop();continue}l.label=i[2],l.ops.push(t)}}t=o.call(n,l)}catch(e){t=[6,e],s=0}finally{a=i=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}}}var fetchContainers=(()=>{var r=_async_to_generator$4(function(t,r){var n,o;return _ts_generator$4(this,function(e){switch(e.label){case 0:n=appIdSelector(store.getState()),e.label=1;case 1:return e.trys.push([1,4,,5]),[4,fetch("".concat(t,"/edge/v1/automate/containers/org/mine"),{method:"GET",headers:_object_spread$4({"Content-Type":"application/json",Authorization:"Bearer ".concat(r)},n?{"X-Veritone-Application":n}:{})})];case 2:if((o=e.sent()).ok)return[4,o.json()];throw new Error("Failed to fetch containers: ".concat(o.statusText));case 3:return[2,e.sent()];case 4:throw o=e.sent(),console.error("Error fetching containers:",o),o;case 5:return[2]}})});return function(e,t){return r.apply(this,arguments)}})(),terminateContainer=(()=>{var n=_async_to_generator$4(function(t,r,n){var o,a;return _ts_generator$4(this,function(e){switch(e.label){case 0:o=appIdSelector(store.getState()),e.label=1;case 1:return e.trys.push([1,3,,4]),[4,fetch("".concat(t,"/edge/v1/k8s/flow/terminate/").concat(r),{method:"POST",headers:_object_spread$4({"Content-Type":"application/json",Authorization:"Bearer ".concat(n)},o?{"X-Veritone-Application":o}:{})})];case 2:if((a=e.sent()).ok)return[2,{success:!0}];throw new Error("Failed to terminate container: ".concat(a.statusText));case 3:throw a=e.sent(),console.error("Error terminating container:",a),a;case 4:return[2]}})});return function(e,t,r){return n.apply(this,arguments)}})();function _array_like_to_array$5(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function _array_with_holes$5(e){if(Array.isArray(e))return e}function asyncGeneratorStep$3(e,t,r,n,o,a,s){try{var i=e[a](s),l=i.value}catch(e){return void r(e)}i.done?t(l):Promise.resolve(l).then(n,o)}function _async_to_generator$3(i){return function(){var e=this,s=arguments;return new Promise(function(t,r){var n=i.apply(e,s);function o(e){asyncGeneratorStep$3(n,t,r,o,a,"next",e)}function a(e){asyncGeneratorStep$3(n,t,r,o,a,"throw",e)}o(void 0)})}}function _define_property$3(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _iterable_to_array_limit$5(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,a=[],s=!0,i=!1;try{for(r=r.call(e);!(s=(n=r.next()).done)&&(a.push(n.value),!t||a.length!==t);s=!0);}catch(e){i=!0,o=e}finally{try{s||null==r.return||r.return()}finally{if(i)throw o}}return a}}function _non_iterable_rest$5(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _object_spread$3(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{},n=Object.keys(r);(n="function"==typeof Object.getOwnPropertySymbols?n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})):n).forEach(function(e){_define_property$3(t,e,r[e])})}return t}function ownKeys(e,t){var r=Object.keys(e);return Object.getOwnPropertySymbols&&(e=Object.getOwnPropertySymbols(e),r.push.apply(r,e)),r}function _object_spread_props(t,r){return r=null!=r?r:{},Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):ownKeys(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}),t}function _sliced_to_array$5(e,t){return _array_with_holes$5(e)||_iterable_to_array_limit$5(e,t)||_unsupported_iterable_to_array$5(e,t)||_non_iterable_rest$5()}function _unsupported_iterable_to_array$5(e,t){var r;if(e)return"string"==typeof e?_array_like_to_array$5(e,t):"Map"===(r="Object"===(r=Object.prototype.toString.call(e).slice(8,-1))&&e.constructor?e.constructor.name:r)||"Set"===r?Array.from(r):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?_array_like_to_array$5(e,t):void 0}function _ts_generator$3(n,o){var a,s,i,l={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]},e={next:t(0),throw:t(1),return:t(2)};return"function"==typeof Symbol&&(e[Symbol.iterator]=function(){return this}),e;function t(r){return function(e){var t=[r,e];if(a)throw new TypeError("Generator is already executing.");for(;l;)try{if(a=1,s&&(i=2&t[0]?s.return:t[0]?s.throw||((i=s.return)&&i.call(s),0):s.next)&&!(i=i.call(s,t[1])).done)return i;switch(s=0,(t=i?[2&t[0],i.value]:t)[0]){case 0:case 1:i=t;break;case 4:return l.label++,{value:t[1],done:!1};case 5:l.label++,s=t[1],t=[0];continue;case 7:t=l.ops.pop(),l.trys.pop();continue;default:if(!(i=0<(i=l.trys).length&&i[i.length-1])&&(6===t[0]||2===t[0])){l=0;continue}if(3===t[0]&&(!i||t[1]>i[0]&&t[1]<i[3]))l.label=t[1];else if(6===t[0]&&l.label<i[1])l.label=i[1],i=t;else{if(!(i&&l.label<i[2])){i[2]&&l.ops.pop(),l.trys.pop();continue}l.label=i[2],l.ops.push(t)}}t=o.call(n,l)}catch(e){t=[6,e],s=0}finally{a=i=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}}}var ContainerList=reactExports.forwardRef(function(e,D){function t(e){return jsxRuntimeExports.jsx(TableSortLabel,{active:T===e,IconComponent:default_1$c,direction:T===e?R:"asc",onClick:function(){return te(e)},classes:{icon:x.sortIcon}})}function a(e){return e<70?g.progressBarGreen:e<85?g.progressBarYellow:g.progressBarRed}function s(e){return void 0!==e&&85<e}function i(e){return 0===e?"0 MB":1024<=(e=e/1048576)?"".concat((e/1024).toFixed(2)," GB"):"".concat(e.toFixed(2)," MB")}function L(){var e;null!=N&&N.engineID&&(e="".concat(ee,"/flow/").concat(N.engineID,"/latest"),window.open(e,"_blank","noopener,noreferrer"),F(!1))}function k(e,t){X(t)}function P(e){Z(Number.parseInt(e.target.value,10)),X(0)}function r(){return jsxRuntimeExports.jsx(TableHead,{children:jsxRuntimeExports.jsxs(TableRow,{children:[jsxRuntimeExports.jsxs(TableCell,{className:"".concat(x.title," ").concat(x.firstTitle," ").concat(x.borderBottomLineHeader),children:[jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.containerList.podName",defaultMessage:"Pod Name",description:"Pod Name"}),!j&&t("podName")]}),jsxRuntimeExports.jsxs(TableCell,{className:"".concat(x.title," ").concat(x.borderBottomLineHeader," ").concat(g.flowNameColumn),children:[jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.containerList.flowName",defaultMessage:"Flow Name",description:"Flow Name"}),!j&&t("flowName")]}),jsxRuntimeExports.jsxs(TableCell,{className:"".concat(x.title," ").concat(x.borderBottomLineHeader," ").concat(g.rightAlignedCell," ").concat(g.metricsColumn),children:[jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.containerList.cpuUsage",defaultMessage:"CPU (cores)",description:"CPU (cores)"}),!j&&t("cpuUsage")]}),jsxRuntimeExports.jsxs(TableCell,{className:"".concat(x.title," ").concat(x.borderBottomLineHeader," ").concat(g.rightAlignedCell," ").concat(g.metricsColumn),style:{paddingLeft:"16px",paddingRight:"16px"},children:[jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.containerList.memoryUsage",defaultMessage:"Memory",description:"Memory"}),!j&&t("memoryUsage")]}),jsxRuntimeExports.jsxs(TableCell,{className:"".concat(x.title," ").concat(x.borderBottomLineHeader),children:[jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.containerList.createdAt",defaultMessage:"Created At",description:"Created At"}),!j&&t("createdAt")]}),jsxRuntimeExports.jsxs(TableCell,{className:"".concat(x.title," ").concat(x.borderBottomLineHeader," ").concat(g.rightAlignedCell),children:[jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.containerList.timeAlive",defaultMessage:"Uptime",description:"Uptime"}),!j&&t("timeAlive")]}),jsxRuntimeExports.jsx(TableCell,{className:"".concat(x.title," ").concat(x.borderBottomLineHeader),children:jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.containerList.isService",defaultMessage:"Service Mode",description:"Service Mode"})}),jsxRuntimeExports.jsx(TableCell,{className:"".concat(x.title," ").concat(x.borderBottomLineHeader)})]})})}var n,o,l,c,u=e.onSelectContainer,p=e.simpleMode,B=void 0!==p&&p,p=e.screenName,p=void 0===p?"Running Containers":p,d=e.selectedContainerId,m=void 0===d?"":d,d=e.showTitle,d=void 0===d||d,e=e.zIndex,e=void 0===e?1300:e,f=useDispatch(),x=flowStyles().classes,g=useStyles$a().classes,_=useSelector(selectApiConfigs).token,E=useSelector(function(e){return(null==(e=e.flows)?void 0:e.flows)||[]}),h=_sliced_to_array$5(reactExports.useState([]),2),w=h[0],z=h[1],h=_sliced_to_array$5(reactExports.useState(!0),2),j=h[0],S=h[1],h=_sliced_to_array$5(reactExports.useState(null),2),y=h[0],b=h[1],h=_sliced_to_array$5(reactExports.useState("desc"),2),R=h[0],G=h[1],h=_sliced_to_array$5(reactExports.useState("createdAt"),2),T=h[0],W=h[1],h=_sliced_to_array$5(reactExports.useState(null),2),H=h[0],U=h[1],h=_sliced_to_array$5(reactExports.useState(!1),2),Y=h[0],F=h[1],h=_sliced_to_array$5(reactExports.useState(""),2),V=h[0],v=h[1],h=_sliced_to_array$5(reactExports.useState(null),2),N=h[0],C=h[1],h=_sliced_to_array$5(reactExports.useState(!1),2),q=h[0],K=h[1],h=_sliced_to_array$5(reactExports.useState(!1),2),Q=h[0],J=h[1],h=_sliced_to_array$5(reactExports.useState(0),2),I=h[0],X=h[1],h=_sliced_to_array$5(reactExports.useState(100),2),$=h[0],Z=h[1],ee=useSelector(automateUrlSelector),M=useSelector(controllerUrlSelector),h=useSelector(automateControllerUrlSelector),M=getBrowserSafeControllerUrl({controllerUrl:M,automateControllerUrl:h,automateUrl:ee}),A=(n=_async_to_generator$3(function(){var t;return _ts_generator$3(this,function(e){switch(e.label){case 0:return e.trys.push([0,2,3,4]),S(!0),b(null),[4,fetchContainers(M,_)];case 1:return t=e.sent(),z(t||[]),[3,4];case 2:return t=e.sent(),console.error("Failed to load containers:",t),b("Failed to load containers"),f(showMessage({content:"Failed to load containers",severity:MessageSeverity.Error})),[3,4];case 3:return S(!1),[7];case 4:return[2]}})}),function(){return n.apply(this,arguments)}),h=(reactExports.useImperativeHandle(D,function(){return{reload:A,isLoading:function(){return j}}}),reactExports.useEffect(function(){M&&_&&A()},[M,_]),reactExports.useMemo(function(){return w.map(function(t){var e=E.find(function(e){return e.id===t.engineID});return _object_spread_props(_object_spread$3({},t),{flowName:(null==e?void 0:e.name)||"Unknown Flow",flowState:(null==e?void 0:e.state)||"unknown"})})},[w,E])),te=function(e){G(T===e&&"asc"===R?"desc":"asc"),W(e)},re=function(e,t,r){e=e[r],t=t[r];return t<e?-1:e<t?1:0},ne=(o=_async_to_generator$3(function(t,r){return _ts_generator$3(this,function(e){switch(e.label){case 0:return t.stopPropagation(),[4,navigator.clipboard.writeText(r)];case 1:return e.sent(),[2]}})}),function(e,t){return o.apply(this,arguments)}),O=(l=_async_to_generator$3(function(t){var r;return _ts_generator$3(this,function(e){switch(e.label){case 0:if(!t||null==N||!N.automateContainerID)return[3,6];J(!0),e.label=1;case 1:return e.trys.push([1,4,5,6]),[4,terminateContainer(M,N.automateContainerID,_)];case 2:return e.sent(),f(showMessage({content:"Container terminated successfully",severity:MessageSeverity.Success})),[4,A()];case 3:return e.sent(),[3,6];case 4:return r=e.sent(),console.error("Failed to terminate container:",r),f(showMessage({content:"Failed to terminate container",severity:MessageSeverity.Error})),[3,6];case 5:return J(!1),[7];case 6:return K(!1),C(null),[2]}})}),function(e){return l.apply(this,arguments)});return j?jsxRuntimeExports.jsxs(Box,{mt:d?2:0,children:[d&&jsxRuntimeExports.jsx(Typography,{"data-testid":"container-list-screenName",className:x.text,style:{flexGrow:1},children:jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.containerList.screenName",defaultMessage:"{screenName}",description:"{screenName}",values:{screenName:p}})}),jsxRuntimeExports.jsx(TableContainer,{children:jsxRuntimeExports.jsxs(Table,{className:x.table,children:[r(),jsxRuntimeExports.jsx(TableBody,{children:Array.from({length:5},function(e,t){return"skeleton-".concat(t)}).map(function(e){return jsxRuntimeExports.jsxs(TableRow,{children:[jsxRuntimeExports.jsx(TableCell,{children:jsxRuntimeExports.jsx(Skeleton,{variant:"text",width:"80%"})}),jsxRuntimeExports.jsx(TableCell,{children:jsxRuntimeExports.jsx(Skeleton,{variant:"text",width:"70%"})}),jsxRuntimeExports.jsx(TableCell,{children:jsxRuntimeExports.jsx(Skeleton,{variant:"rectangular",height:40})}),jsxRuntimeExports.jsx(TableCell,{children:jsxRuntimeExports.jsx(Skeleton,{variant:"rectangular",height:40})}),jsxRuntimeExports.jsx(TableCell,{children:jsxRuntimeExports.jsx(Skeleton,{variant:"text",width:"60%"})}),jsxRuntimeExports.jsx(TableCell,{children:jsxRuntimeExports.jsx(Skeleton,{variant:"text",width:"50%"})}),jsxRuntimeExports.jsx(TableCell,{children:jsxRuntimeExports.jsx(Skeleton,{variant:"rounded",width:80,height:24})}),jsxRuntimeExports.jsx(TableCell,{children:jsxRuntimeExports.jsx(Skeleton,{variant:"circular",width:40,height:40})})]},e)})})]})})]}):y?jsxRuntimeExports.jsx(Box,{display:"flex",justifyContent:"center",alignItems:"center",minHeight:"400px",children:jsxRuntimeExports.jsx(Typography,{color:"error",children:jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.containerList.error",defaultMessage:"An error occurred while loading containers",description:"Loading Containers Error",values:{error:y}})})}):jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[0===(null==h?void 0:h.length)?jsxRuntimeExports.jsx(NoResults,{}):jsxRuntimeExports.jsxs(Box,{mt:d?2:0,children:[d&&jsxRuntimeExports.jsx(Typography,{"data-testid":"container-list-screenName",className:x.text,style:{flexGrow:1},children:jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.containerList.screenName",defaultMessage:"{screenName}",description:"{screenName}",values:{screenName:p}})}),jsxRuntimeExports.jsx(TableContainer,{id:"container-list-table","data-testid":"container-list-table",children:jsxRuntimeExports.jsxs(Table,{className:x.table,children:[r(),jsxRuntimeExports.jsx(TableBody,{children:h&&((e,n)=>((e=e.map(function(e,t){return[e,t]})).sort(function(e,t){var r=n(e[0],t[0]);return 0!==r?r:e[1]-t[1]}),e.map(function(e){return e[0]})))(h,(c=T,"desc"===R?function(e,t){return re(e,t,c)}:function(e,t){return-re(e,t,c)})).slice(I*$,I*$+$).map(function(r,e){return jsxRuntimeExports.jsxs(TableRow,{id:"container-list-item","data-testid":"container-list-item",hover:!0,className:"".concat(m===r.containerID?x.tableRowClass:""," ").concat(x.borderBottomLineRow),classes:{selected:x.tableRowSelected},selected:m===r.containerID||V===r.containerID,onClick:function(){var e;B||(e=r.containerID,u&&u(e))},children:[jsxRuntimeExports.jsx(TableCell,{className:x.borderBottomLine,children:jsxRuntimeExports.jsx("div",{className:"".concat(x.boxCell," ").concat(x.firstColumn),children:jsxRuntimeExports.jsx("p",{className:x.flowName,children:25<r.podName.length?"".concat(r.podName.substring(0,25),"..."):r.podName})})}),jsxRuntimeExports.jsxs(TableCell,{className:"".concat(x.borderBottomLine," ").concat(g.flowNameColumn),children:[jsxRuntimeExports.jsx("p",{className:x.flowName,children:r.flowName||"N/A"}),jsxRuntimeExports.jsx("div",{className:x.boxSubtitle,children:jsxRuntimeExports.jsxs("p",{className:"".concat(x.dateTimeSmall," ").concat(g.truncatedId),children:["Flow ID: ",r.engineID.substring(0,8),"...",jsxRuntimeExports.jsx(Tooltip,{title:"Copy Flow ID",children:jsxRuntimeExports.jsx(default_1$a,{className:g.copyIcon,onClick:function(e){return ne(e,r.engineID)}})})]})})]}),jsxRuntimeExports.jsx(TableCell,{className:"".concat(x.borderBottomLine," ").concat(g.rightAlignedCell," ").concat(g.metricsColumn," ").concat(s(r.cpuUsagePercent)?g.warningCell:""),children:void 0!==r.cpuUsage&&void 0!==r.cpuRequests&&void 0!==r.cpuUsagePercent?jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsxs(Box,{display:"flex",alignItems:"center",justifyContent:"flex-end",gap:1,children:[jsxRuntimeExports.jsxs("p",{className:g.metricsValue,children:[r.cpuUsage.toFixed(3)," / ",r.cpuRequests," cores"]}),s(r.cpuUsagePercent)&&jsxRuntimeExports.jsx(Tooltip,{title:"High CPU Usage",children:jsxRuntimeExports.jsx(default_1$5,{style:{color:"#f44336",fontSize:"1.2rem"}})})]}),jsxRuntimeExports.jsx(LinearProgress,{variant:"determinate",value:Math.min(r.cpuUsagePercent,100),className:"".concat(g.progressBar," ").concat(a(r.cpuUsagePercent))}),jsxRuntimeExports.jsxs("p",{className:x.dateTimeSmall,style:{textAlign:"right",display:"block"},children:[r.cpuUsagePercent.toFixed(2),"%"]})]}):jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx("p",{className:g.naPlaceholder,style:{textAlign:"right"},children:"—"}),jsxRuntimeExports.jsx(Box,{className:g.emptyProgressBar}),jsxRuntimeExports.jsx("p",{className:"".concat(x.dateTimeSmall," ").concat(g.naPlaceholder),style:{textAlign:"right",display:"block"},children:"N/A"})]})}),jsxRuntimeExports.jsx(TableCell,{className:"".concat(x.borderBottomLine," ").concat(g.rightAlignedCell," ").concat(g.metricsColumn," ").concat(s(r.memoryUsagePercent)?g.warningCell:""),style:{paddingLeft:"16px",paddingRight:"16px"},children:void 0!==r.memoryUsage&&void 0!==r.memoryRequests&&void 0!==r.memoryUsagePercent?jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsxs(Box,{display:"flex",alignItems:"center",justifyContent:"flex-end",gap:1,children:[jsxRuntimeExports.jsxs("p",{className:g.metricsValue,children:[i(r.memoryUsage)," / ",i(r.memoryRequests)]}),s(r.memoryUsagePercent)&&jsxRuntimeExports.jsx(Tooltip,{title:"High Memory Usage",children:jsxRuntimeExports.jsx(default_1$5,{style:{color:"#f44336",fontSize:"1.2rem"}})})]}),jsxRuntimeExports.jsx(LinearProgress,{variant:"determinate",value:Math.min(r.memoryUsagePercent,100),className:"".concat(g.progressBar," ").concat(a(r.memoryUsagePercent))}),jsxRuntimeExports.jsxs("p",{className:x.dateTimeSmall,style:{textAlign:"right",display:"block"},children:[r.memoryUsagePercent.toFixed(2),"%"]})]}):jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx("p",{className:g.naPlaceholder,style:{textAlign:"right"},children:"—"}),jsxRuntimeExports.jsx(Box,{className:g.emptyProgressBar}),jsxRuntimeExports.jsx("p",{className:"".concat(x.dateTimeSmall," ").concat(g.naPlaceholder),style:{textAlign:"right",display:"block"},children:"N/A"})]})}),jsxRuntimeExports.jsx(TableCell,{className:x.borderBottomLine,children:r.createdAt&&jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(Typography,{"data-testid":"container-list-table-time",className:x.dateTime,children:SHARED_DATE_TIME.getDate(r.createdAt)}),jsxRuntimeExports.jsx(Typography,{"data-testid":"container-list-table-time-caption",variant:"caption",className:x.dateTimeSmall,children:(n=r.createdAt,o=DateTime_1.now(),n=DateTime_1.fromISO(n),1<=(o=o.diff(n,["days","hours","minutes"])).days?(n=Math.floor(o.days),"".concat(n," day").concat(1===n?"":"s"," ago")):1<=o.hours?(n=Math.floor(o.hours),"".concat(n," hour").concat(1===n?"":"s"," ago")):(n=Math.floor(o.minutes),"".concat(n," minute").concat(1===n?"":"s"," ago")))})]})}),jsxRuntimeExports.jsx(TableCell,{className:"".concat(x.borderBottomLine," ").concat(g.rightAlignedCell),children:jsxRuntimeExports.jsx("p",{style:{textAlign:"right"},children:(o=r.timeAlive,o=Math.floor(o/1e3),n=Math.floor(o/86400),t=Math.floor(o%86400/3600),o=Math.floor(o%3600/60),0<n?"".concat(n,"d ").concat(t,"h"):(0<t?"".concat(t,"h "):"").concat(o,"m"))})}),jsxRuntimeExports.jsx(TableCell,{className:x.borderBottomLine,children:r.is_service?jsxRuntimeExports.jsx(Chip,{label:"Service",size:"small",color:"secondary"}):jsxRuntimeExports.jsx(Chip,{label:"Studio",size:"small",color:"primary"})}),jsxRuntimeExports.jsx(TableCell,{className:x.borderBottomLine,children:jsxRuntimeExports.jsx(IconButton,{className:x.moreActionsBtn,"data-testid":"container-list-action-btn-toggleOpenMenu",onClick:function(e){return t=r,(e=e).stopPropagation(),F(!0),U(e.currentTarget),v(t.containerID),void C(t);var t},size:"large",children:jsxRuntimeExports.jsx(default_1$b,{})})})]},"".concat(r.containerID,"-").concat(e));var t,n,o})})]})}),jsxRuntimeExports.jsx(TablePagination,{className:x.title,rowsPerPageOptions:[10,25,50,100,200],component:"div",count:h.length,rowsPerPage:$,page:I,onPageChange:k,onRowsPerPageChange:P}),jsxRuntimeExports.jsx(Popper,{disablePortal:!0,style:{zIndex:e},open:Y,anchorEl:H,transition:!0,placement:"bottom-end",children:function(e){e=e.TransitionProps;return jsxRuntimeExports.jsx(ClickAwayListener,{onClickAway:function(){F(!1),v("")},children:jsxRuntimeExports.jsx(Fade,_object_spread_props(_object_spread$3({},e),{timeout:350,children:jsxRuntimeExports.jsxs(Paper,{className:x.paperContainer,children:[jsxRuntimeExports.jsx(Button,{"data-testid":"container-list-openFlow",onClick:L,startIcon:jsxRuntimeExports.jsx(default_1$4,{}),className:x.popperBtns,children:jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.containerList.openFlow",defaultMessage:"Open Flow",description:"Open Flow"})}),jsxRuntimeExports.jsx(Button,{"data-testid":"container-list-terminate",onClick:function(){N&&(C(N),K(!0),F(!1))},startIcon:jsxRuntimeExports.jsx(default_1$3,{}),className:x.popperBtns,children:jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.containerList.terminate",defaultMessage:"Terminate",description:"Terminate"})})]})}))})}})]}),jsxRuntimeExports.jsxs(Dialog,{open:q,onClose:function(){return O(!1)},"aria-labelledby":"terminate-dialog-title","aria-describedby":"terminate-dialog-description",children:[jsxRuntimeExports.jsx(DialogTitle,{id:"terminate-dialog-title",children:jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.containerList.confirmTerminate",defaultMessage:"Confirm Termination",description:"Confirm Termination"})}),jsxRuntimeExports.jsx(DialogContent,{children:jsxRuntimeExports.jsx(Typography,{children:jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.containerList.confirmTerminateContent",defaultMessage:"Are you sure you want to terminate this container? This action cannot be undone.",description:"Confirm Termination Content"})})}),jsxRuntimeExports.jsxs(DialogActions,{children:[jsxRuntimeExports.jsx(Button,{onClick:function(){return O(!1)},disabled:Q,children:jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.containerList.cancel",defaultMessage:"Cancel",description:"Cancel"})}),jsxRuntimeExports.jsx(LoadingButton,{onClick:function(){return O(!0)},color:"error",loading:Q,variant:"contained",children:jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.containerList.terminateConfirm",defaultMessage:"Terminate",description:"Terminate Confirm"})})]})]})]})}),useSharedStyles=(ContainerList.displayName="ContainerList",makeStyles()(function(e){return{actionIcon:{padding:"10px!important",marginRight:"-8px!important","& svg":{fill:"#555F7C!important"}},actionIconClose:{padding:"10px!important",backgroundColor:"#EEF3F9!important",marginRight:"-8px!important","& svg":{fill:"#555F7C!important"}}}}));function FiltersControl(e){var t=useSharedStyles().classes;return jsxRuntimeExports.jsx(Tooltip,{title:e.showNavigation?SHARED_MESSAGES.hideFilters():SHARED_MESSAGES.showFilters(),children:jsxRuntimeExports.jsx(IconButton,{"data-test":"flow-center-action-btn-toggleNavigation",onClick:function(){return e.setShowNavigation(!e.showNavigation)},className:"".concat(e.showNavigation?t.actionIconClose:t.actionIcon),size:"large",children:e.showNavigation?jsxRuntimeExports.jsx("img",{width:24,height:24,src:img$x,alt:"filterCloseIcon",draggable:"false"}):jsxRuntimeExports.jsx(default_1$2,{})})})}var useStyles$9=makeStyles()(function(){return{iconDistance:{marginLeft:"8px!important"}}});function MoreInfControl(e){var t=useStyles$9().classes,r=useSharedStyles().classes;return jsxRuntimeExports.jsx(Tooltip,{title:e.openFlowDetails?SHARED_MESSAGES.hideMoreInformation():SHARED_MESSAGES.showMoreInformation(),children:jsxRuntimeExports.jsx(IconButton,{"data-test":"flow-center-action-btn-openFlowWidget",onClick:function(){return e.setOpenFlowDetails()},className:"".concat(t.iconDistance," ").concat(e.openFlowDetails?r.actionIconClose:r.actionIcon),size:"large",children:jsxRuntimeExports.jsx("img",{width:24,height:24,src:img$10,alt:"filterCloseIcon",draggable:"false"})})})}var ReloadControl=function(e){var t=e.onReload,e=e.loading,e=void 0!==e&&e;return jsxRuntimeExports.jsx(Tooltip,{title:jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.toolbar.reload",defaultMessage:"Reload",description:"Reload button tooltip"}),children:jsxRuntimeExports.jsx(IconButton,{"data-testid":"toolbar-reload-button",onClick:t,disabled:e,size:"medium",sx:{marginLeft:"8px","&:hover":{backgroundColor:"rgba(0, 0, 0, 0.04)"},"@keyframes spin":{"0%":{transform:"rotate(0deg)"},"100%":{transform:"rotate(360deg)"}}},children:jsxRuntimeExports.jsx(default_1$1,{sx:{fontSize:"24px",animation:e?"spin 1s linear infinite":"none"}})})})},useStyles$8=makeStyles()(function(e){return{grow:{flex:1,maxWidth:"unset!important"},flowsLength:{marginLeft:"6px!important",fontFamily:"Nunito",fontStyle:"normal!important",fontWeight:"400!important",fontSize:"16px!important",lineHeight:"22px!important",letterSpacing:"0px!important",color:"#5C6269!important"},toolbar:{position:"sticky!important",top:"0!important",zIndex:"1!important",backgroundColor:"white!important",marginLeft:0,paddingLeft:"12px!important",borderBottom:"0.5px solid #D5DFE9",paddingRight:"24px!important"},searchResultLength:{paddingLeft:"26px!important"},title:{display:"flex",fontFamily:"Nunito",fontStyle:"normal!important",fontWeight:"600!important",fontSize:"16px!important",lineHeight:"22px!important",letterSpacing:"0px!important",color:"#2A323C!important"},additionalOptBtn:{padding:e.spacing(1)+"px!important"}}});function Toolbar(e){var t=e.header,r=e.setShowNavigation,n=e.showNavigation,o=e.setOpenFlowDetails,a=e.openFlowDetails,s=e.screen,i=e.onReload,e=e.isReloading,l=useStyles$8().classes,c=useSelector(function(e){return e.flows.flows}),u=useSelector(function(e){return e.flows.notebooks}),p=useSelector(function(e){return e.flows.isSearching}),d=useSelector(function(e){return e.flows.fetchingFlows}),m=useSelector(function(e){return e.flows.isSearchingLoading}),f=useSelector(function(e){return e.flows.filteredTemplates})||[],x=useSelector(function(e){return e.flows.searchedTemplates})||[];return jsxRuntimeExports.jsxs(Toolbar$1,{className:"".concat(l.toolbar," ").concat(p?l.searchResultLength:""),id:"flow-center-toolbar-id",children:[jsxRuntimeExports.jsxs(Typography,{className:l.title,children:[p?jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.eHPGww",defaultMessage:"Search Results",description:"flow-center-header-title"}):jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.vYqggl",defaultMessage:"{defaultMessage}",description:"flow-center-header-title",values:{defaultMessage:null==t?void 0:t.text}}),(()=>{if(p)return jsxRuntimeExports.jsx("div",{children:m?jsxRuntimeExports.jsx(Skeleton,{variant:"rectangular",animation:"wave",width:40,height:18,sx:{marginLeft:"10px"}}):jsxRuntimeExports.jsx(Typography,{"data-test":"flow-center-toolbar-searchResultsLength",className:l.flowsLength,children:c.length+x.length+u.length})});switch(null==t?void 0:t.key){case ENGINE_OWNER_TYPES.MINE:return jsxRuntimeExports.jsx("div",{children:d?jsxRuntimeExports.jsx(Skeleton,{variant:"rectangular",animation:"wave",width:40,height:18,sx:{marginLeft:"10px"}}):jsxRuntimeExports.jsx(Typography,{"data-test":"flow-center-toolbar-flowLength",className:l.flowsLength,children:c.length})});case ENGINE_OWNER_TYPES.TEMPLATES:return jsxRuntimeExports.jsx(Typography,{"data-test":"flow-center-toolbar-filteredTemplatesLength",className:l.flowsLength,children:f.length});case ENGINE_OWNER_TYPES.NOTEBOOKS:return jsxRuntimeExports.jsx(Typography,{"data-test":"flow-center-toolbar-flowLength",className:l.flowsLength,children:u.length});default:return jsxRuntimeExports.jsx("div",{})}})()]}),jsxRuntimeExports.jsx("div",{className:l.grow}),(null==t?void 0:t.key)===ENGINE_OWNER_TYPES.TEMPLATES&&jsxRuntimeExports.jsx(FiltersControl,{setShowNavigation:r,showNavigation:n}),(null==t?void 0:t.key)===ENGINE_OWNER_TYPES.CONTAINERS&&i&&jsxRuntimeExports.jsx(ReloadControl,{onReload:i,loading:e}),s!==ENGINE_OWNER_TYPES.CONTAINERS&&(0!==c.length||s===ENGINE_OWNER_TYPES.TEMPLATES)&&jsxRuntimeExports.jsx(MoreInfControl,{setOpenFlowDetails:o,openFlowDetails:a})]})}var useStyles$7=makeStyles()(function(e){return{title:{alignSelf:"center",flexBasis:"200px!important",fontFamily:"Dosis!important",fontStyle:"normal!important",fontWeight:"600!important",fontSize:"18px!important",lineHeight:"23px!important",letterSpacing:"0.25px!important",textTransform:"uppercase!important",color:"#5C6269!important"}}});function HeaderBarTitle(e){var t=useStyles$7().classes;return jsxRuntimeExports.jsx(Typography,{"data-test":"flow-center-headerbar-title",className:t.title,noWrap:!0,id:"flow-center-headerbar-title",children:e.title})}function _array_like_to_array$4(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function _array_with_holes$4(e){if(Array.isArray(e))return e}function _iterable_to_array_limit$4(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,a=[],s=!0,i=!1;try{for(r=r.call(e);!(s=(n=r.next()).done)&&(a.push(n.value),!t||a.length!==t);s=!0);}catch(e){i=!0,o=e}finally{try{s||null==r.return||r.return()}finally{if(i)throw o}}return a}}function _non_iterable_rest$4(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _sliced_to_array$4(e,t){return _array_with_holes$4(e)||_iterable_to_array_limit$4(e,t)||_unsupported_iterable_to_array$4(e,t)||_non_iterable_rest$4()}function _unsupported_iterable_to_array$4(e,t){var r;if(e)return"string"==typeof e?_array_like_to_array$4(e,t):"Map"===(r="Object"===(r=Object.prototype.toString.call(e).slice(8,-1))&&e.constructor?e.constructor.name:r)||"Set"===r?Array.from(r):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?_array_like_to_array$4(e,t):void 0}var useStyles$6=makeStyles()(function(e){return{root:{},container:{width:"570px",background:"#fff",borderRadius:"50px"},searchInputContainer:{width:"100%",borderRadius:"50px",display:"flex",alignItems:"center",padding:"7px"},searchInputContainerDefault:{backgroundColor:"#fff",border:"0.5px solid #D5DFE9"},searchInputContainerHover:{border:"0.5px solid #A8B2BC","& input::placeholder":{opacity:"1!important",color:"#2A323C!important"}},searchInputContainerActive:{border:"0.5px solid #0D62D2"},input:{},searchInput:{border:"0",outline:"none",background:"transparent !important",width:"100%",fontSize:"15px","&::placeholder":{opacity:"0.4"},"&:-webkit-autofill":{WebkitBoxShadow:"0 0 0 100px #FFF inset"}},searchIconContainer:{padding:"0px 7px",display:"flex",alignItems:"center",justifyContent:"center"},closeIcon:{fill:"#555F7C!important",cursor:"pointer!important",width:e.spacing(2)+"px!important",height:e.spacing(2)+"px!important"},grow:{flexGrow:1},setDisplay:{display:"none"}}});function HeaderBarSearchBar(r){function e(e){var t=""!==e.target.value;n(toggleIsSearching(t)),n(toggleIsSearchingLoading(!0)),n(fetchFlows({name:e.target.value,ownerType:ENGINE_OWNER_TYPES.MINE})),r.enableNotebooks&&n(fetchNotebooks({name:e.target.value,ownerType:ENGINE_OWNER_TYPES.NOTEBOOKS})),n(setSearched(e.target.value))}var t=useStyles$6().classes,n=useDispatch(),o=_sliced_to_array$4(reactExports.useState(!1),2),a=o[0],s=o[1],o=_sliced_to_array$4(reactExports.useState(!1),2),i=o[0],l=o[1],o=useSelector(function(e){return e.flows.searched}),c=useSelector(preferredLanguageSelector)||"en",c=AIWareFormatMessage(c);return r.showSearchBar?jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx("div",{id:"flow-center-headerbar-searchbar-id",className:t.container,onMouseEnter:function(){return s(!0)},onMouseLeave:function(){s(!1)},children:jsxRuntimeExports.jsxs("div",{className:"".concat(t.searchInputContainer," ").concat(a||i?a&&!i?t.searchInputContainerHover:i?t.searchInputContainerActive:void 0:t.searchInputContainerDefault),children:[jsxRuntimeExports.jsx("div",{className:t.searchIconContainer,children:jsxRuntimeExports.jsx(Search,{fontSize:"small",sx:{color:a||i?"#555F7C":"#555F7C99"}})}),jsxRuntimeExports.jsx("input",{id:"flow-center-headerbar-searchbar","data-test":"flow-center-headerbar-searchbar",value:o,onFocus:function(){return l(!0)},onBlur:function(){return l(!1)},placeholder:c({id:"os-flow-center.searchflowcenter1",defaultMessage:"Search the flow center",description:"Placeholder for search flow center search box."}),className:t.searchInput,onChange:e}),o&&jsxRuntimeExports.jsx(Close$1,{fontSize:"small",sx:{color:a||i?"#555F7C":"#555F7C99"},onClick:function(){n(toggleIsSearching(!1)),n(toggleIsSearchingLoading(!1)),n(setSearched("")),n(setSearchedTemplates(null)),n(fetchFlows({name:"",ownerType:ENGINE_OWNER_TYPES.MINE}))}})]})}),jsxRuntimeExports.jsx("div",{className:t.grow}),jsxRuntimeExports.jsx("div",{})]}):jsxRuntimeExports.jsx("div",{})}var useStyles$5=makeStyles()(function(e){return{buttonFlowCenter:{margin:e.spacing(1)+"px!important",textTransform:"none!important",justifyContent:"start!important",borderRadius:e.shape.borderRadius,fontFamily:"Nunito",fontStyle:"normal!important",fontWeight:600,fontSize:"14px!important",lineHeight:"19px!important",letterSpacing:"-1.30385e-09px!important","&&":{borderTopRightRadius:0,borderBottomRightRadius:0}},buttonFlowCenterAdvanceDisabled:{margin:e.spacing(1)+"px!important",textTransform:"none!important",justifyContent:"start!important",borderRadius:e.shape.borderRadius,fontFamily:"Nunito",fontStyle:"normal!important",fontWeight:600,fontSize:"14px!important",lineHeight:"19px!important",letterSpacing:"-1.30385e-09px!important"},buttonAddNew:{background:"#0D62D2!important",color:e.palette.background.paper},marginRight:{marginRight:"".concat(e.spacing(0),"!important"),padding:"".concat(e.spacing(1.6)," ").concat(e.spacing(2.8)," !important"),marginLeft:"8px!important"},btnWidth:{width:"134px!important",marginTop:"18px!important",display:"flex!important",justifyContent:"center!important"},btnWidthAdvanceDisabled:{width:"171px!important",marginTop:"18px!important",display:"flex!important",justifyContent:"center!important"},backdrop:{zIndex:e.zIndex.drawer+1,color:"#fff"},flowIconAdd:{fill:"#fff"},flowIconAddAdvanced:{fill:"#fff",minWidth:"20px!important",maxHeight:"20px!important"},loadingBarcontainer:{width:"20px!important",height:"20px!important",display:"flex",justifyContent:"center",color:"#00000042"},disabledButton:{background:"#efefef4d!important",color:"#00000042"},fullWidth:{width:"100%"},paddingDiv:{paddingTop:"20px"},buttonDiv:{display:"flex"},iconButton:{margin:e.spacing(1)+"px!important",textTransform:"none!important",justifyContent:"center!important",borderRadius:e.shape.borderRadius,fontFamily:"Nunito",fontStyle:"normal!important",fontWeight:600,fontSize:"14px!important",lineHeight:"19px!important",letterSpacing:"-1.30385e-09px!important",background:"#0D62D2!important",color:e.palette.background.paper,minWidth:"14px!important",maxWidth:"34px!important","&&":{borderTopLeftRadius:0,borderBottomLeftRadius:0}},iconButtonDisabled:{margin:e.spacing(1)+"px!important",textTransform:"none!important",justifyContent:"center!important",borderRadius:e.shape.borderRadius,fontFamily:"Nunito",fontStyle:"normal!important",fontWeight:600,fontSize:"14px!important",lineHeight:"19px!important",letterSpacing:"-1.30385e-09px!important",background:"#efefef4d!important",color:"#00000042",minWidth:"14px!important",maxWidth:"34px!important","&&":{borderTopLeftRadius:0,borderBottomLeftRadius:0}},iconButtonFullScreen:{marginRight:"24px!important",background:"#0D62D2!important",color:e.palette.background.paper,minWidth:"14px!important",maxWidth:"37px!important",marginTop:"18px!important",justifyContent:"center!important","&&":{borderTopLeftRadius:0,borderBottomLeftRadius:0}},iconButtonFullScreenDisabled:{marginRight:"24px!important",background:"#efefef4d!important",color:"#00000042",minWidth:"14px!important",maxWidth:"37px!important",marginTop:"18px!important",justifyContent:"center!important","&&":{borderTopLeftRadius:0,borderBottomLeftRadius:0}},flowName:{width:"449px"}}});function HeaderBarButtons(e){var t=useStyles$5().classes,r=useSelector(function(e){return e.flows.isLoadingCreateNewFlow});return jsxRuntimeExports.jsxs("div",{className:t.buttonDiv,children:["notebooks"!==e.screen&&jsxRuntimeExports.jsx(Button,{"data-test":"flow-center-header-onCreateNewFlowButton",id:"flow-center-header-onCreateNewFlowButton",variant:"outlined",disabled:r,startIcon:r?jsxRuntimeExports.jsx(CircularProgress,{className:t.loadingBarcontainer}):jsxRuntimeExports.jsx(default_1$e,{className:t.flowIconAdd}),className:"".concat(t.buttonFlowCenterAdvanceDisabled," ").concat(t.buttonAddNew,"\n ").concat(r?t.disabledButton:"","\n ").concat(e.showAdditionalOptionButton?t.marginRight:""," ").concat(e.automateFullScreen?t.btnWidthAdvanceDisabled:""),onClick:function(){return e.handleOpenFlowNameDialog("",!1)},children:SHARED_MESSAGES.newFlow()}),e.enableNotebooks&&"notebooks"===e.screen&&jsxRuntimeExports.jsx(Button,{"data-test":"flow-center-header-onCreateNewFlowButton",id:"flow-center-header-onCreateNewFlowButton",variant:"outlined",disabled:r,startIcon:r?jsxRuntimeExports.jsx(CircularProgress,{className:t.loadingBarcontainer}):jsxRuntimeExports.jsx(default_1$e,{className:t.flowIconAdd}),className:"".concat(t.buttonFlowCenterAdvanceDisabled," ").concat(t.buttonAddNew,"\n ").concat(r?t.disabledButton:"","\n ").concat(e.showAdditionalOptionButton?t.marginRight:""," ").concat(e.automateFullScreen?t.btnWidthAdvanceDisabled:""),onClick:function(){return e.handleOpenFlowNameDialog("",!0)},children:SHARED_MESSAGES.newNotebook()})]})}var useStyles$4=makeStyles()(function(e){return{additionalOptionsContainer:{borderLeft:"0.5px solid #D9E2EB!important",paddingLeft:e.spacing(1.6)+"px!important"},additionalOptBtn:{padding:e.spacing(1.6)+"px!important"}}});function HeaderBarControlButtons(e){var t=useStyles$4().classes;return e.showAdditionalOptionButton?jsxRuntimeExports.jsxs("div",{className:t.additionalOptionsContainer,children:[e.showFullScreenButton&&jsxRuntimeExports.jsx(Tooltip,{title:e.fullScreen?SHARED_MESSAGES.exitFullScreen():SHARED_MESSAGES.enterFullScreen(),children:jsxRuntimeExports.jsx(IconButton,{className:t.additionalOptBtn,"data-test":"flow-center-action-btn-toggleFullScreen",onClick:function(){e.setFullScreen(!e.fullScreen)},size:"large",children:jsxRuntimeExports.jsx("img",{src:e.fullScreen?img$y:img$A,alt:"fullscreen-icon",draggable:"false"})})}),e.showCollapseButton&&jsxRuntimeExports.jsx(Tooltip,{title:SHARED_MESSAGES.closePanel(),children:jsxRuntimeExports.jsx(IconButton,{"data-test":"flow-center-action-btn-closePanel",className:t.additionalOptBtn,onClick:function(){e.hidePanel&&e.hidePanel()},size:"large",children:jsxRuntimeExports.jsx("img",{src:img$1e,alt:"collapseicon",draggable:"false"})})})]}):jsxRuntimeExports.jsx("div",{})}function _array_like_to_array$3(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function _array_with_holes$3(e){if(Array.isArray(e))return e}function _iterable_to_array_limit$3(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,a=[],s=!0,i=!1;try{for(r=r.call(e);!(s=(n=r.next()).done)&&(a.push(n.value),!t||a.length!==t);s=!0);}catch(e){i=!0,o=e}finally{try{s||null==r.return||r.return()}finally{if(i)throw o}}return a}}function _non_iterable_rest$3(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _sliced_to_array$3(e,t){return _array_with_holes$3(e)||_iterable_to_array_limit$3(e,t)||_unsupported_iterable_to_array$3(e,t)||_non_iterable_rest$3()}function _unsupported_iterable_to_array$3(e,t){var r;if(e)return"string"==typeof e?_array_like_to_array$3(e,t):"Map"===(r="Object"===(r=Object.prototype.toString.call(e).slice(8,-1))&&e.constructor?e.constructor.name:r)||"Set"===r?Array.from(r):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?_array_like_to_array$3(e,t):void 0}var useStyles$3=makeStyles()(function(e){return{root:{backgroundColor:"#FAFAFA",paddingRight:14,display:"flex!important",alignItems:"center!important",paddingLeft:24},headerbarContainer:{position:"fixed!important",width:"inherit!important",zIndex:"99!important","& header":{boxShadow:"none!important"}},headerbarContainerBorder:{borderBottom:"1px solid rgba(0, 0, 0, 0.12)!important"},fullScreenState:{zIndex:"1!important","& header":{boxShadow:"none!important"}},header:{padding:"0px!important"}}});function Headerbar(e){var t=e.options,r=e.handleOpenFlowNameDialog,n=e.collapseFlowCenter,o=e.setFullScreen,a=e.setScreen,s=e.fullScreen,i=e.hidePanel,l=e.zIndex,c=e.automateFullScreen,u=e.enableNotebooks,e=e.screen,p=useStyles$3().classes,d=_sliced_to_array$3(reactExports.useState(!1),2),m=d[0],d=d[1];return jsxRuntimeExports.jsx("div",{className:"".concat(p.headerbarContainer," ").concat(c?m?null:p.fullScreenState:p.headerbarContainerBorder),id:"flow-center-headerbar-container","data-test":"flow-center-headerbar-container",children:c?jsxRuntimeExports.jsxs(reactExports.Fragment,{children:[jsxRuntimeExports.jsx(HeaderBarSearchBar,{showSearchBar:t.showSearchBar,isFullScreen:s,setScreen:a,automateFullScreen:c,enableNotebooks:u}),jsxRuntimeExports.jsx(HeaderBarButtons,{showAdditionalOptionButton:t.showAdditionalOptionButton,showCreateNewFlow:t.showCreateNewFlow,showNewFromTemplate:t.showNewFromTemplate,isFullScreen:s,handleOpenFlowNameDialog:r,zIndex:l,automateFullScreen:c,openClusterDialog:m,setOpenClusterDialog:d,enableNotebooks:u,screen:e})]}):jsxRuntimeExports.jsx(AppBar,{position:"static",color:"transparent",className:p.header,children:jsxRuntimeExports.jsxs(Toolbar$1,{className:p.root,children:[jsxRuntimeExports.jsx(HeaderBarTitle,{title:t.title}),jsxRuntimeExports.jsx(HeaderBarSearchBar,{showSearchBar:t.showSearchBar,setScreen:a,automateFullScreen:c,enableNotebooks:u}),jsxRuntimeExports.jsx(HeaderBarButtons,{showAdditionalOptionButton:t.showAdditionalOptionButton,showCreateNewFlow:t.showCreateNewFlow,showNewFromTemplate:t.showNewFromTemplate,handleOpenFlowNameDialog:r,zIndex:l,automateFullScreen:c,openClusterDialog:m,setOpenClusterDialog:d,enableNotebooks:u,screen:e}),jsxRuntimeExports.jsx(HeaderBarControlButtons,{showAdditionalOptionButton:t.showAdditionalOptionButton,showFullScreenButton:t.showFullScreenButton,showCollapseButton:t.showCollapseButton,collapseFlowCenter:n,setFullScreen:o,fullScreen:s,hidePanel:i})]})})})}var DEFAULT_FILTERS_FOR_TAB_TEMPLATES=[ENGINE_FILTER_TYPES.TAGS,ENGINE_FILTER_TYPES.CATEGORIES,"author",ENGINE_FILTER_TYPES.PUBLIC],DEFAULT_FILTERS_FOR_TAB_MY_FLOWS=[],DEFAULT_TABS=[ENGINE_OWNER_TYPES.MINE,ENGINE_OWNER_TYPES.TEMPLATES,ENGINE_OWNER_TYPES.CONTAINERS],BETA_TABS=[ENGINE_OWNER_TYPES.NOTEBOOKS],DEFAULT_FILTERS=[ENGINE_FILTER_TYPES.TAGS],ALL_TABS=[{key:ENGINE_OWNER_TYPES.ORGANIZATION,text:jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.organizationcategory",defaultMessage:"My Organization",description:"My Organization Category"}),icon:default_1$9},{key:ENGINE_OWNER_TYPES.MINE,text:jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.orgflows",defaultMessage:"Org Flows",description:"Org Flows Category"}),icon:default_1$7},{key:ENGINE_OWNER_TYPES.SHARED,text:jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.sharedwmecategory",defaultMessage:"Shared w/ me",description:"Shared with me Category"}),icon:default_1$8},{key:ENGINE_OWNER_TYPES.TEMPLATES,text:jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.templatescategory",defaultMessage:"Templates",description:"Templates Category"}),icon:default_1$6},{key:ENGINE_OWNER_TYPES.CONTAINERS,text:jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.containerscategory",defaultMessage:"Container Dashboard",description:"Automate Container Dashboard"}),icon:default_1},{key:ENGINE_OWNER_TYPES.NOTEBOOKS,text:jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.notebookscategory",defaultMessage:"Notebooks",description:"Noteboks Category"}),icon:default_1$7}],ALL_FILTERS=[{group:ENGINE_FILTER_TYPES.CERTIFIED,text:jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.certified",defaultMessage:"Certified",description:"Flow Center Certified Filter"}),options:[{text:jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.veritonecertified.filter",defaultMessage:"Veritone Certified",description:"Veritone Certified Filter"}),value:"veritone_certified"},{text:jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.verified",defaultMessage:"Verified Publisher",description:"Verified Publisher filter"}),value:"verified_publisher"}]},{group:ENGINE_FILTER_TYPES.CATEGORIES,text:jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.categories",defaultMessage:"Categories",description:"Flow Center filter Categories"}),options:[]},{group:ENGINE_FILTER_TYPES.INDUSTRIES,text:jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.industries",defaultMessage:"Industries",description:"Flow Center filter Industries"}),options:[{text:jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.hitech",defaultMessage:"Hi Tech",description:"Flow Center filter option value Hi Tech"}),value:"Hi Tech"},{text:jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.medicine",defaultMessage:"Medicine",description:"Flow Center filter option value Medicine"}),value:"Medicine"},{text:jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.law",defaultMessage:"Law",description:"Flow Center filter option value Law"}),value:"Law"},{text:jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.government",defaultMessage:"Government",description:"Flow Center filter option value Government"}),value:"Government"}]},{group:ENGINE_FILTER_TYPES.APPLICATIONS,text:jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.applications",defaultMessage:"Applications",description:"Flow Center filter Applications"}),options:[{text:jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.testapp",defaultMessage:"Test",description:"Flow Center filter option value Test"}),value:"Test"},{text:jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.speach",defaultMessage:"Speach",description:"Flow Center filter option value Speach"}),value:"Speach"},{text:jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.videoprocessing",defaultMessage:"Video processing",description:"Flow Center filter option value Video Processing"}),value:"Video processing"},{text:jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.smssender",defaultMessage:"Sms sender",description:"Flow Center filter option value Sms sender"}),value:"Sms sender"}]},{group:ENGINE_FILTER_TYPES.CLASSES,text:jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.classes",defaultMessage:"Classes",description:"Flow Center filter Classes"}),options:[{text:jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.networkisolated",defaultMessage:"Network isolated",description:"Flow Center filter option value Network Isolated"}),value:"Network isolated"},{text:jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.publicaccess",defaultMessage:"Public Access",description:"Flow Center filter option value Public Access"}),value:"Public Access"}]},{group:ENGINE_FILTER_TYPES.NOTEWORTHY,text:jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.noteworthy",defaultMessage:"Noteworthy",description:"Flow Center filter Noteworthy"}),options:[]},{group:ENGINE_FILTER_TYPES.TAGS,text:jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.tags",defaultMessage:"Tags",description:"Flow Center filter Tags"}),options:[]},{group:"author",text:jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.developer",defaultMessage:"Developer",description:"Flow Center filter Developer"}),options:[]},{group:ENGINE_FILTER_TYPES.PRICE,text:jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.price",defaultMessage:"Price",description:"Flow Center filter Price"}),options:[{text:jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.under25",defaultMessage:"Under $25",description:"Flow Center filter option value Under $25"}),value:"Under $25"},{text:jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.25to50",defaultMessage:"$25 to $50",description:"Flow Center filter option value $25 to $50"}),value:"$25 to $50"},{text:jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.50to100",defaultMessage:"$50 to $100",description:"Flow Center filter option value $50 to $100"}),value:"$50 to $100"},{text:jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.100to200",defaultMessage:"$100 to $200",description:"Flow Center filter option value $100 to $200"}),value:"$100 to $200"}]},{group:ENGINE_FILTER_TYPES.PUBLIC,text:jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.tags",defaultMessage:"Type",description:"Flow Center filter Is Public"}),options:[{text:jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.is_public",defaultMessage:"Is Public",description:"Flow Center filter is public option value"}),value:"1"}]}],DEFAULT_GRAPHQL_ENDPOINT="v3/graphql",DEFAULT_CLUSTER="prd5-21xbyq0x-4h0s-o685-snas-oovhdai552v9",useStyles$2=makeStyles()(function(e){return{container:{minHeight:"calc(100vh - 64px - 64px - 54px)"},contentContainer:{justifyContent:"center",alignItems:"center",display:"flex",flexDirection:"column"},textContainer:{marginTop:26,display:"flex",flexDirection:"column",alignItems:"center"},title:{fontFamily:"Nunito",fontStyle:"normal!important",fontWeight:"normal!important",fontSize:"18px!important",lineHeight:"24px!important",letterSpacing:"-1.30385e-09px!important",color:"#1B1D1F!important"},subtitle:{marginTop:12,fontFamily:"Nunito",fontStyle:"normal!important",fontWeight:600,fontSize:"16px!important",lineHeight:"22px!important",letterSpacing:"-1.30385e-09px!important",color:"#5C6269!important",textAlign:"center"},buttonContainer:{marginTop:30,display:"flex",width:"100%",justifyContent:"space-evenly"},icon:{width:235,height:235},commonBtn:{fontFamily:"Nunito",fontStyle:"normal!important",fontWeight:600,fontSize:"14px!important",lineHeight:"20px!important",letterSpacing:"-1.30385e-09px!important",textTransform:"none",boxSizing:"border-box",borderRadius:"4px",paddingLeft:10,paddingRight:10,"&:hover":{background:"none",backgroundColor:"none"},background:"#FFFFFF",border:"1px solid #1871E8",color:"#1871E8!important"}}});function NoFlowsFound(e){var t=useStyles$2().classes;return jsxRuntimeExports.jsx(Grid,{container:!0,spacing:0,direction:"column",alignItems:"center",justifyContent:"center",className:t.container,children:jsxRuntimeExports.jsxs(Grid,{item:!0,xs:4,className:t.contentContainer,children:[jsxRuntimeExports.jsx("img",{className:t.icon,src:img$r,alt:"noFlowsFoundIcon"}),jsxRuntimeExports.jsxs("div",{className:t.textContainer,children:[jsxRuntimeExports.jsx(Typography,{className:t.title,children:SHARED_MESSAGES.noFlowsFound()}),jsxRuntimeExports.jsx(Typography,{className:t.subtitle,children:SHARED_MESSAGES.noFlowsFoundSubtitle()}),jsxRuntimeExports.jsxs(Box,{className:t.buttonContainer,children:[jsxRuntimeExports.jsx(Button,{className:t.commonBtn,onClick:function(){return e.handleOpenFlowNameDialog("")},children:SHARED_MESSAGES.createNewFlow()}),jsxRuntimeExports.jsx(Button,{className:t.commonBtn,onClick:function(){e.setScreen(ENGINE_OWNER_TYPES.TEMPLATES)},children:SHARED_MESSAGES.chooseATemplate()})]})]})]})})}var useStyles$1=makeStyles()(function(){return{tabsContainer:{paddingLeft:"18px",borderBottom:"0.5px solid #D5DFE9","& div > span:last-child":{backgroundColor:"black"}},tab:{fontFamily:"Nunito!important",fontWeight:400,fontStyle:"normal !important",fontSize:14,lineHeight:"18px",color:"#2A323C",textTransform:"none"}}});function TabsContainer(e){var t=useStyles$1().classes,r=e.selectedTab,n=e.handleChange,o=useSelector(function(e){return e.flows.flows}),a=useSelector(function(e){return e.flows.notebooks}),s=useSelector(function(e){return e.flows.filteredTemplates})||[],i=useSelector(function(e){return e.flows.searchedTemplates})||[],l=useSelector(function(e){return e.flows.isSearching});return jsxRuntimeExports.jsx(AppBar,{className:t.tabsContainer,position:"static",color:"transparent",elevation:0,children:jsxRuntimeExports.jsxs(Tabs,{value:r,onChange:n,"aria-label":"search-results-tabs",children:[jsxRuntimeExports.jsx(Tab,{id:"flow-center-searchResults-flows","data-test":"flow-center-searchResults-flows",className:t.tab,label:SHARED_MESSAGES.flowsCount(o.length)}),jsxRuntimeExports.jsx(Tab,{id:"flow-center-searchResults-templates","data-test":"flow-center-searchResults-templates",className:t.tab,label:SHARED_MESSAGES.templatesCount((l?i:s).length)}),e.notebookEnabled&&jsxRuntimeExports.jsx(Tab,{id:"flow-center-searchResults-notebooks","data-test":"flow-center-searchResults-notebooks",className:t.tab,label:SHARED_MESSAGES.notebookCount(a.length)})]})})}var getContentHeight=function(){var e=useSelector(function(e){return e.flows.config.isFullScreen});return useSelector(function(e){return e.flows.config.automateFullScreen})?"calc(100vh - 64px - 54px)":"calc(100vh - 64px - 64px - ".concat(e?"0px":"62px",")")},getFlowCenterConfig=function(){return{isFullScreen:useSelector(function(e){return e.flows.config.isFullScreen}),automateFullScreen:useSelector(function(e){return e.flows.config.automateFullScreen}),zIndex:useSelector(function(e){return e.flows.config.zIndex}),graphQLEndpoint:useSelector(function(e){return e.flows.config.graphQLEndpoint}),defaultCluster:useSelector(function(e){return e.flows.config.defaultCluster})}};function ResultsContainer(r){function e(){var e=0<arguments.length&&void 0!==arguments[0]&&arguments[0];return(""==n?function(){return jsxRuntimeExports.jsx(FlowList,{createFlowTemplate:r.createFlowTemplate,simpleMode:r.simpleMode,selectedFlowId:n,onSelectFlow:r.onSelectFlow,setFirstFlowId:r.setFirstFlowId,screenName:r.screenName,zIndex:l.zIndex,showTitle:!1,setOpenFlowDetails:r.setOpenFlowDetails,setOpenAlwaysUpFlow:r.setOpenAlwaysUpFlow,notebooks:0<arguments.length&&void 0!==arguments[0]&&arguments[0],betaFeatures:r.betaFeatures})}:function(){return jsxRuntimeExports.jsxs("div",{className:o.enginesAndFlowWidgetContainer,children:[jsxRuntimeExports.jsx("div",{className:o.enginesContainer,children:jsxRuntimeExports.jsx(FlowList,{createFlowTemplate:r.createFlowTemplate,simpleMode:""!==n,selectedFlowId:n,setFirstFlowId:function(e){a&&r.setSelectedFlowId(e)},onSelectFlow:function(e){r.scrollContainerToTop(),r.setSelectedFlowId(e),r.setAllowSetFirstFlowId(!1)},screenName:r.screenName,zIndex:l.zIndex,setOpenAlwaysUpFlow:function(e,t){r.scrollContainerToTop(),r.setOpenFlowRunningInstances(!1),r.setOpenFlowDetails(!1),t&&r.setSelectedFlowId(t),r.setOpenAlwaysUpFlow(e)},setOpenFlowDetails:function(e){r.setOpenFlowDetails(e)},notebooks:0<arguments.length&&void 0!==arguments[0]&&arguments[0],betaFeatures:r.betaFeatures})}),jsxRuntimeExports.jsx("div",{className:o.flowWidgetContainer,children:jsxRuntimeExports.jsx("div",{className:o.flowWidgetContainer,children:jsxRuntimeExports.jsx(App$1,{engineId:n,openFlowRunningInstances:r.openFlowRunningInstances,openAlwaysUpFlow:r.openAlwaysUpFlow,locale:i,openTab:r.openTabFlowWidget,config:{apiRoot:u,graphQLEndpoint:c,controllerUrl:d,defaultCluster:l.defaultCluster,controllerNodeRedImage:p,controllerFlowPath:s},tabs:[IFlowWidgetTabs.Overview,IFlowWidgetTabs.Versions,IFlowWidgetTabs.Activity,IFlowWidgetTabs.DistributionSettings],activityTabs:[IFlowWidgetActivityTabs.Jobs,IFlowWidgetActivityTabs.ScheduledJobs],onExitClicked:function(){r.setSelectedFlowId(""),r.setOpenFlowRunningInstances(!1),r.setOpenAlwaysUpFlow(!1),r.setOpenFlowDetails(!1)},onDeleteFlow:function(){setTimeout(function(){r.setUpdateFlowList(n),r.setSelectedFlowId(""),r.setUpdateFlowList("")},2e3)}})})})]})})(e)}var t=r.selectedTab,n=r.selectedFlowId,o=r.classes,a=r.allowSetFirstFlowId,s=r.controllerFlowPath,i=useSelector(preferredLanguageSelector)||"en",l=getFlowCenterConfig(),c=useSelector(graphEndpointSelector),u=useSelector(rootApiSelector),p=useSelector(controllerNodeRedImageSelector),d=useSelector(controllerUrlSelector);return jsxRuntimeExports.jsx(Box,{ml:3,children:0===t?e():1===t?jsxRuntimeExports.jsx(TemplateList,{handleOpenFlowNameDialog:r.handleOpenFlowNameDialog,openFirstTemplate:r.openFirstTemplate,isDeselectedTemplate:r.isDeselectedTemplate,onSelectedTemplate:r.onSelectedTemplate}):e(!0)})}function _array_like_to_array$2(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function _array_with_holes$2(e){if(Array.isArray(e))return e}function _iterable_to_array_limit$2(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,a=[],s=!0,i=!1;try{for(r=r.call(e);!(s=(n=r.next()).done)&&(a.push(n.value),!t||a.length!==t);s=!0);}catch(e){i=!0,o=e}finally{try{s||null==r.return||r.return()}finally{if(i)throw o}}return a}}function _non_iterable_rest$2(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _sliced_to_array$2(e,t){return _array_with_holes$2(e)||_iterable_to_array_limit$2(e,t)||_unsupported_iterable_to_array$2(e,t)||_non_iterable_rest$2()}function _unsupported_iterable_to_array$2(e,t){var r;if(e)return"string"==typeof e?_array_like_to_array$2(e,t):"Map"===(r="Object"===(r=Object.prototype.toString.call(e).slice(8,-1))&&e.constructor?e.constructor.name:r)||"Set"===r?Array.from(r):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?_array_like_to_array$2(e,t):void 0}var useStyles=makeStyles()(function(e){return{container:{width:"100%",overflowY:"auto"},tabsContainer:{paddingLeft:18,borderBottom:"0.5px solid #D5DFE9","& div > span:last-child":{backgroundColor:"black"}}}});function SearchResultsPage(e){var t=useStyles().classes,r=useDispatch(),n=useSelector(function(e){return e.flows.searched}),o=useSelector(function(e){return e.flows.isSearchingLoading}),a=useSelector(function(e){return e.flows.searchedTemplates||[]}),s=useSelector(function(e){return e.flows.filteredTemplates})||[],i=useSelector(function(e){return e.flows.flows}),l=_sliced_to_array$2(reactExports.useState(0),2),c=l[0],u=l[1],l=(reactExports.useEffect(function(){var t,e;return s&&0!==s.length&&(t=new RegExp(n,"gi"),e=s.filter(function(e){return t.lastIndex=0,t.test(e.title)}),r(setSearchedTemplates(e))),function(){r(setSearchedTemplates(null))}},[s,n]),function(e,t){u(t)}),p=getContentHeight();return o?jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsx(Skeleton,{variant:"rectangular",className:e.classes.lineItem}),jsxRuntimeExports.jsx(Skeleton,{variant:"rectangular",className:e.classes.lineItem}),jsxRuntimeExports.jsx(Skeleton,{variant:"rectangular",className:e.classes.lineItem})]}):!!a.length||!!i.length?jsxRuntimeExports.jsxs("div",{className:t.container,style:{height:p},children:[jsxRuntimeExports.jsx(TabsContainer,{selectedTab:c,handleChange:l,notebookEnabled:e.betaFeatures}),jsxRuntimeExports.jsx(ResultsContainer,{createFlowTemplate:e.createFlowTemplate,selectedTab:c,openFlowRunningInstances:e.openFlowRunningInstances,simpleMode:e.simpleMode,selectedFlowId:e.selectedFlowId,onSelectFlow:e.onSelectFlow,setFirstFlowId:e.setFirstFlowId,screenName:e.screenName,handleOpenFlowNameDialog:e.handleOpenFlowNameDialog,openFirstTemplate:e.openFirstTemplate,isDeselectedTemplate:e.isDeselectedTemplate,onSelectedTemplate:e.onSelectedTemplate,classes:e.classes,allowSetFirstFlowId:e.allowSetFirstFlowId,setSelectedFlowId:e.setSelectedFlowId,setOpenFlowRunningInstances:e.setOpenFlowRunningInstances,setOpenFlowDetails:e.setOpenFlowDetails,scrollContainerToTop:e.scrollContainerToTop,setAllowSetFirstFlowId:e.setAllowSetFirstFlowId,openTabFlowWidget:e.openTabFlowWidget,setUpdateFlowList:e.setUpdateFlowList,controllerFlowPath:e.controllerFlowPath,openAlwaysUpFlow:e.openAlwaysUpFlow,setOpenAlwaysUpFlow:e.setOpenAlwaysUpFlow,betaFeatures:e.betaFeatures})]}):jsxRuntimeExports.jsx(NoResults,{})}var createUniqueEngineMutation$1="mutation($name: String!, $templateId: ID!) {\n createFlow(input: { name: $name, templateId: $templateId} ) {\n id\n builds{\n records {\n id\n engineId\n name\n createdDateTime\n manifest\n runtime\n }\n }\n }\n}\n",createNotebookMutation="mutation($name: String!, $templateId: ID!) {\n createNotebook(input: { name: $name, templateId: $templateId} ) {\n id\n builds{\n records {\n id\n engineId\n name\n createdDateTime\n manifest\n runtime\n }\n }\n }\n}\n",createAutomateFlowMutation$1="mutation($name: String!, $templateId: ID!) {\n createAutomateFlow(input: { name: $name, templateId: $templateId} ) {\n engineId\n build {\n id\n engineId\n name\n createdDateTime\n manifest\n runtime\n }\n }\n}\n",getFlow$1="query getFlow($flowId: ID!) {\n engine(id: $flowId) {\n name\n state\n modifiedDateTime\n createdDateTime\n id\n manifest\n ownerOrganization{\n id\n name\n }\n builds {\n records {\n id\n version\n }\n }\n }\n} ",copyFlowMutation$1="\nmutation copyFlow($flowRevisionId: ID, $flowId: ID, $name: String){\n copyFlow(input: { \n flowId: $flowId,\n flowRevisionId:$flowRevisionId,\n name: $name,\n }) {\n id\n }\n}";function asyncGeneratorStep$2(e,t,r,n,o,a,s){try{var i=e[a](s),l=i.value}catch(e){return void r(e)}i.done?t(l):Promise.resolve(l).then(n,o)}function _async_to_generator$2(i){return function(){var e=this,s=arguments;return new Promise(function(t,r){var n=i.apply(e,s);function o(e){asyncGeneratorStep$2(n,t,r,o,a,"next",e)}function a(e){asyncGeneratorStep$2(n,t,r,o,a,"throw",e)}o(void 0)})}}function _define_property$2(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _object_spread$2(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{},n=Object.keys(r);(n="function"==typeof Object.getOwnPropertySymbols?n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})):n).forEach(function(e){_define_property$2(t,e,r[e])})}return t}function _ts_generator$2(n,o){var a,s,i,l={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]},e={next:t(0),throw:t(1),return:t(2)};return"function"==typeof Symbol&&(e[Symbol.iterator]=function(){return this}),e;function t(r){return function(e){var t=[r,e];if(a)throw new TypeError("Generator is already executing.");for(;l;)try{if(a=1,s&&(i=2&t[0]?s.return:t[0]?s.throw||((i=s.return)&&i.call(s),0):s.next)&&!(i=i.call(s,t[1])).done)return i;switch(s=0,(t=i?[2&t[0],i.value]:t)[0]){case 0:case 1:i=t;break;case 4:return l.label++,{value:t[1],done:!1};case 5:l.label++,s=t[1],t=[0];continue;case 7:t=l.ops.pop(),l.trys.pop();continue;default:if(!(i=0<(i=l.trys).length&&i[i.length-1])&&(6===t[0]||2===t[0])){l=0;continue}if(3===t[0]&&(!i||t[1]>i[0]&&t[1]<i[3]))l.label=t[1];else if(6===t[0]&&l.label<i[1])l.label=i[1],i=t;else{if(!(i&&l.label<i[2])){i[2]&&l.ops.pop(),l.trys.pop();continue}l.label=i[2],l.ops.push(t)}}t=o.call(n,l)}catch(e){t=[6,e],s=0}finally{a=i=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}}}var fetchVeritoneGraphQLApiCustomErrorHandling=(()=>{var a=_async_to_generator$2(function(t,r,n,o,a){var s;return _ts_generator$2(this,function(e){return s=appIdSelector(store.getState()),[2,fetch(t,{method:"POST",headers:_object_spread$2({"Content-Type":"application/json"},r&&{Authorization:"Bearer ".concat(r)},s?{"X-Veritone-Application":s}:{}),credentials:"include",body:JSON.stringify({query:n,variables:o,operationName:a})}).then(function(e){return e.json()}).then(function(e){var t;return e.errors&&(t="GraphQL Errors:\n".concat(e.errors.map(function(e){return"".concat(e.name,": ").concat(e.message,"\n")})),console.error("GraphQL Errors",e.errors),console.error("Error Message",t)),e}).catch(function(e){console.error("Error",e)})]})});return function(e,t,r,n,o){return a.apply(this,arguments)}})(),createUniqueEngineMutation=function(e,t,r,n){return fetchVeritoneGraphQLApiCustomErrorHandling(n,r,createUniqueEngineMutation$1,{name:e,templateId:t})},createNotebook=function(e,t,r,n){return fetchVeritoneGraphQLApiCustomErrorHandling(n,r,createNotebookMutation,{name:e,templateId:t})},createAutomateFlowMutation=function(e,t,r,n){return fetchVeritoneGraphQLApiCustomErrorHandling(n,r,createAutomateFlowMutation$1,{name:e,templateId:t})},getFlow=(()=>{var n=_async_to_generator$2(function(t,r,n){return _ts_generator$2(this,function(e){switch(e.label){case 0:return[4,fetchVeritoneGraphQLApi(n,r,getFlow$1,{flowId:t})];case 1:return[2,e.sent()]}})});return function(e,t,r){return n.apply(this,arguments)}})(),copyFlowMutation=function(e,t,r,n,o){return fetchVeritoneGraphQLApiCustomErrorHandling(o,n,copyFlowMutation$1,{flowId:r,flowRevisionId:t,name:e})};function _array_like_to_array$1(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function _array_with_holes$1(e){if(Array.isArray(e))return e}function asyncGeneratorStep$1(e,t,r,n,o,a,s){try{var i=e[a](s),l=i.value}catch(e){return void r(e)}i.done?t(l):Promise.resolve(l).then(n,o)}function _async_to_generator$1(i){return function(){var e=this,s=arguments;return new Promise(function(t,r){var n=i.apply(e,s);function o(e){asyncGeneratorStep$1(n,t,r,o,a,"next",e)}function a(e){asyncGeneratorStep$1(n,t,r,o,a,"throw",e)}o(void 0)})}}function _iterable_to_array_limit$1(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,a=[],s=!0,i=!1;try{for(r=r.call(e);!(s=(n=r.next()).done)&&(a.push(n.value),!t||a.length!==t);s=!0);}catch(e){i=!0,o=e}finally{try{s||null==r.return||r.return()}finally{if(i)throw o}}return a}}function _non_iterable_rest$1(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _sliced_to_array$1(e,t){return _array_with_holes$1(e)||_iterable_to_array_limit$1(e,t)||_unsupported_iterable_to_array$1(e,t)||_non_iterable_rest$1()}function _unsupported_iterable_to_array$1(e,t){var r;if(e)return"string"==typeof e?_array_like_to_array$1(e,t):"Map"===(r="Object"===(r=Object.prototype.toString.call(e).slice(8,-1))&&e.constructor?e.constructor.name:r)||"Set"===r?Array.from(r):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?_array_like_to_array$1(e,t):void 0}function _ts_generator$1(n,o){var a,s,i,l={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]},e={next:t(0),throw:t(1),return:t(2)};return"function"==typeof Symbol&&(e[Symbol.iterator]=function(){return this}),e;function t(r){return function(e){var t=[r,e];if(a)throw new TypeError("Generator is already executing.");for(;l;)try{if(a=1,s&&(i=2&t[0]?s.return:t[0]?s.throw||((i=s.return)&&i.call(s),0):s.next)&&!(i=i.call(s,t[1])).done)return i;switch(s=0,(t=i?[2&t[0],i.value]:t)[0]){case 0:case 1:i=t;break;case 4:return l.label++,{value:t[1],done:!1};case 5:l.label++,s=t[1],t=[0];continue;case 7:t=l.ops.pop(),l.trys.pop();continue;default:if(!(i=0<(i=l.trys).length&&i[i.length-1])&&(6===t[0]||2===t[0])){l=0;continue}if(3===t[0]&&(!i||t[1]>i[0]&&t[1]<i[3]))l.label=t[1];else if(6===t[0]&&l.label<i[1])l.label=i[1],i=t;else{if(!(i&&l.label<i[2])){i[2]&&l.ops.pop(),l.trys.pop();continue}l.label=i[2],l.ops.push(t)}}t=o.call(n,l)}catch(e){t=[6,e],s=0}finally{a=i=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}}}var DialogFormattedMessages={CREATE_FLOW:jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center-header-create-flow.jbxxqH",defaultMessage:"Create Flow",description:"msg create flow"}),CREATE_FLOW_UNIQUE_NAME:jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center-header.jbttty",defaultMessage:"Name Your Flow",description:"msg create flow with unique name"}),CREATE_NOTEBOOK_UNIQUE_NAME:jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center-header.uniqueNotebookName",defaultMessage:"Name Your Notebook",description:"msg create flow with unique name"}),CANCEL_FLOW_UNIQUE_NAME:jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center-header.hittrt",defaultMessage:"Cancel",description:"msg cancel naming flow"}),COPY_FLOW:jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center-header-copy-flow.jbxxqH",defaultMessage:"Copy Flow",description:"msg copy flow"}),CREATE_NOTEBOOK:jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center-header-create-flow.createNotebookButton",defaultMessage:"Create Notebook",description:"msg create Notebook"})};function FlowNameDialog(t){function l(){u(""),d(""),f(""),s(flowCenterDialogAction({open:!1,component:"",props:{}}))}var n,r,o,a,s=useDispatch(),e=useCommonStyles().classes,i=_sliced_to_array$1(reactExports.useState(""),2),c=i[0],u=i[1],i=_sliced_to_array$1(reactExports.useState(""),2),p=i[0],d=i[1],i=_sliced_to_array$1(reactExports.useState(t.templateId||""),2),m=i[0],f=i[1],i=useSelector(controllerUrlSelector),x=useSelector(automateControllerUrlSelector),g=(!i&&x&&x.replace("automate-",""),useSelector(automateUrlSelector)),_=useSelector(sessionTokenSelector),E=useSelector(graphEndpointSelector),h=useSelector(function(e){return e.flows.isRevisionsExistOnServer}),i=makeStyles()(function(e){return{paddingDiv:{paddingTop:"20px"},flowName:{width:"449px"}}})().classes,w=(n=_async_to_generator$1(function(t,r,n){var o;return _ts_generator$1(this,function(e){switch(e.label){case 0:return[4,getFlow(t,r,n)];case 1:if((o=e.sent()).errors&&0<o.errors.length)throw new Error("Error while getting new engine");return s(addNewFlow(o.data.engine)),[2]}})}),function(e,t,r){return n.apply(this,arguments)}),j=(r=_async_to_generator$1(function(t){var r,n,o,a,s,i;return _ts_generator$1(this,function(e){switch(e.label){case 0:return(r='Field "templateId" is not defined by type "CreateFlow".',n=c.trim(),o=m||"",t)?[4,createNotebook(n,o,_,E)]:[3,2];case 1:if((i=e.sent())&&i.errors&&0<i.errors.length)throw d(i.errors[0].message),new Error("Error while creating new flow");return l(),a=i&&i.data.createNotebook.id,s=i&&i.data.createNotebook.builds.records[0].id,[3,6];case 2:return[4,createUniqueEngineMutation(n,o,_,E)];case 3:return(i=e.sent()).errors&&0<i.errors.length&&i.errors[0].message===r?[4,createAutomateFlowMutation(n,o,_,E)]:[3,5];case 4:i=e.sent(),e.label=5;case 5:if(i&&i.errors&&0<i.errors.length)throw d(i.errors[0].message),new Error("Error while creating new flow");l(),a=i&&i.data.createFlow.id,s=i&&i.data.createFlow.builds.records[0].id,e.label=6;case 6:return[2,{engineId:a,engineBuildId:s}]}})}),function(e){return r.apply(this,arguments)}),S=(o=_async_to_generator$1(function(t){var r,n,o,a=arguments;return _ts_generator$1(this,function(e){switch(e.label){case 0:r=1<a.length&&void 0!==a[1]&&a[1],s(toggleStateCreateNewFlow(!0)),e.label=1;case 1:return e.trys.push([1,3,4,5]),[4,j(t)];case 2:return n=e.sent(),o=n.engineId,n=n.engineBuildId,w(o,_,E).catch(function(e){devErrorLogger("Error while adding flow: ".concat(JSON.stringify(e)))}),n=h?"latest":n,s(toggleStateCreateNewFlow(!1)),console.log("REDIRECT: ",r),r?s(setShouldCreateInitialFlows(!1)):(t&&window.open("".concat(g,"/notebook/").concat(o,"/").concat(n),"_blank","noopener"),window.open("".concat(g,"/flow/").concat(o,"/").concat(n),"_blank","noopener")),[3,5];case 3:return o=e.sent(),devErrorLogger(o),[3,5];case 4:return s(toggleStateCreateNewFlow(!1)),[7];case 5:return[2]}})}),function(e){return o.apply(this,arguments)}),y=(a=_async_to_generator$1(function(t){var r,n,o,a=arguments;return _ts_generator$1(this,function(e){switch(e.label){case 0:r=1<a.length&&void 0!==a[1]&&a[1],s(toggleStateCreateNewFlow(!0)),e.label=1;case 1:return e.trys.push([1,3,4,5]),n=c.trim(),[4,copyFlowMutation(n,t.flowRevisionId||"",t.flowId||"",_,E)];case 2:if((n=e.sent()).errors&&0<n.errors.length)throw d(n.errors[0].message),new Error("Error while copying flow");return l(),o=n&&n.data.copyFlow.id,w(o,_,E).catch(function(e){devErrorLogger("Error while adding flow: ".concat(JSON.stringify(e)))}),s(toggleStateCreateNewFlow(!1)),r?s(setShouldCreateInitialFlows(!1)):window.open("".concat(g,"/flow/").concat(o,"/latest"),"_blank","noopener"),[3,5];case 3:return o=e.sent(),devErrorLogger(o),[3,5];case 4:return s(toggleStateCreateNewFlow(!1)),[7];case 5:return[2]}})}),function(e){return a.apply(this,arguments)});return jsxRuntimeExports.jsxs("div",{className:e.container,children:[jsxRuntimeExports.jsx(DialogTitle,{className:e.title,children:t.isNotebook?DialogFormattedMessages.CREATE_NOTEBOOK_UNIQUE_NAME:DialogFormattedMessages.CREATE_FLOW_UNIQUE_NAME}),jsxRuntimeExports.jsxs(DialogContent,{className:e.content,children:[jsxRuntimeExports.jsx("div",{className:"".concat(i.paddingDiv),children:t.isNotebook?jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center-header-flow-name-dialog.notebookMustUnique",defaultMessage:"Your notebooks's name must be unique",description:"Your notebook's name must be unique"}):jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center-header-flow-name-dialog.jFggxR",defaultMessage:"Your flow's name must be unique",description:"Your flow's name must be unique"})}),jsxRuntimeExports.jsx("div",{className:"".concat(i.paddingDiv),children:jsxRuntimeExports.jsx(TextField,{id:"os-flow-center-header-flow-name-dialog-textfield.jFtfxR",className:i.flowName,label:t.isNotebook?"Notebook Name":"Flow Name",onChange:function(e){e=e.target.value;u(e)},variant:"outlined",value:c,error:!!p,helperText:p||null})})]}),jsxRuntimeExports.jsxs(DialogActions,{className:e.actions,children:[jsxRuntimeExports.jsx(Button,{"data-test":"flow-center-flow-list-cancelCreateFlowWithName",onClick:function(){l()},className:e.cancelButton,children:DialogFormattedMessages.CANCEL_FLOW_UNIQUE_NAME}),jsxRuntimeExports.jsx(Button,{disabled:!c,"data-test":"flow-center-flow-list-createFlowWithName",onClick:function(){var e;(e=t).isCopyFlow?y(e).catch(function(e){devErrorLogger("Error copying flow: ".concat(JSON.stringify(e)))}):e.isNotebook?S(!0).catch(function(e){devErrorLogger("Error creating flow: ".concat(JSON.stringify(e)))}):S(!1).catch(function(e){devErrorLogger("Error creating flow: ".concat(JSON.stringify(e)))})},className:c?e.confirmationButton:e.disabledButton,autoFocus:!0,children:t.isNotebook?DialogFormattedMessages.CREATE_NOTEBOOK:!0===t.isCopyFlow?DialogFormattedMessages.COPY_FLOW:DialogFormattedMessages.CREATE_FLOW})]})]})}function _define_property$1(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _object_spread$1(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{},n=Object.keys(r);(n="function"==typeof Object.getOwnPropertySymbols?n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})):n).forEach(function(e){_define_property$1(t,e,r[e])})}return t}function UniversalDialog(){var r=useSelector(flowCenterDialogSelector)||null,e=useDispatch(),n=[{name:"FlowNameDialog",component:FlowNameDialog}];return jsxRuntimeExports.jsx(Dialog,{open:r.flowCenterDialog.open,onClose:function(){e(flowCenterDialogAction({open:!1,component:"",props:{}}))},children:jsxRuntimeExports.jsx("div",{children:r.flowCenterDialog.component&&jsxRuntimeExports.jsx(function(){var t,e=(t=r.flowCenterDialog.component)?n.filter(function(e){return e.name===t})[0].component:null;return jsxRuntimeExports.jsx(reactExports.Suspense,{fallback:jsxRuntimeExports.jsx(CircularProgress,{}),children:jsxRuntimeExports.jsx(e,_object_spread$1({},r.flowCenterDialog.props))})},{})})})}function _array_like_to_array(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function _array_with_holes(e){if(Array.isArray(e))return e}function _array_without_holes(e){if(Array.isArray(e))return _array_like_to_array(e)}function asyncGeneratorStep(e,t,r,n,o,a,s){try{var i=e[a](s),l=i.value}catch(e){return void r(e)}i.done?t(l):Promise.resolve(l).then(n,o)}function _async_to_generator(i){return function(){var e=this,s=arguments;return new Promise(function(t,r){var n=i.apply(e,s);function o(e){asyncGeneratorStep(n,t,r,o,a,"next",e)}function a(e){asyncGeneratorStep(n,t,r,o,a,"throw",e)}o(void 0)})}}function _iterable_to_array(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function _iterable_to_array_limit(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,a=[],s=!0,i=!1;try{for(r=r.call(e);!(s=(n=r.next()).done)&&(a.push(n.value),!t||a.length!==t);s=!0);}catch(e){i=!0,o=e}finally{try{s||null==r.return||r.return()}finally{if(i)throw o}}return a}}function _non_iterable_rest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _non_iterable_spread(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _sliced_to_array(e,t){return _array_with_holes(e)||_iterable_to_array_limit(e,t)||_unsupported_iterable_to_array(e,t)||_non_iterable_rest()}function _to_consumable_array(e){return _array_without_holes(e)||_iterable_to_array(e)||_unsupported_iterable_to_array(e)||_non_iterable_spread()}function _unsupported_iterable_to_array(e,t){var r;if(e)return"string"==typeof e?_array_like_to_array(e,t):"Map"===(r="Object"===(r=Object.prototype.toString.call(e).slice(8,-1))&&e.constructor?e.constructor.name:r)||"Set"===r?Array.from(r):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?_array_like_to_array(e,t):void 0}function _ts_generator(n,o){var a,s,i,l={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]},e={next:t(0),throw:t(1),return:t(2)};return"function"==typeof Symbol&&(e[Symbol.iterator]=function(){return this}),e;function t(r){return function(e){var t=[r,e];if(a)throw new TypeError("Generator is already executing.");for(;l;)try{if(a=1,s&&(i=2&t[0]?s.return:t[0]?s.throw||((i=s.return)&&i.call(s),0):s.next)&&!(i=i.call(s,t[1])).done)return i;switch(s=0,(t=i?[2&t[0],i.value]:t)[0]){case 0:case 1:i=t;break;case 4:return l.label++,{value:t[1],done:!1};case 5:l.label++,s=t[1],t=[0];continue;case 7:t=l.ops.pop(),l.trys.pop();continue;default:if(!(i=0<(i=l.trys).length&&i[i.length-1])&&(6===t[0]||2===t[0])){l=0;continue}if(3===t[0]&&(!i||t[1]>i[0]&&t[1]<i[3]))l.label=t[1];else if(6===t[0]&&l.label<i[1])l.label=i[1],i=t;else{if(!(i&&l.label<i[2])){i[2]&&l.ops.pop(),l.trys.pop();continue}l.label=i[2],l.ops.push(t)}}t=o.call(n,l)}catch(e){t=[6,e],s=0}finally{a=i=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}}}var mainContainerId="flow-center-container",FlowCenter=function(e){function D(){var e,t=0<arguments.length&&void 0!==arguments[0]&&arguments[0],r=(be(DEFAULT_FILTERS_FOR_TAB_MY_FLOWS),l?"calc(100vh - 64px - 54px)":"calc(100vh - 64px - 64px - ".concat(S?"0px":"62px",")"));return jsxRuntimeExports.jsxs("div",{style:{height:r},className:M.flowsMainContainer,id:"flows-main-container",children:[(null==u||null==(e=u.flowCenterDialog)?void 0:e.open)&&jsxRuntimeExports.jsx(UniversalDialog,{}),!t&&jsxRuntimeExports.jsx(TemplateGallery,{handleOpenFlowNameDialog:A,setScreen:f,goToTemplateList:function(){return f(ENGINE_OWNER_TYPES.TEMPLATES)},handleOpenTemplateDetails:function(){_(!0),F(!0),R(!0)}}),jsxRuntimeExports.jsx("div",{children:me?ye(25):v&&v.length?""===x?jsxRuntimeExports.jsx(FlowList,{createFlowTemplate:G,simpleMode:""!==x,selectedFlowId:x,notebooks:t,onSelectFlow:function(e,t){O(),t?(w(!0),E(!1)):_(!0),g(e),j(!1)},setFirstFlowId:function(e){te(e)},screenName:(null==(e=N([m]))||null==(e=e.pop())?void 0:e.text)||"",zIndex:i,setOpenFlowDetails:function(e){_(e)},setOpenAlwaysUpFlow:function(e,t){O(),w(!1),_(!1),t&&(g(t),j(!1)),e?(E(!0),w(!1)):_(!0)},betaFeatures:p}):jsxRuntimeExports.jsxs("div",{className:M.enginesAndFlowWidgetContainer,children:[jsxRuntimeExports.jsx("div",{className:M.enginesContainer,children:jsxRuntimeExports.jsx(FlowList,{createFlowTemplate:G,simpleMode:""!==x,selectedFlowId:x,notebooks:t,setFirstFlowId:function(e){re&&g(e)},onSelectFlow:function(e){O(),g(e),j(!1)},screenName:(null==(e=N([m]))||null==(t=e.pop())?void 0:t.text)||"",zIndex:i,setOpenFlowDetails:function(e){_(e)},betaFeatures:p,setOpenAlwaysUpFlow:function(e,t){O(),w(!1),_(!1),t&&g(t),E(e)}})}),!h&&jsxRuntimeExports.jsx("div",{className:M.flowWidgetContainer,children:jsxRuntimeExports.jsx("div",{"data-test":"flow-center-flow-widget-container",className:M.flowWidgetContent,children:jsxRuntimeExports.jsx(Se,{})})})]}):jsxRuntimeExports.jsxs("div",{style:{height:r},id:"flows-main-container-no-flows-found",children:[(null==u||null==(e=u.flowCenterDialog)?void 0:e.open)&&jsxRuntimeExports.jsx(UniversalDialog,{}),jsxRuntimeExports.jsx("div",{style:{height:r},id:"flows-main-container",children:jsxRuntimeExports.jsx(NoFlowsFound,{setScreen:f,handleOpenFlowNameDialog:A})})]})})]})}function L(){return k.apply(this,arguments)}var k,t=e.graphQLEndpoint,r=void 0===t?DEFAULT_GRAPHQL_ENDPOINT:t,t=e.defaultCluster,n=void 0===t?DEFAULT_CLUSTER:t,t=e.defaultScreen,t=void 0===t?ENGINE_OWNER_TYPES.MINE:t,o=e.tabs,P=void 0===o?DEFAULT_TABS:o,o=e.filters,o=void 0===o?DEFAULT_FILTERS:o,a=e.options,B=void 0===a?{header:{title:"FLOW CENTER",showSearchBar:!0,showNewFromTemplate:!0,showCreateNewFlow:!0,showAdditionalOptionButton:!0,showCollapseButton:!0,showFullScreenButton:!0},controllerFlowPath:"flow"}:a,a=e.openTabFlowWidget,z=void 0===a?0:a,a=e.collapseFlowCenter,G=e.createFlowTemplate,W=e.isFullScreen,H=void 0!==W&&W,W=e.hidePanel,U=e.marginTop,U=void 0===U?0:U,s=e.zIndex,i=void 0===s?0:s,s=e.automateFullScreen,l=void 0!==s&&s,c=useDispatch(),Y=useSelector(preferredLanguageSelector)||"en",V=useSelector(baseUrlSelector),q=useSelector(rootApiSelector),K=useSelector(controllerNodeRedImageSelector),Q=useSelector(controllerUrlSelector),e=useSelector(automateControllerUrlSelector),s=useSelector(automateUrlSelector),u=useSelector(flowCenterDialogSelector)||null,Q=getBrowserSafeControllerUrl({controllerUrl:Q,automateControllerUrl:e,automateUrl:s}),p=useSelector(betaFeaturesSelector),e=(setApiEndpoint(V),reactExports.useEffect(function(){setApiEndpoint(V)},[V]),reactExports.useEffect(function(){c(setFlowCenterConfig({isFullScreen:H,automateFullScreen:l,zIndex:i,graphQLEndpoint:r,defaultCluster:n}))},[H,l,i,r,n]),_sliced_to_array(reactExports.useState(""),2)),d=e[0],J=e[1],s=_sliced_to_array(reactExports.useState(t),2),m=s[0],f=s[1],e=_sliced_to_array(reactExports.useState(""),2),x=e[0],g=e[1],t=_sliced_to_array(reactExports.useState(!0),2),s=t[0],e=t[1],t=_sliced_to_array(reactExports.useState(!1),2),X=t[0],_=t[1],t=_sliced_to_array(reactExports.useState(!1),2),Z=t[0],E=t[1],t=_sliced_to_array(reactExports.useState(!1),2),h=t[0],w=t[1],t=_sliced_to_array(reactExports.useState(""),2),ee=t[0],te=t[1],t=_sliced_to_array(reactExports.useState(!0),2),re=t[0],j=t[1],t=_sliced_to_array(reactExports.useState(H),2),S=t[0],t=t[1],y=_sliced_to_array(reactExports.useState(!1),2),b=y[0],R=y[1],y=_sliced_to_array(reactExports.useState(!1),2),T=y[0],F=y[1],y=_sliced_to_array(reactExports.useState(""),2),ne=y[0],oe=y[1],y=_sliced_to_array(reactExports.useState(!0),2),ae=y[0],se=y[1],y=_sliced_to_array(reactExports.useState(!1),2),ie=y[0],le=y[1],ce=reactExports.useRef(null),v=useSelector(function(e){return e.flows.flows}),ue=useSelector(function(e){return e.flows.shouldCreateInitialFlows}),pe=useSelector(function(e){return e.flows.isSearching}),de=useSelector(function(e){return e.flows.searched}),me=useSelector(function(e){return e.flows.fetchingFlows}),y=(reactExports.useEffect(function(){J(de)},[de]),reactExports.useEffect(function(){c(isRevisionsExistOnServer())},[c]),reactExports.useEffect(function(){m===ENGINE_OWNER_TYPES.TEMPLATES?c(fetchFlows({name:d,ownerType:ENGINE_OWNER_TYPES.MINE})):c(fetchFlows({name:d,ownerType:m})),null!=v&&v.length||ae||se(!0)},[d,c,m]),reactExports.useEffect(function(){ue||c(fetchFlows({name:d,ownerType:m}))},[ue]),reactExports.useEffect(function(){var e,t;ne&&-1<(e=lodashExports.findIndex(v,function(e){return e.id===ne}))&&((t=JSON.parse(JSON.stringify(v))).splice(e,1),c(setFlows(t)),se(!1))},[c,v,ne]),reactExports.useEffect(function(){var e=document.querySelector("#".concat(mainContainerId));e&&(e.parentElement.style.overflowY="hidden")},[]),reactExports.useEffect(function(){c(searchTemplates())},[]),reactExports.useRef(null)),fe=reactExports.useRef(null),xe=useSelector(function(e){return e.flows.templateToOpen}),ge=useSelector(function(e){return e.flows.tags}),_e=useSelector(function(e){return e.flows.categories}),Ee=useSelector(function(e){return e.flows.templatesAuthors}),N=function(t){return ALL_TABS.filter(function(e){return t.includes(e.key)})},he=function(t){return ALL_FILTERS.filter(function(e){return t.includes(null==e?void 0:e.group)})},C=_sliced_to_array(reactExports.useState(N(_to_consumable_array(P))),2),we=C[0],je=C[1],C=(reactExports.useEffect(function(){var e=_to_consumable_array(P);p&&e.push.apply(e,_to_consumable_array(BETA_TABS)),je(N(e))},[p,P]),_sliced_to_array(reactExports.useState(he(o)),2)),I=C[0],$=C[1],M=(reactExports.useEffect(function(){var e=I.map(function(e){return"tags"===e.group&&(e.options=ge.map(function(e){return{text:e,value:e}})),e});$(e)},[ge]),reactExports.useEffect(function(){var e=I.map(function(e){return"categories"===e.group&&(e.options=_e.map(function(e){return{text:e,value:e}})),e});$(e)},[_e]),reactExports.useEffect(function(){var e=I.map(function(e){return"author"===e.group&&(e.options=Ee.map(function(e){return{text:e,value:e}})),e});$(e)},[Ee]),makeStyles()(function(e){return{fullScreenClass:{width:"100%"},main:{height:"100%",minHeight:"1000px",width:"1280px",display:"flex",flexDirection:"column",backgroundColor:e.palette.background.paper},wideMain:{minHeight:"100%",width:"100%",display:"flex",flexDirection:"column",backgroundColor:e.palette.background.paper,overflowY:"auto",position:"fixed",top:0,left:0},fullHeight:{height:"100%"},fixedHeight:{height:"800px"},scrollY:{height:"100%",overflowY:"scroll"},container:{display:"flex",minHeight:"100%!important",position:"relative"},containerHeight:{height:"100%!important"},navigationContainer:{minWidth:"187px!important",maxWidth:"187px!important",width:"187px!important",transition:e.transitions.create("width",{easing:e.transitions.easing.sharp,duration:e.transitions.duration.enteringScreen}),transform:"translateX(0px)",position:"fixed!important",height:"100%!important",borderRight:"0.5px solid #D5DFE9 !important"},noNavigationContainer:{width:0,transition:e.transitions.create("width",{easing:e.transitions.easing.sharp,duration:e.transitions.duration.enteringScreen}),transform:"translateX(-187px)"},wrapperHeaderBar:{width:"inherit!important",cursor:"default"},contentContainer:{marginLeft:"188px!important",flex:"1 1 auto!important",backgroundColor:e.palette.background.paper,cursor:"default"},enginesAndFlowWidgetContainer:{height:"100%!important"},flowWidgetContainer:{position:"absolute",top:0,right:"1px",height:"100%",minWidth:720,width:720,zIndex:2,transitionTimingFunction:"ease-in-out !important",borderLeft:"0.5px solid #D5DFE9",background:e.palette.background.paper},flowWidgetContent:{height:"100%"},enginesContainer:{width:"100%!important",overflowY:"auto!important"},marginTop:{marginTop:"64px!important"},wrapperContainer:{},wrapperContainerWithHiddenOverflow:{overflowY:"hidden"},flowsMainContainer:{overflowY:"auto"},lineItem:{flexDirection:"row",margin:e.spacing(),borderRadius:e.spacing(.5),height:e.spacing(6)},paddingDiv:{paddingTop:"20px"},flowName:{width:"449px"}}})().classes),Se=function(){var e=B.controllerFlowPath;return jsxRuntimeExports.jsx(App$1,{engineId:x,openFlowRunningInstances:h,openAlwaysUpFlow:Z,locale:Y,openTab:z,config:{apiRoot:q,graphQLEndpoint:r,controllerUrl:Q,defaultCluster:n,controllerNodeRedImage:K,controllerFlowPath:e},tabs:[IFlowWidgetTabs.Overview,IFlowWidgetTabs.Versions,IFlowWidgetTabs.Activity],activityTabs:[IFlowWidgetActivityTabs.Jobs,IFlowWidgetActivityTabs.ScheduledJobs],onExitClicked:function(){g(""),_(!1),w(!1),E(!1)},onDeleteFlow:function(){setTimeout(function(){oe(x),g(""),oe("")},2e3)}})},A=function(e){c(flowCenterDialogAction({open:!0,component:"FlowNameDialog",props:{templateId:e,isCopyFlow:!1,isNotebook:1<arguments.length&&void 0!==arguments[1]&&arguments[1]}}))},ye=function(e){e=Array(e);return jsxRuntimeExports.jsx("div",{children:Array.from(e).map(function(e,t){return jsxRuntimeExports.jsx(Skeleton,{variant:"rectangular",animation:"wave",height:35,sx:{m:"8px"}},"skeleton_"+t)})})},be=function(e){var t=I,e=he(e);lodashExports.isEqual(t,e)||$(e)},O=(k=_async_to_generator(function(){return _ts_generator(this,function(e){switch(e.label){case 0:return ce.current?(le(!0),[4,ce.current.reload()]):[3,2];case 1:e.sent(),le(!1),e.label=2;case 2:return[2]}})}),function(){var e=document.getElementById("flow-center-box-container");e&&(e.scrollTop=0)});return jsxRuntimeExports.jsxs(Container,{fullScreen:S,classes:M,main:fe,marginTop:U,zIndex:i,children:[jsxRuntimeExports.jsx("div",{ref:y,className:M.wrapperHeaderBar,children:jsxRuntimeExports.jsx(Headerbar,{options:B.header,handleOpenFlowNameDialog:A,collapseFlowCenter:a,setFullScreen:t,fullScreen:S,setScreen:f,hidePanel:W,zIndex:i,automateFullScreen:l,enableNotebooks:p,screen:m})}),jsxRuntimeExports.jsx(Box,{id:"flow-center-box-container",className:"".concat(l?M.wrapperContainer:M.marginTop," ").concat(""!==x||b?M.wrapperContainerWithHiddenOverflow:M.wrapperContainer),children:jsxRuntimeExports.jsxs("div",{className:"".concat(M.container," ").concat(T||x?M.containerHeight:""),children:[""!==x&&h&&jsxRuntimeExports.jsx("div",{className:M.flowWidgetContainer,children:jsxRuntimeExports.jsx("div",{"data-test":"flow-center-flow-widget-container",className:M.flowWidgetContent,children:jsxRuntimeExports.jsx(Se,{})})}),jsxRuntimeExports.jsx("div",{className:M.navigationContainer,children:jsxRuntimeExports.jsx(Navigation,{categories:we,filterers:I,screen:m,tags:ge,onSetType:function(e){switch(g(""),_(!1),w(!1),E(!1),F(!1),R(!1),e){case"organization":f(ENGINE_OWNER_TYPES.ORGANIZATION);break;case"shared":f(ENGINE_OWNER_TYPES.SHARED);break;case"templates":f(ENGINE_OWNER_TYPES.TEMPLATES);break;case"mine":c(setTemplateSelected(!1)),f(ENGINE_OWNER_TYPES.MINE);break;case"notebooks":c(setTemplateSelected(!1)),f(ENGINE_OWNER_TYPES.NOTEBOOKS);break;case"containers":c(setTemplateSelected(!1)),f(ENGINE_OWNER_TYPES.CONTAINERS)}},type:"",showNavigation:s,fullScreen:S,automateFullScreen:l})}),jsxRuntimeExports.jsxs("div",{className:M.contentContainer,children:[jsxRuntimeExports.jsx(Toolbar,{header:null==(o=N([m]))?void 0:o.pop(),showNavigation:s,screen:m,setShowNavigation:e,openFlowDetails:X,onReload:m===ENGINE_OWNER_TYPES.CONTAINERS?L:void 0,isReloading:ie,setOpenFlowDetails:function(){O(),c(setOpenTemplate({})),"templates"===m?(F(!T),R(!b)):(F(!1),R(!1)),_(!X),w(!1),E(!1),g(X?"":ee)}}),(()=>{var e,t;if(pe)return jsxRuntimeExports.jsx(SearchResultsPage,{createFlowTemplate:G,openFlowRunningInstances:h,simpleMode:""!==x,selectedFlowId:x,onSelectFlow:function(e,t){O(),(t?w:_)(!0),g(e),j(!1)},setFirstFlowId:function(e){te(e)},screenName:(null==(e=N([m]))||null==(e=e.pop())?void 0:e.text)||"",handleOpenFlowNameDialog:A,openFirstTemplate:b,isDeselectedTemplate:T,onSelectedTemplate:function(){O(),F(!0),_(!0),R(!0)},classes:M,allowSetFirstFlowId:re,setSelectedFlowId:g,setOpenFlowRunningInstances:w,setOpenFlowDetails:_,scrollContainerToTop:O,setAllowSetFirstFlowId:j,openTabFlowWidget:z,setUpdateFlowList:oe,controllerFlowPath:B.controllerFlowPath,openAlwaysUpFlow:Z,setOpenAlwaysUpFlow:E,betaFeatures:p});switch(m!==ENGINE_OWNER_TYPES.TEMPLATES&&xe.id&&c(setOpenTemplate({})),m){case ENGINE_OWNER_TYPES.TEMPLATES:return be(DEFAULT_FILTERS_FOR_TAB_TEMPLATES),t=l?"calc(100vh - 64px - 54px)":"calc(100vh - 64px - 64px - ".concat(S?"0px":"62px",")"),jsxRuntimeExports.jsxs("div",{style:{height:t},className:M.flowsMainContainer,id:"templates-main-container",children:[(null==u||null==(t=u.flowCenterDialog)?void 0:t.open)&&jsxRuntimeExports.jsx(UniversalDialog,{}),jsxRuntimeExports.jsx(TemplateList,{handleOpenFlowNameDialog:A,openFirstTemplate:b,isDeselectedTemplate:T,onSelectedTemplate:function(){O(),F(!0),_(!0),R(!0)}})]});case ENGINE_OWNER_TYPES.MINE:return D();case ENGINE_OWNER_TYPES.NOTEBOOKS:return D(!0);case ENGINE_OWNER_TYPES.CONTAINERS:return be([]),t=l?"calc(100vh - 118px)":"calc(100vh - 128px - ".concat(S?"0px":"62px",")"),jsxRuntimeExports.jsxs("div",{style:{height:t},className:M.flowsMainContainer,id:"templates-main-container",children:[(null==u||null==(t=u.flowCenterDialog)?void 0:t.open)&&jsxRuntimeExports.jsx(UniversalDialog,{}),jsxRuntimeExports.jsx(ContainerList,{ref:ce})]});default:return}})()]})]})})]})},Container=function(e){var t=e.fullScreen,r=e.classes,n=e.main,o=e.marginTop,a=e.zIndex,e=e.children;return t?jsxRuntimeExports.jsx(Portal,{children:jsxRuntimeExports.jsx("div",{role:"presentation","data-test":"flow-center-widget-main-conatiner","data-cy":"flow-center-widget-fullscreen",ref:n,id:mainContainerId,className:r.wideMain,style:{top:o,zIndex:a},children:e})}):jsxRuntimeExports.jsx("div",{role:"presentation","data-test":"flow-center-widget-main-conatiner","data-cy":"flow-center-widget-notfullscreen",ref:n,id:"flow-center-container",className:r.main,style:{top:o,zIndex:a},children:e})};function _define_property(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _object_spread(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{},n=Object.keys(r);(n="function"==typeof Object.getOwnPropertySymbols?n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})):n).forEach(function(e){_define_property(t,e,r[e])})}return t}var App=function(e){return jsxRuntimeExports.jsx(Provider,{store:store,children:jsxRuntimeExports.jsx(DynamicModuleLoader,{modules:[getFlowCenterModule()],children:jsxRuntimeExports.jsx(AIWareIntlProvider,{children:jsxRuntimeExports.jsx(FlowCenter,_object_spread({},e))})})})};export{App,useCommonStyles};
|
|
1
|
+
import{j as jsxRuntimeExports,c as createAction,L as createReducer,a4 as createSlice,aL as store,P as Provider,r as reactExports,u as useSelector,aa as selectApiConfigs,bQ as automateUrlSelector,b4 as controllerUrlSelector,b3 as automateControllerUrlSelector,c3 as getBrowserSafeControllerUrl,B as Box,aj as preferredLanguageSelector,c4 as baseUrlSelector,ah as rootApiSelector,b2 as controllerNodeRedImageSelector,c5 as flowCenterDialogSelector,ar as betaFeaturesSelector,c6 as ENGINE_OWNER_TYPES,ak as lodashExports,c7 as flowCenterDialogReducer,c8 as ClickAwayListener,c9 as flowCenterDialogAction,ca as img$G,cb as img$H,cc as img$n,cd as img$D,ce as img$E,cf as ENGINE_FILTER_TYPES,cg as FormattedDate,ch as img$x,ci as img$10,cj as setApiEndpoint,_ as all,a8 as sessionTokenSelector,ck as fetchTemplateGallery,cl as img$B,C as CircularProgress,cm as img$r,bR as img$w,cn as img$I,co as img$F,cp as img$1a,cq as img$c,cr as img$d,cs as img$Y,ct as img$y,cu as img$A,cv as img$1e,a9 as graphEndpointSelector,cw as deleteEngine,cx as fetchEngine,cy as img$z,al as showMessage,am as MessageSeverity,an as AIWareFormatMessage,ao as takeLatest$1,N as put,cz as fetchAllTags,K as select,cA as fetchFlows$1,a6 as call,cB as isRevisionsExistOnServerRequest,aS as appIdSelector,cC as fetchVeritoneGraphQLApi}from"./js-core.esm4.js";import{a_ as requireCreateSvgIcon,a$ as interopRequireDefaultExports,m as makeStyles,D as DynamicModuleLoader,A as AIWareIntlProvider,c2 as flowStyles,T as Typography,M as MemoizedFormattedMessage,ag as TableContainer,ah as Table,ai as TableBody,l as TableRow,n as TableCell,c3 as NoResults,H as Dialog,J as DialogTitle,K as DialogContent,O as DialogActions,B as Button,P as Portal,L as List,aj as TableHead,bb as Fade,a as Paper,w as Divider,a5 as TableSortLabel,a6 as default_1$c,f as FormControl,G as Grid,C as Card,S as Select,e as MenuItem,as as Tabs,at as Tab}from"./js-core.esm7.js";import{f as Skeleton,ac as LoadingButton,a0 as ListItemIcon,c as Tooltip,d as Chip,I as IconButton,aG as Popper,M as DateTime_1,a9 as FormLabel,b8 as default_1$d,aa as FormGroup,a7 as FormControlLabel,a8 as Checkbox,m as devErrorLogger,a as Snackbar,au as Search,b9 as Close$1,T as TextField}from"./js-core.esm9.js";import{c as default_1$b,C as CardContent,e as CardActions,f as default_1$f,d as default_1$g}from"./js-core.esm29.js";import{T as TablePagination,a as Toolbar$1,A as App$1,S as StatusPill,g as getFlowStatus}from"./js-core.esm136.js";import{d as default_1$a}from"./js-core.esm72.js";import{d as default_1$e}from"./js-core.esm53.js";import{I as IFlowWidgetTabs,a as IFlowWidgetActivityTabs}from"./js-core.esm13.js";import{L as ListItem,c as ListItemText,v as LinearProgress}from"./js-core.esm8.js";import{A as AppBar}from"./js-core.esm121.js";import{u as useDispatch}from"./js-core.esm15.js";import"./js-core.esm24.js";import"./js-core.esm125.js";import"./js-core.esm17.js";import"./js-core.esm18.js";import"./js-core.esm44.js";import"./js-core.esm16.js";var WorkOutlineOutlined={},_interopRequireDefault$9=interopRequireDefaultExports,default_1$9=(Object.defineProperty(WorkOutlineOutlined,"__esModule",{value:!0}),WorkOutlineOutlined.default=void 0),_createSvgIcon$9=_interopRequireDefault$9(requireCreateSvgIcon()),_jsxRuntime$9=jsxRuntimeExports,_default$9=(0,_createSvgIcon$9.default)((0,_jsxRuntime$9.jsx)("path",{d:"M14 6V4h-4v2h4zM4 8v11h16V8H4zm16-2c1.11 0 2 .89 2 2v11c0 1.11-.89 2-2 2H4c-1.11 0-2-.89-2-2l.01-11c0-1.11.88-2 1.99-2h4V4c0-1.11.89-2 2-2h4c1.11 0 2 .89 2 2v2h4z"}),"WorkOutlineOutlined"),default_1$9=WorkOutlineOutlined.default=_default$9,PeopleAltOutlined={},_interopRequireDefault$8=interopRequireDefaultExports,default_1$8=(Object.defineProperty(PeopleAltOutlined,"__esModule",{value:!0}),PeopleAltOutlined.default=void 0),_createSvgIcon$8=_interopRequireDefault$8(requireCreateSvgIcon()),_jsxRuntime$8=jsxRuntimeExports,_default$8=(0,_createSvgIcon$8.default)((0,_jsxRuntime$8.jsx)("path",{d:"M16.67 13.13C18.04 14.06 19 15.32 19 17v3h4v-3c0-2.18-3.57-3.47-6.33-3.87zM15 12c2.21 0 4-1.79 4-4s-1.79-4-4-4c-.47 0-.91.1-1.33.24C14.5 5.27 15 6.58 15 8s-.5 2.73-1.33 3.76c.42.14.86.24 1.33.24zm-6 0c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0-6c1.1 0 2 .9 2 2s-.9 2-2 2-2-.9-2-2 .9-2 2-2zm0 7c-2.67 0-8 1.34-8 4v3h16v-3c0-2.66-5.33-4-8-4zm6 5H3v-.99C3.2 16.29 6.3 15 9 15s5.8 1.29 6 2v1z"}),"PeopleAltOutlined"),default_1$8=PeopleAltOutlined.default=_default$8,PersonOutlineOutlined={},_interopRequireDefault$7=interopRequireDefaultExports,default_1$7=(Object.defineProperty(PersonOutlineOutlined,"__esModule",{value:!0}),PersonOutlineOutlined.default=void 0),_createSvgIcon$7=_interopRequireDefault$7(requireCreateSvgIcon()),_jsxRuntime$7=jsxRuntimeExports,_default$7=(0,_createSvgIcon$7.default)((0,_jsxRuntime$7.jsx)("path",{d:"M12 5.9c1.16 0 2.1.94 2.1 2.1s-.94 2.1-2.1 2.1S9.9 9.16 9.9 8s.94-2.1 2.1-2.1m0 9c2.97 0 6.1 1.46 6.1 2.1v1.1H5.9V17c0-.64 3.13-2.1 6.1-2.1M12 4C9.79 4 8 5.79 8 8s1.79 4 4 4 4-1.79 4-4-1.79-4-4-4zm0 9c-2.67 0-8 1.34-8 4v3h16v-3c0-2.66-5.33-4-8-4z"}),"PersonOutlineOutlined"),default_1$7=PersonOutlineOutlined.default=_default$7,HistoryOutlined={},_interopRequireDefault$6=interopRequireDefaultExports,default_1$6=(Object.defineProperty(HistoryOutlined,"__esModule",{value:!0}),HistoryOutlined.default=void 0),_createSvgIcon$6=_interopRequireDefault$6(requireCreateSvgIcon()),_jsxRuntime$6=jsxRuntimeExports,_default$6=(0,_createSvgIcon$6.default)((0,_jsxRuntime$6.jsx)("path",{d:"M13 3c-4.97 0-9 4.03-9 9H1l3.89 3.89.07.14L9 12H6c0-3.87 3.13-7 7-7s7 3.13 7 7-3.13 7-7 7c-1.93 0-3.68-.79-4.94-2.06l-1.42 1.42C8.27 19.99 10.51 21 13 21c4.97 0 9-4.03 9-9s-4.03-9-9-9zm-1 5v5l4.25 2.52.77-1.28-3.52-2.09V8z"}),"HistoryOutlined"),default_1$6=HistoryOutlined.default=_default$6,Warning={},_interopRequireDefault$5=interopRequireDefaultExports,default_1$5=(Object.defineProperty(Warning,"__esModule",{value:!0}),Warning.default=void 0),_createSvgIcon$5=_interopRequireDefault$5(requireCreateSvgIcon()),_jsxRuntime$5=jsxRuntimeExports,_default$5=(0,_createSvgIcon$5.default)((0,_jsxRuntime$5.jsx)("path",{d:"M1 21h22L12 2 1 21zm12-3h-2v-2h2v2zm0-4h-2v-4h2v4z"}),"Warning"),default_1$5=Warning.default=_default$5,OpenInNew={},_interopRequireDefault$4=interopRequireDefaultExports,default_1$4=(Object.defineProperty(OpenInNew,"__esModule",{value:!0}),OpenInNew.default=void 0),_createSvgIcon$4=_interopRequireDefault$4(requireCreateSvgIcon()),_jsxRuntime$4=jsxRuntimeExports,_default$4=(0,_createSvgIcon$4.default)((0,_jsxRuntime$4.jsx)("path",{d:"M19 19H5V5h7V3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2v-7h-2v7zM14 3v2h3.59l-9.83 9.83 1.41 1.41L19 6.41V10h2V3h-7z"}),"OpenInNew"),default_1$4=OpenInNew.default=_default$4,StopCircle={},_interopRequireDefault$3=interopRequireDefaultExports,default_1$3=(Object.defineProperty(StopCircle,"__esModule",{value:!0}),StopCircle.default=void 0),_createSvgIcon$3=_interopRequireDefault$3(requireCreateSvgIcon()),_jsxRuntime$3=jsxRuntimeExports,_default$3=(0,_createSvgIcon$3.default)((0,_jsxRuntime$3.jsx)("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm4 14H8V8h8v8z"}),"StopCircle"),default_1$3=StopCircle.default=_default$3,FilterListOutlined={},_interopRequireDefault$2=interopRequireDefaultExports,default_1$2=(Object.defineProperty(FilterListOutlined,"__esModule",{value:!0}),FilterListOutlined.default=void 0),_createSvgIcon$2=_interopRequireDefault$2(requireCreateSvgIcon()),_jsxRuntime$2=jsxRuntimeExports,_default$2=(0,_createSvgIcon$2.default)((0,_jsxRuntime$2.jsx)("path",{d:"M10 18h4v-2h-4v2zM3 6v2h18V6H3zm3 7h12v-2H6v2z"}),"FilterListOutlined"),default_1$2=FilterListOutlined.default=_default$2,Refresh={},_interopRequireDefault$1=interopRequireDefaultExports,default_1$1=(Object.defineProperty(Refresh,"__esModule",{value:!0}),Refresh.default=void 0),_createSvgIcon$1=_interopRequireDefault$1(requireCreateSvgIcon()),_jsxRuntime$1=jsxRuntimeExports,_default$1=(0,_createSvgIcon$1.default)((0,_jsxRuntime$1.jsx)("path",{d:"M17.65 6.35C16.2 4.9 14.21 4 12 4c-4.42 0-7.99 3.58-7.99 8s3.57 8 7.99 8c3.73 0 6.84-2.55 7.73-6h-2.08c-.82 2.33-3.04 4-5.65 4-3.31 0-6-2.69-6-6s2.69-6 6-6c1.66 0 3.14.69 4.22 1.78L13 11h7V4l-2.35 2.35z"}),"Refresh"),default_1$1=Refresh.default=_default$1,Dashboard={},_interopRequireDefault=interopRequireDefaultExports,default_1=(Object.defineProperty(Dashboard,"__esModule",{value:!0}),Dashboard.default=void 0),_createSvgIcon=_interopRequireDefault(requireCreateSvgIcon()),_jsxRuntime=jsxRuntimeExports,_default=(0,_createSvgIcon.default)((0,_jsxRuntime.jsx)("path",{d:"M3 13h8V3H3v10zm0 8h8v-6H3v6zm10 0h8V11h-8v10zm0-18v6h8V3h-8z"}),"Dashboard");function _array_like_to_array$a(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function _array_without_holes$2(e){if(Array.isArray(e))return _array_like_to_array$a(e)}function _define_property$8(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _iterable_to_array$2(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function _non_iterable_spread$2(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _object_spread$7(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{},n=Object.keys(r);(n="function"==typeof Object.getOwnPropertySymbols?n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})):n).forEach(function(e){_define_property$8(t,e,r[e])})}return t}function ownKeys$2(e,t){var r=Object.keys(e);return Object.getOwnPropertySymbols&&(e=Object.getOwnPropertySymbols(e),r.push.apply(r,e)),r}function _object_spread_props$2(t,r){return r=null!=r?r:{},Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):ownKeys$2(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}),t}function _to_consumable_array$2(e){return _array_without_holes$2(e)||_iterable_to_array$2(e)||_unsupported_iterable_to_array$a(e)||_non_iterable_spread$2()}function _unsupported_iterable_to_array$a(e,t){var r;if(e)return"string"==typeof e?_array_like_to_array$a(e,t):"Map"===(r="Object"===(r=Object.prototype.toString.call(e).slice(8,-1))&&e.constructor?e.constructor.name:r)||"Set"===r?Array.from(r):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?_array_like_to_array$a(e,t):void 0}function _ts_generator$7(n,o){var a,s,i,l={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]},e={next:t(0),throw:t(1),return:t(2)};return"function"==typeof Symbol&&(e[Symbol.iterator]=function(){return this}),e;function t(r){return function(e){var t=[r,e];if(a)throw new TypeError("Generator is already executing.");for(;l;)try{if(a=1,s&&(i=2&t[0]?s.return:t[0]?s.throw||((i=s.return)&&i.call(s),0):s.next)&&!(i=i.call(s,t[1])).done)return i;switch(s=0,(t=i?[2&t[0],i.value]:t)[0]){case 0:case 1:i=t;break;case 4:return l.label++,{value:t[1],done:!1};case 5:l.label++,s=t[1],t=[0];continue;case 7:t=l.ops.pop(),l.trys.pop();continue;default:if(!(i=0<(i=l.trys).length&&i[i.length-1])&&(6===t[0]||2===t[0])){l=0;continue}if(3===t[0]&&(!i||t[1]>i[0]&&t[1]<i[3]))l.label=t[1];else if(6===t[0]&&l.label<i[1])l.label=i[1],i=t;else{if(!(i&&l.label<i[2])){i[2]&&l.ops.pop(),l.trys.pop();continue}l.label=i[2],l.ops.push(t)}}t=o.call(n,l)}catch(e){t=[6,e],s=0}finally{a=i=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}}}var _obj,default_1=Dashboard.default=_default,FETCH_FLOWS="flow-center/FETCH_FLOWS",ADD_NEW_FLOW="flow-center/ADD_NEW_FLOW",IS_REVISIONS_EXIST_ON_SERVER="flow-center/IS_REVISIONS_EXIST_ON_SERVER",SET_IS_REVISIONS_EXIST_ON_SERVER="flow-center/SET_IS_REVISIONS_EXIST_ON_SERVER",SET_FETCHING_FLOWS="flow-center/SET_FETCHING_FLOWS",SET_OPEN_TEMPLATE="flow-center/SET_OPEN_TEMPLATE",SET_TEMPLATE_SELECTED="flow-center/SET_TEMPLATE_SELECTED",SET_TEMPLATES="flow-center/SET_TEMPLATES",SET_FILTERED_TEMPLATES_ACTION="flow-center/SET_FILTERED_TEMPLATES_ACTION",FETCH_TAGS="flow-center/FETCH_TAGS",SET_TAGS="flow-center/SET_TAGS",SET_TAGS_TO_STORE="flow-center/SET_TAGS_TO_STORE",SET_CATEGORIES="flow-center/SET_CATEGORIES",SET_TEMPLATES_AUTHORS="flow-center/SET_TEMPLATES_AUTHORS",SET_SELECTED_FILTERS="flow-center/SET_SELECTED_FILTERS",SET_TAG="flow-center/SET_TAG",SET_FLOWS="flow-center/SET_FLOWS",SET_NOTEBOOKS="flow-center/SET_NOTEBOOKS",FETCH_NOTEBOOKS="flow-center/FETCH_NOTEBOOKS",TOGGLE_IS_SEARCHING="flow-center/TOGGLE_IS_SEARCHING",TOGGLE_IS_SEARCHING_LOADING="flow-center/TOGGLE_IS_SEARCHING_LOADING",SEARCH_TEMPLATES="flow-center/SEARCH_TEMPLATES",SET_SEARCHED="flow-center/SET_SEARCHED",SET_SEARCHED_TEMPLATES="flow-center/SET_SEARCHED_TEMPLATES",SET_CONFIG="flow-center/SET_CONFIG",TOGGLE_STATE_CREATE_NEW_FLOW="flow-center/TOGGLE_STATE_CREATE_NEW_FLOW",SET_SHOULD_CREATE_INITIAL_FLOWS="flow-center/SET_SHOULD_CREATE_INITIAL_FLOWS",GET_NODE_RED_VERSION_EDGE="flow-center/GET_NODE_RED_VERSION_EDGE",setFetchingFlows=createAction(SET_FETCHING_FLOWS),isRevisionsExistOnServer=createAction(IS_REVISIONS_EXIST_ON_SERVER),setOpenTemplate=createAction(SET_OPEN_TEMPLATE),setTemplateSelected=createAction(SET_TEMPLATE_SELECTED),setTemplatesAction=createAction(SET_TEMPLATES),setFilteredTemplatesAction=createAction(SET_FILTERED_TEMPLATES_ACTION),setTags=(createAction(FETCH_TAGS),createAction(SET_TAGS)),setTagsToStore=createAction(SET_TAGS_TO_STORE),setCategories=createAction(SET_CATEGORIES),setTemplatesAuthors=createAction(SET_TEMPLATES_AUTHORS),setSelectedFilters=createAction(SET_SELECTED_FILTERS),fetchFlows=(createAction(SET_TAG),createAction(FETCH_FLOWS)),fetchNotebooks=createAction(FETCH_NOTEBOOKS),setFlows=createAction(SET_FLOWS),setNotebooks=createAction(SET_NOTEBOOKS),addNewFlow=createAction(ADD_NEW_FLOW),toggleIsSearching=createAction(TOGGLE_IS_SEARCHING),toggleIsSearchingLoading=createAction(TOGGLE_IS_SEARCHING_LOADING),searchTemplates=createAction(SEARCH_TEMPLATES),setSearched=createAction(SET_SEARCHED),setSearchedTemplates=createAction(SET_SEARCHED_TEMPLATES),setFlowCenterConfig=createAction(SET_CONFIG),toggleStateCreateNewFlow=createAction(TOGGLE_STATE_CREATE_NEW_FLOW),setShouldCreateInitialFlows=createAction(SET_SHOULD_CREATE_INITIAL_FLOWS),flowsReducer=(createAction(GET_NODE_RED_VERSION_EDGE),createReducer({flows:[],notebooks:[],shouldCreateInitialFlows:!1,fetchingFlows:!1,templateToOpen:{},isTemplateSelected:!1,tags:[],categories:[],templatesAuthors:[],templates:[],filteredTemplates:[],selectedFilters:{},isSearching:!1,isSearchingLoading:!1,searched:"",searchedTemplates:null,config:{isFullScreen:!1,automateFullScreen:!1,zIndex:0,graphQLEndpoint:"",defaultCluster:""},isLoadingCreateNewFlow:!1,isRevisionsExistOnServer:!1},(_define_property$8(_obj={},FETCH_FLOWS,function(e){return _object_spread$7({},e)}),_define_property$8(_obj,ADD_NEW_FLOW,function(e,t){t=t.payload;return _object_spread_props$2(_object_spread$7({},e),{flows:[t].concat(_to_consumable_array$2(e.flows))})}),_define_property$8(_obj,SET_FETCHING_FLOWS,function(e,t){t=t.payload;return _object_spread_props$2(_object_spread$7({},e),{fetchingFlows:t})}),_define_property$8(_obj,SET_OPEN_TEMPLATE,function(e,t){t=t.payload;return _object_spread_props$2(_object_spread$7({},e),{templateToOpen:t})}),_define_property$8(_obj,SET_TEMPLATE_SELECTED,function(e,t){t=t.payload;return _object_spread_props$2(_object_spread$7({},e),{isTemplateSelected:t})}),_define_property$8(_obj,SET_TAGS,function(e,t){t=t.payload;return _object_spread_props$2(_object_spread$7({},e),{tags:t})}),_define_property$8(_obj,SET_TAGS_TO_STORE,function(e,t){t=t.payload;return _object_spread_props$2(_object_spread$7({},e),{tags:t})}),_define_property$8(_obj,SET_CATEGORIES,function(e,t){t=t.payload;return _object_spread_props$2(_object_spread$7({},e),{categories:t})}),_define_property$8(_obj,SET_TEMPLATES_AUTHORS,function(e,t){t=t.payload;return _object_spread_props$2(_object_spread$7({},e),{templatesAuthors:t})}),_define_property$8(_obj,SET_SELECTED_FILTERS,function(e,t){t=t.payload;return _object_spread_props$2(_object_spread$7({},e),{selectedFilters:t})}),_define_property$8(_obj,SET_TEMPLATES,function(e,t){t=t.payload;return _object_spread_props$2(_object_spread$7({},e),{templates:t})}),_define_property$8(_obj,SET_FILTERED_TEMPLATES_ACTION,function(e,t){t=t.payload;return _object_spread_props$2(_object_spread$7({},e),{filteredTemplates:t})}),_define_property$8(_obj,SET_TAG,function(e,t){t=t.payload;return _object_spread_props$2(_object_spread$7({},e),{tag:t})}),_define_property$8(_obj,SET_FLOWS,function(e,t){t=t.payload;return _object_spread_props$2(_object_spread$7({},e),{flows:t})}),_define_property$8(_obj,SET_NOTEBOOKS,function(e,t){t=t.payload;return _object_spread_props$2(_object_spread$7({},e),{notebooks:t})}),_define_property$8(_obj,TOGGLE_IS_SEARCHING,function(e,t){t=t.payload;return _object_spread_props$2(_object_spread$7({},e),{isSearching:t})}),_define_property$8(_obj,TOGGLE_IS_SEARCHING_LOADING,function(e,t){t=t.payload;return _object_spread_props$2(_object_spread$7({},e),{isSearchingLoading:t})}),_define_property$8(_obj,SET_SEARCHED,function(e,t){t=t.payload;return _object_spread_props$2(_object_spread$7({},e),{searched:t})}),_define_property$8(_obj,SET_SEARCHED_TEMPLATES,function(e,t){t=t.payload;return _object_spread_props$2(_object_spread$7({},e),{searchedTemplates:t})}),_define_property$8(_obj,SET_CONFIG,function(e,t){t=t.payload;return _object_spread_props$2(_object_spread$7({},e),{config:t})}),_define_property$8(_obj,TOGGLE_STATE_CREATE_NEW_FLOW,function(e,t){t=t.payload;return _object_spread_props$2(_object_spread$7({},e),{isLoadingCreateNewFlow:t})}),_define_property$8(_obj,SET_IS_REVISIONS_EXIST_ON_SERVER,function(e,t){t=t.payload;return _object_spread_props$2(_object_spread$7({},e),{isRevisionsExistOnServer:t})}),_define_property$8(_obj,SET_SHOULD_CREATE_INITIAL_FLOWS,function(e,t){t=t.payload;return _object_spread_props$2(_object_spread$7({},e),{shouldCreateInitialFlows:t})}),_obj))),namespace$2="flows";function fetchTagsSaga(){var n;return _ts_generator$7(this,function(e){switch(e.label){case 0:return[4,select(sessionTokenSelector)];case 1:return n=e.sent(),[4,takeLatest$1(FETCH_TAGS,function(t){var r;return _ts_generator$7(this,function(e){switch(e.label){case 0:return[4,fetchAllTags(t.payload.ids,n)];case 1:return void 0===(r=e.sent())?[3,3]:[4,put(setTags(r))];case 2:e.sent(),e.label=3;case 3:return[2]}})})];case 2:return e.sent(),[2]}})}function fetchFlowsSaga(){return _ts_generator$7(this,function(e){switch(e.label){case 0:return[4,takeLatest$1(FETCH_FLOWS,function(t){var r,n,o;return _ts_generator$7(this,function(e){switch(e.label){case 0:return[4,put(setFetchingFlows(!0))];case 1:return e.sent(),[4,select(sessionTokenSelector)];case 2:switch(r=e.sent(),o=300,t.payload.ownerType){case ENGINE_OWNER_TYPES.ORGANIZATION:return[3,3];case ENGINE_OWNER_TYPES.MINE:return[3,5];case ENGINE_OWNER_TYPES.SHARED:return[3,7];case ENGINE_OWNER_TYPES.NOTEBOOKS:return[3,9]}return[3,11];case 3:return[4,fetchFlows$1({name:t.payload.name,owned:!1,offset:0,limit:o,authToken:r})];case 4:return n=e.sent(),[3,12];case 5:return[4,fetchFlows$1({name:t.payload.name,owned:!0,offset:0,limit:o,authToken:r})];case 6:return n=e.sent(),[3,12];case 7:return[4,fetchFlows$1({name:t.payload.name,owned:!1,offset:0,limit:o,authToken:r})];case 8:return n=e.sent(),[3,12];case 9:return[4,fetchFlows$1({name:t.payload.name,owned:!0,offset:0,limit:o,authToken:r,isNotebook:!0})];case 10:return n=e.sent(),[3,12];case 11:return[3,12];case 12:return void 0!==n&&n?0!==n.data.engines.records.length||t.payload.name?[3,14]:[4,put(setShouldCreateInitialFlows(!0))]:[3,18];case 13:e.sent(),e.label=14;case 14:return t.payload.ownerType!==ENGINE_OWNER_TYPES.NOTEBOOKS?[3,16]:[4,put(setNotebooks(n.data.engines.records))];case 15:return e.sent(),[3,18];case 16:return[4,put(setFlows(n.data.engines.records))];case 17:e.sent(),e.label=18;case 18:return[4,put(toggleIsSearchingLoading(!1))];case 19:return e.sent(),[4,put(setFetchingFlows(!1))];case 20:return e.sent(),[2]}})})];case 1:return e.sent(),[2]}})}function fetchNotebooksSaga(){return _ts_generator$7(this,function(e){switch(e.label){case 0:return[4,takeLatest$1(FETCH_NOTEBOOKS,function(t){var r;return _ts_generator$7(this,function(e){switch(e.label){case 0:return[4,select(sessionTokenSelector)];case 1:return r=e.sent(),[4,fetchFlows$1({name:t.payload.name,owned:!0,offset:0,limit:300,authToken:r,isNotebook:!0})];case 2:return void 0!==(r=e.sent())&&r?[4,put(setNotebooks(r.data.engines.records))]:[3,4];case 3:e.sent(),e.label=4;case 4:return[4,put(toggleIsSearchingLoading(!1))];case 5:return e.sent(),[2]}})})];case 1:return e.sent(),[2]}})}function searchTemplatesSaga(){return _ts_generator$7(this,function(e){switch(e.label){case 0:return[4,takeLatest$1(SEARCH_TEMPLATES,function(){var t,r;return _ts_generator$7(this,function(e){switch(e.label){case 0:return[4,select(sessionTokenSelector)];case 1:return t=e.sent(),[4,call(fetchTemplateGallery,t,{isPublic:!0,limit:200})];case 2:return(r=e.sent())&&r.data&&r.data.flowTemplates&&r.data.flowTemplates.records&&0<r.data.flowTemplates.records.length?[4,put(setTemplatesAction(r.data.flowTemplates.records))]:[3,5];case 3:return e.sent(),[4,put(setFilteredTemplatesAction(r.data.flowTemplates.records))];case 4:e.sent(),e.label=5;case 5:return[2]}})})];case 1:return e.sent(),[2]}})}function isRevisionsExistOnServerSaga(){return _ts_generator$7(this,function(e){switch(e.label){case 0:return[4,takeLatest$1(IS_REVISIONS_EXIST_ON_SERVER,function(){var t,r;return _ts_generator$7(this,function(e){switch(e.label){case 0:return[4,select(sessionTokenSelector)];case 1:r=e.sent(),e.label=2;case 2:return e.trys.push([2,4,,6]),[4,call(isRevisionsExistOnServerRequest,r)];case 3:return t=e.sent(),[3,6];case 4:return e.sent(),[4,put({type:SET_IS_REVISIONS_EXIST_ON_SERVER,payload:!1})];case 5:return e.sent(),[3,6];case 6:return lodashExports.get(t,"data.flowRevisions","")?[4,put({type:SET_IS_REVISIONS_EXIST_ON_SERVER,payload:!0})]:[3,8];case 7:e.sent(),e.label=8;case 8:return[2]}})})];case 1:return e.sent(),[2]}})}function flowsSaga(){return _ts_generator$7(this,function(e){switch(e.label){case 0:return[4,all([fetchTagsSaga(),fetchNotebooksSaga(),fetchFlowsSaga(),searchTemplatesSaga(),isRevisionsExistOnServerSaga()])];case 1:return e.sent(),[2]}})}function _ts_generator$6(n,o){var a,s,i,l={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]},e={next:t(0),throw:t(1),return:t(2)};return"function"==typeof Symbol&&(e[Symbol.iterator]=function(){return this}),e;function t(r){return function(e){var t=[r,e];if(a)throw new TypeError("Generator is already executing.");for(;l;)try{if(a=1,s&&(i=2&t[0]?s.return:t[0]?s.throw||((i=s.return)&&i.call(s),0):s.next)&&!(i=i.call(s,t[1])).done)return i;switch(s=0,(t=i?[2&t[0],i.value]:t)[0]){case 0:case 1:i=t;break;case 4:return l.label++,{value:t[1],done:!1};case 5:l.label++,s=t[1],t=[0];continue;case 7:t=l.ops.pop(),l.trys.pop();continue;default:if(!(i=0<(i=l.trys).length&&i[i.length-1])&&(6===t[0]||2===t[0])){l=0;continue}if(3===t[0]&&(!i||t[1]>i[0]&&t[1]<i[3]))l.label=t[1];else if(6===t[0]&&l.label<i[1])l.label=i[1],i=t;else{if(!(i&&l.label<i[2])){i[2]&&l.ops.pop(),l.trys.pop();continue}l.label=i[2],l.ops.push(t)}}t=o.call(n,l)}catch(e){t=[6,e],s=0}finally{a=i=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}}}function flowCenterRootSaga(){return _ts_generator$6(this,function(e){switch(e.label){case 0:return[4,all([flowsSaga()])];case 1:return e.sent(),[2]}})}var namespace$1="newFlowClusterID",initialState$1={newFlowClusterID:""},newFlowClusterIDSlice=createSlice({name:namespace$1,initialState:initialState$1,reducers:{newFlowClusterIDAction:function(e,t){e.newFlowClusterID=t.payload}}}),newFlowClusterIDSelector=function(e){return(null==e?void 0:e[namespace$1])||null},newFlowClusterIDAction=newFlowClusterIDSlice.actions.newFlowClusterIDAction,newFlowClusterIDnReducer=newFlowClusterIDSlice.reducer,namespace="engineDistributionType",initialState={engineDistributionType:"instance_locked"},engineDistributionSlice=createSlice({name:namespace,initialState:initialState,reducers:{engineDistributionTypeAction:function(e,t){e.engineDistributionType=t.payload}}}),engineDistributionTypeReducer=(engineDistributionSlice.actions.engineDistributionTypeAction,engineDistributionSlice.reducer);function _define_property$7(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var newFlowClusterIDNameSpace="newFlowClusterID",engineDistributionTypeNameSpace="engineDistributionType",flowCenterDialogNameSpace="flowCenterDialog";function getFlowCenterModule(){var e;return{id:"flow-center",reducerMap:(_define_property$7(e={},namespace$2,flowsReducer),_define_property$7(e,newFlowClusterIDNameSpace,newFlowClusterIDnReducer),_define_property$7(e,engineDistributionTypeNameSpace,engineDistributionTypeReducer),_define_property$7(e,flowCenterDialogNameSpace,flowCenterDialogReducer),e),sagas:[flowCenterRootSaga],initialActions:[]}}function _array_like_to_array$9(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function _array_with_holes$9(e){if(Array.isArray(e))return e}function _array_without_holes$1(e){if(Array.isArray(e))return _array_like_to_array$9(e)}function _define_property$6(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _iterable_to_array$1(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function _iterable_to_array_limit$9(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,a=[],s=!0,i=!1;try{for(r=r.call(e);!(s=(n=r.next()).done)&&(a.push(n.value),!t||a.length!==t);s=!0);}catch(e){i=!0,o=e}finally{try{s||null==r.return||r.return()}finally{if(i)throw o}}return a}}function _non_iterable_rest$9(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _non_iterable_spread$1(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _object_spread$6(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{},n=Object.keys(r);(n="function"==typeof Object.getOwnPropertySymbols?n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})):n).forEach(function(e){_define_property$6(t,e,r[e])})}return t}function _sliced_to_array$9(e,t){return _array_with_holes$9(e)||_iterable_to_array_limit$9(e,t)||_unsupported_iterable_to_array$9(e,t)||_non_iterable_rest$9()}function _to_consumable_array$1(e){return _array_without_holes$1(e)||_iterable_to_array$1(e)||_unsupported_iterable_to_array$9(e)||_non_iterable_spread$1()}function _unsupported_iterable_to_array$9(e,t){var r;if(e)return"string"==typeof e?_array_like_to_array$9(e,t):"Map"===(r="Object"===(r=Object.prototype.toString.call(e).slice(8,-1))&&e.constructor?e.constructor.name:r)||"Set"===r?Array.from(r):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?_array_like_to_array$9(e,t):void 0}store.addModules([getFlowCenterModule()]);var useStyles$e=makeStyles()(function(){return{icon:{fontSize:"16px!important",minWidth:"0px!important",paddingLeft:"8px!important",paddingRight:"8px!important","& svg":{fill:"#555F7C!important"}},text:{fontSize:"14px!important"},listItemText:{fontFamily:"Nunito",fontStyle:"normal!important",fontWeight:"normal!important",fontSize:"14px!important",lineHeight:"19px!important",letterSpacing:"-1.30385e-09px!important"},listItemTextFilters:{fontFamily:"Nunito",fontStyle:"normal!important",fontWeight:"normal!important",fontSize:"12px!important",lineHeight:"16px!important",letterSpacing:"-1.30385e-09px!important",wordBreak:"break-word"},category:{fontFamily:"Nunito",fontStyle:"normal!important",color:"#2A323C!important",fontSize:"14px!important",marginright:"6px!important",fontWeight:"500!important",paddingLeft:"8px!important"},formControl:{marginBottom:"10px!important",marginTop:"10px!important"},marginLeft:{paddingLeft:"8px!important",paddingRight:"8px!important"},boxBackground:{height:"100%!important"},paddingLeft:{paddingLeft:"0px!important",minWidth:"0px!important",borderRadius:"4px!important"},fullScreenMode:{marginTop:"64.5px!important"},selectedPaddingLeft:{background:"#F2F5F9 !important",color:"#1871E8 !important"},group:{paddingLeft:"8px!important"},filterTitleContainer:{display:"flex",alignItems:"center!important"},expandIconClass:{display:"flex",paddingLeft:"5px!important","&:hover":{cursor:"pointer!important"}},scroll:{overflowY:"auto",overflowX:"hidden"}}});function Navigation(e){var t=e.categories,r=e.filterers,n=e.screen,o=e.onSetType,a=e.showNavigation,s=e.fullScreen,e=e.automateFullScreen,i=useStyles$e().classes,l=useDispatch(),c=_sliced_to_array$9(reactExports.useState([]),2),u=c[0],p=c[1],d=useSelector(function(e){return e.flows.selectedFilters}),m=useSelector(function(e){return e.flows.isSearching});var f=function(t){var r=u.indexOf(t);p(-1===r?function(e){return e.push(t),_to_consumable_array$1(e)}:function(e){return e.splice(r,1),_to_consumable_array$1(e)})},x=function(e,t){var r=_object_spread$6({},d),n=d[e];r[e]=[],n&&(r[e]=_to_consumable_array$1(n)),r[e].includes(t)?r[e].splice(r[e].indexOf(t),1):r[e].push(t),0===r[e].length&&delete r[e],l(setSelectedFilters(r))};reactExports.useEffect(function(){x(ENGINE_FILTER_TYPES.PUBLIC,"1")},[]);return jsxRuntimeExports.jsx(Box,{className:i.boxBackground,children:jsxRuntimeExports.jsxs(Box,{className:i.marginLeft,children:[jsxRuntimeExports.jsx(List,{className:e?i.fullScreenMode:"",children:t.map(function(e){var t=e.key,e=e.text;return jsxRuntimeExports.jsxs(ListItem,{id:"flow-center-navigation-listItem-conatiner","data-test":"flow-center-navigation-tabs-".concat(t),button:!0,disableRipple:!0,selected:n.toLowerCase()===t&&!m,onClick:function(){return e=t,l(toggleIsSearching(!1)),l(toggleIsSearchingLoading(!1)),l(setSearched("")),l(setSearchedTemplates(null)),l(fetchFlows("notebooks"===e?{name:"",ownerType:ENGINE_OWNER_TYPES.NOTEBOOKS}:{name:"",ownerType:ENGINE_OWNER_TYPES.MINE})),void o(e);var e},className:i.paddingLeft,classes:{selected:i.selectedPaddingLeft},children:[jsxRuntimeExports.jsx(ListItemIcon,{className:i.icon,children:(e=>{switch(e){case"mine":return n.toLowerCase()!==e||m?jsxRuntimeExports.jsx("img",{width:"24px",height:"24px",src:img$H,alt:"myFlowsBlue"}):jsxRuntimeExports.jsx("img",{width:"24px",height:"24px",src:img$G,alt:"myFlows"});case"templates":return n.toLowerCase()!==e||m?jsxRuntimeExports.jsx("img",{width:"24px",height:"24px",src:img$E,alt:"templatesBlue"}):jsxRuntimeExports.jsx("img",{width:"24px",height:"24px",src:img$D,alt:"templates"});case"containers":return jsxRuntimeExports.jsx("img",{width:"24px",height:"24px",src:img$n,alt:"containerDashboard"});case"notebooks":return n.toLowerCase()!==e||m?jsxRuntimeExports.jsx("img",{width:"24px",height:"24px",src:img$H,alt:"myFlowsBlue"}):jsxRuntimeExports.jsx("img",{width:"24px",height:"24px",src:img$G,alt:"myFlows"});case"WorkOutlineOutlinedIcon":return jsxRuntimeExports.jsx(default_1$9,{});case"PeopleAltOutlinedIcon":return jsxRuntimeExports.jsx(default_1$8,{});case"PersonOutlineOutlinedIcon":return jsxRuntimeExports.jsx(default_1$7,{});default:return jsxRuntimeExports.jsx(default_1$6,{})}})(t)}),jsxRuntimeExports.jsx(ListItemText,{"data-test":"flow-center-navigation-listItemText",className:"flow-center-navigation-listItemText",primary:e,classes:{primary:i.listItemText}})]},t)})}),a&&(c=e?"calc(100vh - 64px - 16px - 86px - 8px - 54px":"calc(100vh - 64px - 16px - 86px - 8px - ".concat(s?"0px":"54px",")"),jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(Divider,{}),jsxRuntimeExports.jsx("div",{className:i.scroll,style:{height:c},children:r.map(function(e,n){var t=e.text,o=e.group,e=e.options;return jsxRuntimeExports.jsx("div",{children:jsxRuntimeExports.jsxs(FormControl,{component:"fieldset",className:i.formControl,"data-test":"flow-center-".concat(o,"-container"),id:"flow-center-".concat(o,"-container"),children:[jsxRuntimeExports.jsxs("div",{className:i.filterTitleContainer,children:[jsxRuntimeExports.jsx(FormLabel,{className:i.category,component:"legend",children:t}),jsxRuntimeExports.jsx("div",{className:i.expandIconClass,onClick:function(){return f(n)},children:u.includes(n)?jsxRuntimeExports.jsx(default_1$d,{fontSize:"small",style:{fill:"#555F7C",width:"18px!important",height:"18px!important"}}):jsxRuntimeExports.jsx(default_1$c,{fontSize:"small",style:{fill:"#555F7C",width:"18px!important",height:"18px!important"}})})]}),jsxRuntimeExports.jsx("div",{children:jsxRuntimeExports.jsx(FormGroup,{className:i.group,children:e.map(function(e){var t=e.text,r=e.value;if(!u.includes(n))return jsxRuntimeExports.jsx(FormControlLabel,{control:jsxRuntimeExports.jsx(Checkbox,{checked:d[o]&&d[o].includes(r),name:r,color:"primary",onClick:function(){return x(o,r)}}),label:jsxRuntimeExports.jsx(Typography,{"data-test":"flow-center-flows-table-optionText",className:i.listItemTextFilters,children:t}),"data-test":"flow-center-filter-item",id:"flow-center-filter-item"},"".concat(o,"-").concat(r))})})})]},o+n)},o+n)})})]}))]})})}function _array_like_to_array$8(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function _array_with_holes$8(e){if(Array.isArray(e))return e}function _iterable_to_array_limit$8(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,a=[],s=!0,i=!1;try{for(r=r.call(e);!(s=(n=r.next()).done)&&(a.push(n.value),!t||a.length!==t);s=!0);}catch(e){i=!0,o=e}finally{try{s||null==r.return||r.return()}finally{if(i)throw o}}return a}}function _non_iterable_rest$8(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _sliced_to_array$8(e,t){return _array_with_holes$8(e)||_iterable_to_array_limit$8(e,t)||_unsupported_iterable_to_array$8(e,t)||_non_iterable_rest$8()}function _unsupported_iterable_to_array$8(e,t){var r;if(e)return"string"==typeof e?_array_like_to_array$8(e,t):"Map"===(r="Object"===(r=Object.prototype.toString.call(e).slice(8,-1))&&e.constructor?e.constructor.name:r)||"Set"===r?Array.from(r):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?_array_like_to_array$8(e,t):void 0}var MIN_NUM_ITEM_ON_ROW=3,useStyles$d=makeStyles()(function(e){return{container:{marginLeft:"12px!important"},cardRoot:{display:"flex",flexDirection:"column",justifyContent:"center!important",border:"0.5px solid #D5DFE9!important",boxShadow:"none!important",borderRadius:"4px!important",marginRight:"10px!important"},cardContainer:{marginTop:"20px!important",marginLeft:"20px!important",marginBottom:"15px!important",marginRight:"20px!important",maxHeight:"150px",minHeight:"150px",display:"flex",flexDirection:"column"},title:{fontFamily:"Nunito",fontStyle:"normal!important",fontWeight:600,fontSize:"16px!important",lineHeight:"22px!important",letterSpacing:"-1.30385e-09px!important",wordBreak:"break-word!important",cursor:"pointer",color:"#2A323C!important"},subtitle:{fontFamily:"Nunito",fontStyle:"normal!important",fontWeight:500,fontSize:"12px!important",lineHeight:"16px!important",letterSpacing:"-1.30385e-09px!important",color:"#5C6269!important",wordWrap:"break-word!important"},veritoneCertifiedContainer:{display:"flex",marginTop:"10px!important"},veritoneCertified:{fontFamily:"Nunito",fontStyle:"normal!important",fontWeight:500,fontSize:"10px!important",lineHeight:"18px!important",letterSpacing:"-1.30385e-09px!important",wordWrap:"break-word!important",color:"#2A323C!important",marginLeft:"4px!important"},pos:{marginBottom:12},centerButton:{justifyContent:"center!important"},cardContent:{padding:"0px!important",height:"120px!important",textOverflow:"ellipsis!important"},titleContent:{height:"82px!important",overflow:"auto"},bottomButton:{marginTop:"10px",padding:"0px!important",display:"flex",height:"30px!important"},box:{display:"flex",marginTop:e.spacing(3.2),marginBottom:e.spacing(3.2)},viewAllButton:{color:"#6098D1!important",textTransform:"none!important",fontFamily:"Nunito",fontStyle:"normal!important",fontWeight:"normal!important",fontSize:"12px!important",lineHeight:"16px!important",marginRight:"24px!important",letterSpacing:"-1.30385e-09px!important"},createFlowButton:{textTransform:"none!important",fontFamily:"Nunito",fontStyle:"normal!important",fontWeight:600,fontSize:"12px!important",lineHeight:"16px!important",marginLeft:"0px!important",padding:"6px 12px 6px 12px!important",background:e.palette.background.paper,color:"#1871E8!important",letterSpacing:"0.02857em"},viewDetailsButton:{textTransform:"none!important",fontFamily:"Nunito",fontStyle:"normal!important",fontWeight:600,fontSize:"12px!important",lineHeight:"16px!important",background:e.palette.background.paper,color:"#6098D1!important",letterSpacing:"0.02857em"},createBlankFlowButton:{display:"flex",justifyContent:"center!important","& svg":{fill:"#555F7C!important"}},createBlankFlowLayout:{display:"flex",flexDirection:"column"},lowercaseButton:{textTransform:"none!important",fontFamily:"Nunito",fontStyle:"normal!important",fontWeight:600,fontSize:"14px!important",lineHeight:"19px!important",letterSpacing:"-1.30385e-09px!important"},text:{fontFamily:"Nunito",fontStyle:"normal!important",fontWeight:400,fontSize:"16px!important",lineHeight:"22px!important",letterSpacing:"-1.30385e-09px!important",color:"#2A323C!important"}}}),TemplateGallery=function(e){function t(e,t){e.data[t].records&&p(e.data[t].records),m(Math.min(MIN_NUM_ITEM_ON_ROW,e.data[t].records.length))}function r(e){s(ENGINE_OWNER_TYPES.TEMPLATES),l(setOpenTemplate({id:e.id,title:e.title})),i(!0)}function n(e){a(e)}var o=e.goToTemplateList,a=e.handleOpenFlowNameDialog,s=e.setScreen,i=e.handleOpenTemplateDetails,l=useDispatch(),c=useStyles$d().classes,e=_sliced_to_array$8(reactExports.useState([]),2),u=e[0],p=e[1],e=_sliced_to_array$8(reactExports.useState(0),2),d=e[0],m=e[1],f=useSelector(sessionTokenSelector),e=_sliced_to_array$8(reactExports.useState(!0),2),x=e[0],g=e[1];reactExports.useEffect(function(){u.length?setTimeout(function(){g(!1)},3e3):fetchTemplateGallery(f,{isPublic:!0}).then(function(e){setTimeout(function(){g(!1)},3e3),t(e,"flowTemplates")}).catch(function(e){devErrorLogger("error fetching flow templates: ".concat(JSON.stringify(e)))})},[t]);return jsxRuntimeExports.jsxs("div",{className:c.container,children:[jsxRuntimeExports.jsxs(Box,{mt:2,mb:2,className:c.box,children:[jsxRuntimeExports.jsx(Typography,{"data-test":"flow-center-flows-table-populatTemplates",className:c.text,style:{flexGrow:1},children:jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.1v6wsw",defaultMessage:"Popular Templates",description:"Templates screen"})}),jsxRuntimeExports.jsx(Button,{"data-test":"flow-center-template-gallery-viewAllTemplates",size:"small",className:c.viewAllButton,onClick:o,children:jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.viewall",defaultMessage:"View All",description:"View All Templates Button"})})]}),jsxRuntimeExports.jsx(Grid,{"data-test":"flow-center-templates-on-flows-page",container:!0,id:"flow-center-templates",children:u.slice(0,d).map(function(e,t){return jsxRuntimeExports.jsx(Grid,{"data-test":"flow-center-templatesGallery",item:!0,xs:4,children:jsxRuntimeExports.jsx(Card,{className:c.cardRoot,id:"flow-center-template-card",children:jsxRuntimeExports.jsxs("div",{className:c.cardContainer,children:[jsxRuntimeExports.jsxs(CardContent,{className:c.cardContent,children:[jsxRuntimeExports.jsxs("div",{className:c.titleContent,children:[x?jsxRuntimeExports.jsx(Skeleton,{variant:"rectangular",animation:"wave",width:80,height:15}):jsxRuntimeExports.jsx(Typography,{"data-test":"flow-center-flows-templateGallery-title",className:c.title,gutterBottom:!0,onClick:function(){return r(e)},children:null==e?void 0:e.title}),x?jsxRuntimeExports.jsx(Skeleton,{variant:"rectangular",animation:"wave",width:80,height:15,sx:{mt:"5px"}}):jsxRuntimeExports.jsx(Typography,{"data-test":"flow-center-flows-templateGallery-subtitle",className:c.subtitle,"aria-multiline":!0,variant:"body2",component:"p",children:e.subtitle})]}),jsxRuntimeExports.jsx("div",{className:c.veritoneCertifiedContainer,children:x?jsxRuntimeExports.jsx(Skeleton,{variant:"rectangular",animation:"wave",width:120,height:15}):jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx("img",{src:img$B,alt:"veritoneCertifiedIcon"}),jsxRuntimeExports.jsx(Typography,{"data-test":"flow-center-flows-templateGallery-veritoneCertified",className:c.veritoneCertified,component:"p",children:jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.veritonecertified",defaultMessage:"Veritone Certified",description:"Veritone Certified Template Text"})})]})})]}),jsxRuntimeExports.jsxs(CardActions,{className:c.bottomButton,children:[x?jsxRuntimeExports.jsx(Skeleton,{variant:"rectangular",animation:"wave",width:120,height:20}):jsxRuntimeExports.jsx(Button,{"data-test":"flow-center-template-gallery-createFlowFromTemplate-".concat(t),onClick:function(){return n(e.id)},id:"flow-center-create-flow-btn-".concat(t),size:"small",variant:"outlined",color:"primary",className:c.createFlowButton,children:jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.createflow",defaultMessage:"Create Flow",description:"Complete Flow Button Text"})}),x?jsxRuntimeExports.jsx(Skeleton,{variant:"rectangular",animation:"wave",width:120,height:15}):jsxRuntimeExports.jsx(Button,{"data-test":"flow-center-template-gallery-viewDetailsForTemplate-".concat(t),onClick:function(){return r(e)},size:"small",color:"primary",className:c.viewDetailsButton,children:jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.viewdetails",defaultMessage:"View Details",description:"View Details Button Text"})})]})]})})},e.title+t)})})]})},SHARED_MESSAGES={noTags:function(){return jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.ImtbH0",defaultMessage:"No Tags",description:"No Tags"})},createFlowFromTemplate:function(){return jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.CNPhK1",defaultMessage:"Create Flow From Template",description:"Create Flow From Template"})},overview:function(){return jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.6+BhsD",defaultMessage:"Overview",description:"Overview"})},developer:function(){return jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.GKqAH1",defaultMessage:"Developer",description:"Developer"})},certified:function(){return jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.1tTedK",defaultMessage:"Certified",description:"Certified"})},yes:function(){return jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.9U4lyw",defaultMessage:"Yes",description:"Yes"})},category:function(){return jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.RYa6+l",defaultMessage:"Category",description:"Category"})},tags:function(){return jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.ImtbH1",defaultMessage:"Tags",description:"Tags"})},active:function(){return jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.UkeQP9",defaultMessage:"Active",description:"Active"})},ready:function(){return jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.readymessage",defaultMessage:"Ready",description:"Ready"})},pending:function(){return jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.pendingmessage",defaultMessage:"Pending",description:"Pending"})},draft:function(){return jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.draftonotactive",defaultMessage:"Not active",description:"Draft to not active translation"})},viewDetails:function(){return jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.yFa4dd",defaultMessage:"View Details",description:"View Details"})},version:function(){return jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.i8EBVW",defaultMessage:"Version",description:"Version"})},openFlow:function(){return jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.IEIrEm",defaultMessage:"Open Flow",description:"Open Flow"})},alwaysUpFlow:function(){return jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.TYFJtu",defaultMessage:"Schedule Always Up Flow",description:"Schedule Always Up Flow"})},createFlowTemplate:function(){return jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.XSJ4Aa",defaultMessage:"Create Flow Template",description:"Create Flow Template"})},openFlowAdv:function(){return jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.IEIfEt",defaultMessage:"Open With Cluster",description:"Open With Cluster"})},deleteFlow:function(){return jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.MPiXf5",defaultMessage:"Delete Flow",description:"Delete Flow"})},confirmDelete:function(){return jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.mPEQWb",defaultMessage:"Confirm Delete",description:"Confirm Delete"})},exitFullScreen:function(){return jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.awe7uYa",defaultMessage:"Exit Fullscreen",description:"Exit Fullscreen"})},enterFullScreen:function(){return jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.stiZt+d",defaultMessage:"Enter Fullscreen",description:"Enter Fullscreen"})},closePanel:function(){return jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.kOsSpC",defaultMessage:"Close Panel",description:"Close Panel"})},copyFlowID:function(){return jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.1mDYO7",defaultMessage:"Copy Flow ID",description:"Copy Flow ID"})},hideFilters:function(){return jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.Iy59d3",defaultMessage:"Hide Filter",description:"Hide Filter"})},showFilters:function(){return jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.g5zZtA",defaultMessage:"Show Filter",description:"Show Filter"})},showMoreInformation:function(){return jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.ParFja",defaultMessage:"More Information",description:"More Information"})},hideMoreInformation:function(){return jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.DXuAKS",defaultMessage:"Close More Information",description:"Close More Information"})},engineIdHasBeenCopied:function(){return jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.CRvRbB",defaultMessage:"Engine ID has been copied",description:"copy of the engine id"})},cancel:function(){return jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.6PdOcy",defaultMessage:"Cancel",description:"Cancel"})},delete:function(){return jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.qviIFp",defaultMessage:"Delete",description:"Delete"})},noFlowsFound:function(){return jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.WX6wfG",defaultMessage:"No Flows Found",description:"No Flows Found"})},noFlowsFoundSubtitle:function(){return jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.54mq63",defaultMessage:"Click the ‘Create New Flow’ button below to create your first flow",description:"Click the ‘Create New Flow’ button below to create your first flow"})},createNewFlow:function(){return jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.54mq64",defaultMessage:"Create New Flow",description:"Create New Flow"})},chooseATemplate:function(){return jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.jhiPmN",defaultMessage:"Choose a Template",description:"Choose a Template"})},newFlow:function(){return jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.54mq65",defaultMessage:"New Flow",description:"New Flow"})},newNotebook:function(){return jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.newNotebookButton",defaultMessage:"New Notebook",description:"New Notebook"})},noSearchResultsFound:function(){return jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.OYovRP",defaultMessage:"No results found",description:"No results found"})},noSearchResultsFoundSubtitle:function(){return jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.No+Hwv",defaultMessage:"Sorry, there are no results for this search. Please try another search.",description:"Sorry, there are no results for this search. Please try another search."})},flowsCount:function(e){return jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.flowscount",defaultMessage:"Flows {flowsCount}",description:"Flows Count",values:{flowsCount:e}})},templatesCount:function(e){return jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.templatescount",defaultMessage:"Templates {templatesCount}",description:"Templates Count",values:{templatesCount:e}})},notebookCount:function(e){return jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.notebookCount",defaultMessage:"Notebooks {notebookCount}",description:"Notebook Count",values:{notebookCount:e}})}},useCommonStyles=makeStyles()(function(e){return{title:{fontFamily:"Nunito",fontStyle:"normal",fontWeight:600,fontSize:"18px!important",lineHeight:"24px!important",letterSpacing:"-1.30385e-09px!important",color:"#2A323C!important",paddingBottom:"2px!important",paddingLeft:"0px!important",paddingRight:"0px!important",paddingTop:"0px!important"},content:{fontFamily:"Nunito",fontWeight:"normal",fontStyle:"normal",fontSize:"14px!important",lineHeight:"20px!important",letterSpacing:"-1.30385e-09px!important",color:"#5C6269!important",paddingLeft:"0px!important",paddingRight:"0px!important",paddingBottom:"0px!important"},cancelButton:{fontFamily:"Nunito",fontStyle:"normal!important",fontWeight:600,fontSize:"14px!important",lineHeight:"19px!important",padding:"8px 15px!important",letterSpacing:"-1.30385e-09px!important",color:"#2A323C!important",textTransform:"none"},confirmationButton:{textTransform:"none!important",justifyContent:"start!important",borderRadius:e.shape.borderRadius,fontFamily:"Nunito",fontStyle:"normal!important",fontWeight:600,fontSize:"14px!important",lineHeight:"20px!important",letterSpacing:"-1.30385e-09px!important",background:"#0D62D2!important",color:e.palette.background.paper,padding:"8px 15px!important",marginLeft:"22px!important"},disabledButton:{background:"#efefef4d!important",color:"#00000042",textTransform:"none!important",justifyContent:"start!important",borderRadius:e.shape.borderRadius,fontFamily:"Nunito",fontStyle:"normal!important",fontWeight:600,fontSize:"14px!important",lineHeight:"20px!important",letterSpacing:"-1.30385e-09px!important",padding:"8px 15px!important",marginLeft:"22px!important"},actions:{padding:"0px!important",marginTop:"30px!important"},container:{padding:"30px!important"},active:{margin:"auto 10px",fontSize:"15px!important",color:"".concat(e.palette.success.main," !important"),lineHeight:"18px"},inactive:{margin:"auto 10px",fontSize:"15px!important",color:"".concat(e.palette.error.main," !important"),lineHeight:"18px"}}}),SHARED_DATE_TIME={getDate:function(e){return jsxRuntimeExports.jsx(FormattedDate,{value:e,day:"2-digit",month:"numeric",year:"numeric",hour:"2-digit",minute:"2-digit",hour12:!1})}};function _array_like_to_array$7(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function _array_with_holes$7(e){if(Array.isArray(e))return e}function asyncGeneratorStep$5(e,t,r,n,o,a,s){try{var i=e[a](s),l=i.value}catch(e){return void r(e)}i.done?t(l):Promise.resolve(l).then(n,o)}function _async_to_generator$5(i){return function(){var e=this,s=arguments;return new Promise(function(t,r){var n=i.apply(e,s);function o(e){asyncGeneratorStep$5(n,t,r,o,a,"next",e)}function a(e){asyncGeneratorStep$5(n,t,r,o,a,"throw",e)}o(void 0)})}}function _define_property$5(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _iterable_to_array_limit$7(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,a=[],s=!0,i=!1;try{for(r=r.call(e);!(s=(n=r.next()).done)&&(a.push(n.value),!t||a.length!==t);s=!0);}catch(e){i=!0,o=e}finally{try{s||null==r.return||r.return()}finally{if(i)throw o}}return a}}function _non_iterable_rest$7(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _object_spread$5(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{},n=Object.keys(r);(n="function"==typeof Object.getOwnPropertySymbols?n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})):n).forEach(function(e){_define_property$5(t,e,r[e])})}return t}function ownKeys$1(e,t){var r=Object.keys(e);return Object.getOwnPropertySymbols&&(e=Object.getOwnPropertySymbols(e),r.push.apply(r,e)),r}function _object_spread_props$1(t,r){return r=null!=r?r:{},Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):ownKeys$1(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}),t}function _sliced_to_array$7(e,t){return _array_with_holes$7(e)||_iterable_to_array_limit$7(e,t)||_unsupported_iterable_to_array$7(e,t)||_non_iterable_rest$7()}function _unsupported_iterable_to_array$7(e,t){var r;if(e)return"string"==typeof e?_array_like_to_array$7(e,t):"Map"===(r="Object"===(r=Object.prototype.toString.call(e).slice(8,-1))&&e.constructor?e.constructor.name:r)||"Set"===r?Array.from(r):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?_array_like_to_array$7(e,t):void 0}function _ts_generator$5(n,o){var a,s,i,l={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]},e={next:t(0),throw:t(1),return:t(2)};return"function"==typeof Symbol&&(e[Symbol.iterator]=function(){return this}),e;function t(r){return function(e){var t=[r,e];if(a)throw new TypeError("Generator is already executing.");for(;l;)try{if(a=1,s&&(i=2&t[0]?s.return:t[0]?s.throw||((i=s.return)&&i.call(s),0):s.next)&&!(i=i.call(s,t[1])).done)return i;switch(s=0,(t=i?[2&t[0],i.value]:t)[0]){case 0:case 1:i=t;break;case 4:return l.label++,{value:t[1],done:!1};case 5:l.label++,s=t[1],t=[0];continue;case 7:t=l.ops.pop(),l.trys.pop();continue;default:if(!(i=0<(i=l.trys).length&&i[i.length-1])&&(6===t[0]||2===t[0])){l=0;continue}if(3===t[0]&&(!i||t[1]>i[0]&&t[1]<i[3]))l.label=t[1];else if(6===t[0]&&l.label<i[1])l.label=i[1],i=t;else{if(!(i&&l.label<i[2])){i[2]&&l.ops.pop(),l.trys.pop();continue}l.label=i[2],l.ops.push(t)}}t=o.call(n,l)}catch(e){t=[6,e],s=0}finally{a=i=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}}}var useStyles$c=makeStyles()(function(){return{disabledButton:{background:"#efefef4d!important",color:"#00000042"},fullWidth:{width:"100%"},paddingDiv:{paddingTop:"20px"},buttonDiv:{display:"flex"}}}),FlowList=function(e){function t(e){return jsxRuntimeExports.jsx(TableSortLabel,{active:S===e,IconComponent:default_1$c,direction:S===e?j:"asc",onClick:function(){return le(e)},classes:{icon:x.sortIcon}})}function r(e){Z(!1),e&&deleteEngine(y,_).then(function(t){var e,r;t.data&&t.data.deleteEngine&&t.data.deleteEngine.id?(e=lodashExports.findIndex(E,function(e){return e.id===t.data.deleteEngine.id}),(r=JSON.parse(JSON.stringify(E))).splice(e,1),f(setFlows(r)),R("FLOW_DELETED_SUCCESS")):(F(""),R("FLOW_DELETED_FAIL"))}).catch(function(e){e.message.includes("engine state")?fetchEngine(y,1,_).then(function(e){F(e.data.engine.state),R("FLOW_DELETED_FAIL")}).catch(function(e){F(""),R("FLOW_DELETED_FAIL")}):(F(""),R("FLOW_DELETED_FAIL"))}).finally(function(){b(!0)})}function n(){b(!1)}function i(e){var e=e||y,t=H?"latest":ue(e),r="".concat(h,"/flow/").concat(e,"/").concat(t);s&&(r="".concat(h,"/notebook/").concat(e,"/").concat(t)),window.open(r,"_blank","noopener,noreferrer")}function l(e){return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(Typography,{"data-test":"flow-widget-executions-table-time",className:x.dateTime,children:e?SHARED_DATE_TIME.getDate(e):null}),jsxRuntimeExports.jsx(Typography,{"data-test":"flow-widget-executions-table-time-caption",variant:"caption",className:x.dateTimeSmall,children:e?DateTime_1.fromISO(e).toLocaleString(DateTime_1.TIME_SIMPLE):null})]})}function D(e,t){re(t)}function L(e){ne(parseInt(e.target.value,10)),re(0)}var o,a,c=e.onSelectFlow,k=e.simpleMode,P=e.screenName,u=e.selectedFlowId,s=e.notebooks,B=e.setFirstFlowId,z=e.zIndex,p=e.showTitle,p=void 0===p||p,G=e.setOpenFlowDetails,d=e.createFlowTemplate,m=e.setOpenAlwaysUpFlow,W=e.betaFeatures,f=useDispatch(),x=flowStyles().classes,g=useCommonStyles().classes,e=useStyles$c().classes,_=useSelector(sessionTokenSelector),E=useSelector(function(e){return s?e.flows.notebooks:e.flows.flows}),h=useSelector(automateUrlSelector),H=useSelector(function(e){return e.flows.isRevisionsExistOnServer}),w=_sliced_to_array$7(reactExports.useState(null),2),U=w[0],Y=w[1],w=_sliced_to_array$7(reactExports.useState("desc"),2),j=w[0],V=w[1],w=_sliced_to_array$7(reactExports.useState("modifiedDateTime"),2),S=w[0],q=w[1],w=_sliced_to_array$7(reactExports.useState(!1),2),K=w[0],Q=w[1],w=_sliced_to_array$7(reactExports.useState(""),2),y=w[0],J=w[1],w=_sliced_to_array$7(reactExports.useState(!1),2),X=w[0],Z=w[1],w=_sliced_to_array$7(reactExports.useState(!1),2),ee=w[0],b=w[1],w=_sliced_to_array$7(reactExports.useState(""),2),te=w[0],R=w[1],w=_sliced_to_array$7(reactExports.useState(""),2),T=w[0],F=w[1],w=_sliced_to_array$7(reactExports.useState(0),2),v=w[0],re=w[1],w=_sliced_to_array$7(reactExports.useState(100),2),N=w[0],ne=w[1],C=useSelector(newFlowClusterIDSelector)||null,w=_sliced_to_array$7(reactExports.useState([]),2),w=w[0],I=_sliced_to_array$7(reactExports.useState(!1),2),oe=I[0],ae=I[1],I=_sliced_to_array$7(reactExports.useState(!1),2),se=I[0],$=I[1],M=useSelector(controllerUrlSelector),I=useSelector(automateControllerUrlSelector),M=getBrowserSafeControllerUrl({controllerUrl:M,automateControllerUrl:I,automateUrl:h}),ie=(o=_async_to_generator$5(function(t,r,n){var o;return _ts_generator$5(this,function(e){switch(e.label){case 0:return n&&t&&r?(o="".concat(t,"/edge/v1/flow/").concat(n,"/always-up/api/status"),[4,getFlowStatus(o,r)]):($(!1),[2]);case 1:return(o=e.sent())&&"started"===o.status?$(!0):$(!1),[2]}})}),function(e,t,r){return o.apply(this,arguments)}),A=(reactExports.useEffect(function(){ie(M,_,y)},[y,_,M]),function(){ae(!1),f(newFlowClusterIDAction(""))}),I={EMPTY:null,ENGINE_COPIED:jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.sGx+Oj",defaultMessage:"Engine ID has been copied",description:"msg delete flow"}),FLOW_DELETED_SUCCESS:jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.2Trjxv",defaultMessage:"Flow has been successfully deleted",description:"msg delete flow"}),FLOW_DELETED_FAIL:T?jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.himmqH1",defaultMessage:"Flow has not been deleted. Invalid Delete State: {flowState}. Pause the flow and try again.",description:"msg delete flow failed from invalid state",values:{flowState:T}}):jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.himmqH",defaultMessage:"Flow has not been deleted",description:"msg delete flow failed"})},T={OPEN_FLOW_SETTINGS:jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center-header.hirqzH",defaultMessage:"Flow Settings",description:"msg flow settings"}),CANCEL_SELECT_CLUSTER:jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center-header.hiqxrt",defaultMessage:"Cancel",description:"msg cancel select cluster"}),OPEN_FLOW:jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center-header.jbxqqH",defaultMessage:"Open Flow",description:"msg open flow"}),CREATE_FLOW_ADVANCED:jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center-header.jbxqty",defaultMessage:"Create Flow Advanced",description:"msg create flow Advanced"})},le=function(e){V(S===e&&"asc"===j?"desc":"asc"),q(e)},ce=function(e,t,r){return t[r]<e[r]?-1:e[r]<t[r]?1:0},ue=function(t){var e=E.find(function(e){return e.id===t});if(e)return(e=e.builds).records.length?null==(e=e.records[0])?void 0:e.id:"latest"},O=E.find(function(e){return e.id===y});return E&&0===E.length?jsxRuntimeExports.jsx(NoResults,{}):jsxRuntimeExports.jsxs(Box,{mt:p?2:0,children:[p&&jsxRuntimeExports.jsx(Typography,{"data-test":"flow-center-screenName",className:x.text,style:{flexGrow:1},children:jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.+YGVPH",defaultMessage:"Screen Name: {screenName}",description:"{screenName}",values:{screenName:P}})}),jsxRuntimeExports.jsx(TableContainer,{id:"flow-center-flows-table","data-test":"flow-center-flows-table",children:jsxRuntimeExports.jsxs(Table,{className:x.table,children:[jsxRuntimeExports.jsx(TableHead,{children:jsxRuntimeExports.jsxs(TableRow,{children:[jsxRuntimeExports.jsxs(TableCell,{className:"".concat(x.title," ").concat(x.firstTitle," ").concat(x.borderBottomLineHeader),children:[jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.n60v17",defaultMessage:"Flow Name",description:"Flow Name"}),jsxRuntimeExports.jsx(TableSortLabel,{active:"name"===S,direction:"name"===S?j:"asc",onClick:function(){return le("name")},IconComponent:default_1$c,classes:{icon:x.sortIcon}})]}),jsxRuntimeExports.jsxs(TableCell,{className:"".concat(x.title," ").concat(x.borderBottomLineHeader),children:[jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.w+rzfS",defaultMessage:"Status",description:"Status"}),t("state")]}),jsxRuntimeExports.jsxs(TableCell,{className:"".concat(x.title," ").concat(x.borderBottomLineHeader),children:[jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.Pzb4Cj",defaultMessage:"Last Updated",description:"Last Updated"}),t("modifiedDateTime")]}),jsxRuntimeExports.jsxs(TableCell,{className:"".concat(x.title," ").concat(x.borderBottomLineHeader),children:[jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.Dj0J2e",defaultMessage:"Date Created",description:"Date Created"}),t("createdDateTime")]}),jsxRuntimeExports.jsx(TableCell,{className:"".concat(x.title," ").concat(x.borderBottomLineHeader)})]})}),jsxRuntimeExports.jsx(TableBody,{children:E&&((e,n)=>((e=e.map(function(e,t){return[e,t]})).sort(function(e,t){var r=n(e[0],t[0]);return 0!==r?r:e[1]-t[1]}),null!=e&&e.length&&B(e[0][0].id),e.map(function(e){return e[0]})))(E,(a=S,"desc"===j?function(e,t){return ce(e,t,a)}:function(e,t){return-ce(e,t,a)})).slice(v*N,v*N+N).map(function(e,t){var r=e.name,n=e.state,o=e.modifiedDateTime,a=e.createdDateTime,s=e.id,e=e.builds;return jsxRuntimeExports.jsxs(TableRow,{id:"flow-center-flow-item","data-test":"flow-center-flow-item",hover:!0,className:"".concat(u===s?x.tableRowClass:""," ").concat(x.tableRow," ").concat(x.borderBottomLineRow),classes:{selected:x.tableRowSelected},selected:u===s||y===s,onClick:function(e){k?c(s,!1):i(s)},children:[jsxRuntimeExports.jsx(TableCell,{className:x.borderBottomLine,children:jsxRuntimeExports.jsxs("div",{className:"".concat(x.boxCell," ").concat(x.firstColumn),children:[jsxRuntimeExports.jsx("p",{className:x.flowName,children:r}),jsxRuntimeExports.jsxs("div",{className:x.boxSubtitle,children:[jsxRuntimeExports.jsx(Tooltip,{title:SHARED_MESSAGES.copyFlowID(),children:jsxRuntimeExports.jsx("img",{src:img$w,alt:"copyID",draggable:"false",onClick:function(e){var t=s;e.stopPropagation(),(e=document.createElement("textarea")).value=t,document.body.appendChild(e),e.select(),document.execCommand("copy"),document.body.removeChild(e),b(!0),R("ENGINE_COPIED"),setTimeout(function(){b(!1),R("EMPTY")},2e3)}})}),(e=e,jsxRuntimeExports.jsxs("p",{className:x.flowVersion,children:[SHARED_MESSAGES.version()," ",lodashExports.get(e,"records[0].version",0)]}))]})]})}),jsxRuntimeExports.jsx(TableCell,{className:x.borderBottomLine,children:jsxRuntimeExports.jsx(StatusPill,{dataTest:"flow-center-flows-table-state",state:n,colorSelector:void 0,backgroundSelector:void 0})}),jsxRuntimeExports.jsx(TableCell,{className:x.borderBottomLine,children:a&&l(o)}),jsxRuntimeExports.jsx(TableCell,{className:x.borderBottomLine,children:a&&l(a)}),jsxRuntimeExports.jsx(TableCell,{className:x.borderBottomLine,children:jsxRuntimeExports.jsx(IconButton,{className:x.moreActionsBtn,"data-test":"flow-center-action-btn-toggleOpenMenu",onClick:function(e){return t=s,(e=e).stopPropagation(),Q(!0),Y(e.currentTarget),void J(t);var t},size:"large",children:jsxRuntimeExports.jsx(default_1$b,{})})})]},"".concat(r," + ").concat(t))})})]})}),jsxRuntimeExports.jsx(TablePagination,{className:x.title,rowsPerPageOptions:[10,25,50,100,200],component:"div",count:E.length,rowsPerPage:N,page:v,onPageChange:D,onRowsPerPageChange:L}),jsxRuntimeExports.jsx(Popper,{disablePortal:!0,style:{zIndex:z},open:K,anchorEl:U,transition:!0,placement:"bottom-end",children:function(e){e=e.TransitionProps;return jsxRuntimeExports.jsx(ClickAwayListener,{onClickAway:function(){Q(!1),c("",!1),J(""),G(!1),m(!1)},children:jsxRuntimeExports.jsx(Fade,_object_spread_props$1(_object_spread$5({},e),{timeout:350,children:jsxRuntimeExports.jsxs(Paper,{className:x.paperContainer,children:[jsxRuntimeExports.jsx(Button,{"data-test":"flow-center-flow-list-viewDetails",onClick:function(){c(y,!1)},startIcon:jsxRuntimeExports.jsx("img",{className:x.popperIcon,src:img$I,alt:"openInNewIcon"}),className:x.popperBtns,children:SHARED_MESSAGES.viewDetails()}),jsxRuntimeExports.jsx(Button,{"data-test":"flow-center-flow-list-viewRunningInstances",onClick:function(){c(y,!0)},startIcon:jsxRuntimeExports.jsx("img",{className:x.popperIcon,src:img$F,alt:"openInNewIcon"}),className:x.popperBtns,children:jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"fc.flowList.runningInstances",defaultMessage:"View Running Instances",description:"View Running Instances"})}),jsxRuntimeExports.jsx(Button,{"data-test":"flow-center-flow-list-openFlow",className:x.popperBtns,startIcon:jsxRuntimeExports.jsx("img",{className:x.popperIcon,src:img$1a,alt:"openInNewIcon"}),onClick:function(e){i()},children:SHARED_MESSAGES.openFlow()}),W&&jsxRuntimeExports.jsxs(Button,{"data-test":"flow-center-flow-list-always-up-flow",onClick:function(){m(!0,y)},startIcon:jsxRuntimeExports.jsx("img",{className:x.popperIcon,src:img$c,alt:"alwaysUpFlow"}),className:x.popperBtns,children:[SHARED_MESSAGES.alwaysUpFlow(),jsxRuntimeExports.jsx(Tooltip,{title:"Changes can take up to 5 min to enact.",placement:"bottom",children:jsxRuntimeExports.jsx(default_1$f,{className:se?g.active:g.inactive})})]}),jsxRuntimeExports.jsx(Button,{"data-test":"flow-center-flow-list-createFlowTemplate",className:x.popperBtns,startIcon:jsxRuntimeExports.jsx("img",{className:x.popperIcon,src:img$d,alt:"openInNewIcon"}),onClick:function(e){var t;t=y,d&&d(t||y)},children:SHARED_MESSAGES.createFlowTemplate()}),jsxRuntimeExports.jsx("hr",{className:x.popperHr}),jsxRuntimeExports.jsx(Button,{"data-test":"flow-center-flow-list-open-deleteFlow",className:x.popperBtns,startIcon:jsxRuntimeExports.jsx("img",{className:x.popperIcon,src:img$Y,alt:"deleteIcon"}),onClick:function(){Z(!0)},children:SHARED_MESSAGES.deleteFlow()})]})}))})}}),O&&jsxRuntimeExports.jsxs(Dialog,{role:"presentation",disablePortal:!0,disableEscapeKeyDown:!0,open:X,classes:{paper:g.container},onClose:function(){return r(!1)},"aria-labelledby":"alert-dialog-title","aria-describedby":"alert-dialog-description",children:[jsxRuntimeExports.jsx(DialogTitle,{className:g.title,children:SHARED_MESSAGES.confirmDelete()}),jsxRuntimeExports.jsx(DialogContent,{className:g.content,children:jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.jFIlbR",defaultMessage:"Are you sure you want to delete {flowName}? This action can not be undone.",description:"Are you sure you want to delete [Engine_Name]? This action can not be undone.”",values:{flowName:(null==O?void 0:O.name)||""}})}),jsxRuntimeExports.jsxs(DialogActions,{className:g.actions,children:[jsxRuntimeExports.jsx(Button,{"data-test":"flow-center-flow-list-cancelDeleteFlow",onClick:function(){return r(!1)},className:g.cancelButton,children:SHARED_MESSAGES.cancel()}),jsxRuntimeExports.jsx(Button,{"data-test":"flow-center-flow-list-submitDeleteFlow",onClick:function(){return r(!0)},className:g.confirmationButton,autoFocus:!0,children:SHARED_MESSAGES.delete()})]})]}),O&&oe&&jsxRuntimeExports.jsxs(Dialog,{role:"presentation",disablePortal:!0,disableEscapeKeyDown:!0,open:oe,classes:{paper:g.container},onClose:function(){return A()},"aria-labelledby":"alert-dialog-title","aria-describedby":"alert-dialog-description",children:[jsxRuntimeExports.jsx(DialogTitle,{className:g.title,children:T.OPEN_FLOW_SETTINGS}),jsxRuntimeExports.jsxs(DialogContent,{className:g.content,children:[jsxRuntimeExports.jsx("div",{className:"".concat(e.paddingDiv),children:jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center-header.jFdgxR",defaultMessage:"Select an edge cluster to be used to run your flow",description:"Select an edge cluster to be used to run your flow"})}),jsxRuntimeExports.jsx("div",{className:"".concat(e.paddingDiv),children:jsxRuntimeExports.jsx(Select,{id:"os-flow-center-header-cluster-select.hGcgxR",value:C.newFlowClusterID,onChange:function(e){f(newFlowClusterIDAction(e.target.value))},className:"".concat(e.fullWidth),children:null==w?void 0:w.map(function(e){return jsxRuntimeExports.jsx(MenuItem,{value:null==e?void 0:e.id,children:null==e?void 0:e.name},null==e?void 0:e.id)})})})]}),jsxRuntimeExports.jsxs(DialogActions,{className:g.actions,children:[jsxRuntimeExports.jsx(Button,{"data-test":"flow-center-flow-list-cancelSelectCluster",onClick:function(){return A()},className:g.cancelButton,children:T.CANCEL_SELECT_CLUSTER}),jsxRuntimeExports.jsx(Button,{"data-test":"flow-center-flow-list-openFlowAdvDialog",onClick:function(){return e=(e=null==O?void 0:O.id)||y,t=H?"latest":ue(e),r="".concat(h,"/flow/").concat(e,"/").concat(t),s&&(r="".concat(h,"/notebook/").concat(e,"/").concat(t)),C.newFlowClusterID?(window.open("".concat(h,"/flow/").concat(e,"/").concat(t,"/").concat(C.newFlowClusterID,"/default-cluster"),"_blank","noopener"),f(newFlowClusterIDAction(""))):window.open(r,"_blank","noopener,noreferrer"),void A();var e,t,r},className:g.confirmationButton,autoFocus:!0,children:T.OPEN_FLOW})]})]}),jsxRuntimeExports.jsx(Snackbar,{anchorOrigin:{vertical:"bottom",horizontal:"left"},open:ee,autoHideDuration:6e3,onClose:n,message:I[te],action:jsxRuntimeExports.jsx(IconButton,{size:"small","aria-label":"close",color:"inherit","data-test":"flow-center-action-btn-close",onClick:n,children:jsxRuntimeExports.jsx(default_1$g,{fontSize:"small"})})})]})};function _array_like_to_array$6(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function _array_with_holes$6(e){if(Array.isArray(e))return e}function _iterable_to_array_limit$6(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,a=[],s=!0,i=!1;try{for(r=r.call(e);!(s=(n=r.next()).done)&&(a.push(n.value),!t||a.length!==t);s=!0);}catch(e){i=!0,o=e}finally{try{s||null==r.return||r.return()}finally{if(i)throw o}}return a}}function _non_iterable_rest$6(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _sliced_to_array$6(e,t){return _array_with_holes$6(e)||_iterable_to_array_limit$6(e,t)||_unsupported_iterable_to_array$6(e,t)||_non_iterable_rest$6()}function _unsupported_iterable_to_array$6(e,t){var r;if(e)return"string"==typeof e?_array_like_to_array$6(e,t):"Map"===(r="Object"===(r=Object.prototype.toString.call(e).slice(8,-1))&&e.constructor?e.constructor.name:r)||"Set"===r?Array.from(r):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?_array_like_to_array$6(e,t):void 0}var useStyles$b=makeStyles()(function(e){return{typography:{marginBottom:"25px!important",fontFamily:"Nunito",fontStyle:"normal!important",fontWeight:600,fontSize:"16px!important",lineHeight:"24px!important",color:"#2A323C!important",letterSpacing:"-1.30385e-09px!important",display:"flex!important"},firstColumn:{paddingLeft:"12px!important"},bold:{fontWeight:600,color:"#2A323C!important",minWidth:"110px!important"},borderRight:{borderWidth:"0px!important",borderRightWidth:"1px!important",borderColor:"#aaa!important",borderStyle:"solid!important"},boxSubtitle:{fontFamily:"Nunito",fontStyle:"normal!important",fontSize:"16px!important",lineHeight:"22px!important",color:"#5C6269!important",fontWeight:400,letterSpacing:"-1.30385e-09px!important"},boxEngineTitle:{fontFamily:"Nunito",fontStyle:"normal!important",fontWeight:500,fontSize:"18px!important",lineHeight:"24px!important",color:"#2A323C!important",letterSpacing:"-1.30385e-09px!important",marginBottom:"10px!important"},engineTitle:{fontFamily:"Nunito",fontStyle:"normal!important",fontWeight:400,fontSize:"16px!important",lineHeight:"22px!important",color:"#2A323C!important",letterSpacing:"-1.30385e-09px!important"},boxTitle:{fontFamily:"Nunito",fontStyle:"normal!important",fontWeight:600,fontSize:"28px!important",lineHeight:"22px!important",color:"#2A323C!important",letterSpacing:"-1.30385e-09px!important"},button:{textTransform:"none!important",marginTop:"17px!important",marginBottom:"12px!important",border:"1px solid #1871E8!important",borderRadius:e.shape.borderRadius,fontFamily:"Nunito",fontStyle:"normal!important",fontWeight:600,fontSize:"14px!important",lineHeight:"19px!important",letterSpacing:"-1.30385e-09px!important",background:e.palette.background.paper,color:"#1871E8!important",padding:"6px 10px!important"},enginesAndFlowWidgetContainer:{display:"flex",width:"100%!important",height:"100%!important"},flowWidgetContainer:{flex:"0 0 720px!important",borderLeft:"0.5px solid #D5DFE9!important",overflowY:"auto!important"},enginesContainer:{width:"100%!important",overflowY:"auto!important"},table:{border:"none!important"},tableRow:{"&:hover":{cursor:"pointer",backgroundColor:"#EEF3F9!important","& td":{backgroundColor:"#EEF3F9!important"}}},boxCell:{marginTop:"20px!important",marginBottom:"20px!important"},borderBottomLine:{padding:"0px!important",paddingLeft:"16px!important"},tableRowClass:{backgroundColor:"#F2F5F9!important"},templateSelected:{background:"#F2F5F9!important",borderRadius:"4px!important",borderTop:"3px solid #F2F5F9!important",borderBottom:"3px solid #F2F5F9!important"},infoValue:{width:"80%",borderBottom:"0.5px solid #D5DFE9!important",paddingBottom:"22px!important",color:"#2A323C!important",fontWeight:"normal!important","& div":{marginLeft:"8px!important"}},infoValueContainer:{display:"flex",alignItems:"center","& img":{marginLeft:"8px!important"}},lastUpdated:{marginTop:"3px!important",fontFamily:"Nunito",fontSize:"12px!important",lineHeight:"18px!important",display:"flex!important",color:"#5C6269!important"},wrapperOverview:{marginTop:"15px!important",marginBottom:"21px!important"},flowWidgetContent:{height:"100%!important",marginTop:e.spacing(6.4),marginLeft:e.spacing(6.4)},title:{fontFamily:"Nunito",fontStyle:"normal",fontWeight:"normal",fontSize:"12px!important",lineHeight:"16px!important",letterSpacing:"-1.30385e-09px!important",color:"#5C6269!important"}}}),TemplateList=function(e){function n(){return f.findIndex(function(e){return e.id===u.id})}function o(e){return e.filter(function(e){return!e.tags||!e.tags.includes("Alteryx")})}function a(t){var r=[];return f.map(function(e){e[t]&&e[t].length&&e[t].forEach(function(e){r.includes(e)||""===e||r.push(e)})}),r}var t=e.handleOpenFlowNameDialog,r=e.openFirstTemplate,s=e.onSelectedTemplate,i=e.isDeselectedTemplate,l=useDispatch(),c=useStyles$b().classes,u=useSelector(function(e){return e.flows.templateToOpen}),e=useSelector(function(e){return e.flows.searchedTemplates}),p=useSelector(function(e){return e.flows.isSearching}),d=useSelector(sessionTokenSelector),m=_sliced_to_array$6(reactExports.useState([]),2),f=m[0],x=m[1],m=_sliced_to_array$6(reactExports.useState([]),2),g=m[0],_=m[1],m=_sliced_to_array$6(reactExports.useState({}),2),E=(m[0],m[1]),m=_sliced_to_array$6(reactExports.useState(n()),2),h=m[0],w=m[1],m=useSelector(function(e){return e.flows.filteredTemplates}),j=_sliced_to_array$6(reactExports.useState(0),2),S=j[0],y=j[1],j=_sliced_to_array$6(reactExports.useState(100),2),b=j[0],R=j[1],T=function(e){t(e)},F=(reactExports.useEffect(function(){f.length||fetchTemplateGallery(d,{isPublic:!0,limit:300}).then(function(e){var t=e,r="flowTemplates";t=e.data[r].records,r=o(t),x(r),setFilteredTemplatesAction(r),w(n())}).catch(function(e){devErrorLogger("error fetching flow templates: ".concat(JSON.stringify(e)))})},[f]),reactExports.useEffect(function(){w(n())},[f,n]),reactExports.useEffect(function(){lodashExports.isEmpty(u)&&(r?null!=f&&f.length&&(E(f[0]),w(0),l(setOpenTemplate({id:f[0].id,title:f[0].title}))):(w(-1),l(setOpenTemplate({id:null,title:null}))))},[l,r,f,u]),reactExports.useEffect(function(){!h||i||u||(w(-1),l(setOpenTemplate({id:null,title:null})))},[i,l,h]),useSelector(function(e){return e.flows.selectedFilters})),j=(reactExports.useEffect(function(){var e,t,r,n;f&&0<f.length&&(e=a("tags"),t=a("categories"),n=[],f.map(function(e){e.author&&(e=e.author.trim(),n.includes(e)||""===e||n.push(e))}),r=n,l(setTagsToStore(e)),l(setCategories(t)),l(setTemplatesAuthors(r))),l(setTemplatesAction(f))},[f,l]),reactExports.useEffect(function(){var e={isPublic:!(!F.public||"1"!==F.public[0]),categories:null==F?void 0:F.categories,tags:null==F?void 0:F.tags,developers:null==F?void 0:F.author,limit:300};fetchTemplateGallery(d,e).then(function(e){e=e.data.flowTemplates.records,e=o(e);setFilteredTemplatesAction(e),_(e)}).catch(function(e){devErrorLogger("error fetching flow templates: ".concat(JSON.stringify(e)))})},[l,F]),reactExports.useEffect(function(){l(setFilteredTemplatesAction(g.filter(function(e){return null!=e})))},[S,b,g]),[]),j=p?e:m,v=jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(TableContainer,{children:jsxRuntimeExports.jsxs(Table,{className:c.table,children:[jsxRuntimeExports.jsx(TableHead,{}),jsxRuntimeExports.jsx(TableBody,{children:j&&j.slice(S*b,S*b+b).map(function(e,t){return r=e,n=t,jsxRuntimeExports.jsx(TableRow,{hover:!0,className:"".concat(n===h?c.tableRowClass:""," ").concat(c.tableRow),selected:n===h,id:"flow-center-templates-list-item","data-test":"flow-center-templates-list-item",children:jsxRuntimeExports.jsx(TableCell,{className:c.borderBottomLine,onClick:function(){E(r),w(n),l(setOpenTemplate({id:r.id,title:r.title})),s(!0)},children:jsxRuntimeExports.jsx(Box,{className:"".concat(c.boxCell," ").concat(c.firstColumn),children:jsxRuntimeExports.jsx(Typography,{"data-test":"flow-center-flows-templateList-title",className:c.engineTitle,children:r.title})})})},"".concat(r.id,"-").concat(n));var r,n})})]})}),jsxRuntimeExports.jsx(TablePagination,{className:c.title,rowsPerPageOptions:[10,25,50,100,200],component:"div",count:m.length,rowsPerPage:b,page:S,onPageChange:function(e,t){y(t)},onRowsPerPageChange:function(e){R(parseInt(e.target.value,10)),y(0)}})]}),p=function(){return jsxRuntimeExports.jsx(Grid,{"data-test":"flow-center-templates-list-container",container:!0,id:"flow-center-templates-list-container",children:jsxRuntimeExports.jsx(Grid,{"data-test":"flow-center-templates-list-subcontainer",item:!0,xs:12,children:jsxRuntimeExports.jsx(Box,{children:v})})})},j=function(){var e;return jsxRuntimeExports.jsxs("div",{className:c.enginesAndFlowWidgetContainer,children:[jsxRuntimeExports.jsx("div",{className:c.enginesContainer,children:jsxRuntimeExports.jsx(Box,{className:-1===h?c.borderRight:"",children:v})}),jsxRuntimeExports.jsx("div",{"data-test":"flow-center-flows-templateList-selected-container",className:c.flowWidgetContainer,children:jsxRuntimeExports.jsxs(Box,{mt:4,ml:4,className:c.flowWidgetContent,children:[jsxRuntimeExports.jsx(Box,{display:"flex",alignItems:"center",children:jsxRuntimeExports.jsx(Box,{id:"template-widget-title","data-test":"template-widget-title",children:jsxRuntimeExports.jsx(Typography,{"data-test":"flow-center-flows-templateList-selectedTitle",className:c.boxTitle,children:null==(e=f[h])?void 0:e.title})})}),jsxRuntimeExports.jsx(Box,{m:1,ml:0,mb:0,children:jsxRuntimeExports.jsx(Button,{"data-test":"flow-center-template-list-createFlowFromTemplate-".concat(null==(e=f[h])?void 0:e.title),color:"primary",onClick:function(){return T?T(f[h].id):""},className:c.button,startIcon:jsxRuntimeExports.jsx("img",{src:img$z,alt:"plus icon"}),children:SHARED_MESSAGES.createFlowFromTemplate()})}),jsxRuntimeExports.jsxs(Box,{my:4,children:[jsxRuntimeExports.jsxs(Typography,{"data-test":"flow-center-flows-templateList-overview",variant:"subtitle1",className:c.typography,children:[jsxRuntimeExports.jsxs("span",{className:c.bold,children:[SHARED_MESSAGES.overview(),":"]}),jsxRuntimeExports.jsx("div",{className:c.infoValue,children:jsxRuntimeExports.jsx("div",{children:null==(e=f[h])?void 0:e.subtitle})})]}),jsxRuntimeExports.jsxs(Typography,{"data-test":"flow-center-flows-templateList-developer",variant:"subtitle1",className:c.typography,children:[jsxRuntimeExports.jsxs("span",{className:c.bold,children:[SHARED_MESSAGES.developer(),":"]}),jsxRuntimeExports.jsx("div",{className:c.infoValue,children:jsxRuntimeExports.jsx("div",{children:null==(e=f[h])?void 0:e.author})})]}),jsxRuntimeExports.jsxs(Typography,{"data-test":"flow-center-flows-templateList-certified",variant:"subtitle1",className:c.typography,children:[jsxRuntimeExports.jsxs("span",{className:c.bold,children:[SHARED_MESSAGES.certified(),":"]}),jsxRuntimeExports.jsxs("div",{className:"".concat(c.infoValue," ").concat(c.infoValueContainer),children:[jsxRuntimeExports.jsx("div",{children:SHARED_MESSAGES.yes()}),jsxRuntimeExports.jsx("img",{src:img$B,alt:"veritoneCertifiedIcon"})]})]}),f[h]&&f[h].categories&&f[h].categories.length&&""!==f[h].categories[0]&&jsxRuntimeExports.jsxs(Typography,{"data-test":"flow-center-flows-templateList-category",variant:"subtitle1",className:c.typography,children:[jsxRuntimeExports.jsxs("span",{className:c.bold,children:[SHARED_MESSAGES.category(),":"]}),jsxRuntimeExports.jsx("div",{className:c.infoValue,children:jsxRuntimeExports.jsx("div",{children:null==(e=f[h])?void 0:e.categories.join(", ")})})]}),jsxRuntimeExports.jsxs(Typography,{"data-test":"flow-center-flows-templateList-tags",variant:"subtitle1",className:c.typography,children:[jsxRuntimeExports.jsxs("span",{className:c.bold,children:[SHARED_MESSAGES.tags(),":"]}),jsxRuntimeExports.jsx("div",{className:c.infoValue,children:jsxRuntimeExports.jsx("div",{children:(null==(e=f[h])||null==(e=e.tags)?void 0:e.join(", "))||SHARED_MESSAGES.noTags()})})]}),jsxRuntimeExports.jsxs(Typography,{"data-test":"flow-center-flows-templateList-infoValue",variant:"subtitle1",className:c.typography,children:[jsxRuntimeExports.jsxs("span",{className:c.bold,children:[SHARED_MESSAGES.active(),":"]}),jsxRuntimeExports.jsx("div",{className:c.infoValue,children:jsxRuntimeExports.jsx("div",{children:SHARED_MESSAGES.yes()})})]})]}),jsxRuntimeExports.jsx("img",{style:{width:"100%"},src:null==(e=f[h])?void 0:e.image,alt:""})]})})]})};return e&&0===e.length?jsxRuntimeExports.jsx(NoResults,{}):(-1===h?p:j)()},useStyles$a=makeStyles()(function(e){return{progressBar:{height:8,borderRadius:4,marginTop:4,marginBottom:4},progressBarGreen:{"& .MuiLinearProgress-bar":{backgroundColor:e.palette.success.main},backgroundColor:"rgba(76, 175, 80, 0.2)"},progressBarYellow:{"& .MuiLinearProgress-bar":{backgroundColor:e.palette.warning.main},backgroundColor:"rgba(255, 152, 0, 0.2)"},progressBarRed:{"& .MuiLinearProgress-bar":{backgroundColor:e.palette.error.main},backgroundColor:"rgba(244, 67, 54, 0.2)"},warningCell:{backgroundColor:"rgba(244, 67, 54, 0.1)"},truncatedId:{fontSize:"0.875rem"},copyIcon:{fontSize:"1rem",cursor:"pointer",marginLeft:"4px",verticalAlign:"middle"},metricsValue:{textAlign:"right"},rightAlignedCell:{textAlign:"right"},emptyProgressBar:{height:8,borderRadius:4,marginTop:4,marginBottom:4,backgroundColor:"rgba(0, 0, 0, 0.1)"},naPlaceholder:{color:"#9e9e9e",fontWeight:400},metricsColumn:{minWidth:"180px",width:"180px",paddingLeft:"16px !important",paddingRight:"16px !important"},flowNameColumn:{minWidth:"250px",width:"250px"}}});function asyncGeneratorStep$4(e,t,r,n,o,a,s){try{var i=e[a](s),l=i.value}catch(e){return void r(e)}i.done?t(l):Promise.resolve(l).then(n,o)}function _async_to_generator$4(i){return function(){var e=this,s=arguments;return new Promise(function(t,r){var n=i.apply(e,s);function o(e){asyncGeneratorStep$4(n,t,r,o,a,"next",e)}function a(e){asyncGeneratorStep$4(n,t,r,o,a,"throw",e)}o(void 0)})}}function _define_property$4(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _object_spread$4(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{},n=Object.keys(r);(n="function"==typeof Object.getOwnPropertySymbols?n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})):n).forEach(function(e){_define_property$4(t,e,r[e])})}return t}function _ts_generator$4(n,o){var a,s,i,l={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]},e={next:t(0),throw:t(1),return:t(2)};return"function"==typeof Symbol&&(e[Symbol.iterator]=function(){return this}),e;function t(r){return function(e){var t=[r,e];if(a)throw new TypeError("Generator is already executing.");for(;l;)try{if(a=1,s&&(i=2&t[0]?s.return:t[0]?s.throw||((i=s.return)&&i.call(s),0):s.next)&&!(i=i.call(s,t[1])).done)return i;switch(s=0,(t=i?[2&t[0],i.value]:t)[0]){case 0:case 1:i=t;break;case 4:return l.label++,{value:t[1],done:!1};case 5:l.label++,s=t[1],t=[0];continue;case 7:t=l.ops.pop(),l.trys.pop();continue;default:if(!(i=0<(i=l.trys).length&&i[i.length-1])&&(6===t[0]||2===t[0])){l=0;continue}if(3===t[0]&&(!i||t[1]>i[0]&&t[1]<i[3]))l.label=t[1];else if(6===t[0]&&l.label<i[1])l.label=i[1],i=t;else{if(!(i&&l.label<i[2])){i[2]&&l.ops.pop(),l.trys.pop();continue}l.label=i[2],l.ops.push(t)}}t=o.call(n,l)}catch(e){t=[6,e],s=0}finally{a=i=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}}}var fetchContainers=(()=>{var r=_async_to_generator$4(function(t,r){var n,o;return _ts_generator$4(this,function(e){switch(e.label){case 0:n=appIdSelector(store.getState()),e.label=1;case 1:return e.trys.push([1,4,,5]),[4,fetch("".concat(t,"/edge/v1/automate/containers/org/mine"),{method:"GET",headers:_object_spread$4({"Content-Type":"application/json",Authorization:"Bearer ".concat(r)},n?{"X-Veritone-Application":n}:{})})];case 2:if((o=e.sent()).ok)return[4,o.json()];throw new Error("Failed to fetch containers: ".concat(o.statusText));case 3:return[2,e.sent()];case 4:throw o=e.sent(),console.error("Error fetching containers:",o),o;case 5:return[2]}})});return function(e,t){return r.apply(this,arguments)}})(),terminateContainer=(()=>{var n=_async_to_generator$4(function(t,r,n){var o,a;return _ts_generator$4(this,function(e){switch(e.label){case 0:o=appIdSelector(store.getState()),e.label=1;case 1:return e.trys.push([1,3,,4]),[4,fetch("".concat(t,"/edge/v1/k8s/flow/terminate/").concat(r),{method:"POST",headers:_object_spread$4({"Content-Type":"application/json",Authorization:"Bearer ".concat(n)},o?{"X-Veritone-Application":o}:{})})];case 2:if((a=e.sent()).ok)return[2,{success:!0}];throw new Error("Failed to terminate container: ".concat(a.statusText));case 3:throw a=e.sent(),console.error("Error terminating container:",a),a;case 4:return[2]}})});return function(e,t,r){return n.apply(this,arguments)}})();function _array_like_to_array$5(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function _array_with_holes$5(e){if(Array.isArray(e))return e}function asyncGeneratorStep$3(e,t,r,n,o,a,s){try{var i=e[a](s),l=i.value}catch(e){return void r(e)}i.done?t(l):Promise.resolve(l).then(n,o)}function _async_to_generator$3(i){return function(){var e=this,s=arguments;return new Promise(function(t,r){var n=i.apply(e,s);function o(e){asyncGeneratorStep$3(n,t,r,o,a,"next",e)}function a(e){asyncGeneratorStep$3(n,t,r,o,a,"throw",e)}o(void 0)})}}function _define_property$3(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _iterable_to_array_limit$5(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,a=[],s=!0,i=!1;try{for(r=r.call(e);!(s=(n=r.next()).done)&&(a.push(n.value),!t||a.length!==t);s=!0);}catch(e){i=!0,o=e}finally{try{s||null==r.return||r.return()}finally{if(i)throw o}}return a}}function _non_iterable_rest$5(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _object_spread$3(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{},n=Object.keys(r);(n="function"==typeof Object.getOwnPropertySymbols?n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})):n).forEach(function(e){_define_property$3(t,e,r[e])})}return t}function ownKeys(e,t){var r=Object.keys(e);return Object.getOwnPropertySymbols&&(e=Object.getOwnPropertySymbols(e),r.push.apply(r,e)),r}function _object_spread_props(t,r){return r=null!=r?r:{},Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):ownKeys(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}),t}function _sliced_to_array$5(e,t){return _array_with_holes$5(e)||_iterable_to_array_limit$5(e,t)||_unsupported_iterable_to_array$5(e,t)||_non_iterable_rest$5()}function _unsupported_iterable_to_array$5(e,t){var r;if(e)return"string"==typeof e?_array_like_to_array$5(e,t):"Map"===(r="Object"===(r=Object.prototype.toString.call(e).slice(8,-1))&&e.constructor?e.constructor.name:r)||"Set"===r?Array.from(r):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?_array_like_to_array$5(e,t):void 0}function _ts_generator$3(n,o){var a,s,i,l={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]},e={next:t(0),throw:t(1),return:t(2)};return"function"==typeof Symbol&&(e[Symbol.iterator]=function(){return this}),e;function t(r){return function(e){var t=[r,e];if(a)throw new TypeError("Generator is already executing.");for(;l;)try{if(a=1,s&&(i=2&t[0]?s.return:t[0]?s.throw||((i=s.return)&&i.call(s),0):s.next)&&!(i=i.call(s,t[1])).done)return i;switch(s=0,(t=i?[2&t[0],i.value]:t)[0]){case 0:case 1:i=t;break;case 4:return l.label++,{value:t[1],done:!1};case 5:l.label++,s=t[1],t=[0];continue;case 7:t=l.ops.pop(),l.trys.pop();continue;default:if(!(i=0<(i=l.trys).length&&i[i.length-1])&&(6===t[0]||2===t[0])){l=0;continue}if(3===t[0]&&(!i||t[1]>i[0]&&t[1]<i[3]))l.label=t[1];else if(6===t[0]&&l.label<i[1])l.label=i[1],i=t;else{if(!(i&&l.label<i[2])){i[2]&&l.ops.pop(),l.trys.pop();continue}l.label=i[2],l.ops.push(t)}}t=o.call(n,l)}catch(e){t=[6,e],s=0}finally{a=i=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}}}var ContainerList=reactExports.forwardRef(function(e,D){function t(e){return jsxRuntimeExports.jsx(TableSortLabel,{active:T===e,IconComponent:default_1$c,direction:T===e?R:"asc",onClick:function(){return te(e)},classes:{icon:x.sortIcon}})}function a(e){return e<70?g.progressBarGreen:e<85?g.progressBarYellow:g.progressBarRed}function s(e){return void 0!==e&&85<e}function i(e){return 0===e?"0 MB":1024<=(e=e/1048576)?"".concat((e/1024).toFixed(2)," GB"):"".concat(e.toFixed(2)," MB")}function L(){var e;null!=N&&N.engineID&&(e="".concat(ee,"/flow/").concat(N.engineID,"/latest"),window.open(e,"_blank","noopener,noreferrer"),F(!1))}function k(e,t){X(t)}function P(e){Z(Number.parseInt(e.target.value,10)),X(0)}function r(){return jsxRuntimeExports.jsx(TableHead,{children:jsxRuntimeExports.jsxs(TableRow,{children:[jsxRuntimeExports.jsxs(TableCell,{className:"".concat(x.title," ").concat(x.firstTitle," ").concat(x.borderBottomLineHeader),children:[jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.containerList.podName",defaultMessage:"Pod Name",description:"Pod Name"}),!j&&t("podName")]}),jsxRuntimeExports.jsxs(TableCell,{className:"".concat(x.title," ").concat(x.borderBottomLineHeader," ").concat(g.flowNameColumn),children:[jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.containerList.flowName",defaultMessage:"Flow Name",description:"Flow Name"}),!j&&t("flowName")]}),jsxRuntimeExports.jsxs(TableCell,{className:"".concat(x.title," ").concat(x.borderBottomLineHeader," ").concat(g.rightAlignedCell," ").concat(g.metricsColumn),children:[jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.containerList.cpuUsage",defaultMessage:"CPU (cores)",description:"CPU (cores)"}),!j&&t("cpuUsage")]}),jsxRuntimeExports.jsxs(TableCell,{className:"".concat(x.title," ").concat(x.borderBottomLineHeader," ").concat(g.rightAlignedCell," ").concat(g.metricsColumn),style:{paddingLeft:"16px",paddingRight:"16px"},children:[jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.containerList.memoryUsage",defaultMessage:"Memory",description:"Memory"}),!j&&t("memoryUsage")]}),jsxRuntimeExports.jsxs(TableCell,{className:"".concat(x.title," ").concat(x.borderBottomLineHeader),children:[jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.containerList.createdAt",defaultMessage:"Created At",description:"Created At"}),!j&&t("createdAt")]}),jsxRuntimeExports.jsxs(TableCell,{className:"".concat(x.title," ").concat(x.borderBottomLineHeader," ").concat(g.rightAlignedCell),children:[jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.containerList.timeAlive",defaultMessage:"Uptime",description:"Uptime"}),!j&&t("timeAlive")]}),jsxRuntimeExports.jsx(TableCell,{className:"".concat(x.title," ").concat(x.borderBottomLineHeader),children:jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.containerList.isService",defaultMessage:"Service Mode",description:"Service Mode"})}),jsxRuntimeExports.jsx(TableCell,{className:"".concat(x.title," ").concat(x.borderBottomLineHeader)})]})})}var n,o,l,c,u=e.onSelectContainer,p=e.simpleMode,B=void 0!==p&&p,p=e.screenName,p=void 0===p?"Running Containers":p,d=e.selectedContainerId,m=void 0===d?"":d,d=e.showTitle,d=void 0===d||d,e=e.zIndex,e=void 0===e?1300:e,f=useDispatch(),x=flowStyles().classes,g=useStyles$a().classes,_=useSelector(selectApiConfigs).token,E=useSelector(function(e){return(null==(e=e.flows)?void 0:e.flows)||[]}),h=_sliced_to_array$5(reactExports.useState([]),2),w=h[0],z=h[1],h=_sliced_to_array$5(reactExports.useState(!0),2),j=h[0],S=h[1],h=_sliced_to_array$5(reactExports.useState(null),2),y=h[0],b=h[1],h=_sliced_to_array$5(reactExports.useState("desc"),2),R=h[0],G=h[1],h=_sliced_to_array$5(reactExports.useState("createdAt"),2),T=h[0],W=h[1],h=_sliced_to_array$5(reactExports.useState(null),2),H=h[0],U=h[1],h=_sliced_to_array$5(reactExports.useState(!1),2),Y=h[0],F=h[1],h=_sliced_to_array$5(reactExports.useState(""),2),V=h[0],v=h[1],h=_sliced_to_array$5(reactExports.useState(null),2),N=h[0],C=h[1],h=_sliced_to_array$5(reactExports.useState(!1),2),q=h[0],K=h[1],h=_sliced_to_array$5(reactExports.useState(!1),2),Q=h[0],J=h[1],h=_sliced_to_array$5(reactExports.useState(0),2),I=h[0],X=h[1],h=_sliced_to_array$5(reactExports.useState(100),2),$=h[0],Z=h[1],ee=useSelector(automateUrlSelector),M=useSelector(controllerUrlSelector),h=useSelector(automateControllerUrlSelector),M=getBrowserSafeControllerUrl({controllerUrl:M,automateControllerUrl:h,automateUrl:ee}),A=(n=_async_to_generator$3(function(){var t;return _ts_generator$3(this,function(e){switch(e.label){case 0:return e.trys.push([0,2,3,4]),S(!0),b(null),[4,fetchContainers(M,_)];case 1:return t=e.sent(),z(t||[]),[3,4];case 2:return t=e.sent(),console.error("Failed to load containers:",t),b("Failed to load containers"),f(showMessage({content:"Failed to load containers",severity:MessageSeverity.Error})),[3,4];case 3:return S(!1),[7];case 4:return[2]}})}),function(){return n.apply(this,arguments)}),h=(reactExports.useImperativeHandle(D,function(){return{reload:A,isLoading:function(){return j}}}),reactExports.useEffect(function(){M&&_&&A()},[M,_]),reactExports.useMemo(function(){return w.map(function(t){var e=E.find(function(e){return e.id===t.engineID});return _object_spread_props(_object_spread$3({},t),{flowName:(null==e?void 0:e.name)||"Unknown Flow",flowState:(null==e?void 0:e.state)||"unknown"})})},[w,E])),te=function(e){G(T===e&&"asc"===R?"desc":"asc"),W(e)},re=function(e,t,r){e=e[r],t=t[r];return t<e?-1:e<t?1:0},ne=(o=_async_to_generator$3(function(t,r){return _ts_generator$3(this,function(e){switch(e.label){case 0:return t.stopPropagation(),[4,navigator.clipboard.writeText(r)];case 1:return e.sent(),[2]}})}),function(e,t){return o.apply(this,arguments)}),O=(l=_async_to_generator$3(function(t){var r;return _ts_generator$3(this,function(e){switch(e.label){case 0:if(!t||null==N||!N.automateContainerID)return[3,6];J(!0),e.label=1;case 1:return e.trys.push([1,4,5,6]),[4,terminateContainer(M,N.automateContainerID,_)];case 2:return e.sent(),f(showMessage({content:"Container terminated successfully",severity:MessageSeverity.Success})),[4,A()];case 3:return e.sent(),[3,6];case 4:return r=e.sent(),console.error("Failed to terminate container:",r),f(showMessage({content:"Failed to terminate container",severity:MessageSeverity.Error})),[3,6];case 5:return J(!1),[7];case 6:return K(!1),C(null),[2]}})}),function(e){return l.apply(this,arguments)});return j?jsxRuntimeExports.jsxs(Box,{mt:d?2:0,children:[d&&jsxRuntimeExports.jsx(Typography,{"data-testid":"container-list-screenName",className:x.text,style:{flexGrow:1},children:jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.containerList.screenName",defaultMessage:"{screenName}",description:"{screenName}",values:{screenName:p}})}),jsxRuntimeExports.jsx(TableContainer,{children:jsxRuntimeExports.jsxs(Table,{className:x.table,children:[r(),jsxRuntimeExports.jsx(TableBody,{children:Array.from({length:5},function(e,t){return"skeleton-".concat(t)}).map(function(e){return jsxRuntimeExports.jsxs(TableRow,{children:[jsxRuntimeExports.jsx(TableCell,{children:jsxRuntimeExports.jsx(Skeleton,{variant:"text",width:"80%"})}),jsxRuntimeExports.jsx(TableCell,{children:jsxRuntimeExports.jsx(Skeleton,{variant:"text",width:"70%"})}),jsxRuntimeExports.jsx(TableCell,{children:jsxRuntimeExports.jsx(Skeleton,{variant:"rectangular",height:40})}),jsxRuntimeExports.jsx(TableCell,{children:jsxRuntimeExports.jsx(Skeleton,{variant:"rectangular",height:40})}),jsxRuntimeExports.jsx(TableCell,{children:jsxRuntimeExports.jsx(Skeleton,{variant:"text",width:"60%"})}),jsxRuntimeExports.jsx(TableCell,{children:jsxRuntimeExports.jsx(Skeleton,{variant:"text",width:"50%"})}),jsxRuntimeExports.jsx(TableCell,{children:jsxRuntimeExports.jsx(Skeleton,{variant:"rounded",width:80,height:24})}),jsxRuntimeExports.jsx(TableCell,{children:jsxRuntimeExports.jsx(Skeleton,{variant:"circular",width:40,height:40})})]},e)})})]})})]}):y?jsxRuntimeExports.jsx(Box,{display:"flex",justifyContent:"center",alignItems:"center",minHeight:"400px",children:jsxRuntimeExports.jsx(Typography,{color:"error",children:jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.containerList.error",defaultMessage:"An error occurred while loading containers",description:"Loading Containers Error",values:{error:y}})})}):jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[0===(null==h?void 0:h.length)?jsxRuntimeExports.jsx(NoResults,{}):jsxRuntimeExports.jsxs(Box,{mt:d?2:0,children:[d&&jsxRuntimeExports.jsx(Typography,{"data-testid":"container-list-screenName",className:x.text,style:{flexGrow:1},children:jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.containerList.screenName",defaultMessage:"{screenName}",description:"{screenName}",values:{screenName:p}})}),jsxRuntimeExports.jsx(TableContainer,{id:"container-list-table","data-testid":"container-list-table",children:jsxRuntimeExports.jsxs(Table,{className:x.table,children:[r(),jsxRuntimeExports.jsx(TableBody,{children:h&&((e,n)=>((e=e.map(function(e,t){return[e,t]})).sort(function(e,t){var r=n(e[0],t[0]);return 0!==r?r:e[1]-t[1]}),e.map(function(e){return e[0]})))(h,(c=T,"desc"===R?function(e,t){return re(e,t,c)}:function(e,t){return-re(e,t,c)})).slice(I*$,I*$+$).map(function(r,e){return jsxRuntimeExports.jsxs(TableRow,{id:"container-list-item","data-testid":"container-list-item",hover:!0,className:"".concat(m===r.containerID?x.tableRowClass:""," ").concat(x.borderBottomLineRow),classes:{selected:x.tableRowSelected},selected:m===r.containerID||V===r.containerID,onClick:function(){var e;B||(e=r.containerID,u&&u(e))},children:[jsxRuntimeExports.jsx(TableCell,{className:x.borderBottomLine,children:jsxRuntimeExports.jsx("div",{className:"".concat(x.boxCell," ").concat(x.firstColumn),children:jsxRuntimeExports.jsx("p",{className:x.flowName,children:25<r.podName.length?"".concat(r.podName.substring(0,25),"..."):r.podName})})}),jsxRuntimeExports.jsxs(TableCell,{className:"".concat(x.borderBottomLine," ").concat(g.flowNameColumn),children:[jsxRuntimeExports.jsx("p",{className:x.flowName,children:r.flowName||"N/A"}),jsxRuntimeExports.jsx("div",{className:x.boxSubtitle,children:jsxRuntimeExports.jsxs("p",{className:"".concat(x.dateTimeSmall," ").concat(g.truncatedId),children:["Flow ID: ",r.engineID.substring(0,8),"...",jsxRuntimeExports.jsx(Tooltip,{title:"Copy Flow ID",children:jsxRuntimeExports.jsx(default_1$a,{className:g.copyIcon,onClick:function(e){return ne(e,r.engineID)}})})]})})]}),jsxRuntimeExports.jsx(TableCell,{className:"".concat(x.borderBottomLine," ").concat(g.rightAlignedCell," ").concat(g.metricsColumn," ").concat(s(r.cpuUsagePercent)?g.warningCell:""),children:void 0!==r.cpuUsage&&void 0!==r.cpuRequests&&void 0!==r.cpuUsagePercent?jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsxs(Box,{display:"flex",alignItems:"center",justifyContent:"flex-end",gap:1,children:[jsxRuntimeExports.jsxs("p",{className:g.metricsValue,children:[r.cpuUsage.toFixed(3)," / ",r.cpuRequests," cores"]}),s(r.cpuUsagePercent)&&jsxRuntimeExports.jsx(Tooltip,{title:"High CPU Usage",children:jsxRuntimeExports.jsx(default_1$5,{style:{color:"#f44336",fontSize:"1.2rem"}})})]}),jsxRuntimeExports.jsx(LinearProgress,{variant:"determinate",value:Math.min(r.cpuUsagePercent,100),className:"".concat(g.progressBar," ").concat(a(r.cpuUsagePercent))}),jsxRuntimeExports.jsxs("p",{className:x.dateTimeSmall,style:{textAlign:"right",display:"block"},children:[r.cpuUsagePercent.toFixed(2),"%"]})]}):jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx("p",{className:g.naPlaceholder,style:{textAlign:"right"},children:"—"}),jsxRuntimeExports.jsx(Box,{className:g.emptyProgressBar}),jsxRuntimeExports.jsx("p",{className:"".concat(x.dateTimeSmall," ").concat(g.naPlaceholder),style:{textAlign:"right",display:"block"},children:"N/A"})]})}),jsxRuntimeExports.jsx(TableCell,{className:"".concat(x.borderBottomLine," ").concat(g.rightAlignedCell," ").concat(g.metricsColumn," ").concat(s(r.memoryUsagePercent)?g.warningCell:""),style:{paddingLeft:"16px",paddingRight:"16px"},children:void 0!==r.memoryUsage&&void 0!==r.memoryRequests&&void 0!==r.memoryUsagePercent?jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsxs(Box,{display:"flex",alignItems:"center",justifyContent:"flex-end",gap:1,children:[jsxRuntimeExports.jsxs("p",{className:g.metricsValue,children:[i(r.memoryUsage)," / ",i(r.memoryRequests)]}),s(r.memoryUsagePercent)&&jsxRuntimeExports.jsx(Tooltip,{title:"High Memory Usage",children:jsxRuntimeExports.jsx(default_1$5,{style:{color:"#f44336",fontSize:"1.2rem"}})})]}),jsxRuntimeExports.jsx(LinearProgress,{variant:"determinate",value:Math.min(r.memoryUsagePercent,100),className:"".concat(g.progressBar," ").concat(a(r.memoryUsagePercent))}),jsxRuntimeExports.jsxs("p",{className:x.dateTimeSmall,style:{textAlign:"right",display:"block"},children:[r.memoryUsagePercent.toFixed(2),"%"]})]}):jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx("p",{className:g.naPlaceholder,style:{textAlign:"right"},children:"—"}),jsxRuntimeExports.jsx(Box,{className:g.emptyProgressBar}),jsxRuntimeExports.jsx("p",{className:"".concat(x.dateTimeSmall," ").concat(g.naPlaceholder),style:{textAlign:"right",display:"block"},children:"N/A"})]})}),jsxRuntimeExports.jsx(TableCell,{className:x.borderBottomLine,children:r.createdAt&&jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(Typography,{"data-testid":"container-list-table-time",className:x.dateTime,children:SHARED_DATE_TIME.getDate(r.createdAt)}),jsxRuntimeExports.jsx(Typography,{"data-testid":"container-list-table-time-caption",variant:"caption",className:x.dateTimeSmall,children:(n=r.createdAt,o=DateTime_1.now(),n=DateTime_1.fromISO(n),1<=(o=o.diff(n,["days","hours","minutes"])).days?(n=Math.floor(o.days),"".concat(n," day").concat(1===n?"":"s"," ago")):1<=o.hours?(n=Math.floor(o.hours),"".concat(n," hour").concat(1===n?"":"s"," ago")):(n=Math.floor(o.minutes),"".concat(n," minute").concat(1===n?"":"s"," ago")))})]})}),jsxRuntimeExports.jsx(TableCell,{className:"".concat(x.borderBottomLine," ").concat(g.rightAlignedCell),children:jsxRuntimeExports.jsx("p",{style:{textAlign:"right"},children:(o=r.timeAlive,o=Math.floor(o/1e3),n=Math.floor(o/86400),t=Math.floor(o%86400/3600),o=Math.floor(o%3600/60),0<n?"".concat(n,"d ").concat(t,"h"):(0<t?"".concat(t,"h "):"").concat(o,"m"))})}),jsxRuntimeExports.jsx(TableCell,{className:x.borderBottomLine,children:r.is_service?jsxRuntimeExports.jsx(Chip,{label:"Service",size:"small",color:"secondary"}):jsxRuntimeExports.jsx(Chip,{label:"Studio",size:"small",color:"primary"})}),jsxRuntimeExports.jsx(TableCell,{className:x.borderBottomLine,children:jsxRuntimeExports.jsx(IconButton,{className:x.moreActionsBtn,"data-testid":"container-list-action-btn-toggleOpenMenu",onClick:function(e){return t=r,(e=e).stopPropagation(),F(!0),U(e.currentTarget),v(t.containerID),void C(t);var t},size:"large",children:jsxRuntimeExports.jsx(default_1$b,{})})})]},"".concat(r.containerID,"-").concat(e));var t,n,o})})]})}),jsxRuntimeExports.jsx(TablePagination,{className:x.title,rowsPerPageOptions:[10,25,50,100,200],component:"div",count:h.length,rowsPerPage:$,page:I,onPageChange:k,onRowsPerPageChange:P}),jsxRuntimeExports.jsx(Popper,{disablePortal:!0,style:{zIndex:e},open:Y,anchorEl:H,transition:!0,placement:"bottom-end",children:function(e){e=e.TransitionProps;return jsxRuntimeExports.jsx(ClickAwayListener,{onClickAway:function(){F(!1),v("")},children:jsxRuntimeExports.jsx(Fade,_object_spread_props(_object_spread$3({},e),{timeout:350,children:jsxRuntimeExports.jsxs(Paper,{className:x.paperContainer,children:[jsxRuntimeExports.jsx(Button,{"data-testid":"container-list-openFlow",onClick:L,startIcon:jsxRuntimeExports.jsx(default_1$4,{}),className:x.popperBtns,children:jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.containerList.openFlow",defaultMessage:"Open Flow",description:"Open Flow"})}),jsxRuntimeExports.jsx(Button,{"data-testid":"container-list-terminate",onClick:function(){N&&(C(N),K(!0),F(!1))},startIcon:jsxRuntimeExports.jsx(default_1$3,{}),className:x.popperBtns,children:jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.containerList.terminate",defaultMessage:"Terminate",description:"Terminate"})})]})}))})}})]}),jsxRuntimeExports.jsxs(Dialog,{open:q,onClose:function(){return O(!1)},"aria-labelledby":"terminate-dialog-title","aria-describedby":"terminate-dialog-description",children:[jsxRuntimeExports.jsx(DialogTitle,{id:"terminate-dialog-title",children:jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.containerList.confirmTerminate",defaultMessage:"Confirm Termination",description:"Confirm Termination"})}),jsxRuntimeExports.jsx(DialogContent,{children:jsxRuntimeExports.jsx(Typography,{children:jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.containerList.confirmTerminateContent",defaultMessage:"Are you sure you want to terminate this container? This action cannot be undone.",description:"Confirm Termination Content"})})}),jsxRuntimeExports.jsxs(DialogActions,{children:[jsxRuntimeExports.jsx(Button,{onClick:function(){return O(!1)},disabled:Q,children:jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.containerList.cancel",defaultMessage:"Cancel",description:"Cancel"})}),jsxRuntimeExports.jsx(LoadingButton,{onClick:function(){return O(!0)},color:"error",loading:Q,variant:"contained",children:jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.containerList.terminateConfirm",defaultMessage:"Terminate",description:"Terminate Confirm"})})]})]})]})}),useSharedStyles=(ContainerList.displayName="ContainerList",makeStyles()(function(e){return{actionIcon:{padding:"10px!important",marginRight:"-8px!important","& svg":{fill:"#555F7C!important"}},actionIconClose:{padding:"10px!important",backgroundColor:"#EEF3F9!important",marginRight:"-8px!important","& svg":{fill:"#555F7C!important"}}}}));function FiltersControl(e){var t=useSharedStyles().classes;return jsxRuntimeExports.jsx(Tooltip,{title:e.showNavigation?SHARED_MESSAGES.hideFilters():SHARED_MESSAGES.showFilters(),children:jsxRuntimeExports.jsx(IconButton,{"data-test":"flow-center-action-btn-toggleNavigation",onClick:function(){return e.setShowNavigation(!e.showNavigation)},className:"".concat(e.showNavigation?t.actionIconClose:t.actionIcon),size:"large",children:e.showNavigation?jsxRuntimeExports.jsx("img",{width:24,height:24,src:img$x,alt:"filterCloseIcon",draggable:"false"}):jsxRuntimeExports.jsx(default_1$2,{})})})}var useStyles$9=makeStyles()(function(){return{iconDistance:{marginLeft:"8px!important"}}});function MoreInfControl(e){var t=useStyles$9().classes,r=useSharedStyles().classes;return jsxRuntimeExports.jsx(Tooltip,{title:e.openFlowDetails?SHARED_MESSAGES.hideMoreInformation():SHARED_MESSAGES.showMoreInformation(),children:jsxRuntimeExports.jsx(IconButton,{"data-test":"flow-center-action-btn-openFlowWidget",onClick:function(){return e.setOpenFlowDetails()},className:"".concat(t.iconDistance," ").concat(e.openFlowDetails?r.actionIconClose:r.actionIcon),size:"large",children:jsxRuntimeExports.jsx("img",{width:24,height:24,src:img$10,alt:"filterCloseIcon",draggable:"false"})})})}var ReloadControl=function(e){var t=e.onReload,e=e.loading,e=void 0!==e&&e;return jsxRuntimeExports.jsx(Tooltip,{title:jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.toolbar.reload",defaultMessage:"Reload",description:"Reload button tooltip"}),children:jsxRuntimeExports.jsx(IconButton,{"data-testid":"toolbar-reload-button",onClick:t,disabled:e,size:"medium",sx:{marginLeft:"8px","&:hover":{backgroundColor:"rgba(0, 0, 0, 0.04)"},"@keyframes spin":{"0%":{transform:"rotate(0deg)"},"100%":{transform:"rotate(360deg)"}}},children:jsxRuntimeExports.jsx(default_1$1,{sx:{fontSize:"24px",animation:e?"spin 1s linear infinite":"none"}})})})},useStyles$8=makeStyles()(function(e){return{grow:{flex:1,maxWidth:"unset!important"},flowsLength:{marginLeft:"6px!important",fontFamily:"Nunito",fontStyle:"normal!important",fontWeight:"400!important",fontSize:"16px!important",lineHeight:"22px!important",letterSpacing:"0px!important",color:"#5C6269!important"},toolbar:{position:"sticky!important",top:"0!important",zIndex:"1!important",backgroundColor:"white!important",marginLeft:0,paddingLeft:"12px!important",borderBottom:"0.5px solid #D5DFE9",paddingRight:"24px!important"},searchResultLength:{paddingLeft:"26px!important"},title:{display:"flex",fontFamily:"Nunito",fontStyle:"normal!important",fontWeight:"600!important",fontSize:"16px!important",lineHeight:"22px!important",letterSpacing:"0px!important",color:"#2A323C!important"},additionalOptBtn:{padding:e.spacing(1)+"px!important"}}});function Toolbar(e){var t=e.header,r=e.setShowNavigation,n=e.showNavigation,o=e.setOpenFlowDetails,a=e.openFlowDetails,s=e.screen,i=e.onReload,e=e.isReloading,l=useStyles$8().classes,c=useSelector(function(e){return e.flows.flows}),u=useSelector(function(e){return e.flows.notebooks}),p=useSelector(function(e){return e.flows.isSearching}),d=useSelector(function(e){return e.flows.fetchingFlows}),m=useSelector(function(e){return e.flows.isSearchingLoading}),f=useSelector(function(e){return e.flows.filteredTemplates})||[],x=useSelector(function(e){return e.flows.searchedTemplates})||[];return jsxRuntimeExports.jsxs(Toolbar$1,{className:"".concat(l.toolbar," ").concat(p?l.searchResultLength:""),id:"flow-center-toolbar-id",children:[jsxRuntimeExports.jsxs(Typography,{className:l.title,children:[p?jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.eHPGww",defaultMessage:"Search Results",description:"flow-center-header-title"}):jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.vYqggl",defaultMessage:"{defaultMessage}",description:"flow-center-header-title",values:{defaultMessage:null==t?void 0:t.text}}),(()=>{if(p)return jsxRuntimeExports.jsx("div",{children:m?jsxRuntimeExports.jsx(Skeleton,{variant:"rectangular",animation:"wave",width:40,height:18,sx:{marginLeft:"10px"}}):jsxRuntimeExports.jsx(Typography,{"data-test":"flow-center-toolbar-searchResultsLength",className:l.flowsLength,children:c.length+x.length+u.length})});switch(null==t?void 0:t.key){case ENGINE_OWNER_TYPES.MINE:return jsxRuntimeExports.jsx("div",{children:d?jsxRuntimeExports.jsx(Skeleton,{variant:"rectangular",animation:"wave",width:40,height:18,sx:{marginLeft:"10px"}}):jsxRuntimeExports.jsx(Typography,{"data-test":"flow-center-toolbar-flowLength",className:l.flowsLength,children:c.length})});case ENGINE_OWNER_TYPES.TEMPLATES:return jsxRuntimeExports.jsx(Typography,{"data-test":"flow-center-toolbar-filteredTemplatesLength",className:l.flowsLength,children:f.length});case ENGINE_OWNER_TYPES.NOTEBOOKS:return jsxRuntimeExports.jsx(Typography,{"data-test":"flow-center-toolbar-flowLength",className:l.flowsLength,children:u.length});default:return jsxRuntimeExports.jsx("div",{})}})()]}),jsxRuntimeExports.jsx("div",{className:l.grow}),(null==t?void 0:t.key)===ENGINE_OWNER_TYPES.TEMPLATES&&jsxRuntimeExports.jsx(FiltersControl,{setShowNavigation:r,showNavigation:n}),(null==t?void 0:t.key)===ENGINE_OWNER_TYPES.CONTAINERS&&i&&jsxRuntimeExports.jsx(ReloadControl,{onReload:i,loading:e}),s!==ENGINE_OWNER_TYPES.CONTAINERS&&(0!==c.length||s===ENGINE_OWNER_TYPES.TEMPLATES)&&jsxRuntimeExports.jsx(MoreInfControl,{setOpenFlowDetails:o,openFlowDetails:a})]})}var useStyles$7=makeStyles()(function(e){return{title:{alignSelf:"center",flexBasis:"200px!important",fontFamily:"Dosis!important",fontStyle:"normal!important",fontWeight:"600!important",fontSize:"18px!important",lineHeight:"23px!important",letterSpacing:"0.25px!important",textTransform:"uppercase!important",color:"#5C6269!important"}}});function HeaderBarTitle(e){var t=useStyles$7().classes;return jsxRuntimeExports.jsx(Typography,{"data-test":"flow-center-headerbar-title",className:t.title,noWrap:!0,id:"flow-center-headerbar-title",children:e.title})}function _array_like_to_array$4(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function _array_with_holes$4(e){if(Array.isArray(e))return e}function _iterable_to_array_limit$4(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,a=[],s=!0,i=!1;try{for(r=r.call(e);!(s=(n=r.next()).done)&&(a.push(n.value),!t||a.length!==t);s=!0);}catch(e){i=!0,o=e}finally{try{s||null==r.return||r.return()}finally{if(i)throw o}}return a}}function _non_iterable_rest$4(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _sliced_to_array$4(e,t){return _array_with_holes$4(e)||_iterable_to_array_limit$4(e,t)||_unsupported_iterable_to_array$4(e,t)||_non_iterable_rest$4()}function _unsupported_iterable_to_array$4(e,t){var r;if(e)return"string"==typeof e?_array_like_to_array$4(e,t):"Map"===(r="Object"===(r=Object.prototype.toString.call(e).slice(8,-1))&&e.constructor?e.constructor.name:r)||"Set"===r?Array.from(r):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?_array_like_to_array$4(e,t):void 0}var useStyles$6=makeStyles()(function(e){return{root:{},container:{width:"570px",background:"#fff",borderRadius:"50px"},searchInputContainer:{width:"100%",borderRadius:"50px",display:"flex",alignItems:"center",padding:"7px"},searchInputContainerDefault:{backgroundColor:"#fff",border:"0.5px solid #D5DFE9"},searchInputContainerHover:{border:"0.5px solid #A8B2BC","& input::placeholder":{opacity:"1!important",color:"#2A323C!important"}},searchInputContainerActive:{border:"0.5px solid #0D62D2"},input:{},searchInput:{border:"0",outline:"none",background:"transparent !important",width:"100%",fontSize:"15px","&::placeholder":{opacity:"0.4"},"&:-webkit-autofill":{WebkitBoxShadow:"0 0 0 100px #FFF inset"}},searchIconContainer:{padding:"0px 7px",display:"flex",alignItems:"center",justifyContent:"center"},closeIcon:{fill:"#555F7C!important",cursor:"pointer!important",width:e.spacing(2)+"px!important",height:e.spacing(2)+"px!important"},grow:{flexGrow:1},setDisplay:{display:"none"}}});function HeaderBarSearchBar(r){function e(e){var t=""!==e.target.value;n(toggleIsSearching(t)),n(toggleIsSearchingLoading(!0)),n(fetchFlows({name:e.target.value,ownerType:ENGINE_OWNER_TYPES.MINE})),r.enableNotebooks&&n(fetchNotebooks({name:e.target.value,ownerType:ENGINE_OWNER_TYPES.NOTEBOOKS})),n(setSearched(e.target.value))}var t=useStyles$6().classes,n=useDispatch(),o=_sliced_to_array$4(reactExports.useState(!1),2),a=o[0],s=o[1],o=_sliced_to_array$4(reactExports.useState(!1),2),i=o[0],l=o[1],o=useSelector(function(e){return e.flows.searched}),c=useSelector(preferredLanguageSelector)||"en",c=AIWareFormatMessage(c);return r.showSearchBar?jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx("div",{id:"flow-center-headerbar-searchbar-id",className:t.container,onMouseEnter:function(){return s(!0)},onMouseLeave:function(){s(!1)},children:jsxRuntimeExports.jsxs("div",{className:"".concat(t.searchInputContainer," ").concat(a||i?a&&!i?t.searchInputContainerHover:i?t.searchInputContainerActive:void 0:t.searchInputContainerDefault),children:[jsxRuntimeExports.jsx("div",{className:t.searchIconContainer,children:jsxRuntimeExports.jsx(Search,{fontSize:"small",sx:{color:a||i?"#555F7C":"#555F7C99"}})}),jsxRuntimeExports.jsx("input",{id:"flow-center-headerbar-searchbar","data-test":"flow-center-headerbar-searchbar",value:o,onFocus:function(){return l(!0)},onBlur:function(){return l(!1)},placeholder:c({id:"os-flow-center.searchflowcenter1",defaultMessage:"Search the flow center",description:"Placeholder for search flow center search box."}),className:t.searchInput,onChange:e}),o&&jsxRuntimeExports.jsx(Close$1,{fontSize:"small",sx:{color:a||i?"#555F7C":"#555F7C99"},onClick:function(){n(toggleIsSearching(!1)),n(toggleIsSearchingLoading(!1)),n(setSearched("")),n(setSearchedTemplates(null)),n(fetchFlows({name:"",ownerType:ENGINE_OWNER_TYPES.MINE}))}})]})}),jsxRuntimeExports.jsx("div",{className:t.grow}),jsxRuntimeExports.jsx("div",{})]}):jsxRuntimeExports.jsx("div",{})}var useStyles$5=makeStyles()(function(e){return{buttonFlowCenter:{margin:e.spacing(1)+"px!important",textTransform:"none!important",justifyContent:"start!important",borderRadius:e.shape.borderRadius,fontFamily:"Nunito",fontStyle:"normal!important",fontWeight:600,fontSize:"14px!important",lineHeight:"19px!important",letterSpacing:"-1.30385e-09px!important","&&":{borderTopRightRadius:0,borderBottomRightRadius:0}},buttonFlowCenterAdvanceDisabled:{margin:e.spacing(1)+"px!important",textTransform:"none!important",justifyContent:"start!important",borderRadius:e.shape.borderRadius,fontFamily:"Nunito",fontStyle:"normal!important",fontWeight:600,fontSize:"14px!important",lineHeight:"19px!important",letterSpacing:"-1.30385e-09px!important"},buttonAddNew:{background:"#0D62D2!important",color:e.palette.background.paper},marginRight:{marginRight:"".concat(e.spacing(0),"!important"),padding:"".concat(e.spacing(1.6)," ").concat(e.spacing(2.8)," !important"),marginLeft:"8px!important"},btnWidth:{width:"134px!important",marginTop:"18px!important",display:"flex!important",justifyContent:"center!important"},btnWidthAdvanceDisabled:{width:"171px!important",marginTop:"18px!important",display:"flex!important",justifyContent:"center!important"},backdrop:{zIndex:e.zIndex.drawer+1,color:"#fff"},flowIconAdd:{fill:"#fff"},flowIconAddAdvanced:{fill:"#fff",minWidth:"20px!important",maxHeight:"20px!important"},loadingBarcontainer:{width:"20px!important",height:"20px!important",display:"flex",justifyContent:"center",color:"#00000042"},disabledButton:{background:"#efefef4d!important",color:"#00000042"},fullWidth:{width:"100%"},paddingDiv:{paddingTop:"20px"},buttonDiv:{display:"flex"},iconButton:{margin:e.spacing(1)+"px!important",textTransform:"none!important",justifyContent:"center!important",borderRadius:e.shape.borderRadius,fontFamily:"Nunito",fontStyle:"normal!important",fontWeight:600,fontSize:"14px!important",lineHeight:"19px!important",letterSpacing:"-1.30385e-09px!important",background:"#0D62D2!important",color:e.palette.background.paper,minWidth:"14px!important",maxWidth:"34px!important","&&":{borderTopLeftRadius:0,borderBottomLeftRadius:0}},iconButtonDisabled:{margin:e.spacing(1)+"px!important",textTransform:"none!important",justifyContent:"center!important",borderRadius:e.shape.borderRadius,fontFamily:"Nunito",fontStyle:"normal!important",fontWeight:600,fontSize:"14px!important",lineHeight:"19px!important",letterSpacing:"-1.30385e-09px!important",background:"#efefef4d!important",color:"#00000042",minWidth:"14px!important",maxWidth:"34px!important","&&":{borderTopLeftRadius:0,borderBottomLeftRadius:0}},iconButtonFullScreen:{marginRight:"24px!important",background:"#0D62D2!important",color:e.palette.background.paper,minWidth:"14px!important",maxWidth:"37px!important",marginTop:"18px!important",justifyContent:"center!important","&&":{borderTopLeftRadius:0,borderBottomLeftRadius:0}},iconButtonFullScreenDisabled:{marginRight:"24px!important",background:"#efefef4d!important",color:"#00000042",minWidth:"14px!important",maxWidth:"37px!important",marginTop:"18px!important",justifyContent:"center!important","&&":{borderTopLeftRadius:0,borderBottomLeftRadius:0}},flowName:{width:"449px"}}});function HeaderBarButtons(e){var t=useStyles$5().classes,r=useSelector(function(e){return e.flows.isLoadingCreateNewFlow});return jsxRuntimeExports.jsxs("div",{className:t.buttonDiv,children:["notebooks"!==e.screen&&jsxRuntimeExports.jsx(Button,{"data-test":"flow-center-header-onCreateNewFlowButton",id:"flow-center-header-onCreateNewFlowButton",variant:"outlined",disabled:r,startIcon:r?jsxRuntimeExports.jsx(CircularProgress,{className:t.loadingBarcontainer}):jsxRuntimeExports.jsx(default_1$e,{className:t.flowIconAdd}),className:"".concat(t.buttonFlowCenterAdvanceDisabled," ").concat(t.buttonAddNew,"\n ").concat(r?t.disabledButton:"","\n ").concat(e.showAdditionalOptionButton?t.marginRight:""," ").concat(e.automateFullScreen?t.btnWidthAdvanceDisabled:""),onClick:function(){return e.handleOpenFlowNameDialog("",!1)},children:SHARED_MESSAGES.newFlow()}),e.enableNotebooks&&"notebooks"===e.screen&&jsxRuntimeExports.jsx(Button,{"data-test":"flow-center-header-onCreateNewFlowButton",id:"flow-center-header-onCreateNewFlowButton",variant:"outlined",disabled:r,startIcon:r?jsxRuntimeExports.jsx(CircularProgress,{className:t.loadingBarcontainer}):jsxRuntimeExports.jsx(default_1$e,{className:t.flowIconAdd}),className:"".concat(t.buttonFlowCenterAdvanceDisabled," ").concat(t.buttonAddNew,"\n ").concat(r?t.disabledButton:"","\n ").concat(e.showAdditionalOptionButton?t.marginRight:""," ").concat(e.automateFullScreen?t.btnWidthAdvanceDisabled:""),onClick:function(){return e.handleOpenFlowNameDialog("",!0)},children:SHARED_MESSAGES.newNotebook()})]})}var useStyles$4=makeStyles()(function(e){return{additionalOptionsContainer:{borderLeft:"0.5px solid #D9E2EB!important",paddingLeft:e.spacing(1.6)+"px!important"},additionalOptBtn:{padding:e.spacing(1.6)+"px!important"}}});function HeaderBarControlButtons(e){var t=useStyles$4().classes;return e.showAdditionalOptionButton?jsxRuntimeExports.jsxs("div",{className:t.additionalOptionsContainer,children:[e.showFullScreenButton&&jsxRuntimeExports.jsx(Tooltip,{title:e.fullScreen?SHARED_MESSAGES.exitFullScreen():SHARED_MESSAGES.enterFullScreen(),children:jsxRuntimeExports.jsx(IconButton,{className:t.additionalOptBtn,"data-test":"flow-center-action-btn-toggleFullScreen",onClick:function(){e.setFullScreen(!e.fullScreen)},size:"large",children:jsxRuntimeExports.jsx("img",{src:e.fullScreen?img$y:img$A,alt:"fullscreen-icon",draggable:"false"})})}),e.showCollapseButton&&jsxRuntimeExports.jsx(Tooltip,{title:SHARED_MESSAGES.closePanel(),children:jsxRuntimeExports.jsx(IconButton,{"data-test":"flow-center-action-btn-closePanel",className:t.additionalOptBtn,onClick:function(){e.hidePanel&&e.hidePanel()},size:"large",children:jsxRuntimeExports.jsx("img",{src:img$1e,alt:"collapseicon",draggable:"false"})})})]}):jsxRuntimeExports.jsx("div",{})}function _array_like_to_array$3(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function _array_with_holes$3(e){if(Array.isArray(e))return e}function _iterable_to_array_limit$3(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,a=[],s=!0,i=!1;try{for(r=r.call(e);!(s=(n=r.next()).done)&&(a.push(n.value),!t||a.length!==t);s=!0);}catch(e){i=!0,o=e}finally{try{s||null==r.return||r.return()}finally{if(i)throw o}}return a}}function _non_iterable_rest$3(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _sliced_to_array$3(e,t){return _array_with_holes$3(e)||_iterable_to_array_limit$3(e,t)||_unsupported_iterable_to_array$3(e,t)||_non_iterable_rest$3()}function _unsupported_iterable_to_array$3(e,t){var r;if(e)return"string"==typeof e?_array_like_to_array$3(e,t):"Map"===(r="Object"===(r=Object.prototype.toString.call(e).slice(8,-1))&&e.constructor?e.constructor.name:r)||"Set"===r?Array.from(r):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?_array_like_to_array$3(e,t):void 0}var useStyles$3=makeStyles()(function(e){return{root:{backgroundColor:"#FAFAFA",paddingRight:14,display:"flex!important",alignItems:"center!important",paddingLeft:24},headerbarContainer:{position:"fixed!important",width:"inherit!important",zIndex:"99!important","& header":{boxShadow:"none!important"}},headerbarContainerBorder:{borderBottom:"1px solid rgba(0, 0, 0, 0.12)!important"},fullScreenState:{zIndex:"1!important","& header":{boxShadow:"none!important"}},header:{padding:"0px!important"}}});function Headerbar(e){var t=e.options,r=e.handleOpenFlowNameDialog,n=e.collapseFlowCenter,o=e.setFullScreen,a=e.setScreen,s=e.fullScreen,i=e.hidePanel,l=e.zIndex,c=e.automateFullScreen,u=e.enableNotebooks,e=e.screen,p=useStyles$3().classes,d=_sliced_to_array$3(reactExports.useState(!1),2),m=d[0],d=d[1];return jsxRuntimeExports.jsx("div",{className:"".concat(p.headerbarContainer," ").concat(c?m?null:p.fullScreenState:p.headerbarContainerBorder),id:"flow-center-headerbar-container","data-test":"flow-center-headerbar-container",children:c?jsxRuntimeExports.jsxs(reactExports.Fragment,{children:[jsxRuntimeExports.jsx(HeaderBarSearchBar,{showSearchBar:t.showSearchBar,isFullScreen:s,setScreen:a,automateFullScreen:c,enableNotebooks:u}),jsxRuntimeExports.jsx(HeaderBarButtons,{showAdditionalOptionButton:t.showAdditionalOptionButton,showCreateNewFlow:t.showCreateNewFlow,showNewFromTemplate:t.showNewFromTemplate,isFullScreen:s,handleOpenFlowNameDialog:r,zIndex:l,automateFullScreen:c,openClusterDialog:m,setOpenClusterDialog:d,enableNotebooks:u,screen:e})]}):jsxRuntimeExports.jsx(AppBar,{position:"static",color:"transparent",className:p.header,children:jsxRuntimeExports.jsxs(Toolbar$1,{className:p.root,children:[jsxRuntimeExports.jsx(HeaderBarTitle,{title:t.title}),jsxRuntimeExports.jsx(HeaderBarSearchBar,{showSearchBar:t.showSearchBar,setScreen:a,automateFullScreen:c,enableNotebooks:u}),jsxRuntimeExports.jsx(HeaderBarButtons,{showAdditionalOptionButton:t.showAdditionalOptionButton,showCreateNewFlow:t.showCreateNewFlow,showNewFromTemplate:t.showNewFromTemplate,handleOpenFlowNameDialog:r,zIndex:l,automateFullScreen:c,openClusterDialog:m,setOpenClusterDialog:d,enableNotebooks:u,screen:e}),jsxRuntimeExports.jsx(HeaderBarControlButtons,{showAdditionalOptionButton:t.showAdditionalOptionButton,showFullScreenButton:t.showFullScreenButton,showCollapseButton:t.showCollapseButton,collapseFlowCenter:n,setFullScreen:o,fullScreen:s,hidePanel:i})]})})})}var DEFAULT_FILTERS_FOR_TAB_TEMPLATES=[ENGINE_FILTER_TYPES.TAGS,ENGINE_FILTER_TYPES.CATEGORIES,"author",ENGINE_FILTER_TYPES.PUBLIC],DEFAULT_FILTERS_FOR_TAB_MY_FLOWS=[],DEFAULT_TABS=[ENGINE_OWNER_TYPES.MINE,ENGINE_OWNER_TYPES.TEMPLATES,ENGINE_OWNER_TYPES.CONTAINERS],BETA_TABS=[ENGINE_OWNER_TYPES.NOTEBOOKS],DEFAULT_FILTERS=[ENGINE_FILTER_TYPES.TAGS],ALL_TABS=[{key:ENGINE_OWNER_TYPES.ORGANIZATION,text:jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.organizationcategory",defaultMessage:"My Organization",description:"My Organization Category"}),icon:default_1$9},{key:ENGINE_OWNER_TYPES.MINE,text:jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.orgflows",defaultMessage:"Org Flows",description:"Org Flows Category"}),icon:default_1$7},{key:ENGINE_OWNER_TYPES.SHARED,text:jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.sharedwmecategory",defaultMessage:"Shared w/ me",description:"Shared with me Category"}),icon:default_1$8},{key:ENGINE_OWNER_TYPES.TEMPLATES,text:jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.templatescategory",defaultMessage:"Templates",description:"Templates Category"}),icon:default_1$6},{key:ENGINE_OWNER_TYPES.CONTAINERS,text:jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.containerscategory",defaultMessage:"Container Dashboard",description:"Automate Container Dashboard"}),icon:default_1},{key:ENGINE_OWNER_TYPES.NOTEBOOKS,text:jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.notebookscategory",defaultMessage:"Notebooks",description:"Noteboks Category"}),icon:default_1$7}],ALL_FILTERS=[{group:ENGINE_FILTER_TYPES.CERTIFIED,text:jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.certified",defaultMessage:"Certified",description:"Flow Center Certified Filter"}),options:[{text:jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.veritonecertified.filter",defaultMessage:"Veritone Certified",description:"Veritone Certified Filter"}),value:"veritone_certified"},{text:jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.verified",defaultMessage:"Verified Publisher",description:"Verified Publisher filter"}),value:"verified_publisher"}]},{group:ENGINE_FILTER_TYPES.CATEGORIES,text:jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.categories",defaultMessage:"Categories",description:"Flow Center filter Categories"}),options:[]},{group:ENGINE_FILTER_TYPES.INDUSTRIES,text:jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.industries",defaultMessage:"Industries",description:"Flow Center filter Industries"}),options:[{text:jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.hitech",defaultMessage:"Hi Tech",description:"Flow Center filter option value Hi Tech"}),value:"Hi Tech"},{text:jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.medicine",defaultMessage:"Medicine",description:"Flow Center filter option value Medicine"}),value:"Medicine"},{text:jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.law",defaultMessage:"Law",description:"Flow Center filter option value Law"}),value:"Law"},{text:jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.government",defaultMessage:"Government",description:"Flow Center filter option value Government"}),value:"Government"}]},{group:ENGINE_FILTER_TYPES.APPLICATIONS,text:jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.applications",defaultMessage:"Applications",description:"Flow Center filter Applications"}),options:[{text:jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.testapp",defaultMessage:"Test",description:"Flow Center filter option value Test"}),value:"Test"},{text:jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.speach",defaultMessage:"Speach",description:"Flow Center filter option value Speach"}),value:"Speach"},{text:jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.videoprocessing",defaultMessage:"Video processing",description:"Flow Center filter option value Video Processing"}),value:"Video processing"},{text:jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.smssender",defaultMessage:"Sms sender",description:"Flow Center filter option value Sms sender"}),value:"Sms sender"}]},{group:ENGINE_FILTER_TYPES.CLASSES,text:jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.classes",defaultMessage:"Classes",description:"Flow Center filter Classes"}),options:[{text:jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.networkisolated",defaultMessage:"Network isolated",description:"Flow Center filter option value Network Isolated"}),value:"Network isolated"},{text:jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.publicaccess",defaultMessage:"Public Access",description:"Flow Center filter option value Public Access"}),value:"Public Access"}]},{group:ENGINE_FILTER_TYPES.NOTEWORTHY,text:jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.noteworthy",defaultMessage:"Noteworthy",description:"Flow Center filter Noteworthy"}),options:[]},{group:ENGINE_FILTER_TYPES.TAGS,text:jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.tags",defaultMessage:"Tags",description:"Flow Center filter Tags"}),options:[]},{group:"author",text:jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.developer",defaultMessage:"Developer",description:"Flow Center filter Developer"}),options:[]},{group:ENGINE_FILTER_TYPES.PRICE,text:jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.price",defaultMessage:"Price",description:"Flow Center filter Price"}),options:[{text:jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.under25",defaultMessage:"Under $25",description:"Flow Center filter option value Under $25"}),value:"Under $25"},{text:jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.25to50",defaultMessage:"$25 to $50",description:"Flow Center filter option value $25 to $50"}),value:"$25 to $50"},{text:jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.50to100",defaultMessage:"$50 to $100",description:"Flow Center filter option value $50 to $100"}),value:"$50 to $100"},{text:jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.100to200",defaultMessage:"$100 to $200",description:"Flow Center filter option value $100 to $200"}),value:"$100 to $200"}]},{group:ENGINE_FILTER_TYPES.PUBLIC,text:jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.tags",defaultMessage:"Type",description:"Flow Center filter Is Public"}),options:[{text:jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.is_public",defaultMessage:"Is Public",description:"Flow Center filter is public option value"}),value:"1"}]}],DEFAULT_GRAPHQL_ENDPOINT="v3/graphql",DEFAULT_CLUSTER="prd5-21xbyq0x-4h0s-o685-snas-oovhdai552v9",useStyles$2=makeStyles()(function(e){return{container:{minHeight:"calc(100vh - 64px - 64px - 54px)"},contentContainer:{justifyContent:"center",alignItems:"center",display:"flex",flexDirection:"column"},textContainer:{marginTop:26,display:"flex",flexDirection:"column",alignItems:"center"},title:{fontFamily:"Nunito",fontStyle:"normal!important",fontWeight:"normal!important",fontSize:"18px!important",lineHeight:"24px!important",letterSpacing:"-1.30385e-09px!important",color:"#1B1D1F!important"},subtitle:{marginTop:12,fontFamily:"Nunito",fontStyle:"normal!important",fontWeight:600,fontSize:"16px!important",lineHeight:"22px!important",letterSpacing:"-1.30385e-09px!important",color:"#5C6269!important",textAlign:"center"},buttonContainer:{marginTop:30,display:"flex",width:"100%",justifyContent:"space-evenly"},icon:{width:235,height:235},commonBtn:{fontFamily:"Nunito",fontStyle:"normal!important",fontWeight:600,fontSize:"14px!important",lineHeight:"20px!important",letterSpacing:"-1.30385e-09px!important",textTransform:"none",boxSizing:"border-box",borderRadius:"4px",paddingLeft:10,paddingRight:10,"&:hover":{background:"none",backgroundColor:"none"},background:"#FFFFFF",border:"1px solid #1871E8",color:"#1871E8!important"}}});function NoFlowsFound(e){var t=useStyles$2().classes;return jsxRuntimeExports.jsx(Grid,{container:!0,spacing:0,direction:"column",alignItems:"center",justifyContent:"center",className:t.container,children:jsxRuntimeExports.jsxs(Grid,{item:!0,xs:4,className:t.contentContainer,children:[jsxRuntimeExports.jsx("img",{className:t.icon,src:img$r,alt:"noFlowsFoundIcon"}),jsxRuntimeExports.jsxs("div",{className:t.textContainer,children:[jsxRuntimeExports.jsx(Typography,{className:t.title,children:SHARED_MESSAGES.noFlowsFound()}),jsxRuntimeExports.jsx(Typography,{className:t.subtitle,children:SHARED_MESSAGES.noFlowsFoundSubtitle()}),jsxRuntimeExports.jsxs(Box,{className:t.buttonContainer,children:[jsxRuntimeExports.jsx(Button,{className:t.commonBtn,onClick:function(){return e.handleOpenFlowNameDialog("")},children:SHARED_MESSAGES.createNewFlow()}),jsxRuntimeExports.jsx(Button,{className:t.commonBtn,onClick:function(){e.setScreen(ENGINE_OWNER_TYPES.TEMPLATES)},children:SHARED_MESSAGES.chooseATemplate()})]})]})]})})}var useStyles$1=makeStyles()(function(){return{tabsContainer:{paddingLeft:"18px",borderBottom:"0.5px solid #D5DFE9","& div > span:last-child":{backgroundColor:"black"}},tab:{fontFamily:"Nunito!important",fontWeight:400,fontStyle:"normal !important",fontSize:14,lineHeight:"18px",color:"#2A323C",textTransform:"none"}}});function TabsContainer(e){var t=useStyles$1().classes,r=e.selectedTab,n=e.handleChange,o=useSelector(function(e){return e.flows.flows}),a=useSelector(function(e){return e.flows.notebooks}),s=useSelector(function(e){return e.flows.filteredTemplates})||[],i=useSelector(function(e){return e.flows.searchedTemplates})||[],l=useSelector(function(e){return e.flows.isSearching});return jsxRuntimeExports.jsx(AppBar,{className:t.tabsContainer,position:"static",color:"transparent",elevation:0,children:jsxRuntimeExports.jsxs(Tabs,{value:r,onChange:n,"aria-label":"search-results-tabs",children:[jsxRuntimeExports.jsx(Tab,{id:"flow-center-searchResults-flows","data-test":"flow-center-searchResults-flows",className:t.tab,label:SHARED_MESSAGES.flowsCount(o.length)}),jsxRuntimeExports.jsx(Tab,{id:"flow-center-searchResults-templates","data-test":"flow-center-searchResults-templates",className:t.tab,label:SHARED_MESSAGES.templatesCount((l?i:s).length)}),e.notebookEnabled&&jsxRuntimeExports.jsx(Tab,{id:"flow-center-searchResults-notebooks","data-test":"flow-center-searchResults-notebooks",className:t.tab,label:SHARED_MESSAGES.notebookCount(a.length)})]})})}var getContentHeight=function(){var e=useSelector(function(e){return e.flows.config.isFullScreen});return useSelector(function(e){return e.flows.config.automateFullScreen})?"calc(100vh - 64px - 54px)":"calc(100vh - 64px - 64px - ".concat(e?"0px":"62px",")")},getFlowCenterConfig=function(){return{isFullScreen:useSelector(function(e){return e.flows.config.isFullScreen}),automateFullScreen:useSelector(function(e){return e.flows.config.automateFullScreen}),zIndex:useSelector(function(e){return e.flows.config.zIndex}),graphQLEndpoint:useSelector(function(e){return e.flows.config.graphQLEndpoint}),defaultCluster:useSelector(function(e){return e.flows.config.defaultCluster})}};function ResultsContainer(r){function e(){var e=0<arguments.length&&void 0!==arguments[0]&&arguments[0];return(""==n?function(){return jsxRuntimeExports.jsx(FlowList,{createFlowTemplate:r.createFlowTemplate,simpleMode:r.simpleMode,selectedFlowId:n,onSelectFlow:r.onSelectFlow,setFirstFlowId:r.setFirstFlowId,screenName:r.screenName,zIndex:l.zIndex,showTitle:!1,setOpenFlowDetails:r.setOpenFlowDetails,setOpenAlwaysUpFlow:r.setOpenAlwaysUpFlow,notebooks:0<arguments.length&&void 0!==arguments[0]&&arguments[0],betaFeatures:r.betaFeatures})}:function(){return jsxRuntimeExports.jsxs("div",{className:o.enginesAndFlowWidgetContainer,children:[jsxRuntimeExports.jsx("div",{className:o.enginesContainer,children:jsxRuntimeExports.jsx(FlowList,{createFlowTemplate:r.createFlowTemplate,simpleMode:""!==n,selectedFlowId:n,setFirstFlowId:function(e){a&&r.setSelectedFlowId(e)},onSelectFlow:function(e){r.scrollContainerToTop(),r.setSelectedFlowId(e),r.setAllowSetFirstFlowId(!1)},screenName:r.screenName,zIndex:l.zIndex,setOpenAlwaysUpFlow:function(e,t){r.scrollContainerToTop(),r.setOpenFlowRunningInstances(!1),r.setOpenFlowDetails(!1),t&&r.setSelectedFlowId(t),r.setOpenAlwaysUpFlow(e)},setOpenFlowDetails:function(e){r.setOpenFlowDetails(e)},notebooks:0<arguments.length&&void 0!==arguments[0]&&arguments[0],betaFeatures:r.betaFeatures})}),jsxRuntimeExports.jsx("div",{className:o.flowWidgetContainer,children:jsxRuntimeExports.jsx("div",{className:o.flowWidgetContainer,children:jsxRuntimeExports.jsx(App$1,{engineId:n,openFlowRunningInstances:r.openFlowRunningInstances,openAlwaysUpFlow:r.openAlwaysUpFlow,locale:i,openTab:r.openTabFlowWidget,config:{apiRoot:u,graphQLEndpoint:c,controllerUrl:d,defaultCluster:l.defaultCluster,controllerNodeRedImage:p,controllerFlowPath:s},tabs:[IFlowWidgetTabs.Overview,IFlowWidgetTabs.Versions,IFlowWidgetTabs.Activity,IFlowWidgetTabs.DistributionSettings],activityTabs:[IFlowWidgetActivityTabs.Jobs,IFlowWidgetActivityTabs.ScheduledJobs],onExitClicked:function(){r.setSelectedFlowId(""),r.setOpenFlowRunningInstances(!1),r.setOpenAlwaysUpFlow(!1),r.setOpenFlowDetails(!1)},onDeleteFlow:function(){setTimeout(function(){r.setUpdateFlowList(n),r.setSelectedFlowId(""),r.setUpdateFlowList("")},2e3)}})})})]})})(e)}var t=r.selectedTab,n=r.selectedFlowId,o=r.classes,a=r.allowSetFirstFlowId,s=r.controllerFlowPath,i=useSelector(preferredLanguageSelector)||"en",l=getFlowCenterConfig(),c=useSelector(graphEndpointSelector),u=useSelector(rootApiSelector),p=useSelector(controllerNodeRedImageSelector),d=useSelector(controllerUrlSelector);return jsxRuntimeExports.jsx(Box,{ml:3,children:0===t?e():1===t?jsxRuntimeExports.jsx(TemplateList,{handleOpenFlowNameDialog:r.handleOpenFlowNameDialog,openFirstTemplate:r.openFirstTemplate,isDeselectedTemplate:r.isDeselectedTemplate,onSelectedTemplate:r.onSelectedTemplate}):e(!0)})}function _array_like_to_array$2(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function _array_with_holes$2(e){if(Array.isArray(e))return e}function _iterable_to_array_limit$2(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,a=[],s=!0,i=!1;try{for(r=r.call(e);!(s=(n=r.next()).done)&&(a.push(n.value),!t||a.length!==t);s=!0);}catch(e){i=!0,o=e}finally{try{s||null==r.return||r.return()}finally{if(i)throw o}}return a}}function _non_iterable_rest$2(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _sliced_to_array$2(e,t){return _array_with_holes$2(e)||_iterable_to_array_limit$2(e,t)||_unsupported_iterable_to_array$2(e,t)||_non_iterable_rest$2()}function _unsupported_iterable_to_array$2(e,t){var r;if(e)return"string"==typeof e?_array_like_to_array$2(e,t):"Map"===(r="Object"===(r=Object.prototype.toString.call(e).slice(8,-1))&&e.constructor?e.constructor.name:r)||"Set"===r?Array.from(r):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?_array_like_to_array$2(e,t):void 0}var useStyles=makeStyles()(function(e){return{container:{width:"100%",overflowY:"auto"},tabsContainer:{paddingLeft:18,borderBottom:"0.5px solid #D5DFE9","& div > span:last-child":{backgroundColor:"black"}}}});function SearchResultsPage(e){var t=useStyles().classes,r=useDispatch(),n=useSelector(function(e){return e.flows.searched}),o=useSelector(function(e){return e.flows.isSearchingLoading}),a=useSelector(function(e){return e.flows.searchedTemplates||[]}),s=useSelector(function(e){return e.flows.filteredTemplates})||[],i=useSelector(function(e){return e.flows.flows}),l=_sliced_to_array$2(reactExports.useState(0),2),c=l[0],u=l[1],l=(reactExports.useEffect(function(){var t,e;return s&&0!==s.length&&(t=new RegExp(n,"gi"),e=s.filter(function(e){return t.lastIndex=0,t.test(e.title)}),r(setSearchedTemplates(e))),function(){r(setSearchedTemplates(null))}},[s,n]),function(e,t){u(t)}),p=getContentHeight();return o?jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsx(Skeleton,{variant:"rectangular",className:e.classes.lineItem}),jsxRuntimeExports.jsx(Skeleton,{variant:"rectangular",className:e.classes.lineItem}),jsxRuntimeExports.jsx(Skeleton,{variant:"rectangular",className:e.classes.lineItem})]}):!!a.length||!!i.length?jsxRuntimeExports.jsxs("div",{className:t.container,style:{height:p},children:[jsxRuntimeExports.jsx(TabsContainer,{selectedTab:c,handleChange:l,notebookEnabled:e.betaFeatures}),jsxRuntimeExports.jsx(ResultsContainer,{createFlowTemplate:e.createFlowTemplate,selectedTab:c,openFlowRunningInstances:e.openFlowRunningInstances,simpleMode:e.simpleMode,selectedFlowId:e.selectedFlowId,onSelectFlow:e.onSelectFlow,setFirstFlowId:e.setFirstFlowId,screenName:e.screenName,handleOpenFlowNameDialog:e.handleOpenFlowNameDialog,openFirstTemplate:e.openFirstTemplate,isDeselectedTemplate:e.isDeselectedTemplate,onSelectedTemplate:e.onSelectedTemplate,classes:e.classes,allowSetFirstFlowId:e.allowSetFirstFlowId,setSelectedFlowId:e.setSelectedFlowId,setOpenFlowRunningInstances:e.setOpenFlowRunningInstances,setOpenFlowDetails:e.setOpenFlowDetails,scrollContainerToTop:e.scrollContainerToTop,setAllowSetFirstFlowId:e.setAllowSetFirstFlowId,openTabFlowWidget:e.openTabFlowWidget,setUpdateFlowList:e.setUpdateFlowList,controllerFlowPath:e.controllerFlowPath,openAlwaysUpFlow:e.openAlwaysUpFlow,setOpenAlwaysUpFlow:e.setOpenAlwaysUpFlow,betaFeatures:e.betaFeatures})]}):jsxRuntimeExports.jsx(NoResults,{})}var createUniqueEngineMutation$1="mutation($name: String!, $templateId: ID!) {\n createFlow(input: { name: $name, templateId: $templateId} ) {\n id\n builds{\n records {\n id\n engineId\n name\n createdDateTime\n manifest\n runtime\n }\n }\n }\n}\n",createNotebookMutation="mutation($name: String!, $templateId: ID!) {\n createNotebook(input: { name: $name, templateId: $templateId} ) {\n id\n builds{\n records {\n id\n engineId\n name\n createdDateTime\n manifest\n runtime\n }\n }\n }\n}\n",createAutomateFlowMutation$1="mutation($name: String!, $templateId: ID!) {\n createAutomateFlow(input: { name: $name, templateId: $templateId} ) {\n engineId\n build {\n id\n engineId\n name\n createdDateTime\n manifest\n runtime\n }\n }\n}\n",getFlow$1="query getFlow($flowId: ID!) {\n engine(id: $flowId) {\n name\n state\n modifiedDateTime\n createdDateTime\n id\n manifest\n ownerOrganization{\n id\n name\n }\n builds {\n records {\n id\n version\n }\n }\n }\n} ",copyFlowMutation$1="\nmutation copyFlow($flowRevisionId: ID, $flowId: ID, $name: String){\n copyFlow(input: { \n flowId: $flowId,\n flowRevisionId:$flowRevisionId,\n name: $name,\n }) {\n id\n }\n}";function asyncGeneratorStep$2(e,t,r,n,o,a,s){try{var i=e[a](s),l=i.value}catch(e){return void r(e)}i.done?t(l):Promise.resolve(l).then(n,o)}function _async_to_generator$2(i){return function(){var e=this,s=arguments;return new Promise(function(t,r){var n=i.apply(e,s);function o(e){asyncGeneratorStep$2(n,t,r,o,a,"next",e)}function a(e){asyncGeneratorStep$2(n,t,r,o,a,"throw",e)}o(void 0)})}}function _define_property$2(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _object_spread$2(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{},n=Object.keys(r);(n="function"==typeof Object.getOwnPropertySymbols?n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})):n).forEach(function(e){_define_property$2(t,e,r[e])})}return t}function _ts_generator$2(n,o){var a,s,i,l={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]},e={next:t(0),throw:t(1),return:t(2)};return"function"==typeof Symbol&&(e[Symbol.iterator]=function(){return this}),e;function t(r){return function(e){var t=[r,e];if(a)throw new TypeError("Generator is already executing.");for(;l;)try{if(a=1,s&&(i=2&t[0]?s.return:t[0]?s.throw||((i=s.return)&&i.call(s),0):s.next)&&!(i=i.call(s,t[1])).done)return i;switch(s=0,(t=i?[2&t[0],i.value]:t)[0]){case 0:case 1:i=t;break;case 4:return l.label++,{value:t[1],done:!1};case 5:l.label++,s=t[1],t=[0];continue;case 7:t=l.ops.pop(),l.trys.pop();continue;default:if(!(i=0<(i=l.trys).length&&i[i.length-1])&&(6===t[0]||2===t[0])){l=0;continue}if(3===t[0]&&(!i||t[1]>i[0]&&t[1]<i[3]))l.label=t[1];else if(6===t[0]&&l.label<i[1])l.label=i[1],i=t;else{if(!(i&&l.label<i[2])){i[2]&&l.ops.pop(),l.trys.pop();continue}l.label=i[2],l.ops.push(t)}}t=o.call(n,l)}catch(e){t=[6,e],s=0}finally{a=i=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}}}var fetchVeritoneGraphQLApiCustomErrorHandling=(()=>{var a=_async_to_generator$2(function(t,r,n,o,a){var s;return _ts_generator$2(this,function(e){return s=appIdSelector(store.getState()),[2,fetch(t,{method:"POST",headers:_object_spread$2({"Content-Type":"application/json"},r&&{Authorization:"Bearer ".concat(r)},s?{"X-Veritone-Application":s}:{}),credentials:"include",body:JSON.stringify({query:n,variables:o,operationName:a})}).then(function(e){return e.json()}).then(function(e){var t;return e.errors&&(t="GraphQL Errors:\n".concat(e.errors.map(function(e){return"".concat(e.name,": ").concat(e.message,"\n")})),console.error("GraphQL Errors",e.errors),console.error("Error Message",t)),e}).catch(function(e){console.error("Error",e)})]})});return function(e,t,r,n,o){return a.apply(this,arguments)}})(),createUniqueEngineMutation=function(e,t,r,n){return fetchVeritoneGraphQLApiCustomErrorHandling(n,r,createUniqueEngineMutation$1,{name:e,templateId:t})},createNotebook=function(e,t,r,n){return fetchVeritoneGraphQLApiCustomErrorHandling(n,r,createNotebookMutation,{name:e,templateId:t})},createAutomateFlowMutation=function(e,t,r,n){return fetchVeritoneGraphQLApiCustomErrorHandling(n,r,createAutomateFlowMutation$1,{name:e,templateId:t})},getFlow=(()=>{var n=_async_to_generator$2(function(t,r,n){return _ts_generator$2(this,function(e){switch(e.label){case 0:return[4,fetchVeritoneGraphQLApi(n,r,getFlow$1,{flowId:t})];case 1:return[2,e.sent()]}})});return function(e,t,r){return n.apply(this,arguments)}})(),copyFlowMutation=function(e,t,r,n,o){return fetchVeritoneGraphQLApiCustomErrorHandling(o,n,copyFlowMutation$1,{flowId:r,flowRevisionId:t,name:e})};function _array_like_to_array$1(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function _array_with_holes$1(e){if(Array.isArray(e))return e}function asyncGeneratorStep$1(e,t,r,n,o,a,s){try{var i=e[a](s),l=i.value}catch(e){return void r(e)}i.done?t(l):Promise.resolve(l).then(n,o)}function _async_to_generator$1(i){return function(){var e=this,s=arguments;return new Promise(function(t,r){var n=i.apply(e,s);function o(e){asyncGeneratorStep$1(n,t,r,o,a,"next",e)}function a(e){asyncGeneratorStep$1(n,t,r,o,a,"throw",e)}o(void 0)})}}function _iterable_to_array_limit$1(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,a=[],s=!0,i=!1;try{for(r=r.call(e);!(s=(n=r.next()).done)&&(a.push(n.value),!t||a.length!==t);s=!0);}catch(e){i=!0,o=e}finally{try{s||null==r.return||r.return()}finally{if(i)throw o}}return a}}function _non_iterable_rest$1(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _sliced_to_array$1(e,t){return _array_with_holes$1(e)||_iterable_to_array_limit$1(e,t)||_unsupported_iterable_to_array$1(e,t)||_non_iterable_rest$1()}function _unsupported_iterable_to_array$1(e,t){var r;if(e)return"string"==typeof e?_array_like_to_array$1(e,t):"Map"===(r="Object"===(r=Object.prototype.toString.call(e).slice(8,-1))&&e.constructor?e.constructor.name:r)||"Set"===r?Array.from(r):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?_array_like_to_array$1(e,t):void 0}function _ts_generator$1(n,o){var a,s,i,l={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]},e={next:t(0),throw:t(1),return:t(2)};return"function"==typeof Symbol&&(e[Symbol.iterator]=function(){return this}),e;function t(r){return function(e){var t=[r,e];if(a)throw new TypeError("Generator is already executing.");for(;l;)try{if(a=1,s&&(i=2&t[0]?s.return:t[0]?s.throw||((i=s.return)&&i.call(s),0):s.next)&&!(i=i.call(s,t[1])).done)return i;switch(s=0,(t=i?[2&t[0],i.value]:t)[0]){case 0:case 1:i=t;break;case 4:return l.label++,{value:t[1],done:!1};case 5:l.label++,s=t[1],t=[0];continue;case 7:t=l.ops.pop(),l.trys.pop();continue;default:if(!(i=0<(i=l.trys).length&&i[i.length-1])&&(6===t[0]||2===t[0])){l=0;continue}if(3===t[0]&&(!i||t[1]>i[0]&&t[1]<i[3]))l.label=t[1];else if(6===t[0]&&l.label<i[1])l.label=i[1],i=t;else{if(!(i&&l.label<i[2])){i[2]&&l.ops.pop(),l.trys.pop();continue}l.label=i[2],l.ops.push(t)}}t=o.call(n,l)}catch(e){t=[6,e],s=0}finally{a=i=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}}}var DialogFormattedMessages={CREATE_FLOW:jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center-header-create-flow.jbxxqH",defaultMessage:"Create Flow",description:"msg create flow"}),CREATE_FLOW_UNIQUE_NAME:jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center-header.jbttty",defaultMessage:"Name Your Flow",description:"msg create flow with unique name"}),CREATE_NOTEBOOK_UNIQUE_NAME:jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center-header.uniqueNotebookName",defaultMessage:"Name Your Notebook",description:"msg create flow with unique name"}),CANCEL_FLOW_UNIQUE_NAME:jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center-header.hittrt",defaultMessage:"Cancel",description:"msg cancel naming flow"}),COPY_FLOW:jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center-header-copy-flow.jbxxqH",defaultMessage:"Copy Flow",description:"msg copy flow"}),CREATE_NOTEBOOK:jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center-header-create-flow.createNotebookButton",defaultMessage:"Create Notebook",description:"msg create Notebook"})};function FlowNameDialog(t){function l(){u(""),d(""),f(""),s(flowCenterDialogAction({open:!1,component:"",props:{}}))}var n,r,o,a,s=useDispatch(),e=useCommonStyles().classes,i=_sliced_to_array$1(reactExports.useState(""),2),c=i[0],u=i[1],i=_sliced_to_array$1(reactExports.useState(""),2),p=i[0],d=i[1],i=_sliced_to_array$1(reactExports.useState(t.templateId||""),2),m=i[0],f=i[1],i=useSelector(controllerUrlSelector),x=useSelector(automateControllerUrlSelector),g=(!i&&x&&x.replace("automate-",""),useSelector(automateUrlSelector)),_=useSelector(sessionTokenSelector),E=useSelector(graphEndpointSelector),h=useSelector(function(e){return e.flows.isRevisionsExistOnServer}),i=makeStyles()(function(e){return{paddingDiv:{paddingTop:"20px"},flowName:{width:"449px"}}})().classes,w=(n=_async_to_generator$1(function(t,r,n){var o;return _ts_generator$1(this,function(e){switch(e.label){case 0:return[4,getFlow(t,r,n)];case 1:if((o=e.sent()).errors&&0<o.errors.length)throw new Error("Error while getting new engine");return s(addNewFlow(o.data.engine)),[2]}})}),function(e,t,r){return n.apply(this,arguments)}),j=(r=_async_to_generator$1(function(t){var r,n,o,a,s,i;return _ts_generator$1(this,function(e){switch(e.label){case 0:return(r='Field "templateId" is not defined by type "CreateFlow".',n=c.trim(),o=m||"",t)?[4,createNotebook(n,o,_,E)]:[3,2];case 1:if((i=e.sent())&&i.errors&&0<i.errors.length)throw d(i.errors[0].message),new Error("Error while creating new flow");return l(),a=i&&i.data.createNotebook.id,s=i&&i.data.createNotebook.builds.records[0].id,[3,6];case 2:return[4,createUniqueEngineMutation(n,o,_,E)];case 3:return(i=e.sent()).errors&&0<i.errors.length&&i.errors[0].message===r?[4,createAutomateFlowMutation(n,o,_,E)]:[3,5];case 4:i=e.sent(),e.label=5;case 5:if(i&&i.errors&&0<i.errors.length)throw d(i.errors[0].message),new Error("Error while creating new flow");l(),a=i&&i.data.createFlow.id,s=i&&i.data.createFlow.builds.records[0].id,e.label=6;case 6:return[2,{engineId:a,engineBuildId:s}]}})}),function(e){return r.apply(this,arguments)}),S=(o=_async_to_generator$1(function(t){var r,n,o,a=arguments;return _ts_generator$1(this,function(e){switch(e.label){case 0:r=1<a.length&&void 0!==a[1]&&a[1],s(toggleStateCreateNewFlow(!0)),e.label=1;case 1:return e.trys.push([1,3,4,5]),[4,j(t)];case 2:return n=e.sent(),o=n.engineId,n=n.engineBuildId,w(o,_,E).catch(function(e){devErrorLogger("Error while adding flow: ".concat(JSON.stringify(e)))}),n=h?"latest":n,s(toggleStateCreateNewFlow(!1)),console.log("REDIRECT: ",r),r?s(setShouldCreateInitialFlows(!1)):(t&&window.open("".concat(g,"/notebook/").concat(o,"/").concat(n),"_blank","noopener"),window.open("".concat(g,"/flow/").concat(o,"/").concat(n),"_blank","noopener")),[3,5];case 3:return o=e.sent(),devErrorLogger(o),[3,5];case 4:return s(toggleStateCreateNewFlow(!1)),[7];case 5:return[2]}})}),function(e){return o.apply(this,arguments)}),y=(a=_async_to_generator$1(function(t){var r,n,o,a=arguments;return _ts_generator$1(this,function(e){switch(e.label){case 0:r=1<a.length&&void 0!==a[1]&&a[1],s(toggleStateCreateNewFlow(!0)),e.label=1;case 1:return e.trys.push([1,3,4,5]),n=c.trim(),[4,copyFlowMutation(n,t.flowRevisionId||"",t.flowId||"",_,E)];case 2:if((n=e.sent()).errors&&0<n.errors.length)throw d(n.errors[0].message),new Error("Error while copying flow");return l(),o=n&&n.data.copyFlow.id,w(o,_,E).catch(function(e){devErrorLogger("Error while adding flow: ".concat(JSON.stringify(e)))}),s(toggleStateCreateNewFlow(!1)),r?s(setShouldCreateInitialFlows(!1)):window.open("".concat(g,"/flow/").concat(o,"/latest"),"_blank","noopener"),[3,5];case 3:return o=e.sent(),devErrorLogger(o),[3,5];case 4:return s(toggleStateCreateNewFlow(!1)),[7];case 5:return[2]}})}),function(e){return a.apply(this,arguments)});return jsxRuntimeExports.jsxs("div",{className:e.container,children:[jsxRuntimeExports.jsx(DialogTitle,{className:e.title,children:t.isNotebook?DialogFormattedMessages.CREATE_NOTEBOOK_UNIQUE_NAME:DialogFormattedMessages.CREATE_FLOW_UNIQUE_NAME}),jsxRuntimeExports.jsxs(DialogContent,{className:e.content,children:[jsxRuntimeExports.jsx("div",{className:"".concat(i.paddingDiv),children:t.isNotebook?jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center-header-flow-name-dialog.notebookMustUnique",defaultMessage:"Your notebooks's name must be unique",description:"Your notebook's name must be unique"}):jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center-header-flow-name-dialog.jFggxR",defaultMessage:"Your flow's name must be unique",description:"Your flow's name must be unique"})}),jsxRuntimeExports.jsx("div",{className:"".concat(i.paddingDiv),children:jsxRuntimeExports.jsx(TextField,{id:"os-flow-center-header-flow-name-dialog-textfield.jFtfxR",className:i.flowName,label:t.isNotebook?"Notebook Name":"Flow Name",onChange:function(e){e=e.target.value;u(e)},variant:"outlined",value:c,error:!!p,helperText:p||null})})]}),jsxRuntimeExports.jsxs(DialogActions,{className:e.actions,children:[jsxRuntimeExports.jsx(Button,{"data-test":"flow-center-flow-list-cancelCreateFlowWithName",onClick:function(){l()},className:e.cancelButton,children:DialogFormattedMessages.CANCEL_FLOW_UNIQUE_NAME}),jsxRuntimeExports.jsx(Button,{disabled:!c,"data-test":"flow-center-flow-list-createFlowWithName",onClick:function(){var e;(e=t).isCopyFlow?y(e).catch(function(e){devErrorLogger("Error copying flow: ".concat(JSON.stringify(e)))}):e.isNotebook?S(!0).catch(function(e){devErrorLogger("Error creating flow: ".concat(JSON.stringify(e)))}):S(!1).catch(function(e){devErrorLogger("Error creating flow: ".concat(JSON.stringify(e)))})},className:c?e.confirmationButton:e.disabledButton,autoFocus:!0,children:t.isNotebook?DialogFormattedMessages.CREATE_NOTEBOOK:!0===t.isCopyFlow?DialogFormattedMessages.COPY_FLOW:DialogFormattedMessages.CREATE_FLOW})]})]})}function _define_property$1(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _object_spread$1(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{},n=Object.keys(r);(n="function"==typeof Object.getOwnPropertySymbols?n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})):n).forEach(function(e){_define_property$1(t,e,r[e])})}return t}function UniversalDialog(){var r=useSelector(flowCenterDialogSelector)||null,e=useDispatch(),n=[{name:"FlowNameDialog",component:FlowNameDialog}];return jsxRuntimeExports.jsx(Dialog,{open:r.flowCenterDialog.open,onClose:function(){e(flowCenterDialogAction({open:!1,component:"",props:{}}))},children:jsxRuntimeExports.jsx("div",{children:r.flowCenterDialog.component&&jsxRuntimeExports.jsx(function(){var t,e=(t=r.flowCenterDialog.component)?n.filter(function(e){return e.name===t})[0].component:null;return jsxRuntimeExports.jsx(reactExports.Suspense,{fallback:jsxRuntimeExports.jsx(CircularProgress,{}),children:jsxRuntimeExports.jsx(e,_object_spread$1({},r.flowCenterDialog.props))})},{})})})}function _array_like_to_array(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function _array_with_holes(e){if(Array.isArray(e))return e}function _array_without_holes(e){if(Array.isArray(e))return _array_like_to_array(e)}function asyncGeneratorStep(e,t,r,n,o,a,s){try{var i=e[a](s),l=i.value}catch(e){return void r(e)}i.done?t(l):Promise.resolve(l).then(n,o)}function _async_to_generator(i){return function(){var e=this,s=arguments;return new Promise(function(t,r){var n=i.apply(e,s);function o(e){asyncGeneratorStep(n,t,r,o,a,"next",e)}function a(e){asyncGeneratorStep(n,t,r,o,a,"throw",e)}o(void 0)})}}function _iterable_to_array(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function _iterable_to_array_limit(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,a=[],s=!0,i=!1;try{for(r=r.call(e);!(s=(n=r.next()).done)&&(a.push(n.value),!t||a.length!==t);s=!0);}catch(e){i=!0,o=e}finally{try{s||null==r.return||r.return()}finally{if(i)throw o}}return a}}function _non_iterable_rest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _non_iterable_spread(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _sliced_to_array(e,t){return _array_with_holes(e)||_iterable_to_array_limit(e,t)||_unsupported_iterable_to_array(e,t)||_non_iterable_rest()}function _to_consumable_array(e){return _array_without_holes(e)||_iterable_to_array(e)||_unsupported_iterable_to_array(e)||_non_iterable_spread()}function _unsupported_iterable_to_array(e,t){var r;if(e)return"string"==typeof e?_array_like_to_array(e,t):"Map"===(r="Object"===(r=Object.prototype.toString.call(e).slice(8,-1))&&e.constructor?e.constructor.name:r)||"Set"===r?Array.from(r):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?_array_like_to_array(e,t):void 0}function _ts_generator(n,o){var a,s,i,l={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]},e={next:t(0),throw:t(1),return:t(2)};return"function"==typeof Symbol&&(e[Symbol.iterator]=function(){return this}),e;function t(r){return function(e){var t=[r,e];if(a)throw new TypeError("Generator is already executing.");for(;l;)try{if(a=1,s&&(i=2&t[0]?s.return:t[0]?s.throw||((i=s.return)&&i.call(s),0):s.next)&&!(i=i.call(s,t[1])).done)return i;switch(s=0,(t=i?[2&t[0],i.value]:t)[0]){case 0:case 1:i=t;break;case 4:return l.label++,{value:t[1],done:!1};case 5:l.label++,s=t[1],t=[0];continue;case 7:t=l.ops.pop(),l.trys.pop();continue;default:if(!(i=0<(i=l.trys).length&&i[i.length-1])&&(6===t[0]||2===t[0])){l=0;continue}if(3===t[0]&&(!i||t[1]>i[0]&&t[1]<i[3]))l.label=t[1];else if(6===t[0]&&l.label<i[1])l.label=i[1],i=t;else{if(!(i&&l.label<i[2])){i[2]&&l.ops.pop(),l.trys.pop();continue}l.label=i[2],l.ops.push(t)}}t=o.call(n,l)}catch(e){t=[6,e],s=0}finally{a=i=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}}}var mainContainerId="flow-center-container",FlowCenter=function(e){function D(){var e,t=0<arguments.length&&void 0!==arguments[0]&&arguments[0],r=(be(DEFAULT_FILTERS_FOR_TAB_MY_FLOWS),l?"calc(100vh - 64px - 54px)":"calc(100vh - 64px - 64px - ".concat(S?"0px":"62px",")"));return jsxRuntimeExports.jsxs("div",{style:{height:r},className:M.flowsMainContainer,id:"flows-main-container",children:[(null==u||null==(e=u.flowCenterDialog)?void 0:e.open)&&jsxRuntimeExports.jsx(UniversalDialog,{}),!t&&jsxRuntimeExports.jsx(TemplateGallery,{handleOpenFlowNameDialog:A,setScreen:f,goToTemplateList:function(){return f(ENGINE_OWNER_TYPES.TEMPLATES)},handleOpenTemplateDetails:function(){_(!0),F(!0),R(!0)}}),jsxRuntimeExports.jsx("div",{children:me?ye(25):v&&v.length?""===x?jsxRuntimeExports.jsx(FlowList,{createFlowTemplate:G,simpleMode:""!==x,selectedFlowId:x,notebooks:t,onSelectFlow:function(e,t){O(),t?(w(!0),E(!1)):_(!0),g(e),j(!1)},setFirstFlowId:function(e){te(e)},screenName:(null==(e=N([m]))||null==(e=e.pop())?void 0:e.text)||"",zIndex:i,setOpenFlowDetails:function(e){_(e)},setOpenAlwaysUpFlow:function(e,t){O(),w(!1),_(!1),t&&(g(t),j(!1)),e?(E(!0),w(!1)):_(!0)},betaFeatures:p}):jsxRuntimeExports.jsxs("div",{className:M.enginesAndFlowWidgetContainer,children:[jsxRuntimeExports.jsx("div",{className:M.enginesContainer,children:jsxRuntimeExports.jsx(FlowList,{createFlowTemplate:G,simpleMode:""!==x,selectedFlowId:x,notebooks:t,setFirstFlowId:function(e){re&&g(e)},onSelectFlow:function(e){O(),g(e),j(!1)},screenName:(null==(e=N([m]))||null==(t=e.pop())?void 0:t.text)||"",zIndex:i,setOpenFlowDetails:function(e){_(e)},betaFeatures:p,setOpenAlwaysUpFlow:function(e,t){O(),w(!1),_(!1),t&&g(t),E(e)}})}),!h&&jsxRuntimeExports.jsx("div",{className:M.flowWidgetContainer,children:jsxRuntimeExports.jsx("div",{"data-test":"flow-center-flow-widget-container",className:M.flowWidgetContent,children:jsxRuntimeExports.jsx(Se,{})})})]}):jsxRuntimeExports.jsxs("div",{style:{height:r},id:"flows-main-container-no-flows-found",children:[(null==u||null==(e=u.flowCenterDialog)?void 0:e.open)&&jsxRuntimeExports.jsx(UniversalDialog,{}),jsxRuntimeExports.jsx("div",{style:{height:r},id:"flows-main-container",children:jsxRuntimeExports.jsx(NoFlowsFound,{setScreen:f,handleOpenFlowNameDialog:A})})]})})]})}function L(){return k.apply(this,arguments)}var k,t=e.graphQLEndpoint,r=void 0===t?DEFAULT_GRAPHQL_ENDPOINT:t,t=e.defaultCluster,n=void 0===t?DEFAULT_CLUSTER:t,t=e.defaultScreen,t=void 0===t?ENGINE_OWNER_TYPES.MINE:t,o=e.tabs,P=void 0===o?DEFAULT_TABS:o,o=e.filters,o=void 0===o?DEFAULT_FILTERS:o,a=e.options,B=void 0===a?{header:{title:"FLOW CENTER",showSearchBar:!0,showNewFromTemplate:!0,showCreateNewFlow:!0,showAdditionalOptionButton:!0,showCollapseButton:!0,showFullScreenButton:!0},controllerFlowPath:"flow"}:a,a=e.openTabFlowWidget,z=void 0===a?0:a,a=e.collapseFlowCenter,G=e.createFlowTemplate,W=e.isFullScreen,H=void 0!==W&&W,W=e.hidePanel,U=e.marginTop,U=void 0===U?0:U,s=e.zIndex,i=void 0===s?0:s,s=e.automateFullScreen,l=void 0!==s&&s,c=useDispatch(),Y=useSelector(preferredLanguageSelector)||"en",V=useSelector(baseUrlSelector),q=useSelector(rootApiSelector),K=useSelector(controllerNodeRedImageSelector),Q=useSelector(controllerUrlSelector),e=useSelector(automateControllerUrlSelector),s=useSelector(automateUrlSelector),u=useSelector(flowCenterDialogSelector)||null,Q=getBrowserSafeControllerUrl({controllerUrl:Q,automateControllerUrl:e,automateUrl:s}),p=useSelector(betaFeaturesSelector),e=(setApiEndpoint(V),reactExports.useEffect(function(){setApiEndpoint(V)},[V]),reactExports.useEffect(function(){c(setFlowCenterConfig({isFullScreen:H,automateFullScreen:l,zIndex:i,graphQLEndpoint:r,defaultCluster:n}))},[H,l,i,r,n]),_sliced_to_array(reactExports.useState(""),2)),d=e[0],J=e[1],s=_sliced_to_array(reactExports.useState(t),2),m=s[0],f=s[1],e=_sliced_to_array(reactExports.useState(""),2),x=e[0],g=e[1],t=_sliced_to_array(reactExports.useState(!0),2),s=t[0],e=t[1],t=_sliced_to_array(reactExports.useState(!1),2),X=t[0],_=t[1],t=_sliced_to_array(reactExports.useState(!1),2),Z=t[0],E=t[1],t=_sliced_to_array(reactExports.useState(!1),2),h=t[0],w=t[1],t=_sliced_to_array(reactExports.useState(""),2),ee=t[0],te=t[1],t=_sliced_to_array(reactExports.useState(!0),2),re=t[0],j=t[1],t=_sliced_to_array(reactExports.useState(H),2),S=t[0],t=t[1],y=_sliced_to_array(reactExports.useState(!1),2),b=y[0],R=y[1],y=_sliced_to_array(reactExports.useState(!1),2),T=y[0],F=y[1],y=_sliced_to_array(reactExports.useState(""),2),ne=y[0],oe=y[1],y=_sliced_to_array(reactExports.useState(!0),2),ae=y[0],se=y[1],y=_sliced_to_array(reactExports.useState(!1),2),ie=y[0],le=y[1],ce=reactExports.useRef(null),v=useSelector(function(e){return e.flows.flows}),ue=useSelector(function(e){return e.flows.shouldCreateInitialFlows}),pe=useSelector(function(e){return e.flows.isSearching}),de=useSelector(function(e){return e.flows.searched}),me=useSelector(function(e){return e.flows.fetchingFlows}),y=(reactExports.useEffect(function(){J(de)},[de]),reactExports.useEffect(function(){c(isRevisionsExistOnServer())},[c]),reactExports.useEffect(function(){m===ENGINE_OWNER_TYPES.TEMPLATES?c(fetchFlows({name:d,ownerType:ENGINE_OWNER_TYPES.MINE})):c(fetchFlows({name:d,ownerType:m})),null!=v&&v.length||ae||se(!0)},[d,c,m]),reactExports.useEffect(function(){ue||c(fetchFlows({name:d,ownerType:m}))},[ue]),reactExports.useEffect(function(){var e,t;ne&&-1<(e=lodashExports.findIndex(v,function(e){return e.id===ne}))&&((t=JSON.parse(JSON.stringify(v))).splice(e,1),c(setFlows(t)),se(!1))},[c,v,ne]),reactExports.useEffect(function(){var e=document.querySelector("#".concat(mainContainerId));e&&(e.parentElement.style.overflowY="hidden")},[]),reactExports.useEffect(function(){c(searchTemplates())},[]),reactExports.useRef(null)),fe=reactExports.useRef(null),xe=useSelector(function(e){return e.flows.templateToOpen}),ge=useSelector(function(e){return e.flows.tags}),_e=useSelector(function(e){return e.flows.categories}),Ee=useSelector(function(e){return e.flows.templatesAuthors}),N=function(t){return ALL_TABS.filter(function(e){return t.includes(e.key)})},he=function(t){return ALL_FILTERS.filter(function(e){return t.includes(null==e?void 0:e.group)})},C=_sliced_to_array(reactExports.useState(N(_to_consumable_array(P))),2),we=C[0],je=C[1],C=(reactExports.useEffect(function(){var e=_to_consumable_array(P);p&&e.push.apply(e,_to_consumable_array(BETA_TABS)),je(N(e))},[p,P]),_sliced_to_array(reactExports.useState(he(o)),2)),I=C[0],$=C[1],M=(reactExports.useEffect(function(){var e=I.map(function(e){return"tags"===e.group&&(e.options=ge.map(function(e){return{text:e,value:e}})),e});$(e)},[ge]),reactExports.useEffect(function(){var e=I.map(function(e){return"categories"===e.group&&(e.options=_e.map(function(e){return{text:e,value:e}})),e});$(e)},[_e]),reactExports.useEffect(function(){var e=I.map(function(e){return"author"===e.group&&(e.options=Ee.map(function(e){return{text:e,value:e}})),e});$(e)},[Ee]),makeStyles()(function(e){return{fullScreenClass:{width:"100%"},main:{height:"100%",minHeight:"1000px",width:"1280px",display:"flex",flexDirection:"column",backgroundColor:e.palette.background.paper},wideMain:{minHeight:"100%",width:"100%",display:"flex",flexDirection:"column",backgroundColor:e.palette.background.paper,overflowY:"auto",position:"fixed",top:0,left:0},fullHeight:{height:"100%"},fixedHeight:{height:"800px"},scrollY:{height:"100%",overflowY:"scroll"},container:{display:"flex",minHeight:"100%!important",position:"relative"},containerHeight:{height:"100%!important"},navigationContainer:{minWidth:"187px!important",maxWidth:"187px!important",width:"187px!important",transition:e.transitions.create("width",{easing:e.transitions.easing.sharp,duration:e.transitions.duration.enteringScreen}),transform:"translateX(0px)",position:"fixed!important",height:"100%!important",borderRight:"0.5px solid #D5DFE9 !important"},noNavigationContainer:{width:0,transition:e.transitions.create("width",{easing:e.transitions.easing.sharp,duration:e.transitions.duration.enteringScreen}),transform:"translateX(-187px)"},wrapperHeaderBar:{width:"inherit!important",cursor:"default"},contentContainer:{marginLeft:"188px!important",flex:"1 1 auto!important",backgroundColor:e.palette.background.paper,cursor:"default"},enginesAndFlowWidgetContainer:{height:"100%!important"},flowWidgetContainer:{position:"absolute",top:0,right:"1px",height:"100%",minWidth:720,width:720,zIndex:2,transitionTimingFunction:"ease-in-out !important",borderLeft:"0.5px solid #D5DFE9",background:e.palette.background.paper},flowWidgetContent:{height:"100%"},enginesContainer:{width:"100%!important",overflowY:"auto!important"},marginTop:{marginTop:"64px!important"},wrapperContainer:{},wrapperContainerWithHiddenOverflow:{overflowY:"hidden"},flowsMainContainer:{overflowY:"auto"},lineItem:{flexDirection:"row",margin:e.spacing(),borderRadius:e.spacing(.5),height:e.spacing(6)},paddingDiv:{paddingTop:"20px"},flowName:{width:"449px"}}})().classes),Se=function(){var e=B.controllerFlowPath;return jsxRuntimeExports.jsx(App$1,{engineId:x,openFlowRunningInstances:h,openAlwaysUpFlow:Z,locale:Y,openTab:z,config:{apiRoot:q,graphQLEndpoint:r,controllerUrl:Q,defaultCluster:n,controllerNodeRedImage:K,controllerFlowPath:e},tabs:[IFlowWidgetTabs.Overview,IFlowWidgetTabs.Versions,IFlowWidgetTabs.Activity],activityTabs:[IFlowWidgetActivityTabs.Jobs,IFlowWidgetActivityTabs.ScheduledJobs],onExitClicked:function(){g(""),_(!1),w(!1),E(!1)},onDeleteFlow:function(){setTimeout(function(){oe(x),g(""),oe("")},2e3)}})},A=function(e){c(flowCenterDialogAction({open:!0,component:"FlowNameDialog",props:{templateId:e,isCopyFlow:!1,isNotebook:1<arguments.length&&void 0!==arguments[1]&&arguments[1]}}))},ye=function(e){e=Array(e);return jsxRuntimeExports.jsx("div",{children:Array.from(e).map(function(e,t){return jsxRuntimeExports.jsx(Skeleton,{variant:"rectangular",animation:"wave",height:35,sx:{m:"8px"}},"skeleton_"+t)})})},be=function(e){var t=I,e=he(e);lodashExports.isEqual(t,e)||$(e)},O=(k=_async_to_generator(function(){return _ts_generator(this,function(e){switch(e.label){case 0:return ce.current?(le(!0),[4,ce.current.reload()]):[3,2];case 1:e.sent(),le(!1),e.label=2;case 2:return[2]}})}),function(){var e=document.getElementById("flow-center-box-container");e&&(e.scrollTop=0)});return jsxRuntimeExports.jsxs(Container,{fullScreen:S,classes:M,main:fe,marginTop:U,zIndex:i,children:[jsxRuntimeExports.jsx("div",{ref:y,className:M.wrapperHeaderBar,children:jsxRuntimeExports.jsx(Headerbar,{options:B.header,handleOpenFlowNameDialog:A,collapseFlowCenter:a,setFullScreen:t,fullScreen:S,setScreen:f,hidePanel:W,zIndex:i,automateFullScreen:l,enableNotebooks:p,screen:m})}),jsxRuntimeExports.jsx(Box,{id:"flow-center-box-container",className:"".concat(l?M.wrapperContainer:M.marginTop," ").concat(""!==x||b?M.wrapperContainerWithHiddenOverflow:M.wrapperContainer),children:jsxRuntimeExports.jsxs("div",{className:"".concat(M.container," ").concat(T||x?M.containerHeight:""),children:[""!==x&&h&&jsxRuntimeExports.jsx("div",{className:M.flowWidgetContainer,children:jsxRuntimeExports.jsx("div",{"data-test":"flow-center-flow-widget-container",className:M.flowWidgetContent,children:jsxRuntimeExports.jsx(Se,{})})}),jsxRuntimeExports.jsx("div",{className:M.navigationContainer,children:jsxRuntimeExports.jsx(Navigation,{categories:we,filterers:I,screen:m,tags:ge,onSetType:function(e){switch(g(""),_(!1),w(!1),E(!1),F(!1),R(!1),e){case"organization":f(ENGINE_OWNER_TYPES.ORGANIZATION);break;case"shared":f(ENGINE_OWNER_TYPES.SHARED);break;case"templates":f(ENGINE_OWNER_TYPES.TEMPLATES);break;case"mine":c(setTemplateSelected(!1)),f(ENGINE_OWNER_TYPES.MINE);break;case"notebooks":c(setTemplateSelected(!1)),f(ENGINE_OWNER_TYPES.NOTEBOOKS);break;case"containers":c(setTemplateSelected(!1)),f(ENGINE_OWNER_TYPES.CONTAINERS)}},type:"",showNavigation:s,fullScreen:S,automateFullScreen:l})}),jsxRuntimeExports.jsxs("div",{className:M.contentContainer,children:[jsxRuntimeExports.jsx(Toolbar,{header:null==(o=N([m]))?void 0:o.pop(),showNavigation:s,screen:m,setShowNavigation:e,openFlowDetails:X,onReload:m===ENGINE_OWNER_TYPES.CONTAINERS?L:void 0,isReloading:ie,setOpenFlowDetails:function(){O(),c(setOpenTemplate({})),"templates"===m?(F(!T),R(!b)):(F(!1),R(!1)),_(!X),w(!1),E(!1),g(X?"":ee)}}),(()=>{var e,t;if(pe)return jsxRuntimeExports.jsx(SearchResultsPage,{createFlowTemplate:G,openFlowRunningInstances:h,simpleMode:""!==x,selectedFlowId:x,onSelectFlow:function(e,t){O(),(t?w:_)(!0),g(e),j(!1)},setFirstFlowId:function(e){te(e)},screenName:(null==(e=N([m]))||null==(e=e.pop())?void 0:e.text)||"",handleOpenFlowNameDialog:A,openFirstTemplate:b,isDeselectedTemplate:T,onSelectedTemplate:function(){O(),F(!0),_(!0),R(!0)},classes:M,allowSetFirstFlowId:re,setSelectedFlowId:g,setOpenFlowRunningInstances:w,setOpenFlowDetails:_,scrollContainerToTop:O,setAllowSetFirstFlowId:j,openTabFlowWidget:z,setUpdateFlowList:oe,controllerFlowPath:B.controllerFlowPath,openAlwaysUpFlow:Z,setOpenAlwaysUpFlow:E,betaFeatures:p});switch(m!==ENGINE_OWNER_TYPES.TEMPLATES&&xe.id&&c(setOpenTemplate({})),m){case ENGINE_OWNER_TYPES.TEMPLATES:return be(DEFAULT_FILTERS_FOR_TAB_TEMPLATES),t=l?"calc(100vh - 64px - 54px)":"calc(100vh - 64px - 64px - ".concat(S?"0px":"62px",")"),jsxRuntimeExports.jsxs("div",{style:{height:t},className:M.flowsMainContainer,id:"templates-main-container",children:[(null==u||null==(t=u.flowCenterDialog)?void 0:t.open)&&jsxRuntimeExports.jsx(UniversalDialog,{}),jsxRuntimeExports.jsx(TemplateList,{handleOpenFlowNameDialog:A,openFirstTemplate:b,isDeselectedTemplate:T,onSelectedTemplate:function(){O(),F(!0),_(!0),R(!0)}})]});case ENGINE_OWNER_TYPES.MINE:return D();case ENGINE_OWNER_TYPES.NOTEBOOKS:return D(!0);case ENGINE_OWNER_TYPES.CONTAINERS:return be([]),t=l?"calc(100vh - 118px)":"calc(100vh - 128px - ".concat(S?"0px":"62px",")"),jsxRuntimeExports.jsxs("div",{style:{height:t},className:M.flowsMainContainer,id:"templates-main-container",children:[(null==u||null==(t=u.flowCenterDialog)?void 0:t.open)&&jsxRuntimeExports.jsx(UniversalDialog,{}),jsxRuntimeExports.jsx(ContainerList,{ref:ce})]});default:return}})()]})]})})]})},Container=function(e){var t=e.fullScreen,r=e.classes,n=e.main,o=e.marginTop,a=e.zIndex,e=e.children;return t?jsxRuntimeExports.jsx(Portal,{children:jsxRuntimeExports.jsx("div",{role:"presentation","data-test":"flow-center-widget-main-conatiner","data-cy":"flow-center-widget-fullscreen",ref:n,id:mainContainerId,className:r.wideMain,style:{top:o,zIndex:a},children:e})}):jsxRuntimeExports.jsx("div",{role:"presentation","data-test":"flow-center-widget-main-conatiner","data-cy":"flow-center-widget-notfullscreen",ref:n,id:"flow-center-container",className:r.main,style:{top:o,zIndex:a},children:e})};function _define_property(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _object_spread(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{},n=Object.keys(r);(n="function"==typeof Object.getOwnPropertySymbols?n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})):n).forEach(function(e){_define_property(t,e,r[e])})}return t}var App=function(e){return jsxRuntimeExports.jsx(Provider,{store:store,children:jsxRuntimeExports.jsx(DynamicModuleLoader,{modules:[getFlowCenterModule()],children:jsxRuntimeExports.jsx(AIWareIntlProvider,{children:jsxRuntimeExports.jsx(FlowCenter,_object_spread({},e))})})})};export{App,useCommonStyles};
|