aiware-js 2.22.0 → 2.25.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.esm.css +390 -90
- package/index.esm.js +1 -1
- package/js-core.esm.js +10 -10
- package/js-core.esm12.js +1 -1
- package/js-core.esm13.js +1 -1
- package/js-core.esm14.js +1 -1
- package/js-core.esm15.js +1 -1
- package/js-core.esm16.js +1 -1
- package/js-core.esm17.js +1 -1
- package/js-core.esm18.js +1 -230
- package/js-core.esm19.js +1 -78
- package/js-core.esm20.js +230 -1
- package/js-core.esm21.js +78 -1
- package/js-core.esm22.js +1 -1
- package/js-core.esm23.js +1 -1
- package/js-core.esm24.js +1 -1
- package/js-core.esm25.js +1 -1
- package/js-core.esm26.js +1 -1
- package/js-core.esm27.js +1 -1
- package/js-core.esm28.js +1 -1
- package/js-core.esm29.js +1 -1
- package/js-core.esm30.js +1 -14
- package/js-core.esm31.js +1 -12
- package/js-core.esm32.js +7 -47
- package/js-core.esm33.js +12 -1
- package/js-core.esm34.js +54 -1
- package/js-core.esm35.js +1 -108
- package/js-core.esm36.js +1 -1
- package/js-core.esm37.js +92 -198
- package/js-core.esm38.js +1 -37
- package/js-core.esm39.js +214 -1
- package/js-core.esm4.js +1 -1
- package/js-core.esm40.js +1 -1
- package/js-core.esm41.js +1 -1
- package/js-core.esm42.js +1 -1
- package/js-core.esm43.js +37 -1
- package/js-core.esm44.js +1 -31
- package/js-core.esm45.js +1 -32
- package/js-core.esm46.js +1 -53
- package/js-core.esm47.js +1 -1
- package/js-core.esm48.js +26 -115
- package/js-core.esm49.js +28 -83
- package/js-core.esm5.js +2 -2
- package/js-core.esm50.js +85 -1
- package/js-core.esm51.js +1 -0
- package/js-core.esm52.js +132 -0
- package/js-core.esm53.js +87 -0
- package/js-core.esm54.js +1 -0
- package/js-core.esm55.js +15 -0
- package/js-core.esm56.js +10 -0
- package/js-core.esm7.js +4 -4
- package/js-core.umd.css +300 -0
- package/js-core.umd.js +210 -143
- package/locales/en.json +1 -1
- package/locales/es.json +1 -1
- package/locales/fr.json +1 -1
- package/package.json +4 -2
package/js-core.esm5.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{z as createSvgIcon,C as interopRequireDefault,j as jsxRuntime,r as react,_ as _extends,f as clsx,D as createAction,E as createReducer,m as makeStyles,H as createSlice,F as FormattedMessage,I as ENGINE_OWNER_TYPES,J as ENGINE_FILTER_TYPES,s as store,P as Provider,K as lib,A as AIWareIntlProvider,i as useDispatch,k as useSelector,M as preferredLanguageSelector,N as baseUrlSelector,O as rootApiSelector,Q as sessionTokenSelector,R as graphEndpointSelector,U as controllerNodeRedImageSelector,V as controllerUrlSelector,W as automateControllerUrlSelector,X as automateUrlSelector,p as lodash,B as Box,Y as Portal,Z as List,$ as ListItem,a0 as ListItemIcon,a1 as ListItemText,T as Typography,a2 as all,a3 as img$k,a4 as img$l,a5 as img$n,a6 as img$o,a7 as Divider,a8 as Tooltip,a9 as IconButton,aa as img$e,ab as img$C,ac as getNodeRedVersionEdgeApi,ad as createEnginebuild,ae as Skeleton,af as takeLatest$1,ag as fetchAllTags,ah as put,ai as select,aj as fetchFlows$1,ak as call,al as fetchTemplateGallery,am as isRevisionsExistOnServerRequest,v as FormControl$1,an as FormLabel,ao as default_1$6,ap as FormGroup,aq as FormControlLabel,ar as Checkbox,as as fetchTemplateGalleryFallback,at as Button,G as Grid,au as img$i,av as flowStyles,aw as NoResults,ax as fetchVeritoneGraphQLApi,ay as img$8,az as setApiEndpoint,aA as getTemplateById,aB as getTemplateByIdFallback,aC as TableContainer,aD as Table,aE as TableHead,aF as TableRow,aG as TableCell,aH as TableSortLabel,aI as TableBody,aJ as img$d,aK as Popper,aL as ClickAwayListener,aM as Fade,c as Paper,aN as img$p,aO as img$m,aP as img$M,aQ as img$y,aR as Dialog,aS as DialogTitle,aT as DialogContent,aU as DialogActions,aV as Select,aW as MenuItem,aX as Snackbar,aY as default_1$9,aZ as img$f,a_ as img$h,a$ as img$Q,b0 as Tabs,b1 as Tab,b2 as deleteEngine,b3 as img$g,b4 as AIWareFormatMessage,b5 as FormattedDate}from"./js-core.esm.js";import{d as default_1$8}from"./js-core.esm6.js";import{M as MuiToolbar,A as App$1,I as IFlowWidgetTabs,a as IFlowWidgetActivityTabs,S as StatusPill,T as TablePagination,C as Close}from"./js-core.esm7.js";import{d as default_1$7}from"./js-core.esm8.js";import{A as AppBar}from"./js-core.esm3.js";import{C as Card}from"./js-core.esm9.js";import{C as CardContent}from"./js-core.esm10.js";import{C as CardActions}from"./js-core.esm11.js";import{_ as _objectWithoutProperties}from"./js-core.esm15.js";import{w as withStyles,c as capitalize}from"./js-core.esm16.js";import{S as Search}from"./js-core.esm12.js";import"./js-core.esm13.js";import"./js-core.esm14.js";import"./js-core.esm17.js";var WorkOutlineOutlined={},_interopRequireDefault$5=interopRequireDefault.exports,default_1$5=(Object.defineProperty(WorkOutlineOutlined,"__esModule",{value:!0}),WorkOutlineOutlined.default=void 0),_createSvgIcon$5=_interopRequireDefault$5(createSvgIcon),_jsxRuntime$5=jsxRuntime.exports,_default$5=(0,_createSvgIcon$5.default)((0,_jsxRuntime$5.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$5=WorkOutlineOutlined.default=_default$5,PeopleAltOutlined={},_interopRequireDefault$4=interopRequireDefault.exports,default_1$4=(Object.defineProperty(PeopleAltOutlined,"__esModule",{value:!0}),PeopleAltOutlined.default=void 0),_createSvgIcon$4=_interopRequireDefault$4(createSvgIcon),_jsxRuntime$4=jsxRuntime.exports,_default$4=(0,_createSvgIcon$4.default)((0,_jsxRuntime$4.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$4=PeopleAltOutlined.default=_default$4,PersonOutlineOutlined={},_interopRequireDefault$3=interopRequireDefault.exports,default_1$3=(Object.defineProperty(PersonOutlineOutlined,"__esModule",{value:!0}),PersonOutlineOutlined.default=void 0),_createSvgIcon$3=_interopRequireDefault$3(createSvgIcon),_jsxRuntime$3=jsxRuntime.exports,_default$3=(0,_createSvgIcon$3.default)((0,_jsxRuntime$3.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$3=PersonOutlineOutlined.default=_default$3,HistoryOutlined={},_interopRequireDefault$2=interopRequireDefault.exports,default_1$2=(Object.defineProperty(HistoryOutlined,"__esModule",{value:!0}),HistoryOutlined.default=void 0),_createSvgIcon$2=_interopRequireDefault$2(createSvgIcon),_jsxRuntime$2=jsxRuntime.exports,_default$2=(0,_createSvgIcon$2.default)((0,_jsxRuntime$2.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$2=HistoryOutlined.default=_default$2,ArrowDropDown={},_interopRequireDefault$1=interopRequireDefault.exports,default_1$1=(Object.defineProperty(ArrowDropDown,"__esModule",{value:!0}),ArrowDropDown.default=void 0),_createSvgIcon$1=_interopRequireDefault$1(createSvgIcon),_jsxRuntime$1=jsxRuntime.exports,_default$1=(0,_createSvgIcon$1.default)((0,_jsxRuntime$1.jsx)("path",{d:"m7 10 5 5 5-5z"}),"ArrowDropDown"),default_1$1=ArrowDropDown.default=_default$1,FilterListOutlined={},_interopRequireDefault=interopRequireDefault.exports,default_1=(Object.defineProperty(FilterListOutlined,"__esModule",{value:!0}),FilterListOutlined.default=void 0),_createSvgIcon=_interopRequireDefault(createSvgIcon),_jsxRuntime=jsxRuntime.exports,_default=(0,_createSvgIcon.default)((0,_jsxRuntime.jsx)("path",{d:"M10 18h4v-2h-4v2zM3 6v2h18V6H3zm3 7h12v-2H6v2z"}),"FilterListOutlined"),default_1=FilterListOutlined.default=_default,SIZE=44;function getRelativeValue(e,t,n){return(Math.min(Math.max(t,e),n)-t)/(n-t)}function easeOut(e){return e=getRelativeValue(e,0,1),e=--e*e*e+1}function easeIn(e){return e*e}var styles=function(e){return{root:{display:"inline-block"},static:{transition:e.transitions.create("transform")},indeterminate:{animation:"$circular-rotate 1.4s linear infinite"},colorPrimary:{color:e.palette.primary.main},colorSecondary:{color:e.palette.secondary.main},svg:{display:"block"},circle:{stroke:"currentColor"},circleStatic:{transition:e.transitions.create("stroke-dashoffset")},circleIndeterminate:{animation:"$circular-dash 1.4s ease-in-out infinite",strokeDasharray:"80px, 200px",strokeDashoffset:"0px"},"@keyframes circular-rotate":{"0%":{transformOrigin:"50% 50%"},"100%":{transform:"rotate(360deg)"}},"@keyframes circular-dash":{"0%":{strokeDasharray:"1px, 200px",strokeDashoffset:"0px"},"50%":{strokeDasharray:"100px, 200px",strokeDashoffset:"-15px"},"100%":{strokeDasharray:"100px, 200px",strokeDashoffset:"-125px"}},circleDisableShrink:{animation:"none"}}},CircularProgress=react.exports.forwardRef(function(e,t){var n,r=e.classes,i=e.className,s=e.color,s=void 0===s?"primary":s,o=e.disableShrink,o=void 0!==o&&o,a=e.size,a=void 0===a?40:a,l=e.style,c=e.thickness,c=void 0===c?3.6:c,u=e.value,u=void 0===u?0:u,d=e.variant,d=void 0===d?"indeterminate":d,e=_objectWithoutProperties(e,["classes","className","color","disableShrink","size","style","thickness","value","variant"]),m={},p={},f={};return"determinate"!==d&&"static"!==d||(n=2*Math.PI*((SIZE-c)/2),m.strokeDasharray=n.toFixed(3),f["aria-valuenow"]=Math.round(u),"static"===d?(m.strokeDashoffset="".concat(((100-u)/100*n).toFixed(3),"px"),p.transform="rotate(-90deg)"):(m.strokeDashoffset="".concat((easeIn((100-u)/100)*n).toFixed(3),"px"),p.transform="rotate(".concat((270*easeOut(u/70)).toFixed(3),"deg)"))),react.exports.createElement("div",_extends({className:clsx(r.root,i,"inherit"!==s&&r["color".concat(capitalize(s))],{indeterminate:r.indeterminate,static:r.static}[d]),style:_extends({width:a,height:a},p,l),ref:t,role:"progressbar"},f,e),react.exports.createElement("svg",{className:r.svg,viewBox:"".concat(SIZE/2," ").concat(SIZE/2," ").concat(SIZE," ").concat(SIZE)},react.exports.createElement("circle",{className:clsx(r.circle,o&&r.circleDisableShrink,{indeterminate:r.circleIndeterminate,static:r.circleStatic}[d]),style:m,cx:SIZE,cy:SIZE,r:(SIZE-c)/2,fill:"none",strokeWidth:c})))}),CircularProgress$1=withStyles(styles,{name:"MuiCircularProgress",flip:!1})(CircularProgress);function __awaiter(e,o,a,l){return new(a=a||Promise)(function(n,t){function r(e){try{s(l.next(e))}catch(e){t(e)}}function i(e){try{s(l.throw(e))}catch(e){t(e)}}function s(e){var t;e.done?n(e.value):((t=e.value)instanceof a?t:new a(function(e){e(t)})).then(r,i)}s((l=l.apply(e,o||[])).next())})}!function(){var e={};try{if(process)return process.env=Object.assign({},process.env),Object.assign(process.env,e)}catch(e){}globalThis.process={env:e}}();const FETCH_FLOWS="flow-center/FETCH_FLOWS",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",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)),setFlows=createAction(SET_FLOWS),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:[],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},{[FETCH_FLOWS]:e=>Object.assign({},e),[SET_FETCHING_FLOWS]:e=>Object.assign(Object.assign({},e),{fetchingFlows:!0}),[SET_OPEN_TEMPLATE]:(e,{payload:t})=>Object.assign(Object.assign({},e),{templateToOpen:t}),[SET_TEMPLATE_SELECTED]:(e,{payload:t})=>Object.assign(Object.assign({},e),{isTemplateSelected:t}),[SET_TAGS]:(e,{payload:t})=>Object.assign(Object.assign({},e),{tags:t}),[SET_TAGS_TO_STORE]:(e,{payload:t})=>Object.assign(Object.assign({},e),{tags:t}),[SET_CATEGORIES]:(e,{payload:t})=>Object.assign(Object.assign({},e),{categories:t}),[SET_TEMPLATES_AUTHORS]:(e,{payload:t})=>Object.assign(Object.assign({},e),{templatesAuthors:t}),[SET_SELECTED_FILTERS]:(e,{payload:t})=>Object.assign(Object.assign({},e),{selectedFilters:t}),[SET_TEMPLATES]:(e,{payload:t})=>Object.assign(Object.assign({},e),{templates:t}),[SET_FILTERED_TEMPLATES_ACTION]:(e,{payload:t})=>Object.assign(Object.assign({},e),{filteredTemplates:t}),[SET_TAG]:(e,{payload:t})=>Object.assign(Object.assign({},e),{tag:t}),[SET_FLOWS]:(e,{payload:t})=>Object.assign(Object.assign({},e),{flows:t}),[TOGGLE_IS_SEARCHING]:(e,{payload:t})=>Object.assign(Object.assign({},e),{isSearching:t}),[TOGGLE_IS_SEARCHING_LOADING]:(e,{payload:t})=>Object.assign(Object.assign({},e),{isSearchingLoading:t}),[SET_SEARCHED]:(e,{payload:t})=>Object.assign(Object.assign({},e),{searched:t}),[SET_SEARCHED_TEMPLATES]:(e,{payload:t})=>Object.assign(Object.assign({},e),{searchedTemplates:t}),[SET_CONFIG]:(e,{payload:t})=>Object.assign(Object.assign({},e),{config:t}),[TOGGLE_STATE_CREATE_NEW_FLOW]:(e,{payload:t})=>Object.assign(Object.assign({},e),{isLoadingCreateNewFlow:t}),[SET_IS_REVISIONS_EXIST_ON_SERVER]:(e,{payload:t})=>Object.assign(Object.assign({},e),{isRevisionsExistOnServer:t}),[SET_SHOULD_CREATE_INITIAL_FLOWS]:(e,{payload:t})=>Object.assign(Object.assign({},e),{shouldCreateInitialFlows:t})})),namespace$2="flows";function*fetchTagsSaga(){yield takeLatest$1(FETCH_TAGS,function*(e){e=yield fetchAllTags(e.payload.ids);void 0!==e&&(yield put(setTags(e)))})}function*fetchFlowsSaga(){yield takeLatest$1(FETCH_FLOWS,function*(e){var t=yield select(sessionTokenSelector);let n;switch(e.payload.ownerType){case ENGINE_OWNER_TYPES.ORGANIZATION:n=yield fetchFlows$1({name:e.payload.name,owned:!1,offset:0,limit:300,authToken:t});break;case ENGINE_OWNER_TYPES.MINE:n=yield fetchFlows$1({name:e.payload.name,owned:!0,offset:0,limit:300,authToken:t});break;case ENGINE_OWNER_TYPES.SHARED:n=yield fetchFlows$1({name:e.payload.name,owned:!1,offset:0,limit:300,authToken:t})}void 0!==n&&n&&(0!==n.data.engines.records.length||e.payload.name||(yield put(setShouldCreateInitialFlows(!0))),yield put(setFlows(n.data.engines.records))),yield put(toggleIsSearchingLoading(!1))})}function*searchTemplatesSaga(){yield takeLatest$1(SEARCH_TEMPLATES,function*(){var e=yield select(sessionTokenSelector),e=yield call(fetchTemplateGallery,e);e&&e.data&&e.data.flowTemplates&&e.data.flowTemplates.records&&0<e.data.flowTemplates.records.length&&(yield put(setTemplatesAction(e.data.flowTemplates.records)))})}function*isRevisionsExistOnServerSaga(){yield takeLatest$1(IS_REVISIONS_EXIST_ON_SERVER,function*(){let e;var t=yield select(sessionTokenSelector);try{e=yield call(isRevisionsExistOnServerRequest,t)}catch(e){yield put({type:SET_IS_REVISIONS_EXIST_ON_SERVER,payload:!1})}lodash.exports.get(e,"data.flowRevisions","")&&(yield put({type:SET_IS_REVISIONS_EXIST_ON_SERVER,payload:!0}))})}function*flowsSaga(){yield all([fetchTagsSaga(),fetchFlowsSaga(),searchTemplatesSaga(),isRevisionsExistOnServerSaga()])}const useStyles$d=makeStyles()(()=>({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({categories:e,filterers:t,screen:n,onSetType:r,showNavigation:i,fullScreen:s,automateFullScreen:o}){const a=useStyles$d()["classes"],l=useDispatch(),[c,u]=react.exports.useState([]),d=useSelector(e=>e.flows.selectedFilters),m=useSelector(e=>e.flows.isSearching);const p=t=>{const n=c.indexOf(t);-1===n?u(e=>(e.push(t),[...e])):u(e=>(e.splice(n,1),[...e]))},f=(e,t)=>{const n=Object.assign({},d);var r=d[e];n[e]=[],r&&(n[e]=[...r]),n[e].includes(t)?n[e].splice(n[e].indexOf(t),1):n[e].push(t),l(setSelectedFilters(n))};return jsxRuntime.exports.jsx(Box,Object.assign({className:a.boxBackground},{children:jsxRuntime.exports.jsxs(Box,Object.assign({className:a.marginLeft},{children:[jsxRuntime.exports.jsx(List,Object.assign({className:o?a.fullScreenMode:""},{children:e.map(({key:t,text:e})=>jsxRuntime.exports.jsxs(ListItem,Object.assign({id:"flow-center-navigation-listItem-conatiner","data-test":"flow-center-navigation-tabs-"+t,button:!0,disableRipple:!0,selected:n.toLowerCase()===t&&!m,onClick:()=>{var e=t;l(toggleIsSearching(!1)),l(toggleIsSearchingLoading(!1)),l(setSearched("")),l(setSearchedTemplates(null)),l(fetchFlows({name:"",ownerType:ENGINE_OWNER_TYPES.MINE})),r(e)},className:a.paddingLeft,classes:{selected:a.selectedPaddingLeft}},{children:[jsxRuntime.exports.jsx(ListItemIcon,Object.assign({className:a.icon},{children:function(e){switch(e){case"mine":return n.toLowerCase()!==e||m?jsxRuntime.exports.jsx("img",{width:"24px",height:"24px",src:img$o,alt:"myFlowsBlue"}):jsxRuntime.exports.jsx("img",{width:"24px",height:"24px",src:img$n,alt:"myFlows"});case"templates":return n.toLowerCase()!==e||m?jsxRuntime.exports.jsx("img",{width:"24px",height:"24px",src:img$l,alt:"templatesBlue"}):jsxRuntime.exports.jsx("img",{width:"24px",height:"24px",src:img$k,alt:"templates"});case"WorkOutlineOutlinedIcon":return jsxRuntime.exports.jsx(default_1$5,{});case"PeopleAltOutlinedIcon":return jsxRuntime.exports.jsx(default_1$4,{});case"PersonOutlineOutlinedIcon":return jsxRuntime.exports.jsx(default_1$3,{});default:return jsxRuntime.exports.jsx(default_1$2,{})}}(t)})),jsxRuntime.exports.jsx(ListItemText,{"data-test":"flow-center-navigation-listItemText",className:"flow-center-navigation-listItemText",primary:e,classes:{primary:a.listItemText}})]}),t))})),i&&(e=o?"calc(100vh - 64px - 16px - 86px - 8px - 54px":`calc(100vh - 64px - 16px - 86px - 8px - ${s?"0px":"54px"})`,jsxRuntime.exports.jsxs(jsxRuntime.exports.Fragment,{children:[jsxRuntime.exports.jsx(Divider,{}),jsxRuntime.exports.jsx("div",Object.assign({className:a.scroll,style:{height:e}},{children:t.map(({text:e,group:n,options:t},r)=>jsxRuntime.exports.jsx("div",{children:jsxRuntime.exports.jsxs(FormControl$1,Object.assign({component:"fieldset",className:a.formControl,"data-test":`flow-center-${n}-container`,id:`flow-center-${n}-container`},{children:[jsxRuntime.exports.jsxs("div",Object.assign({className:a.filterTitleContainer},{children:[jsxRuntime.exports.jsx(FormLabel,Object.assign({className:a.category,component:"legend"},{children:e})),jsxRuntime.exports.jsx("div",Object.assign({className:a.expandIconClass,onClick:()=>p(r)},{children:c.includes(r)?jsxRuntime.exports.jsx(default_1$1,{fontSize:"small",style:{fill:"#555F7C",width:"18px!important",height:"18px!important"}}):jsxRuntime.exports.jsx(default_1$6,{fontSize:"small",style:{fill:"#555F7C",width:"18px!important",height:"18px!important"}})}))]})),jsxRuntime.exports.jsx("div",{children:jsxRuntime.exports.jsx(FormGroup,Object.assign({className:a.group},{children:t.map(({text:e,value:t})=>{if(!c.includes(r))return jsxRuntime.exports.jsx(FormControlLabel,{control:jsxRuntime.exports.jsx(Checkbox,{checked:d[n]&&d[n].includes(t),name:t,color:"primary",onClick:()=>f(n,t)}),label:jsxRuntime.exports.jsx(Typography,Object.assign({"data-test":"flow-center-flows-table-optionText",className:a.listItemTextFilters},{children:e})),"data-test":"flow-center-filter-item",id:"flow-center-filter-item"},n+"-"+t)})}))})]}),n+r)},n+r))}))]}))]}))}))}const MIN_NUM_ITEM_ON_ROW=3,useStyles$c=makeStyles()(e=>({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",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:{height:"30px!important",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:"60%!important",overflow:"hidden!important",textOverflow:"ellipsis!important"},bottomButton:{marginTop:"27px",padding:"0px!important",display:"flex"},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=({goToTemplateList:e,createNewFlow:n,setScreen:t,handleOpenTemplateDetails:r})=>{const i=useDispatch(),s=useStyles$c()["classes"],[o,a]=react.exports.useState([]),[l,c]=react.exports.useState(0),u=useSelector(sessionTokenSelector),d=(e,t)=>{e.data[t].records&&a(e.data[t].records),c(Math.min(MIN_NUM_ITEM_ON_ROW,e.data[t].records.length))},m=(react.exports.useEffect(()=>{o.length||fetchTemplateGallery(u).then(e=>d(e,"flowTemplates")).catch(()=>{fetchTemplateGalleryFallback(u).then(e=>d(e,"flows")).catch(()=>console.log("error fetching flow templates from fallback"))})},[d]),e=>{t(ENGINE_OWNER_TYPES.TEMPLATES),i(setOpenTemplate({id:e.id,title:e.title})),r(!0)});return jsxRuntime.exports.jsxs("div",Object.assign({className:s.container},{children:[jsxRuntime.exports.jsxs(Box,Object.assign({mt:2,mb:2,className:s.box},{children:[jsxRuntime.exports.jsx(Typography,Object.assign({"data-test":"flow-center-flows-table-populatTemplates",className:s.text,style:{flexGrow:1}},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-flow-center.1v6wsw",defaultMessage:"Popular Templates",description:"Templates screen"})})),jsxRuntime.exports.jsx(Button,Object.assign({"data-test":"flow-center-template-gallery-viewAllTemplates",size:"small",className:s.viewAllButton,onClick:e},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-flow-center.viewall",defaultMessage:"View All",description:"View All Templates Button"})}))]})),jsxRuntime.exports.jsx(Grid,Object.assign({"data-test":"flow-center-templates-on-flows-page",container:!0,id:"flow-center-templates"},{children:o.slice(0,l).map((e,t)=>jsxRuntime.exports.jsx(Grid,Object.assign({"data-test":"flow-center-templatesGallery",item:!0,xs:4},{children:jsxRuntime.exports.jsx(Card,Object.assign({className:s.cardRoot,id:"flow-center-template-card"},{children:jsxRuntime.exports.jsxs("div",Object.assign({className:s.cardContainer},{children:[jsxRuntime.exports.jsxs(CardContent,Object.assign({className:s.cardContent},{children:[jsxRuntime.exports.jsx(Typography,Object.assign({"data-test":"flow-center-flows-templateGallery-title",className:s.title,gutterBottom:!0,onClick:()=>m(e)},{children:null==e?void 0:e.title})),jsxRuntime.exports.jsx(Typography,Object.assign({"data-test":"flow-center-flows-templateGallery-subtitle",className:s.subtitle,"aria-multiline":!0,variant:"body2",component:"p"},{children:e.subtitle})),jsxRuntime.exports.jsxs("div",Object.assign({className:s.veritoneCertifiedContainer},{children:[jsxRuntime.exports.jsx("img",{src:img$i,alt:"veritoneCertifiedIcon"}),jsxRuntime.exports.jsx(Typography,Object.assign({"data-test":"flow-center-flows-templateGallery-veritoneCertified",className:s.veritoneCertified,component:"p"},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-flow-center.veritonecertified",defaultMessage:"Veritone Certified",description:"Veritone Certified Template Text"})}))]}))]})),jsxRuntime.exports.jsxs(CardActions,Object.assign({className:s.bottomButton},{children:[jsxRuntime.exports.jsx(Button,Object.assign({"data-test":"flow-center-template-gallery-createFlowFromTemplate-"+t,onClick:()=>n?n(e):"",id:"flow-center-create-flow-btn-"+t,size:"small",variant:"outlined",color:"primary",className:s.createFlowButton},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-flow-center.createflow",defaultMessage:"Create Flow",description:"Complete Flow Button Text"})})),jsxRuntime.exports.jsx(Button,Object.assign({"data-test":"flow-center-template-gallery-viewDetailsForTemplate-"+t,onClick:()=>m(e),size:"small",color:"primary",className:s.viewDetailsButton},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-flow-center.viewdetails",defaultMessage:"View Details",description:"View Details Button Text"})}))]}))]}))}))}),e.title+t))}))]}))};var luxon={};function _defineProperties(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function _createClass(e,t,n){return t&&_defineProperties(e.prototype,t),n&&_defineProperties(e,n),e}function _inheritsLoose(e,t){e.prototype=Object.create(t.prototype),(e.prototype.constructor=e).__proto__=t}function _getPrototypeOf(e){return(_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function _setPrototypeOf(e,t){return(_setPrototypeOf=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function _isNativeReflectConstruct(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(e){return!1}}function _construct(e,t,n){return(_construct=_isNativeReflectConstruct()?Reflect.construct:function(e,t,n){var r=[null];r.push.apply(r,t);t=new(Function.bind.apply(e,r));return n&&_setPrototypeOf(t,n.prototype),t}).apply(null,arguments)}function _isNativeFunction(e){return-1!==Function.toString.call(e).indexOf("[native code]")}function _wrapNativeSuper(e){var n="function"==typeof Map?new Map:void 0;return(_wrapNativeSuper=function(e){if(null===e||!_isNativeFunction(e))return e;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==n){if(n.has(e))return n.get(e);n.set(e,t)}function t(){return _construct(e,arguments,_getPrototypeOf(this).constructor)}return t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),_setPrototypeOf(t,e)})(e)}function _objectWithoutPropertiesLoose(e,t){if(null==e)return{};for(var n,r={},i=Object.keys(e),s=0;s<i.length;s++)n=i[s],0<=t.indexOf(n)||(r[n]=e[n]);return r}function _unsupportedIterableToArray(e,t){if(e){if("string"==typeof e)return _arrayLikeToArray(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Map"===(n="Object"===n&&e.constructor?e.constructor.name:n)||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?_arrayLikeToArray(e,t):void 0}}function _arrayLikeToArray(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function _createForOfIteratorHelperLoose(e){var t=0;if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator])return(t=e[Symbol.iterator]()).next.bind(t);if(Array.isArray(e)||(e=_unsupportedIterableToArray(e)))return function(){return t>=e.length?{done:!0}:{done:!1,value:e[t++]}};throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}Object.defineProperty(luxon,"__esModule",{value:!0});var LuxonError=function(e){function t(){return e.apply(this,arguments)||this}return _inheritsLoose(t,e),t}(_wrapNativeSuper(Error)),InvalidDateTimeError=function(t){function e(e){return t.call(this,"Invalid DateTime: "+e.toMessage())||this}return _inheritsLoose(e,t),e}(LuxonError),InvalidIntervalError=function(t){function e(e){return t.call(this,"Invalid Interval: "+e.toMessage())||this}return _inheritsLoose(e,t),e}(LuxonError),InvalidDurationError=function(t){function e(e){return t.call(this,"Invalid Duration: "+e.toMessage())||this}return _inheritsLoose(e,t),e}(LuxonError),ConflictingSpecificationError=function(e){function t(){return e.apply(this,arguments)||this}return _inheritsLoose(t,e),t}(LuxonError),InvalidUnitError=function(t){function e(e){return t.call(this,"Invalid unit "+e)||this}return _inheritsLoose(e,t),e}(LuxonError),InvalidArgumentError=function(e){function t(){return e.apply(this,arguments)||this}return _inheritsLoose(t,e),t}(LuxonError),ZoneIsAbstractError=function(e){function t(){return e.call(this,"Zone is an abstract class")||this}return _inheritsLoose(t,e),t}(LuxonError),n="numeric",s="short",l="long",DATE_SHORT={year:n,month:n,day:n},DATE_MED={year:n,month:s,day:n},DATE_MED_WITH_WEEKDAY={year:n,month:s,day:n,weekday:s},DATE_FULL={year:n,month:l,day:n},DATE_HUGE={year:n,month:l,day:n,weekday:l},TIME_SIMPLE={hour:n,minute:n},TIME_WITH_SECONDS={hour:n,minute:n,second:n},TIME_WITH_SHORT_OFFSET={hour:n,minute:n,second:n,timeZoneName:s},TIME_WITH_LONG_OFFSET={hour:n,minute:n,second:n,timeZoneName:l},TIME_24_SIMPLE={hour:n,minute:n,hour12:!1},TIME_24_WITH_SECONDS={hour:n,minute:n,second:n,hour12:!1},TIME_24_WITH_SHORT_OFFSET={hour:n,minute:n,second:n,hour12:!1,timeZoneName:s},TIME_24_WITH_LONG_OFFSET={hour:n,minute:n,second:n,hour12:!1,timeZoneName:l},DATETIME_SHORT={year:n,month:n,day:n,hour:n,minute:n},DATETIME_SHORT_WITH_SECONDS={year:n,month:n,day:n,hour:n,minute:n,second:n},DATETIME_MED={year:n,month:s,day:n,hour:n,minute:n},DATETIME_MED_WITH_SECONDS={year:n,month:s,day:n,hour:n,minute:n,second:n},DATETIME_MED_WITH_WEEKDAY={year:n,month:s,day:n,weekday:s,hour:n,minute:n},DATETIME_FULL={year:n,month:l,day:n,hour:n,minute:n,timeZoneName:s},DATETIME_FULL_WITH_SECONDS={year:n,month:l,day:n,hour:n,minute:n,second:n,timeZoneName:s},DATETIME_HUGE={year:n,month:l,day:n,weekday:l,hour:n,minute:n,timeZoneName:l},DATETIME_HUGE_WITH_SECONDS={year:n,month:l,day:n,weekday:l,hour:n,minute:n,second:n,timeZoneName:l};function isUndefined(e){return void 0===e}function isNumber(e){return"number"==typeof e}function isInteger(e){return"number"==typeof e&&e%1==0}function isString(e){return"string"==typeof e}function isDate(e){return"[object Date]"===Object.prototype.toString.call(e)}function hasIntl(){try{return"undefined"!=typeof Intl&&Intl.DateTimeFormat}catch(e){return!1}}function hasFormatToParts(){return!isUndefined(Intl.DateTimeFormat.prototype.formatToParts)}function hasRelative(){try{return"undefined"!=typeof Intl&&!!Intl.RelativeTimeFormat}catch(e){return!1}}function maybeArray(e){return Array.isArray(e)?e:[e]}function bestBy(e,n,r){if(0!==e.length)return e.reduce(function(e,t){t=[n(t),t];return e&&r(e[0],t[0])===e[0]?e:t},null)[1]}function pick(n,e){return e.reduce(function(e,t){return e[t]=n[t],e},{})}function hasOwnProperty(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function integerBetween(e,t,n){return isInteger(e)&&t<=e&&e<=n}function floorMod(e,t){return e-t*Math.floor(e/t)}function padStart(e,t){void 0===t&&(t=2);var n=e<0?"-":"",e=n?-1*e:e,t=e.toString().length<t?("0".repeat(t)+e).slice(-t):e.toString();return n+t}function parseInteger(e){if(!isUndefined(e)&&null!==e&&""!==e)return parseInt(e,10)}function parseMillis(e){if(!isUndefined(e)&&null!==e&&""!==e)return e=1e3*parseFloat("0."+e),Math.floor(e)}function roundTo(e,t,n){void 0===n&&(n=!1);t=Math.pow(10,t);return(n?Math.trunc:Math.round)(e*t)/t}function isLeapYear(e){return e%4==0&&(e%100!=0||e%400==0)}function daysInYear(e){return isLeapYear(e)?366:365}function daysInMonth(e,t){var n=floorMod(t-1,12)+1;return 2===n?isLeapYear(e+(t-n)/12)?29:28:[31,null,31,30,31,30,31,31,30,31,30,31][n-1]}function objToLocalTS(e){var t=Date.UTC(e.year,e.month-1,e.day,e.hour,e.minute,e.second,e.millisecond);return e.year<100&&0<=e.year&&(t=new Date(t)).setUTCFullYear(t.getUTCFullYear()-1900),+t}function weeksInWeekYear(e){var t=(e+Math.floor(e/4)-Math.floor(e/100)+Math.floor(e/400))%7,e=e-1,e=(e+Math.floor(e/4)-Math.floor(e/100)+Math.floor(e/400))%7;return 4==t||3==e?53:52}function untruncateYear(e){return 99<e?e:60<e?1900+e:2e3+e}function parseZoneInfo(e,t,n,r){void 0===r&&(r=null);var i,e=new Date(e),s={hour12:!1,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"},r=(r&&(s.timeZone=r),Object.assign({timeZoneName:t},s)),t=hasIntl();return t&&hasFormatToParts()?(i=new Intl.DateTimeFormat(n,r).formatToParts(e).find(function(e){return"timezonename"===e.type.toLowerCase()}))?i.value:null:t?(i=new Intl.DateTimeFormat(n,s).format(e),new Intl.DateTimeFormat(n,r).format(e).substring(i.length).replace(/^[, \u200e]+/,"")):null}function signedOffset(e,t){e=parseInt(e,10),Number.isNaN(e)&&(e=0),t=parseInt(t,10)||0;return 60*e+(e<0||Object.is(e,-0)?-t:t)}function asNumber(e){var t=Number(e);if("boolean"==typeof e||""===e||Number.isNaN(t))throw new InvalidArgumentError("Invalid unit value "+e);return t}function normalizeObject(e,t,n){var r,i,s={};for(r in e)!hasOwnProperty(e,r)||0<=n.indexOf(r)||null!=(i=e[r])&&(s[t(r)]=asNumber(i));return s}function formatOffset(e,t){var n=Math.trunc(Math.abs(e/60)),r=Math.trunc(Math.abs(e%60)),i=0<=e?"+":"-";switch(t){case"short":return i+padStart(n,2)+":"+padStart(r,2);case"narrow":return i+n+(0<r?":"+r:"");case"techie":return i+padStart(n,2)+padStart(r,2);default:throw new RangeError("Value format "+t+" is out of range for property format")}}function timeObject(e){return pick(e,["hour","minute","second","millisecond"])}var ianaRegex=/[A-Za-z_+-]{1,256}(:?\/[A-Za-z_+-]{1,256}(\/[A-Za-z_+-]{1,256})?)?/;function stringify(e){return JSON.stringify(e,Object.keys(e).sort())}var monthsLong=["January","February","March","April","May","June","July","August","September","October","November","December"],monthsShort=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],monthsNarrow=["J","F","M","A","M","J","J","A","S","O","N","D"];function months(e){switch(e){case"narrow":return[].concat(monthsNarrow);case"short":return[].concat(monthsShort);case"long":return[].concat(monthsLong);case"numeric":return["1","2","3","4","5","6","7","8","9","10","11","12"];case"2-digit":return["01","02","03","04","05","06","07","08","09","10","11","12"];default:return null}}var weekdaysLong=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],weekdaysShort=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],weekdaysNarrow=["M","T","W","T","F","S","S"];function weekdays(e){switch(e){case"narrow":return[].concat(weekdaysNarrow);case"short":return[].concat(weekdaysShort);case"long":return[].concat(weekdaysLong);case"numeric":return["1","2","3","4","5","6","7"];default:return null}}var meridiems=["AM","PM"],erasLong=["Before Christ","Anno Domini"],erasShort=["BC","AD"],erasNarrow=["B","A"];function eras(e){switch(e){case"narrow":return[].concat(erasNarrow);case"short":return[].concat(erasShort);case"long":return[].concat(erasLong);default:return null}}function meridiemForDateTime(e){return meridiems[e.hour<12?0:1]}function weekdayForDateTime(e,t){return weekdays(t)[e.weekday-1]}function monthForDateTime(e,t){return months(t)[e.month-1]}function eraForDateTime(e,t){return eras(t)[e.year<0?0:1]}function formatRelativeTime(e,t,n,r){void 0===n&&(n="always"),void 0===r&&(r=!1);var i={years:["year","yr."],quarters:["quarter","qtr."],months:["month","mo."],weeks:["week","wk."],days:["day","day","days"],hours:["hour","hr."],minutes:["minute","min."],seconds:["second","sec."]},s=-1===["hours","minutes","seconds"].indexOf(e);if("auto"===n&&s){var o="days"===e;switch(t){case 1:return o?"tomorrow":"next "+i[e][0];case-1:return o?"yesterday":"last "+i[e][0];case 0:return o?"today":"this "+i[e][0]}}var n=Object.is(t,-0)||t<0,s=Math.abs(t),t=1===s,a=i[e],r=r?!t&&a[2]||a[1]:t?i[e][0]:e;return n?s+" "+r+" ago":"in "+s+" "+r}function formatString(e){var t="EEEE, LLLL d, yyyy, h:mm a";switch(stringify(pick(e,["weekday","era","year","month","day","hour","minute","second","timeZoneName","hour12"]))){case stringify(DATE_SHORT):return"M/d/yyyy";case stringify(DATE_MED):return"LLL d, yyyy";case stringify(DATE_MED_WITH_WEEKDAY):return"EEE, LLL d, yyyy";case stringify(DATE_FULL):return"LLLL d, yyyy";case stringify(DATE_HUGE):return"EEEE, LLLL d, yyyy";case stringify(TIME_SIMPLE):return"h:mm a";case stringify(TIME_WITH_SECONDS):return"h:mm:ss a";case stringify(TIME_WITH_SHORT_OFFSET):case stringify(TIME_WITH_LONG_OFFSET):return"h:mm a";case stringify(TIME_24_SIMPLE):return"HH:mm";case stringify(TIME_24_WITH_SECONDS):return"HH:mm:ss";case stringify(TIME_24_WITH_SHORT_OFFSET):case stringify(TIME_24_WITH_LONG_OFFSET):return"HH:mm";case stringify(DATETIME_SHORT):return"M/d/yyyy, h:mm a";case stringify(DATETIME_MED):return"LLL d, yyyy, h:mm a";case stringify(DATETIME_FULL):return"LLLL d, yyyy, h:mm a";case stringify(DATETIME_HUGE):return t;case stringify(DATETIME_SHORT_WITH_SECONDS):return"M/d/yyyy, h:mm:ss a";case stringify(DATETIME_MED_WITH_SECONDS):return"LLL d, yyyy, h:mm:ss a";case stringify(DATETIME_MED_WITH_WEEKDAY):return"EEE, d LLL yyyy, h:mm a";case stringify(DATETIME_FULL_WITH_SECONDS):return"LLLL d, yyyy, h:mm:ss a";case stringify(DATETIME_HUGE_WITH_SECONDS):return"EEEE, LLLL d, yyyy, h:mm:ss a";default:return t}}function stringifyTokens(e,t){for(var n="",r=_createForOfIteratorHelperLoose(e);!(i=r()).done;){var i=i.value;i.literal?n+=i.val:n+=t(i.val)}return n}var _macroTokenToFormatOpts={D:DATE_SHORT,DD:DATE_MED,DDD:DATE_FULL,DDDD:DATE_HUGE,t:TIME_SIMPLE,tt:TIME_WITH_SECONDS,ttt:TIME_WITH_SHORT_OFFSET,tttt:TIME_WITH_LONG_OFFSET,T:TIME_24_SIMPLE,TT:TIME_24_WITH_SECONDS,TTT:TIME_24_WITH_SHORT_OFFSET,TTTT:TIME_24_WITH_LONG_OFFSET,f:DATETIME_SHORT,ff:DATETIME_MED,fff:DATETIME_FULL,ffff:DATETIME_HUGE,F:DATETIME_SHORT_WITH_SECONDS,FF:DATETIME_MED_WITH_SECONDS,FFF:DATETIME_FULL_WITH_SECONDS,FFFF:DATETIME_HUGE_WITH_SECONDS},Formatter=function(){function m(e,t){this.opts=t,this.loc=e,this.systemLoc=null}m.create=function(e,t){return new m(e,t=void 0===t?{}:t)},m.parseFormat=function(e){for(var t=null,n="",r=!1,i=[],s=0;s<e.length;s++){var o=e.charAt(s);"'"===o?(0<n.length&&i.push({literal:r,val:n}),t=null,n="",r=!r):r||o===t?n+=o:(0<n.length&&i.push({literal:!1,val:n}),t=n=o)}return 0<n.length&&i.push({literal:r,val:n}),i},m.macroTokenToFormatOpts=function(e){return _macroTokenToFormatOpts[e]};var e=m.prototype;return e.formatWithSystemDefault=function(e,t){return null===this.systemLoc&&(this.systemLoc=this.loc.redefaultToSystem()),this.systemLoc.dtFormatter(e,Object.assign({},this.opts,t)).format()},e.formatDateTime=function(e,t){return void 0===t&&(t={}),this.loc.dtFormatter(e,Object.assign({},this.opts,t)).format()},e.formatDateTimeParts=function(e,t){return void 0===t&&(t={}),this.loc.dtFormatter(e,Object.assign({},this.opts,t)).formatToParts()},e.resolvedOptions=function(e,t){return void 0===t&&(t={}),this.loc.dtFormatter(e,Object.assign({},this.opts,t)).resolvedOptions()},e.num=function(e,t){if(void 0===t&&(t=0),this.opts.forceSimple)return padStart(e,t);var n=Object.assign({},this.opts);return 0<t&&(n.padTo=t),this.loc.numberFormatter(n).format(e)},e.formatDateTimeFromString=function(n,e){var r=this,i="en"===this.loc.listingMode(),t=this.loc.outputCalendar&&"gregory"!==this.loc.outputCalendar&&hasFormatToParts(),s=function(e,t){return r.loc.extract(n,e,t)},o=function(e){return n.isOffsetFixed&&0===n.offset&&e.allowZ?"Z":n.isValid?n.zone.formatOffset(n.ts,e.format):""},a=function(){return i?meridiemForDateTime(n):s({hour:"numeric",hour12:!0},"dayperiod")},l=function(e,t){return i?monthForDateTime(n,e):s(t?{month:e}:{month:e,day:"numeric"},"month")},c=function(e,t){return i?weekdayForDateTime(n,e):s(t?{weekday:e}:{weekday:e,month:"long",day:"numeric"},"weekday")},u=function(e){var t=m.macroTokenToFormatOpts(e);return t?r.formatWithSystemDefault(n,t):e},d=function(e){return i?eraForDateTime(n,e):s({era:e},"era")};return stringifyTokens(m.parseFormat(e),function(e){switch(e){case"S":return r.num(n.millisecond);case"u":case"SSS":return r.num(n.millisecond,3);case"s":return r.num(n.second);case"ss":return r.num(n.second,2);case"m":return r.num(n.minute);case"mm":return r.num(n.minute,2);case"h":return r.num(n.hour%12==0?12:n.hour%12);case"hh":return r.num(n.hour%12==0?12:n.hour%12,2);case"H":return r.num(n.hour);case"HH":return r.num(n.hour,2);case"Z":return o({format:"narrow",allowZ:r.opts.allowZ});case"ZZ":return o({format:"short",allowZ:r.opts.allowZ});case"ZZZ":return o({format:"techie",allowZ:r.opts.allowZ});case"ZZZZ":return n.zone.offsetName(n.ts,{format:"short",locale:r.loc.locale});case"ZZZZZ":return n.zone.offsetName(n.ts,{format:"long",locale:r.loc.locale});case"z":return n.zoneName;case"a":return a();case"d":return t?s({day:"numeric"},"day"):r.num(n.day);case"dd":return t?s({day:"2-digit"},"day"):r.num(n.day,2);case"c":return r.num(n.weekday);case"ccc":return c("short",!0);case"cccc":return c("long",!0);case"ccccc":return c("narrow",!0);case"E":return r.num(n.weekday);case"EEE":return c("short",!1);case"EEEE":return c("long",!1);case"EEEEE":return c("narrow",!1);case"L":return t?s({month:"numeric",day:"numeric"},"month"):r.num(n.month);case"LL":return t?s({month:"2-digit",day:"numeric"},"month"):r.num(n.month,2);case"LLL":return l("short",!0);case"LLLL":return l("long",!0);case"LLLLL":return l("narrow",!0);case"M":return t?s({month:"numeric"},"month"):r.num(n.month);case"MM":return t?s({month:"2-digit"},"month"):r.num(n.month,2);case"MMM":return l("short",!1);case"MMMM":return l("long",!1);case"MMMMM":return l("narrow",!1);case"y":return t?s({year:"numeric"},"year"):r.num(n.year);case"yy":return t?s({year:"2-digit"},"year"):r.num(n.year.toString().slice(-2),2);case"yyyy":return t?s({year:"numeric"},"year"):r.num(n.year,4);case"yyyyyy":return t?s({year:"numeric"},"year"):r.num(n.year,6);case"G":return d("short");case"GG":return d("long");case"GGGGG":return d("narrow");case"kk":return r.num(n.weekYear.toString().slice(-2),2);case"kkkk":return r.num(n.weekYear,4);case"W":return r.num(n.weekNumber);case"WW":return r.num(n.weekNumber,2);case"o":return r.num(n.ordinal);case"ooo":return r.num(n.ordinal,3);case"q":return r.num(n.quarter);case"qq":return r.num(n.quarter,2);case"X":return r.num(Math.floor(n.ts/1e3));case"x":return r.num(n.ts);default:return u(e)}})},e.formatDurationFromString=function(e,t){var n,r=this,i=function(e){switch(e[0]){case"S":return"millisecond";case"s":return"second";case"m":return"minute";case"h":return"hour";case"d":return"day";case"M":return"month";case"y":return"year";default:return null}},t=m.parseFormat(t),s=t.reduce(function(e,t){var n=t.literal,t=t.val;return n?e:e.concat(t)},[]),e=e.shiftTo.apply(e,s.map(i).filter(function(e){return e}));return stringifyTokens(t,(n=e,function(e){var t=i(e);return t?r.num(n.get(t),e.length):e}))},m}(),Invalid=function(){function e(e,t){this.reason=e,this.explanation=t}return e.prototype.toMessage=function(){return this.explanation?this.reason+": "+this.explanation:this.reason},e}(),Zone=function(){function e(){}var t=e.prototype;return t.offsetName=function(e,t){throw new ZoneIsAbstractError},t.formatOffset=function(e,t){throw new ZoneIsAbstractError},t.offset=function(e){throw new ZoneIsAbstractError},t.equals=function(e){throw new ZoneIsAbstractError},_createClass(e,[{key:"type",get:function(){throw new ZoneIsAbstractError}},{key:"name",get:function(){throw new ZoneIsAbstractError}},{key:"universal",get:function(){throw new ZoneIsAbstractError}},{key:"isValid",get:function(){throw new ZoneIsAbstractError}}]),e}(),singleton=null,LocalZone=function(e){function t(){return e.apply(this,arguments)||this}_inheritsLoose(t,e);var n=t.prototype;return n.offsetName=function(e,t){return parseZoneInfo(e,t.format,t.locale)},n.formatOffset=function(e,t){return formatOffset(this.offset(e),t)},n.offset=function(e){return-new Date(e).getTimezoneOffset()},n.equals=function(e){return"local"===e.type},_createClass(t,[{key:"type",get:function(){return"local"}},{key:"name",get:function(){return hasIntl()?(new Intl.DateTimeFormat).resolvedOptions().timeZone:"local"}},{key:"universal",get:function(){return!1}},{key:"isValid",get:function(){return!0}}],[{key:"instance",get:function(){return singleton=null===singleton?new t:singleton}}]),t}(Zone),matchingRegex=RegExp("^"+ianaRegex.source+"$"),dtfCache={};function makeDTF(e){return dtfCache[e]||(dtfCache[e]=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:e,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"})),dtfCache[e]}var typeToPos={year:0,month:1,day:2,hour:3,minute:4,second:5};function hackyOffset(e,t){var e=e.format(t).replace(/\u200E/g,""),t=/(\d+)\/(\d+)\/(\d+),? (\d+):(\d+):(\d+)/.exec(e),e=t[1],n=t[2];return[t[3],e,n,t[4],t[5],t[6]]}function partsOffset(e,t){for(var n=e.formatToParts(t),r=[],i=0;i<n.length;i++){var s=n[i],o=s.type,s=s.value,o=typeToPos[o];isUndefined(o)||(r[o]=parseInt(s,10))}return r}var ianaZoneCache={},IANAZone=function(n){function r(e){var t=n.call(this)||this;return t.zoneName=e,t.valid=r.isValidZone(e),t}_inheritsLoose(r,n),r.create=function(e){return ianaZoneCache[e]||(ianaZoneCache[e]=new r(e)),ianaZoneCache[e]},r.resetCache=function(){ianaZoneCache={},dtfCache={}},r.isValidSpecifier=function(e){return!(!e||!e.match(matchingRegex))},r.isValidZone=function(e){try{return new Intl.DateTimeFormat("en-US",{timeZone:e}).format(),!0}catch(e){return!1}},r.parseGMTOffset=function(e){if(e){e=e.match(/^Etc\/GMT(0|[+-]\d{1,2})$/i);if(e)return-60*parseInt(e[1])}return null};var e=r.prototype;return e.offsetName=function(e,t){return parseZoneInfo(e,t.format,t.locale,this.name)},e.formatOffset=function(e,t){return formatOffset(this.offset(e),t)},e.offset=function(e){e=new Date(e);if(isNaN(e))return NaN;var t=makeDTF(this.name),t=(t.formatToParts?partsOffset:hackyOffset)(t,e),n=t[0],r=t[1],i=t[2],s=t[3],e=+e,o=e%1e3;return(objToLocalTS({year:n,month:r,day:i,hour:24===s?0:s,minute:t[4],second:t[5],millisecond:0})-(e-=0<=o?o:1e3+o))/6e4},e.equals=function(e){return"iana"===e.type&&e.name===this.name},_createClass(r,[{key:"type",get:function(){return"iana"}},{key:"name",get:function(){return this.zoneName}},{key:"universal",get:function(){return!1}},{key:"isValid",get:function(){return this.valid}}]),r}(Zone),singleton$1=null,FixedOffsetZone=function(n){function t(e){var t=n.call(this)||this;return t.fixed=e,t}_inheritsLoose(t,n),t.instance=function(e){return 0===e?t.utcInstance:new t(e)},t.parseSpecifier=function(e){if(e){e=e.match(/^utc(?:([+-]\d{1,2})(?::(\d{2}))?)?$/i);if(e)return new t(signedOffset(e[1],e[2]))}return null},_createClass(t,null,[{key:"utcInstance",get:function(){return singleton$1=null===singleton$1?new t(0):singleton$1}}]);var e=t.prototype;return e.offsetName=function(){return this.name},e.formatOffset=function(e,t){return formatOffset(this.fixed,t)},e.offset=function(){return this.fixed},e.equals=function(e){return"fixed"===e.type&&e.fixed===this.fixed},_createClass(t,[{key:"type",get:function(){return"fixed"}},{key:"name",get:function(){return 0===this.fixed?"UTC":"UTC"+formatOffset(this.fixed,"narrow")}},{key:"universal",get:function(){return!0}},{key:"isValid",get:function(){return!0}}]),t}(Zone),InvalidZone=function(n){function e(e){var t=n.call(this)||this;return t.zoneName=e,t}_inheritsLoose(e,n);var t=e.prototype;return t.offsetName=function(){return null},t.formatOffset=function(){return""},t.offset=function(){return NaN},t.equals=function(){return!1},_createClass(e,[{key:"type",get:function(){return"invalid"}},{key:"name",get:function(){return this.zoneName}},{key:"universal",get:function(){return!1}},{key:"isValid",get:function(){return!1}}]),e}(Zone);function normalizeZone(e,t){var n;return isUndefined(e)||null===e?t:e instanceof Zone?e:isString(e)?"local"===(n=e.toLowerCase())?t:"utc"===n||"gmt"===n?FixedOffsetZone.utcInstance:null!=(t=IANAZone.parseGMTOffset(e))?FixedOffsetZone.instance(t):IANAZone.isValidSpecifier(n)?IANAZone.create(e):FixedOffsetZone.parseSpecifier(n)||new InvalidZone(e):isNumber(e)?FixedOffsetZone.instance(e):"object"==typeof e&&e.offset&&"number"==typeof e.offset?e:new InvalidZone(e)}var now=function(){return Date.now()},defaultZone=null,defaultLocale=null,defaultNumberingSystem=null,defaultOutputCalendar=null,throwOnInvalid=!1,Settings=function(){function e(){}return e.resetCaches=function(){Locale.resetCache(),IANAZone.resetCache()},_createClass(e,null,[{key:"now",get:function(){return now},set:function(e){now=e}},{key:"defaultZoneName",get:function(){return e.defaultZone.name},set:function(e){defaultZone=e?normalizeZone(e):null}},{key:"defaultZone",get:function(){return defaultZone||LocalZone.instance}},{key:"defaultLocale",get:function(){return defaultLocale},set:function(e){defaultLocale=e}},{key:"defaultNumberingSystem",get:function(){return defaultNumberingSystem},set:function(e){defaultNumberingSystem=e}},{key:"defaultOutputCalendar",get:function(){return defaultOutputCalendar},set:function(e){defaultOutputCalendar=e}},{key:"throwOnInvalid",get:function(){return throwOnInvalid},set:function(e){throwOnInvalid=e}}]),e}(),intlDTCache={};function getCachedDTF(e,t){void 0===t&&(t={});var n=JSON.stringify([e,t]),r=intlDTCache[n];return r||(r=new Intl.DateTimeFormat(e,t),intlDTCache[n]=r),r}var intlNumCache={};function getCachedINF(e,t){void 0===t&&(t={});var n=JSON.stringify([e,t]),r=intlNumCache[n];return r||(r=new Intl.NumberFormat(e,t),intlNumCache[n]=r),r}var intlRelCache={};function getCachedRTF(e,t){var n=t=void 0===t?{}:t,n=(n.base,_objectWithoutPropertiesLoose(n,["base"])),n=JSON.stringify([e,n]),r=intlRelCache[n];return r||(r=new Intl.RelativeTimeFormat(e,t),intlRelCache[n]=r),r}var sysLocaleCache=null;function systemLocale(){var e;return sysLocaleCache=sysLocaleCache||(hasIntl()?(e=(new Intl.DateTimeFormat).resolvedOptions().locale)&&"und"!==e?e:"en-US":"en-US")}function parseLocaleString(e){var t=e.indexOf("-u-");if(-1===t)return[e];var n,t=e.substring(0,t);try{n=getCachedDTF(e).resolvedOptions()}catch(e){n=getCachedDTF(t).resolvedOptions()}e=n;return[t,e.numberingSystem,e.calendar]}function intlConfigString(e,t,n){return hasIntl()?((n||t)&&(e+="-u",n&&(e+="-ca-"+n),t&&(e+="-nu-"+t)),e):[]}function mapMonths(e){for(var t=[],n=1;n<=12;n++){var r=DateTime.utc(2016,n,1);t.push(e(r))}return t}function mapWeekdays(e){for(var t=[],n=1;n<=7;n++){var r=DateTime.utc(2016,11,13+n);t.push(e(r))}return t}function listStuff(e,t,n,r,i){e=e.listingMode(n);return"error"===e?null:("en"===e?r:i)(t)}function supportsFastNumbers(e){return(!e.numberingSystem||"latn"===e.numberingSystem)&&("latn"===e.numberingSystem||!e.locale||e.locale.startsWith("en")||hasIntl()&&"latn"===new Intl.DateTimeFormat(e.intl).resolvedOptions().numberingSystem)}var PolyNumberFormatter=function(){function e(e,t,n){this.padTo=n.padTo||0,this.floor=n.floor||!1,!t&&hasIntl()&&(t={useGrouping:!1},0<n.padTo&&(t.minimumIntegerDigits=n.padTo),this.inf=getCachedINF(e,t))}return e.prototype.format=function(e){var t;return this.inf?(t=this.floor?Math.floor(e):e,this.inf.format(t)):padStart(this.floor?Math.floor(e):roundTo(e,3),this.padTo)},e}(),PolyDateFormatter=function(){function e(e,t,n){var r,i,s;this.opts=n,this.hasIntl=hasIntl(),e.zone.universal&&this.hasIntl?(i=e.offset/60*-1,s=IANAZone.isValidZone(i=0<=i?"Etc/GMT+"+i:"Etc/GMT"+i),0!==e.offset&&s?(r=i,this.dt=e):(r="UTC",n.timeZoneName?this.dt=e:this.dt=0===e.offset?e:DateTime.fromMillis(e.ts+60*e.offset*1e3))):"local"===e.zone.type?this.dt=e:r=(this.dt=e).zone.name,this.hasIntl&&(s=Object.assign({},this.opts),r&&(s.timeZone=r),this.dtf=getCachedDTF(t,s))}var t=e.prototype;return t.format=function(){var e,t;return this.hasIntl?this.dtf.format(this.dt.toJSDate()):(e=formatString(this.opts),t=Locale.create("en-US"),Formatter.create(t).formatDateTimeFromString(this.dt,e))},t.formatToParts=function(){return this.hasIntl&&hasFormatToParts()?this.dtf.formatToParts(this.dt.toJSDate()):[]},t.resolvedOptions=function(){return this.hasIntl?this.dtf.resolvedOptions():{locale:"en-US",numberingSystem:"latn",outputCalendar:"gregory"}},e}(),PolyRelFormatter=function(){function e(e,t,n){this.opts=Object.assign({style:"long"},n),!t&&hasRelative()&&(this.rtf=getCachedRTF(e,n))}var t=e.prototype;return t.format=function(e,t){return this.rtf?this.rtf.format(e,t):formatRelativeTime(t,e,this.opts.numeric,"long"!==this.opts.style)},t.formatToParts=function(e,t){return this.rtf?this.rtf.formatToParts(e,t):[]},e}(),Locale=function(){function i(e,t,n,r){var e=parseLocaleString(e),i=e[0],s=e[1],e=e[2];this.locale=i,this.numberingSystem=t||s||null,this.outputCalendar=n||e||null,this.intl=intlConfigString(this.locale,this.numberingSystem,this.outputCalendar),this.weekdaysCache={format:{},standalone:{}},this.monthsCache={format:{},standalone:{}},this.meridiemCache=null,this.eraCache={},this.specifiedLocale=r,this.fastNumbersCached=null}i.fromOpts=function(e){return i.create(e.locale,e.numberingSystem,e.outputCalendar,e.defaultToEN)},i.create=function(e,t,n,r){void 0===r&&(r=!1);e=e||Settings.defaultLocale;return new i(e||(r?"en-US":systemLocale()),t||Settings.defaultNumberingSystem,n||Settings.defaultOutputCalendar,e)},i.resetCache=function(){sysLocaleCache=null,intlDTCache={},intlNumCache={},intlRelCache={}},i.fromObject=function(e){var e=void 0===e?{}:e,t=e.locale,n=e.numberingSystem,e=e.outputCalendar;return i.create(t,n,e)};var e=i.prototype;return e.listingMode=function(e){void 0===e&&(e=!0);var t=hasIntl()&&hasFormatToParts(),n=this.isEnglish(),r=!(null!==this.numberingSystem&&"latn"!==this.numberingSystem||null!==this.outputCalendar&&"gregory"!==this.outputCalendar);return t||n&&r||e?!t||n&&r?"en":"intl":"error"},e.clone=function(e){return e&&0!==Object.getOwnPropertyNames(e).length?i.create(e.locale||this.specifiedLocale,e.numberingSystem||this.numberingSystem,e.outputCalendar||this.outputCalendar,e.defaultToEN||!1):this},e.redefaultToEN=function(e){return void 0===e&&(e={}),this.clone(Object.assign({},e,{defaultToEN:!0}))},e.redefaultToSystem=function(e){return void 0===e&&(e={}),this.clone(Object.assign({},e,{defaultToEN:!1}))},e.months=function(n,r,e){var i=this;return void 0===r&&(r=!1),listStuff(this,n,e=void 0===e?!0:e,months,function(){var t=r?{month:n,day:"numeric"}:{month:n},e=r?"format":"standalone";return i.monthsCache[e][n]||(i.monthsCache[e][n]=mapMonths(function(e){return i.extract(e,t,"month")})),i.monthsCache[e][n]})},e.weekdays=function(n,r,e){var i=this;return void 0===r&&(r=!1),listStuff(this,n,e=void 0===e?!0:e,weekdays,function(){var t=r?{weekday:n,year:"numeric",month:"long",day:"numeric"}:{weekday:n},e=r?"format":"standalone";return i.weekdaysCache[e][n]||(i.weekdaysCache[e][n]=mapWeekdays(function(e){return i.extract(e,t,"weekday")})),i.weekdaysCache[e][n]})},e.meridiems=function(e){var n=this;return listStuff(this,void 0,e=void 0===e?!0:e,function(){return meridiems},function(){var t;return n.meridiemCache||(t={hour:"numeric",hour12:!0},n.meridiemCache=[DateTime.utc(2016,11,13,9),DateTime.utc(2016,11,13,19)].map(function(e){return n.extract(e,t,"dayperiod")})),n.meridiemCache})},e.eras=function(e,t){var n=this;return listStuff(this,e,t=void 0===t?!0:t,eras,function(){var t={era:e};return n.eraCache[e]||(n.eraCache[e]=[DateTime.utc(-40,1,1),DateTime.utc(2017,1,1)].map(function(e){return n.extract(e,t,"era")})),n.eraCache[e]})},e.extract=function(e,t,n){e=this.dtFormatter(e,t).formatToParts().find(function(e){return e.type.toLowerCase()===n});return e?e.value:null},e.numberFormatter=function(e){return new PolyNumberFormatter(this.intl,(e=void 0===e?{}:e).forceSimple||this.fastNumbers,e)},e.dtFormatter=function(e,t){return new PolyDateFormatter(e,this.intl,t=void 0===t?{}:t)},e.relFormatter=function(e){return void 0===e&&(e={}),new PolyRelFormatter(this.intl,this.isEnglish(),e)},e.isEnglish=function(){return"en"===this.locale||"en-us"===this.locale.toLowerCase()||hasIntl()&&new Intl.DateTimeFormat(this.intl).resolvedOptions().locale.startsWith("en-us")},e.equals=function(e){return this.locale===e.locale&&this.numberingSystem===e.numberingSystem&&this.outputCalendar===e.outputCalendar},_createClass(i,[{key:"fastNumbers",get:function(){return null==this.fastNumbersCached&&(this.fastNumbersCached=supportsFastNumbers(this)),this.fastNumbersCached}}]),i}();function combineRegexes(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=t.reduce(function(e,t){return e+t.source},"");return RegExp("^"+r+"$")}function combineExtractors(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(s){return t.reduce(function(e,t){var n=e[0],r=e[1],e=e[2],t=t(s,e),e=t[0],i=t[1],t=t[2];return[Object.assign(n,e),r||i,t]},[{},null,1]).slice(0,2)}}function parse(e){if(null==e)return[null,null];for(var t=arguments.length,n=new Array(1<t?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];for(var i=0,s=n;i<s.length;i++){var o=s[i],a=o[0],o=o[1],a=a.exec(e);if(a)return o(a)}return[null,null]}function simpleParse(){for(var e=arguments.length,i=new Array(e),t=0;t<e;t++)i[t]=arguments[t];return function(e,t){for(var n={},r=0;r<i.length;r++)n[i[r]]=parseInteger(e[t+r]);return[n,null,t+r]}}var offsetRegex=/(?:(Z)|([+-]\d\d)(?::?(\d\d))?)/,isoTimeBaseRegex=/(\d\d)(?::?(\d\d)(?::?(\d\d)(?:[.,](\d{1,30}))?)?)?/,isoTimeRegex=RegExp(""+isoTimeBaseRegex.source+offsetRegex.source+"?"),isoTimeExtensionRegex=RegExp("(?:T"+isoTimeRegex.source+")?"),isoYmdRegex=/([+-]\d{6}|\d{4})(?:-?(\d\d)(?:-?(\d\d))?)?/,isoWeekRegex=/(\d{4})-?W(\d\d)(?:-?(\d))?/,isoOrdinalRegex=/(\d{4})-?(\d{3})/,extractISOWeekData=simpleParse("weekYear","weekNumber","weekDay"),extractISOOrdinalData=simpleParse("year","ordinal"),sqlYmdRegex=/(\d{4})-(\d\d)-(\d\d)/,sqlTimeRegex=RegExp(isoTimeBaseRegex.source+" ?(?:"+offsetRegex.source+"|("+ianaRegex.source+"))?"),sqlTimeExtensionRegex=RegExp("(?: "+sqlTimeRegex.source+")?");function int(e,t,n){e=e[t];return isUndefined(e)?n:parseInteger(e)}function extractISOYmd(e,t){return[{year:int(e,t),month:int(e,t+1,1),day:int(e,t+2,1)},null,t+3]}function extractISOTime(e,t){return[{hours:int(e,t,0),minutes:int(e,t+1,0),seconds:int(e,t+2,0),milliseconds:parseMillis(e[t+3])},null,t+4]}function extractISOOffset(e,t){var n=!e[t]&&!e[t+1],e=signedOffset(e[t+1],e[t+2]);return[{},n?null:FixedOffsetZone.instance(e),t+3]}function extractIANAZone(e,t){return[{},e[t]?IANAZone.create(e[t]):null,t+1]}var isoTimeOnly=RegExp("^T?"+isoTimeBaseRegex.source+"$"),isoDuration=/^-?P(?:(?:(-?\d{1,9})Y)?(?:(-?\d{1,9})M)?(?:(-?\d{1,9})W)?(?:(-?\d{1,9})D)?(?:T(?:(-?\d{1,9})H)?(?:(-?\d{1,9})M)?(?:(-?\d{1,20})(?:[.,](-?\d{1,9}))?S)?)?)$/;function extractISODuration(e){function t(e,t){return void 0===t&&(t=!1),void 0!==e&&(t||e&&u)?-e:e}var n=e[0],r=e[1],i=e[2],s=e[3],o=e[4],a=e[5],l=e[6],c=e[7],e=e[8],u="-"===n[0],n=c&&"-"===c[0];return[{years:t(parseInteger(r)),months:t(parseInteger(i)),weeks:t(parseInteger(s)),days:t(parseInteger(o)),hours:t(parseInteger(a)),minutes:t(parseInteger(l)),seconds:t(parseInteger(c),"-0"===c),milliseconds:t(parseMillis(e),n)}]}var obsOffsets={GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function fromStrings(e,t,n,r,i,s,o){t={year:2===t.length?untruncateYear(parseInteger(t)):parseInteger(t),month:monthsShort.indexOf(n)+1,day:parseInteger(r),hour:parseInteger(i),minute:parseInteger(s)};return o&&(t.second=parseInteger(o)),e&&(t.weekday=3<e.length?weekdaysLong.indexOf(e)+1:weekdaysShort.indexOf(e)+1),t}var rfc2822=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|(?:([+-]\d\d)(\d\d)))$/;function extractRFC2822(e){var t=e[1],n=e[2],r=e[3],i=e[4],s=e[5],o=e[6],a=e[7],l=e[8],c=e[9],u=e[10],e=e[11],t=fromStrings(t,i,r,n,s,o,a),i=l?obsOffsets[l]:c?0:signedOffset(u,e);return[t,new FixedOffsetZone(i)]}function preprocessRFC2822(e){return e.replace(/\([^)]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").trim()}var rfc1123=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun), (\d\d) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\d{4}) (\d\d):(\d\d):(\d\d) GMT$/,rfc850=/^(Monday|Tuesday|Wedsday|Thursday|Friday|Saturday|Sunday), (\d\d)-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\d\d) (\d\d):(\d\d):(\d\d) GMT$/,ascii=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ( \d|\d\d) (\d\d):(\d\d):(\d\d) (\d{4})$/;function extractRFC1123Or850(e){var t=e[1],n=e[2],r=e[3];return[fromStrings(t,e[4],r,n,e[5],e[6],e[7]),FixedOffsetZone.utcInstance]}function extractASCII(e){var t=e[1],n=e[2],r=e[3],i=e[4],s=e[5],o=e[6];return[fromStrings(t,e[7],n,r,i,s,o),FixedOffsetZone.utcInstance]}var isoYmdWithTimeExtensionRegex=combineRegexes(isoYmdRegex,isoTimeExtensionRegex),isoWeekWithTimeExtensionRegex=combineRegexes(isoWeekRegex,isoTimeExtensionRegex),isoOrdinalWithTimeExtensionRegex=combineRegexes(isoOrdinalRegex,isoTimeExtensionRegex),isoTimeCombinedRegex=combineRegexes(isoTimeRegex),extractISOYmdTimeAndOffset=combineExtractors(extractISOYmd,extractISOTime,extractISOOffset),extractISOWeekTimeAndOffset=combineExtractors(extractISOWeekData,extractISOTime,extractISOOffset),extractISOOrdinalDateAndTime=combineExtractors(extractISOOrdinalData,extractISOTime,extractISOOffset),extractISOTimeAndOffset=combineExtractors(extractISOTime,extractISOOffset);function parseISODate(e){return parse(e,[isoYmdWithTimeExtensionRegex,extractISOYmdTimeAndOffset],[isoWeekWithTimeExtensionRegex,extractISOWeekTimeAndOffset],[isoOrdinalWithTimeExtensionRegex,extractISOOrdinalDateAndTime],[isoTimeCombinedRegex,extractISOTimeAndOffset])}function parseRFC2822Date(e){return parse(preprocessRFC2822(e),[rfc2822,extractRFC2822])}function parseHTTPDate(e){return parse(e,[rfc1123,extractRFC1123Or850],[rfc850,extractRFC1123Or850],[ascii,extractASCII])}function parseISODuration(e){return parse(e,[isoDuration,extractISODuration])}var extractISOTimeOnly=combineExtractors(extractISOTime);function parseISOTimeOnly(e){return parse(e,[isoTimeOnly,extractISOTimeOnly])}var sqlYmdWithTimeExtensionRegex=combineRegexes(sqlYmdRegex,sqlTimeExtensionRegex),sqlTimeCombinedRegex=combineRegexes(sqlTimeRegex),extractISOYmdTimeOffsetAndIANAZone=combineExtractors(extractISOYmd,extractISOTime,extractISOOffset,extractIANAZone),extractISOTimeOffsetAndIANAZone=combineExtractors(extractISOTime,extractISOOffset,extractIANAZone);function parseSQL(e){return parse(e,[sqlYmdWithTimeExtensionRegex,extractISOYmdTimeOffsetAndIANAZone],[sqlTimeCombinedRegex,extractISOTimeOffsetAndIANAZone])}var INVALID="Invalid Duration",lowOrderMatrix={weeks:{days:7,hours:168,minutes:10080,seconds:604800,milliseconds:6048e5},days:{hours:24,minutes:1440,seconds:86400,milliseconds:864e5},hours:{minutes:60,seconds:3600,milliseconds:36e5},minutes:{seconds:60,milliseconds:6e4},seconds:{milliseconds:1e3}},casualMatrix=Object.assign({years:{quarters:4,months:12,weeks:52,days:365,hours:8760,minutes:525600,seconds:31536e3,milliseconds:31536e6},quarters:{months:3,weeks:13,days:91,hours:2184,minutes:131040,seconds:7862400,milliseconds:78624e5},months:{weeks:4,days:30,hours:720,minutes:43200,seconds:2592e3,milliseconds:2592e6}},lowOrderMatrix),daysInYearAccurate=365.2425,daysInMonthAccurate=30.436875,accurateMatrix=Object.assign({years:{quarters:4,months:12,weeks:daysInYearAccurate/7,days:daysInYearAccurate,hours:24*daysInYearAccurate,minutes:24*daysInYearAccurate*60,seconds:24*daysInYearAccurate*60*60,milliseconds:24*daysInYearAccurate*60*60*1e3},quarters:{months:3,weeks:daysInYearAccurate/28,days:daysInYearAccurate/4,hours:24*daysInYearAccurate/4,minutes:24*daysInYearAccurate*60/4,seconds:24*daysInYearAccurate*60*60/4,milliseconds:24*daysInYearAccurate*60*60*1e3/4},months:{weeks:daysInMonthAccurate/7,days:daysInMonthAccurate,hours:24*daysInMonthAccurate,minutes:24*daysInMonthAccurate*60,seconds:24*daysInMonthAccurate*60*60,milliseconds:24*daysInMonthAccurate*60*60*1e3}},lowOrderMatrix),orderedUnits=["years","quarters","months","weeks","days","hours","minutes","seconds","milliseconds"],reverseUnits=orderedUnits.slice(0).reverse();function clone(e,t,n){n={values:(n=void 0===n?!1:n)?t.values:Object.assign({},e.values,t.values||{}),loc:e.loc.clone(t.loc),conversionAccuracy:t.conversionAccuracy||e.conversionAccuracy};return new Duration(n)}function antiTrunc(e){return e<0?Math.floor(e):Math.ceil(e)}function convert(e,t,n,r,i){var e=e[i][n],s=t[n]/e,s=!(Math.sign(s)===Math.sign(r[i]))&&0!==r[i]&&Math.abs(s)<=1?antiTrunc(s):Math.trunc(s);r[i]+=s,t[n]-=s*e}function normalizeValues(n,r){reverseUnits.reduce(function(e,t){return isUndefined(r[t])?e:(e&&convert(n,r,e,r,t),t)},null)}var Duration=function(){function f(e){var t="longterm"===e.conversionAccuracy||!1;this.values=e.values,this.loc=e.loc||Locale.create(),this.conversionAccuracy=t?"longterm":"casual",this.invalid=e.invalid||null,this.matrix=t?accurateMatrix:casualMatrix,this.isLuxonDuration=!0}f.fromMillis=function(e,t){return f.fromObject(Object.assign({milliseconds:e},t))},f.fromObject=function(e){if(null==e||"object"!=typeof e)throw new InvalidArgumentError("Duration.fromObject: argument expected to be an object, got "+(null===e?"null":typeof e));return new f({values:normalizeObject(e,f.normalizeUnit,["locale","numberingSystem","conversionAccuracy","zone"]),loc:Locale.fromObject(e),conversionAccuracy:e.conversionAccuracy})},f.fromISO=function(e,t){var n=parseISODuration(e)[0];return n?(n=Object.assign(n,t),f.fromObject(n)):f.invalid("unparsable",'the input "'+e+"\" can't be parsed as ISO 8601")},f.fromISOTime=function(e,t){var n=parseISOTimeOnly(e)[0];return n?(n=Object.assign(n,t),f.fromObject(n)):f.invalid("unparsable",'the input "'+e+"\" can't be parsed as ISO 8601")},f.invalid=function(e,t){if(void 0===t&&(t=null),!e)throw new InvalidArgumentError("need to specify a reason the Duration is invalid");e=e instanceof Invalid?e:new Invalid(e,t);if(Settings.throwOnInvalid)throw new InvalidDurationError(e);return new f({invalid:e})},f.normalizeUnit=function(e){var t={year:"years",years:"years",quarter:"quarters",quarters:"quarters",month:"months",months:"months",week:"weeks",weeks:"weeks",day:"days",days:"days",hour:"hours",hours:"hours",minute:"minutes",minutes:"minutes",second:"seconds",seconds:"seconds",millisecond:"milliseconds",milliseconds:"milliseconds"}[e&&e.toLowerCase()];if(t)return t;throw new InvalidUnitError(e)},f.isDuration=function(e){return e&&e.isLuxonDuration||!1};var e=f.prototype;return e.toFormat=function(e,t){void 0===t&&(t={});t=Object.assign({},t,{floor:!1!==t.round&&!1!==t.floor});return this.isValid?Formatter.create(this.loc,t).formatDurationFromString(this,e):INVALID},e.toObject=function(e){if(void 0===e&&(e={}),!this.isValid)return{};var t=Object.assign({},this.values);return e.includeConfig&&(t.conversionAccuracy=this.conversionAccuracy,t.numberingSystem=this.loc.numberingSystem,t.locale=this.loc.locale),t},e.toISO=function(){if(!this.isValid)return null;var e="P";return 0!==this.years&&(e+=this.years+"Y"),0===this.months&&0===this.quarters||(e+=this.months+3*this.quarters+"M"),0!==this.weeks&&(e+=this.weeks+"W"),0!==this.days&&(e+=this.days+"D"),0===this.hours&&0===this.minutes&&0===this.seconds&&0===this.milliseconds||(e+="T"),0!==this.hours&&(e+=this.hours+"H"),0!==this.minutes&&(e+=this.minutes+"M"),0===this.seconds&&0===this.milliseconds||(e+=roundTo(this.seconds+this.milliseconds/1e3,3)+"S"),"P"===e&&(e+="T0S"),e},e.toISOTime=function(e){if(void 0===e&&(e={}),!this.isValid)return null;var t=this.toMillis();if(t<0||864e5<=t)return null;e=Object.assign({suppressMilliseconds:!1,suppressSeconds:!1,includePrefix:!1,format:"extended"},e);var t=this.shiftTo("hours","minutes","seconds","milliseconds"),n="basic"===e.format?"hhmm":"hh:mm",t=(e.suppressSeconds&&0===t.seconds&&0===t.milliseconds||(n+="basic"===e.format?"ss":":ss",e.suppressMilliseconds&&0===t.milliseconds||(n+=".SSS")),t.toFormat(n));return t=e.includePrefix?"T"+t:t},e.toJSON=function(){return this.toISO()},e.toString=function(){return this.toISO()},e.toMillis=function(){return this.as("milliseconds")},e.valueOf=function(){return this.toMillis()},e.plus=function(e){if(!this.isValid)return this;for(var t=friendlyDuration(e),n={},r=_createForOfIteratorHelperLoose(orderedUnits);!(i=r()).done;){var i=i.value;(hasOwnProperty(t.values,i)||hasOwnProperty(this.values,i))&&(n[i]=t.get(i)+this.get(i))}return clone(this,{values:n},!0)},e.minus=function(e){if(!this.isValid)return this;e=friendlyDuration(e);return this.plus(e.negate())},e.mapUnits=function(e){if(!this.isValid)return this;for(var t={},n=0,r=Object.keys(this.values);n<r.length;n++){var i=r[n];t[i]=asNumber(e(this.values[i],i))}return clone(this,{values:t},!0)},e.get=function(e){return this[f.normalizeUnit(e)]},e.set=function(e){return this.isValid?clone(this,{values:Object.assign(this.values,normalizeObject(e,f.normalizeUnit,[]))}):this},e.reconfigure=function(e){var e=void 0===e?{}:e,t=e.locale,n=e.numberingSystem,e=e.conversionAccuracy,t={loc:this.loc.clone({locale:t,numberingSystem:n})};return e&&(t.conversionAccuracy=e),clone(this,t)},e.as=function(e){return this.isValid?this.shiftTo(e).get(e):NaN},e.normalize=function(){if(!this.isValid)return this;var e=this.toObject();return normalizeValues(this.matrix,e),clone(this,{values:e},!0)},e.shiftTo=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(!this.isValid)return this;if(0===t.length)return this;for(var r,t=t.map(function(e){return f.normalizeUnit(e)}),i={},s={},o=this.toObject(),a=_createForOfIteratorHelperLoose(orderedUnits);!(p=a()).done;){var l=p.value;if(0<=t.indexOf(l)){var c,u=l,d=0;for(c in s)d+=this.matrix[c][l]*s[c],s[c]=0;isNumber(o[l])&&(d+=o[l]);var m,p=Math.trunc(d);for(m in i[l]=p,s[l]=d-p,o)orderedUnits.indexOf(m)>orderedUnits.indexOf(l)&&convert(this.matrix,o,m,i,l)}else isNumber(o[l])&&(s[l]=o[l])}for(r in s)0!==s[r]&&(i[u]+=r===u?s[r]:s[r]/this.matrix[u][r]);return clone(this,{values:i},!0).normalize()},e.negate=function(){if(!this.isValid)return this;for(var e={},t=0,n=Object.keys(this.values);t<n.length;t++){var r=n[t];e[r]=-this.values[r]}return clone(this,{values:e},!0)},e.equals=function(e){if(!this.isValid||!e.isValid)return!1;if(!this.loc.equals(e.loc))return!1;for(var t,n=_createForOfIteratorHelperLoose(orderedUnits);!(r=n()).done;){var r=r.value;if(t=this.values[r],r=e.values[r],!(void 0===t||0===t?void 0===r||0===r:t===r))return!1}return!0},_createClass(f,[{key:"locale",get:function(){return this.isValid?this.loc.locale:null}},{key:"numberingSystem",get:function(){return this.isValid?this.loc.numberingSystem:null}},{key:"years",get:function(){return this.isValid?this.values.years||0:NaN}},{key:"quarters",get:function(){return this.isValid?this.values.quarters||0:NaN}},{key:"months",get:function(){return this.isValid?this.values.months||0:NaN}},{key:"weeks",get:function(){return this.isValid?this.values.weeks||0:NaN}},{key:"days",get:function(){return this.isValid?this.values.days||0:NaN}},{key:"hours",get:function(){return this.isValid?this.values.hours||0:NaN}},{key:"minutes",get:function(){return this.isValid?this.values.minutes||0:NaN}},{key:"seconds",get:function(){return this.isValid?this.values.seconds||0:NaN}},{key:"milliseconds",get:function(){return this.isValid?this.values.milliseconds||0:NaN}},{key:"isValid",get:function(){return null===this.invalid}},{key:"invalidReason",get:function(){return this.invalid?this.invalid.reason:null}},{key:"invalidExplanation",get:function(){return this.invalid?this.invalid.explanation:null}}]),f}();function friendlyDuration(e){if(isNumber(e))return Duration.fromMillis(e);if(Duration.isDuration(e))return e;if("object"==typeof e)return Duration.fromObject(e);throw new InvalidArgumentError("Unknown duration argument "+e+" of type "+typeof e)}var INVALID$1="Invalid Interval";function validateStartEnd(e,t){return e&&e.isValid?t&&t.isValid?t<e?Interval.invalid("end before start","The end of an interval must be after its start, but you had start="+e.toISO()+" and end="+t.toISO()):null:Interval.invalid("missing or invalid end"):Interval.invalid("missing or invalid start")}var Interval=function(){function c(e){this.s=e.start,this.e=e.end,this.invalid=e.invalid||null,this.isLuxonInterval=!0}c.invalid=function(e,t){if(void 0===t&&(t=null),!e)throw new InvalidArgumentError("need to specify a reason the Interval is invalid");e=e instanceof Invalid?e:new Invalid(e,t);if(Settings.throwOnInvalid)throw new InvalidIntervalError(e);return new c({invalid:e})},c.fromDateTimes=function(e,t){var e=friendlyDateTime(e),t=friendlyDateTime(t),n=validateStartEnd(e,t);return null==n?new c({start:e,end:t}):n},c.after=function(e,t){t=friendlyDuration(t),e=friendlyDateTime(e);return c.fromDateTimes(e,e.plus(t))},c.before=function(e,t){t=friendlyDuration(t),e=friendlyDateTime(e);return c.fromDateTimes(e.minus(t),e)},c.fromISO=function(e,t){var n,r,i,s=(e||"").split("/",2),o=s[0],a=s[1];if(o&&a){try{l=(n=DateTime.fromISO(o,t)).isValid}catch(a){l=!1}try{i=(r=DateTime.fromISO(a,t)).isValid}catch(a){i=!1}if(l&&i)return c.fromDateTimes(n,r);if(l){s=Duration.fromISO(a,t);if(s.isValid)return c.after(n,s)}else if(i){var l=Duration.fromISO(o,t);if(l.isValid)return c.before(r,l)}}return c.invalid("unparsable",'the input "'+e+"\" can't be parsed as ISO 8601")},c.isInterval=function(e){return e&&e.isLuxonInterval||!1};var e=c.prototype;return e.length=function(e){return void 0===e&&(e="milliseconds"),this.isValid?this.toDuration.apply(this,[e]).get(e):NaN},e.count=function(e){if(!this.isValid)return NaN;var t=this.start.startOf(e=void 0===e?"milliseconds":e),n=this.end.startOf(e);return Math.floor(n.diff(t,e).get(e))+1},e.hasSame=function(e){return!!this.isValid&&(this.isEmpty()||this.e.minus(1).hasSame(this.s,e))},e.isEmpty=function(){return this.s.valueOf()===this.e.valueOf()},e.isAfter=function(e){return!!this.isValid&&this.s>e},e.isBefore=function(e){return!!this.isValid&&this.e<=e},e.contains=function(e){return!!this.isValid&&(this.s<=e&&this.e>e)},e.set=function(e){var e=void 0===e?{}:e,t=e.start,e=e.end;return this.isValid?c.fromDateTimes(t||this.s,e||this.e):this},e.splitAt=function(){var t=this;if(!this.isValid)return[];for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];for(var i=n.map(friendlyDateTime).filter(function(e){return t.contains(e)}).sort(),s=[],o=this.s,a=0;o<this.e;){var l=i[a]||this.e,l=+l>+this.e?this.e:l;s.push(c.fromDateTimes(o,l)),o=l,a+=1}return s},e.splitBy=function(e){var t=friendlyDuration(e);if(!this.isValid||!t.isValid||0===t.as("milliseconds"))return[];for(var n=this.s,r=1,i=[];n<this.e;){var s=this.start.plus(t.mapUnits(function(e){return e*r})),s=+s>+this.e?this.e:s;i.push(c.fromDateTimes(n,s)),n=s,r+=1}return i},e.divideEqually=function(e){return this.isValid?this.splitBy(this.length()/e).slice(0,e):[]},e.overlaps=function(e){return this.e>e.s&&this.s<e.e},e.abutsStart=function(e){return!!this.isValid&&+this.e==+e.s},e.abutsEnd=function(e){return!!this.isValid&&+e.e==+this.s},e.engulfs=function(e){return!!this.isValid&&(this.s<=e.s&&this.e>=e.e)},e.equals=function(e){return!(!this.isValid||!e.isValid)&&(this.s.equals(e.s)&&this.e.equals(e.e))},e.intersection=function(e){if(!this.isValid)return this;var t=(this.s>e.s?this:e).s,e=(this.e<e.e?this:e).e;return e<=t?null:c.fromDateTimes(t,e)},e.union=function(e){if(!this.isValid)return this;var t=(this.s<e.s?this:e).s,e=(this.e>e.e?this:e).e;return c.fromDateTimes(t,e)},c.merge=function(e){var e=e.sort(function(e,t){return e.s-t.s}).reduce(function(e,t){var n=e[0],e=e[1];return e?e.overlaps(t)||e.abutsStart(t)?[n,e.union(t)]:[n.concat([e]),t]:[n,t]},[[],null]),t=e[0],e=e[1];return e&&t.push(e),t},c.xor=function(e){for(var t,n=null,r=0,i=[],e=e.map(function(e){return[{time:e.s,type:"s"},{time:e.e,type:"e"}]}),s=_createForOfIteratorHelperLoose((t=Array.prototype).concat.apply(t,e).sort(function(e,t){return e.time-t.time}));!(o=s()).done;)var o=o.value,n=1===(r+="s"===o.type?1:-1)?o.time:(n&&+n!=+o.time&&i.push(c.fromDateTimes(n,o.time)),null);return c.merge(i)},e.difference=function(){for(var t=this,e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return c.xor([this].concat(n)).map(function(e){return t.intersection(e)}).filter(function(e){return e&&!e.isEmpty()})},e.toString=function(){return this.isValid?"["+this.s.toISO()+" – "+this.e.toISO()+")":INVALID$1},e.toISO=function(e){return this.isValid?this.s.toISO(e)+"/"+this.e.toISO(e):INVALID$1},e.toISODate=function(){return this.isValid?this.s.toISODate()+"/"+this.e.toISODate():INVALID$1},e.toISOTime=function(e){return this.isValid?this.s.toISOTime(e)+"/"+this.e.toISOTime(e):INVALID$1},e.toFormat=function(e,t){t=(void 0===t?{}:t).separator,t=void 0===t?" – ":t;return this.isValid?""+this.s.toFormat(e)+t+this.e.toFormat(e):INVALID$1},e.toDuration=function(e,t){return this.isValid?this.e.diff(this.s,e,t):Duration.invalid(this.invalidReason)},e.mapEndpoints=function(e){return c.fromDateTimes(e(this.s),e(this.e))},_createClass(c,[{key:"start",get:function(){return this.isValid?this.s:null}},{key:"end",get:function(){return this.isValid?this.e:null}},{key:"isValid",get:function(){return null===this.invalidReason}},{key:"invalidReason",get:function(){return this.invalid?this.invalid.reason:null}},{key:"invalidExplanation",get:function(){return this.invalid?this.invalid.explanation:null}}]),c}(),Info=function(){function e(){}return e.hasDST=function(e){void 0===e&&(e=Settings.defaultZone);var t=DateTime.now().setZone(e).set({month:12});return!e.universal&&t.offset!==t.set({month:6}).offset},e.isValidIANAZone=function(e){return IANAZone.isValidSpecifier(e)&&IANAZone.isValidZone(e)},e.normalizeZone=function(e){return normalizeZone(e,Settings.defaultZone)},e.months=function(e,t){void 0===e&&(e="long");var t=void 0===t?{}:t,n=t.locale,r=t.numberingSystem,i=t.locObj,i=void 0===i?null:i,t=t.outputCalendar;return(i||Locale.create(void 0===n?null:n,void 0===r?null:r,void 0===t?"gregory":t)).months(e)},e.monthsFormat=function(e,t){void 0===e&&(e="long");var t=void 0===t?{}:t,n=t.locale,r=t.numberingSystem,i=t.locObj,i=void 0===i?null:i,t=t.outputCalendar;return(i||Locale.create(void 0===n?null:n,void 0===r?null:r,void 0===t?"gregory":t)).months(e,!0)},e.weekdays=function(e,t){void 0===e&&(e="long");var t=void 0===t?{}:t,n=t.locale,r=t.numberingSystem,t=t.locObj;return((void 0===t?null:t)||Locale.create(void 0===n?null:n,void 0===r?null:r,null)).weekdays(e)},e.weekdaysFormat=function(e,t){void 0===e&&(e="long");var t=void 0===t?{}:t,n=t.locale,r=t.numberingSystem,t=t.locObj;return((void 0===t?null:t)||Locale.create(void 0===n?null:n,void 0===r?null:r,null)).weekdays(e,!0)},e.meridiems=function(e){e=(void 0===e?{}:e).locale;return Locale.create(void 0===e?null:e).meridiems()},e.eras=function(e,t){void 0===e&&(e="short");t=(void 0===t?{}:t).locale;return Locale.create(void 0===t?null:t,null,"gregory").eras(e)},e.features=function(){var e=!1,t=!1,n=!1,r=!1;if(hasIntl()){e=!0,t=hasFormatToParts(),r=hasRelative();try{n="America/New_York"===new Intl.DateTimeFormat("en",{timeZone:"America/New_York"}).resolvedOptions().timeZone}catch(e){n=!1}}return{intl:e,intlTokens:t,zones:n,relative:r}},e}();function dayDiff(e,t){function n(e){return e.toUTC(0,{keepLocalTime:!0}).startOf("day").valueOf()}t=n(t)-n(e);return Math.floor(Duration.fromMillis(t).as("days"))}function highOrderDiffs(e,t,n){for(var r={},i=0,s=[["years",function(e,t){return t.year-e.year}],["quarters",function(e,t){return t.quarter-e.quarter}],["months",function(e,t){return t.month-e.month+12*(t.year-e.year)}],["weeks",function(e,t){e=dayDiff(e,t);return(e-e%7)/7}],["days",dayDiff]];i<s.length;i++){var o,a,l,c=s[i],u=c[0],c=c[1];0<=n.indexOf(u)&&(o=u,c=c(e,t),t<(l=e.plus(((a={})[u]=c,a)))?(e=e.plus(((a={})[u]=c-1,a)),--c):e=l,r[u]=c)}return[e,r,l,o]}function _diff(e,t,n,r){var e=highOrderDiffs(e,t,n),i=e[0],s=e[1],o=e[2],e=e[3],a=t-i,n=n.filter(function(e){return 0<=["hours","minutes","seconds","milliseconds"].indexOf(e)}),t=(0===n.length&&(o=o<t?i.plus(((t={})[e]=1,t)):o)!==i&&(s[e]=(s[e]||0)+a/(o-i)),Duration.fromObject(Object.assign(s,r)));return 0<n.length?(e=Duration.fromMillis(a,r)).shiftTo.apply(e,n).plus(t):t}var numberingSystems={arab:"[٠-٩]",arabext:"[۰-۹]",bali:"[᭐-᭙]",beng:"[০-৯]",deva:"[०-९]",fullwide:"[0-9]",gujr:"[૦-૯]",hanidec:"[〇|一|二|三|四|五|六|七|八|九]",khmr:"[០-៩]",knda:"[೦-೯]",laoo:"[໐-໙]",limb:"[᥆-᥏]",mlym:"[൦-൯]",mong:"[᠐-᠙]",mymr:"[၀-၉]",orya:"[୦-୯]",tamldec:"[௦-௯]",telu:"[౦-౯]",thai:"[๐-๙]",tibt:"[༠-༩]",latn:"\\d"},numberingSystemsUTF16={arab:[1632,1641],arabext:[1776,1785],bali:[6992,7001],beng:[2534,2543],deva:[2406,2415],fullwide:[65296,65303],gujr:[2790,2799],khmr:[6112,6121],knda:[3302,3311],laoo:[3792,3801],limb:[6470,6479],mlym:[3430,3439],mong:[6160,6169],mymr:[4160,4169],orya:[2918,2927],tamldec:[3046,3055],telu:[3174,3183],thai:[3664,3673],tibt:[3872,3881]},hanidecChars=numberingSystems.hanidec.replace(/[\[|\]]/g,"").split("");function parseDigits(e){var t=parseInt(e,10);if(isNaN(t)){for(var t="",n=0;n<e.length;n++){var r=e.charCodeAt(n);if(-1!==e[n].search(numberingSystems.hanidec))t+=hanidecChars.indexOf(e[n]);else for(var i in numberingSystemsUTF16){var i=numberingSystemsUTF16[i],s=i[0],i=i[1];s<=r&&r<=i&&(t+=r-s)}}return parseInt(t,10)}return t}function digitRegex(e,t){e=e.numberingSystem;return void 0===t&&(t=""),new RegExp(""+numberingSystems[e||"latn"]+t)}var MISSING_FTP="missing Intl.DateTimeFormat.formatToParts support";function intUnit(e,t){return void 0===t&&(t=function(e){return e}),{regex:e,deser:function(e){e=e[0];return t(parseDigits(e))}}}var NBSP=String.fromCharCode(160),spaceOrNBSP="( |"+NBSP+")",spaceOrNBSPRegExp=new RegExp(spaceOrNBSP,"g");function fixListRegex(e){return e.replace(/\./g,"\\.?").replace(spaceOrNBSPRegExp,spaceOrNBSP)}function stripInsensitivities(e){return e.replace(/\./g,"").replace(spaceOrNBSPRegExp," ").toLowerCase()}function oneOf(n,r){return null===n?null:{regex:RegExp(n.map(fixListRegex).join("|")),deser:function(e){var t=e[0];return n.findIndex(function(e){return stripInsensitivities(t)===stripInsensitivities(e)})+r}}}function offset(e,t){return{regex:e,deser:function(e){return signedOffset(e[1],e[2])},groups:t}}function simple(e){return{regex:e,deser:function(e){return e[0]}}}function escapeToken(e){return e.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}function unitForToken(t,n){function r(e){return{regex:RegExp(escapeToken(e.val)),deser:function(e){return e[0]},literal:!0}}var i=digitRegex(n),s=digitRegex(n,"{2}"),o=digitRegex(n,"{3}"),a=digitRegex(n,"{4}"),l=digitRegex(n,"{6}"),c=digitRegex(n,"{1,2}"),u=digitRegex(n,"{1,3}"),d=digitRegex(n,"{1,6}"),m=digitRegex(n,"{1,9}"),p=digitRegex(n,"{2,4}"),f=digitRegex(n,"{4,6}"),e=function(e){if(t.literal)return r(e);switch(e.val){case"G":return oneOf(n.eras("short",!1),0);case"GG":return oneOf(n.eras("long",!1),0);case"y":return intUnit(d);case"yy":return intUnit(p,untruncateYear);case"yyyy":return intUnit(a);case"yyyyy":return intUnit(f);case"yyyyyy":return intUnit(l);case"M":return intUnit(c);case"MM":return intUnit(s);case"MMM":return oneOf(n.months("short",!0,!1),1);case"MMMM":return oneOf(n.months("long",!0,!1),1);case"L":return intUnit(c);case"LL":return intUnit(s);case"LLL":return oneOf(n.months("short",!1,!1),1);case"LLLL":return oneOf(n.months("long",!1,!1),1);case"d":return intUnit(c);case"dd":return intUnit(s);case"o":return intUnit(u);case"ooo":return intUnit(o);case"HH":return intUnit(s);case"H":return intUnit(c);case"hh":return intUnit(s);case"h":return intUnit(c);case"mm":return intUnit(s);case"m":case"q":return intUnit(c);case"qq":return intUnit(s);case"s":return intUnit(c);case"ss":return intUnit(s);case"S":return intUnit(u);case"SSS":return intUnit(o);case"u":return simple(m);case"a":return oneOf(n.meridiems(),0);case"kkkk":return intUnit(a);case"kk":return intUnit(p,untruncateYear);case"W":return intUnit(c);case"WW":return intUnit(s);case"E":case"c":return intUnit(i);case"EEE":return oneOf(n.weekdays("short",!1,!1),1);case"EEEE":return oneOf(n.weekdays("long",!1,!1),1);case"ccc":return oneOf(n.weekdays("short",!0,!1),1);case"cccc":return oneOf(n.weekdays("long",!0,!1),1);case"Z":case"ZZ":return offset(new RegExp("([+-]"+c.source+")(?::("+s.source+"))?"),2);case"ZZZ":return offset(new RegExp("([+-]"+c.source+")("+s.source+")?"),2);case"z":return simple(/[a-z_+-/]{1,256}?/i);default:return r(e)}}(t)||{invalidReason:MISSING_FTP};return e.token=t,e}var partTypeStyleToTokenVal={year:{"2-digit":"yy",numeric:"yyyyy"},month:{numeric:"M","2-digit":"MM",short:"MMM",long:"MMMM"},day:{numeric:"d","2-digit":"dd"},weekday:{short:"EEE",long:"EEEE"},dayperiod:"a",dayPeriod:"a",hour:{numeric:"h","2-digit":"hh"},minute:{numeric:"m","2-digit":"mm"},second:{numeric:"s","2-digit":"ss"}};function tokenForPart(e,t,n){var r=e.type,e=e.value;if("literal"===r)return{literal:!0,val:e};e=n[r],n=partTypeStyleToTokenVal[r];return(n="object"==typeof n?n[e]:n)?{literal:!1,val:n}:void 0}function buildRegex(e){return["^"+e.map(function(e){return e.regex}).reduce(function(e,t){return e+"("+t.source+")"},"")+"$",e]}function match(e,t,n){var r=e.match(t);if(r){var i,s,o,a={},l=1;for(i in n)hasOwnProperty(n,i)&&(o=(s=n[i]).groups?s.groups+1:1,!s.literal&&s.token&&(a[s.token.val[0]]=s.deser(r.slice(l,l+o))),l+=o);return[r,a]}return[r,{}]}function dateTimeFromMatches(r){var e=isUndefined(r.Z)?isUndefined(r.z)?null:IANAZone.create(r.z):new FixedOffsetZone(r.Z);return isUndefined(r.q)||(r.M=3*(r.q-1)+1),isUndefined(r.h)||(r.h<12&&1===r.a?r.h+=12:12===r.h&&0===r.a&&(r.h=0)),0===r.G&&r.y&&(r.y=-r.y),isUndefined(r.u)||(r.S=parseMillis(r.u)),[Object.keys(r).reduce(function(e,t){var n=function(e){switch(e){case"S":return"millisecond";case"s":return"second";case"m":return"minute";case"h":case"H":return"hour";case"d":return"day";case"o":return"ordinal";case"L":case"M":return"month";case"y":return"year";case"E":case"c":return"weekday";case"W":return"weekNumber";case"k":return"weekYear";case"q":return"quarter";default:return null}}(t);return n&&(e[n]=r[t]),e},{}),e]}var dummyDateTimeCache=null;function getDummyDateTime(){return dummyDateTimeCache=dummyDateTimeCache||DateTime.fromMillis(1555555555555)}function maybeExpandMacroToken(e,t){if(e.literal)return e;var n=Formatter.macroTokenToFormatOpts(e.val);if(!n)return e;var r=Formatter.create(t,n).formatDateTimeParts(getDummyDateTime()).map(function(e){return tokenForPart(e,t,n)});return r.includes(void 0)?e:r}function expandMacroTokens(e,t){var n;return(n=Array.prototype).concat.apply(n,e.map(function(e){return maybeExpandMacroToken(e,t)}))}function explainFromTokens(t,e,n){var n=expandMacroTokens(Formatter.parseFormat(n),t),r=n.map(function(e){return unitForToken(e,t)}),i=r.find(function(e){return e.invalidReason});if(i)return{input:e,tokens:n,invalidReason:i.invalidReason};var i=buildRegex(r),r=i[0],i=i[1],r=RegExp(r,"i"),i=match(e,r,i),s=i[0],i=i[1],o=i?dateTimeFromMatches(i):[null,null],a=o[0],o=o[1];if(hasOwnProperty(i,"a")&&hasOwnProperty(i,"H"))throw new ConflictingSpecificationError("Can't include meridiem when specifying 24-hour format");return{input:e,tokens:n,regex:r,rawMatches:s,matches:i,result:a,zone:o}}function parseFromTokens(e,t,n){e=explainFromTokens(e,t,n);return[e.result,e.zone,e.invalidReason]}var nonLeapLadder=[0,31,59,90,120,151,181,212,243,273,304,334],leapLadder=[0,31,60,91,121,152,182,213,244,274,305,335];function unitOutOfRange(e,t){return new Invalid("unit out of range","you specified "+t+" (of type "+typeof t+") as a "+e+", which is invalid")}function dayOfWeek(e,t,n){e=new Date(Date.UTC(e,t-1,n)).getUTCDay();return 0===e?7:e}function computeOrdinal(e,t,n){return n+(isLeapYear(e)?leapLadder:nonLeapLadder)[t-1]}function uncomputeOrdinal(e,t){var e=isLeapYear(e)?leapLadder:nonLeapLadder,n=e.findIndex(function(e){return e<t});return{month:n+1,day:t-e[n]}}function gregorianToWeek(e){var t,n=e.year,r=e.month,i=e.day,s=computeOrdinal(n,r,i),r=dayOfWeek(n,r,i),i=Math.floor((s-r+10)/7);return i<1?i=weeksInWeekYear(t=n-1):i>weeksInWeekYear(n)?(t=n+1,i=1):t=n,Object.assign({weekYear:t,weekNumber:i,weekday:r},timeObject(e))}function weekToGregorian(e){var t,n=e.weekYear,r=e.weekNumber,i=e.weekday,s=dayOfWeek(n,1,4),o=daysInYear(n),r=7*r+i-s-3,i=(r<1?r+=daysInYear(t=n-1):o<r?(t=n+1,r-=daysInYear(n)):t=n,uncomputeOrdinal(t,r)),s=i.month,o=i.day;return Object.assign({year:t,month:s,day:o},timeObject(e))}function gregorianToOrdinal(e){var t=e.year,n=computeOrdinal(t,e.month,e.day);return Object.assign({year:t,ordinal:n},timeObject(e))}function ordinalToGregorian(e){var t=e.year,n=uncomputeOrdinal(t,e.ordinal),r=n.month,n=n.day;return Object.assign({year:t,month:r,day:n},timeObject(e))}function hasInvalidWeekData(e){var t=isInteger(e.weekYear),n=integerBetween(e.weekNumber,1,weeksInWeekYear(e.weekYear)),r=integerBetween(e.weekday,1,7);return t?n?!r&&unitOutOfRange("weekday",e.weekday):unitOutOfRange("week",e.week):unitOutOfRange("weekYear",e.weekYear)}function hasInvalidOrdinalData(e){var t=isInteger(e.year),n=integerBetween(e.ordinal,1,daysInYear(e.year));return t?!n&&unitOutOfRange("ordinal",e.ordinal):unitOutOfRange("year",e.year)}function hasInvalidGregorianData(e){var t=isInteger(e.year),n=integerBetween(e.month,1,12),r=integerBetween(e.day,1,daysInMonth(e.year,e.month));return t?n?!r&&unitOutOfRange("day",e.day):unitOutOfRange("month",e.month):unitOutOfRange("year",e.year)}function hasInvalidTimeData(e){var t=e.hour,n=e.minute,r=e.second,e=e.millisecond,i=integerBetween(t,0,23)||24===t&&0===n&&0===r&&0===e,s=integerBetween(n,0,59),o=integerBetween(r,0,59),a=integerBetween(e,0,999);return i?s?o?!a&&unitOutOfRange("millisecond",e):unitOutOfRange("second",r):unitOutOfRange("minute",n):unitOutOfRange("hour",t)}var INVALID$2="Invalid DateTime",MAX_DATE=864e13;function unsupportedZone(e){return new Invalid("unsupported zone",'the zone "'+e.name+'" is not supported')}function possiblyCachedWeekData(e){return null===e.weekData&&(e.weekData=gregorianToWeek(e.c)),e.weekData}function clone$1(e,t){e={ts:e.ts,zone:e.zone,c:e.c,o:e.o,loc:e.loc,invalid:e.invalid};return new DateTime(Object.assign({},e,t,{old:e}))}function fixOffset(e,t,n){var r=e-60*t*1e3,i=n.offset(r);if(t===i)return[r,t];n=n.offset(r-=60*(i-t)*1e3);return i===n?[r,i]:[e-60*Math.min(i,n)*1e3,Math.max(i,n)]}function tsToObj(e,t){e+=60*t*1e3;t=new Date(e);return{year:t.getUTCFullYear(),month:t.getUTCMonth()+1,day:t.getUTCDate(),hour:t.getUTCHours(),minute:t.getUTCMinutes(),second:t.getUTCSeconds(),millisecond:t.getUTCMilliseconds()}}function objToTS(e,t,n){return fixOffset(objToLocalTS(e),t,n)}function adjustTime(e,t){var n=e.o,r=e.c.year+Math.trunc(t.years),i=e.c.month+Math.trunc(t.months)+3*Math.trunc(t.quarters),r=Object.assign({},e.c,{year:r,month:i,day:Math.min(e.c.day,daysInMonth(r,i))+Math.trunc(t.days)+7*Math.trunc(t.weeks)}),i=Duration.fromObject({years:t.years-Math.trunc(t.years),quarters:t.quarters-Math.trunc(t.quarters),months:t.months-Math.trunc(t.months),weeks:t.weeks-Math.trunc(t.weeks),days:t.days-Math.trunc(t.days),hours:t.hours,minutes:t.minutes,seconds:t.seconds,milliseconds:t.milliseconds}).as("milliseconds"),t=fixOffset(objToLocalTS(r),n,e.zone),r=t[0],n=t[1];return 0!==i&&(n=e.zone.offset(r+=i)),{ts:r,o:n}}function parseDataToDateTime(e,t,n,r,i){var s=n.setZone,o=n.zone;return e&&0!==Object.keys(e).length?(e=DateTime.fromObject(Object.assign(e,n,{zone:t||o,setZone:void 0})),s?e:e.setZone(o)):DateTime.invalid(new Invalid("unparsable",'the input "'+i+"\" can't be parsed as "+r))}function toTechFormat(e,t,n){return void 0===n&&(n=!0),e.isValid?Formatter.create(Locale.create("en-US"),{allowZ:n,forceSimple:!0}).formatDateTimeFromString(e,t):null}function toTechTimeFormat(e,t){var n=t.suppressSeconds,r=t.suppressMilliseconds,i=t.includeOffset,s=t.includePrefix,s=void 0!==s&&s,o=t.includeZone,o=void 0!==o&&o,a=t.spaceZone,t=t.format,t=void 0===t?"extended":t,l="basic"===t?"HHmm":"HH:mm",n=(void 0!==n&&n&&0===e.second&&0===e.millisecond||(l+="basic"===t?"ss":":ss",void 0!==r&&r&&0===e.millisecond||(l+=".SSS")),(o||i)&&(void 0!==a&&a)&&(l+=" "),o?l+="z":i&&(l+="basic"===t?"ZZZ":"ZZ"),toTechFormat(e,l));return n=s?"T"+n:n}var defaultUnitValues={month:1,day:1,hour:0,minute:0,second:0,millisecond:0},defaultWeekUnitValues={weekNumber:1,weekday:1,hour:0,minute:0,second:0,millisecond:0},defaultOrdinalUnitValues={ordinal:1,hour:0,minute:0,second:0,millisecond:0},orderedUnits$1=["year","month","day","hour","minute","second","millisecond"],orderedWeekUnits=["weekYear","weekNumber","weekday","hour","minute","second","millisecond"],orderedOrdinalUnits=["year","ordinal","hour","minute","second","millisecond"];function normalizeUnit(e){var t={year:"year",years:"year",month:"month",months:"month",day:"day",days:"day",hour:"hour",hours:"hour",minute:"minute",minutes:"minute",quarter:"quarter",quarters:"quarter",second:"second",seconds:"second",millisecond:"millisecond",milliseconds:"millisecond",weekday:"weekday",weekdays:"weekday",weeknumber:"weekNumber",weeksnumber:"weekNumber",weeknumbers:"weekNumber",weekyear:"weekYear",weekyears:"weekYear",ordinal:"ordinal"}[e.toLowerCase()];if(t)return t;throw new InvalidUnitError(e)}function quickDT(e,t){for(var n=_createForOfIteratorHelperLoose(orderedUnits$1);!(r=n()).done;){var r=r.value;isUndefined(e[r])&&(e[r]=defaultUnitValues[r])}var i=hasInvalidGregorianData(e)||hasInvalidTimeData(e);if(i)return DateTime.invalid(i);var i=Settings.now(),i=objToTS(e,t.offset(i),t),s=i[0],i=i[1];return new DateTime({ts:s,zone:t,o:i})}function diffRelative(t,n,r){function e(e,t){return e=roundTo(e,s||r.calendary?0:2,!0),n.loc.clone(r).relFormatter(r).format(e,t)}function i(e){return r.calendary?n.hasSame(t,e)?0:n.startOf(e).diff(t.startOf(e),e).get(e):n.diff(t,e).get(e)}var s=!!isUndefined(r.round)||r.round;if(r.unit)return e(i(r.unit),r.unit);for(var o=_createForOfIteratorHelperLoose(r.units);!(a=o()).done;){var a=a.value,l=i(a);if(1<=Math.abs(l))return e(l,a)}return e(n<t?-0:0,r.units[r.units.length-1])}var DateTime=function(){function g(e){var t,n=e.zone||Settings.defaultZone,r=e.invalid||(Number.isNaN(e.ts)?new Invalid("invalid input"):null)||(n.isValid?null:unsupportedZone(n)),i=(this.ts=isUndefined(e.ts)?Settings.now():e.ts,null),s=null;r||(s=e.old&&e.old.ts===this.ts&&e.old.zone.equals(n)?(i=(t=[e.old.c,e.old.o])[0],t[1]):(t=n.offset(this.ts),i=tsToObj(this.ts,t),i=(r=Number.isNaN(i.year)?new Invalid("invalid input"):null)?null:i,r?null:t)),this._zone=n,this.loc=e.loc||Locale.create(),this.invalid=r,this.weekData=null,this.c=i,this.o=s,this.isLuxonDateTime=!0}g.now=function(){return new g({})},g.local=function(e,t,n,r,i,s,o){return isUndefined(e)?g.now():quickDT({year:e,month:t,day:n,hour:r,minute:i,second:s,millisecond:o},Settings.defaultZone)},g.utc=function(e,t,n,r,i,s,o){return isUndefined(e)?new g({ts:Settings.now(),zone:FixedOffsetZone.utcInstance}):quickDT({year:e,month:t,day:n,hour:r,minute:i,second:s,millisecond:o},FixedOffsetZone.utcInstance)},g.fromJSDate=function(e,t){void 0===t&&(t={});e=isDate(e)?e.valueOf():NaN;if(Number.isNaN(e))return g.invalid("invalid input");var n=normalizeZone(t.zone,Settings.defaultZone);return n.isValid?new g({ts:e,zone:n,loc:Locale.fromObject(t)}):g.invalid(unsupportedZone(n))},g.fromMillis=function(e,t){if(void 0===t&&(t={}),isNumber(e))return e<-MAX_DATE||MAX_DATE<e?g.invalid("Timestamp out of range"):new g({ts:e,zone:normalizeZone(t.zone,Settings.defaultZone),loc:Locale.fromObject(t)});throw new InvalidArgumentError("fromMillis requires a numerical input, but received a "+typeof e+" with value "+e)},g.fromSeconds=function(e,t){if(void 0===t&&(t={}),isNumber(e))return new g({ts:1e3*e,zone:normalizeZone(t.zone,Settings.defaultZone),loc:Locale.fromObject(t)});throw new InvalidArgumentError("fromSeconds requires a numerical input")},g.fromObject=function(e){var t=normalizeZone(e.zone,Settings.defaultZone);if(!t.isValid)return g.invalid(unsupportedZone(t));var n=Settings.now(),r=t.offset(n),i=normalizeObject(e,normalizeUnit,["zone","locale","outputCalendar","numberingSystem"]),s=!isUndefined(i.ordinal),o=!isUndefined(i.year),a=!isUndefined(i.month)||!isUndefined(i.day),o=o||a,l=i.weekYear||i.weekNumber,c=Locale.fromObject(e);if((o||s)&&l)throw new ConflictingSpecificationError("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(a&&s)throw new ConflictingSpecificationError("Can't mix ordinal dates with month/day");for(var u,a=l||i.weekday&&!o,d=tsToObj(n,r),m=(a?(h=orderedWeekUnits,u=defaultWeekUnitValues,d=gregorianToWeek(d)):s?(h=orderedOrdinalUnits,u=defaultOrdinalUnitValues,d=gregorianToOrdinal(d)):(h=orderedUnits$1,u=defaultUnitValues),!1),p=_createForOfIteratorHelperLoose(h);!(f=p()).done;){var f=f.value;isUndefined(i[f])?i[f]=(m?u:d)[f]:m=!0}l=(a?hasInvalidWeekData:s?hasInvalidOrdinalData:hasInvalidGregorianData)(i)||hasInvalidTimeData(i);if(l)return g.invalid(l);var n=objToTS(a?weekToGregorian(i):s?ordinalToGregorian(i):i,r,t),h=new g({ts:n[0],zone:t,o:n[1],loc:c});return i.weekday&&o&&e.weekday!==h.weekday?g.invalid("mismatched weekday","you can't specify both a weekday of "+i.weekday+" and a date of "+h.toISO()):h},g.fromISO=function(e,t){void 0===t&&(t={});var n=parseISODate(e);return parseDataToDateTime(n[0],n[1],t,"ISO 8601",e)},g.fromRFC2822=function(e,t){void 0===t&&(t={});var n=parseRFC2822Date(e);return parseDataToDateTime(n[0],n[1],t,"RFC 2822",e)},g.fromHTTP=function(e,t){void 0===t&&(t={});e=parseHTTPDate(e);return parseDataToDateTime(e[0],e[1],t,"HTTP",t)},g.fromFormat=function(e,t,n){if(void 0===n&&(n={}),isUndefined(e)||isUndefined(t))throw new InvalidArgumentError("fromFormat requires an input string and a format");var r=n,i=r.locale,r=r.numberingSystem,i=parseFromTokens(Locale.fromOpts({locale:void 0===i?null:i,numberingSystem:void 0===r?null:r,defaultToEN:!0}),e,t),r=i[0],s=i[1],i=i[2];return i?g.invalid(i):parseDataToDateTime(r,s,n,"format "+t,e)},g.fromString=function(e,t,n){return g.fromFormat(e,t,n=void 0===n?{}:n)},g.fromSQL=function(e,t){void 0===t&&(t={});var n=parseSQL(e);return parseDataToDateTime(n[0],n[1],t,"SQL",e)},g.invalid=function(e,t){if(void 0===t&&(t=null),!e)throw new InvalidArgumentError("need to specify a reason the DateTime is invalid");e=e instanceof Invalid?e:new Invalid(e,t);if(Settings.throwOnInvalid)throw new InvalidDateTimeError(e);return new g({invalid:e})},g.isDateTime=function(e){return e&&e.isLuxonDateTime||!1};var e=g.prototype;return e.get=function(e){return this[e]},e.resolvedLocaleOpts=function(e){e=Formatter.create(this.loc.clone(e=void 0===e?{}:e),e).resolvedOptions(this);return{locale:e.locale,numberingSystem:e.numberingSystem,outputCalendar:e.calendar}},e.toUTC=function(e,t){return void 0===t&&(t={}),this.setZone(FixedOffsetZone.instance(e=void 0===e?0:e),t)},e.toLocal=function(){return this.setZone(Settings.defaultZone)},e.setZone=function(e,t){var n,t=void 0===t?{}:t,r=t.keepLocalTime,r=void 0!==r&&r,t=t.keepCalendarTime,t=void 0!==t&&t;return(e=normalizeZone(e,Settings.defaultZone)).equals(this.zone)?this:e.isValid?(n=this.ts,(r||t)&&(r=e.offset(this.ts),n=objToTS(this.toObject(),r,e)[0]),clone$1(this,{ts:n,zone:e})):g.invalid(unsupportedZone(e))},e.reconfigure=function(e){var e=void 0===e?{}:e,t=e.locale,n=e.numberingSystem,e=e.outputCalendar,t=this.loc.clone({locale:t,numberingSystem:n,outputCalendar:e});return clone$1(this,{loc:t})},e.setLocale=function(e){return this.reconfigure({locale:e})},e.set=function(e){if(!this.isValid)return this;var t,e=normalizeObject(e,normalizeUnit,[]),n=!isUndefined(e.weekYear)||!isUndefined(e.weekNumber)||!isUndefined(e.weekday),r=!isUndefined(e.ordinal),i=!isUndefined(e.year),s=!isUndefined(e.month)||!isUndefined(e.day),o=e.weekYear||e.weekNumber;if((i||s||r)&&o)throw new ConflictingSpecificationError("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(s&&r)throw new ConflictingSpecificationError("Can't mix ordinal dates with month/day");n?t=weekToGregorian(Object.assign(gregorianToWeek(this.c),e)):isUndefined(e.ordinal)?(t=Object.assign(this.toObject(),e),isUndefined(e.day)&&(t.day=Math.min(daysInMonth(t.year,t.month),t.day))):t=ordinalToGregorian(Object.assign(gregorianToOrdinal(this.c),e));i=objToTS(t,this.o,this.zone);return clone$1(this,{ts:i[0],o:i[1]})},e.plus=function(e){return this.isValid?clone$1(this,adjustTime(this,friendlyDuration(e))):this},e.minus=function(e){return this.isValid?clone$1(this,adjustTime(this,friendlyDuration(e).negate())):this},e.startOf=function(e){if(!this.isValid)return this;var t={},e=Duration.normalizeUnit(e);switch(e){case"years":t.month=1;case"quarters":case"months":t.day=1;case"weeks":case"days":t.hour=0;case"hours":t.minute=0;case"minutes":t.second=0;case"seconds":t.millisecond=0}return"weeks"===e&&(t.weekday=1),"quarters"===e&&(e=Math.ceil(this.month/3),t.month=3*(e-1)+1),this.set(t)},e.endOf=function(e){var t;return this.isValid?this.plus(((t={})[e]=1,t)).startOf(e).minus(1):this},e.toFormat=function(e,t){return void 0===t&&(t={}),this.isValid?Formatter.create(this.loc.redefaultToEN(t)).formatDateTimeFromString(this,e):INVALID$2},e.toLocaleString=function(e){return void 0===e&&(e=DATE_SHORT),this.isValid?Formatter.create(this.loc.clone(e),e).formatDateTime(this):INVALID$2},e.toLocaleParts=function(e){return void 0===e&&(e={}),this.isValid?Formatter.create(this.loc.clone(e),e).formatDateTimeParts(this):[]},e.toISO=function(e){return void 0===e&&(e={}),this.isValid?this.toISODate(e)+"T"+this.toISOTime(e):null},e.toISODate=function(e){e=(void 0===e?{}:e).format,e="basic"===(void 0===e?"extended":e)?"yyyyMMdd":"yyyy-MM-dd";return toTechFormat(this,e=9999<this.year?"+"+e:e)},e.toISOWeekDate=function(){return toTechFormat(this,"kkkk-'W'WW-c")},e.toISOTime=function(e){var e=void 0===e?{}:e,t=e.suppressMilliseconds,n=e.suppressSeconds,r=e.includeOffset,i=e.includePrefix,e=e.format;return toTechTimeFormat(this,{suppressSeconds:void 0!==n&&n,suppressMilliseconds:void 0!==t&&t,includeOffset:void 0===r||r,includePrefix:void 0!==i&&i,format:void 0===e?"extended":e})},e.toRFC2822=function(){return toTechFormat(this,"EEE, dd LLL yyyy HH:mm:ss ZZZ",!1)},e.toHTTP=function(){return toTechFormat(this.toUTC(),"EEE, dd LLL yyyy HH:mm:ss 'GMT'")},e.toSQLDate=function(){return toTechFormat(this,"yyyy-MM-dd")},e.toSQLTime=function(e){var e=void 0===e?{}:e,t=e.includeOffset,e=e.includeZone;return toTechTimeFormat(this,{includeOffset:void 0===t||t,includeZone:void 0!==e&&e,spaceZone:!0})},e.toSQL=function(e){return void 0===e&&(e={}),this.isValid?this.toSQLDate()+" "+this.toSQLTime(e):null},e.toString=function(){return this.isValid?this.toISO():INVALID$2},e.valueOf=function(){return this.toMillis()},e.toMillis=function(){return this.isValid?this.ts:NaN},e.toSeconds=function(){return this.isValid?this.ts/1e3:NaN},e.toJSON=function(){return this.toISO()},e.toBSON=function(){return this.toJSDate()},e.toObject=function(e){if(void 0===e&&(e={}),!this.isValid)return{};var t=Object.assign({},this.c);return e.includeConfig&&(t.outputCalendar=this.outputCalendar,t.numberingSystem=this.loc.numberingSystem,t.locale=this.loc.locale),t},e.toJSDate=function(){return new Date(this.isValid?this.ts:NaN)},e.diff=function(e,t,n){if(void 0===t&&(t="milliseconds"),void 0===n&&(n={}),!this.isValid||!e.isValid)return Duration.invalid(this.invalid||e.invalid,"created by diffing an invalid DateTime");var n=Object.assign({locale:this.locale,numberingSystem:this.numberingSystem},n),t=maybeArray(t).map(Duration.normalizeUnit),r=e.valueOf()>this.valueOf(),e=_diff(r?this:e,r?e:this,t,n);return r?e.negate():e},e.diffNow=function(e,t){return void 0===e&&(e="milliseconds"),void 0===t&&(t={}),this.diff(g.now(),e,t)},e.until=function(e){return this.isValid?Interval.fromDateTimes(this,e):this},e.hasSame=function(e,t){if(!this.isValid)return!1;var n=e.valueOf(),e=this.setZone(e.zone,{keepLocalTime:!0});return e.startOf(t)<=n&&n<=e.endOf(t)},e.equals=function(e){return this.isValid&&e.isValid&&this.valueOf()===e.valueOf()&&this.zone.equals(e.zone)&&this.loc.equals(e.loc)},e.toRelative=function(e){if(!this.isValid)return null;var t=(e=void 0===e?{}:e).base||g.fromObject({zone:this.zone}),n=e.padding?this<t?-e.padding:e.padding:0,r=["years","months","days","hours","minutes","seconds"],i=e.unit;return Array.isArray(e.unit)&&(r=e.unit,i=void 0),diffRelative(t,this.plus(n),Object.assign(e,{numeric:"always",units:r,unit:i}))},e.toRelativeCalendar=function(e){return void 0===e&&(e={}),this.isValid?diffRelative(e.base||g.fromObject({zone:this.zone}),this,Object.assign(e,{numeric:"auto",units:["years","months","days"],calendary:!0})):null},g.min=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(t.every(g.isDateTime))return bestBy(t,function(e){return e.valueOf()},Math.min);throw new InvalidArgumentError("min requires all arguments be DateTimes")},g.max=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(t.every(g.isDateTime))return bestBy(t,function(e){return e.valueOf()},Math.max);throw new InvalidArgumentError("max requires all arguments be DateTimes")},g.fromFormatExplain=function(e,t,n){var n=n=void 0===n?{}:n,r=n.locale,n=n.numberingSystem;return explainFromTokens(Locale.fromOpts({locale:void 0===r?null:r,numberingSystem:void 0===n?null:n,defaultToEN:!0}),e,t)},g.fromStringExplain=function(e,t,n){return g.fromFormatExplain(e,t,n=void 0===n?{}:n)},_createClass(g,[{key:"isValid",get:function(){return null===this.invalid}},{key:"invalidReason",get:function(){return this.invalid?this.invalid.reason:null}},{key:"invalidExplanation",get:function(){return this.invalid?this.invalid.explanation:null}},{key:"locale",get:function(){return this.isValid?this.loc.locale:null}},{key:"numberingSystem",get:function(){return this.isValid?this.loc.numberingSystem:null}},{key:"outputCalendar",get:function(){return this.isValid?this.loc.outputCalendar:null}},{key:"zone",get:function(){return this._zone}},{key:"zoneName",get:function(){return this.isValid?this.zone.name:null}},{key:"year",get:function(){return this.isValid?this.c.year:NaN}},{key:"quarter",get:function(){return this.isValid?Math.ceil(this.c.month/3):NaN}},{key:"month",get:function(){return this.isValid?this.c.month:NaN}},{key:"day",get:function(){return this.isValid?this.c.day:NaN}},{key:"hour",get:function(){return this.isValid?this.c.hour:NaN}},{key:"minute",get:function(){return this.isValid?this.c.minute:NaN}},{key:"second",get:function(){return this.isValid?this.c.second:NaN}},{key:"millisecond",get:function(){return this.isValid?this.c.millisecond:NaN}},{key:"weekYear",get:function(){return this.isValid?possiblyCachedWeekData(this).weekYear:NaN}},{key:"weekNumber",get:function(){return this.isValid?possiblyCachedWeekData(this).weekNumber:NaN}},{key:"weekday",get:function(){return this.isValid?possiblyCachedWeekData(this).weekday:NaN}},{key:"ordinal",get:function(){return this.isValid?gregorianToOrdinal(this.c).ordinal:NaN}},{key:"monthShort",get:function(){return this.isValid?Info.months("short",{locObj:this.loc})[this.month-1]:null}},{key:"monthLong",get:function(){return this.isValid?Info.months("long",{locObj:this.loc})[this.month-1]:null}},{key:"weekdayShort",get:function(){return this.isValid?Info.weekdays("short",{locObj:this.loc})[this.weekday-1]:null}},{key:"weekdayLong",get:function(){return this.isValid?Info.weekdays("long",{locObj:this.loc})[this.weekday-1]:null}},{key:"offset",get:function(){return this.isValid?+this.o:NaN}},{key:"offsetNameShort",get:function(){return this.isValid?this.zone.offsetName(this.ts,{format:"short",locale:this.locale}):null}},{key:"offsetNameLong",get:function(){return this.isValid?this.zone.offsetName(this.ts,{format:"long",locale:this.locale}):null}},{key:"isOffsetFixed",get:function(){return this.isValid?this.zone.universal:null}},{key:"isInDST",get:function(){return!this.isOffsetFixed&&(this.offset>this.set({month:1}).offset||this.offset>this.set({month:5}).offset)}},{key:"isInLeapYear",get:function(){return isLeapYear(this.year)}},{key:"daysInMonth",get:function(){return daysInMonth(this.year,this.month)}},{key:"daysInYear",get:function(){return this.isValid?daysInYear(this.year):NaN}},{key:"weeksInWeekYear",get:function(){return this.isValid?weeksInWeekYear(this.weekYear):NaN}}],[{key:"DATE_SHORT",get:function(){return DATE_SHORT}},{key:"DATE_MED",get:function(){return DATE_MED}},{key:"DATE_MED_WITH_WEEKDAY",get:function(){return DATE_MED_WITH_WEEKDAY}},{key:"DATE_FULL",get:function(){return DATE_FULL}},{key:"DATE_HUGE",get:function(){return DATE_HUGE}},{key:"TIME_SIMPLE",get:function(){return TIME_SIMPLE}},{key:"TIME_WITH_SECONDS",get:function(){return TIME_WITH_SECONDS}},{key:"TIME_WITH_SHORT_OFFSET",get:function(){return TIME_WITH_SHORT_OFFSET}},{key:"TIME_WITH_LONG_OFFSET",get:function(){return TIME_WITH_LONG_OFFSET}},{key:"TIME_24_SIMPLE",get:function(){return TIME_24_SIMPLE}},{key:"TIME_24_WITH_SECONDS",get:function(){return TIME_24_WITH_SECONDS}},{key:"TIME_24_WITH_SHORT_OFFSET",get:function(){return TIME_24_WITH_SHORT_OFFSET}},{key:"TIME_24_WITH_LONG_OFFSET",get:function(){return TIME_24_WITH_LONG_OFFSET}},{key:"DATETIME_SHORT",get:function(){return DATETIME_SHORT}},{key:"DATETIME_SHORT_WITH_SECONDS",get:function(){return DATETIME_SHORT_WITH_SECONDS}},{key:"DATETIME_MED",get:function(){return DATETIME_MED}},{key:"DATETIME_MED_WITH_SECONDS",get:function(){return DATETIME_MED_WITH_SECONDS}},{key:"DATETIME_MED_WITH_WEEKDAY",get:function(){return DATETIME_MED_WITH_WEEKDAY}},{key:"DATETIME_FULL",get:function(){return DATETIME_FULL}},{key:"DATETIME_FULL_WITH_SECONDS",get:function(){return DATETIME_FULL_WITH_SECONDS}},{key:"DATETIME_HUGE",get:function(){return DATETIME_HUGE}},{key:"DATETIME_HUGE_WITH_SECONDS",get:function(){return DATETIME_HUGE_WITH_SECONDS}}]),g}();function friendlyDateTime(e){if(DateTime.isDateTime(e))return e;if(e&&e.valueOf&&isNumber(e.valueOf()))return DateTime.fromJSDate(e);if(e&&"object"==typeof e)return DateTime.fromObject(e);throw new InvalidArgumentError("Unknown datetime argument: "+e+", of type "+typeof e)}var VERSION="1.28.0",DateTime_1=luxon.DateTime=DateTime;luxon.Duration=Duration,luxon.FixedOffsetZone=FixedOffsetZone,luxon.IANAZone=IANAZone,luxon.Info=Info,luxon.Interval=Interval,luxon.InvalidZone=InvalidZone,luxon.LocalZone=LocalZone,luxon.Settings=Settings,luxon.VERSION=VERSION,luxon.Zone=Zone;const SHARED_MESSAGES={noTags:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"os-flow-center.ImtbH0",defaultMessage:"No Tags",description:"No Tags"}),createFlowFromTemplate:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"os-flow-center.CNPhK1",defaultMessage:"Create Flow From Template",description:"Create Flow From Template"}),overview:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"os-flow-center.6+BhsD",defaultMessage:"Overview",description:"Overview"}),developer:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"os-flow-center.GKqAH1",defaultMessage:"Developer",description:"Developer"}),certified:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"os-flow-center.1tTedK",defaultMessage:"Certified",description:"Certified"}),yes:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"os-flow-center.9U4lyw",defaultMessage:"Yes",description:"Yes"}),category:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"os-flow-center.RYa6+l",defaultMessage:"Category",description:"Category"}),tags:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"os-flow-center.ImtbH1",defaultMessage:"Tags",description:"Tags"}),active:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"os-flow-center.UkeQP9",defaultMessage:"Active",description:"Active"}),ready:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"os-flow-center.readymessage",defaultMessage:"Ready",description:"Ready"}),pending:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"os-flow-center.pendingmessage",defaultMessage:"Pending",description:"Pending"}),draft:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"os-flow-center.draftonotactive",defaultMessage:"Not active",description:"Draft to not active translation"}),viewDetails:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"os-flow-center.yFa4dd",defaultMessage:"View Details",description:"View Details"}),version:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"os-flow-center.i8EBVW",defaultMessage:"Version",description:"Version"}),openFlow:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"os-flow-center.IEIrEm",defaultMessage:"Open Flow",description:"Open Flow"}),openFlowAdv:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"os-flow-center.IEIfEt",defaultMessage:"Open With Cluster",description:"Open With Cluster"}),deleteFlow:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"os-flow-center.MPiXf5",defaultMessage:"Delete Flow",description:"Delete Flow"}),confirmDelete:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"os-flow-center.mPEQWb",defaultMessage:"Confirm Delete",description:"Confirm Delete"}),exitFullScreen:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"os-flow-center.awe7uYa",defaultMessage:"Exit Fullscreen",description:"Exit Fullscreen"}),enterFullScreen:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"os-flow-center.stiZt+d",defaultMessage:"Enter Fullscreen",description:"Enter Fullscreen"}),closePanel:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"os-flow-center.kOsSpC",defaultMessage:"Close Panel",description:"Close Panel"}),copyFlowID:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"os-flow-center.1mDYO7",defaultMessage:"Copy Flow ID",description:"Copy Flow ID"}),hideFilters:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"os-flow-center.Iy59d3",defaultMessage:"Hide Filter",description:"Hide Filter"}),showFilters:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"os-flow-center.g5zZtA",defaultMessage:"Show Filter",description:"Show Filter"}),showMoreInformation:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"os-flow-center.ParFja",defaultMessage:"More Information",description:"More Information"}),hideMoreInformation:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"os-flow-center.DXuAKS",defaultMessage:"Close More Information",description:"Close More Information"}),engineIdHasBeenCopied:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"os-flow-center.CRvRbB",defaultMessage:"Engine ID has been copied",description:"copy of the engine id"}),cancel:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"os-flow-center.6PdOcy",defaultMessage:"Cancel",description:"Cancel"}),delete:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"os-flow-center.qviIFp",defaultMessage:"Delete",description:"Delete"}),noFlowsFound:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"os-flow-center.WX6wfG",defaultMessage:"No Flows Found",description:"No Flows Found"}),noFlowsFoundSubtitle:()=>jsxRuntime.exports.jsx(FormattedMessage,{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:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"os-flow-center.54mq64",defaultMessage:"Create New Flow",description:"Create New Flow"}),chooseATemplate:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"os-flow-center.jhiPmN",defaultMessage:"Choose a Template",description:"Choose a Template"}),newFlow:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"os-flow-center.54mq65",defaultMessage:"New Flow",description:"New Flow"}),noSearchResultsFound:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"os-flow-center.OYovRP",defaultMessage:"No results found",description:"No results found"}),noSearchResultsFoundSubtitle:()=>jsxRuntime.exports.jsx(FormattedMessage,{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:e=>jsxRuntime.exports.jsx(FormattedMessage,{id:"os-flow-center.flowscount",defaultMessage:"Flows {flowsCount}",description:"Flows Count",values:{flowsCount:e}}),templatesCount:e=>jsxRuntime.exports.jsx(FormattedMessage,{id:"os-flow-center.templatescount",defaultMessage:"Templates {templatesCount}",description:"Templates Count",values:{templatesCount:e}})},useCommonStyles=makeStyles()(e=>({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"},actions:{padding:"0px!important",marginTop:"30px!important"},container:{padding:"30px!important"}})),SHARED_DATE_TIME={getDate:e=>jsxRuntime.exports.jsx(FormattedDate,{value:e,day:"2-digit",month:"numeric",year:"numeric",hour:"2-digit",minute:"2-digit",hour12:!1})},namespace$1="newFlowClusterID",initialState$1={newFlowClusterID:""},newFlowClusterIDSlice=createSlice({name:namespace$1,initialState:initialState$1,reducers:{newFlowClusterIDAction(e,t){e.newFlowClusterID=t.payload}}}),newFlowClusterIDSelector=e=>(null==e?void 0:e[namespace$1])||null,newFlowClusterIDAction=newFlowClusterIDSlice.actions["newFlowClusterIDAction"],newFlowClusterIDnReducer=newFlowClusterIDSlice.reducer,useStyles$b=makeStyles()(()=>({disabledButton:{background:"#efefef4d!important",color:"#00000042"},fullWidth:{width:"100%"},paddingDiv:{paddingTop:"20px"},buttonDiv:{display:"flex"}})),FlowList=({onSelectFlow:a,simpleMode:l,screenName:L,selectedFlowId:c,setFirstFlowId:k,zIndex:W,showTitle:e=!0,setOpenFlowDetails:H})=>{const r=useDispatch(),u=flowStyles()["classes"],t=useCommonStyles()["classes"],n=useStyles$b()["classes"],P=useSelector(sessionTokenSelector),i=useSelector(e=>e.flows.flows),s=useSelector(automateUrlSelector),o=useSelector(e=>e.flows.isRevisionsExistOnServer),[G,$]=react.exports.useState(null),[d,B]=react.exports.useState("desc"),[m,V]=react.exports.useState("modifiedDateTime"),[U,p]=react.exports.useState(!1),[f,h]=react.exports.useState(""),[z,g]=react.exports.useState(!1),[Z,x]=react.exports.useState(!1),[Y,S]=react.exports.useState(""),[T,w]=react.exports.useState(0),[y,q]=react.exports.useState(100),E=useSelector(newFlowClusterIDSelector)||null,[j]=(useSelector(graphEndpointSelector),react.exports.useState([])),[v,J]=react.exports.useState(!1),O=()=>{J(!1),r(newFlowClusterIDAction(""))},Q={EMPTY:null,ENGINE_COPIED:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-flow-center.sGx+Oj",defaultMessage:"Engine ID has been copied",description:"msg delete flow"}),FLOW_DELETED_SUCCESS:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-flow-center.2Trjxv",defaultMessage:"Flow has been successfully deleted",description:"msg delete flow"}),FLOW_DELETED_FAIL:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-flow-center.himmqH",defaultMessage:"Flow hasn't been deleted",description:"msg delete flow"})},b={OPEN_FLOW_SETTINGS:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-flow-center-header.hirqzH",defaultMessage:"Flow Settings",description:"msg flow settings"}),CANCEL_SELECT_CLUSTER:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-flow-center-header.hiqxrt",defaultMessage:"Cancel",description:"msg cancel select cluster"}),OPEN_FLOW:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-flow-center-header.jbxqqH",defaultMessage:"Open Flow",description:"msg open flow"}),CREATE_FLOW_ADVANCED:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-flow-center-header.jbxqty",defaultMessage:"Create Flow Advanced",description:"msg create flow Advanced"})},I=e=>{var t=m===e&&"asc"===d;B(t?"desc":"asc"),V(e)},F=(e,t,n)=>t[n]<e[n]?-1:t[n]>e[n]?1:0,R=e=>jsxRuntime.exports.jsx(TableSortLabel,{active:m===e,IconComponent:default_1$6,direction:m===e?d:"asc",onClick:()=>I(e),classes:{icon:u.sortIcon}}),_=e=>{g(!1),e&&deleteEngine(f,P).then(t=>{if(t.data&&t.data.deleteEngine&&t.data.deleteEngine.id){var e=lodash.exports.findIndex(i,e=>e.id===t.data.deleteEngine.id);const n=JSON.parse(JSON.stringify(i));n.splice(e,1),r(setFlows(n)),S("FLOW_DELETED_SUCCESS")}else S("FLOW_DELETED_FAIL")}).catch(function(e){S("FLOW_DELETED_FAIL")}).finally(function(){x(!0)})},N=()=>{x(!1)},D=t=>{var e=i.find(e=>e.id===t);if(e)return e=e.builds,e.records.length?null==(e=e.records[0])?void 0:e.id:"latest"},C=e=>{var e=e||f,t=o?"latest":D(e),e=s+`/flow/${e}/`+t;window.open(e,"_blank","noopener,noreferrer")},M=i.find(e=>e.id===f),A=e=>jsxRuntime.exports.jsxs(jsxRuntime.exports.Fragment,{children:[jsxRuntime.exports.jsx(Typography,Object.assign({"data-test":"flow-widget-executions-table-time",className:u.dateTime},{children:e?SHARED_DATE_TIME.getDate(e):null})),jsxRuntime.exports.jsx(Typography,Object.assign({"data-test":"flow-widget-executions-table-time-caption",variant:"caption",className:u.dateTimeSmall},{children:e?DateTime_1.fromISO(e).toLocaleString(DateTime_1.TIME_SIMPLE):null}))]}),X=(e,t)=>{w(t)},K=e=>{q(parseInt(e.target.value,10)),w(0)};return i&&0===i.length?jsxRuntime.exports.jsx(NoResults,{}):jsxRuntime.exports.jsxs(Box,Object.assign({mt:e?2:0},{children:[e&&jsxRuntime.exports.jsx(Typography,Object.assign({"data-test":"flow-center-screenName",className:u.text,style:{flexGrow:1}},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-flow-center.+YGVPH",defaultMessage:"Screen Name: {screenName}",description:"{screenName}",values:{screenName:L}})})),jsxRuntime.exports.jsx(TableContainer,Object.assign({id:"flow-center-flows-table","data-test":"flow-center-flows-table"},{children:jsxRuntime.exports.jsxs(Table,Object.assign({className:u.table},{children:[jsxRuntime.exports.jsx(TableHead,{children:jsxRuntime.exports.jsxs(TableRow,{children:[jsxRuntime.exports.jsxs(TableCell,Object.assign({className:`${u.title} ${u.firstTitle} `+u.borderBottomLineHeader},{children:[jsxRuntime.exports.jsx(FormattedMessage,{id:"os-flow-center.n60v17",defaultMessage:"Flow Name",description:"Flow Name"}),jsxRuntime.exports.jsx(TableSortLabel,{active:"name"===m,direction:"name"===m?d:"asc",onClick:()=>I("name"),IconComponent:default_1$6,classes:{icon:u.sortIcon}})]})),jsxRuntime.exports.jsxs(TableCell,Object.assign({className:u.title+" "+u.borderBottomLineHeader},{children:[jsxRuntime.exports.jsx(FormattedMessage,{id:"os-flow-center.w+rzfS",defaultMessage:"Status",description:"Status"}),R("state")]})),jsxRuntime.exports.jsxs(TableCell,Object.assign({className:u.title+" "+u.borderBottomLineHeader},{children:[jsxRuntime.exports.jsx(FormattedMessage,{id:"os-flow-center.Pzb4Cj",defaultMessage:"Last Updated",description:"Last Updated"}),R("modifiedDateTime")]})),jsxRuntime.exports.jsxs(TableCell,Object.assign({className:u.title+" "+u.borderBottomLineHeader},{children:[jsxRuntime.exports.jsx(FormattedMessage,{id:"os-flow-center.Dj0J2e",defaultMessage:"Date Created",description:"Date Created"}),R("createdDateTime")]})),jsxRuntime.exports.jsx(TableCell,{className:u.title+" "+u.borderBottomLineHeader})]})}),jsxRuntime.exports.jsx(TableBody,{children:i&&((e,r)=>{const t=e.map((e,t)=>[e,t]);return t.sort((e,t)=>{var n=r(e[0],t[0]);return 0!==n?n:e[1]-t[1]}),null!==t&&void 0!==t&&t.length&&k(t[0][0].id),t.map(e=>e[0])})(i,((e,n)=>"desc"===e?(e,t)=>F(e,t,n):(e,t)=>-F(e,t,n))(d,m)).slice(T*y,T*y+y).map(({name:e,state:t,modifiedDateTime:n,createdDateTime:r,id:i,builds:s},o)=>jsxRuntime.exports.jsxs(TableRow,Object.assign({id:"flow-center-flow-item","data-test":"flow-center-flow-item",hover:!0,className:`${c===i?u.tableRowClass:""} ${u.tableRow} `+u.borderBottomLineRow,classes:{selected:u.tableRowSelected},selected:c===i||f===i,onClick:e=>{l?a(i,!1):C(i)}},{children:[jsxRuntime.exports.jsx(TableCell,Object.assign({className:u.borderBottomLine},{children:jsxRuntime.exports.jsxs("div",Object.assign({className:u.boxCell+" "+u.firstColumn},{children:[jsxRuntime.exports.jsx("p",Object.assign({className:u.flowName},{children:e})),jsxRuntime.exports.jsxs("div",Object.assign({className:u.boxSubtitle},{children:[jsxRuntime.exports.jsx(Tooltip,Object.assign({title:SHARED_MESSAGES.copyFlowID()},{children:jsxRuntime.exports.jsx("img",{src:img$d,alt:"copyID",draggable:"false",onClick:e=>{{var t=i;e.stopPropagation();const n=document.createElement("textarea");return n.value=t,document.body.appendChild(n),n.select(),document.execCommand("copy"),document.body.removeChild(n),x(!0),S("ENGINE_COPIED"),void setTimeout(()=>{x(!1),S("EMPTY")},2e3)}}})})),(e=>jsxRuntime.exports.jsxs("p",Object.assign({className:u.flowVersion},{children:[SHARED_MESSAGES.version()," ",lodash.exports.get(e,"records[0].version",0)]})))(s)]}))]}))})),jsxRuntime.exports.jsx(TableCell,Object.assign({className:u.borderBottomLine},{children:jsxRuntime.exports.jsx(StatusPill,{dataTest:"flow-center-flows-table-state",state:t})})),jsxRuntime.exports.jsx(TableCell,Object.assign({className:u.borderBottomLine},{children:r&&A(n)})),jsxRuntime.exports.jsx(TableCell,Object.assign({className:u.borderBottomLine},{children:r&&A(r)})),jsxRuntime.exports.jsx(TableCell,Object.assign({className:u.borderBottomLine},{children:jsxRuntime.exports.jsx(IconButton,Object.assign({className:u.moreActionsBtn,"data-test":"flow-center-action-btn-toggleOpenMenu",onClick:e=>{var t=i;e.stopPropagation(),p(!0),$(e.currentTarget),h(t)},size:"large"},{children:jsxRuntime.exports.jsx(default_1$8,{})}))}))]}),e+" + "+o))})]}))})),jsxRuntime.exports.jsx(TablePagination,{className:u.title,rowsPerPageOptions:[10,25,50,100,200],component:"div",count:i.length,rowsPerPage:y,page:T,onPageChange:X,onRowsPerPageChange:K}),jsxRuntime.exports.jsx(Popper,Object.assign({disablePortal:!0,style:{zIndex:W},open:U,anchorEl:G,transition:!0,placement:"bottom-end"},{children:({TransitionProps:e})=>jsxRuntime.exports.jsx(ClickAwayListener,Object.assign({onClickAway:()=>{p(!1),a("",!1),h(""),H(!1)}},{children:jsxRuntime.exports.jsx(Fade,Object.assign({},e,{timeout:350},{children:jsxRuntime.exports.jsxs(Paper,Object.assign({className:u.paperContainer},{children:[jsxRuntime.exports.jsx(Button,Object.assign({"data-test":"flow-center-flow-list-viewDetails",onClick:()=>{a(f,!1)},startIcon:jsxRuntime.exports.jsx("img",{className:u.popperIcon,src:img$p,alt:"openInNewIcon"}),className:u.popperBtns},{children:SHARED_MESSAGES.viewDetails()})),jsxRuntime.exports.jsx(Button,Object.assign({"data-test":"flow-center-flow-list-viewRunningInstances",onClick:()=>{a(f,!0)},startIcon:jsxRuntime.exports.jsx("img",{className:u.popperIcon,src:img$m,alt:"openInNewIcon"}),className:u.popperBtns},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:"fc.flowList.runningInstances",defaultMessage:"View Running Instances",description:"View Running Instances"})})),jsxRuntime.exports.jsx(Button,Object.assign({"data-test":"flow-center-flow-list-openFlow",className:u.popperBtns,startIcon:jsxRuntime.exports.jsx("img",{className:u.popperIcon,src:img$M,alt:"openInNewIcon"}),onClick:e=>{C()}},{children:SHARED_MESSAGES.openFlow()})),jsxRuntime.exports.jsx("hr",{className:u.popperHr}),jsxRuntime.exports.jsx(Button,Object.assign({"data-test":"flow-center-flow-list-open-deleteFlow",className:u.popperBtns,startIcon:jsxRuntime.exports.jsx("img",{className:u.popperIcon,src:img$y,alt:"deleteIcon"}),onClick:()=>{g(!0)}},{children:SHARED_MESSAGES.deleteFlow()}))]}))}))}))})),M&&jsxRuntime.exports.jsxs(Dialog,Object.assign({role:"presentation",disablePortal:!0,disableEscapeKeyDown:!0,open:z,classes:{paper:t.container},onClose:()=>_(!1),"aria-labelledby":"alert-dialog-title","aria-describedby":"alert-dialog-description"},{children:[jsxRuntime.exports.jsx(DialogTitle,Object.assign({className:t.title},{children:SHARED_MESSAGES.confirmDelete()})),jsxRuntime.exports.jsx(DialogContent,Object.assign({className:t.content},{children:jsxRuntime.exports.jsx(FormattedMessage,{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===M||void 0===M?void 0:M.name)||""}})})),jsxRuntime.exports.jsxs(DialogActions,Object.assign({className:t.actions},{children:[jsxRuntime.exports.jsx(Button,Object.assign({"data-test":"flow-center-flow-list-cancelDeleteFlow",onClick:()=>_(!1),className:t.cancelButton},{children:SHARED_MESSAGES.cancel()})),jsxRuntime.exports.jsx(Button,Object.assign({"data-test":"flow-center-flow-list-submitDeleteFlow",onClick:()=>_(!0),className:t.confirmationButton,autoFocus:!0},{children:SHARED_MESSAGES.delete()}))]}))]})),M&&v&&jsxRuntime.exports.jsxs(Dialog,Object.assign({role:"presentation",disablePortal:!0,disableEscapeKeyDown:!0,open:v,classes:{paper:t.container},onClose:()=>O(),"aria-labelledby":"alert-dialog-title","aria-describedby":"alert-dialog-description"},{children:[jsxRuntime.exports.jsx(DialogTitle,Object.assign({className:t.title},{children:b.OPEN_FLOW_SETTINGS})),jsxRuntime.exports.jsxs(DialogContent,Object.assign({className:t.content},{children:[jsxRuntime.exports.jsx("div",Object.assign({className:""+n.paddingDiv},{children:jsxRuntime.exports.jsx(FormattedMessage,{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"})})),jsxRuntime.exports.jsx("div",Object.assign({className:""+n.paddingDiv},{children:jsxRuntime.exports.jsx(Select,Object.assign({id:"os-flow-center-header-cluster-select.hGcgxR",value:E.newFlowClusterID,onChange:e=>{r(newFlowClusterIDAction(e.target.value))},className:""+n.fullWidth},{children:null===j||void 0===j?void 0:j.map(e=>jsxRuntime.exports.jsx(MenuItem,Object.assign({value:null==e?void 0:e.id},{children:null==e?void 0:e.name}),null==e?void 0:e.id))}))}))]})),jsxRuntime.exports.jsxs(DialogActions,Object.assign({className:t.actions},{children:[jsxRuntime.exports.jsx(Button,Object.assign({"data-test":"flow-center-flow-list-cancelSelectCluster",onClick:()=>O(),className:t.cancelButton},{children:b.CANCEL_SELECT_CLUSTER})),jsxRuntime.exports.jsx(Button,Object.assign({"data-test":"flow-center-flow-list-openFlowAdvDialog",onClick:()=>{var e=(e=null===M||void 0===M?void 0:M.id)||f,t=o?"latest":D(e),n=s+`/flow/${e}/`+t;E.newFlowClusterID?(window.open(`${s}/flow/${e}/${t}/${E.newFlowClusterID}/default-cluster`,"_blank","noopener"),r(newFlowClusterIDAction(""))):window.open(n,"_blank","noopener,noreferrer"),O()},className:t.confirmationButton,autoFocus:!0},{children:b.OPEN_FLOW}))]}))]})),jsxRuntime.exports.jsx(Snackbar,{anchorOrigin:{vertical:"bottom",horizontal:"left"},open:Z,autoHideDuration:6e3,onClose:N,message:Q[Y],action:jsxRuntime.exports.jsx(IconButton,Object.assign({size:"small","aria-label":"close",color:"inherit","data-test":"flow-center-action-btn-close",onClick:N},{children:jsxRuntime.exports.jsx(default_1$9,{fontSize:"small"})}))})]}))},useStyles$a=makeStyles()(e=>({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:{borderBottom:"0.5px solid #D5DFE9!important",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)}})),TemplateList=({createNewFlow:t,openFirstTemplate:e,onSelectedTemplate:i,isDeselectedTemplate:n})=>{const s=useDispatch(),o=useStyles$a()["classes"],r=useSelector(e=>e.flows.templateToOpen),a=useSelector(e=>e.flows.searchedTemplates),l=useSelector(sessionTokenSelector),c=()=>u.findIndex(e=>e.id===r.id),[u,d]=react.exports.useState([]),[m,p]=react.exports.useState({}),[f,h]=react.exports.useState(c()),g=useSelector(e=>e.flows.filteredTemplates),x=(e,t)=>{e=e.data[t].records.filter(e=>!e.tags||!e.tags.includes("Alteryx"));d(e),h(c())},S=(react.exports.useEffect(()=>{u.length||fetchTemplateGallery(l).then(e=>x(e,"flowTemplates")).catch(e=>{fetchTemplateGalleryFallback(l).then(e=>x(e,"flows")).catch(()=>console.log(e,"error fetching flow templates from fallback"))})},[x]),react.exports.useEffect(()=>{h(c())},[u,c]),react.exports.useEffect(()=>{lodash.exports.isEmpty(r)&&(e?null!==u&&void 0!==u&&u.length&&(p(u[0]),h(0),s(setOpenTemplate({id:u[0].id,title:u[0].title}))):(h(-1),s(setOpenTemplate({id:null,title:null}))))},[s,e,u,r]),react.exports.useEffect(()=>{!f||n||r||(h(-1),s(setOpenTemplate({id:null,title:null})))},[n,s,f]),useSelector(e=>e.flows.selectedFilters)),T=t=>{const n=[];return u.map(e=>{e[t]&&e[t].length&&e[t].forEach(e=>{n.includes(e)||""===e||n.push(e)})}),n},w=(react.exports.useEffect(()=>{var e,t,n;u&&0<u.length&&(e=T("tags"),t=T("categories"),n=(()=>{const t=[];return u.map(e=>{e.author&&(e=e.author.trim(),t.includes(e)||""===e||t.push(e))}),t})(),s(setTagsToStore(e)),s(setCategories(t)),s(setTemplatesAuthors(n))),s(setTemplatesAction(u))},[u,s]),t=>{let n=!0;for(const r in S)if(0!==S[r].length)if(t[r]){const e=S[r];e.forEach(e=>{t[r].includes(e)||(n=!1)})}else n=!1;return n}),y=(react.exports.useEffect(()=>{const e=a||u,t=e.map((e,t)=>{if(w(e))return n=e,r=t,jsxRuntime.exports.jsx(TableRow,Object.assign({hover:!0,className:`${r===f?o.tableRowClass:""} `+o.tableRow,selected:r===f,id:"flow-center-templates-list-item","data-test":"flow-center-templates-list-item"},{children:jsxRuntime.exports.jsx(TableCell,Object.assign({className:o.borderBottomLine,onClick:()=>{p(n),h(r),s(setOpenTemplate({id:n.id,title:n.title})),i(!0)}},{children:jsxRuntime.exports.jsx(Box,Object.assign({className:o.boxCell+" "+o.firstColumn},{children:jsxRuntime.exports.jsx(Typography,Object.assign({"data-test":"flow-center-flows-templateList-title",className:o.engineTitle},{children:n.title}))}))}))}),n.id+"-"+r);var n,r});s(setFilteredTemplatesAction(t.filter(e=>null!=e)))},[a,u,S]),()=>jsxRuntime.exports.jsx(Grid,Object.assign({"data-test":"flow-center-templates-list-container",container:!0,id:"flow-center-templates-list-container"},{children:jsxRuntime.exports.jsx(Grid,Object.assign({"data-test":"flow-center-templates-list-subcontainer",item:!0,xs:12},{children:jsxRuntime.exports.jsx(Box,{children:jsxRuntime.exports.jsx(TableContainer,{children:jsxRuntime.exports.jsxs(Table,Object.assign({className:o.table},{children:[jsxRuntime.exports.jsx(TableHead,{}),jsxRuntime.exports.jsx(TableBody,{children:g})]}))})})}))}))),E=()=>{var e;return jsxRuntime.exports.jsxs("div",Object.assign({className:o.enginesAndFlowWidgetContainer},{children:[jsxRuntime.exports.jsx("div",Object.assign({className:o.enginesContainer},{children:jsxRuntime.exports.jsx(Box,Object.assign({className:-1===f?o.borderRight:""},{children:jsxRuntime.exports.jsx(TableContainer,{children:jsxRuntime.exports.jsxs(Table,Object.assign({className:o.table},{children:[jsxRuntime.exports.jsx(TableHead,{}),jsxRuntime.exports.jsx(TableBody,{children:g})]}))})}))})),jsxRuntime.exports.jsx("div",Object.assign({"data-test":"flow-center-flows-templateList-selected-container",className:o.flowWidgetContainer},{children:jsxRuntime.exports.jsxs(Box,Object.assign({mt:4,ml:4,className:o.flowWidgetContent},{children:[jsxRuntime.exports.jsx(Box,Object.assign({display:"flex",alignItems:"center"},{children:jsxRuntime.exports.jsx(Box,Object.assign({id:"template-widget-title","data-test":"template-widget-title"},{children:jsxRuntime.exports.jsx(Typography,Object.assign({"data-test":"flow-center-flows-templateList-selectedTitle",className:o.boxTitle},{children:null==(e=u[f])?void 0:e.title}))}))})),jsxRuntime.exports.jsx(Box,Object.assign({m:1,ml:0,mb:0},{children:jsxRuntime.exports.jsx(Button,Object.assign({"data-test":"flow-center-template-list-createFlowFromTemplate-"+(null==(e=u[f])?void 0:e.title),color:"primary",onClick:()=>t?t(m):"",className:o.button,startIcon:jsxRuntime.exports.jsx("img",{src:img$g,alt:"plus icon"})},{children:SHARED_MESSAGES.createFlowFromTemplate()}))})),jsxRuntime.exports.jsxs(Box,Object.assign({my:4},{children:[jsxRuntime.exports.jsxs(Typography,Object.assign({"data-test":"flow-center-flows-templateList-overview",variant:"subtitle1",className:o.typography},{children:[jsxRuntime.exports.jsxs("span",Object.assign({className:o.bold},{children:[SHARED_MESSAGES.overview(),":"]})),jsxRuntime.exports.jsx("div",Object.assign({className:o.infoValue},{children:jsxRuntime.exports.jsx("div",{children:null==(e=u[f])?void 0:e.subtitle})}))]})),jsxRuntime.exports.jsxs(Typography,Object.assign({"data-test":"flow-center-flows-templateList-developer",variant:"subtitle1",className:o.typography},{children:[jsxRuntime.exports.jsxs("span",Object.assign({className:o.bold},{children:[SHARED_MESSAGES.developer(),":"]})),jsxRuntime.exports.jsx("div",Object.assign({className:o.infoValue},{children:jsxRuntime.exports.jsx("div",{children:null==(e=u[f])?void 0:e.author})}))]})),jsxRuntime.exports.jsxs(Typography,Object.assign({"data-test":"flow-center-flows-templateList-certified",variant:"subtitle1",className:o.typography},{children:[jsxRuntime.exports.jsxs("span",Object.assign({className:o.bold},{children:[SHARED_MESSAGES.certified(),":"]})),jsxRuntime.exports.jsxs("div",Object.assign({className:o.infoValue+" "+o.infoValueContainer},{children:[jsxRuntime.exports.jsx("div",{children:SHARED_MESSAGES.yes()}),jsxRuntime.exports.jsx("img",{src:img$i,alt:"veritoneCertifiedIcon"})]}))]})),u[f]&&u[f].categories&&u[f].categories.length&&""!==u[f].categories[0]&&jsxRuntime.exports.jsxs(Typography,Object.assign({"data-test":"flow-center-flows-templateList-category",variant:"subtitle1",className:o.typography},{children:[jsxRuntime.exports.jsxs("span",Object.assign({className:o.bold},{children:[SHARED_MESSAGES.category(),":"]})),jsxRuntime.exports.jsx("div",Object.assign({className:o.infoValue},{children:jsxRuntime.exports.jsx("div",{children:null==(e=u[f])?void 0:e.categories.join(", ")})}))]})),jsxRuntime.exports.jsxs(Typography,Object.assign({"data-test":"flow-center-flows-templateList-tags",variant:"subtitle1",className:o.typography},{children:[jsxRuntime.exports.jsxs("span",Object.assign({className:o.bold},{children:[SHARED_MESSAGES.tags(),":"]})),jsxRuntime.exports.jsx("div",Object.assign({className:o.infoValue},{children:jsxRuntime.exports.jsx("div",{children:(null==(e=null==(e=u[f])?void 0:e.tags)?void 0:e.join(", "))||SHARED_MESSAGES.noTags()})}))]})),jsxRuntime.exports.jsxs(Typography,Object.assign({"data-test":"flow-center-flows-templateList-infoValue",variant:"subtitle1",className:o.typography},{children:[jsxRuntime.exports.jsxs("span",Object.assign({className:o.bold},{children:[SHARED_MESSAGES.active(),":"]})),jsxRuntime.exports.jsx("div",Object.assign({className:o.infoValue},{children:jsxRuntime.exports.jsx("div",{children:SHARED_MESSAGES.yes()})}))]}))]})),jsxRuntime.exports.jsx("img",{style:{width:"100%"},src:null==(e=u[f])?void 0:e.image,alt:""})]}))}))]}))};return a&&0===a.length?jsxRuntime.exports.jsx(NoResults,{}):(-1===f?y:E)()},useSharedStyles=makeStyles()(e=>({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 jsxRuntime.exports.jsx(Tooltip,Object.assign({title:e.showNavigation?SHARED_MESSAGES.hideFilters():SHARED_MESSAGES.showFilters()},{children:jsxRuntime.exports.jsx(IconButton,Object.assign({"data-test":"flow-center-action-btn-toggleNavigation",onClick:()=>e.setShowNavigation(!e.showNavigation),className:""+(e.showNavigation?t.actionIconClose:t.actionIcon),size:"large"},{children:e.showNavigation?jsxRuntime.exports.jsx("img",{width:24,height:24,src:img$e,alt:"filterCloseIcon",draggable:"false"}):jsxRuntime.exports.jsx(default_1,{})}))}))}const useStyles$9=makeStyles()(()=>({iconDistance:{marginLeft:"8px!important"}}));function MoreInfControl(e){var t=useStyles$9()["classes"],n=useSharedStyles()["classes"];return jsxRuntime.exports.jsx(Tooltip,Object.assign({title:e.openFlowDetails?SHARED_MESSAGES.hideMoreInformation():SHARED_MESSAGES.showMoreInformation()},{children:jsxRuntime.exports.jsx(IconButton,Object.assign({"data-test":"flow-center-action-btn-openFlowWidget",onClick:()=>e.setOpenFlowDetails(),className:t.iconDistance+" "+(e.openFlowDetails?n.actionIconClose:n.actionIcon),size:"large"},{children:jsxRuntime.exports.jsx("img",{width:24,height:24,src:img$C,alt:"filterCloseIcon",draggable:"false"})}))}))}const useStyles$8=makeStyles()(e=>({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({header:e,setShowNavigation:t,showNavigation:n,setOpenFlowDetails:r,openFlowDetails:i,screen:s}){const o=useStyles$8()["classes"],a=useSelector(e=>e.flows.flows),l=useSelector(e=>e.flows.isSearching),c=useSelector(e=>e.flows.filteredTemplates);return jsxRuntime.exports.jsxs(MuiToolbar,Object.assign({className:o.toolbar+" "+(l?o.searchResultLength:""),id:"flow-center-toolbar-id"},{children:[jsxRuntime.exports.jsxs(Typography,Object.assign({className:o.title},{children:[l?jsxRuntime.exports.jsx(FormattedMessage,{id:"os-flow-center.eHPGww",defaultMessage:"Search Results",description:"flow-center-header-title"}):jsxRuntime.exports.jsx(FormattedMessage,{id:"os-flow-center.vYqggl",defaultMessage:"{defaultMessage}",description:"flow-center-header-title",values:{defaultMessage:null==e?void 0:e.text}}),(()=>{if(l)return jsxRuntime.exports.jsx(Typography,Object.assign({"data-test":"flow-center-toolbar-searchResultsLength",className:o.flowsLength},{children:a.length+c.length}));switch(null==e?void 0:e.key){case ENGINE_OWNER_TYPES.MINE:return jsxRuntime.exports.jsx(Typography,Object.assign({"data-test":"flow-center-toolbar-flowLength",className:o.flowsLength},{children:a.length}));case ENGINE_OWNER_TYPES.TEMPLATES:return jsxRuntime.exports.jsx(Typography,Object.assign({"data-test":"flow-center-toolbar-filteredTempaltesLength",className:o.flowsLength},{children:c.length}));default:return jsxRuntime.exports.jsx("div",{})}})()]})),jsxRuntime.exports.jsx("div",{className:o.grow}),(null==e?void 0:e.key)===ENGINE_OWNER_TYPES.TEMPLATES&&jsxRuntime.exports.jsx(FiltersControl,{setShowNavigation:t,showNavigation:n}),(0!==a.length||s===ENGINE_OWNER_TYPES.TEMPLATES)&&jsxRuntime.exports.jsx(MoreInfControl,{setOpenFlowDetails:r,openFlowDetails:i})]}))}const useStyles$7=makeStyles()(e=>({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 jsxRuntime.exports.jsx(Typography,Object.assign({"data-test":"flow-center-headerbar-title",className:t.title,noWrap:!0,id:"flow-center-headerbar-title"},{children:e.title}))}const useStyles$6=makeStyles()(e=>({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(e){const t=useStyles$6()["classes"],n=useDispatch(),[r,i]=react.exports.useState(!1),[s,o]=react.exports.useState(!1),a=useSelector(e=>e.flows.searched);var l=useSelector(preferredLanguageSelector)||"en";const c=AIWareFormatMessage(l),u=e=>{var t=""!==e.target.value;n(toggleIsSearching(t)),n(toggleIsSearchingLoading(!0)),n(fetchFlows({name:e.target.value,ownerType:ENGINE_OWNER_TYPES.MINE})),n(setSearched(e.target.value))};return e.showSearchBar?jsxRuntime.exports.jsxs(jsxRuntime.exports.Fragment,{children:[jsxRuntime.exports.jsx("div",Object.assign({id:"flow-center-headerbar-searchbar-id",className:t.container,onMouseEnter:()=>i(!0),onMouseLeave:()=>{i(!1)}},{children:jsxRuntime.exports.jsxs("div",Object.assign({className:t.searchInputContainer+" "+(r||s?r&&!s?t.searchInputContainerHover:s?t.searchInputContainerActive:void 0:t.searchInputContainerDefault)},{children:[jsxRuntime.exports.jsx("div",Object.assign({className:t.searchIconContainer},{children:jsxRuntime.exports.jsx(Search,{fontSize:"small",sx:{color:r||s?"#555F7C":"#555F7C99"}})})),jsxRuntime.exports.jsx("input",{id:"flow-center-headerbar-searchbar","data-test":"flow-center-headerbar-searchbar",value:a,onFocus:()=>o(!0),onBlur:()=>o(!1),placeholder:c({id:"os-flow-center.searchflowcenter1",defaultMessage:[{type:0,value:"Search the flow center"}]}),className:t.searchInput,onChange:u}),a&&jsxRuntime.exports.jsx(Close,{fontSize:"small",sx:{color:r||s?"#555F7C":"#555F7C99"},onClick:()=>{n(toggleIsSearching(!1)),n(toggleIsSearchingLoading(!1)),n(setSearched("")),n(setSearchedTemplates(null)),n(fetchFlows({name:"",ownerType:ENGINE_OWNER_TYPES.MINE}))}})]}))})),jsxRuntime.exports.jsx("div",{className:t.grow}),jsxRuntime.exports.jsx("div",{})]}):jsxRuntime.exports.jsx("div",{})}const useStyles$5=makeStyles()(e=>({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:e.spacing(0)+"!important",padding:`${e.spacing(1.6)} ${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}}})),DialogFormattedMessages={NEW_FLOW_SETTINGS:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-flow-center-header.hirrzH",defaultMessage:"New Flow Settings",description:"msg new flow settings"}),CANCEL_SELECT_CLUSTER:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-flow-center-header.hixxrt",defaultMessage:"Cancel",description:"msg cancel select cluster"}),CREATE_FLOW:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-flow-center-header.jbxxqH",defaultMessage:"Create Flow",description:"msg create flow"}),CREATE_FLOW_ADVANCED:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-flow-center-header.jbxxty",defaultMessage:"Create Flow Advanced",description:"msg create flow Advanced"})};function HeaderBarButtons(e){const t=useStyles$5()["classes"],n=useDispatch(),r=useCommonStyles()["classes"];var i=useSelector(e=>e.flows.isLoadingCreateNewFlow);const s=useSelector(newFlowClusterIDSelector)||null,[o]=react.exports.useState([]),a=()=>{e.setOpenClusterDialog(!1),n(newFlowClusterIDAction(""))},l=e=>{n(newFlowClusterIDAction(e.target.value))},c=()=>{e.setOpenClusterDialog(!1),e.createNewFlow()};return jsxRuntime.exports.jsxs("div",Object.assign({className:t.buttonDiv},{children:[e.openClusterDialog&&jsxRuntime.exports.jsxs(Dialog,Object.assign({role:"presentation",disablePortal:!0,disableEscapeKeyDown:!0,open:e.openClusterDialog,classes:{paper:r.container},onClose:a,"aria-labelledby":"alert-dialog-title","aria-describedby":"alert-dialog-description"},{children:[jsxRuntime.exports.jsx(DialogTitle,Object.assign({className:r.title},{children:DialogFormattedMessages.NEW_FLOW_SETTINGS})),jsxRuntime.exports.jsxs(DialogContent,Object.assign({className:r.content},{children:[jsxRuntime.exports.jsx("div",Object.assign({className:""+t.paddingDiv},{children:jsxRuntime.exports.jsx(FormattedMessage,{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"})})),jsxRuntime.exports.jsx("div",Object.assign({className:""+t.paddingDiv},{children:jsxRuntime.exports.jsx(Select,Object.assign({id:"os-flow-center-header-cluster-select.hGcgxR",value:s.newFlowClusterID,onChange:l,className:""+t.fullWidth},{children:null===o||void 0===o?void 0:o.map(e=>jsxRuntime.exports.jsx(MenuItem,Object.assign({value:null==e?void 0:e.id},{children:null==e?void 0:e.name}),null==e?void 0:e.id))}))}))]})),jsxRuntime.exports.jsxs(DialogActions,Object.assign({className:r.actions},{children:[jsxRuntime.exports.jsx(Button,Object.assign({"data-test":"flow-center-flow-list-cancelDeleteFlow",onClick:a,className:r.cancelButton},{children:DialogFormattedMessages.CANCEL_SELECT_CLUSTER})),jsxRuntime.exports.jsx(Button,Object.assign({"data-test":"flow-center-flow-list-submitDeleteFlow",onClick:c,className:r.confirmationButton,autoFocus:!0},{children:DialogFormattedMessages.CREATE_FLOW}))]}))]})),jsxRuntime.exports.jsx(Button,Object.assign({"data-test":"flow-center-header-onCreateNewFlowButton",id:"flow-center-header-onCreateNewFlowButton",variant:"outlined",disabled:i,startIcon:i?jsxRuntime.exports.jsx(CircularProgress$1,{className:t.loadingBarcontainer}):jsxRuntime.exports.jsx(default_1$7,{className:t.flowIconAdd}),className:`${t.buttonFlowCenterAdvanceDisabled} ${t.buttonAddNew}
|
|
1
|
+
import{z as createSvgIcon,C as interopRequireDefault,j as jsxRuntime,r as react,_ as _extends,f as clsx,D as createAction,E as createReducer,m as makeStyles,H as createSlice,F as FormattedMessage,I as ENGINE_OWNER_TYPES,J as ENGINE_FILTER_TYPES,s as store,P as Provider,K as lib,A as AIWareIntlProvider,i as useDispatch,k as useSelector,M as preferredLanguageSelector,N as baseUrlSelector,O as rootApiSelector,Q as sessionTokenSelector,R as graphEndpointSelector,U as controllerNodeRedImageSelector,V as controllerUrlSelector,W as automateControllerUrlSelector,X as automateUrlSelector,p as lodash,B as Box$1,Y as Portal,Z as List,$ as ListItem,a0 as ListItemIcon,a1 as ListItemText,T as Typography,a2 as all,a3 as img$k,a4 as img$l,a5 as img$n,a6 as img$o,a7 as Divider,a8 as Tooltip,a9 as IconButton,aa as img$e,ab as img$C,ac as getNodeRedVersionEdgeApi,ad as createEnginebuild,ae as Skeleton,af as takeLatest$1,ag as fetchAllTags,ah as put,ai as select,aj as fetchFlows$1,ak as call,al as fetchTemplateGallery,am as isRevisionsExistOnServerRequest,v as FormControl$1,an as FormLabel,ao as default_1$6,ap as FormGroup,aq as FormControlLabel,ar as Checkbox,as as fetchTemplateGalleryFallback,at as Button,G as Grid,au as img$i,av as flowStyles,aw as NoResults,ax as fetchVeritoneGraphQLApi,ay as img$8,az as setApiEndpoint,aA as getTemplateById,aB as getTemplateByIdFallback,aC as TableContainer,aD as Table,aE as TableHead,aF as TableRow,aG as TableCell,aH as TableSortLabel,aI as TableBody,aJ as img$d,aK as Popper,aL as ClickAwayListener,aM as Fade,c as Paper,aN as img$p,aO as img$m,aP as img$M,aQ as img$y,aR as Dialog,aS as DialogTitle,aT as DialogContent,aU as DialogActions,aV as Select,aW as MenuItem,aX as Snackbar,aY as default_1$9,aZ as img$f,a_ as img$h,a$ as img$Q,b0 as Tabs,b1 as Tab,b2 as deleteEngine,b3 as img$g,b4 as AIWareFormatMessage,b5 as FormattedDate}from"./js-core.esm.js";import{d as default_1$8}from"./js-core.esm6.js";import{M as MuiToolbar,A as App$1,I as IFlowWidgetTabs,a as IFlowWidgetActivityTabs,S as StatusPill,T as TablePagination}from"./js-core.esm7.js";import{d as default_1$7}from"./js-core.esm8.js";import{A as AppBar}from"./js-core.esm3.js";import{C as Card}from"./js-core.esm9.js";import{C as CardContent}from"./js-core.esm10.js";import{C as CardActions}from"./js-core.esm11.js";import{_ as _objectWithoutProperties}from"./js-core.esm17.js";import{w as withStyles,c as capitalize}from"./js-core.esm18.js";import{S as Search}from"./js-core.esm12.js";import{C as Close}from"./js-core.esm13.js";import"./js-core.esm14.js";import"./js-core.esm15.js";import"./js-core.esm16.js";import"./js-core.esm19.js";var WorkOutlineOutlined={},_interopRequireDefault$5=interopRequireDefault.exports,default_1$5=(Object.defineProperty(WorkOutlineOutlined,"__esModule",{value:!0}),WorkOutlineOutlined.default=void 0),_createSvgIcon$5=_interopRequireDefault$5(createSvgIcon),_jsxRuntime$5=jsxRuntime.exports,_default$5=(0,_createSvgIcon$5.default)((0,_jsxRuntime$5.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$5=WorkOutlineOutlined.default=_default$5,PeopleAltOutlined={},_interopRequireDefault$4=interopRequireDefault.exports,default_1$4=(Object.defineProperty(PeopleAltOutlined,"__esModule",{value:!0}),PeopleAltOutlined.default=void 0),_createSvgIcon$4=_interopRequireDefault$4(createSvgIcon),_jsxRuntime$4=jsxRuntime.exports,_default$4=(0,_createSvgIcon$4.default)((0,_jsxRuntime$4.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$4=PeopleAltOutlined.default=_default$4,PersonOutlineOutlined={},_interopRequireDefault$3=interopRequireDefault.exports,default_1$3=(Object.defineProperty(PersonOutlineOutlined,"__esModule",{value:!0}),PersonOutlineOutlined.default=void 0),_createSvgIcon$3=_interopRequireDefault$3(createSvgIcon),_jsxRuntime$3=jsxRuntime.exports,_default$3=(0,_createSvgIcon$3.default)((0,_jsxRuntime$3.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$3=PersonOutlineOutlined.default=_default$3,HistoryOutlined={},_interopRequireDefault$2=interopRequireDefault.exports,default_1$2=(Object.defineProperty(HistoryOutlined,"__esModule",{value:!0}),HistoryOutlined.default=void 0),_createSvgIcon$2=_interopRequireDefault$2(createSvgIcon),_jsxRuntime$2=jsxRuntime.exports,_default$2=(0,_createSvgIcon$2.default)((0,_jsxRuntime$2.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$2=HistoryOutlined.default=_default$2,ArrowDropDown={},_interopRequireDefault$1=interopRequireDefault.exports,default_1$1=(Object.defineProperty(ArrowDropDown,"__esModule",{value:!0}),ArrowDropDown.default=void 0),_createSvgIcon$1=_interopRequireDefault$1(createSvgIcon),_jsxRuntime$1=jsxRuntime.exports,_default$1=(0,_createSvgIcon$1.default)((0,_jsxRuntime$1.jsx)("path",{d:"m7 10 5 5 5-5z"}),"ArrowDropDown"),default_1$1=ArrowDropDown.default=_default$1,FilterListOutlined={},_interopRequireDefault=interopRequireDefault.exports,default_1=(Object.defineProperty(FilterListOutlined,"__esModule",{value:!0}),FilterListOutlined.default=void 0),_createSvgIcon=_interopRequireDefault(createSvgIcon),_jsxRuntime=jsxRuntime.exports,_default=(0,_createSvgIcon.default)((0,_jsxRuntime.jsx)("path",{d:"M10 18h4v-2h-4v2zM3 6v2h18V6H3zm3 7h12v-2H6v2z"}),"FilterListOutlined"),default_1=FilterListOutlined.default=_default,SIZE=44;function getRelativeValue(e,t,n){return(Math.min(Math.max(t,e),n)-t)/(n-t)}function easeOut(e){return e=getRelativeValue(e,0,1),e=--e*e*e+1}function easeIn(e){return e*e}var styles=function(e){return{root:{display:"inline-block"},static:{transition:e.transitions.create("transform")},indeterminate:{animation:"$circular-rotate 1.4s linear infinite"},colorPrimary:{color:e.palette.primary.main},colorSecondary:{color:e.palette.secondary.main},svg:{display:"block"},circle:{stroke:"currentColor"},circleStatic:{transition:e.transitions.create("stroke-dashoffset")},circleIndeterminate:{animation:"$circular-dash 1.4s ease-in-out infinite",strokeDasharray:"80px, 200px",strokeDashoffset:"0px"},"@keyframes circular-rotate":{"0%":{transformOrigin:"50% 50%"},"100%":{transform:"rotate(360deg)"}},"@keyframes circular-dash":{"0%":{strokeDasharray:"1px, 200px",strokeDashoffset:"0px"},"50%":{strokeDasharray:"100px, 200px",strokeDashoffset:"-15px"},"100%":{strokeDasharray:"100px, 200px",strokeDashoffset:"-125px"}},circleDisableShrink:{animation:"none"}}},CircularProgress=react.exports.forwardRef(function(e,t){var n,r=e.classes,i=e.className,s=e.color,s=void 0===s?"primary":s,o=e.disableShrink,o=void 0!==o&&o,a=e.size,a=void 0===a?40:a,l=e.style,c=e.thickness,c=void 0===c?3.6:c,u=e.value,u=void 0===u?0:u,d=e.variant,d=void 0===d?"indeterminate":d,e=_objectWithoutProperties(e,["classes","className","color","disableShrink","size","style","thickness","value","variant"]),m={},p={},f={};return"determinate"!==d&&"static"!==d||(n=2*Math.PI*((SIZE-c)/2),m.strokeDasharray=n.toFixed(3),f["aria-valuenow"]=Math.round(u),"static"===d?(m.strokeDashoffset="".concat(((100-u)/100*n).toFixed(3),"px"),p.transform="rotate(-90deg)"):(m.strokeDashoffset="".concat((easeIn((100-u)/100)*n).toFixed(3),"px"),p.transform="rotate(".concat((270*easeOut(u/70)).toFixed(3),"deg)"))),react.exports.createElement("div",_extends({className:clsx(r.root,i,"inherit"!==s&&r["color".concat(capitalize(s))],{indeterminate:r.indeterminate,static:r.static}[d]),style:_extends({width:a,height:a},p,l),ref:t,role:"progressbar"},f,e),react.exports.createElement("svg",{className:r.svg,viewBox:"".concat(SIZE/2," ").concat(SIZE/2," ").concat(SIZE," ").concat(SIZE)},react.exports.createElement("circle",{className:clsx(r.circle,o&&r.circleDisableShrink,{indeterminate:r.circleIndeterminate,static:r.circleStatic}[d]),style:m,cx:SIZE,cy:SIZE,r:(SIZE-c)/2,fill:"none",strokeWidth:c})))}),CircularProgress$1=withStyles(styles,{name:"MuiCircularProgress",flip:!1})(CircularProgress);function __awaiter(e,o,a,l){return new(a=a||Promise)(function(n,t){function r(e){try{s(l.next(e))}catch(e){t(e)}}function i(e){try{s(l.throw(e))}catch(e){t(e)}}function s(e){var t;e.done?n(e.value):((t=e.value)instanceof a?t:new a(function(e){e(t)})).then(r,i)}s((l=l.apply(e,o||[])).next())})}!function(){var e={};try{if(process)return process.env=Object.assign({},process.env),Object.assign(process.env,e)}catch(e){}globalThis.process={env:e}}();const FETCH_FLOWS="flow-center/FETCH_FLOWS",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",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)),setFlows=createAction(SET_FLOWS),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:[],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},{[FETCH_FLOWS]:e=>Object.assign({},e),[SET_FETCHING_FLOWS]:e=>Object.assign(Object.assign({},e),{fetchingFlows:!0}),[SET_OPEN_TEMPLATE]:(e,{payload:t})=>Object.assign(Object.assign({},e),{templateToOpen:t}),[SET_TEMPLATE_SELECTED]:(e,{payload:t})=>Object.assign(Object.assign({},e),{isTemplateSelected:t}),[SET_TAGS]:(e,{payload:t})=>Object.assign(Object.assign({},e),{tags:t}),[SET_TAGS_TO_STORE]:(e,{payload:t})=>Object.assign(Object.assign({},e),{tags:t}),[SET_CATEGORIES]:(e,{payload:t})=>Object.assign(Object.assign({},e),{categories:t}),[SET_TEMPLATES_AUTHORS]:(e,{payload:t})=>Object.assign(Object.assign({},e),{templatesAuthors:t}),[SET_SELECTED_FILTERS]:(e,{payload:t})=>Object.assign(Object.assign({},e),{selectedFilters:t}),[SET_TEMPLATES]:(e,{payload:t})=>Object.assign(Object.assign({},e),{templates:t}),[SET_FILTERED_TEMPLATES_ACTION]:(e,{payload:t})=>Object.assign(Object.assign({},e),{filteredTemplates:t}),[SET_TAG]:(e,{payload:t})=>Object.assign(Object.assign({},e),{tag:t}),[SET_FLOWS]:(e,{payload:t})=>Object.assign(Object.assign({},e),{flows:t}),[TOGGLE_IS_SEARCHING]:(e,{payload:t})=>Object.assign(Object.assign({},e),{isSearching:t}),[TOGGLE_IS_SEARCHING_LOADING]:(e,{payload:t})=>Object.assign(Object.assign({},e),{isSearchingLoading:t}),[SET_SEARCHED]:(e,{payload:t})=>Object.assign(Object.assign({},e),{searched:t}),[SET_SEARCHED_TEMPLATES]:(e,{payload:t})=>Object.assign(Object.assign({},e),{searchedTemplates:t}),[SET_CONFIG]:(e,{payload:t})=>Object.assign(Object.assign({},e),{config:t}),[TOGGLE_STATE_CREATE_NEW_FLOW]:(e,{payload:t})=>Object.assign(Object.assign({},e),{isLoadingCreateNewFlow:t}),[SET_IS_REVISIONS_EXIST_ON_SERVER]:(e,{payload:t})=>Object.assign(Object.assign({},e),{isRevisionsExistOnServer:t}),[SET_SHOULD_CREATE_INITIAL_FLOWS]:(e,{payload:t})=>Object.assign(Object.assign({},e),{shouldCreateInitialFlows:t})})),namespace$2="flows";function*fetchTagsSaga(){yield takeLatest$1(FETCH_TAGS,function*(e){e=yield fetchAllTags(e.payload.ids);void 0!==e&&(yield put(setTags(e)))})}function*fetchFlowsSaga(){yield takeLatest$1(FETCH_FLOWS,function*(e){var t=yield select(sessionTokenSelector);let n;switch(e.payload.ownerType){case ENGINE_OWNER_TYPES.ORGANIZATION:n=yield fetchFlows$1({name:e.payload.name,owned:!1,offset:0,limit:300,authToken:t});break;case ENGINE_OWNER_TYPES.MINE:n=yield fetchFlows$1({name:e.payload.name,owned:!0,offset:0,limit:300,authToken:t});break;case ENGINE_OWNER_TYPES.SHARED:n=yield fetchFlows$1({name:e.payload.name,owned:!1,offset:0,limit:300,authToken:t})}void 0!==n&&n&&(0!==n.data.engines.records.length||e.payload.name||(yield put(setShouldCreateInitialFlows(!0))),yield put(setFlows(n.data.engines.records))),yield put(toggleIsSearchingLoading(!1))})}function*searchTemplatesSaga(){yield takeLatest$1(SEARCH_TEMPLATES,function*(){var e=yield select(sessionTokenSelector),e=yield call(fetchTemplateGallery,e);e&&e.data&&e.data.flowTemplates&&e.data.flowTemplates.records&&0<e.data.flowTemplates.records.length&&(yield put(setTemplatesAction(e.data.flowTemplates.records)))})}function*isRevisionsExistOnServerSaga(){yield takeLatest$1(IS_REVISIONS_EXIST_ON_SERVER,function*(){let e;var t=yield select(sessionTokenSelector);try{e=yield call(isRevisionsExistOnServerRequest,t)}catch(e){yield put({type:SET_IS_REVISIONS_EXIST_ON_SERVER,payload:!1})}lodash.exports.get(e,"data.flowRevisions","")&&(yield put({type:SET_IS_REVISIONS_EXIST_ON_SERVER,payload:!0}))})}function*flowsSaga(){yield all([fetchTagsSaga(),fetchFlowsSaga(),searchTemplatesSaga(),isRevisionsExistOnServerSaga()])}const useStyles$d=makeStyles()(()=>({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({categories:e,filterers:t,screen:n,onSetType:r,showNavigation:i,fullScreen:s,automateFullScreen:o}){const a=useStyles$d()["classes"],l=useDispatch(),[c,u]=react.exports.useState([]),d=useSelector(e=>e.flows.selectedFilters),m=useSelector(e=>e.flows.isSearching);const p=t=>{const n=c.indexOf(t);-1===n?u(e=>(e.push(t),[...e])):u(e=>(e.splice(n,1),[...e]))},f=(e,t)=>{const n=Object.assign({},d);var r=d[e];n[e]=[],r&&(n[e]=[...r]),n[e].includes(t)?n[e].splice(n[e].indexOf(t),1):n[e].push(t),l(setSelectedFilters(n))};return jsxRuntime.exports.jsx(Box$1,Object.assign({className:a.boxBackground},{children:jsxRuntime.exports.jsxs(Box$1,Object.assign({className:a.marginLeft},{children:[jsxRuntime.exports.jsx(List,Object.assign({className:o?a.fullScreenMode:""},{children:e.map(({key:t,text:e})=>jsxRuntime.exports.jsxs(ListItem,Object.assign({id:"flow-center-navigation-listItem-conatiner","data-test":"flow-center-navigation-tabs-"+t,button:!0,disableRipple:!0,selected:n.toLowerCase()===t&&!m,onClick:()=>{var e=t;l(toggleIsSearching(!1)),l(toggleIsSearchingLoading(!1)),l(setSearched("")),l(setSearchedTemplates(null)),l(fetchFlows({name:"",ownerType:ENGINE_OWNER_TYPES.MINE})),r(e)},className:a.paddingLeft,classes:{selected:a.selectedPaddingLeft}},{children:[jsxRuntime.exports.jsx(ListItemIcon,Object.assign({className:a.icon},{children:function(e){switch(e){case"mine":return n.toLowerCase()!==e||m?jsxRuntime.exports.jsx("img",{width:"24px",height:"24px",src:img$o,alt:"myFlowsBlue"}):jsxRuntime.exports.jsx("img",{width:"24px",height:"24px",src:img$n,alt:"myFlows"});case"templates":return n.toLowerCase()!==e||m?jsxRuntime.exports.jsx("img",{width:"24px",height:"24px",src:img$l,alt:"templatesBlue"}):jsxRuntime.exports.jsx("img",{width:"24px",height:"24px",src:img$k,alt:"templates"});case"WorkOutlineOutlinedIcon":return jsxRuntime.exports.jsx(default_1$5,{});case"PeopleAltOutlinedIcon":return jsxRuntime.exports.jsx(default_1$4,{});case"PersonOutlineOutlinedIcon":return jsxRuntime.exports.jsx(default_1$3,{});default:return jsxRuntime.exports.jsx(default_1$2,{})}}(t)})),jsxRuntime.exports.jsx(ListItemText,{"data-test":"flow-center-navigation-listItemText",className:"flow-center-navigation-listItemText",primary:e,classes:{primary:a.listItemText}})]}),t))})),i&&(e=o?"calc(100vh - 64px - 16px - 86px - 8px - 54px":`calc(100vh - 64px - 16px - 86px - 8px - ${s?"0px":"54px"})`,jsxRuntime.exports.jsxs(jsxRuntime.exports.Fragment,{children:[jsxRuntime.exports.jsx(Divider,{}),jsxRuntime.exports.jsx("div",Object.assign({className:a.scroll,style:{height:e}},{children:t.map(({text:e,group:n,options:t},r)=>jsxRuntime.exports.jsx("div",{children:jsxRuntime.exports.jsxs(FormControl$1,Object.assign({component:"fieldset",className:a.formControl,"data-test":`flow-center-${n}-container`,id:`flow-center-${n}-container`},{children:[jsxRuntime.exports.jsxs("div",Object.assign({className:a.filterTitleContainer},{children:[jsxRuntime.exports.jsx(FormLabel,Object.assign({className:a.category,component:"legend"},{children:e})),jsxRuntime.exports.jsx("div",Object.assign({className:a.expandIconClass,onClick:()=>p(r)},{children:c.includes(r)?jsxRuntime.exports.jsx(default_1$1,{fontSize:"small",style:{fill:"#555F7C",width:"18px!important",height:"18px!important"}}):jsxRuntime.exports.jsx(default_1$6,{fontSize:"small",style:{fill:"#555F7C",width:"18px!important",height:"18px!important"}})}))]})),jsxRuntime.exports.jsx("div",{children:jsxRuntime.exports.jsx(FormGroup,Object.assign({className:a.group},{children:t.map(({text:e,value:t})=>{if(!c.includes(r))return jsxRuntime.exports.jsx(FormControlLabel,{control:jsxRuntime.exports.jsx(Checkbox,{checked:d[n]&&d[n].includes(t),name:t,color:"primary",onClick:()=>f(n,t)}),label:jsxRuntime.exports.jsx(Typography,Object.assign({"data-test":"flow-center-flows-table-optionText",className:a.listItemTextFilters},{children:e})),"data-test":"flow-center-filter-item",id:"flow-center-filter-item"},n+"-"+t)})}))})]}),n+r)},n+r))}))]}))]}))}))}const MIN_NUM_ITEM_ON_ROW=3,useStyles$c=makeStyles()(e=>({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",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:{height:"30px!important",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:"60%!important",overflow:"hidden!important",textOverflow:"ellipsis!important"},bottomButton:{marginTop:"27px",padding:"0px!important",display:"flex"},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=({goToTemplateList:e,createNewFlow:n,setScreen:t,handleOpenTemplateDetails:r})=>{const i=useDispatch(),s=useStyles$c()["classes"],[o,a]=react.exports.useState([]),[l,c]=react.exports.useState(0),u=useSelector(sessionTokenSelector),d=(e,t)=>{e.data[t].records&&a(e.data[t].records),c(Math.min(MIN_NUM_ITEM_ON_ROW,e.data[t].records.length))},m=(react.exports.useEffect(()=>{o.length||fetchTemplateGallery(u).then(e=>d(e,"flowTemplates")).catch(()=>{fetchTemplateGalleryFallback(u).then(e=>d(e,"flows")).catch(()=>console.log("error fetching flow templates from fallback"))})},[d]),e=>{t(ENGINE_OWNER_TYPES.TEMPLATES),i(setOpenTemplate({id:e.id,title:e.title})),r(!0)});return jsxRuntime.exports.jsxs("div",Object.assign({className:s.container},{children:[jsxRuntime.exports.jsxs(Box$1,Object.assign({mt:2,mb:2,className:s.box},{children:[jsxRuntime.exports.jsx(Typography,Object.assign({"data-test":"flow-center-flows-table-populatTemplates",className:s.text,style:{flexGrow:1}},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-flow-center.1v6wsw",defaultMessage:"Popular Templates",description:"Templates screen"})})),jsxRuntime.exports.jsx(Button,Object.assign({"data-test":"flow-center-template-gallery-viewAllTemplates",size:"small",className:s.viewAllButton,onClick:e},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-flow-center.viewall",defaultMessage:"View All",description:"View All Templates Button"})}))]})),jsxRuntime.exports.jsx(Grid,Object.assign({"data-test":"flow-center-templates-on-flows-page",container:!0,id:"flow-center-templates"},{children:o.slice(0,l).map((e,t)=>jsxRuntime.exports.jsx(Grid,Object.assign({"data-test":"flow-center-templatesGallery",item:!0,xs:4},{children:jsxRuntime.exports.jsx(Card,Object.assign({className:s.cardRoot,id:"flow-center-template-card"},{children:jsxRuntime.exports.jsxs("div",Object.assign({className:s.cardContainer},{children:[jsxRuntime.exports.jsxs(CardContent,Object.assign({className:s.cardContent},{children:[jsxRuntime.exports.jsx(Typography,Object.assign({"data-test":"flow-center-flows-templateGallery-title",className:s.title,gutterBottom:!0,onClick:()=>m(e)},{children:null==e?void 0:e.title})),jsxRuntime.exports.jsx(Typography,Object.assign({"data-test":"flow-center-flows-templateGallery-subtitle",className:s.subtitle,"aria-multiline":!0,variant:"body2",component:"p"},{children:e.subtitle})),jsxRuntime.exports.jsxs("div",Object.assign({className:s.veritoneCertifiedContainer},{children:[jsxRuntime.exports.jsx("img",{src:img$i,alt:"veritoneCertifiedIcon"}),jsxRuntime.exports.jsx(Typography,Object.assign({"data-test":"flow-center-flows-templateGallery-veritoneCertified",className:s.veritoneCertified,component:"p"},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-flow-center.veritonecertified",defaultMessage:"Veritone Certified",description:"Veritone Certified Template Text"})}))]}))]})),jsxRuntime.exports.jsxs(CardActions,Object.assign({className:s.bottomButton},{children:[jsxRuntime.exports.jsx(Button,Object.assign({"data-test":"flow-center-template-gallery-createFlowFromTemplate-"+t,onClick:()=>n?n(e):"",id:"flow-center-create-flow-btn-"+t,size:"small",variant:"outlined",color:"primary",className:s.createFlowButton},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-flow-center.createflow",defaultMessage:"Create Flow",description:"Complete Flow Button Text"})})),jsxRuntime.exports.jsx(Button,Object.assign({"data-test":"flow-center-template-gallery-viewDetailsForTemplate-"+t,onClick:()=>m(e),size:"small",color:"primary",className:s.viewDetailsButton},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-flow-center.viewdetails",defaultMessage:"View Details",description:"View Details Button Text"})}))]}))]}))}))}),e.title+t))}))]}))};var luxon={};function _defineProperties(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function _createClass(e,t,n){return t&&_defineProperties(e.prototype,t),n&&_defineProperties(e,n),e}function _inheritsLoose(e,t){e.prototype=Object.create(t.prototype),(e.prototype.constructor=e).__proto__=t}function _getPrototypeOf(e){return(_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function _setPrototypeOf(e,t){return(_setPrototypeOf=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function _isNativeReflectConstruct(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(e){return!1}}function _construct(e,t,n){return(_construct=_isNativeReflectConstruct()?Reflect.construct:function(e,t,n){var r=[null];r.push.apply(r,t);t=new(Function.bind.apply(e,r));return n&&_setPrototypeOf(t,n.prototype),t}).apply(null,arguments)}function _isNativeFunction(e){return-1!==Function.toString.call(e).indexOf("[native code]")}function _wrapNativeSuper(e){var n="function"==typeof Map?new Map:void 0;return(_wrapNativeSuper=function(e){if(null===e||!_isNativeFunction(e))return e;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==n){if(n.has(e))return n.get(e);n.set(e,t)}function t(){return _construct(e,arguments,_getPrototypeOf(this).constructor)}return t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),_setPrototypeOf(t,e)})(e)}function _objectWithoutPropertiesLoose(e,t){if(null==e)return{};for(var n,r={},i=Object.keys(e),s=0;s<i.length;s++)n=i[s],0<=t.indexOf(n)||(r[n]=e[n]);return r}function _unsupportedIterableToArray(e,t){if(e){if("string"==typeof e)return _arrayLikeToArray(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Map"===(n="Object"===n&&e.constructor?e.constructor.name:n)||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?_arrayLikeToArray(e,t):void 0}}function _arrayLikeToArray(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function _createForOfIteratorHelperLoose(e){var t=0;if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator])return(t=e[Symbol.iterator]()).next.bind(t);if(Array.isArray(e)||(e=_unsupportedIterableToArray(e)))return function(){return t>=e.length?{done:!0}:{done:!1,value:e[t++]}};throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}Object.defineProperty(luxon,"__esModule",{value:!0});var LuxonError=function(e){function t(){return e.apply(this,arguments)||this}return _inheritsLoose(t,e),t}(_wrapNativeSuper(Error)),InvalidDateTimeError=function(t){function e(e){return t.call(this,"Invalid DateTime: "+e.toMessage())||this}return _inheritsLoose(e,t),e}(LuxonError),InvalidIntervalError=function(t){function e(e){return t.call(this,"Invalid Interval: "+e.toMessage())||this}return _inheritsLoose(e,t),e}(LuxonError),InvalidDurationError=function(t){function e(e){return t.call(this,"Invalid Duration: "+e.toMessage())||this}return _inheritsLoose(e,t),e}(LuxonError),ConflictingSpecificationError=function(e){function t(){return e.apply(this,arguments)||this}return _inheritsLoose(t,e),t}(LuxonError),InvalidUnitError=function(t){function e(e){return t.call(this,"Invalid unit "+e)||this}return _inheritsLoose(e,t),e}(LuxonError),InvalidArgumentError=function(e){function t(){return e.apply(this,arguments)||this}return _inheritsLoose(t,e),t}(LuxonError),ZoneIsAbstractError=function(e){function t(){return e.call(this,"Zone is an abstract class")||this}return _inheritsLoose(t,e),t}(LuxonError),n="numeric",s="short",l="long",DATE_SHORT={year:n,month:n,day:n},DATE_MED={year:n,month:s,day:n},DATE_MED_WITH_WEEKDAY={year:n,month:s,day:n,weekday:s},DATE_FULL={year:n,month:l,day:n},DATE_HUGE={year:n,month:l,day:n,weekday:l},TIME_SIMPLE={hour:n,minute:n},TIME_WITH_SECONDS={hour:n,minute:n,second:n},TIME_WITH_SHORT_OFFSET={hour:n,minute:n,second:n,timeZoneName:s},TIME_WITH_LONG_OFFSET={hour:n,minute:n,second:n,timeZoneName:l},TIME_24_SIMPLE={hour:n,minute:n,hour12:!1},TIME_24_WITH_SECONDS={hour:n,minute:n,second:n,hour12:!1},TIME_24_WITH_SHORT_OFFSET={hour:n,minute:n,second:n,hour12:!1,timeZoneName:s},TIME_24_WITH_LONG_OFFSET={hour:n,minute:n,second:n,hour12:!1,timeZoneName:l},DATETIME_SHORT={year:n,month:n,day:n,hour:n,minute:n},DATETIME_SHORT_WITH_SECONDS={year:n,month:n,day:n,hour:n,minute:n,second:n},DATETIME_MED={year:n,month:s,day:n,hour:n,minute:n},DATETIME_MED_WITH_SECONDS={year:n,month:s,day:n,hour:n,minute:n,second:n},DATETIME_MED_WITH_WEEKDAY={year:n,month:s,day:n,weekday:s,hour:n,minute:n},DATETIME_FULL={year:n,month:l,day:n,hour:n,minute:n,timeZoneName:s},DATETIME_FULL_WITH_SECONDS={year:n,month:l,day:n,hour:n,minute:n,second:n,timeZoneName:s},DATETIME_HUGE={year:n,month:l,day:n,weekday:l,hour:n,minute:n,timeZoneName:l},DATETIME_HUGE_WITH_SECONDS={year:n,month:l,day:n,weekday:l,hour:n,minute:n,second:n,timeZoneName:l};function isUndefined(e){return void 0===e}function isNumber(e){return"number"==typeof e}function isInteger(e){return"number"==typeof e&&e%1==0}function isString(e){return"string"==typeof e}function isDate(e){return"[object Date]"===Object.prototype.toString.call(e)}function hasIntl(){try{return"undefined"!=typeof Intl&&Intl.DateTimeFormat}catch(e){return!1}}function hasFormatToParts(){return!isUndefined(Intl.DateTimeFormat.prototype.formatToParts)}function hasRelative(){try{return"undefined"!=typeof Intl&&!!Intl.RelativeTimeFormat}catch(e){return!1}}function maybeArray(e){return Array.isArray(e)?e:[e]}function bestBy(e,n,r){if(0!==e.length)return e.reduce(function(e,t){t=[n(t),t];return e&&r(e[0],t[0])===e[0]?e:t},null)[1]}function pick(n,e){return e.reduce(function(e,t){return e[t]=n[t],e},{})}function hasOwnProperty(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function integerBetween(e,t,n){return isInteger(e)&&t<=e&&e<=n}function floorMod(e,t){return e-t*Math.floor(e/t)}function padStart(e,t){void 0===t&&(t=2);var n=e<0?"-":"",e=n?-1*e:e,t=e.toString().length<t?("0".repeat(t)+e).slice(-t):e.toString();return n+t}function parseInteger(e){if(!isUndefined(e)&&null!==e&&""!==e)return parseInt(e,10)}function parseMillis(e){if(!isUndefined(e)&&null!==e&&""!==e)return e=1e3*parseFloat("0."+e),Math.floor(e)}function roundTo(e,t,n){void 0===n&&(n=!1);t=Math.pow(10,t);return(n?Math.trunc:Math.round)(e*t)/t}function isLeapYear(e){return e%4==0&&(e%100!=0||e%400==0)}function daysInYear(e){return isLeapYear(e)?366:365}function daysInMonth(e,t){var n=floorMod(t-1,12)+1;return 2===n?isLeapYear(e+(t-n)/12)?29:28:[31,null,31,30,31,30,31,31,30,31,30,31][n-1]}function objToLocalTS(e){var t=Date.UTC(e.year,e.month-1,e.day,e.hour,e.minute,e.second,e.millisecond);return e.year<100&&0<=e.year&&(t=new Date(t)).setUTCFullYear(t.getUTCFullYear()-1900),+t}function weeksInWeekYear(e){var t=(e+Math.floor(e/4)-Math.floor(e/100)+Math.floor(e/400))%7,e=e-1,e=(e+Math.floor(e/4)-Math.floor(e/100)+Math.floor(e/400))%7;return 4==t||3==e?53:52}function untruncateYear(e){return 99<e?e:60<e?1900+e:2e3+e}function parseZoneInfo(e,t,n,r){void 0===r&&(r=null);var i,e=new Date(e),s={hour12:!1,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"},r=(r&&(s.timeZone=r),Object.assign({timeZoneName:t},s)),t=hasIntl();return t&&hasFormatToParts()?(i=new Intl.DateTimeFormat(n,r).formatToParts(e).find(function(e){return"timezonename"===e.type.toLowerCase()}))?i.value:null:t?(i=new Intl.DateTimeFormat(n,s).format(e),new Intl.DateTimeFormat(n,r).format(e).substring(i.length).replace(/^[, \u200e]+/,"")):null}function signedOffset(e,t){e=parseInt(e,10),Number.isNaN(e)&&(e=0),t=parseInt(t,10)||0;return 60*e+(e<0||Object.is(e,-0)?-t:t)}function asNumber(e){var t=Number(e);if("boolean"==typeof e||""===e||Number.isNaN(t))throw new InvalidArgumentError("Invalid unit value "+e);return t}function normalizeObject(e,t,n){var r,i,s={};for(r in e)!hasOwnProperty(e,r)||0<=n.indexOf(r)||null!=(i=e[r])&&(s[t(r)]=asNumber(i));return s}function formatOffset(e,t){var n=Math.trunc(Math.abs(e/60)),r=Math.trunc(Math.abs(e%60)),i=0<=e?"+":"-";switch(t){case"short":return i+padStart(n,2)+":"+padStart(r,2);case"narrow":return i+n+(0<r?":"+r:"");case"techie":return i+padStart(n,2)+padStart(r,2);default:throw new RangeError("Value format "+t+" is out of range for property format")}}function timeObject(e){return pick(e,["hour","minute","second","millisecond"])}var ianaRegex=/[A-Za-z_+-]{1,256}(:?\/[A-Za-z_+-]{1,256}(\/[A-Za-z_+-]{1,256})?)?/;function stringify(e){return JSON.stringify(e,Object.keys(e).sort())}var monthsLong=["January","February","March","April","May","June","July","August","September","October","November","December"],monthsShort=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],monthsNarrow=["J","F","M","A","M","J","J","A","S","O","N","D"];function months(e){switch(e){case"narrow":return[].concat(monthsNarrow);case"short":return[].concat(monthsShort);case"long":return[].concat(monthsLong);case"numeric":return["1","2","3","4","5","6","7","8","9","10","11","12"];case"2-digit":return["01","02","03","04","05","06","07","08","09","10","11","12"];default:return null}}var weekdaysLong=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],weekdaysShort=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],weekdaysNarrow=["M","T","W","T","F","S","S"];function weekdays(e){switch(e){case"narrow":return[].concat(weekdaysNarrow);case"short":return[].concat(weekdaysShort);case"long":return[].concat(weekdaysLong);case"numeric":return["1","2","3","4","5","6","7"];default:return null}}var meridiems=["AM","PM"],erasLong=["Before Christ","Anno Domini"],erasShort=["BC","AD"],erasNarrow=["B","A"];function eras(e){switch(e){case"narrow":return[].concat(erasNarrow);case"short":return[].concat(erasShort);case"long":return[].concat(erasLong);default:return null}}function meridiemForDateTime(e){return meridiems[e.hour<12?0:1]}function weekdayForDateTime(e,t){return weekdays(t)[e.weekday-1]}function monthForDateTime(e,t){return months(t)[e.month-1]}function eraForDateTime(e,t){return eras(t)[e.year<0?0:1]}function formatRelativeTime(e,t,n,r){void 0===n&&(n="always"),void 0===r&&(r=!1);var i={years:["year","yr."],quarters:["quarter","qtr."],months:["month","mo."],weeks:["week","wk."],days:["day","day","days"],hours:["hour","hr."],minutes:["minute","min."],seconds:["second","sec."]},s=-1===["hours","minutes","seconds"].indexOf(e);if("auto"===n&&s){var o="days"===e;switch(t){case 1:return o?"tomorrow":"next "+i[e][0];case-1:return o?"yesterday":"last "+i[e][0];case 0:return o?"today":"this "+i[e][0]}}var n=Object.is(t,-0)||t<0,s=Math.abs(t),t=1===s,a=i[e],r=r?!t&&a[2]||a[1]:t?i[e][0]:e;return n?s+" "+r+" ago":"in "+s+" "+r}function formatString(e){var t="EEEE, LLLL d, yyyy, h:mm a";switch(stringify(pick(e,["weekday","era","year","month","day","hour","minute","second","timeZoneName","hour12"]))){case stringify(DATE_SHORT):return"M/d/yyyy";case stringify(DATE_MED):return"LLL d, yyyy";case stringify(DATE_MED_WITH_WEEKDAY):return"EEE, LLL d, yyyy";case stringify(DATE_FULL):return"LLLL d, yyyy";case stringify(DATE_HUGE):return"EEEE, LLLL d, yyyy";case stringify(TIME_SIMPLE):return"h:mm a";case stringify(TIME_WITH_SECONDS):return"h:mm:ss a";case stringify(TIME_WITH_SHORT_OFFSET):case stringify(TIME_WITH_LONG_OFFSET):return"h:mm a";case stringify(TIME_24_SIMPLE):return"HH:mm";case stringify(TIME_24_WITH_SECONDS):return"HH:mm:ss";case stringify(TIME_24_WITH_SHORT_OFFSET):case stringify(TIME_24_WITH_LONG_OFFSET):return"HH:mm";case stringify(DATETIME_SHORT):return"M/d/yyyy, h:mm a";case stringify(DATETIME_MED):return"LLL d, yyyy, h:mm a";case stringify(DATETIME_FULL):return"LLLL d, yyyy, h:mm a";case stringify(DATETIME_HUGE):return t;case stringify(DATETIME_SHORT_WITH_SECONDS):return"M/d/yyyy, h:mm:ss a";case stringify(DATETIME_MED_WITH_SECONDS):return"LLL d, yyyy, h:mm:ss a";case stringify(DATETIME_MED_WITH_WEEKDAY):return"EEE, d LLL yyyy, h:mm a";case stringify(DATETIME_FULL_WITH_SECONDS):return"LLLL d, yyyy, h:mm:ss a";case stringify(DATETIME_HUGE_WITH_SECONDS):return"EEEE, LLLL d, yyyy, h:mm:ss a";default:return t}}function stringifyTokens(e,t){for(var n="",r=_createForOfIteratorHelperLoose(e);!(i=r()).done;){var i=i.value;i.literal?n+=i.val:n+=t(i.val)}return n}var _macroTokenToFormatOpts={D:DATE_SHORT,DD:DATE_MED,DDD:DATE_FULL,DDDD:DATE_HUGE,t:TIME_SIMPLE,tt:TIME_WITH_SECONDS,ttt:TIME_WITH_SHORT_OFFSET,tttt:TIME_WITH_LONG_OFFSET,T:TIME_24_SIMPLE,TT:TIME_24_WITH_SECONDS,TTT:TIME_24_WITH_SHORT_OFFSET,TTTT:TIME_24_WITH_LONG_OFFSET,f:DATETIME_SHORT,ff:DATETIME_MED,fff:DATETIME_FULL,ffff:DATETIME_HUGE,F:DATETIME_SHORT_WITH_SECONDS,FF:DATETIME_MED_WITH_SECONDS,FFF:DATETIME_FULL_WITH_SECONDS,FFFF:DATETIME_HUGE_WITH_SECONDS},Formatter=function(){function m(e,t){this.opts=t,this.loc=e,this.systemLoc=null}m.create=function(e,t){return new m(e,t=void 0===t?{}:t)},m.parseFormat=function(e){for(var t=null,n="",r=!1,i=[],s=0;s<e.length;s++){var o=e.charAt(s);"'"===o?(0<n.length&&i.push({literal:r,val:n}),t=null,n="",r=!r):r||o===t?n+=o:(0<n.length&&i.push({literal:!1,val:n}),t=n=o)}return 0<n.length&&i.push({literal:r,val:n}),i},m.macroTokenToFormatOpts=function(e){return _macroTokenToFormatOpts[e]};var e=m.prototype;return e.formatWithSystemDefault=function(e,t){return null===this.systemLoc&&(this.systemLoc=this.loc.redefaultToSystem()),this.systemLoc.dtFormatter(e,Object.assign({},this.opts,t)).format()},e.formatDateTime=function(e,t){return void 0===t&&(t={}),this.loc.dtFormatter(e,Object.assign({},this.opts,t)).format()},e.formatDateTimeParts=function(e,t){return void 0===t&&(t={}),this.loc.dtFormatter(e,Object.assign({},this.opts,t)).formatToParts()},e.resolvedOptions=function(e,t){return void 0===t&&(t={}),this.loc.dtFormatter(e,Object.assign({},this.opts,t)).resolvedOptions()},e.num=function(e,t){if(void 0===t&&(t=0),this.opts.forceSimple)return padStart(e,t);var n=Object.assign({},this.opts);return 0<t&&(n.padTo=t),this.loc.numberFormatter(n).format(e)},e.formatDateTimeFromString=function(n,e){var r=this,i="en"===this.loc.listingMode(),t=this.loc.outputCalendar&&"gregory"!==this.loc.outputCalendar&&hasFormatToParts(),s=function(e,t){return r.loc.extract(n,e,t)},o=function(e){return n.isOffsetFixed&&0===n.offset&&e.allowZ?"Z":n.isValid?n.zone.formatOffset(n.ts,e.format):""},a=function(){return i?meridiemForDateTime(n):s({hour:"numeric",hour12:!0},"dayperiod")},l=function(e,t){return i?monthForDateTime(n,e):s(t?{month:e}:{month:e,day:"numeric"},"month")},c=function(e,t){return i?weekdayForDateTime(n,e):s(t?{weekday:e}:{weekday:e,month:"long",day:"numeric"},"weekday")},u=function(e){var t=m.macroTokenToFormatOpts(e);return t?r.formatWithSystemDefault(n,t):e},d=function(e){return i?eraForDateTime(n,e):s({era:e},"era")};return stringifyTokens(m.parseFormat(e),function(e){switch(e){case"S":return r.num(n.millisecond);case"u":case"SSS":return r.num(n.millisecond,3);case"s":return r.num(n.second);case"ss":return r.num(n.second,2);case"m":return r.num(n.minute);case"mm":return r.num(n.minute,2);case"h":return r.num(n.hour%12==0?12:n.hour%12);case"hh":return r.num(n.hour%12==0?12:n.hour%12,2);case"H":return r.num(n.hour);case"HH":return r.num(n.hour,2);case"Z":return o({format:"narrow",allowZ:r.opts.allowZ});case"ZZ":return o({format:"short",allowZ:r.opts.allowZ});case"ZZZ":return o({format:"techie",allowZ:r.opts.allowZ});case"ZZZZ":return n.zone.offsetName(n.ts,{format:"short",locale:r.loc.locale});case"ZZZZZ":return n.zone.offsetName(n.ts,{format:"long",locale:r.loc.locale});case"z":return n.zoneName;case"a":return a();case"d":return t?s({day:"numeric"},"day"):r.num(n.day);case"dd":return t?s({day:"2-digit"},"day"):r.num(n.day,2);case"c":return r.num(n.weekday);case"ccc":return c("short",!0);case"cccc":return c("long",!0);case"ccccc":return c("narrow",!0);case"E":return r.num(n.weekday);case"EEE":return c("short",!1);case"EEEE":return c("long",!1);case"EEEEE":return c("narrow",!1);case"L":return t?s({month:"numeric",day:"numeric"},"month"):r.num(n.month);case"LL":return t?s({month:"2-digit",day:"numeric"},"month"):r.num(n.month,2);case"LLL":return l("short",!0);case"LLLL":return l("long",!0);case"LLLLL":return l("narrow",!0);case"M":return t?s({month:"numeric"},"month"):r.num(n.month);case"MM":return t?s({month:"2-digit"},"month"):r.num(n.month,2);case"MMM":return l("short",!1);case"MMMM":return l("long",!1);case"MMMMM":return l("narrow",!1);case"y":return t?s({year:"numeric"},"year"):r.num(n.year);case"yy":return t?s({year:"2-digit"},"year"):r.num(n.year.toString().slice(-2),2);case"yyyy":return t?s({year:"numeric"},"year"):r.num(n.year,4);case"yyyyyy":return t?s({year:"numeric"},"year"):r.num(n.year,6);case"G":return d("short");case"GG":return d("long");case"GGGGG":return d("narrow");case"kk":return r.num(n.weekYear.toString().slice(-2),2);case"kkkk":return r.num(n.weekYear,4);case"W":return r.num(n.weekNumber);case"WW":return r.num(n.weekNumber,2);case"o":return r.num(n.ordinal);case"ooo":return r.num(n.ordinal,3);case"q":return r.num(n.quarter);case"qq":return r.num(n.quarter,2);case"X":return r.num(Math.floor(n.ts/1e3));case"x":return r.num(n.ts);default:return u(e)}})},e.formatDurationFromString=function(e,t){var n,r=this,i=function(e){switch(e[0]){case"S":return"millisecond";case"s":return"second";case"m":return"minute";case"h":return"hour";case"d":return"day";case"M":return"month";case"y":return"year";default:return null}},t=m.parseFormat(t),s=t.reduce(function(e,t){var n=t.literal,t=t.val;return n?e:e.concat(t)},[]),e=e.shiftTo.apply(e,s.map(i).filter(function(e){return e}));return stringifyTokens(t,(n=e,function(e){var t=i(e);return t?r.num(n.get(t),e.length):e}))},m}(),Invalid=function(){function e(e,t){this.reason=e,this.explanation=t}return e.prototype.toMessage=function(){return this.explanation?this.reason+": "+this.explanation:this.reason},e}(),Zone=function(){function e(){}var t=e.prototype;return t.offsetName=function(e,t){throw new ZoneIsAbstractError},t.formatOffset=function(e,t){throw new ZoneIsAbstractError},t.offset=function(e){throw new ZoneIsAbstractError},t.equals=function(e){throw new ZoneIsAbstractError},_createClass(e,[{key:"type",get:function(){throw new ZoneIsAbstractError}},{key:"name",get:function(){throw new ZoneIsAbstractError}},{key:"universal",get:function(){throw new ZoneIsAbstractError}},{key:"isValid",get:function(){throw new ZoneIsAbstractError}}]),e}(),singleton=null,LocalZone=function(e){function t(){return e.apply(this,arguments)||this}_inheritsLoose(t,e);var n=t.prototype;return n.offsetName=function(e,t){return parseZoneInfo(e,t.format,t.locale)},n.formatOffset=function(e,t){return formatOffset(this.offset(e),t)},n.offset=function(e){return-new Date(e).getTimezoneOffset()},n.equals=function(e){return"local"===e.type},_createClass(t,[{key:"type",get:function(){return"local"}},{key:"name",get:function(){return hasIntl()?(new Intl.DateTimeFormat).resolvedOptions().timeZone:"local"}},{key:"universal",get:function(){return!1}},{key:"isValid",get:function(){return!0}}],[{key:"instance",get:function(){return singleton=null===singleton?new t:singleton}}]),t}(Zone),matchingRegex=RegExp("^"+ianaRegex.source+"$"),dtfCache={};function makeDTF(e){return dtfCache[e]||(dtfCache[e]=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:e,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"})),dtfCache[e]}var typeToPos={year:0,month:1,day:2,hour:3,minute:4,second:5};function hackyOffset(e,t){var e=e.format(t).replace(/\u200E/g,""),t=/(\d+)\/(\d+)\/(\d+),? (\d+):(\d+):(\d+)/.exec(e),e=t[1],n=t[2];return[t[3],e,n,t[4],t[5],t[6]]}function partsOffset(e,t){for(var n=e.formatToParts(t),r=[],i=0;i<n.length;i++){var s=n[i],o=s.type,s=s.value,o=typeToPos[o];isUndefined(o)||(r[o]=parseInt(s,10))}return r}var ianaZoneCache={},IANAZone=function(n){function r(e){var t=n.call(this)||this;return t.zoneName=e,t.valid=r.isValidZone(e),t}_inheritsLoose(r,n),r.create=function(e){return ianaZoneCache[e]||(ianaZoneCache[e]=new r(e)),ianaZoneCache[e]},r.resetCache=function(){ianaZoneCache={},dtfCache={}},r.isValidSpecifier=function(e){return!(!e||!e.match(matchingRegex))},r.isValidZone=function(e){try{return new Intl.DateTimeFormat("en-US",{timeZone:e}).format(),!0}catch(e){return!1}},r.parseGMTOffset=function(e){if(e){e=e.match(/^Etc\/GMT(0|[+-]\d{1,2})$/i);if(e)return-60*parseInt(e[1])}return null};var e=r.prototype;return e.offsetName=function(e,t){return parseZoneInfo(e,t.format,t.locale,this.name)},e.formatOffset=function(e,t){return formatOffset(this.offset(e),t)},e.offset=function(e){e=new Date(e);if(isNaN(e))return NaN;var t=makeDTF(this.name),t=(t.formatToParts?partsOffset:hackyOffset)(t,e),n=t[0],r=t[1],i=t[2],s=t[3],e=+e,o=e%1e3;return(objToLocalTS({year:n,month:r,day:i,hour:24===s?0:s,minute:t[4],second:t[5],millisecond:0})-(e-=0<=o?o:1e3+o))/6e4},e.equals=function(e){return"iana"===e.type&&e.name===this.name},_createClass(r,[{key:"type",get:function(){return"iana"}},{key:"name",get:function(){return this.zoneName}},{key:"universal",get:function(){return!1}},{key:"isValid",get:function(){return this.valid}}]),r}(Zone),singleton$1=null,FixedOffsetZone=function(n){function t(e){var t=n.call(this)||this;return t.fixed=e,t}_inheritsLoose(t,n),t.instance=function(e){return 0===e?t.utcInstance:new t(e)},t.parseSpecifier=function(e){if(e){e=e.match(/^utc(?:([+-]\d{1,2})(?::(\d{2}))?)?$/i);if(e)return new t(signedOffset(e[1],e[2]))}return null},_createClass(t,null,[{key:"utcInstance",get:function(){return singleton$1=null===singleton$1?new t(0):singleton$1}}]);var e=t.prototype;return e.offsetName=function(){return this.name},e.formatOffset=function(e,t){return formatOffset(this.fixed,t)},e.offset=function(){return this.fixed},e.equals=function(e){return"fixed"===e.type&&e.fixed===this.fixed},_createClass(t,[{key:"type",get:function(){return"fixed"}},{key:"name",get:function(){return 0===this.fixed?"UTC":"UTC"+formatOffset(this.fixed,"narrow")}},{key:"universal",get:function(){return!0}},{key:"isValid",get:function(){return!0}}]),t}(Zone),InvalidZone=function(n){function e(e){var t=n.call(this)||this;return t.zoneName=e,t}_inheritsLoose(e,n);var t=e.prototype;return t.offsetName=function(){return null},t.formatOffset=function(){return""},t.offset=function(){return NaN},t.equals=function(){return!1},_createClass(e,[{key:"type",get:function(){return"invalid"}},{key:"name",get:function(){return this.zoneName}},{key:"universal",get:function(){return!1}},{key:"isValid",get:function(){return!1}}]),e}(Zone);function normalizeZone(e,t){var n;return isUndefined(e)||null===e?t:e instanceof Zone?e:isString(e)?"local"===(n=e.toLowerCase())?t:"utc"===n||"gmt"===n?FixedOffsetZone.utcInstance:null!=(t=IANAZone.parseGMTOffset(e))?FixedOffsetZone.instance(t):IANAZone.isValidSpecifier(n)?IANAZone.create(e):FixedOffsetZone.parseSpecifier(n)||new InvalidZone(e):isNumber(e)?FixedOffsetZone.instance(e):"object"==typeof e&&e.offset&&"number"==typeof e.offset?e:new InvalidZone(e)}var now=function(){return Date.now()},defaultZone=null,defaultLocale=null,defaultNumberingSystem=null,defaultOutputCalendar=null,throwOnInvalid=!1,Settings=function(){function e(){}return e.resetCaches=function(){Locale.resetCache(),IANAZone.resetCache()},_createClass(e,null,[{key:"now",get:function(){return now},set:function(e){now=e}},{key:"defaultZoneName",get:function(){return e.defaultZone.name},set:function(e){defaultZone=e?normalizeZone(e):null}},{key:"defaultZone",get:function(){return defaultZone||LocalZone.instance}},{key:"defaultLocale",get:function(){return defaultLocale},set:function(e){defaultLocale=e}},{key:"defaultNumberingSystem",get:function(){return defaultNumberingSystem},set:function(e){defaultNumberingSystem=e}},{key:"defaultOutputCalendar",get:function(){return defaultOutputCalendar},set:function(e){defaultOutputCalendar=e}},{key:"throwOnInvalid",get:function(){return throwOnInvalid},set:function(e){throwOnInvalid=e}}]),e}(),intlDTCache={};function getCachedDTF(e,t){void 0===t&&(t={});var n=JSON.stringify([e,t]),r=intlDTCache[n];return r||(r=new Intl.DateTimeFormat(e,t),intlDTCache[n]=r),r}var intlNumCache={};function getCachedINF(e,t){void 0===t&&(t={});var n=JSON.stringify([e,t]),r=intlNumCache[n];return r||(r=new Intl.NumberFormat(e,t),intlNumCache[n]=r),r}var intlRelCache={};function getCachedRTF(e,t){var n=t=void 0===t?{}:t,n=(n.base,_objectWithoutPropertiesLoose(n,["base"])),n=JSON.stringify([e,n]),r=intlRelCache[n];return r||(r=new Intl.RelativeTimeFormat(e,t),intlRelCache[n]=r),r}var sysLocaleCache=null;function systemLocale(){var e;return sysLocaleCache=sysLocaleCache||(hasIntl()?(e=(new Intl.DateTimeFormat).resolvedOptions().locale)&&"und"!==e?e:"en-US":"en-US")}function parseLocaleString(e){var t=e.indexOf("-u-");if(-1===t)return[e];var n,t=e.substring(0,t);try{n=getCachedDTF(e).resolvedOptions()}catch(e){n=getCachedDTF(t).resolvedOptions()}e=n;return[t,e.numberingSystem,e.calendar]}function intlConfigString(e,t,n){return hasIntl()?((n||t)&&(e+="-u",n&&(e+="-ca-"+n),t&&(e+="-nu-"+t)),e):[]}function mapMonths(e){for(var t=[],n=1;n<=12;n++){var r=DateTime.utc(2016,n,1);t.push(e(r))}return t}function mapWeekdays(e){for(var t=[],n=1;n<=7;n++){var r=DateTime.utc(2016,11,13+n);t.push(e(r))}return t}function listStuff(e,t,n,r,i){e=e.listingMode(n);return"error"===e?null:("en"===e?r:i)(t)}function supportsFastNumbers(e){return(!e.numberingSystem||"latn"===e.numberingSystem)&&("latn"===e.numberingSystem||!e.locale||e.locale.startsWith("en")||hasIntl()&&"latn"===new Intl.DateTimeFormat(e.intl).resolvedOptions().numberingSystem)}var PolyNumberFormatter=function(){function e(e,t,n){this.padTo=n.padTo||0,this.floor=n.floor||!1,!t&&hasIntl()&&(t={useGrouping:!1},0<n.padTo&&(t.minimumIntegerDigits=n.padTo),this.inf=getCachedINF(e,t))}return e.prototype.format=function(e){var t;return this.inf?(t=this.floor?Math.floor(e):e,this.inf.format(t)):padStart(this.floor?Math.floor(e):roundTo(e,3),this.padTo)},e}(),PolyDateFormatter=function(){function e(e,t,n){var r,i,s;this.opts=n,this.hasIntl=hasIntl(),e.zone.universal&&this.hasIntl?(i=e.offset/60*-1,s=IANAZone.isValidZone(i=0<=i?"Etc/GMT+"+i:"Etc/GMT"+i),0!==e.offset&&s?(r=i,this.dt=e):(r="UTC",n.timeZoneName?this.dt=e:this.dt=0===e.offset?e:DateTime.fromMillis(e.ts+60*e.offset*1e3))):"local"===e.zone.type?this.dt=e:r=(this.dt=e).zone.name,this.hasIntl&&(s=Object.assign({},this.opts),r&&(s.timeZone=r),this.dtf=getCachedDTF(t,s))}var t=e.prototype;return t.format=function(){var e,t;return this.hasIntl?this.dtf.format(this.dt.toJSDate()):(e=formatString(this.opts),t=Locale.create("en-US"),Formatter.create(t).formatDateTimeFromString(this.dt,e))},t.formatToParts=function(){return this.hasIntl&&hasFormatToParts()?this.dtf.formatToParts(this.dt.toJSDate()):[]},t.resolvedOptions=function(){return this.hasIntl?this.dtf.resolvedOptions():{locale:"en-US",numberingSystem:"latn",outputCalendar:"gregory"}},e}(),PolyRelFormatter=function(){function e(e,t,n){this.opts=Object.assign({style:"long"},n),!t&&hasRelative()&&(this.rtf=getCachedRTF(e,n))}var t=e.prototype;return t.format=function(e,t){return this.rtf?this.rtf.format(e,t):formatRelativeTime(t,e,this.opts.numeric,"long"!==this.opts.style)},t.formatToParts=function(e,t){return this.rtf?this.rtf.formatToParts(e,t):[]},e}(),Locale=function(){function i(e,t,n,r){var e=parseLocaleString(e),i=e[0],s=e[1],e=e[2];this.locale=i,this.numberingSystem=t||s||null,this.outputCalendar=n||e||null,this.intl=intlConfigString(this.locale,this.numberingSystem,this.outputCalendar),this.weekdaysCache={format:{},standalone:{}},this.monthsCache={format:{},standalone:{}},this.meridiemCache=null,this.eraCache={},this.specifiedLocale=r,this.fastNumbersCached=null}i.fromOpts=function(e){return i.create(e.locale,e.numberingSystem,e.outputCalendar,e.defaultToEN)},i.create=function(e,t,n,r){void 0===r&&(r=!1);e=e||Settings.defaultLocale;return new i(e||(r?"en-US":systemLocale()),t||Settings.defaultNumberingSystem,n||Settings.defaultOutputCalendar,e)},i.resetCache=function(){sysLocaleCache=null,intlDTCache={},intlNumCache={},intlRelCache={}},i.fromObject=function(e){var e=void 0===e?{}:e,t=e.locale,n=e.numberingSystem,e=e.outputCalendar;return i.create(t,n,e)};var e=i.prototype;return e.listingMode=function(e){void 0===e&&(e=!0);var t=hasIntl()&&hasFormatToParts(),n=this.isEnglish(),r=!(null!==this.numberingSystem&&"latn"!==this.numberingSystem||null!==this.outputCalendar&&"gregory"!==this.outputCalendar);return t||n&&r||e?!t||n&&r?"en":"intl":"error"},e.clone=function(e){return e&&0!==Object.getOwnPropertyNames(e).length?i.create(e.locale||this.specifiedLocale,e.numberingSystem||this.numberingSystem,e.outputCalendar||this.outputCalendar,e.defaultToEN||!1):this},e.redefaultToEN=function(e){return void 0===e&&(e={}),this.clone(Object.assign({},e,{defaultToEN:!0}))},e.redefaultToSystem=function(e){return void 0===e&&(e={}),this.clone(Object.assign({},e,{defaultToEN:!1}))},e.months=function(n,r,e){var i=this;return void 0===r&&(r=!1),listStuff(this,n,e=void 0===e?!0:e,months,function(){var t=r?{month:n,day:"numeric"}:{month:n},e=r?"format":"standalone";return i.monthsCache[e][n]||(i.monthsCache[e][n]=mapMonths(function(e){return i.extract(e,t,"month")})),i.monthsCache[e][n]})},e.weekdays=function(n,r,e){var i=this;return void 0===r&&(r=!1),listStuff(this,n,e=void 0===e?!0:e,weekdays,function(){var t=r?{weekday:n,year:"numeric",month:"long",day:"numeric"}:{weekday:n},e=r?"format":"standalone";return i.weekdaysCache[e][n]||(i.weekdaysCache[e][n]=mapWeekdays(function(e){return i.extract(e,t,"weekday")})),i.weekdaysCache[e][n]})},e.meridiems=function(e){var n=this;return listStuff(this,void 0,e=void 0===e?!0:e,function(){return meridiems},function(){var t;return n.meridiemCache||(t={hour:"numeric",hour12:!0},n.meridiemCache=[DateTime.utc(2016,11,13,9),DateTime.utc(2016,11,13,19)].map(function(e){return n.extract(e,t,"dayperiod")})),n.meridiemCache})},e.eras=function(e,t){var n=this;return listStuff(this,e,t=void 0===t?!0:t,eras,function(){var t={era:e};return n.eraCache[e]||(n.eraCache[e]=[DateTime.utc(-40,1,1),DateTime.utc(2017,1,1)].map(function(e){return n.extract(e,t,"era")})),n.eraCache[e]})},e.extract=function(e,t,n){e=this.dtFormatter(e,t).formatToParts().find(function(e){return e.type.toLowerCase()===n});return e?e.value:null},e.numberFormatter=function(e){return new PolyNumberFormatter(this.intl,(e=void 0===e?{}:e).forceSimple||this.fastNumbers,e)},e.dtFormatter=function(e,t){return new PolyDateFormatter(e,this.intl,t=void 0===t?{}:t)},e.relFormatter=function(e){return void 0===e&&(e={}),new PolyRelFormatter(this.intl,this.isEnglish(),e)},e.isEnglish=function(){return"en"===this.locale||"en-us"===this.locale.toLowerCase()||hasIntl()&&new Intl.DateTimeFormat(this.intl).resolvedOptions().locale.startsWith("en-us")},e.equals=function(e){return this.locale===e.locale&&this.numberingSystem===e.numberingSystem&&this.outputCalendar===e.outputCalendar},_createClass(i,[{key:"fastNumbers",get:function(){return null==this.fastNumbersCached&&(this.fastNumbersCached=supportsFastNumbers(this)),this.fastNumbersCached}}]),i}();function combineRegexes(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=t.reduce(function(e,t){return e+t.source},"");return RegExp("^"+r+"$")}function combineExtractors(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(s){return t.reduce(function(e,t){var n=e[0],r=e[1],e=e[2],t=t(s,e),e=t[0],i=t[1],t=t[2];return[Object.assign(n,e),r||i,t]},[{},null,1]).slice(0,2)}}function parse(e){if(null==e)return[null,null];for(var t=arguments.length,n=new Array(1<t?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];for(var i=0,s=n;i<s.length;i++){var o=s[i],a=o[0],o=o[1],a=a.exec(e);if(a)return o(a)}return[null,null]}function simpleParse(){for(var e=arguments.length,i=new Array(e),t=0;t<e;t++)i[t]=arguments[t];return function(e,t){for(var n={},r=0;r<i.length;r++)n[i[r]]=parseInteger(e[t+r]);return[n,null,t+r]}}var offsetRegex=/(?:(Z)|([+-]\d\d)(?::?(\d\d))?)/,isoTimeBaseRegex=/(\d\d)(?::?(\d\d)(?::?(\d\d)(?:[.,](\d{1,30}))?)?)?/,isoTimeRegex=RegExp(""+isoTimeBaseRegex.source+offsetRegex.source+"?"),isoTimeExtensionRegex=RegExp("(?:T"+isoTimeRegex.source+")?"),isoYmdRegex=/([+-]\d{6}|\d{4})(?:-?(\d\d)(?:-?(\d\d))?)?/,isoWeekRegex=/(\d{4})-?W(\d\d)(?:-?(\d))?/,isoOrdinalRegex=/(\d{4})-?(\d{3})/,extractISOWeekData=simpleParse("weekYear","weekNumber","weekDay"),extractISOOrdinalData=simpleParse("year","ordinal"),sqlYmdRegex=/(\d{4})-(\d\d)-(\d\d)/,sqlTimeRegex=RegExp(isoTimeBaseRegex.source+" ?(?:"+offsetRegex.source+"|("+ianaRegex.source+"))?"),sqlTimeExtensionRegex=RegExp("(?: "+sqlTimeRegex.source+")?");function int(e,t,n){e=e[t];return isUndefined(e)?n:parseInteger(e)}function extractISOYmd(e,t){return[{year:int(e,t),month:int(e,t+1,1),day:int(e,t+2,1)},null,t+3]}function extractISOTime(e,t){return[{hours:int(e,t,0),minutes:int(e,t+1,0),seconds:int(e,t+2,0),milliseconds:parseMillis(e[t+3])},null,t+4]}function extractISOOffset(e,t){var n=!e[t]&&!e[t+1],e=signedOffset(e[t+1],e[t+2]);return[{},n?null:FixedOffsetZone.instance(e),t+3]}function extractIANAZone(e,t){return[{},e[t]?IANAZone.create(e[t]):null,t+1]}var isoTimeOnly=RegExp("^T?"+isoTimeBaseRegex.source+"$"),isoDuration=/^-?P(?:(?:(-?\d{1,9})Y)?(?:(-?\d{1,9})M)?(?:(-?\d{1,9})W)?(?:(-?\d{1,9})D)?(?:T(?:(-?\d{1,9})H)?(?:(-?\d{1,9})M)?(?:(-?\d{1,20})(?:[.,](-?\d{1,9}))?S)?)?)$/;function extractISODuration(e){function t(e,t){return void 0===t&&(t=!1),void 0!==e&&(t||e&&u)?-e:e}var n=e[0],r=e[1],i=e[2],s=e[3],o=e[4],a=e[5],l=e[6],c=e[7],e=e[8],u="-"===n[0],n=c&&"-"===c[0];return[{years:t(parseInteger(r)),months:t(parseInteger(i)),weeks:t(parseInteger(s)),days:t(parseInteger(o)),hours:t(parseInteger(a)),minutes:t(parseInteger(l)),seconds:t(parseInteger(c),"-0"===c),milliseconds:t(parseMillis(e),n)}]}var obsOffsets={GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function fromStrings(e,t,n,r,i,s,o){t={year:2===t.length?untruncateYear(parseInteger(t)):parseInteger(t),month:monthsShort.indexOf(n)+1,day:parseInteger(r),hour:parseInteger(i),minute:parseInteger(s)};return o&&(t.second=parseInteger(o)),e&&(t.weekday=3<e.length?weekdaysLong.indexOf(e)+1:weekdaysShort.indexOf(e)+1),t}var rfc2822=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|(?:([+-]\d\d)(\d\d)))$/;function extractRFC2822(e){var t=e[1],n=e[2],r=e[3],i=e[4],s=e[5],o=e[6],a=e[7],l=e[8],c=e[9],u=e[10],e=e[11],t=fromStrings(t,i,r,n,s,o,a),i=l?obsOffsets[l]:c?0:signedOffset(u,e);return[t,new FixedOffsetZone(i)]}function preprocessRFC2822(e){return e.replace(/\([^)]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").trim()}var rfc1123=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun), (\d\d) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\d{4}) (\d\d):(\d\d):(\d\d) GMT$/,rfc850=/^(Monday|Tuesday|Wedsday|Thursday|Friday|Saturday|Sunday), (\d\d)-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\d\d) (\d\d):(\d\d):(\d\d) GMT$/,ascii=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ( \d|\d\d) (\d\d):(\d\d):(\d\d) (\d{4})$/;function extractRFC1123Or850(e){var t=e[1],n=e[2],r=e[3];return[fromStrings(t,e[4],r,n,e[5],e[6],e[7]),FixedOffsetZone.utcInstance]}function extractASCII(e){var t=e[1],n=e[2],r=e[3],i=e[4],s=e[5],o=e[6];return[fromStrings(t,e[7],n,r,i,s,o),FixedOffsetZone.utcInstance]}var isoYmdWithTimeExtensionRegex=combineRegexes(isoYmdRegex,isoTimeExtensionRegex),isoWeekWithTimeExtensionRegex=combineRegexes(isoWeekRegex,isoTimeExtensionRegex),isoOrdinalWithTimeExtensionRegex=combineRegexes(isoOrdinalRegex,isoTimeExtensionRegex),isoTimeCombinedRegex=combineRegexes(isoTimeRegex),extractISOYmdTimeAndOffset=combineExtractors(extractISOYmd,extractISOTime,extractISOOffset),extractISOWeekTimeAndOffset=combineExtractors(extractISOWeekData,extractISOTime,extractISOOffset),extractISOOrdinalDateAndTime=combineExtractors(extractISOOrdinalData,extractISOTime,extractISOOffset),extractISOTimeAndOffset=combineExtractors(extractISOTime,extractISOOffset);function parseISODate(e){return parse(e,[isoYmdWithTimeExtensionRegex,extractISOYmdTimeAndOffset],[isoWeekWithTimeExtensionRegex,extractISOWeekTimeAndOffset],[isoOrdinalWithTimeExtensionRegex,extractISOOrdinalDateAndTime],[isoTimeCombinedRegex,extractISOTimeAndOffset])}function parseRFC2822Date(e){return parse(preprocessRFC2822(e),[rfc2822,extractRFC2822])}function parseHTTPDate(e){return parse(e,[rfc1123,extractRFC1123Or850],[rfc850,extractRFC1123Or850],[ascii,extractASCII])}function parseISODuration(e){return parse(e,[isoDuration,extractISODuration])}var extractISOTimeOnly=combineExtractors(extractISOTime);function parseISOTimeOnly(e){return parse(e,[isoTimeOnly,extractISOTimeOnly])}var sqlYmdWithTimeExtensionRegex=combineRegexes(sqlYmdRegex,sqlTimeExtensionRegex),sqlTimeCombinedRegex=combineRegexes(sqlTimeRegex),extractISOYmdTimeOffsetAndIANAZone=combineExtractors(extractISOYmd,extractISOTime,extractISOOffset,extractIANAZone),extractISOTimeOffsetAndIANAZone=combineExtractors(extractISOTime,extractISOOffset,extractIANAZone);function parseSQL(e){return parse(e,[sqlYmdWithTimeExtensionRegex,extractISOYmdTimeOffsetAndIANAZone],[sqlTimeCombinedRegex,extractISOTimeOffsetAndIANAZone])}var INVALID="Invalid Duration",lowOrderMatrix={weeks:{days:7,hours:168,minutes:10080,seconds:604800,milliseconds:6048e5},days:{hours:24,minutes:1440,seconds:86400,milliseconds:864e5},hours:{minutes:60,seconds:3600,milliseconds:36e5},minutes:{seconds:60,milliseconds:6e4},seconds:{milliseconds:1e3}},casualMatrix=Object.assign({years:{quarters:4,months:12,weeks:52,days:365,hours:8760,minutes:525600,seconds:31536e3,milliseconds:31536e6},quarters:{months:3,weeks:13,days:91,hours:2184,minutes:131040,seconds:7862400,milliseconds:78624e5},months:{weeks:4,days:30,hours:720,minutes:43200,seconds:2592e3,milliseconds:2592e6}},lowOrderMatrix),daysInYearAccurate=365.2425,daysInMonthAccurate=30.436875,accurateMatrix=Object.assign({years:{quarters:4,months:12,weeks:daysInYearAccurate/7,days:daysInYearAccurate,hours:24*daysInYearAccurate,minutes:24*daysInYearAccurate*60,seconds:24*daysInYearAccurate*60*60,milliseconds:24*daysInYearAccurate*60*60*1e3},quarters:{months:3,weeks:daysInYearAccurate/28,days:daysInYearAccurate/4,hours:24*daysInYearAccurate/4,minutes:24*daysInYearAccurate*60/4,seconds:24*daysInYearAccurate*60*60/4,milliseconds:24*daysInYearAccurate*60*60*1e3/4},months:{weeks:daysInMonthAccurate/7,days:daysInMonthAccurate,hours:24*daysInMonthAccurate,minutes:24*daysInMonthAccurate*60,seconds:24*daysInMonthAccurate*60*60,milliseconds:24*daysInMonthAccurate*60*60*1e3}},lowOrderMatrix),orderedUnits=["years","quarters","months","weeks","days","hours","minutes","seconds","milliseconds"],reverseUnits=orderedUnits.slice(0).reverse();function clone(e,t,n){n={values:(n=void 0===n?!1:n)?t.values:Object.assign({},e.values,t.values||{}),loc:e.loc.clone(t.loc),conversionAccuracy:t.conversionAccuracy||e.conversionAccuracy};return new Duration(n)}function antiTrunc(e){return e<0?Math.floor(e):Math.ceil(e)}function convert(e,t,n,r,i){var e=e[i][n],s=t[n]/e,s=!(Math.sign(s)===Math.sign(r[i]))&&0!==r[i]&&Math.abs(s)<=1?antiTrunc(s):Math.trunc(s);r[i]+=s,t[n]-=s*e}function normalizeValues(n,r){reverseUnits.reduce(function(e,t){return isUndefined(r[t])?e:(e&&convert(n,r,e,r,t),t)},null)}var Duration=function(){function f(e){var t="longterm"===e.conversionAccuracy||!1;this.values=e.values,this.loc=e.loc||Locale.create(),this.conversionAccuracy=t?"longterm":"casual",this.invalid=e.invalid||null,this.matrix=t?accurateMatrix:casualMatrix,this.isLuxonDuration=!0}f.fromMillis=function(e,t){return f.fromObject(Object.assign({milliseconds:e},t))},f.fromObject=function(e){if(null==e||"object"!=typeof e)throw new InvalidArgumentError("Duration.fromObject: argument expected to be an object, got "+(null===e?"null":typeof e));return new f({values:normalizeObject(e,f.normalizeUnit,["locale","numberingSystem","conversionAccuracy","zone"]),loc:Locale.fromObject(e),conversionAccuracy:e.conversionAccuracy})},f.fromISO=function(e,t){var n=parseISODuration(e)[0];return n?(n=Object.assign(n,t),f.fromObject(n)):f.invalid("unparsable",'the input "'+e+"\" can't be parsed as ISO 8601")},f.fromISOTime=function(e,t){var n=parseISOTimeOnly(e)[0];return n?(n=Object.assign(n,t),f.fromObject(n)):f.invalid("unparsable",'the input "'+e+"\" can't be parsed as ISO 8601")},f.invalid=function(e,t){if(void 0===t&&(t=null),!e)throw new InvalidArgumentError("need to specify a reason the Duration is invalid");e=e instanceof Invalid?e:new Invalid(e,t);if(Settings.throwOnInvalid)throw new InvalidDurationError(e);return new f({invalid:e})},f.normalizeUnit=function(e){var t={year:"years",years:"years",quarter:"quarters",quarters:"quarters",month:"months",months:"months",week:"weeks",weeks:"weeks",day:"days",days:"days",hour:"hours",hours:"hours",minute:"minutes",minutes:"minutes",second:"seconds",seconds:"seconds",millisecond:"milliseconds",milliseconds:"milliseconds"}[e&&e.toLowerCase()];if(t)return t;throw new InvalidUnitError(e)},f.isDuration=function(e){return e&&e.isLuxonDuration||!1};var e=f.prototype;return e.toFormat=function(e,t){void 0===t&&(t={});t=Object.assign({},t,{floor:!1!==t.round&&!1!==t.floor});return this.isValid?Formatter.create(this.loc,t).formatDurationFromString(this,e):INVALID},e.toObject=function(e){if(void 0===e&&(e={}),!this.isValid)return{};var t=Object.assign({},this.values);return e.includeConfig&&(t.conversionAccuracy=this.conversionAccuracy,t.numberingSystem=this.loc.numberingSystem,t.locale=this.loc.locale),t},e.toISO=function(){if(!this.isValid)return null;var e="P";return 0!==this.years&&(e+=this.years+"Y"),0===this.months&&0===this.quarters||(e+=this.months+3*this.quarters+"M"),0!==this.weeks&&(e+=this.weeks+"W"),0!==this.days&&(e+=this.days+"D"),0===this.hours&&0===this.minutes&&0===this.seconds&&0===this.milliseconds||(e+="T"),0!==this.hours&&(e+=this.hours+"H"),0!==this.minutes&&(e+=this.minutes+"M"),0===this.seconds&&0===this.milliseconds||(e+=roundTo(this.seconds+this.milliseconds/1e3,3)+"S"),"P"===e&&(e+="T0S"),e},e.toISOTime=function(e){if(void 0===e&&(e={}),!this.isValid)return null;var t=this.toMillis();if(t<0||864e5<=t)return null;e=Object.assign({suppressMilliseconds:!1,suppressSeconds:!1,includePrefix:!1,format:"extended"},e);var t=this.shiftTo("hours","minutes","seconds","milliseconds"),n="basic"===e.format?"hhmm":"hh:mm",t=(e.suppressSeconds&&0===t.seconds&&0===t.milliseconds||(n+="basic"===e.format?"ss":":ss",e.suppressMilliseconds&&0===t.milliseconds||(n+=".SSS")),t.toFormat(n));return t=e.includePrefix?"T"+t:t},e.toJSON=function(){return this.toISO()},e.toString=function(){return this.toISO()},e.toMillis=function(){return this.as("milliseconds")},e.valueOf=function(){return this.toMillis()},e.plus=function(e){if(!this.isValid)return this;for(var t=friendlyDuration(e),n={},r=_createForOfIteratorHelperLoose(orderedUnits);!(i=r()).done;){var i=i.value;(hasOwnProperty(t.values,i)||hasOwnProperty(this.values,i))&&(n[i]=t.get(i)+this.get(i))}return clone(this,{values:n},!0)},e.minus=function(e){if(!this.isValid)return this;e=friendlyDuration(e);return this.plus(e.negate())},e.mapUnits=function(e){if(!this.isValid)return this;for(var t={},n=0,r=Object.keys(this.values);n<r.length;n++){var i=r[n];t[i]=asNumber(e(this.values[i],i))}return clone(this,{values:t},!0)},e.get=function(e){return this[f.normalizeUnit(e)]},e.set=function(e){return this.isValid?clone(this,{values:Object.assign(this.values,normalizeObject(e,f.normalizeUnit,[]))}):this},e.reconfigure=function(e){var e=void 0===e?{}:e,t=e.locale,n=e.numberingSystem,e=e.conversionAccuracy,t={loc:this.loc.clone({locale:t,numberingSystem:n})};return e&&(t.conversionAccuracy=e),clone(this,t)},e.as=function(e){return this.isValid?this.shiftTo(e).get(e):NaN},e.normalize=function(){if(!this.isValid)return this;var e=this.toObject();return normalizeValues(this.matrix,e),clone(this,{values:e},!0)},e.shiftTo=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(!this.isValid)return this;if(0===t.length)return this;for(var r,t=t.map(function(e){return f.normalizeUnit(e)}),i={},s={},o=this.toObject(),a=_createForOfIteratorHelperLoose(orderedUnits);!(p=a()).done;){var l=p.value;if(0<=t.indexOf(l)){var c,u=l,d=0;for(c in s)d+=this.matrix[c][l]*s[c],s[c]=0;isNumber(o[l])&&(d+=o[l]);var m,p=Math.trunc(d);for(m in i[l]=p,s[l]=d-p,o)orderedUnits.indexOf(m)>orderedUnits.indexOf(l)&&convert(this.matrix,o,m,i,l)}else isNumber(o[l])&&(s[l]=o[l])}for(r in s)0!==s[r]&&(i[u]+=r===u?s[r]:s[r]/this.matrix[u][r]);return clone(this,{values:i},!0).normalize()},e.negate=function(){if(!this.isValid)return this;for(var e={},t=0,n=Object.keys(this.values);t<n.length;t++){var r=n[t];e[r]=-this.values[r]}return clone(this,{values:e},!0)},e.equals=function(e){if(!this.isValid||!e.isValid)return!1;if(!this.loc.equals(e.loc))return!1;for(var t,n=_createForOfIteratorHelperLoose(orderedUnits);!(r=n()).done;){var r=r.value;if(t=this.values[r],r=e.values[r],!(void 0===t||0===t?void 0===r||0===r:t===r))return!1}return!0},_createClass(f,[{key:"locale",get:function(){return this.isValid?this.loc.locale:null}},{key:"numberingSystem",get:function(){return this.isValid?this.loc.numberingSystem:null}},{key:"years",get:function(){return this.isValid?this.values.years||0:NaN}},{key:"quarters",get:function(){return this.isValid?this.values.quarters||0:NaN}},{key:"months",get:function(){return this.isValid?this.values.months||0:NaN}},{key:"weeks",get:function(){return this.isValid?this.values.weeks||0:NaN}},{key:"days",get:function(){return this.isValid?this.values.days||0:NaN}},{key:"hours",get:function(){return this.isValid?this.values.hours||0:NaN}},{key:"minutes",get:function(){return this.isValid?this.values.minutes||0:NaN}},{key:"seconds",get:function(){return this.isValid?this.values.seconds||0:NaN}},{key:"milliseconds",get:function(){return this.isValid?this.values.milliseconds||0:NaN}},{key:"isValid",get:function(){return null===this.invalid}},{key:"invalidReason",get:function(){return this.invalid?this.invalid.reason:null}},{key:"invalidExplanation",get:function(){return this.invalid?this.invalid.explanation:null}}]),f}();function friendlyDuration(e){if(isNumber(e))return Duration.fromMillis(e);if(Duration.isDuration(e))return e;if("object"==typeof e)return Duration.fromObject(e);throw new InvalidArgumentError("Unknown duration argument "+e+" of type "+typeof e)}var INVALID$1="Invalid Interval";function validateStartEnd(e,t){return e&&e.isValid?t&&t.isValid?t<e?Interval.invalid("end before start","The end of an interval must be after its start, but you had start="+e.toISO()+" and end="+t.toISO()):null:Interval.invalid("missing or invalid end"):Interval.invalid("missing or invalid start")}var Interval=function(){function c(e){this.s=e.start,this.e=e.end,this.invalid=e.invalid||null,this.isLuxonInterval=!0}c.invalid=function(e,t){if(void 0===t&&(t=null),!e)throw new InvalidArgumentError("need to specify a reason the Interval is invalid");e=e instanceof Invalid?e:new Invalid(e,t);if(Settings.throwOnInvalid)throw new InvalidIntervalError(e);return new c({invalid:e})},c.fromDateTimes=function(e,t){var e=friendlyDateTime(e),t=friendlyDateTime(t),n=validateStartEnd(e,t);return null==n?new c({start:e,end:t}):n},c.after=function(e,t){t=friendlyDuration(t),e=friendlyDateTime(e);return c.fromDateTimes(e,e.plus(t))},c.before=function(e,t){t=friendlyDuration(t),e=friendlyDateTime(e);return c.fromDateTimes(e.minus(t),e)},c.fromISO=function(e,t){var n,r,i,s=(e||"").split("/",2),o=s[0],a=s[1];if(o&&a){try{l=(n=DateTime.fromISO(o,t)).isValid}catch(a){l=!1}try{i=(r=DateTime.fromISO(a,t)).isValid}catch(a){i=!1}if(l&&i)return c.fromDateTimes(n,r);if(l){s=Duration.fromISO(a,t);if(s.isValid)return c.after(n,s)}else if(i){var l=Duration.fromISO(o,t);if(l.isValid)return c.before(r,l)}}return c.invalid("unparsable",'the input "'+e+"\" can't be parsed as ISO 8601")},c.isInterval=function(e){return e&&e.isLuxonInterval||!1};var e=c.prototype;return e.length=function(e){return void 0===e&&(e="milliseconds"),this.isValid?this.toDuration.apply(this,[e]).get(e):NaN},e.count=function(e){if(!this.isValid)return NaN;var t=this.start.startOf(e=void 0===e?"milliseconds":e),n=this.end.startOf(e);return Math.floor(n.diff(t,e).get(e))+1},e.hasSame=function(e){return!!this.isValid&&(this.isEmpty()||this.e.minus(1).hasSame(this.s,e))},e.isEmpty=function(){return this.s.valueOf()===this.e.valueOf()},e.isAfter=function(e){return!!this.isValid&&this.s>e},e.isBefore=function(e){return!!this.isValid&&this.e<=e},e.contains=function(e){return!!this.isValid&&(this.s<=e&&this.e>e)},e.set=function(e){var e=void 0===e?{}:e,t=e.start,e=e.end;return this.isValid?c.fromDateTimes(t||this.s,e||this.e):this},e.splitAt=function(){var t=this;if(!this.isValid)return[];for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];for(var i=n.map(friendlyDateTime).filter(function(e){return t.contains(e)}).sort(),s=[],o=this.s,a=0;o<this.e;){var l=i[a]||this.e,l=+l>+this.e?this.e:l;s.push(c.fromDateTimes(o,l)),o=l,a+=1}return s},e.splitBy=function(e){var t=friendlyDuration(e);if(!this.isValid||!t.isValid||0===t.as("milliseconds"))return[];for(var n=this.s,r=1,i=[];n<this.e;){var s=this.start.plus(t.mapUnits(function(e){return e*r})),s=+s>+this.e?this.e:s;i.push(c.fromDateTimes(n,s)),n=s,r+=1}return i},e.divideEqually=function(e){return this.isValid?this.splitBy(this.length()/e).slice(0,e):[]},e.overlaps=function(e){return this.e>e.s&&this.s<e.e},e.abutsStart=function(e){return!!this.isValid&&+this.e==+e.s},e.abutsEnd=function(e){return!!this.isValid&&+e.e==+this.s},e.engulfs=function(e){return!!this.isValid&&(this.s<=e.s&&this.e>=e.e)},e.equals=function(e){return!(!this.isValid||!e.isValid)&&(this.s.equals(e.s)&&this.e.equals(e.e))},e.intersection=function(e){if(!this.isValid)return this;var t=(this.s>e.s?this:e).s,e=(this.e<e.e?this:e).e;return e<=t?null:c.fromDateTimes(t,e)},e.union=function(e){if(!this.isValid)return this;var t=(this.s<e.s?this:e).s,e=(this.e>e.e?this:e).e;return c.fromDateTimes(t,e)},c.merge=function(e){var e=e.sort(function(e,t){return e.s-t.s}).reduce(function(e,t){var n=e[0],e=e[1];return e?e.overlaps(t)||e.abutsStart(t)?[n,e.union(t)]:[n.concat([e]),t]:[n,t]},[[],null]),t=e[0],e=e[1];return e&&t.push(e),t},c.xor=function(e){for(var t,n=null,r=0,i=[],e=e.map(function(e){return[{time:e.s,type:"s"},{time:e.e,type:"e"}]}),s=_createForOfIteratorHelperLoose((t=Array.prototype).concat.apply(t,e).sort(function(e,t){return e.time-t.time}));!(o=s()).done;)var o=o.value,n=1===(r+="s"===o.type?1:-1)?o.time:(n&&+n!=+o.time&&i.push(c.fromDateTimes(n,o.time)),null);return c.merge(i)},e.difference=function(){for(var t=this,e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return c.xor([this].concat(n)).map(function(e){return t.intersection(e)}).filter(function(e){return e&&!e.isEmpty()})},e.toString=function(){return this.isValid?"["+this.s.toISO()+" – "+this.e.toISO()+")":INVALID$1},e.toISO=function(e){return this.isValid?this.s.toISO(e)+"/"+this.e.toISO(e):INVALID$1},e.toISODate=function(){return this.isValid?this.s.toISODate()+"/"+this.e.toISODate():INVALID$1},e.toISOTime=function(e){return this.isValid?this.s.toISOTime(e)+"/"+this.e.toISOTime(e):INVALID$1},e.toFormat=function(e,t){t=(void 0===t?{}:t).separator,t=void 0===t?" – ":t;return this.isValid?""+this.s.toFormat(e)+t+this.e.toFormat(e):INVALID$1},e.toDuration=function(e,t){return this.isValid?this.e.diff(this.s,e,t):Duration.invalid(this.invalidReason)},e.mapEndpoints=function(e){return c.fromDateTimes(e(this.s),e(this.e))},_createClass(c,[{key:"start",get:function(){return this.isValid?this.s:null}},{key:"end",get:function(){return this.isValid?this.e:null}},{key:"isValid",get:function(){return null===this.invalidReason}},{key:"invalidReason",get:function(){return this.invalid?this.invalid.reason:null}},{key:"invalidExplanation",get:function(){return this.invalid?this.invalid.explanation:null}}]),c}(),Info=function(){function e(){}return e.hasDST=function(e){void 0===e&&(e=Settings.defaultZone);var t=DateTime.now().setZone(e).set({month:12});return!e.universal&&t.offset!==t.set({month:6}).offset},e.isValidIANAZone=function(e){return IANAZone.isValidSpecifier(e)&&IANAZone.isValidZone(e)},e.normalizeZone=function(e){return normalizeZone(e,Settings.defaultZone)},e.months=function(e,t){void 0===e&&(e="long");var t=void 0===t?{}:t,n=t.locale,r=t.numberingSystem,i=t.locObj,i=void 0===i?null:i,t=t.outputCalendar;return(i||Locale.create(void 0===n?null:n,void 0===r?null:r,void 0===t?"gregory":t)).months(e)},e.monthsFormat=function(e,t){void 0===e&&(e="long");var t=void 0===t?{}:t,n=t.locale,r=t.numberingSystem,i=t.locObj,i=void 0===i?null:i,t=t.outputCalendar;return(i||Locale.create(void 0===n?null:n,void 0===r?null:r,void 0===t?"gregory":t)).months(e,!0)},e.weekdays=function(e,t){void 0===e&&(e="long");var t=void 0===t?{}:t,n=t.locale,r=t.numberingSystem,t=t.locObj;return((void 0===t?null:t)||Locale.create(void 0===n?null:n,void 0===r?null:r,null)).weekdays(e)},e.weekdaysFormat=function(e,t){void 0===e&&(e="long");var t=void 0===t?{}:t,n=t.locale,r=t.numberingSystem,t=t.locObj;return((void 0===t?null:t)||Locale.create(void 0===n?null:n,void 0===r?null:r,null)).weekdays(e,!0)},e.meridiems=function(e){e=(void 0===e?{}:e).locale;return Locale.create(void 0===e?null:e).meridiems()},e.eras=function(e,t){void 0===e&&(e="short");t=(void 0===t?{}:t).locale;return Locale.create(void 0===t?null:t,null,"gregory").eras(e)},e.features=function(){var e=!1,t=!1,n=!1,r=!1;if(hasIntl()){e=!0,t=hasFormatToParts(),r=hasRelative();try{n="America/New_York"===new Intl.DateTimeFormat("en",{timeZone:"America/New_York"}).resolvedOptions().timeZone}catch(e){n=!1}}return{intl:e,intlTokens:t,zones:n,relative:r}},e}();function dayDiff(e,t){function n(e){return e.toUTC(0,{keepLocalTime:!0}).startOf("day").valueOf()}t=n(t)-n(e);return Math.floor(Duration.fromMillis(t).as("days"))}function highOrderDiffs(e,t,n){for(var r={},i=0,s=[["years",function(e,t){return t.year-e.year}],["quarters",function(e,t){return t.quarter-e.quarter}],["months",function(e,t){return t.month-e.month+12*(t.year-e.year)}],["weeks",function(e,t){e=dayDiff(e,t);return(e-e%7)/7}],["days",dayDiff]];i<s.length;i++){var o,a,l,c=s[i],u=c[0],c=c[1];0<=n.indexOf(u)&&(o=u,c=c(e,t),t<(l=e.plus(((a={})[u]=c,a)))?(e=e.plus(((a={})[u]=c-1,a)),--c):e=l,r[u]=c)}return[e,r,l,o]}function _diff(e,t,n,r){var e=highOrderDiffs(e,t,n),i=e[0],s=e[1],o=e[2],e=e[3],a=t-i,n=n.filter(function(e){return 0<=["hours","minutes","seconds","milliseconds"].indexOf(e)}),t=(0===n.length&&(o=o<t?i.plus(((t={})[e]=1,t)):o)!==i&&(s[e]=(s[e]||0)+a/(o-i)),Duration.fromObject(Object.assign(s,r)));return 0<n.length?(e=Duration.fromMillis(a,r)).shiftTo.apply(e,n).plus(t):t}var numberingSystems={arab:"[٠-٩]",arabext:"[۰-۹]",bali:"[᭐-᭙]",beng:"[০-৯]",deva:"[०-९]",fullwide:"[0-9]",gujr:"[૦-૯]",hanidec:"[〇|一|二|三|四|五|六|七|八|九]",khmr:"[០-៩]",knda:"[೦-೯]",laoo:"[໐-໙]",limb:"[᥆-᥏]",mlym:"[൦-൯]",mong:"[᠐-᠙]",mymr:"[၀-၉]",orya:"[୦-୯]",tamldec:"[௦-௯]",telu:"[౦-౯]",thai:"[๐-๙]",tibt:"[༠-༩]",latn:"\\d"},numberingSystemsUTF16={arab:[1632,1641],arabext:[1776,1785],bali:[6992,7001],beng:[2534,2543],deva:[2406,2415],fullwide:[65296,65303],gujr:[2790,2799],khmr:[6112,6121],knda:[3302,3311],laoo:[3792,3801],limb:[6470,6479],mlym:[3430,3439],mong:[6160,6169],mymr:[4160,4169],orya:[2918,2927],tamldec:[3046,3055],telu:[3174,3183],thai:[3664,3673],tibt:[3872,3881]},hanidecChars=numberingSystems.hanidec.replace(/[\[|\]]/g,"").split("");function parseDigits(e){var t=parseInt(e,10);if(isNaN(t)){for(var t="",n=0;n<e.length;n++){var r=e.charCodeAt(n);if(-1!==e[n].search(numberingSystems.hanidec))t+=hanidecChars.indexOf(e[n]);else for(var i in numberingSystemsUTF16){var i=numberingSystemsUTF16[i],s=i[0],i=i[1];s<=r&&r<=i&&(t+=r-s)}}return parseInt(t,10)}return t}function digitRegex(e,t){e=e.numberingSystem;return void 0===t&&(t=""),new RegExp(""+numberingSystems[e||"latn"]+t)}var MISSING_FTP="missing Intl.DateTimeFormat.formatToParts support";function intUnit(e,t){return void 0===t&&(t=function(e){return e}),{regex:e,deser:function(e){e=e[0];return t(parseDigits(e))}}}var NBSP=String.fromCharCode(160),spaceOrNBSP="( |"+NBSP+")",spaceOrNBSPRegExp=new RegExp(spaceOrNBSP,"g");function fixListRegex(e){return e.replace(/\./g,"\\.?").replace(spaceOrNBSPRegExp,spaceOrNBSP)}function stripInsensitivities(e){return e.replace(/\./g,"").replace(spaceOrNBSPRegExp," ").toLowerCase()}function oneOf(n,r){return null===n?null:{regex:RegExp(n.map(fixListRegex).join("|")),deser:function(e){var t=e[0];return n.findIndex(function(e){return stripInsensitivities(t)===stripInsensitivities(e)})+r}}}function offset(e,t){return{regex:e,deser:function(e){return signedOffset(e[1],e[2])},groups:t}}function simple(e){return{regex:e,deser:function(e){return e[0]}}}function escapeToken(e){return e.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}function unitForToken(t,n){function r(e){return{regex:RegExp(escapeToken(e.val)),deser:function(e){return e[0]},literal:!0}}var i=digitRegex(n),s=digitRegex(n,"{2}"),o=digitRegex(n,"{3}"),a=digitRegex(n,"{4}"),l=digitRegex(n,"{6}"),c=digitRegex(n,"{1,2}"),u=digitRegex(n,"{1,3}"),d=digitRegex(n,"{1,6}"),m=digitRegex(n,"{1,9}"),p=digitRegex(n,"{2,4}"),f=digitRegex(n,"{4,6}"),e=function(e){if(t.literal)return r(e);switch(e.val){case"G":return oneOf(n.eras("short",!1),0);case"GG":return oneOf(n.eras("long",!1),0);case"y":return intUnit(d);case"yy":return intUnit(p,untruncateYear);case"yyyy":return intUnit(a);case"yyyyy":return intUnit(f);case"yyyyyy":return intUnit(l);case"M":return intUnit(c);case"MM":return intUnit(s);case"MMM":return oneOf(n.months("short",!0,!1),1);case"MMMM":return oneOf(n.months("long",!0,!1),1);case"L":return intUnit(c);case"LL":return intUnit(s);case"LLL":return oneOf(n.months("short",!1,!1),1);case"LLLL":return oneOf(n.months("long",!1,!1),1);case"d":return intUnit(c);case"dd":return intUnit(s);case"o":return intUnit(u);case"ooo":return intUnit(o);case"HH":return intUnit(s);case"H":return intUnit(c);case"hh":return intUnit(s);case"h":return intUnit(c);case"mm":return intUnit(s);case"m":case"q":return intUnit(c);case"qq":return intUnit(s);case"s":return intUnit(c);case"ss":return intUnit(s);case"S":return intUnit(u);case"SSS":return intUnit(o);case"u":return simple(m);case"a":return oneOf(n.meridiems(),0);case"kkkk":return intUnit(a);case"kk":return intUnit(p,untruncateYear);case"W":return intUnit(c);case"WW":return intUnit(s);case"E":case"c":return intUnit(i);case"EEE":return oneOf(n.weekdays("short",!1,!1),1);case"EEEE":return oneOf(n.weekdays("long",!1,!1),1);case"ccc":return oneOf(n.weekdays("short",!0,!1),1);case"cccc":return oneOf(n.weekdays("long",!0,!1),1);case"Z":case"ZZ":return offset(new RegExp("([+-]"+c.source+")(?::("+s.source+"))?"),2);case"ZZZ":return offset(new RegExp("([+-]"+c.source+")("+s.source+")?"),2);case"z":return simple(/[a-z_+-/]{1,256}?/i);default:return r(e)}}(t)||{invalidReason:MISSING_FTP};return e.token=t,e}var partTypeStyleToTokenVal={year:{"2-digit":"yy",numeric:"yyyyy"},month:{numeric:"M","2-digit":"MM",short:"MMM",long:"MMMM"},day:{numeric:"d","2-digit":"dd"},weekday:{short:"EEE",long:"EEEE"},dayperiod:"a",dayPeriod:"a",hour:{numeric:"h","2-digit":"hh"},minute:{numeric:"m","2-digit":"mm"},second:{numeric:"s","2-digit":"ss"}};function tokenForPart(e,t,n){var r=e.type,e=e.value;if("literal"===r)return{literal:!0,val:e};e=n[r],n=partTypeStyleToTokenVal[r];return(n="object"==typeof n?n[e]:n)?{literal:!1,val:n}:void 0}function buildRegex(e){return["^"+e.map(function(e){return e.regex}).reduce(function(e,t){return e+"("+t.source+")"},"")+"$",e]}function match(e,t,n){var r=e.match(t);if(r){var i,s,o,a={},l=1;for(i in n)hasOwnProperty(n,i)&&(o=(s=n[i]).groups?s.groups+1:1,!s.literal&&s.token&&(a[s.token.val[0]]=s.deser(r.slice(l,l+o))),l+=o);return[r,a]}return[r,{}]}function dateTimeFromMatches(r){var e=isUndefined(r.Z)?isUndefined(r.z)?null:IANAZone.create(r.z):new FixedOffsetZone(r.Z);return isUndefined(r.q)||(r.M=3*(r.q-1)+1),isUndefined(r.h)||(r.h<12&&1===r.a?r.h+=12:12===r.h&&0===r.a&&(r.h=0)),0===r.G&&r.y&&(r.y=-r.y),isUndefined(r.u)||(r.S=parseMillis(r.u)),[Object.keys(r).reduce(function(e,t){var n=function(e){switch(e){case"S":return"millisecond";case"s":return"second";case"m":return"minute";case"h":case"H":return"hour";case"d":return"day";case"o":return"ordinal";case"L":case"M":return"month";case"y":return"year";case"E":case"c":return"weekday";case"W":return"weekNumber";case"k":return"weekYear";case"q":return"quarter";default:return null}}(t);return n&&(e[n]=r[t]),e},{}),e]}var dummyDateTimeCache=null;function getDummyDateTime(){return dummyDateTimeCache=dummyDateTimeCache||DateTime.fromMillis(1555555555555)}function maybeExpandMacroToken(e,t){if(e.literal)return e;var n=Formatter.macroTokenToFormatOpts(e.val);if(!n)return e;var r=Formatter.create(t,n).formatDateTimeParts(getDummyDateTime()).map(function(e){return tokenForPart(e,t,n)});return r.includes(void 0)?e:r}function expandMacroTokens(e,t){var n;return(n=Array.prototype).concat.apply(n,e.map(function(e){return maybeExpandMacroToken(e,t)}))}function explainFromTokens(t,e,n){var n=expandMacroTokens(Formatter.parseFormat(n),t),r=n.map(function(e){return unitForToken(e,t)}),i=r.find(function(e){return e.invalidReason});if(i)return{input:e,tokens:n,invalidReason:i.invalidReason};var i=buildRegex(r),r=i[0],i=i[1],r=RegExp(r,"i"),i=match(e,r,i),s=i[0],i=i[1],o=i?dateTimeFromMatches(i):[null,null],a=o[0],o=o[1];if(hasOwnProperty(i,"a")&&hasOwnProperty(i,"H"))throw new ConflictingSpecificationError("Can't include meridiem when specifying 24-hour format");return{input:e,tokens:n,regex:r,rawMatches:s,matches:i,result:a,zone:o}}function parseFromTokens(e,t,n){e=explainFromTokens(e,t,n);return[e.result,e.zone,e.invalidReason]}var nonLeapLadder=[0,31,59,90,120,151,181,212,243,273,304,334],leapLadder=[0,31,60,91,121,152,182,213,244,274,305,335];function unitOutOfRange(e,t){return new Invalid("unit out of range","you specified "+t+" (of type "+typeof t+") as a "+e+", which is invalid")}function dayOfWeek(e,t,n){e=new Date(Date.UTC(e,t-1,n)).getUTCDay();return 0===e?7:e}function computeOrdinal(e,t,n){return n+(isLeapYear(e)?leapLadder:nonLeapLadder)[t-1]}function uncomputeOrdinal(e,t){var e=isLeapYear(e)?leapLadder:nonLeapLadder,n=e.findIndex(function(e){return e<t});return{month:n+1,day:t-e[n]}}function gregorianToWeek(e){var t,n=e.year,r=e.month,i=e.day,s=computeOrdinal(n,r,i),r=dayOfWeek(n,r,i),i=Math.floor((s-r+10)/7);return i<1?i=weeksInWeekYear(t=n-1):i>weeksInWeekYear(n)?(t=n+1,i=1):t=n,Object.assign({weekYear:t,weekNumber:i,weekday:r},timeObject(e))}function weekToGregorian(e){var t,n=e.weekYear,r=e.weekNumber,i=e.weekday,s=dayOfWeek(n,1,4),o=daysInYear(n),r=7*r+i-s-3,i=(r<1?r+=daysInYear(t=n-1):o<r?(t=n+1,r-=daysInYear(n)):t=n,uncomputeOrdinal(t,r)),s=i.month,o=i.day;return Object.assign({year:t,month:s,day:o},timeObject(e))}function gregorianToOrdinal(e){var t=e.year,n=computeOrdinal(t,e.month,e.day);return Object.assign({year:t,ordinal:n},timeObject(e))}function ordinalToGregorian(e){var t=e.year,n=uncomputeOrdinal(t,e.ordinal),r=n.month,n=n.day;return Object.assign({year:t,month:r,day:n},timeObject(e))}function hasInvalidWeekData(e){var t=isInteger(e.weekYear),n=integerBetween(e.weekNumber,1,weeksInWeekYear(e.weekYear)),r=integerBetween(e.weekday,1,7);return t?n?!r&&unitOutOfRange("weekday",e.weekday):unitOutOfRange("week",e.week):unitOutOfRange("weekYear",e.weekYear)}function hasInvalidOrdinalData(e){var t=isInteger(e.year),n=integerBetween(e.ordinal,1,daysInYear(e.year));return t?!n&&unitOutOfRange("ordinal",e.ordinal):unitOutOfRange("year",e.year)}function hasInvalidGregorianData(e){var t=isInteger(e.year),n=integerBetween(e.month,1,12),r=integerBetween(e.day,1,daysInMonth(e.year,e.month));return t?n?!r&&unitOutOfRange("day",e.day):unitOutOfRange("month",e.month):unitOutOfRange("year",e.year)}function hasInvalidTimeData(e){var t=e.hour,n=e.minute,r=e.second,e=e.millisecond,i=integerBetween(t,0,23)||24===t&&0===n&&0===r&&0===e,s=integerBetween(n,0,59),o=integerBetween(r,0,59),a=integerBetween(e,0,999);return i?s?o?!a&&unitOutOfRange("millisecond",e):unitOutOfRange("second",r):unitOutOfRange("minute",n):unitOutOfRange("hour",t)}var INVALID$2="Invalid DateTime",MAX_DATE=864e13;function unsupportedZone(e){return new Invalid("unsupported zone",'the zone "'+e.name+'" is not supported')}function possiblyCachedWeekData(e){return null===e.weekData&&(e.weekData=gregorianToWeek(e.c)),e.weekData}function clone$1(e,t){e={ts:e.ts,zone:e.zone,c:e.c,o:e.o,loc:e.loc,invalid:e.invalid};return new DateTime(Object.assign({},e,t,{old:e}))}function fixOffset(e,t,n){var r=e-60*t*1e3,i=n.offset(r);if(t===i)return[r,t];n=n.offset(r-=60*(i-t)*1e3);return i===n?[r,i]:[e-60*Math.min(i,n)*1e3,Math.max(i,n)]}function tsToObj(e,t){e+=60*t*1e3;t=new Date(e);return{year:t.getUTCFullYear(),month:t.getUTCMonth()+1,day:t.getUTCDate(),hour:t.getUTCHours(),minute:t.getUTCMinutes(),second:t.getUTCSeconds(),millisecond:t.getUTCMilliseconds()}}function objToTS(e,t,n){return fixOffset(objToLocalTS(e),t,n)}function adjustTime(e,t){var n=e.o,r=e.c.year+Math.trunc(t.years),i=e.c.month+Math.trunc(t.months)+3*Math.trunc(t.quarters),r=Object.assign({},e.c,{year:r,month:i,day:Math.min(e.c.day,daysInMonth(r,i))+Math.trunc(t.days)+7*Math.trunc(t.weeks)}),i=Duration.fromObject({years:t.years-Math.trunc(t.years),quarters:t.quarters-Math.trunc(t.quarters),months:t.months-Math.trunc(t.months),weeks:t.weeks-Math.trunc(t.weeks),days:t.days-Math.trunc(t.days),hours:t.hours,minutes:t.minutes,seconds:t.seconds,milliseconds:t.milliseconds}).as("milliseconds"),t=fixOffset(objToLocalTS(r),n,e.zone),r=t[0],n=t[1];return 0!==i&&(n=e.zone.offset(r+=i)),{ts:r,o:n}}function parseDataToDateTime(e,t,n,r,i){var s=n.setZone,o=n.zone;return e&&0!==Object.keys(e).length?(e=DateTime.fromObject(Object.assign(e,n,{zone:t||o,setZone:void 0})),s?e:e.setZone(o)):DateTime.invalid(new Invalid("unparsable",'the input "'+i+"\" can't be parsed as "+r))}function toTechFormat(e,t,n){return void 0===n&&(n=!0),e.isValid?Formatter.create(Locale.create("en-US"),{allowZ:n,forceSimple:!0}).formatDateTimeFromString(e,t):null}function toTechTimeFormat(e,t){var n=t.suppressSeconds,r=t.suppressMilliseconds,i=t.includeOffset,s=t.includePrefix,s=void 0!==s&&s,o=t.includeZone,o=void 0!==o&&o,a=t.spaceZone,t=t.format,t=void 0===t?"extended":t,l="basic"===t?"HHmm":"HH:mm",n=(void 0!==n&&n&&0===e.second&&0===e.millisecond||(l+="basic"===t?"ss":":ss",void 0!==r&&r&&0===e.millisecond||(l+=".SSS")),(o||i)&&(void 0!==a&&a)&&(l+=" "),o?l+="z":i&&(l+="basic"===t?"ZZZ":"ZZ"),toTechFormat(e,l));return n=s?"T"+n:n}var defaultUnitValues={month:1,day:1,hour:0,minute:0,second:0,millisecond:0},defaultWeekUnitValues={weekNumber:1,weekday:1,hour:0,minute:0,second:0,millisecond:0},defaultOrdinalUnitValues={ordinal:1,hour:0,minute:0,second:0,millisecond:0},orderedUnits$1=["year","month","day","hour","minute","second","millisecond"],orderedWeekUnits=["weekYear","weekNumber","weekday","hour","minute","second","millisecond"],orderedOrdinalUnits=["year","ordinal","hour","minute","second","millisecond"];function normalizeUnit(e){var t={year:"year",years:"year",month:"month",months:"month",day:"day",days:"day",hour:"hour",hours:"hour",minute:"minute",minutes:"minute",quarter:"quarter",quarters:"quarter",second:"second",seconds:"second",millisecond:"millisecond",milliseconds:"millisecond",weekday:"weekday",weekdays:"weekday",weeknumber:"weekNumber",weeksnumber:"weekNumber",weeknumbers:"weekNumber",weekyear:"weekYear",weekyears:"weekYear",ordinal:"ordinal"}[e.toLowerCase()];if(t)return t;throw new InvalidUnitError(e)}function quickDT(e,t){for(var n=_createForOfIteratorHelperLoose(orderedUnits$1);!(r=n()).done;){var r=r.value;isUndefined(e[r])&&(e[r]=defaultUnitValues[r])}var i=hasInvalidGregorianData(e)||hasInvalidTimeData(e);if(i)return DateTime.invalid(i);var i=Settings.now(),i=objToTS(e,t.offset(i),t),s=i[0],i=i[1];return new DateTime({ts:s,zone:t,o:i})}function diffRelative(t,n,r){function e(e,t){return e=roundTo(e,s||r.calendary?0:2,!0),n.loc.clone(r).relFormatter(r).format(e,t)}function i(e){return r.calendary?n.hasSame(t,e)?0:n.startOf(e).diff(t.startOf(e),e).get(e):n.diff(t,e).get(e)}var s=!!isUndefined(r.round)||r.round;if(r.unit)return e(i(r.unit),r.unit);for(var o=_createForOfIteratorHelperLoose(r.units);!(a=o()).done;){var a=a.value,l=i(a);if(1<=Math.abs(l))return e(l,a)}return e(n<t?-0:0,r.units[r.units.length-1])}var DateTime=function(){function g(e){var t,n=e.zone||Settings.defaultZone,r=e.invalid||(Number.isNaN(e.ts)?new Invalid("invalid input"):null)||(n.isValid?null:unsupportedZone(n)),i=(this.ts=isUndefined(e.ts)?Settings.now():e.ts,null),s=null;r||(s=e.old&&e.old.ts===this.ts&&e.old.zone.equals(n)?(i=(t=[e.old.c,e.old.o])[0],t[1]):(t=n.offset(this.ts),i=tsToObj(this.ts,t),i=(r=Number.isNaN(i.year)?new Invalid("invalid input"):null)?null:i,r?null:t)),this._zone=n,this.loc=e.loc||Locale.create(),this.invalid=r,this.weekData=null,this.c=i,this.o=s,this.isLuxonDateTime=!0}g.now=function(){return new g({})},g.local=function(e,t,n,r,i,s,o){return isUndefined(e)?g.now():quickDT({year:e,month:t,day:n,hour:r,minute:i,second:s,millisecond:o},Settings.defaultZone)},g.utc=function(e,t,n,r,i,s,o){return isUndefined(e)?new g({ts:Settings.now(),zone:FixedOffsetZone.utcInstance}):quickDT({year:e,month:t,day:n,hour:r,minute:i,second:s,millisecond:o},FixedOffsetZone.utcInstance)},g.fromJSDate=function(e,t){void 0===t&&(t={});e=isDate(e)?e.valueOf():NaN;if(Number.isNaN(e))return g.invalid("invalid input");var n=normalizeZone(t.zone,Settings.defaultZone);return n.isValid?new g({ts:e,zone:n,loc:Locale.fromObject(t)}):g.invalid(unsupportedZone(n))},g.fromMillis=function(e,t){if(void 0===t&&(t={}),isNumber(e))return e<-MAX_DATE||MAX_DATE<e?g.invalid("Timestamp out of range"):new g({ts:e,zone:normalizeZone(t.zone,Settings.defaultZone),loc:Locale.fromObject(t)});throw new InvalidArgumentError("fromMillis requires a numerical input, but received a "+typeof e+" with value "+e)},g.fromSeconds=function(e,t){if(void 0===t&&(t={}),isNumber(e))return new g({ts:1e3*e,zone:normalizeZone(t.zone,Settings.defaultZone),loc:Locale.fromObject(t)});throw new InvalidArgumentError("fromSeconds requires a numerical input")},g.fromObject=function(e){var t=normalizeZone(e.zone,Settings.defaultZone);if(!t.isValid)return g.invalid(unsupportedZone(t));var n=Settings.now(),r=t.offset(n),i=normalizeObject(e,normalizeUnit,["zone","locale","outputCalendar","numberingSystem"]),s=!isUndefined(i.ordinal),o=!isUndefined(i.year),a=!isUndefined(i.month)||!isUndefined(i.day),o=o||a,l=i.weekYear||i.weekNumber,c=Locale.fromObject(e);if((o||s)&&l)throw new ConflictingSpecificationError("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(a&&s)throw new ConflictingSpecificationError("Can't mix ordinal dates with month/day");for(var u,a=l||i.weekday&&!o,d=tsToObj(n,r),m=(a?(h=orderedWeekUnits,u=defaultWeekUnitValues,d=gregorianToWeek(d)):s?(h=orderedOrdinalUnits,u=defaultOrdinalUnitValues,d=gregorianToOrdinal(d)):(h=orderedUnits$1,u=defaultUnitValues),!1),p=_createForOfIteratorHelperLoose(h);!(f=p()).done;){var f=f.value;isUndefined(i[f])?i[f]=(m?u:d)[f]:m=!0}l=(a?hasInvalidWeekData:s?hasInvalidOrdinalData:hasInvalidGregorianData)(i)||hasInvalidTimeData(i);if(l)return g.invalid(l);var n=objToTS(a?weekToGregorian(i):s?ordinalToGregorian(i):i,r,t),h=new g({ts:n[0],zone:t,o:n[1],loc:c});return i.weekday&&o&&e.weekday!==h.weekday?g.invalid("mismatched weekday","you can't specify both a weekday of "+i.weekday+" and a date of "+h.toISO()):h},g.fromISO=function(e,t){void 0===t&&(t={});var n=parseISODate(e);return parseDataToDateTime(n[0],n[1],t,"ISO 8601",e)},g.fromRFC2822=function(e,t){void 0===t&&(t={});var n=parseRFC2822Date(e);return parseDataToDateTime(n[0],n[1],t,"RFC 2822",e)},g.fromHTTP=function(e,t){void 0===t&&(t={});e=parseHTTPDate(e);return parseDataToDateTime(e[0],e[1],t,"HTTP",t)},g.fromFormat=function(e,t,n){if(void 0===n&&(n={}),isUndefined(e)||isUndefined(t))throw new InvalidArgumentError("fromFormat requires an input string and a format");var r=n,i=r.locale,r=r.numberingSystem,i=parseFromTokens(Locale.fromOpts({locale:void 0===i?null:i,numberingSystem:void 0===r?null:r,defaultToEN:!0}),e,t),r=i[0],s=i[1],i=i[2];return i?g.invalid(i):parseDataToDateTime(r,s,n,"format "+t,e)},g.fromString=function(e,t,n){return g.fromFormat(e,t,n=void 0===n?{}:n)},g.fromSQL=function(e,t){void 0===t&&(t={});var n=parseSQL(e);return parseDataToDateTime(n[0],n[1],t,"SQL",e)},g.invalid=function(e,t){if(void 0===t&&(t=null),!e)throw new InvalidArgumentError("need to specify a reason the DateTime is invalid");e=e instanceof Invalid?e:new Invalid(e,t);if(Settings.throwOnInvalid)throw new InvalidDateTimeError(e);return new g({invalid:e})},g.isDateTime=function(e){return e&&e.isLuxonDateTime||!1};var e=g.prototype;return e.get=function(e){return this[e]},e.resolvedLocaleOpts=function(e){e=Formatter.create(this.loc.clone(e=void 0===e?{}:e),e).resolvedOptions(this);return{locale:e.locale,numberingSystem:e.numberingSystem,outputCalendar:e.calendar}},e.toUTC=function(e,t){return void 0===t&&(t={}),this.setZone(FixedOffsetZone.instance(e=void 0===e?0:e),t)},e.toLocal=function(){return this.setZone(Settings.defaultZone)},e.setZone=function(e,t){var n,t=void 0===t?{}:t,r=t.keepLocalTime,r=void 0!==r&&r,t=t.keepCalendarTime,t=void 0!==t&&t;return(e=normalizeZone(e,Settings.defaultZone)).equals(this.zone)?this:e.isValid?(n=this.ts,(r||t)&&(r=e.offset(this.ts),n=objToTS(this.toObject(),r,e)[0]),clone$1(this,{ts:n,zone:e})):g.invalid(unsupportedZone(e))},e.reconfigure=function(e){var e=void 0===e?{}:e,t=e.locale,n=e.numberingSystem,e=e.outputCalendar,t=this.loc.clone({locale:t,numberingSystem:n,outputCalendar:e});return clone$1(this,{loc:t})},e.setLocale=function(e){return this.reconfigure({locale:e})},e.set=function(e){if(!this.isValid)return this;var t,e=normalizeObject(e,normalizeUnit,[]),n=!isUndefined(e.weekYear)||!isUndefined(e.weekNumber)||!isUndefined(e.weekday),r=!isUndefined(e.ordinal),i=!isUndefined(e.year),s=!isUndefined(e.month)||!isUndefined(e.day),o=e.weekYear||e.weekNumber;if((i||s||r)&&o)throw new ConflictingSpecificationError("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(s&&r)throw new ConflictingSpecificationError("Can't mix ordinal dates with month/day");n?t=weekToGregorian(Object.assign(gregorianToWeek(this.c),e)):isUndefined(e.ordinal)?(t=Object.assign(this.toObject(),e),isUndefined(e.day)&&(t.day=Math.min(daysInMonth(t.year,t.month),t.day))):t=ordinalToGregorian(Object.assign(gregorianToOrdinal(this.c),e));i=objToTS(t,this.o,this.zone);return clone$1(this,{ts:i[0],o:i[1]})},e.plus=function(e){return this.isValid?clone$1(this,adjustTime(this,friendlyDuration(e))):this},e.minus=function(e){return this.isValid?clone$1(this,adjustTime(this,friendlyDuration(e).negate())):this},e.startOf=function(e){if(!this.isValid)return this;var t={},e=Duration.normalizeUnit(e);switch(e){case"years":t.month=1;case"quarters":case"months":t.day=1;case"weeks":case"days":t.hour=0;case"hours":t.minute=0;case"minutes":t.second=0;case"seconds":t.millisecond=0}return"weeks"===e&&(t.weekday=1),"quarters"===e&&(e=Math.ceil(this.month/3),t.month=3*(e-1)+1),this.set(t)},e.endOf=function(e){var t;return this.isValid?this.plus(((t={})[e]=1,t)).startOf(e).minus(1):this},e.toFormat=function(e,t){return void 0===t&&(t={}),this.isValid?Formatter.create(this.loc.redefaultToEN(t)).formatDateTimeFromString(this,e):INVALID$2},e.toLocaleString=function(e){return void 0===e&&(e=DATE_SHORT),this.isValid?Formatter.create(this.loc.clone(e),e).formatDateTime(this):INVALID$2},e.toLocaleParts=function(e){return void 0===e&&(e={}),this.isValid?Formatter.create(this.loc.clone(e),e).formatDateTimeParts(this):[]},e.toISO=function(e){return void 0===e&&(e={}),this.isValid?this.toISODate(e)+"T"+this.toISOTime(e):null},e.toISODate=function(e){e=(void 0===e?{}:e).format,e="basic"===(void 0===e?"extended":e)?"yyyyMMdd":"yyyy-MM-dd";return toTechFormat(this,e=9999<this.year?"+"+e:e)},e.toISOWeekDate=function(){return toTechFormat(this,"kkkk-'W'WW-c")},e.toISOTime=function(e){var e=void 0===e?{}:e,t=e.suppressMilliseconds,n=e.suppressSeconds,r=e.includeOffset,i=e.includePrefix,e=e.format;return toTechTimeFormat(this,{suppressSeconds:void 0!==n&&n,suppressMilliseconds:void 0!==t&&t,includeOffset:void 0===r||r,includePrefix:void 0!==i&&i,format:void 0===e?"extended":e})},e.toRFC2822=function(){return toTechFormat(this,"EEE, dd LLL yyyy HH:mm:ss ZZZ",!1)},e.toHTTP=function(){return toTechFormat(this.toUTC(),"EEE, dd LLL yyyy HH:mm:ss 'GMT'")},e.toSQLDate=function(){return toTechFormat(this,"yyyy-MM-dd")},e.toSQLTime=function(e){var e=void 0===e?{}:e,t=e.includeOffset,e=e.includeZone;return toTechTimeFormat(this,{includeOffset:void 0===t||t,includeZone:void 0!==e&&e,spaceZone:!0})},e.toSQL=function(e){return void 0===e&&(e={}),this.isValid?this.toSQLDate()+" "+this.toSQLTime(e):null},e.toString=function(){return this.isValid?this.toISO():INVALID$2},e.valueOf=function(){return this.toMillis()},e.toMillis=function(){return this.isValid?this.ts:NaN},e.toSeconds=function(){return this.isValid?this.ts/1e3:NaN},e.toJSON=function(){return this.toISO()},e.toBSON=function(){return this.toJSDate()},e.toObject=function(e){if(void 0===e&&(e={}),!this.isValid)return{};var t=Object.assign({},this.c);return e.includeConfig&&(t.outputCalendar=this.outputCalendar,t.numberingSystem=this.loc.numberingSystem,t.locale=this.loc.locale),t},e.toJSDate=function(){return new Date(this.isValid?this.ts:NaN)},e.diff=function(e,t,n){if(void 0===t&&(t="milliseconds"),void 0===n&&(n={}),!this.isValid||!e.isValid)return Duration.invalid(this.invalid||e.invalid,"created by diffing an invalid DateTime");var n=Object.assign({locale:this.locale,numberingSystem:this.numberingSystem},n),t=maybeArray(t).map(Duration.normalizeUnit),r=e.valueOf()>this.valueOf(),e=_diff(r?this:e,r?e:this,t,n);return r?e.negate():e},e.diffNow=function(e,t){return void 0===e&&(e="milliseconds"),void 0===t&&(t={}),this.diff(g.now(),e,t)},e.until=function(e){return this.isValid?Interval.fromDateTimes(this,e):this},e.hasSame=function(e,t){if(!this.isValid)return!1;var n=e.valueOf(),e=this.setZone(e.zone,{keepLocalTime:!0});return e.startOf(t)<=n&&n<=e.endOf(t)},e.equals=function(e){return this.isValid&&e.isValid&&this.valueOf()===e.valueOf()&&this.zone.equals(e.zone)&&this.loc.equals(e.loc)},e.toRelative=function(e){if(!this.isValid)return null;var t=(e=void 0===e?{}:e).base||g.fromObject({zone:this.zone}),n=e.padding?this<t?-e.padding:e.padding:0,r=["years","months","days","hours","minutes","seconds"],i=e.unit;return Array.isArray(e.unit)&&(r=e.unit,i=void 0),diffRelative(t,this.plus(n),Object.assign(e,{numeric:"always",units:r,unit:i}))},e.toRelativeCalendar=function(e){return void 0===e&&(e={}),this.isValid?diffRelative(e.base||g.fromObject({zone:this.zone}),this,Object.assign(e,{numeric:"auto",units:["years","months","days"],calendary:!0})):null},g.min=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(t.every(g.isDateTime))return bestBy(t,function(e){return e.valueOf()},Math.min);throw new InvalidArgumentError("min requires all arguments be DateTimes")},g.max=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(t.every(g.isDateTime))return bestBy(t,function(e){return e.valueOf()},Math.max);throw new InvalidArgumentError("max requires all arguments be DateTimes")},g.fromFormatExplain=function(e,t,n){var n=n=void 0===n?{}:n,r=n.locale,n=n.numberingSystem;return explainFromTokens(Locale.fromOpts({locale:void 0===r?null:r,numberingSystem:void 0===n?null:n,defaultToEN:!0}),e,t)},g.fromStringExplain=function(e,t,n){return g.fromFormatExplain(e,t,n=void 0===n?{}:n)},_createClass(g,[{key:"isValid",get:function(){return null===this.invalid}},{key:"invalidReason",get:function(){return this.invalid?this.invalid.reason:null}},{key:"invalidExplanation",get:function(){return this.invalid?this.invalid.explanation:null}},{key:"locale",get:function(){return this.isValid?this.loc.locale:null}},{key:"numberingSystem",get:function(){return this.isValid?this.loc.numberingSystem:null}},{key:"outputCalendar",get:function(){return this.isValid?this.loc.outputCalendar:null}},{key:"zone",get:function(){return this._zone}},{key:"zoneName",get:function(){return this.isValid?this.zone.name:null}},{key:"year",get:function(){return this.isValid?this.c.year:NaN}},{key:"quarter",get:function(){return this.isValid?Math.ceil(this.c.month/3):NaN}},{key:"month",get:function(){return this.isValid?this.c.month:NaN}},{key:"day",get:function(){return this.isValid?this.c.day:NaN}},{key:"hour",get:function(){return this.isValid?this.c.hour:NaN}},{key:"minute",get:function(){return this.isValid?this.c.minute:NaN}},{key:"second",get:function(){return this.isValid?this.c.second:NaN}},{key:"millisecond",get:function(){return this.isValid?this.c.millisecond:NaN}},{key:"weekYear",get:function(){return this.isValid?possiblyCachedWeekData(this).weekYear:NaN}},{key:"weekNumber",get:function(){return this.isValid?possiblyCachedWeekData(this).weekNumber:NaN}},{key:"weekday",get:function(){return this.isValid?possiblyCachedWeekData(this).weekday:NaN}},{key:"ordinal",get:function(){return this.isValid?gregorianToOrdinal(this.c).ordinal:NaN}},{key:"monthShort",get:function(){return this.isValid?Info.months("short",{locObj:this.loc})[this.month-1]:null}},{key:"monthLong",get:function(){return this.isValid?Info.months("long",{locObj:this.loc})[this.month-1]:null}},{key:"weekdayShort",get:function(){return this.isValid?Info.weekdays("short",{locObj:this.loc})[this.weekday-1]:null}},{key:"weekdayLong",get:function(){return this.isValid?Info.weekdays("long",{locObj:this.loc})[this.weekday-1]:null}},{key:"offset",get:function(){return this.isValid?+this.o:NaN}},{key:"offsetNameShort",get:function(){return this.isValid?this.zone.offsetName(this.ts,{format:"short",locale:this.locale}):null}},{key:"offsetNameLong",get:function(){return this.isValid?this.zone.offsetName(this.ts,{format:"long",locale:this.locale}):null}},{key:"isOffsetFixed",get:function(){return this.isValid?this.zone.universal:null}},{key:"isInDST",get:function(){return!this.isOffsetFixed&&(this.offset>this.set({month:1}).offset||this.offset>this.set({month:5}).offset)}},{key:"isInLeapYear",get:function(){return isLeapYear(this.year)}},{key:"daysInMonth",get:function(){return daysInMonth(this.year,this.month)}},{key:"daysInYear",get:function(){return this.isValid?daysInYear(this.year):NaN}},{key:"weeksInWeekYear",get:function(){return this.isValid?weeksInWeekYear(this.weekYear):NaN}}],[{key:"DATE_SHORT",get:function(){return DATE_SHORT}},{key:"DATE_MED",get:function(){return DATE_MED}},{key:"DATE_MED_WITH_WEEKDAY",get:function(){return DATE_MED_WITH_WEEKDAY}},{key:"DATE_FULL",get:function(){return DATE_FULL}},{key:"DATE_HUGE",get:function(){return DATE_HUGE}},{key:"TIME_SIMPLE",get:function(){return TIME_SIMPLE}},{key:"TIME_WITH_SECONDS",get:function(){return TIME_WITH_SECONDS}},{key:"TIME_WITH_SHORT_OFFSET",get:function(){return TIME_WITH_SHORT_OFFSET}},{key:"TIME_WITH_LONG_OFFSET",get:function(){return TIME_WITH_LONG_OFFSET}},{key:"TIME_24_SIMPLE",get:function(){return TIME_24_SIMPLE}},{key:"TIME_24_WITH_SECONDS",get:function(){return TIME_24_WITH_SECONDS}},{key:"TIME_24_WITH_SHORT_OFFSET",get:function(){return TIME_24_WITH_SHORT_OFFSET}},{key:"TIME_24_WITH_LONG_OFFSET",get:function(){return TIME_24_WITH_LONG_OFFSET}},{key:"DATETIME_SHORT",get:function(){return DATETIME_SHORT}},{key:"DATETIME_SHORT_WITH_SECONDS",get:function(){return DATETIME_SHORT_WITH_SECONDS}},{key:"DATETIME_MED",get:function(){return DATETIME_MED}},{key:"DATETIME_MED_WITH_SECONDS",get:function(){return DATETIME_MED_WITH_SECONDS}},{key:"DATETIME_MED_WITH_WEEKDAY",get:function(){return DATETIME_MED_WITH_WEEKDAY}},{key:"DATETIME_FULL",get:function(){return DATETIME_FULL}},{key:"DATETIME_FULL_WITH_SECONDS",get:function(){return DATETIME_FULL_WITH_SECONDS}},{key:"DATETIME_HUGE",get:function(){return DATETIME_HUGE}},{key:"DATETIME_HUGE_WITH_SECONDS",get:function(){return DATETIME_HUGE_WITH_SECONDS}}]),g}();function friendlyDateTime(e){if(DateTime.isDateTime(e))return e;if(e&&e.valueOf&&isNumber(e.valueOf()))return DateTime.fromJSDate(e);if(e&&"object"==typeof e)return DateTime.fromObject(e);throw new InvalidArgumentError("Unknown datetime argument: "+e+", of type "+typeof e)}var VERSION="1.28.0",DateTime_1=luxon.DateTime=DateTime;luxon.Duration=Duration,luxon.FixedOffsetZone=FixedOffsetZone,luxon.IANAZone=IANAZone,luxon.Info=Info,luxon.Interval=Interval,luxon.InvalidZone=InvalidZone,luxon.LocalZone=LocalZone,luxon.Settings=Settings,luxon.VERSION=VERSION,luxon.Zone=Zone;const SHARED_MESSAGES={noTags:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"os-flow-center.ImtbH0",defaultMessage:"No Tags",description:"No Tags"}),createFlowFromTemplate:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"os-flow-center.CNPhK1",defaultMessage:"Create Flow From Template",description:"Create Flow From Template"}),overview:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"os-flow-center.6+BhsD",defaultMessage:"Overview",description:"Overview"}),developer:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"os-flow-center.GKqAH1",defaultMessage:"Developer",description:"Developer"}),certified:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"os-flow-center.1tTedK",defaultMessage:"Certified",description:"Certified"}),yes:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"os-flow-center.9U4lyw",defaultMessage:"Yes",description:"Yes"}),category:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"os-flow-center.RYa6+l",defaultMessage:"Category",description:"Category"}),tags:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"os-flow-center.ImtbH1",defaultMessage:"Tags",description:"Tags"}),active:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"os-flow-center.UkeQP9",defaultMessage:"Active",description:"Active"}),ready:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"os-flow-center.readymessage",defaultMessage:"Ready",description:"Ready"}),pending:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"os-flow-center.pendingmessage",defaultMessage:"Pending",description:"Pending"}),draft:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"os-flow-center.draftonotactive",defaultMessage:"Not active",description:"Draft to not active translation"}),viewDetails:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"os-flow-center.yFa4dd",defaultMessage:"View Details",description:"View Details"}),version:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"os-flow-center.i8EBVW",defaultMessage:"Version",description:"Version"}),openFlow:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"os-flow-center.IEIrEm",defaultMessage:"Open Flow",description:"Open Flow"}),openFlowAdv:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"os-flow-center.IEIfEt",defaultMessage:"Open With Cluster",description:"Open With Cluster"}),deleteFlow:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"os-flow-center.MPiXf5",defaultMessage:"Delete Flow",description:"Delete Flow"}),confirmDelete:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"os-flow-center.mPEQWb",defaultMessage:"Confirm Delete",description:"Confirm Delete"}),exitFullScreen:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"os-flow-center.awe7uYa",defaultMessage:"Exit Fullscreen",description:"Exit Fullscreen"}),enterFullScreen:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"os-flow-center.stiZt+d",defaultMessage:"Enter Fullscreen",description:"Enter Fullscreen"}),closePanel:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"os-flow-center.kOsSpC",defaultMessage:"Close Panel",description:"Close Panel"}),copyFlowID:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"os-flow-center.1mDYO7",defaultMessage:"Copy Flow ID",description:"Copy Flow ID"}),hideFilters:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"os-flow-center.Iy59d3",defaultMessage:"Hide Filter",description:"Hide Filter"}),showFilters:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"os-flow-center.g5zZtA",defaultMessage:"Show Filter",description:"Show Filter"}),showMoreInformation:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"os-flow-center.ParFja",defaultMessage:"More Information",description:"More Information"}),hideMoreInformation:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"os-flow-center.DXuAKS",defaultMessage:"Close More Information",description:"Close More Information"}),engineIdHasBeenCopied:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"os-flow-center.CRvRbB",defaultMessage:"Engine ID has been copied",description:"copy of the engine id"}),cancel:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"os-flow-center.6PdOcy",defaultMessage:"Cancel",description:"Cancel"}),delete:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"os-flow-center.qviIFp",defaultMessage:"Delete",description:"Delete"}),noFlowsFound:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"os-flow-center.WX6wfG",defaultMessage:"No Flows Found",description:"No Flows Found"}),noFlowsFoundSubtitle:()=>jsxRuntime.exports.jsx(FormattedMessage,{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:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"os-flow-center.54mq64",defaultMessage:"Create New Flow",description:"Create New Flow"}),chooseATemplate:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"os-flow-center.jhiPmN",defaultMessage:"Choose a Template",description:"Choose a Template"}),newFlow:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"os-flow-center.54mq65",defaultMessage:"New Flow",description:"New Flow"}),noSearchResultsFound:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"os-flow-center.OYovRP",defaultMessage:"No results found",description:"No results found"}),noSearchResultsFoundSubtitle:()=>jsxRuntime.exports.jsx(FormattedMessage,{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:e=>jsxRuntime.exports.jsx(FormattedMessage,{id:"os-flow-center.flowscount",defaultMessage:"Flows {flowsCount}",description:"Flows Count",values:{flowsCount:e}}),templatesCount:e=>jsxRuntime.exports.jsx(FormattedMessage,{id:"os-flow-center.templatescount",defaultMessage:"Templates {templatesCount}",description:"Templates Count",values:{templatesCount:e}})},useCommonStyles=makeStyles()(e=>({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"},actions:{padding:"0px!important",marginTop:"30px!important"},container:{padding:"30px!important"}})),SHARED_DATE_TIME={getDate:e=>jsxRuntime.exports.jsx(FormattedDate,{value:e,day:"2-digit",month:"numeric",year:"numeric",hour:"2-digit",minute:"2-digit",hour12:!1})},namespace$1="newFlowClusterID",initialState$1={newFlowClusterID:""},newFlowClusterIDSlice=createSlice({name:namespace$1,initialState:initialState$1,reducers:{newFlowClusterIDAction(e,t){e.newFlowClusterID=t.payload}}}),newFlowClusterIDSelector=e=>(null==e?void 0:e[namespace$1])||null,newFlowClusterIDAction=newFlowClusterIDSlice.actions["newFlowClusterIDAction"],newFlowClusterIDnReducer=newFlowClusterIDSlice.reducer,useStyles$b=makeStyles()(()=>({disabledButton:{background:"#efefef4d!important",color:"#00000042"},fullWidth:{width:"100%"},paddingDiv:{paddingTop:"20px"},buttonDiv:{display:"flex"}})),FlowList=({onSelectFlow:a,simpleMode:l,screenName:L,selectedFlowId:c,setFirstFlowId:k,zIndex:W,showTitle:e=!0,setOpenFlowDetails:H})=>{const r=useDispatch(),u=flowStyles()["classes"],t=useCommonStyles()["classes"],n=useStyles$b()["classes"],P=useSelector(sessionTokenSelector),i=useSelector(e=>e.flows.flows),s=useSelector(automateUrlSelector),o=useSelector(e=>e.flows.isRevisionsExistOnServer),[$,G]=react.exports.useState(null),[d,B]=react.exports.useState("desc"),[m,V]=react.exports.useState("modifiedDateTime"),[U,p]=react.exports.useState(!1),[f,h]=react.exports.useState(""),[z,g]=react.exports.useState(!1),[Z,x]=react.exports.useState(!1),[Y,S]=react.exports.useState(""),[T,w]=react.exports.useState(0),[y,q]=react.exports.useState(100),E=useSelector(newFlowClusterIDSelector)||null,[j]=(useSelector(graphEndpointSelector),react.exports.useState([])),[v,J]=react.exports.useState(!1),O=()=>{J(!1),r(newFlowClusterIDAction(""))},Q={EMPTY:null,ENGINE_COPIED:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-flow-center.sGx+Oj",defaultMessage:"Engine ID has been copied",description:"msg delete flow"}),FLOW_DELETED_SUCCESS:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-flow-center.2Trjxv",defaultMessage:"Flow has been successfully deleted",description:"msg delete flow"}),FLOW_DELETED_FAIL:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-flow-center.himmqH",defaultMessage:"Flow hasn't been deleted",description:"msg delete flow"})},b={OPEN_FLOW_SETTINGS:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-flow-center-header.hirqzH",defaultMessage:"Flow Settings",description:"msg flow settings"}),CANCEL_SELECT_CLUSTER:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-flow-center-header.hiqxrt",defaultMessage:"Cancel",description:"msg cancel select cluster"}),OPEN_FLOW:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-flow-center-header.jbxqqH",defaultMessage:"Open Flow",description:"msg open flow"}),CREATE_FLOW_ADVANCED:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-flow-center-header.jbxqty",defaultMessage:"Create Flow Advanced",description:"msg create flow Advanced"})},I=e=>{var t=m===e&&"asc"===d;B(t?"desc":"asc"),V(e)},F=(e,t,n)=>t[n]<e[n]?-1:t[n]>e[n]?1:0,R=e=>jsxRuntime.exports.jsx(TableSortLabel,{active:m===e,IconComponent:default_1$6,direction:m===e?d:"asc",onClick:()=>I(e),classes:{icon:u.sortIcon}}),_=e=>{g(!1),e&&deleteEngine(f,P).then(t=>{if(t.data&&t.data.deleteEngine&&t.data.deleteEngine.id){var e=lodash.exports.findIndex(i,e=>e.id===t.data.deleteEngine.id);const n=JSON.parse(JSON.stringify(i));n.splice(e,1),r(setFlows(n)),S("FLOW_DELETED_SUCCESS")}else S("FLOW_DELETED_FAIL")}).catch(function(e){S("FLOW_DELETED_FAIL")}).finally(function(){x(!0)})},N=()=>{x(!1)},D=t=>{var e=i.find(e=>e.id===t);if(e)return e=e.builds,e.records.length?null==(e=e.records[0])?void 0:e.id:"latest"},C=e=>{var e=e||f,t=o?"latest":D(e),e=s+`/flow/${e}/`+t;window.open(e,"_blank","noopener,noreferrer")},M=i.find(e=>e.id===f),A=e=>jsxRuntime.exports.jsxs(jsxRuntime.exports.Fragment,{children:[jsxRuntime.exports.jsx(Typography,Object.assign({"data-test":"flow-widget-executions-table-time",className:u.dateTime},{children:e?SHARED_DATE_TIME.getDate(e):null})),jsxRuntime.exports.jsx(Typography,Object.assign({"data-test":"flow-widget-executions-table-time-caption",variant:"caption",className:u.dateTimeSmall},{children:e?DateTime_1.fromISO(e).toLocaleString(DateTime_1.TIME_SIMPLE):null}))]}),X=(e,t)=>{w(t)},K=e=>{q(parseInt(e.target.value,10)),w(0)};return i&&0===i.length?jsxRuntime.exports.jsx(NoResults,{}):jsxRuntime.exports.jsxs(Box$1,Object.assign({mt:e?2:0},{children:[e&&jsxRuntime.exports.jsx(Typography,Object.assign({"data-test":"flow-center-screenName",className:u.text,style:{flexGrow:1}},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-flow-center.+YGVPH",defaultMessage:"Screen Name: {screenName}",description:"{screenName}",values:{screenName:L}})})),jsxRuntime.exports.jsx(TableContainer,Object.assign({id:"flow-center-flows-table","data-test":"flow-center-flows-table"},{children:jsxRuntime.exports.jsxs(Table,Object.assign({className:u.table},{children:[jsxRuntime.exports.jsx(TableHead,{children:jsxRuntime.exports.jsxs(TableRow,{children:[jsxRuntime.exports.jsxs(TableCell,Object.assign({className:`${u.title} ${u.firstTitle} `+u.borderBottomLineHeader},{children:[jsxRuntime.exports.jsx(FormattedMessage,{id:"os-flow-center.n60v17",defaultMessage:"Flow Name",description:"Flow Name"}),jsxRuntime.exports.jsx(TableSortLabel,{active:"name"===m,direction:"name"===m?d:"asc",onClick:()=>I("name"),IconComponent:default_1$6,classes:{icon:u.sortIcon}})]})),jsxRuntime.exports.jsxs(TableCell,Object.assign({className:u.title+" "+u.borderBottomLineHeader},{children:[jsxRuntime.exports.jsx(FormattedMessage,{id:"os-flow-center.w+rzfS",defaultMessage:"Status",description:"Status"}),R("state")]})),jsxRuntime.exports.jsxs(TableCell,Object.assign({className:u.title+" "+u.borderBottomLineHeader},{children:[jsxRuntime.exports.jsx(FormattedMessage,{id:"os-flow-center.Pzb4Cj",defaultMessage:"Last Updated",description:"Last Updated"}),R("modifiedDateTime")]})),jsxRuntime.exports.jsxs(TableCell,Object.assign({className:u.title+" "+u.borderBottomLineHeader},{children:[jsxRuntime.exports.jsx(FormattedMessage,{id:"os-flow-center.Dj0J2e",defaultMessage:"Date Created",description:"Date Created"}),R("createdDateTime")]})),jsxRuntime.exports.jsx(TableCell,{className:u.title+" "+u.borderBottomLineHeader})]})}),jsxRuntime.exports.jsx(TableBody,{children:i&&((e,r)=>{const t=e.map((e,t)=>[e,t]);return t.sort((e,t)=>{var n=r(e[0],t[0]);return 0!==n?n:e[1]-t[1]}),null!==t&&void 0!==t&&t.length&&k(t[0][0].id),t.map(e=>e[0])})(i,((e,n)=>"desc"===e?(e,t)=>F(e,t,n):(e,t)=>-F(e,t,n))(d,m)).slice(T*y,T*y+y).map(({name:e,state:t,modifiedDateTime:n,createdDateTime:r,id:i,builds:s},o)=>jsxRuntime.exports.jsxs(TableRow,Object.assign({id:"flow-center-flow-item","data-test":"flow-center-flow-item",hover:!0,className:`${c===i?u.tableRowClass:""} ${u.tableRow} `+u.borderBottomLineRow,classes:{selected:u.tableRowSelected},selected:c===i||f===i,onClick:e=>{l?a(i,!1):C(i)}},{children:[jsxRuntime.exports.jsx(TableCell,Object.assign({className:u.borderBottomLine},{children:jsxRuntime.exports.jsxs("div",Object.assign({className:u.boxCell+" "+u.firstColumn},{children:[jsxRuntime.exports.jsx("p",Object.assign({className:u.flowName},{children:e})),jsxRuntime.exports.jsxs("div",Object.assign({className:u.boxSubtitle},{children:[jsxRuntime.exports.jsx(Tooltip,Object.assign({title:SHARED_MESSAGES.copyFlowID()},{children:jsxRuntime.exports.jsx("img",{src:img$d,alt:"copyID",draggable:"false",onClick:e=>{{var t=i;e.stopPropagation();const n=document.createElement("textarea");return n.value=t,document.body.appendChild(n),n.select(),document.execCommand("copy"),document.body.removeChild(n),x(!0),S("ENGINE_COPIED"),void setTimeout(()=>{x(!1),S("EMPTY")},2e3)}}})})),(e=>jsxRuntime.exports.jsxs("p",Object.assign({className:u.flowVersion},{children:[SHARED_MESSAGES.version()," ",lodash.exports.get(e,"records[0].version",0)]})))(s)]}))]}))})),jsxRuntime.exports.jsx(TableCell,Object.assign({className:u.borderBottomLine},{children:jsxRuntime.exports.jsx(StatusPill,{dataTest:"flow-center-flows-table-state",state:t})})),jsxRuntime.exports.jsx(TableCell,Object.assign({className:u.borderBottomLine},{children:r&&A(n)})),jsxRuntime.exports.jsx(TableCell,Object.assign({className:u.borderBottomLine},{children:r&&A(r)})),jsxRuntime.exports.jsx(TableCell,Object.assign({className:u.borderBottomLine},{children:jsxRuntime.exports.jsx(IconButton,Object.assign({className:u.moreActionsBtn,"data-test":"flow-center-action-btn-toggleOpenMenu",onClick:e=>{var t=i;e.stopPropagation(),p(!0),G(e.currentTarget),h(t)},size:"large"},{children:jsxRuntime.exports.jsx(default_1$8,{})}))}))]}),e+" + "+o))})]}))})),jsxRuntime.exports.jsx(TablePagination,{className:u.title,rowsPerPageOptions:[10,25,50,100,200],component:"div",count:i.length,rowsPerPage:y,page:T,onPageChange:X,onRowsPerPageChange:K}),jsxRuntime.exports.jsx(Popper,Object.assign({disablePortal:!0,style:{zIndex:W},open:U,anchorEl:$,transition:!0,placement:"bottom-end"},{children:({TransitionProps:e})=>jsxRuntime.exports.jsx(ClickAwayListener,Object.assign({onClickAway:()=>{p(!1),a("",!1),h(""),H(!1)}},{children:jsxRuntime.exports.jsx(Fade,Object.assign({},e,{timeout:350},{children:jsxRuntime.exports.jsxs(Paper,Object.assign({className:u.paperContainer},{children:[jsxRuntime.exports.jsx(Button,Object.assign({"data-test":"flow-center-flow-list-viewDetails",onClick:()=>{a(f,!1)},startIcon:jsxRuntime.exports.jsx("img",{className:u.popperIcon,src:img$p,alt:"openInNewIcon"}),className:u.popperBtns},{children:SHARED_MESSAGES.viewDetails()})),jsxRuntime.exports.jsx(Button,Object.assign({"data-test":"flow-center-flow-list-viewRunningInstances",onClick:()=>{a(f,!0)},startIcon:jsxRuntime.exports.jsx("img",{className:u.popperIcon,src:img$m,alt:"openInNewIcon"}),className:u.popperBtns},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:"fc.flowList.runningInstances",defaultMessage:"View Running Instances",description:"View Running Instances"})})),jsxRuntime.exports.jsx(Button,Object.assign({"data-test":"flow-center-flow-list-openFlow",className:u.popperBtns,startIcon:jsxRuntime.exports.jsx("img",{className:u.popperIcon,src:img$M,alt:"openInNewIcon"}),onClick:e=>{C()}},{children:SHARED_MESSAGES.openFlow()})),jsxRuntime.exports.jsx("hr",{className:u.popperHr}),jsxRuntime.exports.jsx(Button,Object.assign({"data-test":"flow-center-flow-list-open-deleteFlow",className:u.popperBtns,startIcon:jsxRuntime.exports.jsx("img",{className:u.popperIcon,src:img$y,alt:"deleteIcon"}),onClick:()=>{g(!0)}},{children:SHARED_MESSAGES.deleteFlow()}))]}))}))}))})),M&&jsxRuntime.exports.jsxs(Dialog,Object.assign({role:"presentation",disablePortal:!0,disableEscapeKeyDown:!0,open:z,classes:{paper:t.container},onClose:()=>_(!1),"aria-labelledby":"alert-dialog-title","aria-describedby":"alert-dialog-description"},{children:[jsxRuntime.exports.jsx(DialogTitle,Object.assign({className:t.title},{children:SHARED_MESSAGES.confirmDelete()})),jsxRuntime.exports.jsx(DialogContent,Object.assign({className:t.content},{children:jsxRuntime.exports.jsx(FormattedMessage,{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===M||void 0===M?void 0:M.name)||""}})})),jsxRuntime.exports.jsxs(DialogActions,Object.assign({className:t.actions},{children:[jsxRuntime.exports.jsx(Button,Object.assign({"data-test":"flow-center-flow-list-cancelDeleteFlow",onClick:()=>_(!1),className:t.cancelButton},{children:SHARED_MESSAGES.cancel()})),jsxRuntime.exports.jsx(Button,Object.assign({"data-test":"flow-center-flow-list-submitDeleteFlow",onClick:()=>_(!0),className:t.confirmationButton,autoFocus:!0},{children:SHARED_MESSAGES.delete()}))]}))]})),M&&v&&jsxRuntime.exports.jsxs(Dialog,Object.assign({role:"presentation",disablePortal:!0,disableEscapeKeyDown:!0,open:v,classes:{paper:t.container},onClose:()=>O(),"aria-labelledby":"alert-dialog-title","aria-describedby":"alert-dialog-description"},{children:[jsxRuntime.exports.jsx(DialogTitle,Object.assign({className:t.title},{children:b.OPEN_FLOW_SETTINGS})),jsxRuntime.exports.jsxs(DialogContent,Object.assign({className:t.content},{children:[jsxRuntime.exports.jsx("div",Object.assign({className:""+n.paddingDiv},{children:jsxRuntime.exports.jsx(FormattedMessage,{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"})})),jsxRuntime.exports.jsx("div",Object.assign({className:""+n.paddingDiv},{children:jsxRuntime.exports.jsx(Select,Object.assign({id:"os-flow-center-header-cluster-select.hGcgxR",value:E.newFlowClusterID,onChange:e=>{r(newFlowClusterIDAction(e.target.value))},className:""+n.fullWidth},{children:null===j||void 0===j?void 0:j.map(e=>jsxRuntime.exports.jsx(MenuItem,Object.assign({value:null==e?void 0:e.id},{children:null==e?void 0:e.name}),null==e?void 0:e.id))}))}))]})),jsxRuntime.exports.jsxs(DialogActions,Object.assign({className:t.actions},{children:[jsxRuntime.exports.jsx(Button,Object.assign({"data-test":"flow-center-flow-list-cancelSelectCluster",onClick:()=>O(),className:t.cancelButton},{children:b.CANCEL_SELECT_CLUSTER})),jsxRuntime.exports.jsx(Button,Object.assign({"data-test":"flow-center-flow-list-openFlowAdvDialog",onClick:()=>{var e=(e=null===M||void 0===M?void 0:M.id)||f,t=o?"latest":D(e),n=s+`/flow/${e}/`+t;E.newFlowClusterID?(window.open(`${s}/flow/${e}/${t}/${E.newFlowClusterID}/default-cluster`,"_blank","noopener"),r(newFlowClusterIDAction(""))):window.open(n,"_blank","noopener,noreferrer"),O()},className:t.confirmationButton,autoFocus:!0},{children:b.OPEN_FLOW}))]}))]})),jsxRuntime.exports.jsx(Snackbar,{anchorOrigin:{vertical:"bottom",horizontal:"left"},open:Z,autoHideDuration:6e3,onClose:N,message:Q[Y],action:jsxRuntime.exports.jsx(IconButton,Object.assign({size:"small","aria-label":"close",color:"inherit","data-test":"flow-center-action-btn-close",onClick:N},{children:jsxRuntime.exports.jsx(default_1$9,{fontSize:"small"})}))})]}))},useStyles$a=makeStyles()(e=>({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:{borderBottom:"0.5px solid #D5DFE9!important",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)}})),TemplateList=({createNewFlow:t,openFirstTemplate:e,onSelectedTemplate:i,isDeselectedTemplate:n})=>{const s=useDispatch(),o=useStyles$a()["classes"],r=useSelector(e=>e.flows.templateToOpen),a=useSelector(e=>e.flows.searchedTemplates),l=useSelector(sessionTokenSelector),c=()=>u.findIndex(e=>e.id===r.id),[u,d]=react.exports.useState([]),[m,p]=react.exports.useState({}),[f,h]=react.exports.useState(c()),g=useSelector(e=>e.flows.filteredTemplates),x=(e,t)=>{e=e.data[t].records.filter(e=>!e.tags||!e.tags.includes("Alteryx"));d(e),h(c())},S=(react.exports.useEffect(()=>{u.length||fetchTemplateGallery(l).then(e=>x(e,"flowTemplates")).catch(e=>{fetchTemplateGalleryFallback(l).then(e=>x(e,"flows")).catch(()=>console.log(e,"error fetching flow templates from fallback"))})},[x]),react.exports.useEffect(()=>{h(c())},[u,c]),react.exports.useEffect(()=>{lodash.exports.isEmpty(r)&&(e?null!==u&&void 0!==u&&u.length&&(p(u[0]),h(0),s(setOpenTemplate({id:u[0].id,title:u[0].title}))):(h(-1),s(setOpenTemplate({id:null,title:null}))))},[s,e,u,r]),react.exports.useEffect(()=>{!f||n||r||(h(-1),s(setOpenTemplate({id:null,title:null})))},[n,s,f]),useSelector(e=>e.flows.selectedFilters)),T=t=>{const n=[];return u.map(e=>{e[t]&&e[t].length&&e[t].forEach(e=>{n.includes(e)||""===e||n.push(e)})}),n},w=(react.exports.useEffect(()=>{var e,t,n;u&&0<u.length&&(e=T("tags"),t=T("categories"),n=(()=>{const t=[];return u.map(e=>{e.author&&(e=e.author.trim(),t.includes(e)||""===e||t.push(e))}),t})(),s(setTagsToStore(e)),s(setCategories(t)),s(setTemplatesAuthors(n))),s(setTemplatesAction(u))},[u,s]),t=>{let n=!0;for(const r in S)if(0!==S[r].length)if(t[r]){const e=S[r];e.forEach(e=>{t[r].includes(e)||(n=!1)})}else n=!1;return n}),y=(react.exports.useEffect(()=>{const e=a||u,t=e.map((e,t)=>{if(w(e))return n=e,r=t,jsxRuntime.exports.jsx(TableRow,Object.assign({hover:!0,className:`${r===f?o.tableRowClass:""} `+o.tableRow,selected:r===f,id:"flow-center-templates-list-item","data-test":"flow-center-templates-list-item"},{children:jsxRuntime.exports.jsx(TableCell,Object.assign({className:o.borderBottomLine,onClick:()=>{p(n),h(r),s(setOpenTemplate({id:n.id,title:n.title})),i(!0)}},{children:jsxRuntime.exports.jsx(Box$1,Object.assign({className:o.boxCell+" "+o.firstColumn},{children:jsxRuntime.exports.jsx(Typography,Object.assign({"data-test":"flow-center-flows-templateList-title",className:o.engineTitle},{children:n.title}))}))}))}),n.id+"-"+r);var n,r});s(setFilteredTemplatesAction(t.filter(e=>null!=e)))},[a,u,S]),()=>jsxRuntime.exports.jsx(Grid,Object.assign({"data-test":"flow-center-templates-list-container",container:!0,id:"flow-center-templates-list-container"},{children:jsxRuntime.exports.jsx(Grid,Object.assign({"data-test":"flow-center-templates-list-subcontainer",item:!0,xs:12},{children:jsxRuntime.exports.jsx(Box$1,{children:jsxRuntime.exports.jsx(TableContainer,{children:jsxRuntime.exports.jsxs(Table,Object.assign({className:o.table},{children:[jsxRuntime.exports.jsx(TableHead,{}),jsxRuntime.exports.jsx(TableBody,{children:g})]}))})})}))}))),E=()=>{var e;return jsxRuntime.exports.jsxs("div",Object.assign({className:o.enginesAndFlowWidgetContainer},{children:[jsxRuntime.exports.jsx("div",Object.assign({className:o.enginesContainer},{children:jsxRuntime.exports.jsx(Box$1,Object.assign({className:-1===f?o.borderRight:""},{children:jsxRuntime.exports.jsx(TableContainer,{children:jsxRuntime.exports.jsxs(Table,Object.assign({className:o.table},{children:[jsxRuntime.exports.jsx(TableHead,{}),jsxRuntime.exports.jsx(TableBody,{children:g})]}))})}))})),jsxRuntime.exports.jsx("div",Object.assign({"data-test":"flow-center-flows-templateList-selected-container",className:o.flowWidgetContainer},{children:jsxRuntime.exports.jsxs(Box$1,Object.assign({mt:4,ml:4,className:o.flowWidgetContent},{children:[jsxRuntime.exports.jsx(Box$1,Object.assign({display:"flex",alignItems:"center"},{children:jsxRuntime.exports.jsx(Box$1,Object.assign({id:"template-widget-title","data-test":"template-widget-title"},{children:jsxRuntime.exports.jsx(Typography,Object.assign({"data-test":"flow-center-flows-templateList-selectedTitle",className:o.boxTitle},{children:null==(e=u[f])?void 0:e.title}))}))})),jsxRuntime.exports.jsx(Box$1,Object.assign({m:1,ml:0,mb:0},{children:jsxRuntime.exports.jsx(Button,Object.assign({"data-test":"flow-center-template-list-createFlowFromTemplate-"+(null==(e=u[f])?void 0:e.title),color:"primary",onClick:()=>t?t(m):"",className:o.button,startIcon:jsxRuntime.exports.jsx("img",{src:img$g,alt:"plus icon"})},{children:SHARED_MESSAGES.createFlowFromTemplate()}))})),jsxRuntime.exports.jsxs(Box$1,Object.assign({my:4},{children:[jsxRuntime.exports.jsxs(Typography,Object.assign({"data-test":"flow-center-flows-templateList-overview",variant:"subtitle1",className:o.typography},{children:[jsxRuntime.exports.jsxs("span",Object.assign({className:o.bold},{children:[SHARED_MESSAGES.overview(),":"]})),jsxRuntime.exports.jsx("div",Object.assign({className:o.infoValue},{children:jsxRuntime.exports.jsx("div",{children:null==(e=u[f])?void 0:e.subtitle})}))]})),jsxRuntime.exports.jsxs(Typography,Object.assign({"data-test":"flow-center-flows-templateList-developer",variant:"subtitle1",className:o.typography},{children:[jsxRuntime.exports.jsxs("span",Object.assign({className:o.bold},{children:[SHARED_MESSAGES.developer(),":"]})),jsxRuntime.exports.jsx("div",Object.assign({className:o.infoValue},{children:jsxRuntime.exports.jsx("div",{children:null==(e=u[f])?void 0:e.author})}))]})),jsxRuntime.exports.jsxs(Typography,Object.assign({"data-test":"flow-center-flows-templateList-certified",variant:"subtitle1",className:o.typography},{children:[jsxRuntime.exports.jsxs("span",Object.assign({className:o.bold},{children:[SHARED_MESSAGES.certified(),":"]})),jsxRuntime.exports.jsxs("div",Object.assign({className:o.infoValue+" "+o.infoValueContainer},{children:[jsxRuntime.exports.jsx("div",{children:SHARED_MESSAGES.yes()}),jsxRuntime.exports.jsx("img",{src:img$i,alt:"veritoneCertifiedIcon"})]}))]})),u[f]&&u[f].categories&&u[f].categories.length&&""!==u[f].categories[0]&&jsxRuntime.exports.jsxs(Typography,Object.assign({"data-test":"flow-center-flows-templateList-category",variant:"subtitle1",className:o.typography},{children:[jsxRuntime.exports.jsxs("span",Object.assign({className:o.bold},{children:[SHARED_MESSAGES.category(),":"]})),jsxRuntime.exports.jsx("div",Object.assign({className:o.infoValue},{children:jsxRuntime.exports.jsx("div",{children:null==(e=u[f])?void 0:e.categories.join(", ")})}))]})),jsxRuntime.exports.jsxs(Typography,Object.assign({"data-test":"flow-center-flows-templateList-tags",variant:"subtitle1",className:o.typography},{children:[jsxRuntime.exports.jsxs("span",Object.assign({className:o.bold},{children:[SHARED_MESSAGES.tags(),":"]})),jsxRuntime.exports.jsx("div",Object.assign({className:o.infoValue},{children:jsxRuntime.exports.jsx("div",{children:(null==(e=null==(e=u[f])?void 0:e.tags)?void 0:e.join(", "))||SHARED_MESSAGES.noTags()})}))]})),jsxRuntime.exports.jsxs(Typography,Object.assign({"data-test":"flow-center-flows-templateList-infoValue",variant:"subtitle1",className:o.typography},{children:[jsxRuntime.exports.jsxs("span",Object.assign({className:o.bold},{children:[SHARED_MESSAGES.active(),":"]})),jsxRuntime.exports.jsx("div",Object.assign({className:o.infoValue},{children:jsxRuntime.exports.jsx("div",{children:SHARED_MESSAGES.yes()})}))]}))]})),jsxRuntime.exports.jsx("img",{style:{width:"100%"},src:null==(e=u[f])?void 0:e.image,alt:""})]}))}))]}))};return a&&0===a.length?jsxRuntime.exports.jsx(NoResults,{}):(-1===f?y:E)()},useSharedStyles=makeStyles()(e=>({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 jsxRuntime.exports.jsx(Tooltip,Object.assign({title:e.showNavigation?SHARED_MESSAGES.hideFilters():SHARED_MESSAGES.showFilters()},{children:jsxRuntime.exports.jsx(IconButton,Object.assign({"data-test":"flow-center-action-btn-toggleNavigation",onClick:()=>e.setShowNavigation(!e.showNavigation),className:""+(e.showNavigation?t.actionIconClose:t.actionIcon),size:"large"},{children:e.showNavigation?jsxRuntime.exports.jsx("img",{width:24,height:24,src:img$e,alt:"filterCloseIcon",draggable:"false"}):jsxRuntime.exports.jsx(default_1,{})}))}))}const useStyles$9=makeStyles()(()=>({iconDistance:{marginLeft:"8px!important"}}));function MoreInfControl(e){var t=useStyles$9()["classes"],n=useSharedStyles()["classes"];return jsxRuntime.exports.jsx(Tooltip,Object.assign({title:e.openFlowDetails?SHARED_MESSAGES.hideMoreInformation():SHARED_MESSAGES.showMoreInformation()},{children:jsxRuntime.exports.jsx(IconButton,Object.assign({"data-test":"flow-center-action-btn-openFlowWidget",onClick:()=>e.setOpenFlowDetails(),className:t.iconDistance+" "+(e.openFlowDetails?n.actionIconClose:n.actionIcon),size:"large"},{children:jsxRuntime.exports.jsx("img",{width:24,height:24,src:img$C,alt:"filterCloseIcon",draggable:"false"})}))}))}const useStyles$8=makeStyles()(e=>({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({header:e,setShowNavigation:t,showNavigation:n,setOpenFlowDetails:r,openFlowDetails:i,screen:s}){const o=useStyles$8()["classes"],a=useSelector(e=>e.flows.flows),l=useSelector(e=>e.flows.isSearching),c=useSelector(e=>e.flows.filteredTemplates);return jsxRuntime.exports.jsxs(MuiToolbar,Object.assign({className:o.toolbar+" "+(l?o.searchResultLength:""),id:"flow-center-toolbar-id"},{children:[jsxRuntime.exports.jsxs(Typography,Object.assign({className:o.title},{children:[l?jsxRuntime.exports.jsx(FormattedMessage,{id:"os-flow-center.eHPGww",defaultMessage:"Search Results",description:"flow-center-header-title"}):jsxRuntime.exports.jsx(FormattedMessage,{id:"os-flow-center.vYqggl",defaultMessage:"{defaultMessage}",description:"flow-center-header-title",values:{defaultMessage:null==e?void 0:e.text}}),(()=>{if(l)return jsxRuntime.exports.jsx(Typography,Object.assign({"data-test":"flow-center-toolbar-searchResultsLength",className:o.flowsLength},{children:a.length+c.length}));switch(null==e?void 0:e.key){case ENGINE_OWNER_TYPES.MINE:return jsxRuntime.exports.jsx(Typography,Object.assign({"data-test":"flow-center-toolbar-flowLength",className:o.flowsLength},{children:a.length}));case ENGINE_OWNER_TYPES.TEMPLATES:return jsxRuntime.exports.jsx(Typography,Object.assign({"data-test":"flow-center-toolbar-filteredTempaltesLength",className:o.flowsLength},{children:c.length}));default:return jsxRuntime.exports.jsx("div",{})}})()]})),jsxRuntime.exports.jsx("div",{className:o.grow}),(null==e?void 0:e.key)===ENGINE_OWNER_TYPES.TEMPLATES&&jsxRuntime.exports.jsx(FiltersControl,{setShowNavigation:t,showNavigation:n}),(0!==a.length||s===ENGINE_OWNER_TYPES.TEMPLATES)&&jsxRuntime.exports.jsx(MoreInfControl,{setOpenFlowDetails:r,openFlowDetails:i})]}))}const useStyles$7=makeStyles()(e=>({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 jsxRuntime.exports.jsx(Typography,Object.assign({"data-test":"flow-center-headerbar-title",className:t.title,noWrap:!0,id:"flow-center-headerbar-title"},{children:e.title}))}const useStyles$6=makeStyles()(e=>({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(e){const t=useStyles$6()["classes"],n=useDispatch(),[r,i]=react.exports.useState(!1),[s,o]=react.exports.useState(!1),a=useSelector(e=>e.flows.searched);var l=useSelector(preferredLanguageSelector)||"en";const c=AIWareFormatMessage(l),u=e=>{var t=""!==e.target.value;n(toggleIsSearching(t)),n(toggleIsSearchingLoading(!0)),n(fetchFlows({name:e.target.value,ownerType:ENGINE_OWNER_TYPES.MINE})),n(setSearched(e.target.value))};return e.showSearchBar?jsxRuntime.exports.jsxs(jsxRuntime.exports.Fragment,{children:[jsxRuntime.exports.jsx("div",Object.assign({id:"flow-center-headerbar-searchbar-id",className:t.container,onMouseEnter:()=>i(!0),onMouseLeave:()=>{i(!1)}},{children:jsxRuntime.exports.jsxs("div",Object.assign({className:t.searchInputContainer+" "+(r||s?r&&!s?t.searchInputContainerHover:s?t.searchInputContainerActive:void 0:t.searchInputContainerDefault)},{children:[jsxRuntime.exports.jsx("div",Object.assign({className:t.searchIconContainer},{children:jsxRuntime.exports.jsx(Search,{fontSize:"small",sx:{color:r||s?"#555F7C":"#555F7C99"}})})),jsxRuntime.exports.jsx("input",{id:"flow-center-headerbar-searchbar","data-test":"flow-center-headerbar-searchbar",value:a,onFocus:()=>o(!0),onBlur:()=>o(!1),placeholder:c({id:"os-flow-center.searchflowcenter1",defaultMessage:[{type:0,value:"Search the flow center"}]}),className:t.searchInput,onChange:u}),a&&jsxRuntime.exports.jsx(Close,{fontSize:"small",sx:{color:r||s?"#555F7C":"#555F7C99"},onClick:()=>{n(toggleIsSearching(!1)),n(toggleIsSearchingLoading(!1)),n(setSearched("")),n(setSearchedTemplates(null)),n(fetchFlows({name:"",ownerType:ENGINE_OWNER_TYPES.MINE}))}})]}))})),jsxRuntime.exports.jsx("div",{className:t.grow}),jsxRuntime.exports.jsx("div",{})]}):jsxRuntime.exports.jsx("div",{})}const useStyles$5=makeStyles()(e=>({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:e.spacing(0)+"!important",padding:`${e.spacing(1.6)} ${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}}})),DialogFormattedMessages={NEW_FLOW_SETTINGS:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-flow-center-header.hirrzH",defaultMessage:"New Flow Settings",description:"msg new flow settings"}),CANCEL_SELECT_CLUSTER:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-flow-center-header.hixxrt",defaultMessage:"Cancel",description:"msg cancel select cluster"}),CREATE_FLOW:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-flow-center-header.jbxxqH",defaultMessage:"Create Flow",description:"msg create flow"}),CREATE_FLOW_ADVANCED:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-flow-center-header.jbxxty",defaultMessage:"Create Flow Advanced",description:"msg create flow Advanced"})};function HeaderBarButtons(e){const t=useStyles$5()["classes"],n=useDispatch(),r=useCommonStyles()["classes"];var i=useSelector(e=>e.flows.isLoadingCreateNewFlow);const s=useSelector(newFlowClusterIDSelector)||null,[o]=react.exports.useState([]),a=()=>{e.setOpenClusterDialog(!1),n(newFlowClusterIDAction(""))},l=e=>{n(newFlowClusterIDAction(e.target.value))},c=()=>{e.setOpenClusterDialog(!1),e.createNewFlow()};return jsxRuntime.exports.jsxs("div",Object.assign({className:t.buttonDiv},{children:[e.openClusterDialog&&jsxRuntime.exports.jsxs(Dialog,Object.assign({role:"presentation",disablePortal:!0,disableEscapeKeyDown:!0,open:e.openClusterDialog,classes:{paper:r.container},onClose:a,"aria-labelledby":"alert-dialog-title","aria-describedby":"alert-dialog-description"},{children:[jsxRuntime.exports.jsx(DialogTitle,Object.assign({className:r.title},{children:DialogFormattedMessages.NEW_FLOW_SETTINGS})),jsxRuntime.exports.jsxs(DialogContent,Object.assign({className:r.content},{children:[jsxRuntime.exports.jsx("div",Object.assign({className:""+t.paddingDiv},{children:jsxRuntime.exports.jsx(FormattedMessage,{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"})})),jsxRuntime.exports.jsx("div",Object.assign({className:""+t.paddingDiv},{children:jsxRuntime.exports.jsx(Select,Object.assign({id:"os-flow-center-header-cluster-select.hGcgxR",value:s.newFlowClusterID,onChange:l,className:""+t.fullWidth},{children:null===o||void 0===o?void 0:o.map(e=>jsxRuntime.exports.jsx(MenuItem,Object.assign({value:null==e?void 0:e.id},{children:null==e?void 0:e.name}),null==e?void 0:e.id))}))}))]})),jsxRuntime.exports.jsxs(DialogActions,Object.assign({className:r.actions},{children:[jsxRuntime.exports.jsx(Button,Object.assign({"data-test":"flow-center-flow-list-cancelDeleteFlow",onClick:a,className:r.cancelButton},{children:DialogFormattedMessages.CANCEL_SELECT_CLUSTER})),jsxRuntime.exports.jsx(Button,Object.assign({"data-test":"flow-center-flow-list-submitDeleteFlow",onClick:c,className:r.confirmationButton,autoFocus:!0},{children:DialogFormattedMessages.CREATE_FLOW}))]}))]})),jsxRuntime.exports.jsx(Button,Object.assign({"data-test":"flow-center-header-onCreateNewFlowButton",id:"flow-center-header-onCreateNewFlowButton",variant:"outlined",disabled:i,startIcon:i?jsxRuntime.exports.jsx(CircularProgress$1,{className:t.loadingBarcontainer}):jsxRuntime.exports.jsx(default_1$7,{className:t.flowIconAdd}),className:`${t.buttonFlowCenterAdvanceDisabled} ${t.buttonAddNew}
|
|
2
2
|
${i?t.disabledButton:""}
|
|
3
3
|
${e.showAdditionalOptionButton?t.marginRight:""} `+(e.automateFullScreen?t.btnWidthAdvanceDisabled:""),onClick:c},{children:SHARED_MESSAGES.newFlow()}))]}))}const useStyles$4=makeStyles()(e=>({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){const t=useStyles$4()["classes"];return e.showAdditionalOptionButton?jsxRuntime.exports.jsxs("div",Object.assign({className:t.additionalOptionsContainer},{children:[e.showFullScreenButton&&jsxRuntime.exports.jsx(Tooltip,Object.assign({title:e.fullScreen?SHARED_MESSAGES.exitFullScreen():SHARED_MESSAGES.enterFullScreen()},{children:jsxRuntime.exports.jsx(IconButton,Object.assign({className:t.additionalOptBtn,"data-test":"flow-center-action-btn-toggleFullScreen",onClick:()=>{e.setFullScreen(!e.fullScreen)},size:"large"},{children:jsxRuntime.exports.jsx("img",{src:e.fullScreen?img$f:img$h,alt:"fullscreen-icon",draggable:"false"})}))})),e.showCollapseButton&&jsxRuntime.exports.jsx(Tooltip,Object.assign({title:SHARED_MESSAGES.closePanel()},{children:jsxRuntime.exports.jsx(IconButton,Object.assign({"data-test":"flow-center-action-btn-closePanel",className:t.additionalOptBtn,onClick:()=>{e.hidePanel&&e.hidePanel()},size:"large"},{children:jsxRuntime.exports.jsx("img",{src:img$Q,alt:"collapseicon",draggable:"false"})}))}))]})):jsxRuntime.exports.jsx("div",{})}const useStyles$3=makeStyles()(e=>({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({options:e,createNewFlow:t,collapseFlowCenter:n,setFullScreen:r,setScreen:i,fullScreen:s,hidePanel:o,zIndex:a,automateFullScreen:l}){const c=useStyles$3()["classes"],[u,d]=react.exports.useState(!1);return jsxRuntime.exports.jsx("div",Object.assign({className:c.headerbarContainer+" "+(l?u?null:c.fullScreenState:c.headerbarContainerBorder),id:"flow-center-headerbar-container","data-test":"flow-center-headerbar-container"},{children:l?jsxRuntime.exports.jsxs(react.exports.Fragment,{children:[jsxRuntime.exports.jsx(HeaderBarSearchBar,{showSearchBar:e.showSearchBar,isFullScreen:s,setScreen:i,automateFullScreen:l}),jsxRuntime.exports.jsx(HeaderBarButtons,{showAdditionalOptionButton:e.showAdditionalOptionButton,showCreateNewFlow:e.showCreateNewFlow,showNewFromTemplate:e.showNewFromTemplate,isFullScreen:s,createNewFlow:t,zIndex:a,automateFullScreen:l,openClusterDialog:u,setOpenClusterDialog:d})]}):jsxRuntime.exports.jsx(AppBar,Object.assign({position:"static",color:"transparent",className:c.header},{children:jsxRuntime.exports.jsxs(MuiToolbar,Object.assign({className:c.root},{children:[jsxRuntime.exports.jsx(HeaderBarTitle,{title:e.title}),jsxRuntime.exports.jsx(HeaderBarSearchBar,{showSearchBar:e.showSearchBar,setScreen:i,automateFullScreen:l}),jsxRuntime.exports.jsx(HeaderBarButtons,{showAdditionalOptionButton:e.showAdditionalOptionButton,showCreateNewFlow:e.showCreateNewFlow,showNewFromTemplate:e.showNewFromTemplate,createNewFlow:t,zIndex:a,automateFullScreen:l,openClusterDialog:u,setOpenClusterDialog:d}),jsxRuntime.exports.jsx(HeaderBarControlButtons,{showAdditionalOptionButton:e.showAdditionalOptionButton,showFullScreenButton:e.showFullScreenButton,showCollapseButton:e.showCollapseButton,collapseFlowCenter:n,setFullScreen:r,fullScreen:s,hidePanel:o})]}))}))}))}const DEFAULT_FILTERS_FOR_TAB_TEMPLATES=[ENGINE_FILTER_TYPES.TAGS,ENGINE_FILTER_TYPES.CATEGORIES,"author"],DEFAULT_FILTERS_FOR_TAB_MY_FLOWS=[],DEFAULT_TABS=[ENGINE_OWNER_TYPES.MINE,ENGINE_OWNER_TYPES.TEMPLATES],DEFAULT_FILTERS=[ENGINE_FILTER_TYPES.TAGS],ALL_TABS=[{key:ENGINE_OWNER_TYPES.ORGANIZATION,text:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-flow-center.organizationcategory",defaultMessage:"My Organization",description:"My Organization Category"}),icon:default_1$5},{key:ENGINE_OWNER_TYPES.MINE,text:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-flow-center.orgflows",defaultMessage:"Org Flows",description:"Org Flows Category"}),icon:default_1$3},{key:ENGINE_OWNER_TYPES.SHARED,text:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-flow-center.sharedwmecategory",defaultMessage:"Shared w/ me",description:"Shared with me Category"}),icon:default_1$4},{key:ENGINE_OWNER_TYPES.TEMPLATES,text:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-flow-center.templatescategory",defaultMessage:"Templates",description:"Templates Category"}),icon:default_1$2}],ALL_FILTERS=[{group:ENGINE_FILTER_TYPES.CERTIFIED,text:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-flow-center.certified",defaultMessage:"Certified",description:"Flow Center Certified Filter"}),options:[{text:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-flow-center.veritonecertified.filter",defaultMessage:"Veritone Certified",description:"Veritone Certified Filter"}),value:"veritone_certified"},{text:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-flow-center.verified",defaultMessage:"Verified Publisher",description:"Verified Publisher filter"}),value:"verified_publisher"}]},{group:ENGINE_FILTER_TYPES.CATEGORIES,text:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-flow-center.categories",defaultMessage:"Categories",description:"Flow Center filter Categories"}),options:[]},{group:ENGINE_FILTER_TYPES.INDUSTRIES,text:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-flow-center.industries",defaultMessage:"Industries",description:"Flow Center filter Industries"}),options:[{text:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-flow-center.hitech",defaultMessage:"Hi Tech",description:"Flow Center filter option value Hi Tech"}),value:"Hi Tech"},{text:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-flow-center.medicine",defaultMessage:"Medicine",description:"Flow Center filter option value Medicine"}),value:"Medicine"},{text:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-flow-center.law",defaultMessage:"Law",description:"Flow Center filter option value Law"}),value:"Law"},{text:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-flow-center.government",defaultMessage:"Government",description:"Flow Center filter option value Government"}),value:"Government"}]},{group:ENGINE_FILTER_TYPES.APPLICATIONS,text:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-flow-center.applications",defaultMessage:"Applications",description:"Flow Center filter Applications"}),options:[{text:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-flow-center.testapp",defaultMessage:"Test",description:"Flow Center filter option value Test"}),value:"Test"},{text:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-flow-center.speach",defaultMessage:"Speach",description:"Flow Center filter option value Speach"}),value:"Speach"},{text:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-flow-center.videoprocessing",defaultMessage:"Video processing",description:"Flow Center filter option value Video Processing"}),value:"Video processing"},{text:jsxRuntime.exports.jsx(FormattedMessage,{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:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-flow-center.classes",defaultMessage:"Classes",description:"Flow Center filter Classes"}),options:[{text:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-flow-center.networkisolated",defaultMessage:"Network isolated",description:"Flow Center filter option value Network Isolated"}),value:"Network isolated"},{text:jsxRuntime.exports.jsx(FormattedMessage,{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:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-flow-center.noteworthy",defaultMessage:"Noteworthy",description:"Flow Center filter Noteworthy"}),options:[]},{group:ENGINE_FILTER_TYPES.TAGS,text:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-flow-center.tags",defaultMessage:"Tags",description:"Flow Center filter Tags"}),options:[]},{group:"author",text:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-flow-center.developer",defaultMessage:"Developer",description:"Flow Center filter Developer"}),options:[]},{group:ENGINE_FILTER_TYPES.PRICE,text:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-flow-center.price",defaultMessage:"Price",description:"Flow Center filter Price"}),options:[{text:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-flow-center.under25",defaultMessage:"Under $25",description:"Flow Center filter option value Under $25"}),value:"Under $25"},{text:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-flow-center.25to50",defaultMessage:"$25 to $50",description:"Flow Center filter option value $25 to $50"}),value:"$25 to $50"},{text:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-flow-center.50to100",defaultMessage:"$50 to $100",description:"Flow Center filter option value $50 to $100"}),value:"$50 to $100"},{text:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-flow-center.100to200",defaultMessage:"$100 to $200",description:"Flow Center filter option value $100 to $200"}),value:"$100 to $200"}]}],engineJSON={name:"",description:"",categoryId:"c5458876-43d2-41e8-a340-f734702df04a",deploymentModel:"NonNetworkIsolated",manifest:{runtime:"nodeRed",engineMode:"chunk",supportedInputTypes:["application/json"]},distributionType:""},automateEngineJWTRights={roles:[{roleName:"workflow",taskRights:["ingestion:create","ingestion:read","ingestion:update","ingestion:delete","job:create","job:read","job:update","job:delete","recording:create","recording:read","recording:update","recording:delete","mentions:create","mentions:read","mentions:update","mentions:delete","collection:create","collection:read","collection:update","collection:delete","asset:uri","asset:all","task:update","report:create","analytics:usage"],assetRights:["recording:update"]}]},DEFAULT_GRAPHQL_ENDPOINT="v3/graphql",DEFAULT_CLUSTER="prd5-21xbyq0x-4h0s-o685-snas-oovhdai552v9",getAvailableClusters=`query getCluster {
|
|
4
4
|
clusters(edgeVersion: 3, limit: 200, status: online) {
|
|
@@ -20,4 +20,4 @@ import{z as createSvgIcon,C as interopRequireDefault,j as jsxRuntime,r as react,
|
|
|
20
20
|
distributionType
|
|
21
21
|
}
|
|
22
22
|
}
|
|
23
|
-
`;var gqlQueries=Object.freeze({__proto__:null,getAvailableClusters:getAvailableClusters,createEngineMutation:createEngineMutation});const createEngine=(e,t,n)=>{var r=gqlQueries["createEngineMutation"];return fetchVeritoneGraphQLApi(n,t,r,{engineJson:e})},useStyles$2=makeStyles()(e=>({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 jsxRuntime.exports.jsx(Grid,Object.assign({container:!0,spacing:0,direction:"column",alignItems:"center",justifyContent:"center",className:t.container},{children:jsxRuntime.exports.jsxs(Grid,Object.assign({item:!0,xs:4,className:t.contentContainer},{children:[jsxRuntime.exports.jsx("img",{className:t.icon,src:img$8,alt:"noFlowsFoundIcon"}),jsxRuntime.exports.jsxs("div",Object.assign({className:t.textContainer},{children:[jsxRuntime.exports.jsx(Typography,Object.assign({className:t.title},{children:SHARED_MESSAGES.noFlowsFound()})),jsxRuntime.exports.jsx(Typography,Object.assign({className:t.subtitle},{children:SHARED_MESSAGES.noFlowsFoundSubtitle()})),jsxRuntime.exports.jsxs(Box,Object.assign({className:t.buttonContainer},{children:[jsxRuntime.exports.jsx(Button,Object.assign({className:t.commonBtn,onClick:e.createNewFlow},{children:SHARED_MESSAGES.createNewFlow()})),jsxRuntime.exports.jsx(Button,Object.assign({className:t.commonBtn,onClick:()=>{e.setScreen(ENGINE_OWNER_TYPES.TEMPLATES)}},{children:SHARED_MESSAGES.chooseATemplate()}))]}))]}))]}))}))}const useStyles$1=makeStyles()(()=>({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"],{selectedTab:e,handleChange:n}=e,r=useSelector(e=>e.flows.flows),i=useSelector(e=>e.flows.filteredTemplates)||[];return jsxRuntime.exports.jsx(AppBar,Object.assign({className:t.tabsContainer,position:"static",color:"transparent",elevation:0},{children:jsxRuntime.exports.jsxs(Tabs,Object.assign({value:e,onChange:n,"aria-label":"search-results-tabs"},{children:[jsxRuntime.exports.jsx(Tab,{id:"flow-center-searchResults-flows","data-test":"flow-center-searchResults-flows",className:t.tab,label:SHARED_MESSAGES.flowsCount(r.length)}),jsxRuntime.exports.jsx(Tab,{id:"flow-center-searchResults-templates","data-test":"flow-center-searchResults-templates",className:t.tab,label:SHARED_MESSAGES.templatesCount(i.length)})]}))}))}const getContentHeight=()=>{var e=useSelector(e=>e.flows.config.isFullScreen);return useSelector(e=>e.flows.config.automateFullScreen)?"calc(100vh - 64px - 54px)":`calc(100vh - 64px - 64px - ${e?"0px":"62px"})`},getFlowCenterConfig=()=>{return{isFullScreen:useSelector(e=>e.flows.config.isFullScreen),automateFullScreen:useSelector(e=>e.flows.config.automateFullScreen),zIndex:useSelector(e=>e.flows.config.zIndex),graphQLEndpoint:useSelector(e=>e.flows.config.graphQLEndpoint),defaultCluster:useSelector(e=>e.flows.config.defaultCluster)}};function ResultsContainer(t){const{selectedTab:e,selectedFlowId:n,classes:r,allowSetFirstFlowId:i}=t,s=useSelector(preferredLanguageSelector)||"en",o=getFlowCenterConfig(),a=useSelector(rootApiSelector),l=useSelector(controllerNodeRedImageSelector),c=useSelector(controllerUrlSelector);return jsxRuntime.exports.jsx(Box,Object.assign({ml:3},{children:0===e?""==n?jsxRuntime.exports.jsx(FlowList,{simpleMode:t.simpleMode,selectedFlowId:n,onSelectFlow:t.onSelectFlow,setFirstFlowId:t.setFirstFlowId,screenName:t.screenName,zIndex:o.zIndex,showTitle:!1,setOpenFlowDetails:t.setOpenFlowDetails}):jsxRuntime.exports.jsxs("div",Object.assign({className:r.enginesAndFlowWidgetContainer},{children:[jsxRuntime.exports.jsx("div",Object.assign({className:r.enginesContainer},{children:jsxRuntime.exports.jsx(FlowList,{simpleMode:""!==n,selectedFlowId:n,setFirstFlowId:e=>{i&&t.setSelectedFlowId(e)},onSelectFlow:e=>{t.scrollContainerToTop(),t.setSelectedFlowId(e),t.setAllowSetFirstFlowId(!1)},screenName:t.screenName,zIndex:o.zIndex,setOpenFlowDetails:e=>{t.setOpenFlowDetails(e)}})})),jsxRuntime.exports.jsx("div",Object.assign({className:r.flowWidgetContainer},{children:jsxRuntime.exports.jsx("div",Object.assign({className:r.flowWidgetContenet},{children:jsxRuntime.exports.jsx(App$1,Object.assign({},{engineId:n,openFlowRunningInstances:t.openFlowRunningInstances,locale:s,openTab:t.openTabFlowWidget,config:{apiRoot:a,graphQLEndpoint:o.graphQLEndpoint,controllerUrl:c,defaultCluster:o.defaultCluster,controllerNodeRedImage:l},tabs:[IFlowWidgetTabs.Overview,IFlowWidgetTabs.Versions,IFlowWidgetTabs.Activity,IFlowWidgetTabs.DistributionSettings],activityTabs:[IFlowWidgetActivityTabs.Jobs,IFlowWidgetActivityTabs.ScheduledJobs],onExitClicked:()=>{t.setSelectedFlowId(""),t.setOpenFlowRunningInstances(!1),t.setOpenFlowDetails(!1)},onDeleteFlow:()=>{setTimeout(()=>{t.setUpdateFlowList(n),t.setSelectedFlowId(""),t.setUpdateFlowList("")},2e3)}}))}))}))]})):jsxRuntime.exports.jsx(TemplateList,{createNewFlow:t.createNewFlow,openFirstTemplate:t.openFirstTemplate,isDeselectedTemplate:t.isDeselectedTemplate,onSelectedTemplate:t.onSelectedTemplate})}))}const useStyles=makeStyles()(e=>({container:{width:"100%",overflowY:"auto"},tabsContainer:{paddingLeft:18,borderBottom:"0.5px solid #D5DFE9","& div > span:last-child":{backgroundColor:"black"}}}));function SearchResultsPage(e){const t=useStyles()["classes"],n=useDispatch(),r=useSelector(e=>e.flows.templates),i=useSelector(e=>e.flows.searched);var s=useSelector(e=>e.flows.isSearchingLoading);const o=useSelector(e=>e.flows.searchedTemplates||[]),a=useSelector(e=>e.flows.flows),[l,c]=react.exports.useState(0),u=(react.exports.useEffect(()=>{if(r&&0!==r.length){const t=new RegExp(i,"gi");var e=r.filter(e=>t.test(e.title));n(setSearchedTemplates(e))}return()=>{n(setSearchedTemplates(null))}},[r,i]),(e,t)=>{c(t)}),d=getContentHeight();return s?jsxRuntime.exports.jsxs("div",{children:[jsxRuntime.exports.jsx(Skeleton,{variant:"rectangular",className:e.classes.lineItem}),jsxRuntime.exports.jsx(Skeleton,{variant:"rectangular",className:e.classes.lineItem}),jsxRuntime.exports.jsx(Skeleton,{variant:"rectangular",className:e.classes.lineItem})]}):!!o.length||!!a.length?jsxRuntime.exports.jsxs("div",Object.assign({className:t.container,style:{height:d}},{children:[jsxRuntime.exports.jsx(TabsContainer,{selectedTab:l,handleChange:u}),jsxRuntime.exports.jsx(ResultsContainer,{selectedTab:l,openFlowRunningInstances:e.openFlowRunningInstances,simpleMode:e.simpleMode,selectedFlowId:e.selectedFlowId,onSelectFlow:e.onSelectFlow,setFirstFlowId:e.setFirstFlowId,screenName:e.screenName,createNewFlow:e.createNewFlow,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})]})):jsxRuntime.exports.jsx(NoResults,{})}const namespace="engineDistributionType",initialState={engineDistributionType:"instance_locked"},engineDistributionSlice=createSlice({name:namespace,initialState:initialState,reducers:{engineDistributionTypeAction(e,t){e.engineDistributionType=t.payload}}}),engineDistributionTypeSelector=e=>(null==e?void 0:e[namespace])||null,engineDistributionTypeReducer=engineDistributionSlice.reducer,mainContainerId="flow-center-container",FlowCenter=({graphQLEndpoint:e=DEFAULT_GRAPHQL_ENDPOINT,defaultCluster:t=DEFAULT_CLUSTER,defaultScreen:n=ENGINE_OWNER_TYPES.MINE,tabs:L=DEFAULT_TABS,filters:r=DEFAULT_FILTERS,options:k={header:{title:"FLOW CENTER",showSearchBar:!0,showNewFromTemplate:!0,showCreateNewFlow:!0,showAdditionalOptionButton:!0,showCollapseButton:!0,showFullScreenButton:!0}},openTabFlowWidget:W=0,collapseFlowCenter:H,isFullScreen:i=!1,hidePanel:P,marginTop:G=0,zIndex:s=0,automateFullScreen:o=!1})=>{const j=useDispatch(),$=useSelector(preferredLanguageSelector)||"en",a=useSelector(baseUrlSelector),B=useSelector(rootApiSelector),v=useSelector(sessionTokenSelector),V=useSelector(graphEndpointSelector);let O=useSelector(controllerNodeRedImageSelector),b=useSelector(controllerUrlSelector);const U=useSelector(automateControllerUrlSelector),z=useSelector(engineDistributionTypeSelector)||null,Z=useSelector(newFlowClusterIDSelector)||null,Y=(b=b||U.replace("automate-",""),useSelector(automateUrlSelector)),q=useSelector(e=>e.flows.isRevisionsExistOnServer),[l,J]=(setApiEndpoint(a),react.exports.useEffect(()=>{setApiEndpoint(a)},[a]),react.exports.useEffect(()=>{j(setFlowCenterConfig({isFullScreen:i,automateFullScreen:o,zIndex:s,graphQLEndpoint:e,defaultCluster:t}))},[i,o,s,e,t]),react.exports.useState("")),[c,u]=react.exports.useState(n),[d,m]=react.exports.useState("");var[n,Q]=react.exports.useState(!0);const[p,f]=react.exports.useState(!1),[h,g]=react.exports.useState(!1),[X,K]=react.exports.useState(""),[ee,x]=react.exports.useState(!0),[S,te]=react.exports.useState(i),[T,w]=react.exports.useState(!1),[y,E]=react.exports.useState(!1),[I,F]=react.exports.useState(""),[ne,re]=react.exports.useState(!0),R=useSelector(e=>e.flows.flows),ie=useSelector(e=>e.flows.shouldCreateInitialFlows),se=useSelector(e=>e.flows.isSearching),oe=useSelector(e=>e.flows.searched),_=(react.exports.useEffect(()=>{J(oe)},[oe]),(T,w=!1,y="1",E=!1)=>__awaiter(void 0,void 0,void 0,function*(){j(toggleStateCreateNewFlow(!0));try{var i=lodash.exports.get(T,"id",y),s=(x=i,yield __awaiter(void 0,void 0,void 0,function*(){let t;try{return t=yield getTemplateById(x,v)}catch(e){return t=yield getTemplateByIdFallback(x,v)}}));if(!s)throw new Error("Error retrieving data for flow of id "+i);let e,t=(e=s.data.flowTemplates?"data.flowTemplates.records[0]":"data.flows.records[0]",lodash.exports.get(s,e+".flow")),n=(t=t&&JSON.parse(atob(t)),lodash.exports.get(s,e+".package"));n=n&&JSON.parse(atob(n));const S=engineJSON;E?(S.name=lodash.exports.get(s,e+".title","Untitled Flow"),S.description=lodash.exports.get(s,e+".subtitle","")):(S.name=lodash.exports.get(T,"title","Untitled Flow"),S.description=lodash.exports.get(T,"subtitle","")),z.engineDistributionType&&(S.distributionType=z.engineDistributionType);var o=yield createEngine(S,v,V);if(!o)throw new Error("Error while creating new engine");var a=lodash.exports.get(o,"data.createEngine.id"),l=lodash.exports.get(o,"data.createEngine.manifest.engineMode","chunk");let r={};var c=yield getNodeRedVersionEdgeApi(b),u=(c&&c.version&&c.version.runner&&(O=c.version.runner,r=c.version),{runtime:"nodeRed",engineId:a,engineMode:l}),d=automateEngineJWTRights,m=O,p={edge:{},nodeRed:{version:r,flows:null!=T&&T.id||E?t:[],package:null!=T&&T.id||E?n:{}}},f=yield createEnginebuild({engineId:a,manifest:u,JWTRights:d,taskRuntime:p,dockerImage:m},v);if(!f)throw new Error("There was an error while creating engine build for engine with id "+a);var h=lodash.exports.get(f,"data.createEngineBuild.id"),g=q?"latest":h;j(toggleStateCreateNewFlow(!1)),w?j(setShouldCreateInitialFlows(!1)):Z.newFlowClusterID?(window.open(`${Y}/flow/${a}/${g}/${Z.newFlowClusterID}/default-cluster`,"_blank","noopener"),j(newFlowClusterIDAction(""))):window.open(Y+`/flow/${a}/`+g,"_blank","noopener")}catch(e){console.error("this is from code",e)}finally{j(toggleStateCreateNewFlow(!1))}var x}));react.exports.useEffect(()=>{j(isRevisionsExistOnServer())},[j]),react.exports.useEffect(()=>{j(setFetchingFlows())},[j]),react.exports.useEffect(()=>{j(fetchFlows({name:l,ownerType:c})),null!==R&&void 0!==R&&R.length||ne||re(!0)},[l,j,c]),react.exports.useEffect(()=>{ie?(_(null,!0,"1",!0),_(null,!0,"39",!0),_(null,!0,"40",!0),_(null,!0,"41",!0)):j(fetchFlows({name:l,ownerType:c}))},[ie]),react.exports.useEffect(()=>{if(I){var e=lodash.exports.findIndex(R,e=>e.id===I);if(-1<e){const t=JSON.parse(JSON.stringify(R));t.splice(e,1),j(setFlows(t)),re(!1)}}},[j,R,I]),react.exports.useEffect(()=>{const e=document.querySelector("#"+mainContainerId);e&&(e.parentElement.style.overflowY="hidden")},[]),react.exports.useEffect(()=>{j(searchTemplates())},[]);var ae=react.exports.useRef(null),le=react.exports.useRef(null);const ce=useSelector(e=>e.flows.templateToOpen),ue=useSelector(e=>e.flows.tags),de=useSelector(e=>e.flows.categories),me=useSelector(e=>e.flows.templatesAuthors),N=t=>ALL_TABS.filter(e=>t.includes(e.key)),pe=t=>ALL_FILTERS.filter(e=>t.includes(null==e?void 0:e.group));var[L]=react.exports.useState(N(L));const[D,C]=react.exports.useState(pe(r)),M=(react.exports.useEffect(()=>{var e=D.map(e=>("tags"===e.group&&(e.options=ue.map(e=>({text:e,value:e}))),e));C(e)},[ue]),react.exports.useEffect(()=>{var e=D.map(e=>("categories"===e.group&&(e.options=de.map(e=>({text:e,value:e}))),e));C(e)},[de]),react.exports.useEffect(()=>{var e=D.map(e=>("author"===e.group&&(e.options=me.map(e=>({text:e,value:e}))),e));C(e)},[me]),makeStyles()(e=>({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)}}))())["classes"],fe=()=>jsxRuntime.exports.jsx(App$1,Object.assign({},{engineId:d,openFlowRunningInstances:h,locale:$,openTab:W,config:{apiRoot:B,graphQLEndpoint:e,controllerUrl:b,defaultCluster:t,controllerNodeRedImage:O},tabs:[IFlowWidgetTabs.Overview,IFlowWidgetTabs.Versions,IFlowWidgetTabs.Activity],activityTabs:[IFlowWidgetActivityTabs.Jobs,IFlowWidgetActivityTabs.ScheduledJobs],onExitClicked:()=>{m(""),f(!1),g(!1)},onDeleteFlow:()=>{setTimeout(()=>{F(d),m(""),F("")},2e3)}})),he=e=>{var t=D,e=pe(e);lodash.exports.isEqual(t,e)||C(e)},A=()=>{const e=document.getElementById("flow-center-box-container");e&&(e.scrollTop=0)};return jsxRuntime.exports.jsxs(Container,Object.assign({fullScreen:S,classes:M,main:le,marginTop:G,zIndex:s},{children:[jsxRuntime.exports.jsx("div",Object.assign({ref:ae,className:M.wrapperHeaderBar},{children:jsxRuntime.exports.jsx(Headerbar,{options:k.header,createNewFlow:_,collapseFlowCenter:H,setFullScreen:te,fullScreen:S,setScreen:u,hidePanel:P,zIndex:s,automateFullScreen:o})})),jsxRuntime.exports.jsx(Box,Object.assign({id:"flow-center-box-container",className:`${o?M.wrapperContainer:M.marginTop} `+(""!==d||T?M.wrapperContainerWithHiddenOverflow:M.wrapperContainer)},{children:jsxRuntime.exports.jsxs("div",Object.assign({className:M.container+" "+(y||d?M.containerHeight:"")},{children:[""!==d&&h&&jsxRuntime.exports.jsx("div",Object.assign({className:M.flowWidgetContainer},{children:jsxRuntime.exports.jsx("div",Object.assign({"data-test":"flow-center-flow-widget-container",className:M.flowWidgetContent},{children:jsxRuntime.exports.jsx(fe,{})}))})),jsxRuntime.exports.jsx("div",Object.assign({className:M.navigationContainer},{children:jsxRuntime.exports.jsx(Navigation,{categories:L,filterers:D,screen:c,tags:ue,onSetType:e=>{switch(m(""),f(!1),g(!1),E(!1),w(!1),e){case"organization":u(ENGINE_OWNER_TYPES.ORGANIZATION);break;case"shared":u(ENGINE_OWNER_TYPES.SHARED);break;case"templates":u(ENGINE_OWNER_TYPES.TEMPLATES);break;case"mine":j(setTemplateSelected(!1)),u(ENGINE_OWNER_TYPES.MINE)}},type:"",showNavigation:n,fullScreen:S,automateFullScreen:o})})),jsxRuntime.exports.jsxs("div",Object.assign({className:M.contentContainer},{children:[jsxRuntime.exports.jsx(Toolbar,{header:null==(r=N([c]))?void 0:r.pop(),showNavigation:n,screen:c,setShowNavigation:Q,openFlowDetails:p,setOpenFlowDetails:()=>{A(),j(setOpenTemplate({})),"templates"===c?(E(!y),w(!T)):(E(!1),w(!1)),f(!p),g(!1),m(p?"":X)}}),(()=>{var e,t,n;if(se)return jsxRuntime.exports.jsx(SearchResultsPage,{openFlowRunningInstances:h,simpleMode:""!==d,selectedFlowId:d,onSelectFlow:(e,t)=>{A(),(t?g:f)(!0),m(e),x(!1)},setFirstFlowId:e=>{K(e)},screenName:(null==(e=null==(e=N([c]))?void 0:e.pop())?void 0:e.text)||"",createNewFlow:_,openFirstTemplate:T,isDeselectedTemplate:y,onSelectedTemplate:()=>{A(),E(!0),f(!0),w(!0)},classes:M,allowSetFirstFlowId:ee,setSelectedFlowId:m,setOpenFlowRunningInstances:g,setOpenFlowDetails:f,scrollContainerToTop:A,setAllowSetFirstFlowId:x,openTabFlowWidget:W,setUpdateFlowList:F});switch(c!==ENGINE_OWNER_TYPES.TEMPLATES&&ce.id&&j(setOpenTemplate({})),c){case ENGINE_OWNER_TYPES.TEMPLATES:return he(DEFAULT_FILTERS_FOR_TAB_TEMPLATES),n=S?"0px":"62px",jsxRuntime.exports.jsx("div",Object.assign({style:{height:o?"calc(100vh - 64px - 54px)":`calc(100vh - 64px - 64px - ${n})`},className:M.flowsMainContainer,id:"templates-main-container"},{children:jsxRuntime.exports.jsx(TemplateList,{createNewFlow:_,openFirstTemplate:T,isDeselectedTemplate:y,onSelectedTemplate:()=>{A(),E(!0),f(!0),w(!0)}})}));case ENGINE_OWNER_TYPES.MINE:return he(DEFAULT_FILTERS_FOR_TAB_MY_FLOWS),n=S?"0px":"62px",n=o?"calc(100vh - 64px - 54px)":`calc(100vh - 64px - 64px - ${n})`,!ne||null!==R&&void 0!==R&&R.length?R&&R.length?jsxRuntime.exports.jsxs("div",Object.assign({style:{height:n},className:M.flowsMainContainer,id:"flows-main-container"},{children:[jsxRuntime.exports.jsx(TemplateGallery,{createNewFlow:_,setScreen:u,goToTemplateList:()=>u(ENGINE_OWNER_TYPES.TEMPLATES),handleOpenTemplateDetails:()=>{f(!0),E(!0),w(!0)}}),""===d&&jsxRuntime.exports.jsx(FlowList,{simpleMode:""!==d,selectedFlowId:d,onSelectFlow:(e,t)=>{A(),(t?g:f)(!0),m(e),x(!1)},setFirstFlowId:e=>{K(e)},screenName:(null==(t=null==(t=N([c]))?void 0:t.pop())?void 0:t.text)||"",zIndex:s,setOpenFlowDetails:e=>{f(e)}}),""!==d&&jsxRuntime.exports.jsxs("div",Object.assign({className:M.enginesAndFlowWidgetContainer},{children:[jsxRuntime.exports.jsx("div",Object.assign({className:M.enginesContainer},{children:jsxRuntime.exports.jsx(FlowList,{simpleMode:""!==d,selectedFlowId:d,setFirstFlowId:e=>{ee&&m(e)},onSelectFlow:e=>{A(),m(e),x(!1)},screenName:(null==(t=null==(t=N([c]))?void 0:t.pop())?void 0:t.text)||"",zIndex:s,setOpenFlowDetails:e=>{f(e)}})})),!h&&jsxRuntime.exports.jsx("div",Object.assign({className:M.flowWidgetContainer},{children:jsxRuntime.exports.jsx("div",Object.assign({"data-test":"flow-center-flow-widget-container",className:M.flowWidgetContent},{children:jsxRuntime.exports.jsx(fe,{})}))}))]}))]})):jsxRuntime.exports.jsx(NoFlowsFound,{setScreen:u,createNewFlow:_}):jsxRuntime.exports.jsxs("div",Object.assign({style:{height:n},className:M.flowsMainContainer,id:"flows-main-container"},{children:[jsxRuntime.exports.jsx(Skeleton,{variant:"rectangular",className:M.lineItem}),jsxRuntime.exports.jsx(Skeleton,{variant:"rectangular",className:M.lineItem}),jsxRuntime.exports.jsx(Skeleton,{variant:"rectangular",className:M.lineItem})]}));default:return}})()]}))]}))}))]}))},Container=({fullScreen:e,classes:t,main:n,marginTop:r,zIndex:i,children:s})=>e?jsxRuntime.exports.jsx(Portal,{children:jsxRuntime.exports.jsx("div",Object.assign({role:"presentation","data-test":"flow-center-widget-main-conatiner","data-cy":"flow-center-widget-fullscreen",ref:n,id:mainContainerId,className:t.wideMain,style:{top:r,zIndex:i}},{children:s}))}):jsxRuntime.exports.jsx("div",Object.assign({role:"presentation","data-test":"flow-center-widget-main-conatiner","data-cy":"flow-center-widget-notfullscreen",ref:n,id:"flow-center-container",className:t.main,style:{top:r,zIndex:i}},{children:s}));function*flowCenterRootSaga(){yield all([flowsSaga()])}const newFlowClusterIDNameSpace="newFlowClusterID",engineDistributionTypeNameSpace="engineDistributionType";function getFlowCenterModule(){return{id:"flow-center",reducerMap:{[namespace$2]:flowsReducer,[newFlowClusterIDNameSpace]:newFlowClusterIDnReducer,[engineDistributionTypeNameSpace]:engineDistributionTypeReducer},sagas:[flowCenterRootSaga],initialActions:[]}}store.addModules([getFlowCenterModule()]);const App=e=>jsxRuntime.exports.jsx(Provider,Object.assign({store:store},{children:jsxRuntime.exports.jsx(lib.DynamicModuleLoader,Object.assign({modules:[getFlowCenterModule()]},{children:jsxRuntime.exports.jsx(AIWareIntlProvider,{children:jsxRuntime.exports.jsx(FlowCenter,Object.assign({},e))})}))}));export{App,useCommonStyles};
|
|
23
|
+
`;var gqlQueries=Object.freeze({__proto__:null,getAvailableClusters:getAvailableClusters,createEngineMutation:createEngineMutation});const createEngine=(e,t,n)=>{var r=gqlQueries["createEngineMutation"];return fetchVeritoneGraphQLApi(n,t,r,{engineJson:e})},useStyles$2=makeStyles()(e=>({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 jsxRuntime.exports.jsx(Grid,Object.assign({container:!0,spacing:0,direction:"column",alignItems:"center",justifyContent:"center",className:t.container},{children:jsxRuntime.exports.jsxs(Grid,Object.assign({item:!0,xs:4,className:t.contentContainer},{children:[jsxRuntime.exports.jsx("img",{className:t.icon,src:img$8,alt:"noFlowsFoundIcon"}),jsxRuntime.exports.jsxs("div",Object.assign({className:t.textContainer},{children:[jsxRuntime.exports.jsx(Typography,Object.assign({className:t.title},{children:SHARED_MESSAGES.noFlowsFound()})),jsxRuntime.exports.jsx(Typography,Object.assign({className:t.subtitle},{children:SHARED_MESSAGES.noFlowsFoundSubtitle()})),jsxRuntime.exports.jsxs(Box$1,Object.assign({className:t.buttonContainer},{children:[jsxRuntime.exports.jsx(Button,Object.assign({className:t.commonBtn,onClick:e.createNewFlow},{children:SHARED_MESSAGES.createNewFlow()})),jsxRuntime.exports.jsx(Button,Object.assign({className:t.commonBtn,onClick:()=>{e.setScreen(ENGINE_OWNER_TYPES.TEMPLATES)}},{children:SHARED_MESSAGES.chooseATemplate()}))]}))]}))]}))}))}const useStyles$1=makeStyles()(()=>({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"],{selectedTab:e,handleChange:n}=e,r=useSelector(e=>e.flows.flows),i=useSelector(e=>e.flows.filteredTemplates)||[];return jsxRuntime.exports.jsx(AppBar,Object.assign({className:t.tabsContainer,position:"static",color:"transparent",elevation:0},{children:jsxRuntime.exports.jsxs(Tabs,Object.assign({value:e,onChange:n,"aria-label":"search-results-tabs"},{children:[jsxRuntime.exports.jsx(Tab,{id:"flow-center-searchResults-flows","data-test":"flow-center-searchResults-flows",className:t.tab,label:SHARED_MESSAGES.flowsCount(r.length)}),jsxRuntime.exports.jsx(Tab,{id:"flow-center-searchResults-templates","data-test":"flow-center-searchResults-templates",className:t.tab,label:SHARED_MESSAGES.templatesCount(i.length)})]}))}))}const getContentHeight=()=>{var e=useSelector(e=>e.flows.config.isFullScreen);return useSelector(e=>e.flows.config.automateFullScreen)?"calc(100vh - 64px - 54px)":`calc(100vh - 64px - 64px - ${e?"0px":"62px"})`},getFlowCenterConfig=()=>{return{isFullScreen:useSelector(e=>e.flows.config.isFullScreen),automateFullScreen:useSelector(e=>e.flows.config.automateFullScreen),zIndex:useSelector(e=>e.flows.config.zIndex),graphQLEndpoint:useSelector(e=>e.flows.config.graphQLEndpoint),defaultCluster:useSelector(e=>e.flows.config.defaultCluster)}};function ResultsContainer(t){const{selectedTab:e,selectedFlowId:n,classes:r,allowSetFirstFlowId:i}=t,s=useSelector(preferredLanguageSelector)||"en",o=getFlowCenterConfig(),a=useSelector(rootApiSelector),l=useSelector(controllerNodeRedImageSelector),c=useSelector(controllerUrlSelector);return jsxRuntime.exports.jsx(Box$1,Object.assign({ml:3},{children:0===e?""==n?jsxRuntime.exports.jsx(FlowList,{simpleMode:t.simpleMode,selectedFlowId:n,onSelectFlow:t.onSelectFlow,setFirstFlowId:t.setFirstFlowId,screenName:t.screenName,zIndex:o.zIndex,showTitle:!1,setOpenFlowDetails:t.setOpenFlowDetails}):jsxRuntime.exports.jsxs("div",Object.assign({className:r.enginesAndFlowWidgetContainer},{children:[jsxRuntime.exports.jsx("div",Object.assign({className:r.enginesContainer},{children:jsxRuntime.exports.jsx(FlowList,{simpleMode:""!==n,selectedFlowId:n,setFirstFlowId:e=>{i&&t.setSelectedFlowId(e)},onSelectFlow:e=>{t.scrollContainerToTop(),t.setSelectedFlowId(e),t.setAllowSetFirstFlowId(!1)},screenName:t.screenName,zIndex:o.zIndex,setOpenFlowDetails:e=>{t.setOpenFlowDetails(e)}})})),jsxRuntime.exports.jsx("div",Object.assign({className:r.flowWidgetContainer},{children:jsxRuntime.exports.jsx("div",Object.assign({className:r.flowWidgetContenet},{children:jsxRuntime.exports.jsx(App$1,Object.assign({},{engineId:n,openFlowRunningInstances:t.openFlowRunningInstances,locale:s,openTab:t.openTabFlowWidget,config:{apiRoot:a,graphQLEndpoint:o.graphQLEndpoint,controllerUrl:c,defaultCluster:o.defaultCluster,controllerNodeRedImage:l},tabs:[IFlowWidgetTabs.Overview,IFlowWidgetTabs.Versions,IFlowWidgetTabs.Activity,IFlowWidgetTabs.DistributionSettings],activityTabs:[IFlowWidgetActivityTabs.Jobs,IFlowWidgetActivityTabs.ScheduledJobs],onExitClicked:()=>{t.setSelectedFlowId(""),t.setOpenFlowRunningInstances(!1),t.setOpenFlowDetails(!1)},onDeleteFlow:()=>{setTimeout(()=>{t.setUpdateFlowList(n),t.setSelectedFlowId(""),t.setUpdateFlowList("")},2e3)}}))}))}))]})):jsxRuntime.exports.jsx(TemplateList,{createNewFlow:t.createNewFlow,openFirstTemplate:t.openFirstTemplate,isDeselectedTemplate:t.isDeselectedTemplate,onSelectedTemplate:t.onSelectedTemplate})}))}const useStyles=makeStyles()(e=>({container:{width:"100%",overflowY:"auto"},tabsContainer:{paddingLeft:18,borderBottom:"0.5px solid #D5DFE9","& div > span:last-child":{backgroundColor:"black"}}}));function SearchResultsPage(e){const t=useStyles()["classes"],n=useDispatch(),r=useSelector(e=>e.flows.templates),i=useSelector(e=>e.flows.searched);var s=useSelector(e=>e.flows.isSearchingLoading);const o=useSelector(e=>e.flows.searchedTemplates||[]),a=useSelector(e=>e.flows.flows),[l,c]=react.exports.useState(0),u=(react.exports.useEffect(()=>{if(r&&0!==r.length){const t=new RegExp(i,"gi");var e=r.filter(e=>t.test(e.title));n(setSearchedTemplates(e))}return()=>{n(setSearchedTemplates(null))}},[r,i]),(e,t)=>{c(t)}),d=getContentHeight();return s?jsxRuntime.exports.jsxs("div",{children:[jsxRuntime.exports.jsx(Skeleton,{variant:"rectangular",className:e.classes.lineItem}),jsxRuntime.exports.jsx(Skeleton,{variant:"rectangular",className:e.classes.lineItem}),jsxRuntime.exports.jsx(Skeleton,{variant:"rectangular",className:e.classes.lineItem})]}):!!o.length||!!a.length?jsxRuntime.exports.jsxs("div",Object.assign({className:t.container,style:{height:d}},{children:[jsxRuntime.exports.jsx(TabsContainer,{selectedTab:l,handleChange:u}),jsxRuntime.exports.jsx(ResultsContainer,{selectedTab:l,openFlowRunningInstances:e.openFlowRunningInstances,simpleMode:e.simpleMode,selectedFlowId:e.selectedFlowId,onSelectFlow:e.onSelectFlow,setFirstFlowId:e.setFirstFlowId,screenName:e.screenName,createNewFlow:e.createNewFlow,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})]})):jsxRuntime.exports.jsx(NoResults,{})}const namespace="engineDistributionType",initialState={engineDistributionType:"instance_locked"},engineDistributionSlice=createSlice({name:namespace,initialState:initialState,reducers:{engineDistributionTypeAction(e,t){e.engineDistributionType=t.payload}}}),engineDistributionTypeSelector=e=>(null==e?void 0:e[namespace])||null,engineDistributionTypeReducer=engineDistributionSlice.reducer,mainContainerId="flow-center-container",FlowCenter=({graphQLEndpoint:e=DEFAULT_GRAPHQL_ENDPOINT,defaultCluster:t=DEFAULT_CLUSTER,defaultScreen:n=ENGINE_OWNER_TYPES.MINE,tabs:L=DEFAULT_TABS,filters:r=DEFAULT_FILTERS,options:k={header:{title:"FLOW CENTER",showSearchBar:!0,showNewFromTemplate:!0,showCreateNewFlow:!0,showAdditionalOptionButton:!0,showCollapseButton:!0,showFullScreenButton:!0}},openTabFlowWidget:W=0,collapseFlowCenter:H,isFullScreen:i=!1,hidePanel:P,marginTop:$=0,zIndex:s=0,automateFullScreen:o=!1})=>{const j=useDispatch(),G=useSelector(preferredLanguageSelector)||"en",a=useSelector(baseUrlSelector),B=useSelector(rootApiSelector),v=useSelector(sessionTokenSelector),V=useSelector(graphEndpointSelector);let O=useSelector(controllerNodeRedImageSelector),b=useSelector(controllerUrlSelector);const U=useSelector(automateControllerUrlSelector),z=useSelector(engineDistributionTypeSelector)||null,Z=useSelector(newFlowClusterIDSelector)||null,Y=(b=b||U.replace("automate-",""),useSelector(automateUrlSelector)),q=useSelector(e=>e.flows.isRevisionsExistOnServer),[l,J]=(setApiEndpoint(a),react.exports.useEffect(()=>{setApiEndpoint(a)},[a]),react.exports.useEffect(()=>{j(setFlowCenterConfig({isFullScreen:i,automateFullScreen:o,zIndex:s,graphQLEndpoint:e,defaultCluster:t}))},[i,o,s,e,t]),react.exports.useState("")),[c,u]=react.exports.useState(n),[d,m]=react.exports.useState("");var[n,Q]=react.exports.useState(!0);const[p,f]=react.exports.useState(!1),[h,g]=react.exports.useState(!1),[X,K]=react.exports.useState(""),[ee,x]=react.exports.useState(!0),[S,te]=react.exports.useState(i),[T,w]=react.exports.useState(!1),[y,E]=react.exports.useState(!1),[I,F]=react.exports.useState(""),[ne,re]=react.exports.useState(!0),R=useSelector(e=>e.flows.flows),ie=useSelector(e=>e.flows.shouldCreateInitialFlows),se=useSelector(e=>e.flows.isSearching),oe=useSelector(e=>e.flows.searched),_=(react.exports.useEffect(()=>{J(oe)},[oe]),(T,w=!1,y="1",E=!1)=>__awaiter(void 0,void 0,void 0,function*(){j(toggleStateCreateNewFlow(!0));try{var i=lodash.exports.get(T,"id",y),s=(x=i,yield __awaiter(void 0,void 0,void 0,function*(){let t;try{return t=yield getTemplateById(x,v)}catch(e){return t=yield getTemplateByIdFallback(x,v)}}));if(!s)throw new Error("Error retrieving data for flow of id "+i);let e,t=(e=s.data.flowTemplates?"data.flowTemplates.records[0]":"data.flows.records[0]",lodash.exports.get(s,e+".flow")),n=(t=t&&JSON.parse(atob(t)),lodash.exports.get(s,e+".package"));n=n&&JSON.parse(atob(n));const S=engineJSON;E?(S.name=lodash.exports.get(s,e+".title","Untitled Flow"),S.description=lodash.exports.get(s,e+".subtitle","")):(S.name=lodash.exports.get(T,"title","Untitled Flow"),S.description=lodash.exports.get(T,"subtitle","")),z.engineDistributionType&&(S.distributionType=z.engineDistributionType);var o=yield createEngine(S,v,V);if(!o)throw new Error("Error while creating new engine");var a=lodash.exports.get(o,"data.createEngine.id"),l=lodash.exports.get(o,"data.createEngine.manifest.engineMode","chunk");let r={};var c=yield getNodeRedVersionEdgeApi(b),u=(c&&c.version&&c.version.runner&&(O=c.version.runner,r=c.version),{runtime:"nodeRed",engineId:a,engineMode:l}),d=automateEngineJWTRights,m=O,p={edge:{},nodeRed:{version:r,flows:null!=T&&T.id||E?t:[],package:null!=T&&T.id||E?n:{}}},f=yield createEnginebuild({engineId:a,manifest:u,JWTRights:d,taskRuntime:p,dockerImage:m},v);if(!f)throw new Error("There was an error while creating engine build for engine with id "+a);var h=lodash.exports.get(f,"data.createEngineBuild.id"),g=q?"latest":h;j(toggleStateCreateNewFlow(!1)),w?j(setShouldCreateInitialFlows(!1)):Z.newFlowClusterID?(window.open(`${Y}/flow/${a}/${g}/${Z.newFlowClusterID}/default-cluster`,"_blank","noopener"),j(newFlowClusterIDAction(""))):window.open(Y+`/flow/${a}/`+g,"_blank","noopener")}catch(e){console.error("this is from code",e)}finally{j(toggleStateCreateNewFlow(!1))}var x}));react.exports.useEffect(()=>{j(isRevisionsExistOnServer())},[j]),react.exports.useEffect(()=>{j(setFetchingFlows())},[j]),react.exports.useEffect(()=>{j(fetchFlows({name:l,ownerType:c})),null!==R&&void 0!==R&&R.length||ne||re(!0)},[l,j,c]),react.exports.useEffect(()=>{ie?(_(null,!0,"1",!0),_(null,!0,"39",!0),_(null,!0,"40",!0),_(null,!0,"41",!0)):j(fetchFlows({name:l,ownerType:c}))},[ie]),react.exports.useEffect(()=>{if(I){var e=lodash.exports.findIndex(R,e=>e.id===I);if(-1<e){const t=JSON.parse(JSON.stringify(R));t.splice(e,1),j(setFlows(t)),re(!1)}}},[j,R,I]),react.exports.useEffect(()=>{const e=document.querySelector("#"+mainContainerId);e&&(e.parentElement.style.overflowY="hidden")},[]),react.exports.useEffect(()=>{j(searchTemplates())},[]);var ae=react.exports.useRef(null),le=react.exports.useRef(null);const ce=useSelector(e=>e.flows.templateToOpen),ue=useSelector(e=>e.flows.tags),de=useSelector(e=>e.flows.categories),me=useSelector(e=>e.flows.templatesAuthors),N=t=>ALL_TABS.filter(e=>t.includes(e.key)),pe=t=>ALL_FILTERS.filter(e=>t.includes(null==e?void 0:e.group));var[L]=react.exports.useState(N(L));const[D,C]=react.exports.useState(pe(r)),M=(react.exports.useEffect(()=>{var e=D.map(e=>("tags"===e.group&&(e.options=ue.map(e=>({text:e,value:e}))),e));C(e)},[ue]),react.exports.useEffect(()=>{var e=D.map(e=>("categories"===e.group&&(e.options=de.map(e=>({text:e,value:e}))),e));C(e)},[de]),react.exports.useEffect(()=>{var e=D.map(e=>("author"===e.group&&(e.options=me.map(e=>({text:e,value:e}))),e));C(e)},[me]),makeStyles()(e=>({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)}}))())["classes"],fe=()=>jsxRuntime.exports.jsx(App$1,Object.assign({},{engineId:d,openFlowRunningInstances:h,locale:G,openTab:W,config:{apiRoot:B,graphQLEndpoint:e,controllerUrl:b,defaultCluster:t,controllerNodeRedImage:O},tabs:[IFlowWidgetTabs.Overview,IFlowWidgetTabs.Versions,IFlowWidgetTabs.Activity],activityTabs:[IFlowWidgetActivityTabs.Jobs,IFlowWidgetActivityTabs.ScheduledJobs],onExitClicked:()=>{m(""),f(!1),g(!1)},onDeleteFlow:()=>{setTimeout(()=>{F(d),m(""),F("")},2e3)}})),he=e=>{var t=D,e=pe(e);lodash.exports.isEqual(t,e)||C(e)},A=()=>{const e=document.getElementById("flow-center-box-container");e&&(e.scrollTop=0)};return jsxRuntime.exports.jsxs(Container,Object.assign({fullScreen:S,classes:M,main:le,marginTop:$,zIndex:s},{children:[jsxRuntime.exports.jsx("div",Object.assign({ref:ae,className:M.wrapperHeaderBar},{children:jsxRuntime.exports.jsx(Headerbar,{options:k.header,createNewFlow:_,collapseFlowCenter:H,setFullScreen:te,fullScreen:S,setScreen:u,hidePanel:P,zIndex:s,automateFullScreen:o})})),jsxRuntime.exports.jsx(Box$1,Object.assign({id:"flow-center-box-container",className:`${o?M.wrapperContainer:M.marginTop} `+(""!==d||T?M.wrapperContainerWithHiddenOverflow:M.wrapperContainer)},{children:jsxRuntime.exports.jsxs("div",Object.assign({className:M.container+" "+(y||d?M.containerHeight:"")},{children:[""!==d&&h&&jsxRuntime.exports.jsx("div",Object.assign({className:M.flowWidgetContainer},{children:jsxRuntime.exports.jsx("div",Object.assign({"data-test":"flow-center-flow-widget-container",className:M.flowWidgetContent},{children:jsxRuntime.exports.jsx(fe,{})}))})),jsxRuntime.exports.jsx("div",Object.assign({className:M.navigationContainer},{children:jsxRuntime.exports.jsx(Navigation,{categories:L,filterers:D,screen:c,tags:ue,onSetType:e=>{switch(m(""),f(!1),g(!1),E(!1),w(!1),e){case"organization":u(ENGINE_OWNER_TYPES.ORGANIZATION);break;case"shared":u(ENGINE_OWNER_TYPES.SHARED);break;case"templates":u(ENGINE_OWNER_TYPES.TEMPLATES);break;case"mine":j(setTemplateSelected(!1)),u(ENGINE_OWNER_TYPES.MINE)}},type:"",showNavigation:n,fullScreen:S,automateFullScreen:o})})),jsxRuntime.exports.jsxs("div",Object.assign({className:M.contentContainer},{children:[jsxRuntime.exports.jsx(Toolbar,{header:null==(r=N([c]))?void 0:r.pop(),showNavigation:n,screen:c,setShowNavigation:Q,openFlowDetails:p,setOpenFlowDetails:()=>{A(),j(setOpenTemplate({})),"templates"===c?(E(!y),w(!T)):(E(!1),w(!1)),f(!p),g(!1),m(p?"":X)}}),(()=>{var e,t,n;if(se)return jsxRuntime.exports.jsx(SearchResultsPage,{openFlowRunningInstances:h,simpleMode:""!==d,selectedFlowId:d,onSelectFlow:(e,t)=>{A(),(t?g:f)(!0),m(e),x(!1)},setFirstFlowId:e=>{K(e)},screenName:(null==(e=null==(e=N([c]))?void 0:e.pop())?void 0:e.text)||"",createNewFlow:_,openFirstTemplate:T,isDeselectedTemplate:y,onSelectedTemplate:()=>{A(),E(!0),f(!0),w(!0)},classes:M,allowSetFirstFlowId:ee,setSelectedFlowId:m,setOpenFlowRunningInstances:g,setOpenFlowDetails:f,scrollContainerToTop:A,setAllowSetFirstFlowId:x,openTabFlowWidget:W,setUpdateFlowList:F});switch(c!==ENGINE_OWNER_TYPES.TEMPLATES&&ce.id&&j(setOpenTemplate({})),c){case ENGINE_OWNER_TYPES.TEMPLATES:return he(DEFAULT_FILTERS_FOR_TAB_TEMPLATES),n=S?"0px":"62px",jsxRuntime.exports.jsx("div",Object.assign({style:{height:o?"calc(100vh - 64px - 54px)":`calc(100vh - 64px - 64px - ${n})`},className:M.flowsMainContainer,id:"templates-main-container"},{children:jsxRuntime.exports.jsx(TemplateList,{createNewFlow:_,openFirstTemplate:T,isDeselectedTemplate:y,onSelectedTemplate:()=>{A(),E(!0),f(!0),w(!0)}})}));case ENGINE_OWNER_TYPES.MINE:return he(DEFAULT_FILTERS_FOR_TAB_MY_FLOWS),n=S?"0px":"62px",n=o?"calc(100vh - 64px - 54px)":`calc(100vh - 64px - 64px - ${n})`,!ne||null!==R&&void 0!==R&&R.length?R&&R.length?jsxRuntime.exports.jsxs("div",Object.assign({style:{height:n},className:M.flowsMainContainer,id:"flows-main-container"},{children:[jsxRuntime.exports.jsx(TemplateGallery,{createNewFlow:_,setScreen:u,goToTemplateList:()=>u(ENGINE_OWNER_TYPES.TEMPLATES),handleOpenTemplateDetails:()=>{f(!0),E(!0),w(!0)}}),""===d&&jsxRuntime.exports.jsx(FlowList,{simpleMode:""!==d,selectedFlowId:d,onSelectFlow:(e,t)=>{A(),(t?g:f)(!0),m(e),x(!1)},setFirstFlowId:e=>{K(e)},screenName:(null==(t=null==(t=N([c]))?void 0:t.pop())?void 0:t.text)||"",zIndex:s,setOpenFlowDetails:e=>{f(e)}}),""!==d&&jsxRuntime.exports.jsxs("div",Object.assign({className:M.enginesAndFlowWidgetContainer},{children:[jsxRuntime.exports.jsx("div",Object.assign({className:M.enginesContainer},{children:jsxRuntime.exports.jsx(FlowList,{simpleMode:""!==d,selectedFlowId:d,setFirstFlowId:e=>{ee&&m(e)},onSelectFlow:e=>{A(),m(e),x(!1)},screenName:(null==(t=null==(t=N([c]))?void 0:t.pop())?void 0:t.text)||"",zIndex:s,setOpenFlowDetails:e=>{f(e)}})})),!h&&jsxRuntime.exports.jsx("div",Object.assign({className:M.flowWidgetContainer},{children:jsxRuntime.exports.jsx("div",Object.assign({"data-test":"flow-center-flow-widget-container",className:M.flowWidgetContent},{children:jsxRuntime.exports.jsx(fe,{})}))}))]}))]})):jsxRuntime.exports.jsx(NoFlowsFound,{setScreen:u,createNewFlow:_}):jsxRuntime.exports.jsxs("div",Object.assign({style:{height:n},className:M.flowsMainContainer,id:"flows-main-container"},{children:[jsxRuntime.exports.jsx(Skeleton,{variant:"rectangular",className:M.lineItem}),jsxRuntime.exports.jsx(Skeleton,{variant:"rectangular",className:M.lineItem}),jsxRuntime.exports.jsx(Skeleton,{variant:"rectangular",className:M.lineItem})]}));default:return}})()]}))]}))}))]}))},Container=({fullScreen:e,classes:t,main:n,marginTop:r,zIndex:i,children:s})=>e?jsxRuntime.exports.jsx(Portal,{children:jsxRuntime.exports.jsx("div",Object.assign({role:"presentation","data-test":"flow-center-widget-main-conatiner","data-cy":"flow-center-widget-fullscreen",ref:n,id:mainContainerId,className:t.wideMain,style:{top:r,zIndex:i}},{children:s}))}):jsxRuntime.exports.jsx("div",Object.assign({role:"presentation","data-test":"flow-center-widget-main-conatiner","data-cy":"flow-center-widget-notfullscreen",ref:n,id:"flow-center-container",className:t.main,style:{top:r,zIndex:i}},{children:s}));function*flowCenterRootSaga(){yield all([flowsSaga()])}const newFlowClusterIDNameSpace="newFlowClusterID",engineDistributionTypeNameSpace="engineDistributionType";function getFlowCenterModule(){return{id:"flow-center",reducerMap:{[namespace$2]:flowsReducer,[newFlowClusterIDNameSpace]:newFlowClusterIDnReducer,[engineDistributionTypeNameSpace]:engineDistributionTypeReducer},sagas:[flowCenterRootSaga],initialActions:[]}}store.addModules([getFlowCenterModule()]);const App=e=>jsxRuntime.exports.jsx(Provider,Object.assign({store:store},{children:jsxRuntime.exports.jsx(lib.DynamicModuleLoader,Object.assign({modules:[getFlowCenterModule()]},{children:jsxRuntime.exports.jsx(AIWareIntlProvider,{children:jsxRuntime.exports.jsx(FlowCenter,Object.assign({},e))})}))}));export{App,useCommonStyles};
|