aiware-js 1.0.0-master.92 → 1.0.0-master.95

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/js-core.esm.js CHANGED
@@ -957,4 +957,4 @@ createScheduledJob(input:{
957
957
  }
958
958
  }
959
959
  }
960
- `,operationName:e},t)))[e]})}function*getLibrariesSaga(){try{var n=yield select(selectApiConfigs);let e=0,t=[];for(;;){var r=yield fetchLibraries(n,e,100);if(t=[...t,...null==r?void 0:r.records],100!==r.count)break;e+=100}yield put(actions.fetchLibrariesSuccess({libraries:t}))}catch(e){yield put(actions.fetchLibrariesFailed()),console.log(e)}}function*getLibrariesWatcher(){yield takeLatest$1(actions.fetchLibrariesStart,getLibrariesSaga)}function*rootSaga$1(){yield all([getLibrariesWatcher()])}function getLibraryModule(){return{id:namespace$5,reducerMap:{[namespace$5]:reducer},initialActions:[],sagas:[rootSaga$1]}}store$4.addModules([getConfigModule(),getAuthModule(),getSnackbarModule()]);const urlParams=window.location.search.substr(1).split("&").reduce((e,t)=>{var[t,n]=t.split("=");return Object.assign(Object.assign({},e),{[t]:n})},{}),StyledTabs=(null!==urlParams&&void 0!==urlParams&&urlParams.authToken,withStyles(Tabs$1,()=>({root:{borderBottom:"1px solid #e8e8e8"},indicator:{height:"3px",backgroundColor:"#1B1D1F"}}))),StyledTab=withStyles(e=>{return jsxRuntime.exports.jsx(Tab$1,Object.assign({disableRipple:!0},e,{"data-test":`${(null==e?void 0:e.id)||(null==(e=null==(e=null==e?void 0:e.label)?void 0:e.props)?void 0:e.defaultMessage[0])}-tab`}))},e=>({root:{fontFamily:"Nunito",fontSize:e.typography.fontSize,lineHeight:"18px",textTransform:"none",minWidth:72,fontWeight:e.typography.fontWeightRegular,flex:1}}));function CustomTabs({selectedId:e,onChangeTab:n,tabsList:t=[]}){const[r,o]=react.exports.useState(e);react.exports.useEffect(()=>{e!==r&&o(e)},[e,r]);return jsxRuntime.exports.jsx(StyledTabs,Object.assign({value:r,onChange:(e,t)=>{e.preventDefault(),o(t),n(t)}},{children:t.map((e,t)=>jsxRuntime.exports.jsx(StyledTab,{label:e.label,disabled:e.disabled,id:e.id},t))}))}function TabPanel(e){var{children:t,value:n,index:r}=e,e=__rest$1(e,["children","value","index"]);return jsxRuntime.exports.jsx("div",Object.assign({role:"tabpanel",style:{width:"100%",height:"100%"},hidden:n!==r,id:"scrollable-prevent-tabpanel-"+r,"aria-labelledby":"scrollable-prevent-tab-"+r},e,{children:n===r&&t}))}const SHARED_MESSAGES={noSearchResultsFound:()=>jsxRuntime.exports.jsx(FormattedMessage$1,{id:"flow-center-search-results",defaultMessage:"No results found",description:"No results found"}),noSearchResultsFoundSubtitle:()=>jsxRuntime.exports.jsx(FormattedMessage$1,{id:"flow-center-search-results-subtitle",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."})},useStyles$4$1=makeStyles()(()=>({container:{width:"100%",height:"100%",display:"flex",justifyContent:"center",alignItems:"center",marginTop:50,flexDirection:"column"},icon:{},textContainer:{marginTop:68,maxWidth:400,display:"flex",justifyContent:"center",alignItems:"center",flexDirection:"column"},title:{fontFamily:"Nunito!important",fontStyle:"normal!important",fontWeight:400,fontSize:"18px!important",lineHeight:"24px!important",color:"#1B1D1F!important"},subtitle:{marginTop:12,fontFamily:"Nunito!important",fontStyle:"normal!important",fontWeight:600,fontSize:"16px!important",lineHeight:"22px!important",color:"#5C6269!important",textAlign:"center"}}));function NoResults(){var e=useStyles$4$1()["classes"];return jsxRuntime.exports.jsxs("div",Object.assign({className:e.container},{children:[jsxRuntime.exports.jsx("img",{className:e.icon,src:img$7,alt:"noSearchResultsImg"}),jsxRuntime.exports.jsxs("div",Object.assign({className:e.textContainer},{children:[jsxRuntime.exports.jsx(Typography$1,Object.assign({className:e.title},{children:SHARED_MESSAGES.noSearchResultsFound()})),jsxRuntime.exports.jsx(Typography$1,Object.assign({className:e.subtitle},{children:SHARED_MESSAGES.noSearchResultsFoundSubtitle()}))]}))]}))}const flowStyles=makeStyles()(e=>({title:{fontFamily:"Nunito",fontStyle:"normal",fontWeight:"normal",fontSize:"12px!important",lineHeight:"16px!important",letterSpacing:"-1.30385e-09px!important",color:"#5C6269!important"},borderBottomLineHeader:{opacity:"0.9!important",borderBottom:"0.5px solid #D5DFE9",paddingLeft:"16px!important",paddingBottom:"8px!important"},firstTitle:{paddingLeft:"28px!important"},firstColumn:{paddingLeft:"12px!important"},borderBottomLine:{padding:"0px!important",paddingLeft:"16px!important"},borderBottomLineRow:{borderBottom:"0.5px solid #D5DFE9!important",opacity:"0.9!important",paddingLeft:"12px!important"},flowName:{fontFamily:"Nunito",fontStyle:"normal",fontWeight:"normal",fontSize:"16px!important",lineHeight:"22px!important",letterSpacing:"-1.30385e-09px!important",color:"#2A323C!important",marginTop:"0px!important",marginBottom:"0px!important"},flowVersion:{fontFamily:"Nunito",fontStyle:"normal",fontWeight:"normal",fontSize:"10px!important",lineHeight:"16px!important",letterSpacing:"-1.30385e-09px!important",color:"#5C6269!important",marginLeft:"8px!important",marginTop:"0px!important",marginBottom:"0px!important"},flowMode:{fontFamily:"Nunito",fontStyle:"normal",fontWeight:"normal",fontSize:"16px!important",lineHeight:"22px!important",letterSpacing:"-1.30385e-09px!important",color:"#2A323C!important",marginTop:"0px!important",marginBottom:"0px!important"},flowModeToken:{fontFamily:"Nunito",fontStyle:"normal",fontWeight:"normal",fontSize:"12px!important",lineHeight:"22px!important",letterSpacing:"-1.30385e-09px!important",color:"#2A323C!important",marginTop:"0px!important",marginBottom:"0px!important"},status:{fontFamily:"Nunito",fontStyle:"normal",fontWeight:800,fontSize:"8px!important",lineHeight:"11px!important",textTransform:"uppercase!important"},dateTime:{fontFamily:"Nunito",fontStyle:"normal",fontWeight:"normal",fontSize:"14px!important",lineHeight:"20px!important",letterSpacing:"-1.30385e-09px!important",color:"#5C6269!important"},dateTimeSmall:{},text:{fontFamily:"Nunito",fontStyle:"normal",fontWeight:"normal",fontSize:"16px!important",lineHeight:"22px!important",letterSpacing:"-1.30385e-09px!important",color:"#2A323C!important",marginTop:"33px!important",paddingLeft:"12px!important"},boxCell:{marginTop:"20px!important",marginBottom:"20px!important"},boxCellIds:{marginTop:"20px!important",marginBottom:"20px!important",maxWidth:"150px",display:"block"},table:{border:"none!important"},tableRow:{"& td:nth-child(5)":{paddingLeft:"0px!important",paddingRight:"20px!important",textAlign:"right"},"& td:nth-child(5) > button":{opacity:0},"&:hover":{cursor:"pointer",backgroundColor:"#EEF3F9!important","& td:nth-child(5) > button":{opacity:1},"& td":{backgroundColor:"#EEF3F9!important"}}},runningListTableRow:{"&:hover":{cursor:"pointer"}},tableRowSelected:{backgroundColor:"#EEF3F9!important"},moreActionsBtn:{backgroundColor:"#fff!important"},tableRowClass:{backgroundColor:"#F2F5F9!important"},flowStatus:{width:"fit-content!important",borderRadius:"2px!important",fontFamily:"Nunito",fontStyle:"normal!important",fontWeight:800,textAlign:"center",fontSize:"9px !important",lineHeight:"12px !important",letterSpacing:"-1.30385e-09px !important",textTransform:"uppercase!important",padding:"3px 10px !important"},sortIcon:{opacity:"1!important"},paperContainer:{display:"flex!important",flexDirection:"column",marginTop:`-${e.spacing(1.375)}!important`,boxShadow:"0px 2px 10px rgba(0, 0, 0, 0.15)!important",border:"0.5px solid #D5DFE9!important",minWidth:"168px!important"},popperBtns:{padding:"10px 16px !important",fontFamily:"Nunito",fontWeight:"normal",fontSize:"16px !important",lineHeight:"22px !important",letterSpacing:"-1.30385e-09px !important",color:"#1B1D1F!important",margin:e.spacing(.5)+"px!important",opacity:"0.9!important",textTransform:"capitalize!important",justifyContent:"left!important","&:hover":{background:"#EEF3F9!important"}},popperIcon:{marginRight:e.spacing(1.8)+"px!important",width:e.spacing(2.25)+"px!important",height:e.spacing(2.25)+"px!important"},popperHr:{margin:"0px!important",border:"1px solid #D9E2EB!important",width:`calc(100% - ${e.spacing(.571)})!important`},boxSubtitle:{display:"flex",alignItems:"center"}})),useStyles$3$1=makeStyles()(e=>({table:{border:"none!important"},tableHead:{"& th":{padding:"11px"}},tableRowEmpty:{background:"#FAFAFA",height:"50px"},sortIcon:{opacity:"1!important"},borderBottomLineHeader:{opacity:"0.9!important",borderBottom:"0.5px solid #D5DFE9"},borderBottomLineHeaderAction:{opacity:"0.9!important",borderBottom:"0.5px solid #D5DFE9",width:"30px"}})),DynamicTableHead=({columnNames:e,defaultOrderBy:t,onRequestSort:n,idPrefix:r,isSortable:o=!0})=>{const[i,a]=react.exports.useState("asc"),[s,l]=react.exports.useState(t||e[0]),c=useStyles$3$1()["classes"];return react.exports.useEffect(()=>{n&&n(s,i)},[i,s]),jsxRuntime.exports.jsx(TableHead$1,Object.assign({className:c.tableHead},{children:jsxRuntime.exports.jsx(TableRow$1,{children:e.map((n,e)=>isNull_1(n)||isEmpty_1(n)?jsxRuntime.exports.jsx(TableCell$1,{"data-test":r+"-table-heading."+e,className:""+c.borderBottomLineHeaderAction},"action-column-"+e):jsxRuntime.exports.jsxs(TableCell$1,Object.assign({"data-test":r+"-table-heading."+e,className:""+c.borderBottomLineHeader},{children:[jsxRuntime.exports.jsx(FormattedMessage$1,{id:"{idPrefix}-table-column-heading.{id}",defaultMessage:"{columnName}",description:"{columnName}",values:{idPrefix:r,id:n+"-"+e,columnName:startCase_1(n)}}),o&&jsxRuntime.exports.jsx(TableSortLabel$1,{"data-test":r+"-table-sort-label."+e,active:n===s,IconComponent:default_1$1,direction:n===s?i:"asc",onClick:()=>{var e=n,t=s===e&&"asc"===i;a(t?"desc":"asc"),l(e)},classes:{icon:c.sortIcon}})]}),n+"-"+e))})}))},EmptyTableRow=({numColumns:e})=>{var t=useStyles$3$1()["classes"];return jsxRuntime.exports.jsx(TableRow$1,Object.assign({className:t.tableRowEmpty},{children:times_1(e,e=>jsxRuntime.exports.jsx(TableCell$1,{},e))}))},DynamicTable=({columnNames:e,rows:t,onRequestSort:n,idPrefix:r,isSortable:o=!0})=>{var i=useStyles$3$1()["classes"];return jsxRuntime.exports.jsx(TableContainer$1,{children:jsxRuntime.exports.jsxs(Table$1,Object.assign({"data-test":r+"-table",className:i.table},{children:[jsxRuntime.exports.jsx(DynamicTableHead,{idPrefix:r,columnNames:e,onRequestSort:n,isSortable:o}),jsxRuntime.exports.jsx(TableBody$1,Object.assign({"data-test":r+"-table-body"},{children:isNull_1(t)||isEmpty_1(t)?jsxRuntime.exports.jsx(EmptyTableRow,{"data-test":r+"-table-empty-row",numColumns:size_1(e)}):t}))]}))})},ProgressStep=({step:e,size:t,active:n,visited:r,alwaysShowLabel:o,label:i,onClick:a,nonLinear:s,isFirstOrOnly:l,idPrefix:c})=>{const[u,d]=react.exports.useState(o),[p,f]=react.exports.useState(!1);var h=.2*-t;return jsxRuntime.exports.jsxs(Box$1,Object.assign({display:"flex",sx:{flexGrow:1},alignItems:"center"},{children:[jsxRuntime.exports.jsx(Box$1,Object.assign({sx:{background:n?"#1871E8":r?"#555F7C":"#F2F5F9",marginLeft:`${o?0:h}px`,width:t,height:t,display:"flex",alignItems:"center",justifyContent:"center",fontStyle:"normal",fontSize:"14px",fontFamily:"Nunito",color:n||r||p?"#FFFFFF":"#2A323C",lineHeight:"20px",border:"1px solid #FFFFFF",borderRadius:"50%",cursor:"default",userSelect:"none","&:hover":!s&&r?{marginLeft:`${l?h:0}px`,opacity:[.9,.8,.7],cursor:"pointer"}:{}},onMouseOver:()=>{!s&&r&&(f(!0),o||d(!0))},onMouseOut:()=>{!s&&r&&(f(!1),o||d(!1))},onClick:()=>{!s&&r&&a(e-1)},"data-test":c+"-progress-stepper-icon-step-"+e},{children:e})),jsxRuntime.exports.jsx(Collapse$1,Object.assign({in:u,orientation:"horizontal",mountOnEnter:!0,unmountOnExit:!0},{children:jsxRuntime.exports.jsx(Typography$1,Object.assign({sx:{marginLeft:"10px",marginRight:`${o?10:20}px`,userSelect:"none"},noWrap:!0,"data-test":c+"-progress-stepper-label-step-"+e},{children:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"{idPrefix}-progress-stepper.label-step-{step}",defaultMessage:"{label}",description:"Step {step}: {label}",values:{idPrefix:c,label:i,step:e}})}))}))]}))},OverlappingSteps=({steps:e,stepIconSize:r,visited:o,start:i,end:t,invertOverlap:a,onClick:s,nonLinear:l,idPrefix:c})=>{const u=t-i;var n=r+u*(.85*r);return jsxRuntime.exports.jsx(Box$1,Object.assign({display:"grid",sx:{marginLeft:`${a?10:0}px`},gridTemplateColumns:`auto fit-content(${n}px) auto`},{children:map_1(slice_1(e,i,t),(e,t)=>{var n=i+t;return jsxRuntime.exports.jsx(Box$1,Object.assign({gridColumn:t+1+" / span 1",gridRow:"1",zIndex:a?u-t:t+1},{children:jsxRuntime.exports.jsx(ProgressStep,{step:n+1,size:r,visited:o[n],label:e,onClick:s,nonLinear:l,isFirstOrOnly:0===t||1==u,idPrefix:c})}),e)})}))},VisibleSteps=({steps:e,activeStep:n,maxVisibleFutureSteps:r,stepIconSize:o,visited:i,totalSteps:a,onClick:s,nonLinear:l,idPrefix:c})=>jsxRuntime.exports.jsx(react.exports.Fragment,{children:map_1(slice_1(e,n,n+r+1),(e,t)=>{t=n+t;return jsxRuntime.exports.jsxs(Box$1,Object.assign({display:"flex",alignItems:"center",justifyContent:"center"},{children:[jsxRuntime.exports.jsx(ProgressStep,{step:t+1,size:o,active:t===n,visited:i[t],alwaysShowLabel:!0,label:e,onClick:s,nonLinear:l,idPrefix:c}),t<n+r&&t<a-1&&jsxRuntime.exports.jsx(StepConnector$1,{sx:{width:45,marginRight:"10px"}})]}),e)})}),TransitionWrapper=react.exports.forwardRef(({component:e,idPrefix:t,step:n},r)=>jsxRuntime.exports.jsx(Box$1,Object.assign({ref:r,display:"inline-block",minWidth:"100%",height:"100%","data-test":t+"-progress-stepper-content-step-"+n},{children:e}))),stepIconSize=36,stepperSectionHeight=86,buttonSectionHeight=86,ProgressStepper=({steps:e,stepContent:t,maxVisibleFutureSteps:n=2,nextButtonDisabled:r,onActiveStepChange:o,nonLinear:i,idPrefix:a="ui",onFinalStepButtonClick:s,finalStepButtonLabel:l="Submit",customFinalStepButtons:c})=>{const[u,d]=react.exports.useState(0),[p,f]=react.exports.useState(map_1(e,()=>!1)),[h,m]=react.exports.useState(map_1(t,()=>"right")),g=react.exports.useRef(null),v=size_1(e),y=(n<0&&(n=0),react.exports.useEffect(()=>{null!=o&&o(u)},[u]),e=>{const t=p;t[e]=!0,f(t)}),x=e=>{const t=h;if(u<e)t[u]="right",t[e]="left";else{if(!(e<u))return;t[u]="left",t[e]="right"}m(t)},C=()=>{u===v-1?null!=s&&s():b()},b=()=>{y(u);var e=u+1;e<v&&(x(e),d(e))};var w=e=>{p[e]&&(y(u),x(e),d(e))};const $=()=>u===v-1;return jsxRuntime.exports.jsxs(Box$1,Object.assign({height:"100%"},{children:[jsxRuntime.exports.jsxs(Grid$1,Object.assign({container:!0,direction:"column",alignItems:"flex-start",justifyContent:"center",height:`calc(100% - ${buttonSectionHeight}px)`},{children:[jsxRuntime.exports.jsx(Grid$1,Object.assign({item:!0,padding:5,height:stepperSectionHeight,width:"100%"},{children:jsxRuntime.exports.jsxs(Box$1,Object.assign({display:"flex"},{children:[jsxRuntime.exports.jsx(OverlappingSteps,{steps:e,stepIconSize:stepIconSize,visited:p,start:0,end:u,onClick:w,nonLinear:i,idPrefix:a}),jsxRuntime.exports.jsx(VisibleSteps,{steps:e,activeStep:u,maxVisibleFutureSteps:n,stepIconSize:stepIconSize,visited:p,totalSteps:v,onClick:w,nonLinear:i,idPrefix:a}),jsxRuntime.exports.jsx(OverlappingSteps,{steps:e,stepIconSize:stepIconSize,visited:p,start:u+n+1,end:v,invertOverlap:!0,onClick:w,nonLinear:i,idPrefix:a})]}))})),jsxRuntime.exports.jsx(Grid$1,Object.assign({item:!0,width:"100%"},{children:jsxRuntime.exports.jsx(Divider$1,{})})),jsxRuntime.exports.jsx(Grid$1,Object.assign({container:!0,item:!0,xs:!0,overflow:"auto",width:"100%",ref:g,sx:{overflowX:"hidden"}},{children:jsxRuntime.exports.jsx(Box$1,Object.assign({height:"100%",width:"100%"},{children:map_1(t,(e,t)=>jsxRuntime.exports.jsx(Slide$1,Object.assign({container:g.current,direction:h[t],in:u===t,mountOnEnter:!0,unmountOnExit:!0},{children:jsxRuntime.exports.jsx(TransitionWrapper,{component:e,step:t+1,idPrefix:a})}),t))}))})),jsxRuntime.exports.jsx(Grid$1,Object.assign({item:!0,width:"100%"},{children:jsxRuntime.exports.jsx(Divider$1,{})}))]})),jsxRuntime.exports.jsxs(Box$1,Object.assign({display:"flex",justifyContent:"space-between",alignItems:"center",padding:5,height:buttonSectionHeight},{children:[jsxRuntime.exports.jsx(Button$1,Object.assign({variant:"text","data-test":a+"-progress-stepper-back-button",onClick:()=>{var e=u-1;0<=e&&(y(u),x(e),d(e))},sx:{color:"#2A323C"}},{children:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"{idPrefix}-progress-stepper.back-button-label",defaultMessage:"Back",description:"Previous Step Button",values:{idPrefix:a}})})),jsxRuntime.exports.jsx(Box$1,Object.assign({display:"flex",alignItems:"center",gap:3},{children:$()&&!isNil_1(c)?c:(!$()||!isNil_1(s))&&jsxRuntime.exports.jsx(Button$1,Object.assign({variant:"contained",color:"primary","data-test":a+"-progress-stepper-next-button",onClick:C,disabled:r},{children:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"{idPrefix}-progress-stepper.next-button-label",defaultMessage:"{message}",description:"{description} Button",values:{idPrefix:a,message:$()?l:"Next",description:$()?l:"Next Step"}})}))}))]}))]}))};class ErrorBoundary extends react.exports.Component{constructor(){super(...arguments),this.state={hasError:!1}}static getDerivedStateFromError(e){return{hasError:!0}}componentDidCatch(e,t){console.error("Uncaught error:",e,t)}render(){var{fallbackUI:e,children:t}=this.props;return this.state.hasError?e:t}}const useStyles$2$1=makeStyles()(e=>({root:{width:1020,position:"relative"},panel:{backgroundColor:e.palette.background.paper,boxShadow:"0px 0px 12px rgba(0, 0, 0, 0.25)",height:"100%"},fullScreen:{position:"fixed",width:"100%",height:"100vh",top:0,left:0,right:0,bottom:0,zIndex:1004,background:"#FFF"},overlay:{backgroundColor:e.palette.grey[50],opacity:"0.5 !important",height:"100%",position:"absolute",top:0,width:"100%",zIndex:1001}})),FullScreenContainer=({fullScreen:e,preventRerender:t=!1,containerClassName:n="",dimmed:r,dataTest:o,children:i})=>{var a=useStyles$2$1()["classes"];const s=e=>{try{const t=document.querySelector("#VERITONE_PANEL_ID-root.aiware-el");t&&t.setAttribute("style",e?"opacity: 0; pointer-events: none;":"")}catch(e){}};return react.exports.useEffect(()=>(t&&e&&s(!0),()=>s(!1)),[t,e]),t?jsxRuntime.exports.jsx("div",Object.assign({className:`${e?a.fullScreen:""} `+n},{children:i})):e?jsxRuntime.exports.jsx(Portal$1,{children:jsxRuntime.exports.jsxs("div",Object.assign({role:"presentation","data-test":o,className:classNames(a.root,a.panel,a.fullScreen,n||"")},{children:[r&&jsxRuntime.exports.jsx("div",{className:a.overlay}),i]}))}):jsxRuntime.exports.jsx("div",Object.assign({className:n},{children:i}))},useStyles$1$2=makeStyles()(e=>({container:{marginTop:e.spacing(6),padding:e.spacing(4,4),textAlign:"center",border:"0.5px solid #D5DFE9",borderRadius:e.spacing(2)},text:{marginTop:e.spacing(3)},icon:{display:"inline !important"}})),ErrorState$1=({onRetry:e,errorMessage:t})=>{var n=useStyles$1$2()["classes"];return jsxRuntime.exports.jsxs("div",Object.assign({className:n.container},{children:[jsxRuntime.exports.jsx(Icon$1,Object.assign({className:n.icon},{children:jsxRuntime.exports.jsx(AlarmTwo,{fontSize:"large"})})),jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"body2",className:n.text,"data-test":"error-message"},{children:t})),jsxRuntime.exports.jsx(Box$1,{mt:4}),jsxRuntime.exports.jsx(Button$1,Object.assign({variant:"text",size:"large","data-test":"retry-btn",onClick:e},{children:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"ui.error-state.retry-button",defaultMessage:"Retry",description:"error state retry button"})}))]}))},useStyles$d=makeStyles()(e=>({container:{display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",textAlign:"center",padding:"12px",marginTop:"15px"},image:{maxWidth:"50%",marginBottom:"40px",marginTop:"25px",userSelect:"none",pointerEvents:"none",userDrag:"none"},header:{fontWeight:600,marginBottom:"12px",cursor:"default"},description:{opacity:.8}}));function NullState$2({header:e,description:t}){var n=useStyles$d()["classes"];return jsxRuntime.exports.jsxs("div",Object.assign({className:n.container,"data-testid":"ui-null-state-container"},{children:[jsxRuntime.exports.jsx("img",{src:img$s,className:n.image,alt:"no data","data-testid":"ui-null-state-image"}),jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"body2",className:n.header,"data-testid":"ui-null-state-header"},{children:e})),jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"subtitle1",className:n.description,"data-testid":"admin-center-groups-empty-state-description"},{children:t}))]}))}function getLoadingButtonUtilityClass(e){return generateUtilityClass("MuiLoadingButton",e)}const loadingButtonClasses=generateUtilityClasses("MuiLoadingButton",["root","loading","loadingIndicator","loadingIndicatorCenter","loadingIndicatorStart","loadingIndicatorEnd","endIconLoadingEnd","startIconLoadingStart"]);var loadingButtonClasses$1=loadingButtonClasses;const _excluded=["children","disabled","id","loading","loadingIndicator","loadingPosition","variant"],useUtilityClasses=e=>{var{loading:e,loadingPosition:t,classes:n}=e;return _extends({},n,composeClasses({root:["root",e&&"loading"],startIcon:[e&&"startIconLoading"+capitalize$2(t)],endIcon:[e&&"endIconLoading"+capitalize$2(t)],loadingIndicator:["loadingIndicator",e&&"loadingIndicator"+capitalize$2(t)]},getLoadingButtonUtilityClass,n))},rootShouldForwardProp=e=>"ownerState"!==e&&"theme"!==e&&"sx"!==e&&"as"!==e&&"classes"!==e,LoadingButtonRoot=styled$1(Button$1,{shouldForwardProp:e=>rootShouldForwardProp(e)||"classes"===e,name:"MuiLoadingButton",slot:"Root",overridesResolver:(e,t)=>[t.root,t.startIconLoadingStart&&{["& ."+loadingButtonClasses$1.startIconLoadingStart]:t.startIconLoadingStart},t.endIconLoadingEnd&&{["& ."+loadingButtonClasses$1.endIconLoadingEnd]:t.endIconLoadingEnd}]})(({ownerState:e,theme:t})=>_extends({[`& .${loadingButtonClasses$1.startIconLoadingStart}, & .`+loadingButtonClasses$1.endIconLoadingEnd]:{transition:t.transitions.create(["opacity"],{duration:t.transitions.duration.short}),opacity:0}},"center"===e.loadingPosition&&{transition:t.transitions.create(["background-color","box-shadow","border-color"],{duration:t.transitions.duration.short}),["&."+loadingButtonClasses$1.loading]:{color:"transparent"}},"start"===e.loadingPosition&&e.fullWidth&&{[`& .${loadingButtonClasses$1.startIconLoadingStart}, & .`+loadingButtonClasses$1.endIconLoadingEnd]:{transition:t.transitions.create(["opacity"],{duration:t.transitions.duration.short}),opacity:0,marginRight:-8}},"end"===e.loadingPosition&&e.fullWidth&&{[`& .${loadingButtonClasses$1.startIconLoadingStart}, & .`+loadingButtonClasses$1.endIconLoadingEnd]:{transition:t.transitions.create(["opacity"],{duration:t.transitions.duration.short}),opacity:0,marginLeft:-8}})),LoadingButtonLoadingIndicator=styled$1("div",{name:"MuiLoadingButton",slot:"LoadingIndicator",overridesResolver:(e,t)=>{e=e.ownerState;return[t.loadingIndicator,t["loadingIndicator"+capitalize$2(e.loadingPosition)]]}})(({theme:e,ownerState:t})=>_extends({position:"absolute",visibility:"visible",display:"flex"},"start"===t.loadingPosition&&("outlined"===t.variant||"contained"===t.variant)&&{left:"small"===t.size?10:14},"start"===t.loadingPosition&&"text"===t.variant&&{left:6},"center"===t.loadingPosition&&{left:"50%",transform:"translate(-50%)",color:e.palette.action.disabled},"end"===t.loadingPosition&&("outlined"===t.variant||"contained"===t.variant)&&{right:"small"===t.size?10:14},"end"===t.loadingPosition&&"text"===t.variant&&{right:6},"start"===t.loadingPosition&&t.fullWidth&&{position:"relative",left:-10},"end"===t.loadingPosition&&t.fullWidth&&{position:"relative",right:-10})),LoadingButton=react.exports.forwardRef(function(e,t){var e=useThemeProps({props:e,name:"MuiLoadingButton"}),{children:n,disabled:r=!1,id:o,loading:i=!1,loadingIndicator:a,loadingPosition:s="center",variant:l="text"}=e,c=_objectWithoutPropertiesLoose$1(e,_excluded),o=useId(o),a=null!=a?a:jsxRuntime.exports.jsx(CircularProgress$1,{"aria-labelledby":o,color:"inherit",size:16}),e=_extends({},e,{disabled:r,loading:i,loadingIndicator:a,loadingPosition:s,variant:l}),s=useUtilityClasses(e);return jsxRuntime.exports.jsx(LoadingButtonRoot,_extends({disabled:r||i,id:o,ref:t},c,{variant:l,classes:s,ownerState:e,children:"end"===e.loadingPosition?jsxRuntime.exports.jsxs(react.exports.Fragment,{children:[n,i&&jsxRuntime.exports.jsx(LoadingButtonLoadingIndicator,{className:s.loadingIndicator,ownerState:e,children:a})]}):jsxRuntime.exports.jsxs(react.exports.Fragment,{children:[i&&jsxRuntime.exports.jsx(LoadingButtonLoadingIndicator,{className:s.loadingIndicator,ownerState:e,children:a}),n]})}))});var LoadingButton$1=LoadingButton,Link={},_interopRequireDefault=interopRequireDefault.exports,default_1=(Object.defineProperty(Link,"__esModule",{value:!0}),Link.default=void 0),_createSvgIcon=_interopRequireDefault(createSvgIcon$1),_jsxRuntime=jsxRuntime.exports,_default=(0,_createSvgIcon.default)((0,_jsxRuntime.jsx)("path",{d:"M3.9 12c0-1.71 1.39-3.1 3.1-3.1h4V7H7c-2.76 0-5 2.24-5 5s2.24 5 5 5h4v-1.9H7c-1.71 0-3.1-1.39-3.1-3.1zM8 13h8v-2H8v2zm9-6h-4v1.9h4c1.71 0 3.1 1.39 3.1 3.1s-1.39 3.1-3.1 3.1h-4V17h4c2.76 0 5-2.24 5-5s-2.24-5-5-5z"}),"Link"),default_1=Link.default=_default,cropper={exports:{}},Cropper=(!function(){function P(t,e){var n,r=Object.keys(t);return Object.getOwnPropertySymbols&&(n=Object.getOwnPropertySymbols(t),e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,n)),r}function V(r){for(var e=1;e<arguments.length;e++){var o=null!=arguments[e]?arguments[e]:{};e%2?P(Object(o),!0).forEach(function(e){var t,n;t=r,n=o[e=e],e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(o)):P(Object(o)).forEach(function(e){Object.defineProperty(r,e,Object.getOwnPropertyDescriptor(o,e))})}return r}function N(e){return(N="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function H(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 D(e){return function(e){if(Array.isArray(e))return r(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return r(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(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?r(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function r(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 p(e){return"number"==typeof e&&!oe(e)}function o(e){return void 0===e}function i(e){return"object"===N(e)&&null!==e}function f(e){if(!i(e))return!1;try{var t=e.constructor,n=t.prototype;return t&&n&&ae.call(n,"isPrototypeOf")}catch(e){return!1}}function c(e){return"function"==typeof e}function F(e){return Array.from?Array.from(e):se.call(e)}function _(n,r){return n&&c(r)&&(Array.isArray(n)||p(n.length)?F(n).forEach(function(e,t){r.call(n,e,t,n)}):i(n)&&Object.keys(n).forEach(function(e){r.call(n,n[e],e,n)})),n}function T(e,t){var n=1<arguments.length&&void 0!==t?t:1e11;return le.test(e)?Math.round(e*n)/n:e}function h(e,t){var n=e.style;_(t,function(e,t){ce.test(t)&&p(e)&&(e="".concat(e,"px")),n[t]=e})}function u(e,t){var n;t&&(p(e.length)?_(e,function(e){u(e,t)}):e.classList?e.classList.add(t):(n=e.className.trim())?n.indexOf(t)<0&&(e.className="".concat(n," ").concat(t)):e.className=t)}function E(e,t){t&&(p(e.length)?_(e,function(e){E(e,t)}):e.classList?e.classList.remove(t):0<=e.className.indexOf(t)&&(e.className=e.className.replace(t,"")))}function a(e,t,n){t&&(p(e.length)?_(e,function(e){a(e,t,n)}):(n?u:E)(e,t))}function s(e){return e.replace(ue,"$1-$2").toLowerCase()}function B(e,t){return i(e[t])?e[t]:e.dataset?e.dataset[t]:e.getAttribute("data-".concat(s(t)))}function d(e,t,n){i(n)?e[t]=n:e.dataset?e.dataset[t]=n:e.setAttribute("data-".concat(s(t)),n)}function l(n,e,r,t){var o=3<arguments.length&&void 0!==t?t:{},i=r;e.trim().split(de).forEach(function(e){var t;pe||(t=n.listeners)&&t[e]&&t[e][r]&&(i=t[e][r],delete t[e][r],0===Object.keys(t[e]).length&&delete t[e],0===Object.keys(t).length&&delete n.listeners),n.removeEventListener(e,i,o)})}function m(i,e,a,t){var s=3<arguments.length&&void 0!==t?t:{},l=a;e.trim().split(de).forEach(function(r){var e,o;s.once&&!pe&&(e=i.listeners,l=function(){delete o[r][a],i.removeEventListener(r,l,s);for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];a.apply(i,t)},(o=void 0===e?{}:e)[r]||(o[r]={}),o[r][a]&&i.removeEventListener(r,o[r][a],s),o[r][a]=l,i.listeners=o),i.addEventListener(r,l,s)})}function g(e,t,n){var r;return c(Event)&&c(CustomEvent)?r=new CustomEvent(t,{detail:n,bubbles:!0,cancelable:!0}):(r=document.createEvent("CustomEvent")).initCustomEvent(t,!0,!0,n),e.dispatchEvent(r)}function Z(e){e=e.getBoundingClientRect();return{left:e.left+(window.pageXOffset-document.documentElement.clientLeft),top:e.top+(window.pageYOffset-document.documentElement.clientTop)}}function U(e){e=e.match(fe);return null!==e&&(e[1]!==t.protocol||e[2]!==t.hostname||e[3]!==t.port)}function z(e){var t="timestamp=".concat((new Date).getTime());return e+(-1===e.indexOf("?")?"?":"&")+t}function v(e){var t=e.rotate,n=e.scaleX,r=e.scaleY,o=e.translateX,e=e.translateY,i=[],o=(p(o)&&0!==o&&i.push("translateX(".concat(o,"px)")),p(e)&&0!==e&&i.push("translateY(".concat(e,"px)")),p(t)&&0!==t&&i.push("rotate(".concat(t,"deg)")),p(n)&&1!==n&&i.push("scaleX(".concat(n,")")),p(r)&&1!==r&&i.push("scaleY(".concat(r,")")),i.length?i.join(" "):"none");return{WebkitTransform:o,msTransform:o,transform:o}}function y(e,t){var n=e.pageX,e=e.pageY,r={endX:n,endY:e};return t?r:V({startX:n,startY:e},r)}function R(e,t){var n,r=e.aspectRatio,o=e.height,i=e.width,a=1<arguments.length&&void 0!==t?t:"contain",s=ie(i),l=ie(o);return s&&l?(n=o*r,"contain"===a&&i<n||"cover"===a&&n<i?o=i/r:i=o*r):s?o=i/r:l&&(i=o*r),{width:i,height:o}}var x,C,b,w,W,j,G,K,$,S,L,M,O,I,k,q,Q,Y,X,J,ee,te,ne,re,oe,ie,ae,se,A,le,ce,ue,de,pe,t,fe,he,me,e,n,ge,ve,ye,xe,Ce,be;cropper.exports=(x="undefined"!=typeof window&&void 0!==window.document,C=x?window:{},n=!(!x||!C.document.documentElement)&&"ontouchstart"in C.document.documentElement,e=x&&"PointerEvent"in C,w="".concat(b="cropper","-crop"),W="".concat(b,"-disabled"),j="".concat(b,"-hidden"),G="".concat(b,"-hide"),K="".concat(b,"-invisible"),$="".concat(b,"-modal"),S="".concat(b,"-move"),L="".concat(b,"Action"),M="".concat(b,"Preview"),O="cropend",I="cropmove",k="cropstart",q=e?"pointerdown":n?"touchstart":"mousedown",Q=e?"pointermove":n?"touchmove":"mousemove",Y=e?"pointerup pointercancel":n?"touchend touchcancel":"mouseup",X="image/jpeg",J=/^e|w|s|n|se|sw|ne|nw|all|crop|move|zoom$/,ee=/^data:/,te=/^data:image\/jpeg;base64,/,ne=/^img|canvas$/i,re={viewMode:0,dragMode:"crop",initialAspectRatio:NaN,aspectRatio:NaN,data:null,preview:"",responsive:!0,restore:!0,checkCrossOrigin:!0,checkOrientation:!0,modal:!0,guides:!0,center:!0,highlight:!0,background:!0,autoCrop:!0,autoCropArea:.8,movable:!0,rotatable:!0,scalable:!0,zoomable:!0,zoomOnTouch:!0,zoomOnWheel:!0,wheelZoomRatio:.1,cropBoxMovable:!0,cropBoxResizable:!0,toggleDragModeOnDblclick:!0,minCanvasWidth:0,minCanvasHeight:0,minCropBoxWidth:0,minCropBoxHeight:0,minContainerWidth:200,minContainerHeight:100,ready:null,cropstart:null,cropmove:null,cropend:null,crop:null,zoom:null},oe=Number.isNaN||C.isNaN,ie=function(e){return 0<e&&e<1/0},ae=Object.prototype.hasOwnProperty,se=Array.prototype.slice,A=Object.assign||function(n){for(var e=arguments.length,t=new Array(1<e?e-1:0),r=1;r<e;r++)t[r-1]=arguments[r];return i(n)&&0<t.length&&t.forEach(function(t){i(t)&&Object.keys(t).forEach(function(e){n[e]=t[e]})}),n},le=/\.\d*(?:0|9){12}\d*$/,ce=/^width|height|left|top|marginLeft|marginTop$/,ue=/([a-z\d])([A-Z])/g,de=/\s\s*/,pe=function(){var t,e,n,r=!1;return x&&(t=!1,e=function(){},n=Object.defineProperty({},"once",{get:function(){return r=!0,t},set:function(e){t=e}}),C.addEventListener("test",e,n),C.removeEventListener("test",e,n)),r}(),t=C.location,fe=/^(\w+:)\/\/([^:/?#]*):?(\d*)/i,he=String.fromCharCode,me=/^data:.*,/,e={render:function(){this.initContainer(),this.initCanvas(),this.initCropBox(),this.renderCanvas(),this.cropped&&this.renderCropBox()},initContainer:function(){var e=this.element,t=this.options,n=this.container,r=this.cropper,o=Number(t.minContainerWidth),t=Number(t.minContainerHeight),o=(u(r,j),E(e,j),{width:Math.max(n.offsetWidth,0<=o?o:200),height:Math.max(n.offsetHeight,0<=t?t:100)});h(r,{width:(this.containerData=o).width,height:o.height}),u(e,j),E(r,j)},initCanvas:function(){var e=this.containerData,t=this.imageData,n=this.options.viewMode,r=Math.abs(t.rotate)%180==90,o=r?t.naturalHeight:t.naturalWidth,r=r?t.naturalWidth:t.naturalHeight,t=o/r,i=e.width,a=e.height,t=(e.height*t>e.width?3===n?i=e.height*t:a=e.width/t:3===n?a=e.width/t:i=e.height*t,{aspectRatio:t,naturalWidth:o,naturalHeight:r,width:i,height:a});this.canvasData=t,this.limited=1===n||2===n,this.limitCanvas(!0,!0),t.width=Math.min(Math.max(t.width,t.minWidth),t.maxWidth),t.height=Math.min(Math.max(t.height,t.minHeight),t.maxHeight),t.left=(e.width-t.width)/2,t.top=(e.height-t.height)/2,t.oldLeft=t.left,t.oldTop=t.top,this.initialCanvasData=A({},t)},limitCanvas:function(e,t){var n=this.options,r=this.containerData,o=this.canvasData,i=this.cropBoxData,a=n.viewMode,s=o.aspectRatio,l=this.cropped&&i;e&&(e=Number(n.minCanvasWidth)||0,n=Number(n.minCanvasHeight)||0,1<a?(e=Math.max(e,r.width),n=Math.max(n,r.height),3===a&&(e<n*s?e=n*s:n=e/s)):0<a&&(e?e=Math.max(e,l?i.width:0):n?n=Math.max(n,l?i.height:0):l&&((e=i.width)<(n=i.height)*s?e=n*s:n=e/s)),e=(s=R({aspectRatio:s,width:e,height:n})).width,n=s.height,o.minWidth=e,o.minHeight=n,o.maxWidth=1/0,o.maxHeight=1/0),t&&((l?0:1)<a?(s=r.width-o.width,e=r.height-o.height,o.minLeft=Math.min(0,s),o.minTop=Math.min(0,e),o.maxLeft=Math.max(0,s),o.maxTop=Math.max(0,e),l&&this.limited&&(o.minLeft=Math.min(i.left,i.left+(i.width-o.width)),o.minTop=Math.min(i.top,i.top+(i.height-o.height)),o.maxLeft=i.left,o.maxTop=i.top,2===a&&(o.width>=r.width&&(o.minLeft=Math.min(0,s),o.maxLeft=Math.max(0,s)),o.height>=r.height&&(o.minTop=Math.min(0,e),o.maxTop=Math.max(0,e))))):(o.minLeft=-o.width,o.minTop=-o.height,o.maxLeft=r.width,o.maxTop=r.height))},renderCanvas:function(e,t){var n,r,o=this.canvasData,i=this.imageData;t&&(i=(t=function(e){var t=e.width,n=e.height,e=e.degree;if(90==(e=Math.abs(e)%180))return{width:n,height:t};var r=e%90*Math.PI/180,o=Math.sin(r),r=Math.cos(r),i=t*r+n*o,t=t*o+n*r;return 90<e?{width:t,height:i}:{width:i,height:t}}({width:i.naturalWidth*Math.abs(i.scaleX||1),height:i.naturalHeight*Math.abs(i.scaleY||1),degree:i.rotate||0})).width,t=t.height,n=o.width*(i/o.naturalWidth),r=o.height*(t/o.naturalHeight),o.left-=(n-o.width)/2,o.top-=(r-o.height)/2,o.width=n,o.height=r,o.aspectRatio=i/t,o.naturalWidth=i,o.naturalHeight=t,this.limitCanvas(!0,!1)),(o.width>o.maxWidth||o.width<o.minWidth)&&(o.left=o.oldLeft),(o.height>o.maxHeight||o.height<o.minHeight)&&(o.top=o.oldTop),o.width=Math.min(Math.max(o.width,o.minWidth),o.maxWidth),o.height=Math.min(Math.max(o.height,o.minHeight),o.maxHeight),this.limitCanvas(!1,!0),o.left=Math.min(Math.max(o.left,o.minLeft),o.maxLeft),o.top=Math.min(Math.max(o.top,o.minTop),o.maxTop),o.oldLeft=o.left,o.oldTop=o.top,h(this.canvas,A({width:o.width,height:o.height},v({translateX:o.left,translateY:o.top}))),this.renderImage(e),this.cropped&&this.limited&&this.limitCropBox(!0,!0)},renderImage:function(e){var t=this.canvasData,n=this.imageData,r=n.naturalWidth*(t.width/t.naturalWidth),o=n.naturalHeight*(t.height/t.naturalHeight);A(n,{width:r,height:o,left:(t.width-r)/2,top:(t.height-o)/2}),h(this.image,A({width:n.width,height:n.height},v(A({translateX:n.left,translateY:n.top},n)))),e&&this.output()},initCropBox:function(){var e=this.options,t=this.canvasData,n=e.aspectRatio||e.initialAspectRatio,e=Number(e.autoCropArea)||.8,r={width:t.width,height:t.height};n&&(t.height*n>t.width?r.height=r.width/n:r.width=r.height*n),this.cropBoxData=r,this.limitCropBox(!0,!0),r.width=Math.min(Math.max(r.width,r.minWidth),r.maxWidth),r.height=Math.min(Math.max(r.height,r.minHeight),r.maxHeight),r.width=Math.max(r.minWidth,r.width*e),r.height=Math.max(r.minHeight,r.height*e),r.left=t.left+(t.width-r.width)/2,r.top=t.top+(t.height-r.height)/2,r.oldLeft=r.left,r.oldTop=r.top,this.initialCropBoxData=A({},r)},limitCropBox:function(e,t){var n,r,o=this.options,i=this.containerData,a=this.canvasData,s=this.cropBoxData,l=this.limited,c=o.aspectRatio;e&&(e=Number(o.minCropBoxWidth)||0,o=Number(o.minCropBoxHeight)||0,n=l?Math.min(i.width,a.width,a.width+a.left,i.width-a.left):i.width,r=l?Math.min(i.height,a.height,a.height+a.top,i.height-a.top):i.height,e=Math.min(e,i.width),o=Math.min(o,i.height),c&&(e&&o?e<o*c?o=e/c:e=o*c:e?o=e/c:o&&(e=o*c),n<r*c?r=n/c:n=r*c),s.minWidth=Math.min(e,n),s.minHeight=Math.min(o,r),s.maxWidth=n,s.maxHeight=r),t&&(l?(s.minLeft=Math.max(0,a.left),s.minTop=Math.max(0,a.top),s.maxLeft=Math.min(i.width,a.left+a.width)-s.width,s.maxTop=Math.min(i.height,a.top+a.height)-s.height):(s.minLeft=0,s.minTop=0,s.maxLeft=i.width-s.width,s.maxTop=i.height-s.height))},renderCropBox:function(){var e=this.options,t=this.containerData,n=this.cropBoxData;(n.width>n.maxWidth||n.width<n.minWidth)&&(n.left=n.oldLeft),(n.height>n.maxHeight||n.height<n.minHeight)&&(n.top=n.oldTop),n.width=Math.min(Math.max(n.width,n.minWidth),n.maxWidth),n.height=Math.min(Math.max(n.height,n.minHeight),n.maxHeight),this.limitCropBox(!1,!0),n.left=Math.min(Math.max(n.left,n.minLeft),n.maxLeft),n.top=Math.min(Math.max(n.top,n.minTop),n.maxTop),n.oldLeft=n.left,n.oldTop=n.top,e.movable&&e.cropBoxMovable&&d(this.face,L,n.width>=t.width&&n.height>=t.height?"move":"all"),h(this.cropBox,A({width:n.width,height:n.height},v({translateX:n.left,translateY:n.top}))),this.cropped&&this.limited&&this.limitCanvas(!0,!0),this.disabled||this.output()},output:function(){this.preview(),g(this.element,"crop",this.getData())}},n={initPreview:function(){var e=this.element,n=this.crossOrigin,t=this.options.preview,r=n?this.crossOriginUrl:this.url,o=e.alt||"The image to preview",i=document.createElement("img");n&&(i.crossOrigin=n),i.src=r,i.alt=o,this.viewBox.appendChild(i),this.viewBoxImage=i,t&&("string"==typeof(i=t)?i=e.ownerDocument.querySelectorAll(t):t.querySelector&&(i=[t]),_(this.previews=i,function(e){var t=document.createElement("img");d(e,M,{width:e.offsetWidth,height:e.offsetHeight,html:e.innerHTML}),n&&(t.crossOrigin=n),t.src=r,t.alt=o,t.style.cssText='display:block;width:100%;height:auto;min-width:0!important;min-height:0!important;max-width:none!important;max-height:none!important;image-orientation:0deg!important;"',e.innerHTML="",e.appendChild(t)}))},resetPreview:function(){_(this.previews,function(t){var n=B(t,M),n=(h(t,{width:n.width,height:n.height}),t.innerHTML=n.html,t),t=M;if(i(n[t]))try{delete n[t]}catch(e){n[t]=void 0}else if(n.dataset)try{delete n.dataset[t]}catch(e){n.dataset[t]=void 0}else n.removeAttribute("data-".concat(s(t)))})},preview:function(){var a=this.imageData,e=this.canvasData,t=this.cropBoxData,s=t.width,l=t.height,c=a.width,u=a.height,d=t.left-e.left-a.left,p=t.top-e.top-a.top;this.cropped&&!this.disabled&&(h(this.viewBoxImage,A({width:c,height:u},v(A({translateX:-d,translateY:-p},a)))),_(this.previews,function(e){var t=B(e,M),n=t.width,t=t.height,r=n,o=t,i=1;s&&(o=l*(i=n/s)),l&&t<o&&(r=s*(i=t/l),o=t),h(e,{width:r,height:o}),h(e.getElementsByTagName("img")[0],A({width:c*i,height:u*i},v(A({translateX:-d*i,translateY:-p*i},a))))}))}},ge={bind:function(){var e=this.element,t=this.options,n=this.cropper;c(t.cropstart)&&m(e,k,t.cropstart),c(t.cropmove)&&m(e,I,t.cropmove),c(t.cropend)&&m(e,O,t.cropend),c(t.crop)&&m(e,"crop",t.crop),c(t.zoom)&&m(e,"zoom",t.zoom),m(n,q,this.onCropStart=this.cropStart.bind(this)),t.zoomable&&t.zoomOnWheel&&m(n,"wheel",this.onWheel=this.wheel.bind(this),{passive:!1,capture:!0}),t.toggleDragModeOnDblclick&&m(n,"dblclick",this.onDblclick=this.dblclick.bind(this)),m(e.ownerDocument,Q,this.onCropMove=this.cropMove.bind(this)),m(e.ownerDocument,Y,this.onCropEnd=this.cropEnd.bind(this)),t.responsive&&m(window,"resize",this.onResize=this.resize.bind(this))},unbind:function(){var e=this.element,t=this.options,n=this.cropper;c(t.cropstart)&&l(e,k,t.cropstart),c(t.cropmove)&&l(e,I,t.cropmove),c(t.cropend)&&l(e,O,t.cropend),c(t.crop)&&l(e,"crop",t.crop),c(t.zoom)&&l(e,"zoom",t.zoom),l(n,q,this.onCropStart),t.zoomable&&t.zoomOnWheel&&l(n,"wheel",this.onWheel,{passive:!1,capture:!0}),t.toggleDragModeOnDblclick&&l(n,"dblclick",this.onDblclick),l(e.ownerDocument,Q,this.onCropMove),l(e.ownerDocument,Y,this.onCropEnd),t.responsive&&l(window,"resize",this.onResize)}},ve={resize:function(){var e,t,n,r,o,i,a;this.disabled||(e=this.options,r=this.container,t=this.containerData,n=r.offsetWidth/t.width,r=r.offsetHeight/t.height,1!=(o=Math.abs(n-1)>Math.abs(r-1)?n:r)&&(e.restore&&(i=this.getCanvasData(),a=this.getCropBoxData()),this.render(),e.restore&&(this.setCanvasData(_(i,function(e,t){i[t]=e*o})),this.setCropBoxData(_(a,function(e,t){a[t]=e*o})))))},dblclick:function(){var e,t;this.disabled||"none"===this.options.dragMode||this.setDragMode((e=this.dragBox,t=w,(e.classList?e.classList.contains(t):-1<e.className.indexOf(t))?"move":"crop"))},wheel:function(e){var t=this,n=Number(this.options.wheelZoomRatio)||.1,r=1;this.disabled||(e.preventDefault(),this.wheeling||(this.wheeling=!0,setTimeout(function(){t.wheeling=!1},50),e.deltaY?r=0<e.deltaY?1:-1:e.wheelDelta?r=-e.wheelDelta/120:e.detail&&(r=0<e.detail?1:-1),this.zoom(-r*n,e)))},cropStart:function(e){var t,n=e.buttons,r=e.button;this.disabled||("mousedown"===e.type||"pointerdown"===e.type&&"mouse"===e.pointerType)&&(p(n)&&1!==n||p(r)&&0!==r||e.ctrlKey)||(n=this.options,t=this.pointers,e.changedTouches?_(e.changedTouches,function(e){t[e.identifier]=y(e)}):t[e.pointerId||0]=y(e),r=1<Object.keys(t).length&&n.zoomable&&n.zoomOnTouch?"zoom":B(e.target,L),J.test(r)&&!1!==g(this.element,k,{originalEvent:e,action:r})&&(e.preventDefault(),this.action=r,this.cropping=!1,"crop"===r&&(this.cropping=!0,u(this.dragBox,$))))},cropMove:function(e){var t,n=this.action;!this.disabled&&n&&(t=this.pointers,e.preventDefault(),!1!==g(this.element,I,{originalEvent:e,action:n})&&(e.changedTouches?_(e.changedTouches,function(e){A(t[e.identifier]||{},y(e,!0))}):A(t[e.pointerId||0]||{},y(e,!0)),this.change(e)))},cropEnd:function(e){var t,n;this.disabled||(t=this.action,n=this.pointers,e.changedTouches?_(e.changedTouches,function(e){delete n[e.identifier]}):delete n[e.pointerId||0],t&&(e.preventDefault(),Object.keys(n).length||(this.action=""),this.cropping&&(this.cropping=!1,a(this.dragBox,$,this.cropped&&this.options.modal)),g(this.element,O,{originalEvent:e,action:t})))}},ye={change:function(e){function t(e){switch(e){case"e":g+S.x>C&&(S.x=C-g);break;case"w":p+S.x<y&&(S.x=y-p);break;case"n":f+S.y<x&&(S.y=x-f);break;case"s":v+S.y>b&&(S.y=b-v)}}var n,r,i,o=this.options,a=this.canvasData,s=this.containerData,l=this.cropBoxData,c=this.pointers,u=this.action,d=o.aspectRatio,p=l.left,f=l.top,h=l.width,m=l.height,g=p+h,v=f+m,y=0,x=0,C=s.width,b=s.height,w=!0,$=(!d&&e.shiftKey&&(d=h&&m?h/m:1),this.limited&&(y=l.minLeft,x=l.minTop,C=y+Math.min(s.width,a.width,a.left+a.width),b=x+Math.min(s.height,a.height,a.top+a.height)),c[Object.keys(c)[0]]),S={x:$.endX-$.startX,y:$.endY-$.startY};switch(u){case"all":p+=S.x,f+=S.y;break;case"e":if(0<=S.x&&(C<=g||d&&(f<=x||b<=v))){w=!1;break}t("e"),(h+=S.x)<0&&(u="w",p-=h=-h),d&&(f+=(l.height-(m=h/d))/2);break;case"n":if(S.y<=0&&(f<=x||d&&(p<=y||C<=g))){w=!1;break}t("n"),m-=S.y,f+=S.y,m<0&&(u="s",f-=m=-m),d&&(p+=(l.width-(h=m*d))/2);break;case"w":if(S.x<=0&&(p<=y||d&&(f<=x||b<=v))){w=!1;break}t("w"),h-=S.x,p+=S.x,h<0&&(u="e",p-=h=-h),d&&(f+=(l.height-(m=h/d))/2);break;case"s":if(0<=S.y&&(b<=v||d&&(p<=y||C<=g))){w=!1;break}t("s"),(m+=S.y)<0&&(u="n",f-=m=-m),d&&(p+=(l.width-(h=m*d))/2);break;case"ne":if(d){if(S.y<=0&&(f<=x||C<=g)){w=!1;break}t("n"),m-=S.y,f+=S.y,h=m*d}else t("n"),t("e"),!(0<=S.x)||g<C?h+=S.x:S.y<=0&&f<=x&&(w=!1),(!(S.y<=0)||x<f)&&(m-=S.y,f+=S.y);h<0&&m<0?(u="sw",f-=m=-m,p-=h=-h):h<0?(u="nw",p-=h=-h):m<0&&(u="se",f-=m=-m);break;case"nw":if(d){if(S.y<=0&&(f<=x||p<=y)){w=!1;break}t("n"),m-=S.y,f+=S.y,p+=l.width-(h=m*d)}else t("n"),t("w"),!(S.x<=0)||y<p?(h-=S.x,p+=S.x):S.y<=0&&f<=x&&(w=!1),(!(S.y<=0)||x<f)&&(m-=S.y,f+=S.y);h<0&&m<0?(u="se",f-=m=-m,p-=h=-h):h<0?(u="ne",p-=h=-h):m<0&&(u="sw",f-=m=-m);break;case"sw":if(d){if(S.x<=0&&(p<=y||b<=v)){w=!1;break}t("w"),h-=S.x,p+=S.x,m=h/d}else t("s"),t("w"),!(S.x<=0)||y<p?(h-=S.x,p+=S.x):0<=S.y&&b<=v&&(w=!1),(!(0<=S.y)||v<b)&&(m+=S.y);h<0&&m<0?(u="ne",f-=m=-m,p-=h=-h):h<0?(u="se",p-=h=-h):m<0&&(u="nw",f-=m=-m);break;case"se":if(d){if(0<=S.x&&(C<=g||b<=v)){w=!1;break}t("e"),m=(h+=S.x)/d}else t("s"),t("e"),!(0<=S.x)||g<C?h+=S.x:0<=S.y&&b<=v&&(w=!1),(!(0<=S.y)||v<b)&&(m+=S.y);h<0&&m<0?(u="nw",f-=m=-m,p-=h=-h):h<0?(u="sw",p-=h=-h):m<0&&(u="ne",f-=m=-m);break;case"move":this.move(S.x,S.y),w=!1;break;case"zoom":this.zoom((r=V({},n=c),i=0,_(n,function(o,e){delete r[e],_(r,function(e){var t=Math.abs(o.startX-e.startX),n=Math.abs(o.startY-e.startY),r=Math.abs(o.endX-e.endX),e=Math.abs(o.endY-e.endY),t=Math.sqrt(t*t+n*n),n=(Math.sqrt(r*r+e*e)-t)/t;Math.abs(n)>Math.abs(i)&&(i=n)})}),i),e),w=!1;break;case"crop":if(!S.x||!S.y){w=!1;break}n=Z(this.cropper),p=$.startX-n.left,f=$.startY-n.top,h=l.minWidth,m=l.minHeight,0<S.x?u=0<S.y?"se":"ne":S.x<0&&(p-=h,u=0<S.y?"sw":"nw"),S.y<0&&(f-=m),this.cropped||(E(this.cropBox,j),this.cropped=!0,this.limited&&this.limitCropBox(!0,!0))}w&&(l.width=h,l.height=m,l.left=p,l.top=f,this.action=u,this.renderCropBox()),_(c,function(e){e.startX=e.endX,e.startY=e.endY})}},xe={crop:function(){return!this.ready||this.cropped||this.disabled||(this.cropped=!0,this.limitCropBox(!0,!0),this.options.modal&&u(this.dragBox,$),E(this.cropBox,j),this.setCropBoxData(this.initialCropBoxData)),this},reset:function(){return this.ready&&!this.disabled&&(this.imageData=A({},this.initialImageData),this.canvasData=A({},this.initialCanvasData),this.cropBoxData=A({},this.initialCropBoxData),this.renderCanvas(),this.cropped&&this.renderCropBox()),this},clear:function(){return this.cropped&&!this.disabled&&(A(this.cropBoxData,{left:0,top:0,width:0,height:0}),this.cropped=!1,this.renderCropBox(),this.limitCanvas(!0,!0),this.renderCanvas(),E(this.dragBox,$),u(this.cropBox,j)),this},replace:function(t){var e=1<arguments.length&&void 0!==arguments[1]&&arguments[1];return!this.disabled&&t&&(this.isImg&&(this.element.src=t),e?(this.url=t,this.image.src=t,this.ready&&(this.viewBoxImage.src=t,_(this.previews,function(e){e.getElementsByTagName("img")[0].src=t}))):(this.isImg&&(this.replaced=!0),this.options.data=null,this.uncreate(),this.load(t))),this},enable:function(){return this.ready&&this.disabled&&(this.disabled=!1,E(this.cropper,W)),this},disable:function(){return this.ready&&!this.disabled&&(this.disabled=!0,u(this.cropper,W)),this},destroy:function(){var e=this.element;return e[b]&&(e[b]=void 0,this.isImg&&this.replaced&&(e.src=this.originalUrl),this.uncreate()),this},move:function(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:e,n=this.canvasData,r=n.left,n=n.top;return this.moveTo(o(e)?e:r+Number(e),o(t)?t:n+Number(t))},moveTo:function(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:e,n=this.canvasData,r=!1;return e=Number(e),t=Number(t),this.ready&&!this.disabled&&this.options.movable&&(p(e)&&(n.left=e,r=!0),p(t)&&(n.top=t,r=!0),r&&this.renderCanvas(!0)),this},zoom:function(e,t){var n=this.canvasData;return e=Number(e),this.zoomTo(n.width*(e=e<0?1/(1-e):1+e)/n.naturalWidth,null,t)},zoomTo:function(e,t,n){var r,o,i,a=this.options,s=this.canvasData,l=s.width,c=s.height,u=s.naturalWidth,d=s.naturalHeight;if(0<=(e=Number(e))&&this.ready&&!this.disabled&&a.zoomable){a=u*e,d=d*e;if(!1===g(this.element,"zoom",{ratio:e,oldRatio:l/u,originalEvent:n}))return this;n?(e=this.pointers,u=Z(this.cropper),e=e&&Object.keys(e).length?(i=o=r=0,_(e,function(e){var t=e.startX,e=e.startY;r+=t,o+=e,i+=1}),{pageX:r/=i,pageY:o/=i}):{pageX:n.pageX,pageY:n.pageY},s.left-=(a-l)*((e.pageX-u.left-s.left)/l),s.top-=(d-c)*((e.pageY-u.top-s.top)/c)):f(t)&&p(t.x)&&p(t.y)?(s.left-=(a-l)*((t.x-s.left)/l),s.top-=(d-c)*((t.y-s.top)/c)):(s.left-=(a-l)/2,s.top-=(d-c)/2),s.width=a,s.height=d,this.renderCanvas(!0)}return this},rotate:function(e){return this.rotateTo((this.imageData.rotate||0)+Number(e))},rotateTo:function(e){return p(e=Number(e))&&this.ready&&!this.disabled&&this.options.rotatable&&(this.imageData.rotate=e%360,this.renderCanvas(!0,!0)),this},scaleX:function(e){var t=this.imageData.scaleY;return this.scale(e,p(t)?t:1)},scaleY:function(e){var t=this.imageData.scaleX;return this.scale(p(t)?t:1,e)},scale:function(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:e,n=this.imageData,r=!1;return e=Number(e),t=Number(t),this.ready&&!this.disabled&&this.options.scalable&&(p(e)&&(n.scaleX=e,r=!0),p(t)&&(n.scaleY=t,r=!0),r&&this.renderCanvas(!0,!0)),this},getData:function(){var n,r,e=0<arguments.length&&void 0!==arguments[0]&&arguments[0],t=this.options,o=this.imageData,i=this.canvasData,a=this.cropBoxData;return this.ready&&this.cropped?(n={x:a.left-i.left,y:a.top-i.top,width:a.width,height:a.height},r=o.width/o.naturalWidth,_(n,function(e,t){n[t]=e/r}),e&&(i=Math.round(n.y+n.height),a=Math.round(n.x+n.width),n.x=Math.round(n.x),n.y=Math.round(n.y),n.width=a-n.x,n.height=i-n.y)):n={x:0,y:0,width:0,height:0},t.rotatable&&(n.rotate=o.rotate||0),t.scalable&&(n.scaleX=o.scaleX||1,n.scaleY=o.scaleY||1),n},setData:function(e){var t,n=this.options,r=this.imageData,o=this.canvasData,i={};return this.ready&&!this.disabled&&f(e)&&(t=!1,n.rotatable&&p(e.rotate)&&e.rotate!==r.rotate&&(r.rotate=e.rotate,t=!0),n.scalable&&(p(e.scaleX)&&e.scaleX!==r.scaleX&&(r.scaleX=e.scaleX,t=!0),p(e.scaleY)&&e.scaleY!==r.scaleY&&(r.scaleY=e.scaleY,t=!0)),t&&this.renderCanvas(!0,!0),n=r.width/r.naturalWidth,p(e.x)&&(i.left=e.x*n+o.left),p(e.y)&&(i.top=e.y*n+o.top),p(e.width)&&(i.width=e.width*n),p(e.height)&&(i.height=e.height*n),this.setCropBoxData(i)),this},getContainerData:function(){return this.ready?A({},this.containerData):{}},getImageData:function(){return this.sized?A({},this.imageData):{}},getCanvasData:function(){var t=this.canvasData,n={};return this.ready&&_(["left","top","width","height","naturalWidth","naturalHeight"],function(e){n[e]=t[e]}),n},setCanvasData:function(e){var t=this.canvasData,n=t.aspectRatio;return this.ready&&!this.disabled&&f(e)&&(p(e.left)&&(t.left=e.left),p(e.top)&&(t.top=e.top),p(e.width)?(t.width=e.width,t.height=e.width/n):p(e.height)&&(t.height=e.height,t.width=e.height*n),this.renderCanvas(!0)),this},getCropBoxData:function(){var e,t=this.cropBoxData;return(e=this.ready&&this.cropped?{left:t.left,top:t.top,width:t.width,height:t.height}:e)||{}},setCropBoxData:function(e){var t,n,r=this.cropBoxData,o=this.options.aspectRatio;return this.ready&&this.cropped&&!this.disabled&&f(e)&&(p(e.left)&&(r.left=e.left),p(e.top)&&(r.top=e.top),p(e.width)&&e.width!==r.width&&(t=!0,r.width=e.width),p(e.height)&&e.height!==r.height&&(n=!0,r.height=e.height),o&&(t?r.height=r.width/o:n&&(r.width=r.height*o)),this.renderCropBox()),this},getCroppedCanvas:function(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};if(!this.ready||!window.HTMLCanvasElement)return null;var t=this.canvasData,n=(S=this.image,b=this.imageData,p=t,c=e,_=b.aspectRatio,u=b.naturalWidth,f=b.naturalHeight,x=void 0===(x=b.rotate)?0:x,C=void 0===(C=b.scaleX)?1:C,b=void 0===(b=b.scaleY)?1:b,d=p.aspectRatio,v=p.naturalWidth,p=p.naturalHeight,g=void 0===(g=c.fillColor)?"transparent":g,w=void 0===(w=c.imageSmoothingEnabled)||w,$=void 0===($=c.imageSmoothingQuality)?"low":$,h=void 0===(h=c.maxWidth)?1/0:h,m=void 0===(m=c.maxHeight)?1/0:m,n=void 0===(n=c.minWidth)?0:n,c=void 0===(c=c.minHeight)?0:c,j=document.createElement("canvas"),E=j.getContext("2d"),y=R({aspectRatio:d,width:h,height:m}),d=R({aspectRatio:d,width:n,height:c},"cover"),v=Math.min(y.width,Math.max(d.width,v)),y=Math.min(y.height,Math.max(d.height,p)),d=R({aspectRatio:_,width:h,height:m}),p=R({aspectRatio:_,width:n,height:c},"cover"),h=Math.min(d.width,Math.max(p.width,u)),m=Math.min(d.height,Math.max(p.height,f)),_=[-h/2,-m/2,h,m],j.width=T(v),j.height=T(y),E.fillStyle=g,E.fillRect(0,0,v,y),E.save(),E.translate(v/2,y/2),E.rotate(x*Math.PI/180),E.scale(C,b),E.imageSmoothingEnabled=w,E.imageSmoothingQuality=$,E.drawImage.apply(E,[S].concat(D(_.map(function(e){return Math.floor(T(e))})))),E.restore(),j);if(!this.cropped)return n;var r,o,i,a,s,l,c=this.getData(),u=c.x,d=c.y,p=c.width,f=c.height,h=n.width/Math.floor(t.naturalWidth),m=(1!=h&&(u*=h,d*=h,p*=h,f*=h),p/f),g=R({aspectRatio:m,width:e.maxWidth||1/0,height:e.maxHeight||1/0}),v=R({aspectRatio:m,width:e.minWidth||0,height:e.minHeight||0},"cover"),y=R({aspectRatio:m,width:e.width||(1!=h?n.width:p),height:e.height||(1!=h?n.height:f)}),x=y.width,C=y.height,x=Math.min(g.width,Math.max(v.width,x)),C=Math.min(g.height,Math.max(v.height,C)),b=document.createElement("canvas"),w=b.getContext("2d"),$=(b.width=T(x),b.height=T(C),w.fillStyle=e.fillColor||"transparent",w.fillRect(0,0,x,C),e.imageSmoothingEnabled),S=e.imageSmoothingQuality,_=(w.imageSmoothingEnabled=void 0===$||$,S&&(w.imageSmoothingQuality=S),n.width),E=n.height,j=u,c=d,t=(j<=-p||_<j?s=i=r=j=0:j<=0?(i=-j,j=0,s=r=Math.min(_,p+j)):j<=_&&(i=0,s=r=Math.min(p,_-j)),r<=0||c<=-f||E<c?l=a=o=c=0:c<=0?(a=-c,c=0,l=o=Math.min(E,f+c)):c<=E&&(a=0,l=o=Math.min(f,E-c)),[j,c,r,o]);return 0<s&&0<l&&t.push(i*(m=x/p),a*m,s*m,l*m),w.drawImage.apply(w,[n].concat(D(t.map(function(e){return Math.floor(T(e))})))),b},setAspectRatio:function(e){var t=this.options;return this.disabled||o(e)||(t.aspectRatio=Math.max(0,e)||NaN,this.ready&&(this.initCropBox(),this.cropped&&this.renderCropBox())),this},setDragMode:function(e){var t,n,r=this.options,o=this.dragBox,i=this.face;return this.ready&&!this.disabled&&(n=r.movable&&"move"===e,r.dragMode=e=(t="crop"===e)||n?e:"none",d(o,L,e),a(o,w,t),a(o,S,n),r.cropBoxMovable||(d(i,L,e),a(i,w,t),a(i,S,n))),this}},Ce=C.Cropper,be=function(){function o(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{},n=this,r=o;if(!(n instanceof r))throw new TypeError("Cannot call a class as a function");if(!e||!ne.test(e.tagName))throw new Error("The first argument is required and must be an <img> or <canvas> element.");this.element=e,this.options=A({},re,f(t)&&t),this.cropped=!1,this.disabled=!1,this.pointers={},this.ready=!1,this.reloading=!1,this.replaced=!1,this.sized=!1,this.sizing=!1,this.init()}var e=o,t=[{key:"init",value:function(){var e,t=this.element,n=t.tagName.toLowerCase();if(!t[b]){if(t[b]=this,"img"===n){if(this.isImg=!0,e=t.getAttribute("src")||"",!(this.originalUrl=e))return;e=t.src}else"canvas"===n&&window.HTMLCanvasElement&&(e=t.toDataURL());this.load(e)}}},{key:"load",value:function(e){var t,n,r,o,i,a,s=this;e&&(this.url=e,this.imageData={},t=this.element,(n=this.options).rotatable||n.scalable||(n.checkOrientation=!1),n.checkOrientation&&window.ArrayBuffer?ee.test(e)?te.test(e)?this.read((a=(a=e).replace(me,""),r=atob(a),a=new ArrayBuffer(r.length),_(o=new Uint8Array(a),function(e,t){o[t]=r.charCodeAt(t)}),a)):this.clone():(i=new XMLHttpRequest,a=this.clone.bind(this),this.reloading=!0,(this.xhr=i).onabort=a,i.onerror=a,i.ontimeout=a,i.onprogress=function(){i.getResponseHeader("content-type")!==X&&i.abort()},i.onload=function(){s.read(i.response)},i.onloadend=function(){s.reloading=!1,s.xhr=null},n.checkCrossOrigin&&U(e)&&t.crossOrigin&&(e=z(e)),i.open("GET",e,!0),i.responseType="arraybuffer",i.withCredentials="use-credentials"===t.crossOrigin,i.send()):this.clone())}},{key:"read",value:function(e){var t=this.options,n=this.imageData,r=function(e){var t,n,r,o,i,a,s=new DataView(e);try{if(255===s.getUint8(0)&&216===s.getUint8(1))for(var l=s.byteLength,c=2;c+1<l;){if(255===s.getUint8(c)&&225===s.getUint8(c+1)){r=c;break}c+=1}var u,d,p;if(r&&(u=r+10,"Exif"===function(e,t,n){var r="";n+=t;for(var o=t;o<n;o+=1)r+=he(e.getUint8(o));return r}(s,r+4,4)&&(d=s.getUint16(u),!(n=18761===d)&&19789!==d||42===s.getUint16(u+2,n)&&8<=(p=s.getUint32(u+4,n))&&(o=u+p))),o){var f=s.getUint16(o,n);for(a=0;a<f;a+=1)if(i=o+12*a+2,274===s.getUint16(i,n)){i+=8,t=s.getUint16(i,n),s.setUint16(i,1,n);break}}}catch(e){t=1}return t}(e),o=0,i=1,a=1;1<r&&(this.url=function(e,t){var n=[],r=new Uint8Array(e);for(;0<r.length;)n.push(he.apply(null,F(r.subarray(0,8192)))),r=r.subarray(8192);return"data:".concat(t,";base64,").concat(btoa(n.join("")))}(e,X),o=(e=function(e){var t=0,n=1,r=1;switch(e){case 2:n=-1;break;case 3:t=-180;break;case 4:r=-1;break;case 5:t=90,r=-1;break;case 6:t=90;break;case 7:t=90,n=-1;break;case 8:t=-90}return{rotate:t,scaleX:n,scaleY:r}}(r)).rotate,i=e.scaleX,a=e.scaleY),t.rotatable&&(n.rotate=o),t.scalable&&(n.scaleX=i,n.scaleY=a),this.clone()}},{key:"clone",value:function(){var e=this.element,t=this.url,n=e.crossOrigin,r=t,o=(this.options.checkCrossOrigin&&U(t)&&(n=n||"anonymous",r=z(t)),this.crossOrigin=n,this.crossOriginUrl=r,document.createElement("img"));n&&(o.crossOrigin=n),o.src=r||t,o.alt=e.alt||"The image to crop",(this.image=o).onload=this.start.bind(this),o.onerror=this.stop.bind(this),u(o,G),e.parentNode.insertBefore(o,e.nextSibling)}},{key:"start",value:function(){function e(e,t){A(r.imageData,{naturalWidth:e,naturalHeight:t,aspectRatio:e/t}),r.initialImageData=A({},r.imageData),r.sizing=!1,r.sized=!0,r.build()}var t,n,r=this,o=this.image,i=(o.onload=null,o.onerror=null,this.sizing=!0,C.navigator&&/(?:iPad|iPhone|iPod).*?AppleWebKit/i.test(C.navigator.userAgent));o.naturalWidth&&!i?e(o.naturalWidth,o.naturalHeight):(t=document.createElement("img"),n=document.body||document.documentElement,(this.sizingImage=t).onload=function(){e(t.width,t.height),i||n.removeChild(t)},t.src=o.src,i||(t.style.cssText="left:0;max-height:none!important;max-width:none!important;min-height:0!important;min-width:0!important;opacity:0;position:absolute;top:0;z-index:-1;",n.appendChild(t)))}},{key:"stop",value:function(){var e=this.image;e.onload=null,e.onerror=null,e.parentNode.removeChild(e),this.image=null}},{key:"build",value:function(){var e,t,n,r,o,i,a,s,l;this.sized&&!this.ready&&(e=this.element,t=this.options,n=this.image,r=e.parentNode,(o=document.createElement("div")).innerHTML='<div class="cropper-container" touch-action="none"><div class="cropper-wrap-box"><div class="cropper-canvas"></div></div><div class="cropper-drag-box"></div><div class="cropper-crop-box"><span class="cropper-view-box"></span><span class="cropper-dashed dashed-h"></span><span class="cropper-dashed dashed-v"></span><span class="cropper-center"></span><span class="cropper-face"></span><span class="cropper-line line-e" data-cropper-action="e"></span><span class="cropper-line line-n" data-cropper-action="n"></span><span class="cropper-line line-w" data-cropper-action="w"></span><span class="cropper-line line-s" data-cropper-action="s"></span><span class="cropper-point point-e" data-cropper-action="e"></span><span class="cropper-point point-n" data-cropper-action="n"></span><span class="cropper-point point-w" data-cropper-action="w"></span><span class="cropper-point point-s" data-cropper-action="s"></span><span class="cropper-point point-ne" data-cropper-action="ne"></span><span class="cropper-point point-nw" data-cropper-action="nw"></span><span class="cropper-point point-sw" data-cropper-action="sw"></span><span class="cropper-point point-se" data-cropper-action="se"></span></div></div>',i=(o=o.querySelector(".".concat(b,"-container"))).querySelector(".".concat(b,"-canvas")),a=o.querySelector(".".concat(b,"-drag-box")),l=(s=o.querySelector(".".concat(b,"-crop-box"))).querySelector(".".concat(b,"-face")),this.container=r,this.cropper=o,this.canvas=i,this.dragBox=a,this.cropBox=s,this.viewBox=o.querySelector(".".concat(b,"-view-box")),this.face=l,i.appendChild(n),u(e,j),r.insertBefore(o,e.nextSibling),this.isImg||E(n,G),this.initPreview(),this.bind(),t.initialAspectRatio=Math.max(0,t.initialAspectRatio)||NaN,t.aspectRatio=Math.max(0,t.aspectRatio)||NaN,t.viewMode=Math.max(0,Math.min(3,Math.round(t.viewMode)))||0,u(s,j),t.guides||u(s.getElementsByClassName("".concat(b,"-dashed")),j),t.center||u(s.getElementsByClassName("".concat(b,"-center")),j),t.background&&u(o,"".concat(b,"-bg")),t.highlight||u(l,K),t.cropBoxMovable&&(u(l,S),d(l,L,"all")),t.cropBoxResizable||(u(s.getElementsByClassName("".concat(b,"-line")),j),u(s.getElementsByClassName("".concat(b,"-point")),j)),this.render(),this.ready=!0,this.setDragMode(t.dragMode),t.autoCrop&&this.crop(),this.setData(t.data),c(t.ready)&&m(e,"ready",t.ready,{once:!0}),g(e,"ready"))}},{key:"unbuild",value:function(){this.ready&&(this.ready=!1,this.unbind(),this.resetPreview(),this.cropper.parentNode.removeChild(this.cropper),E(this.element,j))}},{key:"uncreate",value:function(){this.ready?(this.unbuild(),this.ready=!1,this.cropped=!1):this.sizing?(this.sizingImage.onload=null,this.sizing=!1,this.sized=!1):this.reloading?(this.xhr.onabort=null,this.xhr.abort()):this.image&&this.stop()}}],n=[{key:"noConflict",value:function(){return window.Cropper=Ce,o}},{key:"setDefaults",value:function(e){A(re,f(e)&&e)}}];return t&&H(e.prototype,t),n&&H(e,n),o}(),A(be.prototype,e,n,ge,ve,ye,xe),be)}(),cropper.exports),__assign=function(){return(__assign=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};function __rest(e,t){var n={};for(o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var r=0,o=Object.getOwnPropertySymbols(e);r<o.length;r++)t.indexOf(o[r])<0&&Object.prototype.propertyIsEnumerable.call(e,o[r])&&(n[o[r]]=e[o[r]]);return n}var AuthStatus,applyDefaultOptions=function(e,t){var n=(t=void 0===t?{}:t).enable,r=t.scaleX,r=void 0===r?1:r,o=t.scaleY,o=void 0===o?1:o,i=t.zoomTo,i=void 0===i?0:i,t=t.rotateTo;void 0===n||n?e.enable():e.disable(),e.scaleX(r),e.scaleY(o),void 0!==t&&e.rotateTo(t),0<i&&e.zoomTo(i)},useCombinedRefs=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=react.exports.useRef(null);return React$1.useEffect(function(){e.forEach(function(e){e&&("function"==typeof e?e(n.current):e.current=n.current)})},[e]),n},ReactCropper=React$1.forwardRef(function(e,t){var e=__rest(e,[]),n=e.dragMode,r=void 0===n?"crop":n,o=e.src,n=e.style,i=e.className,a=e.crossOrigin,s=e.scaleX,l=e.scaleY,c=e.enable,u=e.zoomTo,d=e.rotateTo,p=e.alt,p=void 0===p?"picture":p,f=e.ready,h=e.onInitialized,m=__rest(e,["dragMode","src","style","className","crossOrigin","scaleX","scaleY","enable","zoomTo","rotateTo","alt","ready","onInitialized"]),g={scaleY:l,scaleX:s,enable:c,zoomTo:u,rotateTo:d},l=react.exports.useRef(null),v=useCombinedRefs(t,l);return react.exports.useEffect(function(){var e;null!=(e=v.current)&&e.cropper&&"number"==typeof u&&v.current.cropper.zoomTo(u)},[e.zoomTo]),react.exports.useEffect(function(){var e;null!=(e=v.current)&&e.cropper&&void 0!==o&&v.current.cropper.reset().clear().replace(o)},[o]),react.exports.useEffect(function(){var e;return null!==v.current&&(e=new Cropper(v.current,__assign(__assign({dragMode:r},m),{ready:function(e){null!==e.currentTarget&&applyDefaultOptions(e.currentTarget.cropper,g),f&&f(e)}})),h&&h(e)),function(){var e;null!=(e=null==(e=v.current)?void 0:e.cropper)&&e.destroy()}},[v]),React$1.createElement("div",{style:n,className:i},React$1.createElement("img",{crossOrigin:a,src:o,alt:p,style:{opacity:0,maxWidth:"100%"},ref:v}))});!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 namespace$3="users",userSelector=e=>{return null==(e=null==e?void 0:e.aiWareHeaderBarPanel)?void 0:e[namespace$3]},userAuthStatusSelector=e=>{return null==(e=null==(e=null==e?void 0:e.aiWareHeaderBarPanel)?void 0:e[namespace$3])?void 0:e.authStatus},GET_CURRENT_USER=`os-app-bar-panel/${namespace$3}/get current user`,GET_CURRENT_USER_SUCCESS=`os-app-bar-panel/${namespace$3}/get current user success`,RESET_BIOMETRIC=`os-app-bar-panel/${namespace$3}/reset biometric`,RESET_PASSWORD=`os-app-bar-panel/${namespace$3}/reset password`,RESET_PASSWORD_FAIL=`os-app-bar-panel/${namespace$3}/reset password fail`,UPDATE_PROFILE=`os-app-bar-panel/${namespace$3}/update profile`,UPDATE_PROFILE_FAIL=`os-app-bar-panel/${namespace$3}/update profile fail`,UPLOAD__AVATAR=`os-app-bar-panel/${namespace$3}/upload avatar`,UPDATE__AVATAR=`os-app-bar-panel/${namespace$3}/update avatar`,LOGOUT_USER=`os-app-bar-panel/${namespace$3}/logout`,LOGOUT_SUCCESS=`os-app-bar-panel/${namespace$3}/logout success`,LOGOUT_FAIL=`os-app-bar-panel/${namespace$3}/logout fail`,UPLOADING_AVATAR=`os-app-bar-panel/${namespace$3}/uploading`;function getCurrentUser(){return{type:GET_CURRENT_USER}}function getCurrentUserSuccess(e){return{type:GET_CURRENT_USER_SUCCESS,payload:e}}function resetBiometric(){return{type:RESET_BIOMETRIC}}function resetPassword(e){return{type:RESET_PASSWORD,payload:e}}function resetPasswordFail(){return{type:RESET_PASSWORD_FAIL}}function updateProfile(e){return{type:UPDATE_PROFILE,payload:e}}function updateProfileFail(){return{type:UPDATE_PROFILE_FAIL}}function uploadAvatar(e){return{type:UPLOAD__AVATAR,payload:e}}function updateAvatar(e){return{type:UPDATE__AVATAR,payload:e}}function logoutUserSuccess(){return{type:LOGOUT_SUCCESS}}function logoutUserFail(){return{type:LOGOUT_FAIL}}function uploadingAvatar(e){return{type:UPLOADING_AVATAR,payload:e}}!function(e){e.AUTHENTICATED="authenticated",e.LOGGING_OUT="logging_out",e.LOGGED_OUT="logged_out"}(AuthStatus=AuthStatus||{});const initialState$3={currentUser:{},status:"idle",authStatus:AuthStatus.AUTHENTICATED};function userReducer(e,t){return void 0===e?initialState$3:t.type===GET_CURRENT_USER_SUCCESS?Object.assign(Object.assign({},e),{currentUser:t.payload,status:"success"}):t.type===UPLOADING_AVATAR?Object.assign(Object.assign({},e),{loading:t.payload}):t.type===LOGOUT_USER?Object.assign(Object.assign({},e),{authStatus:AuthStatus.LOGGING_OUT}):t.type===LOGOUT_SUCCESS?Object.assign(Object.assign({},e),{authStatus:AuthStatus.LOGGED_OUT}):t.type===LOGOUT_FAIL?Object.assign(Object.assign({},e),{authStatus:AuthStatus.AUTHENTICATED}):e}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={},o=Object.keys(e),i=0;i<o.length;i++)n=o[i],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 o,e=new Date(e),i={hour12:!1,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"},r=(r&&(i.timeZone=r),Object.assign({timeZoneName:t},i)),t=hasIntl();return t&&hasFormatToParts()?(o=new Intl.DateTimeFormat(n,r).formatToParts(e).find(function(e){return"timezonename"===e.type.toLowerCase()}))?o.value:null:t?(o=new Intl.DateTimeFormat(n,i).format(e),new Intl.DateTimeFormat(n,r).format(e).substring(o.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,o,i={};for(r in e)!hasOwnProperty(e,r)||0<=n.indexOf(r)||null!=(o=e[r])&&(i[t(r)]=asNumber(o));return i}function formatOffset(e,t){var n=Math.trunc(Math.abs(e/60)),r=Math.trunc(Math.abs(e%60)),o=0<=e?"+":"-";switch(t){case"short":return o+padStart(n,2)+":"+padStart(r,2);case"narrow":return o+n+(0<r?":"+r:"");case"techie":return o+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 o={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."]},i=-1===["hours","minutes","seconds"].indexOf(e);if("auto"===n&&i){var a="days"===e;switch(t){case 1:return a?"tomorrow":"next "+o[e][0];case-1:return a?"yesterday":"last "+o[e][0];case 0:return a?"today":"this "+o[e][0]}}var n=Object.is(t,-0)||t<0,i=Math.abs(t),t=1===i,s=o[e],r=r?!t&&s[2]||s[1]:t?o[e][0]:e;return n?i+" "+r+" ago":"in "+i+" "+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);!(o=r()).done;){var o=o.value;o.literal?n+=o.val:n+=t(o.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 p(e,t){this.opts=t,this.loc=e,this.systemLoc=null}p.create=function(e,t){return new p(e,t=void 0===t?{}:t)},p.parseFormat=function(e){for(var t=null,n="",r=!1,o=[],i=0;i<e.length;i++){var a=e.charAt(i);"'"===a?(0<n.length&&o.push({literal:r,val:n}),t=null,n="",r=!r):r||a===t?n+=a:(0<n.length&&o.push({literal:!1,val:n}),t=n=a)}return 0<n.length&&o.push({literal:r,val:n}),o},p.macroTokenToFormatOpts=function(e){return _macroTokenToFormatOpts[e]};var e=p.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,o="en"===this.loc.listingMode(),t=this.loc.outputCalendar&&"gregory"!==this.loc.outputCalendar&&hasFormatToParts(),i=function(e,t){return r.loc.extract(n,e,t)},a=function(e){return n.isOffsetFixed&&0===n.offset&&e.allowZ?"Z":n.isValid?n.zone.formatOffset(n.ts,e.format):""},s=function(){return o?meridiemForDateTime(n):i({hour:"numeric",hour12:!0},"dayperiod")},l=function(e,t){return o?monthForDateTime(n,e):i(t?{month:e}:{month:e,day:"numeric"},"month")},c=function(e,t){return o?weekdayForDateTime(n,e):i(t?{weekday:e}:{weekday:e,month:"long",day:"numeric"},"weekday")},u=function(e){var t=p.macroTokenToFormatOpts(e);return t?r.formatWithSystemDefault(n,t):e},d=function(e){return o?eraForDateTime(n,e):i({era:e},"era")};return stringifyTokens(p.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 a({format:"narrow",allowZ:r.opts.allowZ});case"ZZ":return a({format:"short",allowZ:r.opts.allowZ});case"ZZZ":return a({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 s();case"d":return t?i({day:"numeric"},"day"):r.num(n.day);case"dd":return t?i({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?i({month:"numeric",day:"numeric"},"month"):r.num(n.month);case"LL":return t?i({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?i({month:"numeric"},"month"):r.num(n.month);case"MM":return t?i({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?i({year:"numeric"},"year"):r.num(n.year);case"yy":return t?i({year:"2-digit"},"year"):r.num(n.year.toString().slice(-2),2);case"yyyy":return t?i({year:"numeric"},"year"):r.num(n.year,4);case"yyyyyy":return t?i({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,o=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=p.parseFormat(t),i=t.reduce(function(e,t){var n=t.literal,t=t.val;return n?e:e.concat(t)},[]),e=e.shiftTo.apply(e,i.map(o).filter(function(e){return e}));return stringifyTokens(t,(n=e,function(e){var t=o(e);return t?r.num(n.get(t),e.length):e}))},p}(),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=[],o=0;o<n.length;o++){var i=n[o],a=i.type,i=i.value,a=typeToPos[a];isUndefined(a)||(r[a]=parseInt(i,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],o=t[2],i=t[3],e=+e,a=e%1e3;return(objToLocalTS({year:n,month:r,day:o,hour:24===i?0:i,minute:t[4],second:t[5],millisecond:0})-(e-=0<=a?a:1e3+a))/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$1=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$1},set:function(e){defaultLocale$1=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,o){e=e.listingMode(n);return"error"===e?null:("en"===e?r:o)(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,o,i;this.opts=n,this.hasIntl=hasIntl(),e.zone.universal&&this.hasIntl?(o=e.offset/60*-1,i=IANAZone.isValidZone(o=0<=o?"Etc/GMT+"+o:"Etc/GMT"+o),0!==e.offset&&i?(r=o,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&&(i=Object.assign({},this.opts),r&&(i.timeZone=r),this.dtf=getCachedDTF(t,i))}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 o(e,t,n,r){var e=parseLocaleString(e),o=e[0],i=e[1],e=e[2];this.locale=o,this.numberingSystem=t||i||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}o.fromOpts=function(e){return o.create(e.locale,e.numberingSystem,e.outputCalendar,e.defaultToEN)},o.create=function(e,t,n,r){void 0===r&&(r=!1);e=e||Settings.defaultLocale;return new o(e||(r?"en-US":systemLocale()),t||Settings.defaultNumberingSystem,n||Settings.defaultOutputCalendar,e)},o.resetCache=function(){sysLocaleCache=null,intlDTCache={},intlNumCache={},intlRelCache={}},o.fromObject=function(e){var e=void 0===e?{}:e,t=e.locale,n=e.numberingSystem,e=e.outputCalendar;return o.create(t,n,e)};var e=o.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?o.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 o=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 o.monthsCache[e][n]||(o.monthsCache[e][n]=mapMonths(function(e){return o.extract(e,t,"month")})),o.monthsCache[e][n]})},e.weekdays=function(n,r,e){var o=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 o.weekdaysCache[e][n]||(o.weekdaysCache[e][n]=mapWeekdays(function(e){return o.extract(e,t,"weekday")})),o.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(o,[{key:"fastNumbers",get:function(){return null==this.fastNumbersCached&&(this.fastNumbersCached=supportsFastNumbers(this)),this.fastNumbersCached}}]),o}();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(i){return t.reduce(function(e,t){var n=e[0],r=e[1],e=e[2],t=t(i,e),e=t[0],o=t[1],t=t[2];return[Object.assign(n,e),r||o,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 o=0,i=n;o<i.length;o++){var a=i[o],s=a[0],a=a[1],s=s.exec(e);if(s)return a(s)}return[null,null]}function simpleParse(){for(var e=arguments.length,o=new Array(e),t=0;t<e;t++)o[t]=arguments[t];return function(e,t){for(var n={},r=0;r<o.length;r++)n[o[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],o=e[2],i=e[3],a=e[4],s=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(o)),weeks:t(parseInteger(i)),days:t(parseInteger(a)),hours:t(parseInteger(s)),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,o,i,a){t={year:2===t.length?untruncateYear(parseInteger(t)):parseInteger(t),month:monthsShort.indexOf(n)+1,day:parseInteger(r),hour:parseInteger(o),minute:parseInteger(i)};return a&&(t.second=parseInteger(a)),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],o=e[4],i=e[5],a=e[6],s=e[7],l=e[8],c=e[9],u=e[10],e=e[11],t=fromStrings(t,o,r,n,i,a,s),o=l?obsOffsets[l]:c?0:signedOffset(u,e);return[t,new FixedOffsetZone(o)]}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],o=e[4],i=e[5],a=e[6];return[fromStrings(t,e[7],n,r,o,i,a),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,o){var e=e[o][n],i=t[n]/e,i=!(Math.sign(i)===Math.sign(r[o]))&&0!==r[o]&&Math.abs(i)<=1?antiTrunc(i):Math.trunc(i);r[o]+=i,t[n]-=i*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 h(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}h.fromMillis=function(e,t){return h.fromObject(Object.assign({milliseconds:e},t))},h.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 h({values:normalizeObject(e,h.normalizeUnit,["locale","numberingSystem","conversionAccuracy","zone"]),loc:Locale.fromObject(e),conversionAccuracy:e.conversionAccuracy})},h.fromISO=function(e,t){var n=parseISODuration(e)[0];return n?(n=Object.assign(n,t),h.fromObject(n)):h.invalid("unparsable",'the input "'+e+"\" can't be parsed as ISO 8601")},h.fromISOTime=function(e,t){var n=parseISOTimeOnly(e)[0];return n?(n=Object.assign(n,t),h.fromObject(n)):h.invalid("unparsable",'the input "'+e+"\" can't be parsed as ISO 8601")},h.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 h({invalid:e})},h.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)},h.isDuration=function(e){return e&&e.isLuxonDuration||!1};var e=h.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);!(o=r()).done;){var o=o.value;(hasOwnProperty(t.values,o)||hasOwnProperty(this.values,o))&&(n[o]=t.get(o)+this.get(o))}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 o=r[n];t[o]=asNumber(e(this.values[o],o))}return clone(this,{values:t},!0)},e.get=function(e){return this[h.normalizeUnit(e)]},e.set=function(e){return this.isValid?clone(this,{values:Object.assign(this.values,normalizeObject(e,h.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 h.normalizeUnit(e)}),o={},i={},a=this.toObject(),s=_createForOfIteratorHelperLoose(orderedUnits);!(f=s()).done;){var l=f.value;if(0<=t.indexOf(l)){var c,u=l,d=0;for(c in i)d+=this.matrix[c][l]*i[c],i[c]=0;isNumber(a[l])&&(d+=a[l]);var p,f=Math.trunc(d);for(p in o[l]=f,i[l]=d-f,a)orderedUnits.indexOf(p)>orderedUnits.indexOf(l)&&convert(this.matrix,a,p,o,l)}else isNumber(a[l])&&(i[l]=a[l])}for(r in i)0!==i[r]&&(o[u]+=r===u?i[r]:i[r]/this.matrix[u][r]);return clone(this,{values:o},!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(h,[{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}}]),h}();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,o,i=(e||"").split("/",2),a=i[0],s=i[1];if(a&&s){try{l=(n=DateTime.fromISO(a,t)).isValid}catch(s){l=!1}try{o=(r=DateTime.fromISO(s,t)).isValid}catch(s){o=!1}if(l&&o)return c.fromDateTimes(n,r);if(l){i=Duration.fromISO(s,t);if(i.isValid)return c.after(n,i)}else if(o){var l=Duration.fromISO(a,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 o=n.map(friendlyDateTime).filter(function(e){return t.contains(e)}).sort(),i=[],a=this.s,s=0;a<this.e;){var l=o[s]||this.e,l=+l>+this.e?this.e:l;i.push(c.fromDateTimes(a,l)),a=l,s+=1}return i},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,o=[];n<this.e;){var i=this.start.plus(t.mapUnits(function(e){return e*r})),i=+i>+this.e?this.e:i;o.push(c.fromDateTimes(n,i)),n=i,r+=1}return o},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,o=[],e=e.map(function(e){return[{time:e.s,type:"s"},{time:e.e,type:"e"}]}),i=_createForOfIteratorHelperLoose((t=Array.prototype).concat.apply(t,e).sort(function(e,t){return e.time-t.time}));!(a=i()).done;)var a=a.value,n=1===(r+="s"===a.type?1:-1)?a.time:(n&&+n!=+a.time&&o.push(c.fromDateTimes(n,a.time)),null);return c.merge(o)},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,o=t.locObj,o=void 0===o?null:o,t=t.outputCalendar;return(o||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,o=t.locObj,o=void 0===o?null:o,t=t.outputCalendar;return(o||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={},o=0,i=[["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]];o<i.length;o++){var a,s,l,c=i[o],u=c[0],c=c[1];0<=n.indexOf(u)&&(a=u,c=c(e,t),t<(l=e.plus(((s={})[u]=c,s)))?(e=e.plus(((s={})[u]=c-1,s)),--c):e=l,r[u]=c)}return[e,r,l,a]}function _diff(e,t,n,r){var e=highOrderDiffs(e,t,n),o=e[0],i=e[1],a=e[2],e=e[3],s=t-o,n=n.filter(function(e){return 0<=["hours","minutes","seconds","milliseconds"].indexOf(e)}),t=(0===n.length&&(a=a<t?o.plus(((t={})[e]=1,t)):a)!==o&&(i[e]=(i[e]||0)+s/(a-o)),Duration.fromObject(Object.assign(i,r)));return 0<n.length?(e=Duration.fromMillis(s,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 o in numberingSystemsUTF16){var o=numberingSystemsUTF16[o],i=o[0],o=o[1];i<=r&&r<=o&&(t+=r-i)}}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 o=digitRegex(n),i=digitRegex(n,"{2}"),a=digitRegex(n,"{3}"),s=digitRegex(n,"{4}"),l=digitRegex(n,"{6}"),c=digitRegex(n,"{1,2}"),u=digitRegex(n,"{1,3}"),d=digitRegex(n,"{1,6}"),p=digitRegex(n,"{1,9}"),f=digitRegex(n,"{2,4}"),h=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(f,untruncateYear);case"yyyy":return intUnit(s);case"yyyyy":return intUnit(h);case"yyyyyy":return intUnit(l);case"M":return intUnit(c);case"MM":return intUnit(i);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(i);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(i);case"o":return intUnit(u);case"ooo":return intUnit(a);case"HH":return intUnit(i);case"H":return intUnit(c);case"hh":return intUnit(i);case"h":return intUnit(c);case"mm":return intUnit(i);case"m":case"q":return intUnit(c);case"qq":return intUnit(i);case"s":return intUnit(c);case"ss":return intUnit(i);case"S":return intUnit(u);case"SSS":return intUnit(a);case"u":return simple(p);case"a":return oneOf(n.meridiems(),0);case"kkkk":return intUnit(s);case"kk":return intUnit(f,untruncateYear);case"W":return intUnit(c);case"WW":return intUnit(i);case"E":case"c":return intUnit(o);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+")(?::("+i.source+"))?"),2);case"ZZZ":return offset(new RegExp("([+-]"+c.source+")("+i.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 o,i,a,s={},l=1;for(o in n)hasOwnProperty(n,o)&&(a=(i=n[o]).groups?i.groups+1:1,!i.literal&&i.token&&(s[i.token.val[0]]=i.deser(r.slice(l,l+a))),l+=a);return[r,s]}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)}),o=r.find(function(e){return e.invalidReason});if(o)return{input:e,tokens:n,invalidReason:o.invalidReason};var o=buildRegex(r),r=o[0],o=o[1],r=RegExp(r,"i"),o=match(e,r,o),i=o[0],o=o[1],a=o?dateTimeFromMatches(o):[null,null],s=a[0],a=a[1];if(hasOwnProperty(o,"a")&&hasOwnProperty(o,"H"))throw new ConflictingSpecificationError("Can't include meridiem when specifying 24-hour format");return{input:e,tokens:n,regex:r,rawMatches:i,matches:o,result:s,zone:a}}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,o=e.day,i=computeOrdinal(n,r,o),r=dayOfWeek(n,r,o),o=Math.floor((i-r+10)/7);return o<1?o=weeksInWeekYear(t=n-1):o>weeksInWeekYear(n)?(t=n+1,o=1):t=n,Object.assign({weekYear:t,weekNumber:o,weekday:r},timeObject(e))}function weekToGregorian(e){var t,n=e.weekYear,r=e.weekNumber,o=e.weekday,i=dayOfWeek(n,1,4),a=daysInYear(n),r=7*r+o-i-3,o=(r<1?r+=daysInYear(t=n-1):a<r?(t=n+1,r-=daysInYear(n)):t=n,uncomputeOrdinal(t,r)),i=o.month,a=o.day;return Object.assign({year:t,month:i,day:a},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,o=integerBetween(t,0,23)||24===t&&0===n&&0===r&&0===e,i=integerBetween(n,0,59),a=integerBetween(r,0,59),s=integerBetween(e,0,999);return o?i?a?!s&&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,o=n.offset(r);if(t===o)return[r,t];n=n.offset(r-=60*(o-t)*1e3);return o===n?[r,o]:[e-60*Math.min(o,n)*1e3,Math.max(o,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),o=e.c.month+Math.trunc(t.months)+3*Math.trunc(t.quarters),r=Object.assign({},e.c,{year:r,month:o,day:Math.min(e.c.day,daysInMonth(r,o))+Math.trunc(t.days)+7*Math.trunc(t.weeks)}),o=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!==o&&(n=e.zone.offset(r+=o)),{ts:r,o:n}}function parseDataToDateTime(e,t,n,r,o){var i=n.setZone,a=n.zone;return e&&0!==Object.keys(e).length?(e=DateTime.fromObject(Object.assign(e,n,{zone:t||a,setZone:void 0})),i?e:e.setZone(a)):DateTime.invalid(new Invalid("unparsable",'the input "'+o+"\" 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,o=t.includeOffset,i=t.includePrefix,i=void 0!==i&&i,a=t.includeZone,a=void 0!==a&&a,s=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")),(a||o)&&(void 0!==s&&s)&&(l+=" "),a?l+="z":o&&(l+="basic"===t?"ZZZ":"ZZ"),toTechFormat(e,l));return n=i?"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 o=hasInvalidGregorianData(e)||hasInvalidTimeData(e);if(o)return DateTime.invalid(o);var o=Settings.now(),o=objToTS(e,t.offset(o),t),i=o[0],o=o[1];return new DateTime({ts:i,zone:t,o:o})}function diffRelative(t,n,r){function e(e,t){return e=roundTo(e,i||r.calendary?0:2,!0),n.loc.clone(r).relFormatter(r).format(e,t)}function o(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 i=!!isUndefined(r.round)||r.round;if(r.unit)return e(o(r.unit),r.unit);for(var a=_createForOfIteratorHelperLoose(r.units);!(s=a()).done;){var s=s.value,l=o(s);if(1<=Math.abs(l))return e(l,s)}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)),o=(this.ts=isUndefined(e.ts)?Settings.now():e.ts,null),i=null;r||(i=e.old&&e.old.ts===this.ts&&e.old.zone.equals(n)?(o=(t=[e.old.c,e.old.o])[0],t[1]):(t=n.offset(this.ts),o=tsToObj(this.ts,t),o=(r=Number.isNaN(o.year)?new Invalid("invalid input"):null)?null:o,r?null:t)),this._zone=n,this.loc=e.loc||Locale.create(),this.invalid=r,this.weekData=null,this.c=o,this.o=i,this.isLuxonDateTime=!0}g.now=function(){return new g({})},g.local=function(e,t,n,r,o,i,a){return isUndefined(e)?g.now():quickDT({year:e,month:t,day:n,hour:r,minute:o,second:i,millisecond:a},Settings.defaultZone)},g.utc=function(e,t,n,r,o,i,a){return isUndefined(e)?new g({ts:Settings.now(),zone:FixedOffsetZone.utcInstance}):quickDT({year:e,month:t,day:n,hour:r,minute:o,second:i,millisecond:a},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),o=normalizeObject(e,normalizeUnit,["zone","locale","outputCalendar","numberingSystem"]),i=!isUndefined(o.ordinal),a=!isUndefined(o.year),s=!isUndefined(o.month)||!isUndefined(o.day),a=a||s,l=o.weekYear||o.weekNumber,c=Locale.fromObject(e);if((a||i)&&l)throw new ConflictingSpecificationError("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(s&&i)throw new ConflictingSpecificationError("Can't mix ordinal dates with month/day");for(var u,s=l||o.weekday&&!a,d=tsToObj(n,r),p=(s?(m=orderedWeekUnits,u=defaultWeekUnitValues,d=gregorianToWeek(d)):i?(m=orderedOrdinalUnits,u=defaultOrdinalUnitValues,d=gregorianToOrdinal(d)):(m=orderedUnits$1,u=defaultUnitValues),!1),f=_createForOfIteratorHelperLoose(m);!(h=f()).done;){var h=h.value;isUndefined(o[h])?o[h]=(p?u:d)[h]:p=!0}l=(s?hasInvalidWeekData:i?hasInvalidOrdinalData:hasInvalidGregorianData)(o)||hasInvalidTimeData(o);if(l)return g.invalid(l);var n=objToTS(s?weekToGregorian(o):i?ordinalToGregorian(o):o,r,t),m=new g({ts:n[0],zone:t,o:n[1],loc:c});return o.weekday&&a&&e.weekday!==m.weekday?g.invalid("mismatched weekday","you can't specify both a weekday of "+o.weekday+" and a date of "+m.toISO()):m},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,o=r.locale,r=r.numberingSystem,o=parseFromTokens(Locale.fromOpts({locale:void 0===o?null:o,numberingSystem:void 0===r?null:r,defaultToEN:!0}),e,t),r=o[0],i=o[1],o=o[2];return o?g.invalid(o):parseDataToDateTime(r,i,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),o=!isUndefined(e.year),i=!isUndefined(e.month)||!isUndefined(e.day),a=e.weekYear||e.weekNumber;if((o||i||r)&&a)throw new ConflictingSpecificationError("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(i&&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));o=objToTS(t,this.o,this.zone);return clone$1(this,{ts:o[0],o:o[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,o=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!==o&&o,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"],o=e.unit;return Array.isArray(e.unit)&&(r=e.unit,o=void 0),diffRelative(t,this.plus(n),Object.assign(e,{numeric:"always",units:r,unit:o}))},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 useStyles$b=makeStyles()(()=>({root:{padding:"15px 30px"},title:{display:"flex"},action:{fontWeight:600},time:{fontSize:"12px",paddingLeft:"15px",lineHeight:"21px"},description:{lineHeight:"150%",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},divider:{margin:"0 30px",backgroundColor:"#D5DFE9",height:"0.5px"}})),ActivityCard=({longFormatTime:e=!1,data:{createdDateTime:t,event:n,description:r}})=>{var o=useStyles$b()["classes"];return jsxRuntime.exports.jsxs(react.exports.Fragment,{children:[jsxRuntime.exports.jsxs("div",Object.assign({className:o.root,"data-testid":"activity-card"},{children:[jsxRuntime.exports.jsxs("div",Object.assign({className:o.title},{children:[jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"body1",className:o.action},{children:n})),jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"body2",className:o.time},{children:e?DateTime_1.fromISO(t||"").toFormat("F"):DateTime_1.fromISO(t||"").toFormat("tt")}))]})),jsxRuntime.exports.jsx("div",{children:jsxRuntime.exports.jsx(Tooltip$1,Object.assign({placement:"top-start",title:r||""},{children:jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"body1",className:o.description},{children:r}))}))})]})),jsxRuntime.exports.jsx(Divider$1,{className:o.divider})]})},useStyles$a=makeStyles()(e=>({root:{width:"100%",height:"100%"},header:{opacity:.9,display:"flex",justifyContent:"space-between",padding:e.spacing(4,6),position:"relative"},title:{opacity:.9,padding:e.spacing(4,6,2,6)},titleText:{textTransform:"uppercase",color:e.palette.secondary.main},scrollContent:{overflowY:"auto",height:"calc(100% - 65px)"}})),filters$2=[{value:"all",title:"All Activities"},{value:"today",title:"Activities today"}],today$1=DateTime_1.local().startOf("day"),yesterday=DateTime_1.local().plus({days:-1}).startOf("day"),ActivityPanel=({data:e,filter:t,onChangeFilter:n})=>{var r=useStyles$a()["classes"];const o=null==e?void 0:e.filter(e=>DateTime_1.fromISO(e.createdDateTime||"").hasSame(today$1,"day")),i=null==e?void 0:e.filter(e=>DateTime_1.fromISO(e.createdDateTime||"").hasSame(yesterday,"day")),a=null==e?void 0:e.filter(e=>DateTime_1.fromISO(e.createdDateTime||"").startOf("day")<yesterday);return jsxRuntime.exports.jsxs("div",Object.assign({className:r.root},{children:[jsxRuntime.exports.jsxs("div",Object.assign({className:r.header},{children:[jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"body2",className:r.titleText},{children:"Today"})),jsxRuntime.exports.jsx(Filter,{data:filters$2,filter:t,onFilter:e=>{n(null==(e=null==e?void 0:e.target)?void 0:e.value)}})]})),jsxRuntime.exports.jsxs(Box$1,Object.assign({className:r.scrollContent},{children:[jsxRuntime.exports.jsx(Box$1,{children:null===o||void 0===o?void 0:o.map((e,t)=>jsxRuntime.exports.jsx(ActivityCard,{longFormatTime:!1,data:e},t))}),"all"===t&&jsxRuntime.exports.jsxs(react.exports.Fragment,{children:[0<(null===i||void 0===i?void 0:i.length)&&jsxRuntime.exports.jsxs(react.exports.Fragment,{children:[jsxRuntime.exports.jsx(Box$1,Object.assign({className:r.title,"data-testid":"filter-all-box"},{children:jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"body2",className:r.titleText},{children:"Yesterday"}))})),jsxRuntime.exports.jsx(Box$1,{children:i.map((e,t)=>jsxRuntime.exports.jsx(ActivityCard,{longFormatTime:!1,data:e},t))})]}),0<(null===a||void 0===a?void 0:a.length)&&jsxRuntime.exports.jsxs(react.exports.Fragment,{children:[jsxRuntime.exports.jsx(Box$1,Object.assign({className:r.title},{children:jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"body2",className:r.titleText},{children:"Older"}))})),jsxRuntime.exports.jsx(Box$1,{children:a.map((e,t)=>jsxRuntime.exports.jsx(ActivityCard,{longFormatTime:!0,data:e},t))})]})]})]}))]}))},useStyles$9=makeStyles()((e,t,n)=>({listItem:{display:"flex",cursor:"pointer",alignItems:"center",height:70,width:"100%",padding:e.spacing(0,6),"&:hover":{backgroundColor:"#EEF3F9"},["& ."+n.appName]:{marginLeft:e.spacing(3)}},iconButton:{borderRadius:4,textAlign:"center",width:"94px",height:"110px",cursor:"pointer",["& ."+n.appName]:{marginBottom:e.spacing(3)}},appName:{textAlign:"center",textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden",textTransform:"capitalize"},image:{display:"flex",justifyContent:"center",alignItems:"center",margin:e.spacing(3.8,0)},bounding:{padding:"17px 27px 19px 27px"},img:{width:40,height:40}})),iconMapper={CMS:img$V,Discovery:img$U,Collection:img$T,Library:img$S,Admin:img$1s,Developer:img$R};function AppIcon({id:e,icon:t,type:n,iconUrl:r,appName:o,onClick:i}){var a=useStyles$9()["classes"];const[s,l]=react.exports.useState(t||r||o&&iconMapper[o]||img$R);return jsxRuntime.exports.jsx(Tooltip$1,Object.assign({title:o||"",PopperProps:{disablePortal:!0}},{children:jsxRuntime.exports.jsxs("div",Object.assign({onClick:function(){i&&i(e)},className:classNames({[a.iconButton]:"grid"===n,[a.listItem]:"list"===n}),"data-test":"dt-button-app-icon","data-testid":"dt-button-app-icon"},{children:[jsxRuntime.exports.jsx("div",Object.assign({className:a.image},{children:jsxRuntime.exports.jsx("img",{alt:"app-icon",onError:function(){l(img$R)},src:s,draggable:"false",className:a.img})})),jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"body2",className:a.appName},{children:o}))]}))}))}const useStyles$8=makeStyles()((e,{row:t})=>({tabsContainer:{width:"100%"},gridContainer:{display:"flex"},listContainer:{},gridItem:{display:"flex",justifyContent:"center",paddingBottom:e.spacing(1.6),"&:hover":{backgroundColor:"#EEF3F9",borderRadius:"4px"}},padding:{padding:e.spacing(0,6,3,6)},moreAppContainer:{height:`calc(100vh - ${0===t?175:1===t?275:2===t?395:500}px - 56px - 66px - 10px)`,minHeight:3===t?300:0,overflow:"overlay",overflowX:"hidden"},relativeParent:{position:"relative"},noMoreApps:{padding:e.spacing(0,9,3,9)},noSelect:{userSelect:"none"},gridTitle:{margin:"-5px 0 -5px","& > $noSelect":{marginBottom:15}},appItemDivider:{margin:e.spacing(0,6)}}));function AppList({title:e,selectedAppId:t,onSelectApplication:n,applications:r=[],useGrid:o=!1,row:i=0}){const a=useStyles$8({row:i})["classes"],[s,l]=react.exports.useState(t),[c,u]=react.exports.useState([]);function d(e){l(e),n(e)}function p(e,t){return e.name>t.name?1:e.name<t.name?-1:0}return react.exports.useEffect(()=>{if(0<r.length){const t=[...r];var e=t.sort(p);u(e)}},[r]),react.exports.useEffect(()=>{t!==s&&l(t)},[t,s]),jsxRuntime.exports.jsxs("div",Object.assign({className:classNames({[a.gridTitle]:o},a.tabsContainer)},{children:[jsxRuntime.exports.jsx("div",Object.assign({className:classNames({[a.padding]:!o},a.noSelect)},{children:jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"h3"},{children:e}))})),o&&jsxRuntime.exports.jsx("div",Object.assign({className:a.gridContainer},{children:jsxRuntime.exports.jsx(Grid$1,Object.assign({container:!0},{children:0===r.length?jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"body2"},{children:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar-panel.Xzhf45",defaultMessage:"No Applications",description:"the label no app will show if we have no application for grid view"})})):0<c.length&&c.map((e,t)=>{var{id:e=t,iconUrl:t,name:n}=e;return jsxRuntime.exports.jsx(Grid$1,Object.assign({item:!0,xs:4},{children:jsxRuntime.exports.jsx("div",Object.assign({className:a.gridItem},{children:jsxRuntime.exports.jsx(AppIcon,{type:"grid",selected:e===s,onClick:d,iconUrl:t,id:e,appName:n})}))}),e)})}))})),!o&&jsxRuntime.exports.jsx("div",Object.assign({className:a.listContainer},{children:0===r.length?jsxRuntime.exports.jsx("div",Object.assign({className:a.noMoreApps},{children:jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"body2"},{children:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar-panel.dyhBih",defaultMessage:"No Applications",description:"the label no app will show if we have no application for list view"})}))})):jsxRuntime.exports.jsx("div",Object.assign({className:a.moreAppContainer},{children:0<r.length&&r.sort(p).map((e,t)=>{var{id:e=t,iconUrl:n,name:r}=e;return jsxRuntime.exports.jsxs("div",Object.assign({className:a.relativeParent},{children:[jsxRuntime.exports.jsx(AppIcon,{type:"list",selected:e===s,onClick:d,iconUrl:n,id:e,appName:r}),jsxRuntime.exports.jsx(Divider$1,{className:a.appItemDivider})]}),e+"_"+t)})}))}))]}))}const useStyles$7=makeStyles()(e=>({tabsContainer:{padding:e.spacing(4.8,6,6.4,6)},listContainer:{padding:e.spacing(4,0),overflow:"hidden"},skeletonContainer:{position:"absolute",width:"100%",height:"100%",zIndex:5,backgroundColor:"white"}}));function ApplicationPanel({selectedAppId:e,onChangeTab:t,recentApplist:n=[],applications:r=[],onClickApp:o}){var i=useStyles$7()["classes"],a=useSelector(preferredLanguageSelector);const s=AIWareFormatMessage(a),[l,c]=react.exports.useState(0===n.length?0:n.length<4?1:2),[u,d]=(react.exports.useEffect(()=>{var e=0===n.length?0:n.length<4?1:2;c(e)},[n]),react.exports.useState(e));function p(e){d(e),null!=t&&t(e),null!=o&&o(e)}return react.exports.useEffect(()=>{e!==u&&d(e)},[e,u]),jsxRuntime.exports.jsxs(jsxRuntime.exports.Fragment,{children:[jsxRuntime.exports.jsx("div",Object.assign({className:i.tabsContainer},{children:jsxRuntime.exports.jsx(AppList,{useGrid:!0,title:s({id:"os-app-bar-panel.name.recentApps",defaultMessage:[{type:0,value:"Recent Applications"}]}),type:"Recent",applications:n,onSelectApplication:p,selectedAppId:null})})),jsxRuntime.exports.jsx(Divider$1,{}),jsxRuntime.exports.jsx("div",Object.assign({className:i.listContainer},{children:jsxRuntime.exports.jsx(AppList,{useGrid:!1,title:s({id:"os-app-bar-panel.name.moreApps",defaultMessage:[{type:0,value:"More Applications"}]}),type:"More",applications:r,onSelectApplication:p,selectedAppId:null,row:l})}))]})}const useStyles$6=makeStyles()(e=>({root:{width:"100%",height:"calc(100% - 30px)"},tabs:{margin:e.spacing(6)},tabPanels:{width:"100%",height:"calc(100% - 80px)"},logRoot:{padding:e.spacing(0,6)},logHeader:{display:"flex",justifyContent:"space-between"},logTitleText:{paddingTop:"4px"},logContent:{marginTop:"12px"},overviewRoot:{padding:e.spacing(0,6),height:"100%"},overviewHeader:{display:"flex",justifyContent:"space-between"},overviewTitleText:{fontWeight:600},overviewContent:{width:"100%",height:"calc(100% - 50px)",display:"flex",flexDirection:"column",overflowY:"auto"},overviewLineChart:{padding:e.spacing(6,0),flex:1},overviewPieChart:{marginTop:0}})),filters$1=[{value:"all",title:"View Current Week"},{value:"no data",title:"View Current Month"}];function Overview(){var e=useStyles$6()["classes"];const[t,n]=react.exports.useState("all");return jsxRuntime.exports.jsxs(Box$1,Object.assign({className:e.overviewRoot,"data-testid":"performance-monitor-overview"},{children:[jsxRuntime.exports.jsxs(Box$1,Object.assign({className:e.overviewHeader},{children:[jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"subtitle1",className:e.overviewTitleText},{children:"CPU Load"})),jsxRuntime.exports.jsx(Filter,{data:filters$1,filter:t,onFilter:e=>{n(e.target.value)}})]})),jsxRuntime.exports.jsx(Box$1,{className:e.overviewContent})]}))}const useStyles$5=makeStyles()(e=>({table:{minWidth:650},SdkTableCellData:{fontSize:12,color:"#000"},SdkTableCellHeader:{fontSize:12,color:"#9CA8B4",borderBottom:"none",paddingBottom:0},SdkTableCellAvatar:{width:"32px",padding:e.spacing(3,0,3,1)},smallAvatar:{width:32,height:32},SdkTableCellStatus:{color:"#219653",textTransform:"capitalize"},SdkTableCellStatusDeactived:{color:"#8D0707",textTransform:"capitalize"}}));function MuiTable({columns:t=[],data:e=[]}){const r=useStyles$5()["classes"];return jsxRuntime.exports.jsx("div",{children:jsxRuntime.exports.jsxs(Table$1,Object.assign({className:r.table,"aria-label":"simple table"},{children:[jsxRuntime.exports.jsx(TableHead$1,{children:jsxRuntime.exports.jsx(TableRow$1,{children:t.map((e,t)=>jsxRuntime.exports.jsx(TableCell$1,Object.assign({classes:{root:r.SdkTableCellHeader},align:e.align},{children:e.label}),t))})}),jsxRuntime.exports.jsx(TableBody$1,{children:e.map((n,e)=>jsxRuntime.exports.jsx(TableRow$1,{children:t.map((e,t)=>"avatar"===e.value?jsxRuntime.exports.jsx(TableCell$1,Object.assign({padding:"checkbox",classes:{root:classNames(r.SdkTableCellData,r.SdkTableCellAvatar)},align:"right"},{children:jsxRuntime.exports.jsx(Avatar$1,{alt:"",src:n[e.value],className:r.smallAvatar})}),t):"status"===e.value?jsxRuntime.exports.jsx(TableCell$1,Object.assign({padding:"checkbox",classes:{root:r.SdkTableCellData},align:e.align},{children:jsxRuntime.exports.jsx("span",Object.assign({className:"deactived"===n[e.value]||"failed"===n[e.value]?r.SdkTableCellStatusDeactived:r.SdkTableCellStatus},{children:n[e.value]}))}),t):jsxRuntime.exports.jsx(TableCell$1,Object.assign({classes:{root:r.SdkTableCellData},align:e.align},{children:n[e.value]}),t))},e))})]}))})}const data=[1,2,3,4,5,6,7,8].map(e=>[{name:"LogoGrab - V3F - "+e,engineId:"0006676754"+e,jobId:"20104106_6WnM4rGlXj",status:"Pending",duration:"1s",appName:"Attribute"}]),columns=[{value:"name",label:"Engine Name",align:"left"},{value:"engineId",label:"Engine ID",align:"left"},{value:"jobId",label:"Job ID",align:"left"},{value:"status",label:"Status",align:"left"},{value:"duration",label:"Time",align:"left"},{value:"appName",label:"App Name",align:"left"}],filters=[{value:"all",title:"View All Applications"},{value:"no data",title:"Active Applications"}];function PerformanceLogs(){var e=useStyles$6()["classes"];const[t,n]=react.exports.useState("all");return jsxRuntime.exports.jsxs(Box$1,Object.assign({className:e.logRoot,"data-testid":"performance-monitor-logs"},{children:[jsxRuntime.exports.jsxs(Box$1,Object.assign({className:e.logHeader},{children:[jsxRuntime.exports.jsx(Filter,{data:filters,filter:t,onFilter:e=>{n(e.target.value)}}),jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"body2",className:e.logTitleText},{children:"Last 24 Hours"}))]})),jsxRuntime.exports.jsx(Box$1,Object.assign({className:e.logContent},{children:jsxRuntime.exports.jsx(MuiTable,{columns:columns,data:data})}))]}))}const Resources=()=>jsxRuntime.exports.jsx("div",Object.assign({"data-testid":"performance-monitor-resources"},{children:"Resources"}));function PerformanceErrors(){return jsxRuntime.exports.jsx("div",Object.assign({"data-testid":"performance-monitor-errors"},{children:"Performance Errors"}))}const tabsList$1=[{label:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar-panel.xgDIjO",defaultMessage:"Overview",description:"tab label: Overview"}),disabled:!1},{label:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar-panel.NXAxMt",defaultMessage:"Logs",description:"tab label: Logs"}),disabled:!1},{label:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar-panel.Mxysi8",defaultMessage:"Resources",description:"tab label: Resources"}),disabled:!0},{label:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar-panel.Qj95LF",defaultMessage:"Errors",description:"tab label: Errors"}),disabled:!0}];function PerformanceMonitor(){var e=useStyles$6()["classes"];const[t,n]=react.exports.useState(0);return jsxRuntime.exports.jsxs(Box$1,Object.assign({className:e.root,"data-testid":"performance-monitor"},{children:[jsxRuntime.exports.jsx(Box$1,Object.assign({className:e.tabs},{children:jsxRuntime.exports.jsx(CustomTabs,{selectedId:t,onChangeTab:e=>{n(Number(e))},tabsList:tabsList$1})})),jsxRuntime.exports.jsxs(Box$1,Object.assign({className:e.tabPanels},{children:[jsxRuntime.exports.jsx(TabPanel,Object.assign({value:t,index:0},{children:jsxRuntime.exports.jsx(Overview,{})})),jsxRuntime.exports.jsx(TabPanel,Object.assign({value:t,index:1},{children:jsxRuntime.exports.jsx(PerformanceLogs,{})})),jsxRuntime.exports.jsx(TabPanel,Object.assign({value:t,index:2},{children:jsxRuntime.exports.jsx(Resources,{})})),jsxRuntime.exports.jsx(TabPanel,Object.assign({value:t,index:3},{children:jsxRuntime.exports.jsx(PerformanceErrors,{})}))]}))]}))}const useStyles$4=makeStyles()(e=>({root:{display:"flex",justifyContent:"center"},changeAvatarIcon:{color:"#121212 !important",backgroundColor:"#ffffff !important",padding:e.spacing(1.2)+" !important","&:hover":{backgroundColor:"#ffffff !important"}},avatarLarge:{color:e.palette.secondary.main,backgroundColor:"#ffffff !important",fontSize:"30px !important",width:"84px !important",height:"84px !important",border:"5px solid #E8E8E8"}})),AvatarProfile=({avatar:e,sortName:t,onEditAvatarClick:n,loadingStatus:r})=>{var o=useStyles$4()["classes"];return jsxRuntime.exports.jsx("div",{children:jsxRuntime.exports.jsx("div",Object.assign({className:o.root},{children:jsxRuntime.exports.jsx(Badge$1,Object.assign({"data-test":"dt-button-upload-avatar-icon",overlap:"circular","data-testid":"dt-button-upload-avatar-icon",anchorOrigin:{vertical:"bottom",horizontal:"right"},badgeContent:jsxRuntime.exports.jsx(IconButton$1,Object.assign({color:"primary","aria-label":"upload picture",className:o.changeAvatarIcon,onClick:()=>{n()},"data-test":"app-bar-update-avatar",size:"large","data-testid":"app-bar-update-avatar"},{children:jsxRuntime.exports.jsx("img",{src:img$16,alt:""})}))},{children:"loading"===r?jsxRuntime.exports.jsx(CircularProgress$1,{}):e?jsxRuntime.exports.jsx(Avatar$1,{"data-test":"dt-user-avatar-image",src:e,className:o.avatarLarge}):jsxRuntime.exports.jsx(Avatar$1,Object.assign({className:o.avatarLarge},{children:null==t?void 0:t.toUpperCase()}))}))}))})},SHARED_TEXT={buttonLink:()=>jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar-panel.aaaaa1",defaultMessage:"Link",description:"label of link open id connector button on profile panel"}),buttonUnlink:()=>jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar-panel.L4gr2p",defaultMessage:"Unlink",description:"label of unlink open id connector button on profile panel"}),basicInfoTabLabel:()=>jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar-panel.lpZXMT",defaultMessage:"Basic Info",description:"Personal Profile: Basic info name, email etc"}),accountLinkingTabLabel:()=>jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar-panel.AgbO9g",defaultMessage:"Account Linking",description:"Personal Profile: Open ID Connector Account Linking"}),settingsTabLabel:()=>jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar-panel.oYYEos",defaultMessage:"Settings",description:"Profile Settings"}),accountLinkingLabel:()=>jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar-panel.JxMDBr",defaultMessage:"Link your Account",description:"label of manage basic infomation container"}),accountLinkingDescription:()=>jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar-panel.77MHtz",defaultMessage:"View your accounts from other identify providers that are linked with this account.",description:"description of manage account linking"}),unlinkDialogTitle:()=>jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar-panel.naysir",defaultMessage:"Unlink this Identity Provider?",description:"title for unlink identity provider"}),unlinkDialogContent:e=>jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar-panel.dwZfY7",defaultMessage:"Are you sure you want to unlink {name} from your account?",description:"content for unlink identity provider",values:{name:e||""}}),unlinkDialogCancel:()=>jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar-panel.SNjPPT",defaultMessage:"Cancel",description:"cancel for unlink identity provider"}),unlinkDialogConfirm:()=>jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar-panel.KJyVd9",defaultMessage:"Yes, Unlink",description:"confirm for unlink identity provider"}),successDialogTitle:()=>jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar-panel.ZaKL3e",defaultMessage:"Account Successfully linked!",description:"title for success identity provider"}),successDialogContent:e=>jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar-panel.IP+fpM",defaultMessage:"You can now log into this account using {name}.",description:"content for success identity provider",values:{name:e||""}}),successDialogConfirm:()=>jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar-panel.1DTtvD",defaultMessage:"Okay",description:"confirm for success identity provider"}),nullState:()=>jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar-panel.u6gP99",defaultMessage:"Your account currently has no available account linking options",description:"account linking null state"}),errorState:()=>jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar-panel.KG2JIz",defaultMessage:"There was an error while loading the available account linking options",description:"account linking error state"}),retry:()=>jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar-panel.IYUdD6",defaultMessage:"Retry",description:"account linking retry"}),settingsHeader:()=>jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar-panel.IIE3bM",defaultMessage:"Application Preferences",description:"account settings header"}),settingsSubHeader:()=>jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar-panel.9xcAYc",defaultMessage:"Manage the settings of aiWARE services and applications.",description:"account settings sub header"})},useStyles$3=makeStyles()(e=>({container:{marginTop:e.spacing(4),padding:e.spacing(4,4),textAlign:"center",border:"0.5px solid #D5DFE9",borderRadius:e.spacing(2)},text:{marginTop:e.spacing(3)},icon:{display:"inline !important"}})),NullState=()=>{var e=useStyles$3()["classes"];return jsxRuntime.exports.jsxs("div",Object.assign({className:e.container},{children:[jsxRuntime.exports.jsx(Icon$1,Object.assign({className:e.icon},{children:jsxRuntime.exports.jsx(NoLink,{fontSize:"large"})})),jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"body2",className:e.text},{children:SHARED_TEXT.nullState()})),jsxRuntime.exports.jsx(Box$1,{mb:9})]}))},ErrorState=({onRetry:e})=>{var t=useStyles$3()["classes"];return jsxRuntime.exports.jsxs("div",Object.assign({className:t.container},{children:[jsxRuntime.exports.jsx(Icon$1,Object.assign({className:t.icon},{children:jsxRuntime.exports.jsx(AlarmTwo,{fontSize:"large"})})),jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"body2",className:t.text,"data-test":"account-linking-error-message"},{children:SHARED_TEXT.errorState()})),jsxRuntime.exports.jsx(Box$1,{mt:4}),jsxRuntime.exports.jsx(Button$1,Object.assign({variant:"text",size:"large","data-test":"account-linking-retry-btn",onClick:e},{children:SHARED_TEXT.retry()}))]}))};var LoadingStatus,useStyles$2=makeStyles()(e=>({accountLinkingLabel:{fontWeight:"normal",userSelect:"none"},openIdLogo:{width:e.spacing(5),height:e.spacing(5),backgroundColor:"#ffffff",color:"#555F7C"},listAvatar:{minWidth:"45px"},openIdContainer:{marginTop:e.spacing(3)},openIdItem:{padding:e.spacing(3)+"px 0px"},openIdTextContainer:{marginLeft:e.spacing(3.5),display:"inline-block",verticalAlign:"top"},secondaryAction:{right:"0"},linkBtn:{textTransform:"capitalize"},linkIcon:{marginRight:e.spacing(1),color:e.palette.primary.main},dialogTitle:{padding:`${e.spacing(6)} ${e.spacing(6)} ${e.spacing(1)}px !important `},dialogContent:{padding:`${e.spacing(1)} ${e.spacing(6)} !important `},dialogTitleText:{fontWeight:600},dialogAction:{padding:e.spacing(4)},displayNone:{display:"none"},displayInlineBlock:{display:"inline-block"}}));const OpenIdConnectorButton=({isConnected:e,onLink:t,onUnlink:n})=>{var r=useStyles$2()["classes"];return jsxRuntime.exports.jsx("div",{children:e?jsxRuntime.exports.jsx(Button$1,Object.assign({className:r.linkBtn+" "+r.displayNone,variant:"text","data-test":"account-linking-unlink-btn",onClick:n},{children:SHARED_TEXT.buttonUnlink()})):jsxRuntime.exports.jsxs(Button$1,Object.assign({variant:"outlined",color:"primary",className:r.linkBtn,"data-test":"account-linking-link-btn",onClick:t},{children:[jsxRuntime.exports.jsx(default_1,{className:r.linkIcon}),SHARED_TEXT.buttonLink()]}))})};function OpenIdConnectors({openIdItems:i,onOpenUnlinkModal:a,onClickOpenIdUrl:s,isOpenIdConnected:l}){const c=useStyles$2()["classes"];return jsxRuntime.exports.jsx(List$2,{children:i.map((e,t)=>{const{name:n,loginButtonStyle:r}=e;var o=null==r?void 0:r.btnLogo;return jsxRuntime.exports.jsxs(react.exports.Fragment,{children:[jsxRuntime.exports.jsxs(ListItem$1,Object.assign({className:c.openIdItem},{children:[jsxRuntime.exports.jsx(ListItemAvatar$1,Object.assign({className:c.listAvatar},{children:jsxRuntime.exports.jsx(Avatar$1,Object.assign({className:c.openIdLogo,src:o},{children:jsxRuntime.exports.jsx(OrgFilled,{})}))})),jsxRuntime.exports.jsx(ListItemText$1,{primary:jsxRuntime.exports.jsx(Tooltip$1,Object.assign({title:25<n.length?n:"",placement:"bottom-end"},{children:jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"body1",className:c.accountLinkingLabel},{children:25<n.length?n.substring(0,25)+"...":n}))}))}),jsxRuntime.exports.jsx(ListItemSecondaryAction$1,Object.assign({className:c.secondaryAction},{children:jsxRuntime.exports.jsx(OpenIdConnectorButton,{isConnected:l(e.connectId),onLink:()=>s(e),onUnlink:()=>a(e)})}))]})),t!==i.length-1&&jsxRuntime.exports.jsx(Divider$1,{})]})})})}const LoaderSkeletonItem=()=>{var e=useStyles$2()["classes"];return jsxRuntime.exports.jsxs(ListItem$1,Object.assign({className:e.openIdItem},{children:[jsxRuntime.exports.jsx(ListItemAvatar$1,Object.assign({className:e.listAvatar},{children:jsxRuntime.exports.jsx(Skeleton$1,{variant:"circular",width:25,height:25})})),jsxRuntime.exports.jsx(ListItemText$1,{children:jsxRuntime.exports.jsx(Skeleton$1,{variant:"text",width:150,height:21})}),jsxRuntime.exports.jsx(ListItemSecondaryAction$1,Object.assign({className:e.secondaryAction},{children:jsxRuntime.exports.jsx(Skeleton$1,{variant:"rectangular",width:87,height:35})}))]}))},LoaderSkeleton=()=>jsxRuntime.exports.jsxs(List$2,{children:[jsxRuntime.exports.jsx(LoaderSkeletonItem,{}),jsxRuntime.exports.jsx(Divider$1,{}),jsxRuntime.exports.jsx(LoaderSkeletonItem,{}),jsxRuntime.exports.jsx(Divider$1,{}),jsxRuntime.exports.jsx(LoaderSkeletonItem,{})]}),namespace$2=(!function(e){e.Failed="failed",e.Idle="idle",e.Pending="pending"}(LoadingStatus=LoadingStatus||{}),"openId"),selectOpenIdConnectors=e=>{return null==(e=null==e?void 0:e[namespace$2])?void 0:e.openIdConnectors},selectConnectedOpenIds=e=>{return null==(e=null==e?void 0:e[namespace$2])?void 0:e.connectedOpenIds},selectLoadingStatus=e=>{return null==(e=null==e?void 0:e[namespace$2])?void 0:e.status},GET_OPEN_ID_CONNECTORS=`aiware/${namespace$2}/get open id connectors`,GET_OPEN_ID_SUCCESS=`aiware/${namespace$2}/get open id connectors success`,GET_CONNECTED_OPEN_ID_SUCCESS=`aiware/${namespace$2}/get connected open id connectors success`,GET_OPEN_ID_ERROR=`aiware/${namespace$2}/get open id connectors error`;function getOpenIdConnectors(){return{type:GET_OPEN_ID_CONNECTORS}}function getOpenIdConnectorSuccess(e){return{type:GET_OPEN_ID_SUCCESS,payload:{data:e}}}function getConnectedOpenIdsSuccess(e){return{type:GET_CONNECTED_OPEN_ID_SUCCESS,payload:{data:e}}}function getOpenIdConnectorError(e){return{type:GET_OPEN_ID_ERROR,payload:{message:e}}}const AccountLinking=()=>{const e=useDispatch(),[t,n]=react.exports.useState(!1),[r,o]=react.exports.useState(!1),[i,a]=react.exports.useState(null);const[s,l]=react.exports.useState({}),[c,u]=react.exports.useState(),d=useSelector(selectLoadingStatus)||"",p=useSelector(selectOpenIdConnectors)||[],f=useSelector(selectConnectedOpenIds)||[];var h=useStyles$2()["classes"];react.exports.useEffect(()=>{e(getOpenIdConnectors())},[e]);const m=e=>{l(e),n(!0)};var g=()=>{n(!1)},v=()=>{o(!1)};const y=()=>{e(getOpenIdConnectors())},x=(useInterval(()=>{e(getOpenIdConnectors())},i),e=>{l(e);e=window.open(e.loginUrl);u(e),a(2e3)}),C=react.exports.useCallback(t=>f.some(e=>e.connectId===t),[f]);react.exports.useEffect(()=>{""!==s.connectId&&null!==i&&C(s.connectId)&&(a(null),null!==c&&void 0!==c&&c.close(),o(!0))},[C,e]);return jsxRuntime.exports.jsxs("div",{children:[jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"body1",className:h.accountLinkingLabel,"data-test":"account-linking-label"},{children:SHARED_TEXT.accountLinkingLabel()})),jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"body2"},{children:SHARED_TEXT.accountLinkingDescription()})),d===LoadingStatus.Pending?jsxRuntime.exports.jsx(LoaderSkeleton,{}):d===LoadingStatus.Failed?jsxRuntime.exports.jsx(ErrorState,{onRetry:y}):0===p.length?jsxRuntime.exports.jsx(NullState,{}):jsxRuntime.exports.jsx(OpenIdConnectors,{openIdItems:p,onOpenUnlinkModal:m,onClickOpenIdUrl:x,isOpenIdConnected:C}),jsxRuntime.exports.jsxs(Dialog$1,Object.assign({open:t,maxWidth:"xs",onClose:g,"aria-labelledby":"unlink-dialog-title","aria-describedby":"unlink-dialog-description"},{children:[jsxRuntime.exports.jsx(DialogTitle$1,Object.assign({id:"unlink-dialog-title","data-test":"account-linking-unlink-dialog-title",className:h.dialogTitle},{children:jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"h2",className:h.dialogTitleText},{children:SHARED_TEXT.unlinkDialogTitle()}))})),jsxRuntime.exports.jsx(DialogContent$1,Object.assign({className:h.dialogContent},{children:jsxRuntime.exports.jsx(DialogContentText$1,Object.assign({id:"unlink-dialog-description"},{children:SHARED_TEXT.unlinkDialogContent(s.name)}))})),jsxRuntime.exports.jsxs(DialogActions$1,Object.assign({className:h.dialogAction},{children:[jsxRuntime.exports.jsx(Button$1,Object.assign({onClick:g,variant:"text",size:"large",className:h.linkBtn,"data-test":"account-linking-unlink-dialog-cancel-btn"},{children:SHARED_TEXT.unlinkDialogCancel()})),jsxRuntime.exports.jsx(Button$1,Object.assign({onClick:g,size:"large",variant:"contained",color:"primary",className:h.linkBtn,"data-test":"account-linking-unlink-dialog-confirm-btn"},{children:SHARED_TEXT.unlinkDialogConfirm()}))]}))]})),jsxRuntime.exports.jsxs(Dialog$1,Object.assign({open:r,maxWidth:"xs",onClose:v,"aria-labelledby":"success-dialog-title","aria-describedby":"success-dialog-description"},{children:[jsxRuntime.exports.jsx(DialogTitle$1,Object.assign({id:"success-dialog-title",className:h.dialogTitle,"data-test":"account-linking-success-dialog-title"},{children:jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"h2",className:h.dialogTitleText},{children:SHARED_TEXT.successDialogTitle()}))})),jsxRuntime.exports.jsx(DialogContent$1,Object.assign({className:h.dialogContent},{children:jsxRuntime.exports.jsx(DialogContentText$1,Object.assign({id:"success-dialog-description"},{children:SHARED_TEXT.successDialogContent(s.name)}))})),jsxRuntime.exports.jsx(DialogActions$1,Object.assign({className:h.dialogAction},{children:jsxRuntime.exports.jsx(Button$1,Object.assign({onClick:v,size:"large",variant:"contained",color:"primary",className:h.linkBtn,"data-test":"account-linking-success-dialog-confirm-btn"},{children:SHARED_TEXT.successDialogConfirm()}))}))]}))]})};var useStyles$1$1=makeStyles()(e=>({personalProfileContainer:{overflowY:"auto"},firstBox:{paddingTop:e.spacing(6),textAlign:"center",borderBottom:"0.5px solid "+e.palette.divider},loggedBox:{fontWeight:400,paddingTop:e.spacing(2),paddingBottom:e.spacing(5)},email:{color:e.palette.primary.main},logoutBox:{paddingBottom:e.spacing(8)},btnLogin:{textTransform:"capitalize",fontSize:"14px",lineHeight:"19px",padding:e.spacing(1,7)},secondBox:{padding:e.spacing(5,6),"& div":{height:"auto !important"}},headerBox:{display:"flex"},editIconBox:{margin:e.spacing(0,-2.4,0,0)},descBox:{fontSize:"14px",color:e.palette.secondary.main},formBox:{marginTop:e.spacing(4)},formItem:{borderBottom:"0.5px solid "+e.palette.divider,marginBottom:e.spacing(4)},formItemPw:{marginBottom:e.spacing(4)+" !important"},titleItem:{color:e.palette.text.disabled,marginBottom:e.spacing(2),cursor:"default"},valueItem:{fontWeight:"normal",color:e.palette.text.secondary,marginBottom:e.spacing(2)},disabledText:{opacity:.6},lastUpdate:{color:"#9CA8B4"},reset:{color:e.palette.primary.main,opacity:.9,marginTop:"35px",cursor:"pointer"},passwordBox:{display:"flex",justifyContent:"space-between",alignItems:"center"},iconResetPw:{margin:"-18px -12px 0 0"},textField:{marginLeft:0,marginRight:0,marginTop:0,marginBottom:"30px",width:"100%"},actionForm:{padding:0,marginBottom:e.spacing(4)},inputBase:{padding:e.spacing(3.4,2.8)},notchedOutline:{"& legend":{height:"16px"}},btnAction:{textTransform:"capitalize",fontSize:"14px",lineHeight:"19px"},btnSave:{marginLeft:e.spacing(1.6)},btnActionCancel:{color:e.palette.secondary.main},pwResetTitle:{color:"#D43060 !important"},pwResetDes1:{marginBottom:"20px"},mainTitleText:{color:e.palette.text.secondary,userSelect:"none",fontSize:"18px",lineHeight:"23px",letterSpacing:"0.25px",textTransform:"uppercase"},contentUserView:{height:"100%",textAlign:"left",position:"relative"},headerDrawer:{padding:e.spacing(3,6),display:"flex",justifyContent:"space-between",alignItems:"center",borderBottom:"0.5px solid "+e.palette.divider},contentEditAvatar:{padding:e.spacing(6)},areaUpload:{background:e.palette.background.default,textAlign:"center",height:"300px",border:"1px solid "+e.palette.divider,boxSizing:"border-box",borderRadius:"4px",padding:e.spacing(10)},descDrag:{fontSize:"16px",color:"#828282",marginBottom:e.spacing(4)},descDrag2:{color:"#828282",margin:e.spacing(4,0)},btnSelectPhoto:{textTransform:"capitalize",fontSize:"14px",lineHeight:"19px"},recentlyBox:{marginTop:e.spacing(4)},recentlyText:{margin:e.spacing(2,0)},imgRecently:{width:"113px",height:"113px",background:"#C4C4C4",borderRadius:"4px"},imgRecentlyRow:{display:"flex",justifyContent:"space-between",marginBottom:"20px"},resetBiometric:{marginTop:e.spacing(7)},actionButton:{},inputFile:{display:"none !important"},imageGrid:{display:"flex",alignItems:"center",justifyContent:"center",marginBottom:e.spacing(4)},dragging:{filter:"blur(2px)"},currentlyLoggedIn:{fontWeight:"normal",color:e.palette.info.main,lineHeight:e.spacing(3.8),display:"flex",flexDirection:"column",cursor:"default"},manageBasicInfoLabel:{fontWeight:"normal",cursor:"default"},tabsParent:{"& div":{padding:e.spacing(0,0,0,1.6),borderBottom:"none"},"& .Sdk-MuiTab-root.Mui-selected":{color:e.palette.text.primary,fontWeight:600}},editProfilePictureContainer:{height:"calc(100vh - 60px)",display:"flex",flexDirection:"column",position:"relative"},editProfilePictureFooterButtons:{right:"30px",bottom:"30px",position:"absolute"}})),useStyles$c=makeStyles()(e=>({settingsHeader:{fontWeight:"normal",cursor:"default"},topMargin:{marginTop:"30px"},fullWidth:{width:"100%"},inputLabel:{fontFamily:"Nunito",fontWeight:300,display:"block",fontSize:14,color:"#5C6269",marginBottom:6},disclaimerText:{fontWeight:400,display:"block",fontSize:12,color:"#9CA8B4",marginTop:12}}));const ProfileSettings=({onPreferredLanguageChange:t,selectedLanguage:e})=>{const[n,r]=react.exports.useState("");var o=useStyles$c()["classes"];react.exports.useEffect(()=>{r(e)},[e]);const i=langs.map(({locale:e,name:t})=>({value:e,name:t}));return jsxRuntime.exports.jsxs(jsxRuntime.exports.Fragment,{children:[jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"body1",className:o.settingsHeader},{children:SHARED_TEXT.settingsHeader()})),jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"body2"},{children:SHARED_TEXT.settingsSubHeader()})),jsxRuntime.exports.jsxs(FormControl$1,Object.assign({className:o.fullWidth+" "+o.topMargin},{children:[jsxRuntime.exports.jsx("label",Object.assign({className:o.inputLabel,htmlFor:"personal-profile-settings-preferred-language"},{children:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar-panel.preferredLanguage",defaultMessage:"Preferred Language",description:"Language selection label"})})),jsxRuntime.exports.jsx(Select$1,Object.assign({id:"personal-profile-settings-preferred-language",className:""+o.fullWidth,value:n,onChange:function(e){e=e.target.value,r(e),t(e)}},{children:null===i||void 0===i?void 0:i.map(e=>jsxRuntime.exports.jsx(MenuItem$1,Object.assign({value:null==e?void 0:e.value},{children:null==e?void 0:e.name})))})),jsxRuntime.exports.jsx(Typography$1,Object.assign({className:o.disclaimerText,variant:"subtitle1"},{children:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar-panel.preferredLanguageDisclaimer",defaultMessage:"Not all products within aiWARE may support your preferred language selection. If you choose a primary language that isn’t available, you may not see it reflected in the product you are currently viewing.",description:"Disclaimer text for preferred language"})}))]}))]})},tabsList$2=[{label:SHARED_TEXT.basicInfoTabLabel(),disabled:!1,id:"Basic Info"},{label:SHARED_TEXT.accountLinkingTabLabel(),disabled:!1,id:"Account Linking"},{label:SHARED_TEXT.settingsTabLabel(),disabled:!1,id:"Settings"}],PersonalProfile=({currentUser:e,handleResetBiometric:t,handleResetPassword:n,handleLogout:r,handleUpdateProfile:o,handleUploadAvatar:i,avatarHistory:a=[],enableResetBiometric:s=!1,loadingStatus:l})=>{var c;const u="EDIT_PROFILE_PICTURE";var d=useStyles$1$1()["classes"];const p=useDispatch();var f=useSelector(hidePasswordResetSelector)||!1,h=useSelector(preferredLanguageSelector)||"en";const[m,g]=react.exports.useState({firstName:"",lastName:"",phoneNumber:"",email:""}),[v,y]=react.exports.useState({firstName:"",lastName:"",phoneNumber:""}),[x,C]=react.exports.useState(!1),[b,w]=react.exports.useState(null),[$,S]=react.exports.useState(!1),[_,E]=react.exports.useState(!1),[j,T]=react.exports.useState(0);var R=useSelector(userAuthStatusSelector);const L=AIWareFormatMessage(h);react.exports.useEffect(()=>{e&&M(e)},[e]);const M=e=>{const{firstName:t,lastName:n,imageUrl:r,userSettings:o}=e;e=null===o||void 0===o?void 0:o.find(e=>"phoneNumber"===e.key);g({firstName:t||"",lastName:n||"",phoneNumber:(null==e?void 0:e.value)||"",email:""}),r&&w(r)};var O=react.exports.useCallback(()=>{null!=e&&e.email&&(S(!1),n(null==e?void 0:e.email))},[e,n]);var I=n=>e=>{const t=e.target.value;g(e=>Object.assign(Object.assign({},e),{[n]:t})),y(e=>Object.assign(Object.assign({},e),{[n]:""}))};const k=()=>{p(hidePanel$1(u))},A=e=>{i(e),setTimeout(()=>{p(hidePanel$1(u))},500)};R=[AuthStatus.LOGGING_OUT,AuthStatus.LOGGED_OUT].includes(R);return jsxRuntime.exports.jsxs("div",Object.assign({className:d.personalProfileContainer},{children:[jsxRuntime.exports.jsxs("div",Object.assign({className:d.firstBox},{children:[jsxRuntime.exports.jsx(AvatarProfile,{avatar:b,sortName:""+((null==(c=m.firstName)?void 0:c.substr(0,1))||"")+((null==(c=m.lastName)?void 0:c.substr(0,1))||""),onEditAvatarClick:()=>{var e={name:"EDIT_PROFILE_PICTURE",config:{name:"Veritone",dataId:"dataId",type:"APP_BAR_PANEL_TEMPLATE",onClose:k,onSaveAvatar:A,avatarHistory:a}},t={panelId:u,type:"APP_BAR_PANEL_TEMPLATE",marginTop:55,withTab:!1,marginStart:490,width:450,parentPanelId:"PERSONAL_PANEL",dimmed:0,dimmedStatus:"dimParent"};p(mountPanel$1({panelId:u,microFrontend:e,panelConfig:t}))},loadingStatus:l}),jsxRuntime.exports.jsx("div",Object.assign({className:d.loggedBox},{children:jsxRuntime.exports.jsxs(Typography$1,Object.assign({variant:"body2",className:d.currentlyLoggedIn},{children:[jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar-panel.ch1heq",defaultMessage:"Currently logged in as:",description:"personal profile panel currently logged in label"})," ",jsxRuntime.exports.jsx("span",Object.assign({"data-test":"Currently-logged-in-as-email",className:d.email},{children:null==e?void 0:e.email}))]}))})),jsxRuntime.exports.jsx("div",Object.assign({className:d.logoutBox},{children:jsxRuntime.exports.jsx(LoadingButton$1,Object.assign({onClick:r,variant:"outlined",color:"primary","data-test":"dt-button-logout",className:d.btnLogin,loading:R},{children:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar-panel.bRcFCr",defaultMessage:"Logout",description:"label of logout button on profile panel"})}))})),jsxRuntime.exports.jsx("div",Object.assign({className:d.tabsParent},{children:jsxRuntime.exports.jsx(CustomTabs,{selectedId:j,onChangeTab:e=>{T(e)},tabsList:tabsList$2})}))]})),jsxRuntime.exports.jsxs("div",Object.assign({className:d.secondBox},{children:[jsxRuntime.exports.jsx(TabPanel,Object.assign({value:j,index:0},{children:jsxRuntime.exports.jsxs(jsxRuntime.exports.Fragment,{children:[jsxRuntime.exports.jsxs("div",Object.assign({className:d.headerBox},{children:[jsxRuntime.exports.jsxs("div",{children:[jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"body1",className:d.manageBasicInfoLabel},{children:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar-panel.5oScQa",defaultMessage:"Manage Your Basic Information",description:"label of manage basic infomation container"})})),jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"body2"},{children:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar-panel.DjVGBt",defaultMessage:"Basic info, like your name and photo, that you use on Veritone services.",description:"description of manage basic infomation container"})}))]}),jsxRuntime.exports.jsx("div",Object.assign({className:d.editIconBox},{children:!x&&jsxRuntime.exports.jsx(IconButton$1,Object.assign({id:"button-edit",onClick:()=>{E(!1),S(!1),C(!0)},size:"large"},{children:jsxRuntime.exports.jsx("img",{src:img$13,alt:""})}))}))]})),jsxRuntime.exports.jsxs("div",Object.assign({className:d.formBox},{children:[x?jsxRuntime.exports.jsxs(jsxRuntime.exports.Fragment,{children:[jsxRuntime.exports.jsxs("div",{children:[jsxRuntime.exports.jsx(TextField$1,{id:"firstName",label:L({id:"os-app-bar-panel.firstName",defaultMessage:[{type:0,value:"First Name"}]}),variant:"outlined",className:d.textField,value:null===m||void 0===m?void 0:m.firstName,onChange:I("firstName"),margin:"normal",error:""!==v.firstName,helperText:v.firstName,InputProps:{classes:{input:d.inputBase,notchedOutline:d.notchedOutline}}}),jsxRuntime.exports.jsx(TextField$1,{id:"lastName",label:L({id:"os-app-bar-panel.lastName",defaultMessage:[{type:0,value:"Last Name"}]}),variant:"outlined",className:d.textField,value:null===m||void 0===m?void 0:m.lastName,onChange:I("lastName"),margin:"normal",error:""!==v.lastName,helperText:v.lastName,InputProps:{classes:{input:d.inputBase,notchedOutline:d.notchedOutline}}}),jsxRuntime.exports.jsx(TextField$1,{id:"phoneNumber",label:L({id:"os-app-bar-panel.phone",defaultMessage:[{type:0,value:"Phone"}]}),variant:"outlined",className:d.textField,value:null===m||void 0===m?void 0:m.phoneNumber,onChange:I("phoneNumber"),margin:"normal",error:""!==v.phoneNumber,helperText:v.phoneNumber,InputProps:{classes:{input:d.inputBase,notchedOutline:d.notchedOutline}}})]}),jsxRuntime.exports.jsxs(DialogActions$1,Object.assign({className:d.actionForm},{children:[jsxRuntime.exports.jsx(Button$1,Object.assign({onClick:()=>{e&&M(e),C(!1)},color:"primary",id:"button-cancel-edit",className:classNames(d.btnAction,d.btnActionCancel)},{children:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar-panel.qpPFGp",defaultMessage:"Cancel",description:"label of cancel button on profile panel"})})),jsxRuntime.exports.jsx(Button$1,Object.assign({onClick:function(){(()=>{let e=!0;return m.firstName||(y(Object.assign(Object.assign({},v),{firstName:"This field is required."})),e=!1),m.lastName||(y(Object.assign(Object.assign({},v),{lastName:"This field is required."})),e=!1),m.phoneNumber&&!/^\+?(\d){6,}$/.test(m.phoneNumber.toLowerCase())&&(y(Object.assign(Object.assign({},v),{phoneNumber:"Invalid phone number."})),e=!1),e})()&&(o(m),C(!1))},"data-test":"button-save-edit","data-testid":"button-save-edit",color:"primary",variant:"contained",className:d.btnAction},{children:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar-panel.C1oyBr",defaultMessage:"Save",description:"label of save button on profile panel"})}))]}))]}):jsxRuntime.exports.jsxs(jsxRuntime.exports.Fragment,{children:[jsxRuntime.exports.jsxs("div",Object.assign({className:d.formItem},{children:[jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"body2",className:d.titleItem},{children:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar-panel.a5aLpI",defaultMessage:"Name",description:"label of name field on profile panel"})})),jsxRuntime.exports.jsx(Typography$1,Object.assign({"data-test":"profile-panel-name",variant:"body1",className:d.valueItem},{children:`${(null===m||void 0===m?void 0:m.firstName)||""} `+((null===m||void 0===m?void 0:m.lastName)||"")}))]})),(null===m||void 0===m?void 0:m.phoneNumber)&&jsxRuntime.exports.jsxs("div",Object.assign({className:d.formItem},{children:[jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"body2",className:d.titleItem},{children:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar-panel.73xPqY",defaultMessage:"Phone",description:"label of phone field on profile panel"})})),jsxRuntime.exports.jsx(Typography$1,Object.assign({"data-test":"profile-panel-phone",variant:"body1",className:d.valueItem},{children:null===m||void 0===m?void 0:m.phoneNumber}))]}))]}),jsxRuntime.exports.jsxs("div",Object.assign({className:d.formItem},{children:[jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"body2",className:d.titleItem},{children:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar-panel.zieKdP",defaultMessage:"Email",description:"label of email field on profile panel"})})),jsxRuntime.exports.jsx(Typography$1,Object.assign({"data-test":"profile-panel-email",variant:"body1",className:classNames(d.valueItem,d.disabledText)},{children:null==e?void 0:e.email}))]})),$?jsxRuntime.exports.jsxs(jsxRuntime.exports.Fragment,{children:[jsxRuntime.exports.jsxs("div",{children:[jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"subtitle1",className:d.pwResetTitle},{children:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar-panel.I7feCi",defaultMessage:"Password Reset",description:"reset password label on profile panel"})})),jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"body2",className:d.pwResetDes1},{children:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar-panel.Zcj+4v",defaultMessage:"Veritone will send a reset password link via the email on your account.",description:"reset password description on profile panel"})})),jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"body2"},{children:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar-panel.kk8TY8",defaultMessage:"Would you like to continue?",description:"confirm message of reset biometric on profile panel"})}))]}),jsxRuntime.exports.jsxs(DialogActions$1,Object.assign({className:d.actionForm},{children:[jsxRuntime.exports.jsx(Button$1,Object.assign({onClick:()=>{S(!1)},color:"primary","data-test":"button-cancel-reset-password","data-testid":"button-cancel-reset-password",className:classNames(d.btnAction,d.btnActionCancel)},{children:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar-panel.hdbMmi",defaultMessage:"Cancel",description:"the label of cancel button"})})),jsxRuntime.exports.jsx(Button$1,Object.assign({onClick:O,"data-test":"button-reset-password","data-testid":"button-reset-password",color:"primary",variant:"contained",className:d.btnAction},{children:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar-panel.ZXvsuR",defaultMessage:"Reset",description:"the label of reset button"})}))]}))]}):jsxRuntime.exports.jsxs(jsxRuntime.exports.Fragment,{children:[jsxRuntime.exports.jsxs("div",Object.assign({className:classNames(d.formItem,d.formItemPw)},{children:[jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"body2",className:d.titleItem},{children:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar-panel.uIEJAQ",defaultMessage:"Password",description:"label of pasword field on profile panel"})})),jsxRuntime.exports.jsxs("div",Object.assign({className:d.passwordBox},{children:[jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"body1",className:d.valueItem},{children:"********"})),!f&&jsxRuntime.exports.jsx(IconButton$1,Object.assign({id:"btn-click-pw-reset",className:d.iconResetPw,onClick:()=>{E(!1),S(!0),C(!1)},size:"large"},{children:jsxRuntime.exports.jsx("img",{src:img$12,alt:""})}))]}))]})),jsxRuntime.exports.jsx("div",{children:jsxRuntime.exports.jsxs(Typography$1,Object.assign({variant:"subtitle1",className:d.lastUpdate},{children:[jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar-panel.qTqazR",defaultMessage:"Last updated",description:"last updated text label text on profile panel"})," ",(null!=e&&e.lastUpdated?DateTime_1.fromISO(null==e?void 0:e.lastUpdated):DateTime_1.local()).toFormat("LLL dd, yyyy")]}))})]})]})),_?jsxRuntime.exports.jsxs(jsxRuntime.exports.Fragment,{children:[jsxRuntime.exports.jsxs("div",Object.assign({className:d.resetBiometric},{children:[jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"subtitle1",className:d.pwResetTitle},{children:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar-panel.+DTt+G",defaultMessage:"Biometric Reset",description:"label of reset biometric container on profile panel"})})),jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"body1",className:d.pwResetDes1},{children:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar-panel.nzzfrY",defaultMessage:"Your Biometric Profile will be reset.",description:"description of reset biometric container on profile panel"})})),jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"body1"},{children:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar-panel.kk8TY8",defaultMessage:"Would you like to continue?",description:"confirm message of reset biometric on profile panel"})}))]})),jsxRuntime.exports.jsxs(DialogActions$1,Object.assign({className:d.actionForm},{children:[jsxRuntime.exports.jsx(Button$1,Object.assign({onClick:()=>{E(!1)},"data-test":"button-cancel-reset-biometric",color:"primary",className:classNames(d.btnAction,d.btnActionCancel)},{children:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar-panel.hdbMmi",defaultMessage:"Cancel",description:"the label of cancel button"})})),jsxRuntime.exports.jsx(Button$1,Object.assign({onClick:()=>{E(!1),t()},color:"primary",variant:"contained","data-test":"button-reset-biometric",className:d.btnAction},{children:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar-panel.ZXvsuR",defaultMessage:"Reset",description:"the label of reset button"})}))]}))]}):!$&&s&&jsxRuntime.exports.jsx("div",Object.assign({id:"click-reset-biometric",onClick:()=>{E(!0),S(!1),C(!1)}},{children:jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"body2",className:d.reset},{children:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar-panel.OlJtmF",defaultMessage:"Reset Biometric Profile",description:"label of Reset Biometric Profile on profile panel"})}))}))]})})),jsxRuntime.exports.jsx(TabPanel,Object.assign({value:j,index:1},{children:jsxRuntime.exports.jsx(AccountLinking,{})})),jsxRuntime.exports.jsx(TabPanel,Object.assign({value:j,index:2},{children:jsxRuntime.exports.jsx(ProfileSettings,{selectedLanguage:h,onPreferredLanguageChange:e=>{p(updateUserLanguageStart(e))}})}))]}))]}))};function SettingPanel({currentUser:e,activities:t,activityFilter:n,onChangeActivityFilter:r,handleResetBiometric:o,handleResetPassword:i,handleLogout:a,handleUpdateProfile:s,tabId:l,recentApp:c,applications:u,onClickApp:d,handleUploadAvatar:p,avatarHistory:f}){const h=useSelector(userSelector),[m,g]=react.exports.useState("");return react.exports.useEffect(()=>{g(h.loading)},[h]),jsxRuntime.exports.jsxs(jsxRuntime.exports.Fragment,{children:[l===TabId.PERSONAL_PANEL&&jsxRuntime.exports.jsx(PersonalProfile,{currentUser:e,handleLogout:a,handleResetBiometric:o,handleResetPassword:i,handleUpdateProfile:s,handleUploadAvatar:p,avatarHistory:f,loadingStatus:m}),l===TabId.APP_PANEL&&jsxRuntime.exports.jsx(ApplicationPanel,{recentApplist:c,applications:u,onClickApp:d}),l===TabId.ACTIVITY_PANEL&&jsxRuntime.exports.jsx(ActivityPanel,{filter:n,onChangeFilter:r,data:t||[]}),l===TabId.PERFORMANCE_MONITOR&&jsxRuntime.exports.jsx(PerformanceMonitor,{})]})}const namespace$1="applications",applicationSelector=e=>{return null==(e=null==e?void 0:e.aiWareHeaderBarPanel)?void 0:e[namespace$1]},HANDLE_CLICK_APP=`aiware/${namespace$1}/get handle click app`,REQUEST_GET_APPLICATION_V1=`aiware/${namespace$1}/request get app`,GET_APPLICATION_V1_START=`aiware/${namespace$1}/get app list start`,GET_APPLICATION_V1_SUCCESS=`aiware/${namespace$1}/get app list success`,GET_APPLICATION_V1_ERROR=`aiware/${namespace$1}/get app list error`;function requestGetApplications(){return{type:REQUEST_GET_APPLICATION_V1,payload:{}}}function getApplicationStart(){return{type:GET_APPLICATION_V1_START}}function getApplicationSuccess(e){return{type:GET_APPLICATION_V1_SUCCESS,payload:{data:e}}}function getApplicationError(e){return{type:GET_APPLICATION_V1_ERROR,payload:{message:e}}}const initialState$2={application:[],message:"",status:"idle"};function applicationReducer(e,t){if(void 0===e)return initialState$2;switch(t.type){case GET_APPLICATION_V1_START:return Object.assign(Object.assign({},e),{status:"loading"});case GET_APPLICATION_V1_SUCCESS:return Object.assign(Object.assign({},e),{application:t.payload.data,status:"success"});case GET_APPLICATION_V1_ERROR:return Object.assign(Object.assign({},e),{message:t.payload.message,status:"failure"});default:return e}}const namespace$4="activities",allActivitySeletor=e=>{return(null==(e=null==e?void 0:e.aiWareHeaderBarPanel)?void 0:e[namespace$4])||[]},today=DateTime_1.local().startOf("day"),activitySelector=createSelector([allActivitySeletor],e=>{const{records:t,filter:n}=e;return"today"===n?t.filter(e=>DateTime_1.fromISO(e.createdDateTime).hasSame(today,"day")):t}),GET_ACTIVITY=`os-app-bar-panel/${namespace$4}/get activity`,GET_ACTIVITY_SUCCESS=`os-app-bar-panel/${namespace$4}/get activity success`,UPDATE_ACTIVITY_FILTER=`os-app-bar-panel/${namespace$4}/update activity filter`;function getActivity(){return{type:GET_ACTIVITY}}function updateActivityFilter(e){return{type:UPDATE_ACTIVITY_FILTER,payload:e}}function getActivitySuccess(e){return{type:GET_ACTIVITY_SUCCESS,payload:e}}const initialState$1={records:[],filter:"all",fetched:!1,fetching:!1,processing:!1};function activityReducer(e,t){if(void 0===e)return initialState$1;switch(t.type){case GET_ACTIVITY_SUCCESS:return Object.assign(Object.assign({},e),{records:t.payload});case UPDATE_ACTIVITY_FILTER:var n=t.payload["filter"];return Object.assign(Object.assign({},e),{filter:n});default:return e}}combineReducers({[namespace$3]:userReducer,[namespace$4]:activityReducer,[namespace$1]:applicationReducer});const nameSpace$1="aiWareHeaderBarPanel";function*handleClickAppSaga(e){yield call$7(storeRecentApplications,e.payload)}function*getApplicationsSaga(){yield put(getApplicationStart());var e=yield select(rootApiSelector),t=yield select(sessionTokenSelector);const n=yield call$7(getApplicationsApi,e,t);n&&n.results?yield put(getApplicationSuccess(((null===n||void 0===n?void 0:n.results)||[]).map(e=>({id:e.applicationId,name:e.applicationName,iconUrl:e.signedApplicationIconUrl||e.applicationIconUrl||e.applicationIconSvg,description:e.applicationDescription})))):yield put(getApplicationError("something wrong"))}function*storeRecentApplications(e){var t=yield select(userSelector),t=(null==(t=null==t?void 0:t.currentUser)?void 0:t.id)||"",n=JSON.parse(localStorage.getItem("recentApplicationWithUserId")||"{}"),r=(null==n?void 0:n[t])||[],r=(r?(r=slice$3(uniq([e,...r]),0,6),localStorage.setItem("recentApplicationWithUserId",JSON.stringify(Object.assign(Object.assign({},n),{[t]:r})))):localStorage.setItem("recentApplicationWithUserId",JSON.stringify(Object.assign(Object.assign({},n),{[t]:[e]}))),yield select(switchApiSelector));window.open(r+"/"+e)}function*applicationSaga(){yield all([takeEvery$1(HANDLE_CLICK_APP,handleClickAppSaga),takeLatest$1(REQUEST_GET_APPLICATION_V1,getApplicationsSaga)])}function __awaiter(e,a,s,l){return new(s=s||Promise)(function(n,t){function r(e){try{i(l.next(e))}catch(e){t(e)}}function o(e){try{i(l.throw(e))}catch(e){t(e)}}function i(e){var t;e.done?n(e.value):((t=e.value)instanceof s?t:new s(function(e){e(t)})).then(r,o)}i((l=l.apply(e,a||[])).next())})}function delay(t=1e3){return __awaiter(this,void 0,void 0,function*(){return new Promise(e=>setTimeout(e,t))})}function goToPage(e){window.location.href=e}const uploadingStatus={LOADING:"loading",DONE:"done"};function*getCurrentUserSaga(){var e,t=yield select(graphEndpointSelector),n=yield select(sessionTokenSelector),t=yield call$7(getCurrentUserGraphQLApi,t,n);if(null!=t&&t.errors&&0<(null==t?void 0:t.errors.length)&&(null==(n=t.errors[0].path)||!n.includes("userSettings")))console.error("getCurrentUser error");else{n=(null==(n=null==(n=null==t?void 0:t.data)?void 0:n.me)?void 0:n.recentImageUrls)||[];const r=(null==(e=null==(e=null==t?void 0:t.data)?void 0:e.myRights)?void 0:e.operations)||[];yield put(getCurrentUserSuccess(Object.assign(Object.assign({},(null==(e=null==t?void 0:t.data)?void 0:e.me)||{}),{organizationRole:{organizationId:get$3(t,"data.me.organization.id",""),role:r.includes("veritone.superadmin")?"superadmin":r.includes("admin.access")?"admin":"user"},organization:Object.assign({},(null==(e=null==(e=null==t?void 0:t.data)?void 0:e.me)?void 0:e.organization)||{}),roles:((null==(t=null==(e=null==t?void 0:t.data)?void 0:e.me)?void 0:t.roles)||[]).map(e=>e.appName),avatarHistory:n})))}}function*resetBiometricSaga(){var e=yield select(rootApiSelector),t=yield select(sessionTokenSelector);yield call$7(resetBiometricApi,e,t)}function*resetPasswordSaga(e){var e=(null==(e=null==e?void 0:e.payload)?void 0:e.email)||"",t=yield select(graphEndpointSelector),e=yield call$7(resetPasswordApi,e,t);!1===(null==e?void 0:e.success)?yield put(resetPasswordFail()):yield put(showMessage({content:(null==(e=null==(t=null==e?void 0:e.data)?void 0:t.createPasswordResetRequest)?void 0:e.message)||"",severity:MessageSeverity.Info}))}function*updateProfileSaga(e){const t=null==e?void 0:e.payload,n=yield select(graphEndpointSelector),r=yield select(sessionTokenSelector);var e=yield select(preferredLanguageSelector),o=yield call$7(()=>updateUserProfileApi(t,n,r));const i=AIWareFormatMessage(e);!1===(null==o?void 0:o.success)?yield put(updateProfileFail()):(yield put(getCurrentUser()),yield put(showMessage({content:i({id:"os-app-bar-panel.snackbar.updateProfileSuccess",defaultMessage:[{type:0,value:"Success"}]}),severity:MessageSeverity.Success})))}function*uploadAvatarSaga(e){var e=null==e?void 0:e.payload,t=yield select(graphEndpointSelector),n=yield select(sessionTokenSelector),e=yield call$7(uploadUserAvatarApi,e,t,n);yield put(uploadingAvatar(uploadingStatus.LOADING)),e&&(yield put(updateAvatar(e)))}function*updateAvatarSaga(e){var e=null==e?void 0:e.payload,t=yield select(graphEndpointSelector),n=yield select(sessionTokenSelector),r=yield select(preferredLanguageSelector),e=yield call$7(updateUserAvatarApi,e,t,n);const o=AIWareFormatMessage(r);e.errors?yield put(updateProfileFail()):(yield put(showMessage({content:o({id:"os-app-bar-panel.snackbar.updateAvatarSuccess",defaultMessage:[{type:0,value:"Update avatar successfully"}]}),severity:MessageSeverity.Success})),yield put(getCurrentUser()),yield put(uploadingAvatar(uploadingStatus.DONE)))}function*hardLogout(){goToPage(yield select(logoutUrlSelector))}function*handleLogoutError(){var e=yield select(preferredLanguageSelector);const t=AIWareFormatMessage(e);yield put(showMessage({content:t({id:"os-app-bar-panel.snackbar.logoutError",defaultMessage:[{type:0,value:"Could not log out current user"}]}),severity:MessageSeverity.Error}))}function*redirectToLogoutOrError(){var e=yield select(logoutRedirectUrlSelector);e?goToPage(e):yield call$7(handleLogoutError)}function*logoutUser(){var e=yield select(graphEndpointSelector),t=yield select(authSelector),n=yield select(sessionTokenSelector),r=yield select(loginUrlSelector),o=yield select(logoutRedirectUrlSelector);try{if(!n)return yield put(logoutUserSuccess()),void(yield call$7(hardLogout));window.__logout_requested=!0,yield call$7(postNotificationApi,e,null==t?void 0:t.userId,{eventType:aiwareEvent,command:null===notificationCommands||void 0===notificationCommands?void 0:notificationCommands.goToLoginPage,value:window.navigator.userAgent},!0,"json",aiwareEvent,n),yield delay(500);var i=yield call$7(logoutUserApi,n,e);if(null!=i&&i.errors||!1===(null==i?void 0:i.success))return yield call$7(redirectToLogoutOrError),void(yield put(logoutUserFail()));yield put(logoutUserSuccess()),goToPage(o||r)}catch(e){yield call$7(handleLogoutError),yield put(logoutUserFail()),console.log(e)}}function*userSaga(){yield all([takeEvery$1(GET_CURRENT_USER,getCurrentUserSaga),takeLatest$1(RESET_BIOMETRIC,resetBiometricSaga),takeLatest$1(RESET_PASSWORD,resetPasswordSaga),takeLatest$1(UPDATE_PROFILE,updateProfileSaga),takeLatest$1(UPLOAD__AVATAR,uploadAvatarSaga),takeLatest$1(UPDATE__AVATAR,updateAvatarSaga),takeLatest$1(LOGOUT_USER,logoutUser)])}const formatActivityData=e=>{var t,{id:e,event:n,userId:r,userName:o,payload:i,createdDateTime:a}=e;return"login_succeeded"===n?{id:e,userId:r,createdDateTime:a,event:"Login succeeded",description:o+" logged in to Veritone"}:"logout_succeeded"===n?{id:e,userId:r,createdDateTime:a,event:"Logout succeeded",description:o+" successfully logged out"}:"add_user_succeeded"===n?(t=i["userName"],{id:e,userId:r,createdDateTime:a,event:"Add user succeeded",description:t+" successfully added"}):"org_updated"===n?(t=i["organizationName"],{id:e,userId:r,createdDateTime:a,event:"Org Name Changed",description:o+` updated org "${t}"`}):{id:e,userId:r,createdDateTime:a,event:"Unknown activity",description:"Unknown activity"}};function*getActivitySaga(){var e=yield call$7(getActivityApi);if(e.success){const t=e.data["records"];yield put(getActivitySuccess(t.map(formatActivityData)))}else{e=yield select(preferredLanguageSelector);const n=AIWareFormatMessage(e);yield put(showMessage({content:n({id:"os-app-bar-panel.snackbar.activityError",defaultMessage:[{type:0,value:"Something went wrong!"}]}),severity:MessageSeverity.Error}))}}function*activitySaga(){yield takeEvery$1(GET_ACTIVITY,getActivitySaga)}const BOOTING="aiware-header-bar/booting",BOOTED="aiware-header-bar/booted";function*bootFunction(){yield take(BOOTED)}function*booting(){yield takeEvery$1(BOOTING,bootFunction)}function*rootSaga(){yield all([fork(applicationSaga),fork(userSaga),fork(booting),fork(activitySaga)])}function getAppbarPanelModule(){return{id:"os-appbar-panel",reducerMap:{[nameSpace$1]:combineReducers({users:userReducer,activities:activityReducer,applications:applicationReducer})},sagas:[rootSaga],initialActions:[getActivity(),getCurrentUser(),requestGetApplications()],retained:!0}}const initialState$4={openIdConnectors:[],connectedOpenIds:[],message:"",status:LoadingStatus.Idle};function openIdConReducer(e,t){if(void 0===e)return initialState$4;switch(t.type){case GET_OPEN_ID_CONNECTORS:return Object.assign(Object.assign({},e),{status:0===e.openIdConnectors.length&&LoadingStatus.Pending});case GET_OPEN_ID_SUCCESS:return Object.assign(Object.assign({},e),{openIdConnectors:t.payload.data,status:LoadingStatus.Idle});case GET_CONNECTED_OPEN_ID_SUCCESS:return Object.assign(Object.assign({},e),{connectedOpenIds:t.payload.data});case GET_OPEN_ID_ERROR:return Object.assign(Object.assign({},e),{message:t.payload.message,status:LoadingStatus.Failed});default:return e}}const getAllOpenIdConnectorApi=(t,n,r)=>__awaiter(void 0,void 0,void 0,function*(){try{const e=yield fetch(t+"/api/admin/openid/org/"+n,{method:"GET",headers:Object.assign({"Content-Type":"application/json"},r&&{Authorization:"Bearer "+r}),credentials:"include"});return e.json()}catch(e){console.error(e)}}),getConnectedOpenIdConnectorApi=(t,n,r)=>__awaiter(void 0,void 0,void 0,function*(){try{const e=yield fetch(t+"/api/admin/openid/user/"+n,{method:"GET",headers:Object.assign({"Content-Type":"application/json"},r&&{Authorization:"Bearer "+r}),credentials:"include"});return e.json()}catch(e){console.error(e)}});function*getOpenIdConnectorSaga(){var n=yield select(sessionTokenSelector),r=yield select(rootApiSelector),o=(yield select(userSelector$1))["userName"];if(n&&r&&o){let e={},t={};e.results=yield select(selectOpenIdConnectors);try{var i=call$7(getAllOpenIdConnectorApi,r,o,n),a=call$7(getConnectedOpenIdConnectorApi,r,o,n);if(0===(null===e||void 0===e?void 0:e.results.length)?[e,t]=yield all([i,a]):t=yield a,!e||!t)return void(yield put(getOpenIdConnectorError("error on loading open ids")));yield put(getOpenIdConnectorSuccess(e.results)),yield put(getConnectedOpenIdsSuccess(t.results))}catch(e){yield put(getOpenIdConnectorError("error on loading open ids"))}}else yield put(getOpenIdConnectorError("Missing token,base url or username"))}function*openIdRootSaga(){yield takeEvery$1(GET_OPEN_ID_CONNECTORS,getOpenIdConnectorSaga)}function getOpenIdModule(){return{id:"open-id",reducerMap:{[namespace$2]:openIdConReducer},sagas:[openIdRootSaga],initialActions:[]}}function SettingPanelComponent({tabId:e}){const t=useDispatch(),{application:n=[]}=useSelector(applicationSelector)||{};var{currentUser:r={}}=useSelector(userSelector)||{};const{avatarHistory:o=[],id:i}=r;var a=useSelector(activitySelector)||[],s=useSelector(allActivitySeletor)["filter"];const[l,c]=react.exports.useState(0),[u,d]=react.exports.useState([]),[p,f]=react.exports.useState([]),h=react.exports.useCallback(()=>{var e=get$3(JSON.parse(localStorage.getItem("recentApplicationWithUserId")||"{}"),[i],[]);f(e)},[i]);return react.exports.useEffect(()=>{i&&h()},[i,h]),react.exports.useEffect(()=>{t(requestGetApplications()),t(getActivity()),t(getCurrentUser())},[t]),react.exports.useEffect(()=>{c(e||0)},[e]),react.exports.useEffect(()=>{if(0<p.length&&0<n.length){const t=p.join(",");var e=n.filter(e=>t.includes(""+e.id));d(e)}},[p,n]),jsxRuntime.exports.jsx(CacheProvider,Object.assign({value:muiCache},{children:jsxRuntime.exports.jsx(AIWareThemeProvider,{children:jsxRuntime.exports.jsx(AIWareIntlProvider,{children:jsxRuntime.exports.jsx(lib$4.DynamicModuleLoader,Object.assign({modules:[getAppbarPanelModule(),getOpenIdModule()]},{children:jsxRuntime.exports.jsx(SettingPanel,{tabId:l,currentUser:r,activities:a,activityFilter:s,onChangeActivityFilter:function(e){t(updateActivityFilter({filter:e}))},handleResetBiometric:function(){t(resetBiometric())},handleResetPassword:function(e){t(resetPassword({email:e}))},handleLogout:function(){t(logout())},handleUpdateProfile:function(e){t(updateProfile(e))},organizationRole:get$3(r,"organizationRole",{}),recentApp:u,applications:function(){const t=p.join(",");return n.filter(e=>!t.includes(""+e.id))}(),onClickApp:function(e){t(appSwitcherHandleClick(""+e)),setTimeout(()=>{h()},500)},handleUploadAvatar:function(e){t(uploadAvatar(e))},avatarHistory:o})}))})})}))}const CropImage=({url:e,handleCroppedImage:t})=>{const n=react.exports.useRef();return jsxRuntime.exports.jsx("div",Object.assign({style:{padding:"10px",background:"#F8F8F8",borderRadius:"4px",border:"1px solid #D5DFE9"}},{children:jsxRuntime.exports.jsx(ReactCropper,{ref:n,src:e,style:{height:"100%",width:"100%",borderRadius:"4px",maxHeight:"300px"},dragMode:"move",viewMode:1,width:"",aspectRatio:1,guides:!0,crop:()=>{n.current&&n.current.cropper.getCroppedCanvas().toBlob(function(e){t(e)},"image/jpeg")},cropBoxMovable:!1,cropBoxResizable:!1,toggleDragModeOnDblclick:!1})}))};function EditProFilePicture({onClose:e,onSaveAvatar:t,avatarHistory:n}){const r=useStyles$1$1()["classes"],[o,i]=react.exports.useState(""),[a,s]=react.exports.useState(),[l,c]=react.exports.useState(!1),[u,d]=react.exports.useState(!1);var p=react.exports.useRef(null);const f=react.exports.useRef(0),h=react.exports.useRef(null);const m=e=>{h.current&&(h.current.value=""),i(e),c(!0)};return jsxRuntime.exports.jsx(AIWareIntlProvider,{children:jsxRuntime.exports.jsxs("div",Object.assign({className:r.editProfilePictureContainer},{children:[jsxRuntime.exports.jsx("input",{accept:"image/*",className:r.inputFile,id:"icon-button-file",type:"file",onChange:e=>{e=e.target.files;if(e&&0<e.length){e=e[0];if(URL)m(URL.createObjectURL(e));else if(FileReader){const t=new FileReader;t.onload=function(){m(t.result)},t.readAsDataURL(e)}}},ref:h,"data-test":"image-upload-input","data-testid":"image-upload-input"}),jsxRuntime.exports.jsxs(Box$1,Object.assign({className:r.contentUserView},{children:[jsxRuntime.exports.jsx(Box$1,Object.assign({className:r.headerDrawer},{children:jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"h1",className:r.mainTitleText,"data-test":"edit-profile-picture-header"},{children:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar-panel.npW7Np",defaultMessage:"Edit Profile Picture",description:"The title of edit profile picture panel"})}))})),jsxRuntime.exports.jsxs(Box$1,Object.assign({className:r.contentEditAvatar},{children:[jsxRuntime.exports.jsx("div",Object.assign({className:classNames(u&&r.dragging),ref:p,onDragEnter:e=>{e.preventDefault(),e.stopPropagation(),f.current++,e.dataTransfer.items&&0<e.dataTransfer.items.length&&d(!0)},onDragLeave:e=>{e.preventDefault(),e.stopPropagation(),f.current--,0<f.current||d(!1)},onDragOver:e=>{e.preventDefault(),e.stopPropagation()},onDrop:e=>{if(e.preventDefault(),e.stopPropagation(),d(!1),e.dataTransfer.files&&0<e.dataTransfer.files.length){var t=e.dataTransfer.files;if(FileReader&&0<t.length){const n=new FileReader;n.onload=function(){m(n.result)},n.readAsDataURL(t[0])}e.dataTransfer.clearData(),f.current=0}}},{children:l?jsxRuntime.exports.jsx(CropImage,{url:o,handleCroppedImage:e=>{s(e)}}):jsxRuntime.exports.jsxs(Box$1,Object.assign({className:r.areaUpload},{children:[jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"subtitle1",className:r.descDrag},{children:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar-panel.LeafC8",defaultMessage:"Drag a profile photo here",description:"the label of upload file container"})})),jsxRuntime.exports.jsx(Box$1,{children:jsxRuntime.exports.jsx("img",{src:img$1t,alt:""})}),jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"subtitle2",className:r.descDrag2},{children:"- or -"})),jsxRuntime.exports.jsx(Button$1,Object.assign({variant:"outlined",color:"primary",id:"on-select-photo",className:r.btnSelectPhoto,onClick:()=>{h.current&&h.current.click()},"data-test":"edit-profile-picture-upload-file-button"},{children:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar-panel.CaHXXC",defaultMessage:"Select a photo from your computer",description:"edit profile picture panel: select photo label"})}))]}))})),0<(null==n?void 0:n.length)&&jsxRuntime.exports.jsxs(Box$1,Object.assign({className:r.recentlyBox},{children:[jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"subtitle1",className:r.recentlyText},{children:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar-panel.3gg72P",defaultMessage:"Recently Used Photos",description:"the label of recently used profile picture container"})})),jsxRuntime.exports.jsx(Grid$1,Object.assign({container:!0},{children:0<n.length&&n.map(e=>jsxRuntime.exports.jsx(Grid$1,Object.assign({xs:4,item:!0,className:r.imageGrid,"data-test":"recent-profile-picture"},{children:jsxRuntime.exports.jsx("img",{className:r.imgRecently,src:e,alt:"avatar"})}),e))}))]}))]}))]})),jsxRuntime.exports.jsxs(Box$1,Object.assign({className:r.actionButton+" "+r.editProfilePictureFooterButtons},{children:[jsxRuntime.exports.jsx(Button$1,Object.assign({color:"primary",onClick:()=>{i(""),s(void 0),c(!1),null!=e&&e()},className:classNames(r.btnAction,r.btnActionCancel),"data-test":"edit-profile-picture-cancel-button","data-testid":"edit-profile-picture-cancel-button"},{children:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar-panel.hdbMmi",defaultMessage:"Cancel",description:"the label of cancel button"})})),jsxRuntime.exports.jsx(Button$1,Object.assign({color:"primary",variant:"contained",id:"button-save-cropped-image",className:classNames(r.btnAction,r.btnSave),onClick:()=>{var e;a&&(e="avatar-"+(new Date).toISOString()+".jpeg",e=new File([a],e,{type:"image/jpeg"}),t(e),setTimeout(()=>{i(""),c(!1)},250))},"data-test":"edit-profile-picture-save-button"},{children:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar-panel.tcZkqy",defaultMessage:"Save",description:"label of save button in edit profile picture panel"})}))]}))]}))})}var index_esm$1=Object.freeze({__proto__:null,AppList:AppList,EditProFilePicture:EditProFilePicture,VeritonePanel:SettingPanelComponent,applicationSelector:applicationSelector,getAppbarPanelModule:getAppbarPanelModule,requestGetApplications:requestGetApplications});!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 nameSpace="@helpPanel",updateSelectedTab=createAction(nameSpace+"/UPDATE_SELECTED_TAB",function(e,t){return{payload:{selectedTabId:e,tabLink:t}}}),setCustomKnowledgeBaseUrl=createAction(nameSpace+"/SET_CUSTOM_KNOWLEDGE_BASE_URL",function(e){return{payload:{url:e}}}),setCustomDocsUrl=createAction(nameSpace+"/SET_CUSTOM_DOCS_URL",function(e){return{payload:{url:e}}}),initialState={selectedTabId:0,tabLink:"https://help.veritone.com/",customKnowledgeBaseUrl:"",customDocsUrl:""},getTabLinkReducer=createReducer(initialState,e=>{e.addCase(updateSelectedTab,(e,t)=>Object.assign(Object.assign({},e),{tabLink:t.payload.tabLink,selectedTabId:t.payload.selectedTabId})),e.addCase(setCustomKnowledgeBaseUrl,(e,t)=>Object.assign(Object.assign({},e),{customKnowledgeBaseUrl:t.payload.url})),e.addCase(setCustomDocsUrl,(e,t)=>Object.assign(Object.assign({},e),{customDocsUrl:t.payload.url}))});function*helpSaga(){yield takeEvery$1("OPEN_HELP_LINK",function*(){var e=yield select(e=>e.helpPanel.tabLink);yield put(openLinkOnNewTab({url:e}))})}const namespace="helpPanel",helpCenterSelectedTabIdSelector=e=>null!=e&&e[namespace]?e[namespace].selectedTabId:0,customDocsUrlSelector=e=>null!=e&&e[namespace]?e[namespace].customDocsUrl:"",customKnowledgeBaseUrlSelector=e=>null!=e&&e[namespace]?e[namespace].customKnowledgeBaseUrl:"";function getHelpPanelModule(){return{id:"help",reducerMap:{[namespace]:getTabLinkReducer},sagas:[helpSaga],initialActions:[]}}var knowledgeBaseUrl$1="https://docs.veritone.com/help/index.html",documentUrl$1="https://docs.veritone.com",config={knowledgeBaseUrl:knowledgeBaseUrl$1,documentUrl:documentUrl$1};const useStyles$1=makeStyles()(e=>({root:{height:"calc(100% - 110px)",textAlign:"left","& .Sdk-MuiTab-root.Mui-selected":{color:e.palette.text.primary,fontWeight:600}},tabs:{padding:e.spacing(2.4,6,0,6)},tabPanels:{width:"100%",height:"100%"},aiWareIcon:{position:"relative",maxHeight:50,opacity:"inherit",padding:e.spacing(4,3.2,0,3.2),display:"flex",justifyContent:"flex-end"},customTabs:{margin:e.spacing(0,4)},kbRoot:{height:"100%",textAlign:"left"},loadingContainer:{position:"absolute",height:"100%",width:"100%",display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:"white"},kbToolBarBox:{padding:e.spacing(6,6,1.6,6)},kbTabContent:{height:"calc(100% - 92px)"},kbTabPanel:{padding:e.spacing(6)},dRoot:{height:"100%",width:"100%"},dNavBar:{height:"100%",overflow:"hidden",background:"#F4F4F4"},dTitle:{color:"#2A323C",fontWeight:600,fontSize:"18px",lineHeight:"24px",padding:e.spacing(3.2)},dContent:{height:"100%",width:"100%",position:"relative"},dMenu:{overflowY:"auto",height:"calc(100% - 52px)"},drawerContainer:{display:"flex",height:"100%",background:e.palette.background.default},tabContainer:{borderRight:"0.5px solid #D5DFE9",overflow:"hidden",height:"100%",width:"100%"},tabName:{borderBottom:"0.5px solid #D5DFE9",display:"flex",justifyContent:"space-between",alignItems:"center",height:"64px",padding:e.spacing(0,6)},actionIcons:{margin:e.spacing(-2.4)},tabContent:{height:"calc(100vh - 57px - 60px)",overflowY:"auto",overflowX:"hidden"}})),documentUrl=config.documentUrl,Documentation=({path:e=documentUrl})=>{var t=useStyles$1()["classes"];const[n,r]=react.exports.useState(!0);return jsxRuntime.exports.jsxs("div",Object.assign({className:classNames(t.dRoot,"hide-in-percy")},{children:[n&&jsxRuntime.exports.jsx("div",Object.assign({className:t.loadingContainer},{children:jsxRuntime.exports.jsx(CircularProgress$1,{})})),jsxRuntime.exports.jsx("iframe",{"data-cy":"docs-iframe",title:"Document Iframe",style:{width:"100%",height:"100%"},src:e,frameBorder:"0",onLoad:function(){setTimeout(()=>{r(!1)},1e3)}})]}))},knowledgeBaseUrl=config["knowledgeBaseUrl"];function Knowledgebase({path:e=knowledgeBaseUrl}){var t=useStyles$1()["classes"];const[n,r]=react.exports.useState(!0);return jsxRuntime.exports.jsxs("div",Object.assign({className:t.kbRoot},{children:[n&&jsxRuntime.exports.jsx("div",Object.assign({className:t.loadingContainer},{children:jsxRuntime.exports.jsx(CircularProgress$1,{})})),jsxRuntime.exports.jsx("iframe",{"data-cy":"knowledgebase-iframe",title:"Knowledgebase Iframe",style:{width:"100%",height:"100%"},src:e,frameBorder:"0",onLoad:function(){r(!1)}})]}))}const defaultLocale="en-us",tabsList=[{label:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-help-panel.au1+VZ",defaultMessage:"Knowledgebase",description:"Help Panel: Knowledgebase tab label"}),disabled:!1,url:"https://help.veritone.com/"},{label:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-help-panel.8bnkm8",defaultMessage:"Documentation",description:"Help Panel: Documentation tab label"}),disabled:!1,url:"https://docs.veritone.com/#/aiware/"}];function HelpCenter(e){var t=useSelector(initialConfigSelector),n=useSelector(customKnowledgeBaseUrlSelector),r=useSelector(customDocsUrlSelector),o=useSelector(helpCenterSelectedTabIdSelector);const i=useSelector(e=>null==e?void 0:e.panels);var a=useStyles$1()["classes"],[s]=react.exports.useState(defaultLocale);const l=useDispatch();var c=null===i||void 0===i?void 0:i.find(e=>"CUSTOM_HELP_PANEL_ID"===e.panelId),n=c&&n?n:t.knowledgeBaseURL,c=c&&r?r:t.docsURL;return jsxRuntime.exports.jsx(lib$4.DynamicModuleLoader,Object.assign({modules:[getHelpPanelModule()]},{children:jsxRuntime.exports.jsx(AIWareIntlProvider,Object.assign({locale:s},{children:jsxRuntime.exports.jsx("div",Object.assign({className:a.drawerContainer},{children:jsxRuntime.exports.jsx("div",Object.assign({id:"setting-content",className:a.tabContainer},{children:jsxRuntime.exports.jsx("div",Object.assign({className:a.tabContent},{children:jsxRuntime.exports.jsx("div",Object.assign({className:a.root},{children:jsxRuntime.exports.jsxs("div",Object.assign({className:a.tabPanels},{children:[jsxRuntime.exports.jsx("div",Object.assign({className:a.customTabs},{children:jsxRuntime.exports.jsx(CustomTabs,{selectedId:o,onChangeTab:e=>{l(updateSelectedTab(e,tabsList[e].url))},tabsList:tabsList})})),jsxRuntime.exports.jsxs(Box$1,Object.assign({className:a.tabPanels},{children:[jsxRuntime.exports.jsx(TabPanel,Object.assign({value:o,index:0},{children:jsxRuntime.exports.jsx(Knowledgebase,{path:n})})),jsxRuntime.exports.jsx(TabPanel,Object.assign({value:o,index:1},{children:jsxRuntime.exports.jsx(Documentation,{path:c})}))]})),jsxRuntime.exports.jsx("div",Object.assign({className:a.aiWareIcon},{children:jsxRuntime.exports.jsx("img",{src:img$w,alt:"icon",draggable:"false"})}))]}))}))}))}))}))}))}))}var index_esm=Object.freeze({__proto__:null,HelpCenterPanel:HelpCenter,customDocsUrlSelector:customDocsUrlSelector,customKnowledgeBaseUrlSelector:customKnowledgeBaseUrlSelector,helpCenterSelectedTabIdSelector:helpCenterSelectedTabIdSelector,setCustomDocsUrl:setCustomDocsUrl,setCustomKnowledgeBaseUrl:setCustomKnowledgeBaseUrl,updateSelectedTab:updateSelectedTab});const useStyles=makeStyles()(()=>({dialog:{top:"125px",overflowX:"hidden",overflowY:"hidden",display:"flex",alignItems:"center",flexDirection:"column"},container:{borderRadius:"4px",backgroundColor:"#fff",width:"430px",overflow:"hidden",outline:0,boxShadow:"0px 0px 7px rgba(0, 0, 0, .25)"},header:{textTransform:"capitalize"},appListContainer:{width:"100%"},orgName:{fontWeight:"bold"}})),ApplicationDialog=()=>{var e=useSelector(userSelector$1),t=useStyles()["classes"];const n=useSelector(initialConfigSelector).applicationId;var r=useSelector(applicationSelector);const o=useSelector(switchApiSelector),i=(null==r?void 0:r.application)||[];r=null==r?void 0:r.status;const a=[...i];var s=a.sort(function(e,t){return e.name>t.name?1:e.name<t.name?-1:0}),l=i.findIndex(e=>e.id===n);return/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i.test(n)&&l<0&&"success"===r?jsxRuntime.exports.jsx(Modal$1,Object.assign({className:t.dialog,open:!0},{children:jsxRuntime.exports.jsxs("div",Object.assign({className:t.container},{children:[jsxRuntime.exports.jsx(Typography$1,Object.assign({"data-test":"application-dialog-title",className:t.header,variant:"h1",sx:{px:"30px",pt:"30px"}},{children:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"js-core-app-dialog-title",defaultMessage:"Application Not Available",description:"Title for modal"})})),jsxRuntime.exports.jsxs(Typography$1,Object.assign({variant:"body2",sx:{px:"30px",pt:"10px"}},{children:[jsxRuntime.exports.jsx(FormattedMessage$1,{id:"js-core-app-dialog-message1",defaultMessage:"Looks like you switched organizations, your current application is not available in the current",description:"Description current application not available"})," ",jsxRuntime.exports.jsx("span",Object.assign({className:t.orgName},{children:null!=(l=null==e?void 0:e.organization)&&l.organizationName?e.organization.organizationName:""}))," ",jsxRuntime.exports.jsx(FormattedMessage$1,{id:"js-core-app-dialog-message2",defaultMessage:"organization you are viewing.",description:"Description current application not available"})]})),jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"body2",sx:{px:"30px",pt:"20px"}},{children:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"js-core-app-dialog-message3",defaultMessage:"Please select from the available applications below to be redirected.",description:"Instructions for current application not available"})})),jsxRuntime.exports.jsx("div",Object.assign({className:t.appListContainer},{children:jsxRuntime.exports.jsx(AppList,{title:"",selectedAppId:null,onSelectApplication:e=>{window.open(o+"/"+e,"_self")},applications:s,useGrid:!1,row:3})}))]}))})):null};function SnackbarRenderer(){return jsxRuntime.exports.jsx(Provider$1,Object.assign({store:store$4},{children:jsxRuntime.exports.jsx(lib$4.DynamicModuleLoader,Object.assign({modules:[getSnackbarModule()]},{children:jsxRuntime.exports.jsx(CustomSnackbar,{})}))}))}store$4.addModules([getWidgetsModule(),getPanelsModule(registry,registryLookup),getDataModule(),getConfigModule(),getAuthModule()]);let hasLoaded=!1;const AppBarPreLoader=()=>{var e=useSelector(authSelector);return(null==(e=null==e?void 0:e.user)?void 0:e.token)&&!hasLoaded&&(hasLoaded=!0,setTimeout(()=>{store$4.addModules([getAppbarPanelModule()])},0)),null};function ApplicationDialogPreLoader(){var e=useSelector(authSelector);return(null==(e=null==e?void 0:e.user)?void 0:e.token)&&hasLoaded?jsxRuntime.exports.jsx(ApplicationDialog,{}):null}const authHelpers={updateToken(e){e?store$4.dispatch(updateTokenRequest({token:e})):console.error("[AiWARE JS]: Please provide a valid token!")},logout(e){"function"==typeof e?(e(),setTimeout(()=>{store$4.dispatch(logout())},1e3)):store$4.dispatch(logout())}};function PortalRenderer(){return jsxRuntime.exports.jsxs(jsxRuntime.exports.Fragment,{children:[jsxRuntime.exports.jsx(SupportCenterPixel,{}),jsxRuntime.exports.jsx(Provider$1,Object.assign({store:store$4},{children:jsxRuntime.exports.jsx(AppBarPreLoader,{})}))]})}function ApplicationDialogRenderer(){return jsxRuntime.exports.jsx(jsxRuntime.exports.Fragment,{children:jsxRuntime.exports.jsx(Provider$1,Object.assign({store:store$4},{children:jsxRuntime.exports.jsx(AIWareIntlProvider,{children:jsxRuntime.exports.jsx(ApplicationDialogPreLoader,{})})}))})}const ThemeInitializer=()=>(useTheme(),null),root=getElement("aiWARE"),mountWidget=(root.classList.add("aiware-el"),ReactDOM.render(jsxRuntime.exports.jsx(CacheProvider,Object.assign({value:muiCache},{children:jsxRuntime.exports.jsxs(AIWareThemeProvider,{children:[jsxRuntime.exports.jsx(PortalRenderer,{}),jsxRuntime.exports.jsx(SnackbarRenderer,{}),jsxRuntime.exports.jsx(ApplicationDialogRenderer,{}),jsxRuntime.exports.jsx(ThemeInitializer,{})]})})),root),e=>{var t=getUniqueID(),{name:e,elementId:n,config:r}=e;return e&&n&&r||console.error("[aiwarejs-error]: `mountWidget` function should include all the following params: name, elementId, config"),store$4.dispatch(mountWidget$1({elementId:n,widgetName:e,widgetConfig:r,widgetId:t})),t}),unmountWidget=e=>(store$4.dispatch(unmountWidget$1(e)),!0),mountPanel=(e,t)=>{const n=e.panelId||getUniqueID();var{microFrontend:e,panelConfig:r}=e;store$4.dispatch(mountPanel$1({microFrontend:e,panelId:n,panelConfig:r}));const o=[...(null==(e=null==r?void 0:r.header)?void 0:e.actions)||[],...(null==(e=null==r?void 0:r.footer)?void 0:e.actions)||[]].filter(e=>e.submit).map(e=>e.action);r={id:n,sagas:[function*(){yield takeEvery$1(o.map(e=>e.type),function*(){var e=(yield select(e=>e.data.find(e=>e.id===n)))["data"];t&&t(e)})}]};return store$4.addModule(r),n},unmountPanel=e=>(store$4.dispatch(unmountPanel$1(e)),!0),hidePanel=e=>(store$4.dispatch(hidePanel$1(e)),!0),unmountAllPanel=()=>{store$4.dispatch(unmountAllPanel$1(""))};function init(e,t){validateConfig(e)&&store$4.dispatch(getInitConfig(Object.assign(Object.assign({},e),{onComplete:t})))}function helpCenter(){const e=new HelpCenter$2({actions:{setCustomKnowledgeBaseUrlAction:setCustomKnowledgeBaseUrl,setCustomDocsUrlAction:setCustomDocsUrl,updateSelectedTabAction:updateSelectedTab}});return{openKnowledgeBasePanel:e.openKnowledgeBasePanel.bind(e),openDocsPanel:e.openDocsPanel.bind(e)}}function dataCenter(){const e=new DataCenter$1;return{openImporterPanel:e.openImporterPanel.bind(e)}}function handleEvents(){function n(e){if(!e||"string"!=typeof e)throw new SdkError("Please provide a valid event name!");if(!SdkEvents[e])throw new SdkError("Unknown event: "+e)}return{on:function(e,t){n(e),sdkEventManager.on.call(sdkEventManager,e,t)},off:function(e){n(e),sdkEventManager.off.call(sdkEventManager,e)}}}const mountPanelForResponse=e=>mountPanelForResponse$1(e,store$4),aiwareEvents=handleEvents();window&&(window.aiWare_initTesting=()=>{window.aiWare_store=store$4,window.aiWare_theme={darkTheme:darkTheme,lightTheme:lightTheme}},window.aiware={init:init,auth:authHelpers,helpCenter:helpCenter(),dataCenter:dataCenter(),on:aiwareEvents.on,off:aiwareEvents.off,hidePanel:hidePanel,unmountPanel:unmountPanel,store:store$4,registry:registry,registerComponent:registerComponent,AvailableWidgets:AvailableWidgets,mountPanelAction:mountPanel$1,unmountPanelAction:unmountPanel$1,hidePanelAction:hidePanel$1,updatePanelMicroFrontendPropsAction:updatePanelMicroFrontendProps,setData:setData,mountWidget:mountWidget,mountPanel:mountPanel,mountPanelForResponse:mountPanelForResponse,unmountWidget:unmountWidget,commit:"de31d098c"});export{getSortName as $,AIWareIntlProvider as A,ButtonBase$1 as B,img$18 as C,img$3 as D,img$17 as E,FormattedMessage$1 as F,useDispatch as G,useSelector as H,betaFeaturesSelector as I,authSelector as J,applicationSelector as K,mountPanel$1 as L,listenLogout as M,appSwitcherSetupListener as N,AIWareThemeProvider as O,Provider$1 as P,lib$4 as Q,getAppbarPanelModule as R,getEventsModule as S,Typography$1 as T,isEqual as U,IconButton$1 as V,classNames as W,Tooltip$1 as X,Badge$1 as Y,Avatar$1 as Z,_extends as _,generateUtilityClasses as a,img$1b as a$,img$O as a0,TabId as a1,Popover$1 as a2,List$2 as a3,ListItem$1 as a4,ListItemText$1 as a5,Divider$1 as a6,isIdleSelector as a7,userSelector$1 as a8,sessionTokenSelector as a9,logoutUser$1 as aA,call$7 as aB,appSwitcherHandleClick as aC,appSwitcherHandleClickAppNatively as aD,select as aE,graphEndpointSelector as aF,get$3 as aG,baseGraphQLApi as aH,__rest$4 as aI,invariant$2 as aJ,__assign$2 as aK,useIntl as aL,createAction as aM,createReducer as aN,delay$1 as aO,configSelector as aP,eventChannel as aQ,gql as aR,createApolloWs as aS,createApolloClient as aT,fetchUserSuccess as aU,cancel as aV,createSvgIcon$2 as aW,createSelector as aX,img$D as aY,img$1c as aZ,img$1a as a_,loginUrlSelector as aa,callLogoutSelector as ab,clickedLogoutSelector as ac,callResetIdleTimerSelector as ad,sessionTimeoutSelector as ae,reloadPageSelector as af,resetIdleTimerCallCounterSelector as ag,postNotificationCommand as ah,aiwareEvent as ai,notificationCommands as aj,logoutRequest as ak,refreshTokenRequest as al,Dialog$1 as am,DialogTitle$1 as an,DialogContent$1 as ao,DialogContentText$1 as ap,DialogActions$1 as aq,Button$1 as ar,all as as,fork as at,takeLatest$1 as au,hidePanel$1 as av,takeEvery$1 as aw,take as ax,logout as ay,put as az,styled$1 as b,img$n as b$,img$C as b0,img$B as b1,img$A as b2,Notifications as b3,img$1i as b4,img$1h as b5,img$1g as b6,img$1e as b7,img$1f as b8,img$1d as b9,createChainedFunction as bA,useForkRef as bB,useId as bC,formControlState as bD,authStatusSelector as bE,authContextSelector as bF,AuthContext as bG,lodash as bH,Alert$1 as bI,authErrorMessage as bJ,Grid$1 as bK,TextField$1 as bL,LoadingButton$1 as bM,resetPasswordRequest as bN,createSlice as bO,ENGINE_OWNER_TYPES as bP,ENGINE_FILTER_TYPES as bQ,preferredLanguageSelector as bR,baseUrlSelector as bS,rootApiSelector as bT,controllerNodeRedImageSelector as bU,controllerUrlSelector as bV,automateControllerUrlSelector as bW,automateUrlSelector as bX,Portal$1 as bY,img$k as bZ,img$l as b_,NotificationFlag as ba,CircularProgress$1 as bb,Filter as bc,Email as bd,HelpCenter$1 as be,Banner as bf,FormControl$1 as bg,Box$1 as bh,img$E as bi,unmountPanel$1 as bj,ListItemAvatar$1 as bk,img$1n as bl,img$1m as bm,img$1l as bn,TableContainer$1 as bo,Table$1 as bp,TableHead$1 as bq,TableRow$1 as br,TableCell$1 as bs,TableBody$1 as bt,Icon$1 as bu,img$1k as bv,img$1j as bw,ListContext$1 as bx,getListItemIconUtilityClass as by,rootShouldForwardProp$1 as bz,Paper$1 as c,getAuthModule as c$,img$o as c0,img$e as c1,getNodeRedVersionEdgeApi as c2,createEnginebuild as c3,Skeleton$1 as c4,fetchAllTags as c5,fetchFlows as c6,fetchTemplateGallery as c7,isRevisionsExistOnServerRequest as c8,FormLabel$1 as c9,Tab$1 as cA,deleteEngine as cB,img$g as cC,AIWareFormatMessage as cD,FormattedDate as cE,useTheme as cF,KeyboardArrowRight as cG,KeyboardArrowLeft as cH,InputUnstyled as cI,isHostComponent as cJ,getDefaultExportFromNamespaceIfNotNamed as cK,commonjsRequire as cL,_assertThisInitialized$1 as cM,_setPrototypeOf$2 as cN,reactDom as cO,React$1 as cP,_inheritsLoose$1 as cQ,ReactDOM as cR,__awaiter$6 as cS,__generator$2 as cT,__spread as cU,connect as cV,Bookmark as cW,EngineFlagIcons as cX,createAsyncThunk as cY,withStyles as cZ,getConfigModule as c_,default_1$1 as ca,fetchTemplateGalleryFallback as cb,img$i as cc,flowStyles as cd,NoResults as ce,fetchVeritoneGraphQLApi as cf,img$8 as cg,setApiEndpoint as ch,getTemplateById as ci,getTemplateByIdFallback as cj,TableSortLabel$1 as ck,img$d as cl,Popper$1 as cm,ClickAwayListener as cn,Fade$1 as co,img$p as cp,img$m as cq,img$M as cr,img$y as cs,Snackbar$1 as ct,Select$1 as cu,MenuItem$1 as cv,img$f as cw,img$h as cx,img$Q as cy,Tabs$1 as cz,capitalize$2 as d,_arrayPush as d$,getSnackbarModule as d0,CacheProvider as d1,muiCache as d2,img$N as d3,img$a as d4,img$9 as d5,isEmpty_1 as d6,Backdrop$1 as d7,getDefaultMiddleware as d8,isNil_1 as d9,useEnhancedEffect$1 as dA,combineReducers as dB,Close as dC,FullscreenExit as dD,Fullscreen as dE,TabPanel as dF,MoreVert as dG,Menu$1 as dH,Edit as dI,Upload as dJ,Delete as dK,CustomTabs as dL,useBackupImg as dM,baseGraphQLApiWithError as dN,useDoubleClick as dO,VerifiedFilled as dP,Add as dQ,img$12 as dR,Filter$1 as dS,Collapse$1 as dT,DynamicTable as dU,useTheme$2 as dV,getThemeProps as dW,React$2 as dX,_Symbol as dY,isArguments_1 as dZ,isArray_1 as d_,UpDown as da,get_1 as db,map_1 as dc,keys_1 as dd,img$s as de,FormHelperText$1 as df,img$c as dg,StyledEngineProvider as dh,ThemeProvider as di,lightTheme as dj,CssBaseline as dk,Hide as dl,showMessage as dm,MessageSeverity as dn,fetchEngine as dp,_hasPath as dq,_createCompounder as dr,_baseIteratee as ds,isArrayLike_1 as dt,toInteger_1 as du,hoistNonReactStatics_cjs as dv,Transition$1 as dw,commonjsGlobal$1 as dx,getDefaultExportFromCjs as dy,TransitionGroup$1 as dz,_objectWithoutPropertiesLoose$1 as e,EngineClassIcons as e$,_getNative as e0,eq_1 as e1,_castPath as e2,_isIndex as e3,isObject_1 as e4,_toKey as e5,_root as e6,_Uint8Array as e7,_overArg as e8,_isPrototype as e9,composeWithDevTools as eA,orange$1 as eB,deepOrange$1 as eC,createTheme$1 as eD,createIntl as eE,SvgIcon$1 as eF,unmountAllPanel$1 as eG,isNull_1 as eH,size_1 as eI,startCase_1 as eJ,times_1 as eK,ReactIs as eL,upperFirst_1 as eM,isString_1 as eN,_baseSlice as eO,channel as eP,VideoCamera as eQ,Image$1 as eR,Sound as eS,Description as eT,toNumber_1 as eU,ProgressStepper as eV,CurlyBraces as eW,UnknownDocument as eX,sdkEventManager as eY,SdkEvents as eZ,SdkError as e_,isObjectLike_1 as ea,_baseGetTag as eb,_arrayLikeKeys as ec,isBuffer$3 as ed,isFunction_1 as ee,isTypedArray_1 as ef,_Stack as eg,_baseFor as eh,identity_1 as ei,_isIterateeCall as ej,_Set as ek,_setToArray as el,_SetCache as em,_cacheHas as en,_baseToString as eo,_baseTrim as ep,_castSlice as eq,_stringToArray as er,toString_1 as es,isSymbol_1 as et,_arrayMap as eu,_baseMap as ev,_baseGet as ew,_baseUnary as ex,lib as ey,getThunkExtension_1 as ez,clsx as f,emphasize as f$,Mode2 as f0,EngineModeIcons as f1,DeploymentModelIcons as f2,guid as f3,FormControlContext$1 as f4,extendSxProp as f5,handleBreakpoints as f6,resolveBreakpointValues as f7,createUnarySpacing as f8,deepmerge as f9,LibraryCenter as fA,AdminCenter as fB,img$P as fC,img$1 as fD,img$w as fE,enableBetaFeatures as fF,openLinkOnNewTab as fG,avatarClasses$1 as fH,injectIntl as fI,img$5 as fJ,InputLabel$1 as fK,OrganizationTabIcon as fL,ScopedCssBaseline$1 as fM,AlarmTwo as fN,getApplicationsApi as fO,ListItemSecondaryAction$1 as fP,updateTokenSuccess as fQ,panelsSelector as fR,css as fS,img$J as fT,img$I as fU,img$1r as fV,img$1q as fW,img$1p as fX,img$G as fY,img$1s as fZ,img$F as f_,getValue$2 as fa,useEventCallback as fb,setRef as fc,inputClasses$1 as fd,inputBaseClasses$1 as fe,outlinedInputClasses$1 as ff,filledInputClasses$1 as fg,ClearIcon as fh,ArrowDropDownIcon as fi,_baseEach as fj,_arrayFilter as fk,useIsFocusVisible as fl,ownerDocument as fm,appendOwnerState as fn,slotShouldForwardProp as fo,shouldSpreadAdditionalProps$1 as fp,Slide$1 as fq,updatePanelMicroFrontendProps as fr,setData as fs,keyframes as ft,PersonalProfile$1 as fu,Organizations as fv,DataCenter as fw,FlowCenter2 as fx,DeveloperCenter as fy,Marketplace as fz,generateUtilityClass as g,Input$1 as g$,_arraySome as g0,Process as g1,Information as g2,NewFolder as g3,SpecialFolder as g4,User as g5,Source as g6,ProcessingDetail as g7,Search as g8,getLibraryModule as g9,YoutubeSource as gA,PodcastSource as gB,TVSource as gC,RadioSource as gD,selectOrgGuid as gE,selectOrgId as gF,selectIsUserAdmin as gG,ErrorState$1 as gH,StepConnector$1 as gI,NullState$2 as gJ,Group as gK,PermissionChangedAction as gL,AddGroup as gM,StepperContext$1 as gN,StepContext$1 as gO,initialConfigSelector as gP,ConfirmationModal as gQ,EnumHelpers as gR,formatBytes as gS,NotInterested as gT,mountPanelForResponse$1 as gU,Lock as gV,SecurityGroup as gW,selectors as gX,LibraryDropdown as gY,Remove as gZ,Save as g_,selectApiConfigs$1 as ga,FullScreenContainer as gb,cmsUrlSelector as gc,UserAddFilled as gd,MenuList$1 as ge,MoveFolder as gf,ErrorBoundary as gg,Download as gh,img$6 as gi,selectPanelByPanelName as gj,EngineCategoryIcons as gk,Settings$1 as gl,Hamburger as gm,List as gn,EditAttributes as go,MoreHor as gp,ExpandMore as gq,img$r as gr,img$t as gs,img as gt,FolderOpen as gu,Voice as gv,FolderFilled as gw,Time as gx,img$u as gy,Undefined as gz,composeClasses as h,AvailableComponents as h0,registry as h1,registerComponent as h2,AvailableWidgets as h3,root as h4,mountWidget as h5,unmountWidget as h6,mountPanel as h7,unmountPanel as h8,hidePanel as h9,unmountAllPanel as ha,init as hb,alpha as i,jsxRuntime as j,darken as k,lighten as l,makeStyles as m,useControlled as n,useFormControl as o,createSvgIcon$1 as p,interopRequireDefault as q,react as r,store$4 as s,img$1v as t,useThemeProps as u,img$_ as v,img$1u as w,img$19 as x,img$2 as y,img$4 as z};
960
+ `,operationName:e},t)))[e]})}function*getLibrariesSaga(){try{var n=yield select(selectApiConfigs);let e=0,t=[];for(;;){var r=yield fetchLibraries(n,e,100);if(t=[...t,...null==r?void 0:r.records],100!==r.count)break;e+=100}yield put(actions.fetchLibrariesSuccess({libraries:t}))}catch(e){yield put(actions.fetchLibrariesFailed()),console.log(e)}}function*getLibrariesWatcher(){yield takeLatest$1(actions.fetchLibrariesStart,getLibrariesSaga)}function*rootSaga$1(){yield all([getLibrariesWatcher()])}function getLibraryModule(){return{id:namespace$5,reducerMap:{[namespace$5]:reducer},initialActions:[],sagas:[rootSaga$1]}}store$4.addModules([getConfigModule(),getAuthModule(),getSnackbarModule()]);const urlParams=window.location.search.substr(1).split("&").reduce((e,t)=>{var[t,n]=t.split("=");return Object.assign(Object.assign({},e),{[t]:n})},{}),StyledTabs=(null!==urlParams&&void 0!==urlParams&&urlParams.authToken,withStyles(Tabs$1,()=>({root:{borderBottom:"1px solid #e8e8e8"},indicator:{height:"3px",backgroundColor:"#1B1D1F"}}))),StyledTab=withStyles(e=>{return jsxRuntime.exports.jsx(Tab$1,Object.assign({disableRipple:!0},e,{"data-test":`${(null==e?void 0:e.id)||(null==(e=null==(e=null==e?void 0:e.label)?void 0:e.props)?void 0:e.defaultMessage[0])}-tab`}))},e=>({root:{fontFamily:"Nunito",fontSize:e.typography.fontSize,lineHeight:"18px",textTransform:"none",minWidth:72,fontWeight:e.typography.fontWeightRegular,flex:1}}));function CustomTabs({selectedId:e,onChangeTab:n,tabsList:t=[]}){const[r,o]=react.exports.useState(e);react.exports.useEffect(()=>{e!==r&&o(e)},[e,r]);return jsxRuntime.exports.jsx(StyledTabs,Object.assign({value:r,onChange:(e,t)=>{e.preventDefault(),o(t),n(t)}},{children:t.map((e,t)=>jsxRuntime.exports.jsx(StyledTab,{label:e.label,disabled:e.disabled,id:e.id},t))}))}function TabPanel(e){var{children:t,value:n,index:r}=e,e=__rest$1(e,["children","value","index"]);return jsxRuntime.exports.jsx("div",Object.assign({role:"tabpanel",style:{width:"100%",height:"100%"},hidden:n!==r,id:"scrollable-prevent-tabpanel-"+r,"aria-labelledby":"scrollable-prevent-tab-"+r},e,{children:n===r&&t}))}const SHARED_MESSAGES={noSearchResultsFound:()=>jsxRuntime.exports.jsx(FormattedMessage$1,{id:"flow-center-search-results",defaultMessage:"No results found",description:"No results found"}),noSearchResultsFoundSubtitle:()=>jsxRuntime.exports.jsx(FormattedMessage$1,{id:"flow-center-search-results-subtitle",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."})},useStyles$4$1=makeStyles()(()=>({container:{width:"100%",height:"100%",display:"flex",justifyContent:"center",alignItems:"center",marginTop:50,flexDirection:"column"},icon:{},textContainer:{marginTop:68,maxWidth:400,display:"flex",justifyContent:"center",alignItems:"center",flexDirection:"column"},title:{fontFamily:"Nunito!important",fontStyle:"normal!important",fontWeight:400,fontSize:"18px!important",lineHeight:"24px!important",color:"#1B1D1F!important"},subtitle:{marginTop:12,fontFamily:"Nunito!important",fontStyle:"normal!important",fontWeight:600,fontSize:"16px!important",lineHeight:"22px!important",color:"#5C6269!important",textAlign:"center"}}));function NoResults(){var e=useStyles$4$1()["classes"];return jsxRuntime.exports.jsxs("div",Object.assign({className:e.container},{children:[jsxRuntime.exports.jsx("img",{className:e.icon,src:img$7,alt:"noSearchResultsImg"}),jsxRuntime.exports.jsxs("div",Object.assign({className:e.textContainer},{children:[jsxRuntime.exports.jsx(Typography$1,Object.assign({className:e.title},{children:SHARED_MESSAGES.noSearchResultsFound()})),jsxRuntime.exports.jsx(Typography$1,Object.assign({className:e.subtitle},{children:SHARED_MESSAGES.noSearchResultsFoundSubtitle()}))]}))]}))}const flowStyles=makeStyles()(e=>({title:{fontFamily:"Nunito",fontStyle:"normal",fontWeight:"normal",fontSize:"12px!important",lineHeight:"16px!important",letterSpacing:"-1.30385e-09px!important",color:"#5C6269!important"},borderBottomLineHeader:{opacity:"0.9!important",borderBottom:"0.5px solid #D5DFE9",paddingLeft:"16px!important",paddingBottom:"8px!important"},firstTitle:{paddingLeft:"28px!important"},firstColumn:{paddingLeft:"12px!important"},borderBottomLine:{padding:"0px!important",paddingLeft:"16px!important"},borderBottomLineRow:{borderBottom:"0.5px solid #D5DFE9!important",opacity:"0.9!important",paddingLeft:"12px!important"},flowName:{fontFamily:"Nunito",fontStyle:"normal",fontWeight:"normal",fontSize:"16px!important",lineHeight:"22px!important",letterSpacing:"-1.30385e-09px!important",color:"#2A323C!important",marginTop:"0px!important",marginBottom:"0px!important"},flowVersion:{fontFamily:"Nunito",fontStyle:"normal",fontWeight:"normal",fontSize:"10px!important",lineHeight:"16px!important",letterSpacing:"-1.30385e-09px!important",color:"#5C6269!important",marginLeft:"8px!important",marginTop:"0px!important",marginBottom:"0px!important"},flowMode:{fontFamily:"Nunito",fontStyle:"normal",fontWeight:"normal",fontSize:"16px!important",lineHeight:"22px!important",letterSpacing:"-1.30385e-09px!important",color:"#2A323C!important",marginTop:"0px!important",marginBottom:"0px!important"},flowModeToken:{fontFamily:"Nunito",fontStyle:"normal",fontWeight:"normal",fontSize:"12px!important",lineHeight:"22px!important",letterSpacing:"-1.30385e-09px!important",color:"#2A323C!important",marginTop:"0px!important",marginBottom:"0px!important"},status:{fontFamily:"Nunito",fontStyle:"normal",fontWeight:800,fontSize:"8px!important",lineHeight:"11px!important",textTransform:"uppercase!important"},dateTime:{fontFamily:"Nunito",fontStyle:"normal",fontWeight:"normal",fontSize:"14px!important",lineHeight:"20px!important",letterSpacing:"-1.30385e-09px!important",color:"#5C6269!important"},dateTimeSmall:{},text:{fontFamily:"Nunito",fontStyle:"normal",fontWeight:"normal",fontSize:"16px!important",lineHeight:"22px!important",letterSpacing:"-1.30385e-09px!important",color:"#2A323C!important",marginTop:"33px!important",paddingLeft:"12px!important"},boxCell:{marginTop:"20px!important",marginBottom:"20px!important"},boxCellIds:{marginTop:"20px!important",marginBottom:"20px!important",maxWidth:"150px",display:"block"},table:{border:"none!important"},tableRow:{"& td:nth-child(5)":{paddingLeft:"0px!important",paddingRight:"20px!important",textAlign:"right"},"& td:nth-child(5) > button":{opacity:0},"&:hover":{cursor:"pointer",backgroundColor:"#EEF3F9!important","& td:nth-child(5) > button":{opacity:1},"& td":{backgroundColor:"#EEF3F9!important"}}},runningListTableRow:{"&:hover":{cursor:"pointer"}},tableRowSelected:{backgroundColor:"#EEF3F9!important"},moreActionsBtn:{backgroundColor:"#fff!important"},tableRowClass:{backgroundColor:"#F2F5F9!important"},flowStatus:{width:"fit-content!important",borderRadius:"2px!important",fontFamily:"Nunito",fontStyle:"normal!important",fontWeight:800,textAlign:"center",fontSize:"9px !important",lineHeight:"12px !important",letterSpacing:"-1.30385e-09px !important",textTransform:"uppercase!important",padding:"3px 10px !important"},sortIcon:{opacity:"1!important"},paperContainer:{display:"flex!important",flexDirection:"column",marginTop:`-${e.spacing(1.375)}!important`,boxShadow:"0px 2px 10px rgba(0, 0, 0, 0.15)!important",border:"0.5px solid #D5DFE9!important",minWidth:"168px!important"},popperBtns:{padding:"10px 16px !important",fontFamily:"Nunito",fontWeight:"normal",fontSize:"16px !important",lineHeight:"22px !important",letterSpacing:"-1.30385e-09px !important",color:"#1B1D1F!important",margin:e.spacing(.5)+"px!important",opacity:"0.9!important",textTransform:"capitalize!important",justifyContent:"left!important","&:hover":{background:"#EEF3F9!important"}},popperIcon:{marginRight:e.spacing(1.8)+"px!important",width:e.spacing(2.25)+"px!important",height:e.spacing(2.25)+"px!important"},popperHr:{margin:"0px!important",border:"1px solid #D9E2EB!important",width:`calc(100% - ${e.spacing(.571)})!important`},boxSubtitle:{display:"flex",alignItems:"center"}})),useStyles$3$1=makeStyles()(e=>({table:{border:"none!important"},tableHead:{"& th":{padding:"11px"}},tableRowEmpty:{background:"#FAFAFA",height:"50px"},sortIcon:{opacity:"1!important"},borderBottomLineHeader:{opacity:"0.9!important",borderBottom:"0.5px solid #D5DFE9"},borderBottomLineHeaderAction:{opacity:"0.9!important",borderBottom:"0.5px solid #D5DFE9",width:"30px"}})),DynamicTableHead=({columnNames:e,defaultOrderBy:t,onRequestSort:n,idPrefix:r,isSortable:o=!0})=>{const[i,a]=react.exports.useState("asc"),[s,l]=react.exports.useState(t||e[0]),c=useStyles$3$1()["classes"];return react.exports.useEffect(()=>{n&&n(s,i)},[i,s]),jsxRuntime.exports.jsx(TableHead$1,Object.assign({className:c.tableHead},{children:jsxRuntime.exports.jsx(TableRow$1,{children:e.map((n,e)=>isNull_1(n)||isEmpty_1(n)?jsxRuntime.exports.jsx(TableCell$1,{"data-test":r+"-table-heading."+e,className:""+c.borderBottomLineHeaderAction},"action-column-"+e):jsxRuntime.exports.jsxs(TableCell$1,Object.assign({"data-test":r+"-table-heading."+e,className:""+c.borderBottomLineHeader},{children:[jsxRuntime.exports.jsx(FormattedMessage$1,{id:"{idPrefix}-table-column-heading.{id}",defaultMessage:"{columnName}",description:"{columnName}",values:{idPrefix:r,id:n+"-"+e,columnName:startCase_1(n)}}),o&&jsxRuntime.exports.jsx(TableSortLabel$1,{"data-test":r+"-table-sort-label."+e,active:n===s,IconComponent:default_1$1,direction:n===s?i:"asc",onClick:()=>{var e=n,t=s===e&&"asc"===i;a(t?"desc":"asc"),l(e)},classes:{icon:c.sortIcon}})]}),n+"-"+e))})}))},EmptyTableRow=({numColumns:e})=>{var t=useStyles$3$1()["classes"];return jsxRuntime.exports.jsx(TableRow$1,Object.assign({className:t.tableRowEmpty},{children:times_1(e,e=>jsxRuntime.exports.jsx(TableCell$1,{},e))}))},DynamicTable=({columnNames:e,rows:t,onRequestSort:n,idPrefix:r,isSortable:o=!0})=>{var i=useStyles$3$1()["classes"];return jsxRuntime.exports.jsx(TableContainer$1,{children:jsxRuntime.exports.jsxs(Table$1,Object.assign({"data-test":r+"-table",className:i.table},{children:[jsxRuntime.exports.jsx(DynamicTableHead,{idPrefix:r,columnNames:e,onRequestSort:n,isSortable:o}),jsxRuntime.exports.jsx(TableBody$1,Object.assign({"data-test":r+"-table-body"},{children:isNull_1(t)||isEmpty_1(t)?jsxRuntime.exports.jsx(EmptyTableRow,{"data-test":r+"-table-empty-row",numColumns:size_1(e)}):t}))]}))})},ProgressStep=({step:e,size:t,active:n,visited:r,alwaysShowLabel:o,label:i,onClick:a,nonLinear:s,isFirstOrOnly:l,idPrefix:c})=>{const[u,d]=react.exports.useState(o),[p,f]=react.exports.useState(!1);var h=.2*-t;return jsxRuntime.exports.jsxs(Box$1,Object.assign({display:"flex",sx:{flexGrow:1},alignItems:"center"},{children:[jsxRuntime.exports.jsx(Box$1,Object.assign({sx:{background:n?"#1871E8":r?"#555F7C":"#F2F5F9",marginLeft:`${o?0:h}px`,width:t,height:t,display:"flex",alignItems:"center",justifyContent:"center",fontStyle:"normal",fontSize:"14px",fontFamily:"Nunito",color:n||r||p?"#FFFFFF":"#2A323C",lineHeight:"20px",border:"1px solid #FFFFFF",borderRadius:"50%",cursor:"default",userSelect:"none","&:hover":!s&&r?{marginLeft:`${l?h:0}px`,opacity:[.9,.8,.7],cursor:"pointer"}:{}},onMouseOver:()=>{!s&&r&&(f(!0),o||d(!0))},onMouseOut:()=>{!s&&r&&(f(!1),o||d(!1))},onClick:()=>{!s&&r&&a(e-1)},"data-test":c+"-progress-stepper-icon-step-"+e},{children:e})),jsxRuntime.exports.jsx(Collapse$1,Object.assign({in:u,orientation:"horizontal",mountOnEnter:!0,unmountOnExit:!0},{children:jsxRuntime.exports.jsx(Typography$1,Object.assign({sx:{marginLeft:"10px",marginRight:`${o?10:20}px`,userSelect:"none"},noWrap:!0,"data-test":c+"-progress-stepper-label-step-"+e},{children:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"{idPrefix}-progress-stepper.label-step-{step}",defaultMessage:"{label}",description:"Step {step}: {label}",values:{idPrefix:c,label:i,step:e}})}))}))]}))},OverlappingSteps=({steps:e,stepIconSize:r,visited:o,start:i,end:t,invertOverlap:a,onClick:s,nonLinear:l,idPrefix:c})=>{const u=t-i;var n=r+u*(.85*r);return jsxRuntime.exports.jsx(Box$1,Object.assign({display:"grid",sx:{marginLeft:`${a?10:0}px`},gridTemplateColumns:`auto fit-content(${n}px) auto`},{children:map_1(slice_1(e,i,t),(e,t)=>{var n=i+t;return jsxRuntime.exports.jsx(Box$1,Object.assign({gridColumn:t+1+" / span 1",gridRow:"1",zIndex:a?u-t:t+1},{children:jsxRuntime.exports.jsx(ProgressStep,{step:n+1,size:r,visited:o[n],label:e,onClick:s,nonLinear:l,isFirstOrOnly:0===t||1==u,idPrefix:c})}),e)})}))},VisibleSteps=({steps:e,activeStep:n,maxVisibleFutureSteps:r,stepIconSize:o,visited:i,totalSteps:a,onClick:s,nonLinear:l,idPrefix:c})=>jsxRuntime.exports.jsx(react.exports.Fragment,{children:map_1(slice_1(e,n,n+r+1),(e,t)=>{t=n+t;return jsxRuntime.exports.jsxs(Box$1,Object.assign({display:"flex",alignItems:"center",justifyContent:"center"},{children:[jsxRuntime.exports.jsx(ProgressStep,{step:t+1,size:o,active:t===n,visited:i[t],alwaysShowLabel:!0,label:e,onClick:s,nonLinear:l,idPrefix:c}),t<n+r&&t<a-1&&jsxRuntime.exports.jsx(StepConnector$1,{sx:{width:45,marginRight:"10px"}})]}),e)})}),TransitionWrapper=react.exports.forwardRef(({component:e,idPrefix:t,step:n},r)=>jsxRuntime.exports.jsx(Box$1,Object.assign({ref:r,display:"inline-block",minWidth:"100%",height:"100%","data-test":t+"-progress-stepper-content-step-"+n},{children:e}))),stepIconSize=36,stepperSectionHeight=86,buttonSectionHeight=86,ProgressStepper=({steps:e,stepContent:t,maxVisibleFutureSteps:n=2,nextButtonDisabled:r,onActiveStepChange:o,nonLinear:i,idPrefix:a="ui",onFinalStepButtonClick:s,finalStepButtonLabel:l="Submit",customFinalStepButtons:c})=>{const[u,d]=react.exports.useState(0),[p,f]=react.exports.useState(map_1(e,()=>!1)),[h,m]=react.exports.useState(map_1(t,()=>"right")),g=react.exports.useRef(null),v=size_1(e),y=(n<0&&(n=0),react.exports.useEffect(()=>{null!=o&&o(u)},[u]),e=>{const t=p;t[e]=!0,f(t)}),x=e=>{const t=h;if(u<e)t[u]="right",t[e]="left";else{if(!(e<u))return;t[u]="left",t[e]="right"}m(t)},C=()=>{u===v-1?null!=s&&s():b()},b=()=>{y(u);var e=u+1;e<v&&(x(e),d(e))};var w=e=>{p[e]&&(y(u),x(e),d(e))};const $=()=>u===v-1;return jsxRuntime.exports.jsxs(Box$1,Object.assign({height:"100%"},{children:[jsxRuntime.exports.jsxs(Grid$1,Object.assign({container:!0,direction:"column",alignItems:"flex-start",justifyContent:"center",height:`calc(100% - ${buttonSectionHeight}px)`},{children:[jsxRuntime.exports.jsx(Grid$1,Object.assign({item:!0,padding:5,height:stepperSectionHeight,width:"100%"},{children:jsxRuntime.exports.jsxs(Box$1,Object.assign({display:"flex"},{children:[jsxRuntime.exports.jsx(OverlappingSteps,{steps:e,stepIconSize:stepIconSize,visited:p,start:0,end:u,onClick:w,nonLinear:i,idPrefix:a}),jsxRuntime.exports.jsx(VisibleSteps,{steps:e,activeStep:u,maxVisibleFutureSteps:n,stepIconSize:stepIconSize,visited:p,totalSteps:v,onClick:w,nonLinear:i,idPrefix:a}),jsxRuntime.exports.jsx(OverlappingSteps,{steps:e,stepIconSize:stepIconSize,visited:p,start:u+n+1,end:v,invertOverlap:!0,onClick:w,nonLinear:i,idPrefix:a})]}))})),jsxRuntime.exports.jsx(Grid$1,Object.assign({item:!0,width:"100%"},{children:jsxRuntime.exports.jsx(Divider$1,{})})),jsxRuntime.exports.jsx(Grid$1,Object.assign({container:!0,item:!0,xs:!0,overflow:"auto",width:"100%",ref:g,sx:{overflowX:"hidden"}},{children:jsxRuntime.exports.jsx(Box$1,Object.assign({height:"100%",width:"100%"},{children:map_1(t,(e,t)=>jsxRuntime.exports.jsx(Slide$1,Object.assign({container:g.current,direction:h[t],in:u===t,mountOnEnter:!0,unmountOnExit:!0},{children:jsxRuntime.exports.jsx(TransitionWrapper,{component:e,step:t+1,idPrefix:a})}),t))}))})),jsxRuntime.exports.jsx(Grid$1,Object.assign({item:!0,width:"100%"},{children:jsxRuntime.exports.jsx(Divider$1,{})}))]})),jsxRuntime.exports.jsxs(Box$1,Object.assign({display:"flex",justifyContent:"space-between",alignItems:"center",padding:5,height:buttonSectionHeight},{children:[jsxRuntime.exports.jsx(Button$1,Object.assign({variant:"text","data-test":a+"-progress-stepper-back-button",onClick:()=>{var e=u-1;0<=e&&(y(u),x(e),d(e))},sx:{color:"#2A323C"}},{children:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"{idPrefix}-progress-stepper.back-button-label",defaultMessage:"Back",description:"Previous Step Button",values:{idPrefix:a}})})),jsxRuntime.exports.jsx(Box$1,Object.assign({display:"flex",alignItems:"center",gap:3},{children:$()&&!isNil_1(c)?c:(!$()||!isNil_1(s))&&jsxRuntime.exports.jsx(Button$1,Object.assign({variant:"contained",color:"primary","data-test":a+"-progress-stepper-next-button",onClick:C,disabled:r},{children:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"{idPrefix}-progress-stepper.next-button-label",defaultMessage:"{message}",description:"{description} Button",values:{idPrefix:a,message:$()?l:"Next",description:$()?l:"Next Step"}})}))}))]}))]}))};class ErrorBoundary extends react.exports.Component{constructor(){super(...arguments),this.state={hasError:!1}}static getDerivedStateFromError(e){return{hasError:!0}}componentDidCatch(e,t){console.error("Uncaught error:",e,t)}render(){var{fallbackUI:e,children:t}=this.props;return this.state.hasError?e:t}}const useStyles$2$1=makeStyles()(e=>({root:{width:1020,position:"relative"},panel:{backgroundColor:e.palette.background.paper,boxShadow:"0px 0px 12px rgba(0, 0, 0, 0.25)",height:"100%"},fullScreen:{position:"fixed",width:"100%",height:"100vh",top:0,left:0,right:0,bottom:0,zIndex:1004,background:"#FFF"},overlay:{backgroundColor:e.palette.grey[50],opacity:"0.5 !important",height:"100%",position:"absolute",top:0,width:"100%",zIndex:1001}})),FullScreenContainer=({fullScreen:e,preventRerender:t=!1,containerClassName:n="",dimmed:r,dataTest:o,children:i})=>{var a=useStyles$2$1()["classes"];const s=e=>{try{const t=document.querySelector("#VERITONE_PANEL_ID-root.aiware-el");t&&t.setAttribute("style",e?"opacity: 0; pointer-events: none;":"")}catch(e){}};return react.exports.useEffect(()=>(t&&e&&s(!0),()=>s(!1)),[t,e]),t?jsxRuntime.exports.jsx("div",Object.assign({className:`${e?a.fullScreen:""} `+n},{children:i})):e?jsxRuntime.exports.jsx(Portal$1,{children:jsxRuntime.exports.jsxs("div",Object.assign({role:"presentation","data-test":o,className:classNames(a.root,a.panel,a.fullScreen,n||"")},{children:[r&&jsxRuntime.exports.jsx("div",{className:a.overlay}),i]}))}):jsxRuntime.exports.jsx("div",Object.assign({className:n},{children:i}))},useStyles$1$2=makeStyles()(e=>({container:{marginTop:e.spacing(6),padding:e.spacing(4,4),textAlign:"center",border:"0.5px solid #D5DFE9",borderRadius:e.spacing(2)},text:{marginTop:e.spacing(3)},icon:{display:"inline !important"}})),ErrorState$1=({onRetry:e,errorMessage:t})=>{var n=useStyles$1$2()["classes"];return jsxRuntime.exports.jsxs("div",Object.assign({className:n.container},{children:[jsxRuntime.exports.jsx(Icon$1,Object.assign({className:n.icon},{children:jsxRuntime.exports.jsx(AlarmTwo,{fontSize:"large"})})),jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"body2",className:n.text,"data-test":"error-message"},{children:t})),jsxRuntime.exports.jsx(Box$1,{mt:4}),jsxRuntime.exports.jsx(Button$1,Object.assign({variant:"text",size:"large","data-test":"retry-btn",onClick:e},{children:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"ui.error-state.retry-button",defaultMessage:"Retry",description:"error state retry button"})}))]}))},useStyles$d=makeStyles()(e=>({container:{display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",textAlign:"center",padding:"12px",marginTop:"15px"},image:{maxWidth:"50%",marginBottom:"40px",marginTop:"25px",userSelect:"none",pointerEvents:"none",userDrag:"none"},header:{fontWeight:600,marginBottom:"12px",cursor:"default"},description:{opacity:.8}}));function NullState$2({header:e,description:t}){var n=useStyles$d()["classes"];return jsxRuntime.exports.jsxs("div",Object.assign({className:n.container,"data-testid":"ui-null-state-container"},{children:[jsxRuntime.exports.jsx("img",{src:img$s,className:n.image,alt:"no data","data-testid":"ui-null-state-image"}),jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"body2",className:n.header,"data-testid":"ui-null-state-header"},{children:e})),jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"subtitle1",className:n.description,"data-testid":"admin-center-groups-empty-state-description"},{children:t}))]}))}function getLoadingButtonUtilityClass(e){return generateUtilityClass("MuiLoadingButton",e)}const loadingButtonClasses=generateUtilityClasses("MuiLoadingButton",["root","loading","loadingIndicator","loadingIndicatorCenter","loadingIndicatorStart","loadingIndicatorEnd","endIconLoadingEnd","startIconLoadingStart"]);var loadingButtonClasses$1=loadingButtonClasses;const _excluded=["children","disabled","id","loading","loadingIndicator","loadingPosition","variant"],useUtilityClasses=e=>{var{loading:e,loadingPosition:t,classes:n}=e;return _extends({},n,composeClasses({root:["root",e&&"loading"],startIcon:[e&&"startIconLoading"+capitalize$2(t)],endIcon:[e&&"endIconLoading"+capitalize$2(t)],loadingIndicator:["loadingIndicator",e&&"loadingIndicator"+capitalize$2(t)]},getLoadingButtonUtilityClass,n))},rootShouldForwardProp=e=>"ownerState"!==e&&"theme"!==e&&"sx"!==e&&"as"!==e&&"classes"!==e,LoadingButtonRoot=styled$1(Button$1,{shouldForwardProp:e=>rootShouldForwardProp(e)||"classes"===e,name:"MuiLoadingButton",slot:"Root",overridesResolver:(e,t)=>[t.root,t.startIconLoadingStart&&{["& ."+loadingButtonClasses$1.startIconLoadingStart]:t.startIconLoadingStart},t.endIconLoadingEnd&&{["& ."+loadingButtonClasses$1.endIconLoadingEnd]:t.endIconLoadingEnd}]})(({ownerState:e,theme:t})=>_extends({[`& .${loadingButtonClasses$1.startIconLoadingStart}, & .`+loadingButtonClasses$1.endIconLoadingEnd]:{transition:t.transitions.create(["opacity"],{duration:t.transitions.duration.short}),opacity:0}},"center"===e.loadingPosition&&{transition:t.transitions.create(["background-color","box-shadow","border-color"],{duration:t.transitions.duration.short}),["&."+loadingButtonClasses$1.loading]:{color:"transparent"}},"start"===e.loadingPosition&&e.fullWidth&&{[`& .${loadingButtonClasses$1.startIconLoadingStart}, & .`+loadingButtonClasses$1.endIconLoadingEnd]:{transition:t.transitions.create(["opacity"],{duration:t.transitions.duration.short}),opacity:0,marginRight:-8}},"end"===e.loadingPosition&&e.fullWidth&&{[`& .${loadingButtonClasses$1.startIconLoadingStart}, & .`+loadingButtonClasses$1.endIconLoadingEnd]:{transition:t.transitions.create(["opacity"],{duration:t.transitions.duration.short}),opacity:0,marginLeft:-8}})),LoadingButtonLoadingIndicator=styled$1("div",{name:"MuiLoadingButton",slot:"LoadingIndicator",overridesResolver:(e,t)=>{e=e.ownerState;return[t.loadingIndicator,t["loadingIndicator"+capitalize$2(e.loadingPosition)]]}})(({theme:e,ownerState:t})=>_extends({position:"absolute",visibility:"visible",display:"flex"},"start"===t.loadingPosition&&("outlined"===t.variant||"contained"===t.variant)&&{left:"small"===t.size?10:14},"start"===t.loadingPosition&&"text"===t.variant&&{left:6},"center"===t.loadingPosition&&{left:"50%",transform:"translate(-50%)",color:e.palette.action.disabled},"end"===t.loadingPosition&&("outlined"===t.variant||"contained"===t.variant)&&{right:"small"===t.size?10:14},"end"===t.loadingPosition&&"text"===t.variant&&{right:6},"start"===t.loadingPosition&&t.fullWidth&&{position:"relative",left:-10},"end"===t.loadingPosition&&t.fullWidth&&{position:"relative",right:-10})),LoadingButton=react.exports.forwardRef(function(e,t){var e=useThemeProps({props:e,name:"MuiLoadingButton"}),{children:n,disabled:r=!1,id:o,loading:i=!1,loadingIndicator:a,loadingPosition:s="center",variant:l="text"}=e,c=_objectWithoutPropertiesLoose$1(e,_excluded),o=useId(o),a=null!=a?a:jsxRuntime.exports.jsx(CircularProgress$1,{"aria-labelledby":o,color:"inherit",size:16}),e=_extends({},e,{disabled:r,loading:i,loadingIndicator:a,loadingPosition:s,variant:l}),s=useUtilityClasses(e);return jsxRuntime.exports.jsx(LoadingButtonRoot,_extends({disabled:r||i,id:o,ref:t},c,{variant:l,classes:s,ownerState:e,children:"end"===e.loadingPosition?jsxRuntime.exports.jsxs(react.exports.Fragment,{children:[n,i&&jsxRuntime.exports.jsx(LoadingButtonLoadingIndicator,{className:s.loadingIndicator,ownerState:e,children:a})]}):jsxRuntime.exports.jsxs(react.exports.Fragment,{children:[i&&jsxRuntime.exports.jsx(LoadingButtonLoadingIndicator,{className:s.loadingIndicator,ownerState:e,children:a}),n]})}))});var LoadingButton$1=LoadingButton,Link={},_interopRequireDefault=interopRequireDefault.exports,default_1=(Object.defineProperty(Link,"__esModule",{value:!0}),Link.default=void 0),_createSvgIcon=_interopRequireDefault(createSvgIcon$1),_jsxRuntime=jsxRuntime.exports,_default=(0,_createSvgIcon.default)((0,_jsxRuntime.jsx)("path",{d:"M3.9 12c0-1.71 1.39-3.1 3.1-3.1h4V7H7c-2.76 0-5 2.24-5 5s2.24 5 5 5h4v-1.9H7c-1.71 0-3.1-1.39-3.1-3.1zM8 13h8v-2H8v2zm9-6h-4v1.9h4c1.71 0 3.1 1.39 3.1 3.1s-1.39 3.1-3.1 3.1h-4V17h4c2.76 0 5-2.24 5-5s-2.24-5-5-5z"}),"Link"),default_1=Link.default=_default,cropper={exports:{}},Cropper=(!function(){function P(t,e){var n,r=Object.keys(t);return Object.getOwnPropertySymbols&&(n=Object.getOwnPropertySymbols(t),e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,n)),r}function V(r){for(var e=1;e<arguments.length;e++){var o=null!=arguments[e]?arguments[e]:{};e%2?P(Object(o),!0).forEach(function(e){var t,n;t=r,n=o[e=e],e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(o)):P(Object(o)).forEach(function(e){Object.defineProperty(r,e,Object.getOwnPropertyDescriptor(o,e))})}return r}function N(e){return(N="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function H(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 D(e){return function(e){if(Array.isArray(e))return r(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return r(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(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?r(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function r(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 p(e){return"number"==typeof e&&!oe(e)}function o(e){return void 0===e}function i(e){return"object"===N(e)&&null!==e}function f(e){if(!i(e))return!1;try{var t=e.constructor,n=t.prototype;return t&&n&&ae.call(n,"isPrototypeOf")}catch(e){return!1}}function c(e){return"function"==typeof e}function F(e){return Array.from?Array.from(e):se.call(e)}function _(n,r){return n&&c(r)&&(Array.isArray(n)||p(n.length)?F(n).forEach(function(e,t){r.call(n,e,t,n)}):i(n)&&Object.keys(n).forEach(function(e){r.call(n,n[e],e,n)})),n}function T(e,t){var n=1<arguments.length&&void 0!==t?t:1e11;return le.test(e)?Math.round(e*n)/n:e}function h(e,t){var n=e.style;_(t,function(e,t){ce.test(t)&&p(e)&&(e="".concat(e,"px")),n[t]=e})}function u(e,t){var n;t&&(p(e.length)?_(e,function(e){u(e,t)}):e.classList?e.classList.add(t):(n=e.className.trim())?n.indexOf(t)<0&&(e.className="".concat(n," ").concat(t)):e.className=t)}function E(e,t){t&&(p(e.length)?_(e,function(e){E(e,t)}):e.classList?e.classList.remove(t):0<=e.className.indexOf(t)&&(e.className=e.className.replace(t,"")))}function a(e,t,n){t&&(p(e.length)?_(e,function(e){a(e,t,n)}):(n?u:E)(e,t))}function s(e){return e.replace(ue,"$1-$2").toLowerCase()}function B(e,t){return i(e[t])?e[t]:e.dataset?e.dataset[t]:e.getAttribute("data-".concat(s(t)))}function d(e,t,n){i(n)?e[t]=n:e.dataset?e.dataset[t]=n:e.setAttribute("data-".concat(s(t)),n)}function l(n,e,r,t){var o=3<arguments.length&&void 0!==t?t:{},i=r;e.trim().split(de).forEach(function(e){var t;pe||(t=n.listeners)&&t[e]&&t[e][r]&&(i=t[e][r],delete t[e][r],0===Object.keys(t[e]).length&&delete t[e],0===Object.keys(t).length&&delete n.listeners),n.removeEventListener(e,i,o)})}function m(i,e,a,t){var s=3<arguments.length&&void 0!==t?t:{},l=a;e.trim().split(de).forEach(function(r){var e,o;s.once&&!pe&&(e=i.listeners,l=function(){delete o[r][a],i.removeEventListener(r,l,s);for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];a.apply(i,t)},(o=void 0===e?{}:e)[r]||(o[r]={}),o[r][a]&&i.removeEventListener(r,o[r][a],s),o[r][a]=l,i.listeners=o),i.addEventListener(r,l,s)})}function g(e,t,n){var r;return c(Event)&&c(CustomEvent)?r=new CustomEvent(t,{detail:n,bubbles:!0,cancelable:!0}):(r=document.createEvent("CustomEvent")).initCustomEvent(t,!0,!0,n),e.dispatchEvent(r)}function Z(e){e=e.getBoundingClientRect();return{left:e.left+(window.pageXOffset-document.documentElement.clientLeft),top:e.top+(window.pageYOffset-document.documentElement.clientTop)}}function U(e){e=e.match(fe);return null!==e&&(e[1]!==t.protocol||e[2]!==t.hostname||e[3]!==t.port)}function z(e){var t="timestamp=".concat((new Date).getTime());return e+(-1===e.indexOf("?")?"?":"&")+t}function v(e){var t=e.rotate,n=e.scaleX,r=e.scaleY,o=e.translateX,e=e.translateY,i=[],o=(p(o)&&0!==o&&i.push("translateX(".concat(o,"px)")),p(e)&&0!==e&&i.push("translateY(".concat(e,"px)")),p(t)&&0!==t&&i.push("rotate(".concat(t,"deg)")),p(n)&&1!==n&&i.push("scaleX(".concat(n,")")),p(r)&&1!==r&&i.push("scaleY(".concat(r,")")),i.length?i.join(" "):"none");return{WebkitTransform:o,msTransform:o,transform:o}}function y(e,t){var n=e.pageX,e=e.pageY,r={endX:n,endY:e};return t?r:V({startX:n,startY:e},r)}function R(e,t){var n,r=e.aspectRatio,o=e.height,i=e.width,a=1<arguments.length&&void 0!==t?t:"contain",s=ie(i),l=ie(o);return s&&l?(n=o*r,"contain"===a&&i<n||"cover"===a&&n<i?o=i/r:i=o*r):s?o=i/r:l&&(i=o*r),{width:i,height:o}}var x,C,b,w,W,j,G,K,$,S,L,M,O,I,k,q,Q,Y,X,J,ee,te,ne,re,oe,ie,ae,se,A,le,ce,ue,de,pe,t,fe,he,me,e,n,ge,ve,ye,xe,Ce,be;cropper.exports=(x="undefined"!=typeof window&&void 0!==window.document,C=x?window:{},n=!(!x||!C.document.documentElement)&&"ontouchstart"in C.document.documentElement,e=x&&"PointerEvent"in C,w="".concat(b="cropper","-crop"),W="".concat(b,"-disabled"),j="".concat(b,"-hidden"),G="".concat(b,"-hide"),K="".concat(b,"-invisible"),$="".concat(b,"-modal"),S="".concat(b,"-move"),L="".concat(b,"Action"),M="".concat(b,"Preview"),O="cropend",I="cropmove",k="cropstart",q=e?"pointerdown":n?"touchstart":"mousedown",Q=e?"pointermove":n?"touchmove":"mousemove",Y=e?"pointerup pointercancel":n?"touchend touchcancel":"mouseup",X="image/jpeg",J=/^e|w|s|n|se|sw|ne|nw|all|crop|move|zoom$/,ee=/^data:/,te=/^data:image\/jpeg;base64,/,ne=/^img|canvas$/i,re={viewMode:0,dragMode:"crop",initialAspectRatio:NaN,aspectRatio:NaN,data:null,preview:"",responsive:!0,restore:!0,checkCrossOrigin:!0,checkOrientation:!0,modal:!0,guides:!0,center:!0,highlight:!0,background:!0,autoCrop:!0,autoCropArea:.8,movable:!0,rotatable:!0,scalable:!0,zoomable:!0,zoomOnTouch:!0,zoomOnWheel:!0,wheelZoomRatio:.1,cropBoxMovable:!0,cropBoxResizable:!0,toggleDragModeOnDblclick:!0,minCanvasWidth:0,minCanvasHeight:0,minCropBoxWidth:0,minCropBoxHeight:0,minContainerWidth:200,minContainerHeight:100,ready:null,cropstart:null,cropmove:null,cropend:null,crop:null,zoom:null},oe=Number.isNaN||C.isNaN,ie=function(e){return 0<e&&e<1/0},ae=Object.prototype.hasOwnProperty,se=Array.prototype.slice,A=Object.assign||function(n){for(var e=arguments.length,t=new Array(1<e?e-1:0),r=1;r<e;r++)t[r-1]=arguments[r];return i(n)&&0<t.length&&t.forEach(function(t){i(t)&&Object.keys(t).forEach(function(e){n[e]=t[e]})}),n},le=/\.\d*(?:0|9){12}\d*$/,ce=/^width|height|left|top|marginLeft|marginTop$/,ue=/([a-z\d])([A-Z])/g,de=/\s\s*/,pe=function(){var t,e,n,r=!1;return x&&(t=!1,e=function(){},n=Object.defineProperty({},"once",{get:function(){return r=!0,t},set:function(e){t=e}}),C.addEventListener("test",e,n),C.removeEventListener("test",e,n)),r}(),t=C.location,fe=/^(\w+:)\/\/([^:/?#]*):?(\d*)/i,he=String.fromCharCode,me=/^data:.*,/,e={render:function(){this.initContainer(),this.initCanvas(),this.initCropBox(),this.renderCanvas(),this.cropped&&this.renderCropBox()},initContainer:function(){var e=this.element,t=this.options,n=this.container,r=this.cropper,o=Number(t.minContainerWidth),t=Number(t.minContainerHeight),o=(u(r,j),E(e,j),{width:Math.max(n.offsetWidth,0<=o?o:200),height:Math.max(n.offsetHeight,0<=t?t:100)});h(r,{width:(this.containerData=o).width,height:o.height}),u(e,j),E(r,j)},initCanvas:function(){var e=this.containerData,t=this.imageData,n=this.options.viewMode,r=Math.abs(t.rotate)%180==90,o=r?t.naturalHeight:t.naturalWidth,r=r?t.naturalWidth:t.naturalHeight,t=o/r,i=e.width,a=e.height,t=(e.height*t>e.width?3===n?i=e.height*t:a=e.width/t:3===n?a=e.width/t:i=e.height*t,{aspectRatio:t,naturalWidth:o,naturalHeight:r,width:i,height:a});this.canvasData=t,this.limited=1===n||2===n,this.limitCanvas(!0,!0),t.width=Math.min(Math.max(t.width,t.minWidth),t.maxWidth),t.height=Math.min(Math.max(t.height,t.minHeight),t.maxHeight),t.left=(e.width-t.width)/2,t.top=(e.height-t.height)/2,t.oldLeft=t.left,t.oldTop=t.top,this.initialCanvasData=A({},t)},limitCanvas:function(e,t){var n=this.options,r=this.containerData,o=this.canvasData,i=this.cropBoxData,a=n.viewMode,s=o.aspectRatio,l=this.cropped&&i;e&&(e=Number(n.minCanvasWidth)||0,n=Number(n.minCanvasHeight)||0,1<a?(e=Math.max(e,r.width),n=Math.max(n,r.height),3===a&&(e<n*s?e=n*s:n=e/s)):0<a&&(e?e=Math.max(e,l?i.width:0):n?n=Math.max(n,l?i.height:0):l&&((e=i.width)<(n=i.height)*s?e=n*s:n=e/s)),e=(s=R({aspectRatio:s,width:e,height:n})).width,n=s.height,o.minWidth=e,o.minHeight=n,o.maxWidth=1/0,o.maxHeight=1/0),t&&((l?0:1)<a?(s=r.width-o.width,e=r.height-o.height,o.minLeft=Math.min(0,s),o.minTop=Math.min(0,e),o.maxLeft=Math.max(0,s),o.maxTop=Math.max(0,e),l&&this.limited&&(o.minLeft=Math.min(i.left,i.left+(i.width-o.width)),o.minTop=Math.min(i.top,i.top+(i.height-o.height)),o.maxLeft=i.left,o.maxTop=i.top,2===a&&(o.width>=r.width&&(o.minLeft=Math.min(0,s),o.maxLeft=Math.max(0,s)),o.height>=r.height&&(o.minTop=Math.min(0,e),o.maxTop=Math.max(0,e))))):(o.minLeft=-o.width,o.minTop=-o.height,o.maxLeft=r.width,o.maxTop=r.height))},renderCanvas:function(e,t){var n,r,o=this.canvasData,i=this.imageData;t&&(i=(t=function(e){var t=e.width,n=e.height,e=e.degree;if(90==(e=Math.abs(e)%180))return{width:n,height:t};var r=e%90*Math.PI/180,o=Math.sin(r),r=Math.cos(r),i=t*r+n*o,t=t*o+n*r;return 90<e?{width:t,height:i}:{width:i,height:t}}({width:i.naturalWidth*Math.abs(i.scaleX||1),height:i.naturalHeight*Math.abs(i.scaleY||1),degree:i.rotate||0})).width,t=t.height,n=o.width*(i/o.naturalWidth),r=o.height*(t/o.naturalHeight),o.left-=(n-o.width)/2,o.top-=(r-o.height)/2,o.width=n,o.height=r,o.aspectRatio=i/t,o.naturalWidth=i,o.naturalHeight=t,this.limitCanvas(!0,!1)),(o.width>o.maxWidth||o.width<o.minWidth)&&(o.left=o.oldLeft),(o.height>o.maxHeight||o.height<o.minHeight)&&(o.top=o.oldTop),o.width=Math.min(Math.max(o.width,o.minWidth),o.maxWidth),o.height=Math.min(Math.max(o.height,o.minHeight),o.maxHeight),this.limitCanvas(!1,!0),o.left=Math.min(Math.max(o.left,o.minLeft),o.maxLeft),o.top=Math.min(Math.max(o.top,o.minTop),o.maxTop),o.oldLeft=o.left,o.oldTop=o.top,h(this.canvas,A({width:o.width,height:o.height},v({translateX:o.left,translateY:o.top}))),this.renderImage(e),this.cropped&&this.limited&&this.limitCropBox(!0,!0)},renderImage:function(e){var t=this.canvasData,n=this.imageData,r=n.naturalWidth*(t.width/t.naturalWidth),o=n.naturalHeight*(t.height/t.naturalHeight);A(n,{width:r,height:o,left:(t.width-r)/2,top:(t.height-o)/2}),h(this.image,A({width:n.width,height:n.height},v(A({translateX:n.left,translateY:n.top},n)))),e&&this.output()},initCropBox:function(){var e=this.options,t=this.canvasData,n=e.aspectRatio||e.initialAspectRatio,e=Number(e.autoCropArea)||.8,r={width:t.width,height:t.height};n&&(t.height*n>t.width?r.height=r.width/n:r.width=r.height*n),this.cropBoxData=r,this.limitCropBox(!0,!0),r.width=Math.min(Math.max(r.width,r.minWidth),r.maxWidth),r.height=Math.min(Math.max(r.height,r.minHeight),r.maxHeight),r.width=Math.max(r.minWidth,r.width*e),r.height=Math.max(r.minHeight,r.height*e),r.left=t.left+(t.width-r.width)/2,r.top=t.top+(t.height-r.height)/2,r.oldLeft=r.left,r.oldTop=r.top,this.initialCropBoxData=A({},r)},limitCropBox:function(e,t){var n,r,o=this.options,i=this.containerData,a=this.canvasData,s=this.cropBoxData,l=this.limited,c=o.aspectRatio;e&&(e=Number(o.minCropBoxWidth)||0,o=Number(o.minCropBoxHeight)||0,n=l?Math.min(i.width,a.width,a.width+a.left,i.width-a.left):i.width,r=l?Math.min(i.height,a.height,a.height+a.top,i.height-a.top):i.height,e=Math.min(e,i.width),o=Math.min(o,i.height),c&&(e&&o?e<o*c?o=e/c:e=o*c:e?o=e/c:o&&(e=o*c),n<r*c?r=n/c:n=r*c),s.minWidth=Math.min(e,n),s.minHeight=Math.min(o,r),s.maxWidth=n,s.maxHeight=r),t&&(l?(s.minLeft=Math.max(0,a.left),s.minTop=Math.max(0,a.top),s.maxLeft=Math.min(i.width,a.left+a.width)-s.width,s.maxTop=Math.min(i.height,a.top+a.height)-s.height):(s.minLeft=0,s.minTop=0,s.maxLeft=i.width-s.width,s.maxTop=i.height-s.height))},renderCropBox:function(){var e=this.options,t=this.containerData,n=this.cropBoxData;(n.width>n.maxWidth||n.width<n.minWidth)&&(n.left=n.oldLeft),(n.height>n.maxHeight||n.height<n.minHeight)&&(n.top=n.oldTop),n.width=Math.min(Math.max(n.width,n.minWidth),n.maxWidth),n.height=Math.min(Math.max(n.height,n.minHeight),n.maxHeight),this.limitCropBox(!1,!0),n.left=Math.min(Math.max(n.left,n.minLeft),n.maxLeft),n.top=Math.min(Math.max(n.top,n.minTop),n.maxTop),n.oldLeft=n.left,n.oldTop=n.top,e.movable&&e.cropBoxMovable&&d(this.face,L,n.width>=t.width&&n.height>=t.height?"move":"all"),h(this.cropBox,A({width:n.width,height:n.height},v({translateX:n.left,translateY:n.top}))),this.cropped&&this.limited&&this.limitCanvas(!0,!0),this.disabled||this.output()},output:function(){this.preview(),g(this.element,"crop",this.getData())}},n={initPreview:function(){var e=this.element,n=this.crossOrigin,t=this.options.preview,r=n?this.crossOriginUrl:this.url,o=e.alt||"The image to preview",i=document.createElement("img");n&&(i.crossOrigin=n),i.src=r,i.alt=o,this.viewBox.appendChild(i),this.viewBoxImage=i,t&&("string"==typeof(i=t)?i=e.ownerDocument.querySelectorAll(t):t.querySelector&&(i=[t]),_(this.previews=i,function(e){var t=document.createElement("img");d(e,M,{width:e.offsetWidth,height:e.offsetHeight,html:e.innerHTML}),n&&(t.crossOrigin=n),t.src=r,t.alt=o,t.style.cssText='display:block;width:100%;height:auto;min-width:0!important;min-height:0!important;max-width:none!important;max-height:none!important;image-orientation:0deg!important;"',e.innerHTML="",e.appendChild(t)}))},resetPreview:function(){_(this.previews,function(t){var n=B(t,M),n=(h(t,{width:n.width,height:n.height}),t.innerHTML=n.html,t),t=M;if(i(n[t]))try{delete n[t]}catch(e){n[t]=void 0}else if(n.dataset)try{delete n.dataset[t]}catch(e){n.dataset[t]=void 0}else n.removeAttribute("data-".concat(s(t)))})},preview:function(){var a=this.imageData,e=this.canvasData,t=this.cropBoxData,s=t.width,l=t.height,c=a.width,u=a.height,d=t.left-e.left-a.left,p=t.top-e.top-a.top;this.cropped&&!this.disabled&&(h(this.viewBoxImage,A({width:c,height:u},v(A({translateX:-d,translateY:-p},a)))),_(this.previews,function(e){var t=B(e,M),n=t.width,t=t.height,r=n,o=t,i=1;s&&(o=l*(i=n/s)),l&&t<o&&(r=s*(i=t/l),o=t),h(e,{width:r,height:o}),h(e.getElementsByTagName("img")[0],A({width:c*i,height:u*i},v(A({translateX:-d*i,translateY:-p*i},a))))}))}},ge={bind:function(){var e=this.element,t=this.options,n=this.cropper;c(t.cropstart)&&m(e,k,t.cropstart),c(t.cropmove)&&m(e,I,t.cropmove),c(t.cropend)&&m(e,O,t.cropend),c(t.crop)&&m(e,"crop",t.crop),c(t.zoom)&&m(e,"zoom",t.zoom),m(n,q,this.onCropStart=this.cropStart.bind(this)),t.zoomable&&t.zoomOnWheel&&m(n,"wheel",this.onWheel=this.wheel.bind(this),{passive:!1,capture:!0}),t.toggleDragModeOnDblclick&&m(n,"dblclick",this.onDblclick=this.dblclick.bind(this)),m(e.ownerDocument,Q,this.onCropMove=this.cropMove.bind(this)),m(e.ownerDocument,Y,this.onCropEnd=this.cropEnd.bind(this)),t.responsive&&m(window,"resize",this.onResize=this.resize.bind(this))},unbind:function(){var e=this.element,t=this.options,n=this.cropper;c(t.cropstart)&&l(e,k,t.cropstart),c(t.cropmove)&&l(e,I,t.cropmove),c(t.cropend)&&l(e,O,t.cropend),c(t.crop)&&l(e,"crop",t.crop),c(t.zoom)&&l(e,"zoom",t.zoom),l(n,q,this.onCropStart),t.zoomable&&t.zoomOnWheel&&l(n,"wheel",this.onWheel,{passive:!1,capture:!0}),t.toggleDragModeOnDblclick&&l(n,"dblclick",this.onDblclick),l(e.ownerDocument,Q,this.onCropMove),l(e.ownerDocument,Y,this.onCropEnd),t.responsive&&l(window,"resize",this.onResize)}},ve={resize:function(){var e,t,n,r,o,i,a;this.disabled||(e=this.options,r=this.container,t=this.containerData,n=r.offsetWidth/t.width,r=r.offsetHeight/t.height,1!=(o=Math.abs(n-1)>Math.abs(r-1)?n:r)&&(e.restore&&(i=this.getCanvasData(),a=this.getCropBoxData()),this.render(),e.restore&&(this.setCanvasData(_(i,function(e,t){i[t]=e*o})),this.setCropBoxData(_(a,function(e,t){a[t]=e*o})))))},dblclick:function(){var e,t;this.disabled||"none"===this.options.dragMode||this.setDragMode((e=this.dragBox,t=w,(e.classList?e.classList.contains(t):-1<e.className.indexOf(t))?"move":"crop"))},wheel:function(e){var t=this,n=Number(this.options.wheelZoomRatio)||.1,r=1;this.disabled||(e.preventDefault(),this.wheeling||(this.wheeling=!0,setTimeout(function(){t.wheeling=!1},50),e.deltaY?r=0<e.deltaY?1:-1:e.wheelDelta?r=-e.wheelDelta/120:e.detail&&(r=0<e.detail?1:-1),this.zoom(-r*n,e)))},cropStart:function(e){var t,n=e.buttons,r=e.button;this.disabled||("mousedown"===e.type||"pointerdown"===e.type&&"mouse"===e.pointerType)&&(p(n)&&1!==n||p(r)&&0!==r||e.ctrlKey)||(n=this.options,t=this.pointers,e.changedTouches?_(e.changedTouches,function(e){t[e.identifier]=y(e)}):t[e.pointerId||0]=y(e),r=1<Object.keys(t).length&&n.zoomable&&n.zoomOnTouch?"zoom":B(e.target,L),J.test(r)&&!1!==g(this.element,k,{originalEvent:e,action:r})&&(e.preventDefault(),this.action=r,this.cropping=!1,"crop"===r&&(this.cropping=!0,u(this.dragBox,$))))},cropMove:function(e){var t,n=this.action;!this.disabled&&n&&(t=this.pointers,e.preventDefault(),!1!==g(this.element,I,{originalEvent:e,action:n})&&(e.changedTouches?_(e.changedTouches,function(e){A(t[e.identifier]||{},y(e,!0))}):A(t[e.pointerId||0]||{},y(e,!0)),this.change(e)))},cropEnd:function(e){var t,n;this.disabled||(t=this.action,n=this.pointers,e.changedTouches?_(e.changedTouches,function(e){delete n[e.identifier]}):delete n[e.pointerId||0],t&&(e.preventDefault(),Object.keys(n).length||(this.action=""),this.cropping&&(this.cropping=!1,a(this.dragBox,$,this.cropped&&this.options.modal)),g(this.element,O,{originalEvent:e,action:t})))}},ye={change:function(e){function t(e){switch(e){case"e":g+S.x>C&&(S.x=C-g);break;case"w":p+S.x<y&&(S.x=y-p);break;case"n":f+S.y<x&&(S.y=x-f);break;case"s":v+S.y>b&&(S.y=b-v)}}var n,r,i,o=this.options,a=this.canvasData,s=this.containerData,l=this.cropBoxData,c=this.pointers,u=this.action,d=o.aspectRatio,p=l.left,f=l.top,h=l.width,m=l.height,g=p+h,v=f+m,y=0,x=0,C=s.width,b=s.height,w=!0,$=(!d&&e.shiftKey&&(d=h&&m?h/m:1),this.limited&&(y=l.minLeft,x=l.minTop,C=y+Math.min(s.width,a.width,a.left+a.width),b=x+Math.min(s.height,a.height,a.top+a.height)),c[Object.keys(c)[0]]),S={x:$.endX-$.startX,y:$.endY-$.startY};switch(u){case"all":p+=S.x,f+=S.y;break;case"e":if(0<=S.x&&(C<=g||d&&(f<=x||b<=v))){w=!1;break}t("e"),(h+=S.x)<0&&(u="w",p-=h=-h),d&&(f+=(l.height-(m=h/d))/2);break;case"n":if(S.y<=0&&(f<=x||d&&(p<=y||C<=g))){w=!1;break}t("n"),m-=S.y,f+=S.y,m<0&&(u="s",f-=m=-m),d&&(p+=(l.width-(h=m*d))/2);break;case"w":if(S.x<=0&&(p<=y||d&&(f<=x||b<=v))){w=!1;break}t("w"),h-=S.x,p+=S.x,h<0&&(u="e",p-=h=-h),d&&(f+=(l.height-(m=h/d))/2);break;case"s":if(0<=S.y&&(b<=v||d&&(p<=y||C<=g))){w=!1;break}t("s"),(m+=S.y)<0&&(u="n",f-=m=-m),d&&(p+=(l.width-(h=m*d))/2);break;case"ne":if(d){if(S.y<=0&&(f<=x||C<=g)){w=!1;break}t("n"),m-=S.y,f+=S.y,h=m*d}else t("n"),t("e"),!(0<=S.x)||g<C?h+=S.x:S.y<=0&&f<=x&&(w=!1),(!(S.y<=0)||x<f)&&(m-=S.y,f+=S.y);h<0&&m<0?(u="sw",f-=m=-m,p-=h=-h):h<0?(u="nw",p-=h=-h):m<0&&(u="se",f-=m=-m);break;case"nw":if(d){if(S.y<=0&&(f<=x||p<=y)){w=!1;break}t("n"),m-=S.y,f+=S.y,p+=l.width-(h=m*d)}else t("n"),t("w"),!(S.x<=0)||y<p?(h-=S.x,p+=S.x):S.y<=0&&f<=x&&(w=!1),(!(S.y<=0)||x<f)&&(m-=S.y,f+=S.y);h<0&&m<0?(u="se",f-=m=-m,p-=h=-h):h<0?(u="ne",p-=h=-h):m<0&&(u="sw",f-=m=-m);break;case"sw":if(d){if(S.x<=0&&(p<=y||b<=v)){w=!1;break}t("w"),h-=S.x,p+=S.x,m=h/d}else t("s"),t("w"),!(S.x<=0)||y<p?(h-=S.x,p+=S.x):0<=S.y&&b<=v&&(w=!1),(!(0<=S.y)||v<b)&&(m+=S.y);h<0&&m<0?(u="ne",f-=m=-m,p-=h=-h):h<0?(u="se",p-=h=-h):m<0&&(u="nw",f-=m=-m);break;case"se":if(d){if(0<=S.x&&(C<=g||b<=v)){w=!1;break}t("e"),m=(h+=S.x)/d}else t("s"),t("e"),!(0<=S.x)||g<C?h+=S.x:0<=S.y&&b<=v&&(w=!1),(!(0<=S.y)||v<b)&&(m+=S.y);h<0&&m<0?(u="nw",f-=m=-m,p-=h=-h):h<0?(u="sw",p-=h=-h):m<0&&(u="ne",f-=m=-m);break;case"move":this.move(S.x,S.y),w=!1;break;case"zoom":this.zoom((r=V({},n=c),i=0,_(n,function(o,e){delete r[e],_(r,function(e){var t=Math.abs(o.startX-e.startX),n=Math.abs(o.startY-e.startY),r=Math.abs(o.endX-e.endX),e=Math.abs(o.endY-e.endY),t=Math.sqrt(t*t+n*n),n=(Math.sqrt(r*r+e*e)-t)/t;Math.abs(n)>Math.abs(i)&&(i=n)})}),i),e),w=!1;break;case"crop":if(!S.x||!S.y){w=!1;break}n=Z(this.cropper),p=$.startX-n.left,f=$.startY-n.top,h=l.minWidth,m=l.minHeight,0<S.x?u=0<S.y?"se":"ne":S.x<0&&(p-=h,u=0<S.y?"sw":"nw"),S.y<0&&(f-=m),this.cropped||(E(this.cropBox,j),this.cropped=!0,this.limited&&this.limitCropBox(!0,!0))}w&&(l.width=h,l.height=m,l.left=p,l.top=f,this.action=u,this.renderCropBox()),_(c,function(e){e.startX=e.endX,e.startY=e.endY})}},xe={crop:function(){return!this.ready||this.cropped||this.disabled||(this.cropped=!0,this.limitCropBox(!0,!0),this.options.modal&&u(this.dragBox,$),E(this.cropBox,j),this.setCropBoxData(this.initialCropBoxData)),this},reset:function(){return this.ready&&!this.disabled&&(this.imageData=A({},this.initialImageData),this.canvasData=A({},this.initialCanvasData),this.cropBoxData=A({},this.initialCropBoxData),this.renderCanvas(),this.cropped&&this.renderCropBox()),this},clear:function(){return this.cropped&&!this.disabled&&(A(this.cropBoxData,{left:0,top:0,width:0,height:0}),this.cropped=!1,this.renderCropBox(),this.limitCanvas(!0,!0),this.renderCanvas(),E(this.dragBox,$),u(this.cropBox,j)),this},replace:function(t){var e=1<arguments.length&&void 0!==arguments[1]&&arguments[1];return!this.disabled&&t&&(this.isImg&&(this.element.src=t),e?(this.url=t,this.image.src=t,this.ready&&(this.viewBoxImage.src=t,_(this.previews,function(e){e.getElementsByTagName("img")[0].src=t}))):(this.isImg&&(this.replaced=!0),this.options.data=null,this.uncreate(),this.load(t))),this},enable:function(){return this.ready&&this.disabled&&(this.disabled=!1,E(this.cropper,W)),this},disable:function(){return this.ready&&!this.disabled&&(this.disabled=!0,u(this.cropper,W)),this},destroy:function(){var e=this.element;return e[b]&&(e[b]=void 0,this.isImg&&this.replaced&&(e.src=this.originalUrl),this.uncreate()),this},move:function(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:e,n=this.canvasData,r=n.left,n=n.top;return this.moveTo(o(e)?e:r+Number(e),o(t)?t:n+Number(t))},moveTo:function(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:e,n=this.canvasData,r=!1;return e=Number(e),t=Number(t),this.ready&&!this.disabled&&this.options.movable&&(p(e)&&(n.left=e,r=!0),p(t)&&(n.top=t,r=!0),r&&this.renderCanvas(!0)),this},zoom:function(e,t){var n=this.canvasData;return e=Number(e),this.zoomTo(n.width*(e=e<0?1/(1-e):1+e)/n.naturalWidth,null,t)},zoomTo:function(e,t,n){var r,o,i,a=this.options,s=this.canvasData,l=s.width,c=s.height,u=s.naturalWidth,d=s.naturalHeight;if(0<=(e=Number(e))&&this.ready&&!this.disabled&&a.zoomable){a=u*e,d=d*e;if(!1===g(this.element,"zoom",{ratio:e,oldRatio:l/u,originalEvent:n}))return this;n?(e=this.pointers,u=Z(this.cropper),e=e&&Object.keys(e).length?(i=o=r=0,_(e,function(e){var t=e.startX,e=e.startY;r+=t,o+=e,i+=1}),{pageX:r/=i,pageY:o/=i}):{pageX:n.pageX,pageY:n.pageY},s.left-=(a-l)*((e.pageX-u.left-s.left)/l),s.top-=(d-c)*((e.pageY-u.top-s.top)/c)):f(t)&&p(t.x)&&p(t.y)?(s.left-=(a-l)*((t.x-s.left)/l),s.top-=(d-c)*((t.y-s.top)/c)):(s.left-=(a-l)/2,s.top-=(d-c)/2),s.width=a,s.height=d,this.renderCanvas(!0)}return this},rotate:function(e){return this.rotateTo((this.imageData.rotate||0)+Number(e))},rotateTo:function(e){return p(e=Number(e))&&this.ready&&!this.disabled&&this.options.rotatable&&(this.imageData.rotate=e%360,this.renderCanvas(!0,!0)),this},scaleX:function(e){var t=this.imageData.scaleY;return this.scale(e,p(t)?t:1)},scaleY:function(e){var t=this.imageData.scaleX;return this.scale(p(t)?t:1,e)},scale:function(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:e,n=this.imageData,r=!1;return e=Number(e),t=Number(t),this.ready&&!this.disabled&&this.options.scalable&&(p(e)&&(n.scaleX=e,r=!0),p(t)&&(n.scaleY=t,r=!0),r&&this.renderCanvas(!0,!0)),this},getData:function(){var n,r,e=0<arguments.length&&void 0!==arguments[0]&&arguments[0],t=this.options,o=this.imageData,i=this.canvasData,a=this.cropBoxData;return this.ready&&this.cropped?(n={x:a.left-i.left,y:a.top-i.top,width:a.width,height:a.height},r=o.width/o.naturalWidth,_(n,function(e,t){n[t]=e/r}),e&&(i=Math.round(n.y+n.height),a=Math.round(n.x+n.width),n.x=Math.round(n.x),n.y=Math.round(n.y),n.width=a-n.x,n.height=i-n.y)):n={x:0,y:0,width:0,height:0},t.rotatable&&(n.rotate=o.rotate||0),t.scalable&&(n.scaleX=o.scaleX||1,n.scaleY=o.scaleY||1),n},setData:function(e){var t,n=this.options,r=this.imageData,o=this.canvasData,i={};return this.ready&&!this.disabled&&f(e)&&(t=!1,n.rotatable&&p(e.rotate)&&e.rotate!==r.rotate&&(r.rotate=e.rotate,t=!0),n.scalable&&(p(e.scaleX)&&e.scaleX!==r.scaleX&&(r.scaleX=e.scaleX,t=!0),p(e.scaleY)&&e.scaleY!==r.scaleY&&(r.scaleY=e.scaleY,t=!0)),t&&this.renderCanvas(!0,!0),n=r.width/r.naturalWidth,p(e.x)&&(i.left=e.x*n+o.left),p(e.y)&&(i.top=e.y*n+o.top),p(e.width)&&(i.width=e.width*n),p(e.height)&&(i.height=e.height*n),this.setCropBoxData(i)),this},getContainerData:function(){return this.ready?A({},this.containerData):{}},getImageData:function(){return this.sized?A({},this.imageData):{}},getCanvasData:function(){var t=this.canvasData,n={};return this.ready&&_(["left","top","width","height","naturalWidth","naturalHeight"],function(e){n[e]=t[e]}),n},setCanvasData:function(e){var t=this.canvasData,n=t.aspectRatio;return this.ready&&!this.disabled&&f(e)&&(p(e.left)&&(t.left=e.left),p(e.top)&&(t.top=e.top),p(e.width)?(t.width=e.width,t.height=e.width/n):p(e.height)&&(t.height=e.height,t.width=e.height*n),this.renderCanvas(!0)),this},getCropBoxData:function(){var e,t=this.cropBoxData;return(e=this.ready&&this.cropped?{left:t.left,top:t.top,width:t.width,height:t.height}:e)||{}},setCropBoxData:function(e){var t,n,r=this.cropBoxData,o=this.options.aspectRatio;return this.ready&&this.cropped&&!this.disabled&&f(e)&&(p(e.left)&&(r.left=e.left),p(e.top)&&(r.top=e.top),p(e.width)&&e.width!==r.width&&(t=!0,r.width=e.width),p(e.height)&&e.height!==r.height&&(n=!0,r.height=e.height),o&&(t?r.height=r.width/o:n&&(r.width=r.height*o)),this.renderCropBox()),this},getCroppedCanvas:function(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};if(!this.ready||!window.HTMLCanvasElement)return null;var t=this.canvasData,n=(S=this.image,b=this.imageData,p=t,c=e,_=b.aspectRatio,u=b.naturalWidth,f=b.naturalHeight,x=void 0===(x=b.rotate)?0:x,C=void 0===(C=b.scaleX)?1:C,b=void 0===(b=b.scaleY)?1:b,d=p.aspectRatio,v=p.naturalWidth,p=p.naturalHeight,g=void 0===(g=c.fillColor)?"transparent":g,w=void 0===(w=c.imageSmoothingEnabled)||w,$=void 0===($=c.imageSmoothingQuality)?"low":$,h=void 0===(h=c.maxWidth)?1/0:h,m=void 0===(m=c.maxHeight)?1/0:m,n=void 0===(n=c.minWidth)?0:n,c=void 0===(c=c.minHeight)?0:c,j=document.createElement("canvas"),E=j.getContext("2d"),y=R({aspectRatio:d,width:h,height:m}),d=R({aspectRatio:d,width:n,height:c},"cover"),v=Math.min(y.width,Math.max(d.width,v)),y=Math.min(y.height,Math.max(d.height,p)),d=R({aspectRatio:_,width:h,height:m}),p=R({aspectRatio:_,width:n,height:c},"cover"),h=Math.min(d.width,Math.max(p.width,u)),m=Math.min(d.height,Math.max(p.height,f)),_=[-h/2,-m/2,h,m],j.width=T(v),j.height=T(y),E.fillStyle=g,E.fillRect(0,0,v,y),E.save(),E.translate(v/2,y/2),E.rotate(x*Math.PI/180),E.scale(C,b),E.imageSmoothingEnabled=w,E.imageSmoothingQuality=$,E.drawImage.apply(E,[S].concat(D(_.map(function(e){return Math.floor(T(e))})))),E.restore(),j);if(!this.cropped)return n;var r,o,i,a,s,l,c=this.getData(),u=c.x,d=c.y,p=c.width,f=c.height,h=n.width/Math.floor(t.naturalWidth),m=(1!=h&&(u*=h,d*=h,p*=h,f*=h),p/f),g=R({aspectRatio:m,width:e.maxWidth||1/0,height:e.maxHeight||1/0}),v=R({aspectRatio:m,width:e.minWidth||0,height:e.minHeight||0},"cover"),y=R({aspectRatio:m,width:e.width||(1!=h?n.width:p),height:e.height||(1!=h?n.height:f)}),x=y.width,C=y.height,x=Math.min(g.width,Math.max(v.width,x)),C=Math.min(g.height,Math.max(v.height,C)),b=document.createElement("canvas"),w=b.getContext("2d"),$=(b.width=T(x),b.height=T(C),w.fillStyle=e.fillColor||"transparent",w.fillRect(0,0,x,C),e.imageSmoothingEnabled),S=e.imageSmoothingQuality,_=(w.imageSmoothingEnabled=void 0===$||$,S&&(w.imageSmoothingQuality=S),n.width),E=n.height,j=u,c=d,t=(j<=-p||_<j?s=i=r=j=0:j<=0?(i=-j,j=0,s=r=Math.min(_,p+j)):j<=_&&(i=0,s=r=Math.min(p,_-j)),r<=0||c<=-f||E<c?l=a=o=c=0:c<=0?(a=-c,c=0,l=o=Math.min(E,f+c)):c<=E&&(a=0,l=o=Math.min(f,E-c)),[j,c,r,o]);return 0<s&&0<l&&t.push(i*(m=x/p),a*m,s*m,l*m),w.drawImage.apply(w,[n].concat(D(t.map(function(e){return Math.floor(T(e))})))),b},setAspectRatio:function(e){var t=this.options;return this.disabled||o(e)||(t.aspectRatio=Math.max(0,e)||NaN,this.ready&&(this.initCropBox(),this.cropped&&this.renderCropBox())),this},setDragMode:function(e){var t,n,r=this.options,o=this.dragBox,i=this.face;return this.ready&&!this.disabled&&(n=r.movable&&"move"===e,r.dragMode=e=(t="crop"===e)||n?e:"none",d(o,L,e),a(o,w,t),a(o,S,n),r.cropBoxMovable||(d(i,L,e),a(i,w,t),a(i,S,n))),this}},Ce=C.Cropper,be=function(){function o(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{},n=this,r=o;if(!(n instanceof r))throw new TypeError("Cannot call a class as a function");if(!e||!ne.test(e.tagName))throw new Error("The first argument is required and must be an <img> or <canvas> element.");this.element=e,this.options=A({},re,f(t)&&t),this.cropped=!1,this.disabled=!1,this.pointers={},this.ready=!1,this.reloading=!1,this.replaced=!1,this.sized=!1,this.sizing=!1,this.init()}var e=o,t=[{key:"init",value:function(){var e,t=this.element,n=t.tagName.toLowerCase();if(!t[b]){if(t[b]=this,"img"===n){if(this.isImg=!0,e=t.getAttribute("src")||"",!(this.originalUrl=e))return;e=t.src}else"canvas"===n&&window.HTMLCanvasElement&&(e=t.toDataURL());this.load(e)}}},{key:"load",value:function(e){var t,n,r,o,i,a,s=this;e&&(this.url=e,this.imageData={},t=this.element,(n=this.options).rotatable||n.scalable||(n.checkOrientation=!1),n.checkOrientation&&window.ArrayBuffer?ee.test(e)?te.test(e)?this.read((a=(a=e).replace(me,""),r=atob(a),a=new ArrayBuffer(r.length),_(o=new Uint8Array(a),function(e,t){o[t]=r.charCodeAt(t)}),a)):this.clone():(i=new XMLHttpRequest,a=this.clone.bind(this),this.reloading=!0,(this.xhr=i).onabort=a,i.onerror=a,i.ontimeout=a,i.onprogress=function(){i.getResponseHeader("content-type")!==X&&i.abort()},i.onload=function(){s.read(i.response)},i.onloadend=function(){s.reloading=!1,s.xhr=null},n.checkCrossOrigin&&U(e)&&t.crossOrigin&&(e=z(e)),i.open("GET",e,!0),i.responseType="arraybuffer",i.withCredentials="use-credentials"===t.crossOrigin,i.send()):this.clone())}},{key:"read",value:function(e){var t=this.options,n=this.imageData,r=function(e){var t,n,r,o,i,a,s=new DataView(e);try{if(255===s.getUint8(0)&&216===s.getUint8(1))for(var l=s.byteLength,c=2;c+1<l;){if(255===s.getUint8(c)&&225===s.getUint8(c+1)){r=c;break}c+=1}var u,d,p;if(r&&(u=r+10,"Exif"===function(e,t,n){var r="";n+=t;for(var o=t;o<n;o+=1)r+=he(e.getUint8(o));return r}(s,r+4,4)&&(d=s.getUint16(u),!(n=18761===d)&&19789!==d||42===s.getUint16(u+2,n)&&8<=(p=s.getUint32(u+4,n))&&(o=u+p))),o){var f=s.getUint16(o,n);for(a=0;a<f;a+=1)if(i=o+12*a+2,274===s.getUint16(i,n)){i+=8,t=s.getUint16(i,n),s.setUint16(i,1,n);break}}}catch(e){t=1}return t}(e),o=0,i=1,a=1;1<r&&(this.url=function(e,t){var n=[],r=new Uint8Array(e);for(;0<r.length;)n.push(he.apply(null,F(r.subarray(0,8192)))),r=r.subarray(8192);return"data:".concat(t,";base64,").concat(btoa(n.join("")))}(e,X),o=(e=function(e){var t=0,n=1,r=1;switch(e){case 2:n=-1;break;case 3:t=-180;break;case 4:r=-1;break;case 5:t=90,r=-1;break;case 6:t=90;break;case 7:t=90,n=-1;break;case 8:t=-90}return{rotate:t,scaleX:n,scaleY:r}}(r)).rotate,i=e.scaleX,a=e.scaleY),t.rotatable&&(n.rotate=o),t.scalable&&(n.scaleX=i,n.scaleY=a),this.clone()}},{key:"clone",value:function(){var e=this.element,t=this.url,n=e.crossOrigin,r=t,o=(this.options.checkCrossOrigin&&U(t)&&(n=n||"anonymous",r=z(t)),this.crossOrigin=n,this.crossOriginUrl=r,document.createElement("img"));n&&(o.crossOrigin=n),o.src=r||t,o.alt=e.alt||"The image to crop",(this.image=o).onload=this.start.bind(this),o.onerror=this.stop.bind(this),u(o,G),e.parentNode.insertBefore(o,e.nextSibling)}},{key:"start",value:function(){function e(e,t){A(r.imageData,{naturalWidth:e,naturalHeight:t,aspectRatio:e/t}),r.initialImageData=A({},r.imageData),r.sizing=!1,r.sized=!0,r.build()}var t,n,r=this,o=this.image,i=(o.onload=null,o.onerror=null,this.sizing=!0,C.navigator&&/(?:iPad|iPhone|iPod).*?AppleWebKit/i.test(C.navigator.userAgent));o.naturalWidth&&!i?e(o.naturalWidth,o.naturalHeight):(t=document.createElement("img"),n=document.body||document.documentElement,(this.sizingImage=t).onload=function(){e(t.width,t.height),i||n.removeChild(t)},t.src=o.src,i||(t.style.cssText="left:0;max-height:none!important;max-width:none!important;min-height:0!important;min-width:0!important;opacity:0;position:absolute;top:0;z-index:-1;",n.appendChild(t)))}},{key:"stop",value:function(){var e=this.image;e.onload=null,e.onerror=null,e.parentNode.removeChild(e),this.image=null}},{key:"build",value:function(){var e,t,n,r,o,i,a,s,l;this.sized&&!this.ready&&(e=this.element,t=this.options,n=this.image,r=e.parentNode,(o=document.createElement("div")).innerHTML='<div class="cropper-container" touch-action="none"><div class="cropper-wrap-box"><div class="cropper-canvas"></div></div><div class="cropper-drag-box"></div><div class="cropper-crop-box"><span class="cropper-view-box"></span><span class="cropper-dashed dashed-h"></span><span class="cropper-dashed dashed-v"></span><span class="cropper-center"></span><span class="cropper-face"></span><span class="cropper-line line-e" data-cropper-action="e"></span><span class="cropper-line line-n" data-cropper-action="n"></span><span class="cropper-line line-w" data-cropper-action="w"></span><span class="cropper-line line-s" data-cropper-action="s"></span><span class="cropper-point point-e" data-cropper-action="e"></span><span class="cropper-point point-n" data-cropper-action="n"></span><span class="cropper-point point-w" data-cropper-action="w"></span><span class="cropper-point point-s" data-cropper-action="s"></span><span class="cropper-point point-ne" data-cropper-action="ne"></span><span class="cropper-point point-nw" data-cropper-action="nw"></span><span class="cropper-point point-sw" data-cropper-action="sw"></span><span class="cropper-point point-se" data-cropper-action="se"></span></div></div>',i=(o=o.querySelector(".".concat(b,"-container"))).querySelector(".".concat(b,"-canvas")),a=o.querySelector(".".concat(b,"-drag-box")),l=(s=o.querySelector(".".concat(b,"-crop-box"))).querySelector(".".concat(b,"-face")),this.container=r,this.cropper=o,this.canvas=i,this.dragBox=a,this.cropBox=s,this.viewBox=o.querySelector(".".concat(b,"-view-box")),this.face=l,i.appendChild(n),u(e,j),r.insertBefore(o,e.nextSibling),this.isImg||E(n,G),this.initPreview(),this.bind(),t.initialAspectRatio=Math.max(0,t.initialAspectRatio)||NaN,t.aspectRatio=Math.max(0,t.aspectRatio)||NaN,t.viewMode=Math.max(0,Math.min(3,Math.round(t.viewMode)))||0,u(s,j),t.guides||u(s.getElementsByClassName("".concat(b,"-dashed")),j),t.center||u(s.getElementsByClassName("".concat(b,"-center")),j),t.background&&u(o,"".concat(b,"-bg")),t.highlight||u(l,K),t.cropBoxMovable&&(u(l,S),d(l,L,"all")),t.cropBoxResizable||(u(s.getElementsByClassName("".concat(b,"-line")),j),u(s.getElementsByClassName("".concat(b,"-point")),j)),this.render(),this.ready=!0,this.setDragMode(t.dragMode),t.autoCrop&&this.crop(),this.setData(t.data),c(t.ready)&&m(e,"ready",t.ready,{once:!0}),g(e,"ready"))}},{key:"unbuild",value:function(){this.ready&&(this.ready=!1,this.unbind(),this.resetPreview(),this.cropper.parentNode.removeChild(this.cropper),E(this.element,j))}},{key:"uncreate",value:function(){this.ready?(this.unbuild(),this.ready=!1,this.cropped=!1):this.sizing?(this.sizingImage.onload=null,this.sizing=!1,this.sized=!1):this.reloading?(this.xhr.onabort=null,this.xhr.abort()):this.image&&this.stop()}}],n=[{key:"noConflict",value:function(){return window.Cropper=Ce,o}},{key:"setDefaults",value:function(e){A(re,f(e)&&e)}}];return t&&H(e.prototype,t),n&&H(e,n),o}(),A(be.prototype,e,n,ge,ve,ye,xe),be)}(),cropper.exports),__assign=function(){return(__assign=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};function __rest(e,t){var n={};for(o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var r=0,o=Object.getOwnPropertySymbols(e);r<o.length;r++)t.indexOf(o[r])<0&&Object.prototype.propertyIsEnumerable.call(e,o[r])&&(n[o[r]]=e[o[r]]);return n}var AuthStatus,applyDefaultOptions=function(e,t){var n=(t=void 0===t?{}:t).enable,r=t.scaleX,r=void 0===r?1:r,o=t.scaleY,o=void 0===o?1:o,i=t.zoomTo,i=void 0===i?0:i,t=t.rotateTo;void 0===n||n?e.enable():e.disable(),e.scaleX(r),e.scaleY(o),void 0!==t&&e.rotateTo(t),0<i&&e.zoomTo(i)},useCombinedRefs=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=react.exports.useRef(null);return React$1.useEffect(function(){e.forEach(function(e){e&&("function"==typeof e?e(n.current):e.current=n.current)})},[e]),n},ReactCropper=React$1.forwardRef(function(e,t){var e=__rest(e,[]),n=e.dragMode,r=void 0===n?"crop":n,o=e.src,n=e.style,i=e.className,a=e.crossOrigin,s=e.scaleX,l=e.scaleY,c=e.enable,u=e.zoomTo,d=e.rotateTo,p=e.alt,p=void 0===p?"picture":p,f=e.ready,h=e.onInitialized,m=__rest(e,["dragMode","src","style","className","crossOrigin","scaleX","scaleY","enable","zoomTo","rotateTo","alt","ready","onInitialized"]),g={scaleY:l,scaleX:s,enable:c,zoomTo:u,rotateTo:d},l=react.exports.useRef(null),v=useCombinedRefs(t,l);return react.exports.useEffect(function(){var e;null!=(e=v.current)&&e.cropper&&"number"==typeof u&&v.current.cropper.zoomTo(u)},[e.zoomTo]),react.exports.useEffect(function(){var e;null!=(e=v.current)&&e.cropper&&void 0!==o&&v.current.cropper.reset().clear().replace(o)},[o]),react.exports.useEffect(function(){var e;return null!==v.current&&(e=new Cropper(v.current,__assign(__assign({dragMode:r},m),{ready:function(e){null!==e.currentTarget&&applyDefaultOptions(e.currentTarget.cropper,g),f&&f(e)}})),h&&h(e)),function(){var e;null!=(e=null==(e=v.current)?void 0:e.cropper)&&e.destroy()}},[v]),React$1.createElement("div",{style:n,className:i},React$1.createElement("img",{crossOrigin:a,src:o,alt:p,style:{opacity:0,maxWidth:"100%"},ref:v}))});!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 namespace$3="users",userSelector=e=>{return null==(e=null==e?void 0:e.aiWareHeaderBarPanel)?void 0:e[namespace$3]},userAuthStatusSelector=e=>{return null==(e=null==(e=null==e?void 0:e.aiWareHeaderBarPanel)?void 0:e[namespace$3])?void 0:e.authStatus},GET_CURRENT_USER=`os-app-bar-panel/${namespace$3}/get current user`,GET_CURRENT_USER_SUCCESS=`os-app-bar-panel/${namespace$3}/get current user success`,RESET_BIOMETRIC=`os-app-bar-panel/${namespace$3}/reset biometric`,RESET_PASSWORD=`os-app-bar-panel/${namespace$3}/reset password`,RESET_PASSWORD_FAIL=`os-app-bar-panel/${namespace$3}/reset password fail`,UPDATE_PROFILE=`os-app-bar-panel/${namespace$3}/update profile`,UPDATE_PROFILE_FAIL=`os-app-bar-panel/${namespace$3}/update profile fail`,UPLOAD__AVATAR=`os-app-bar-panel/${namespace$3}/upload avatar`,UPDATE__AVATAR=`os-app-bar-panel/${namespace$3}/update avatar`,LOGOUT_USER=`os-app-bar-panel/${namespace$3}/logout`,LOGOUT_SUCCESS=`os-app-bar-panel/${namespace$3}/logout success`,LOGOUT_FAIL=`os-app-bar-panel/${namespace$3}/logout fail`,UPLOADING_AVATAR=`os-app-bar-panel/${namespace$3}/uploading`;function getCurrentUser(){return{type:GET_CURRENT_USER}}function getCurrentUserSuccess(e){return{type:GET_CURRENT_USER_SUCCESS,payload:e}}function resetBiometric(){return{type:RESET_BIOMETRIC}}function resetPassword(e){return{type:RESET_PASSWORD,payload:e}}function resetPasswordFail(){return{type:RESET_PASSWORD_FAIL}}function updateProfile(e){return{type:UPDATE_PROFILE,payload:e}}function updateProfileFail(){return{type:UPDATE_PROFILE_FAIL}}function uploadAvatar(e){return{type:UPLOAD__AVATAR,payload:e}}function updateAvatar(e){return{type:UPDATE__AVATAR,payload:e}}function logoutUserSuccess(){return{type:LOGOUT_SUCCESS}}function logoutUserFail(){return{type:LOGOUT_FAIL}}function uploadingAvatar(e){return{type:UPLOADING_AVATAR,payload:e}}!function(e){e.AUTHENTICATED="authenticated",e.LOGGING_OUT="logging_out",e.LOGGED_OUT="logged_out"}(AuthStatus=AuthStatus||{});const initialState$3={currentUser:{},status:"idle",authStatus:AuthStatus.AUTHENTICATED};function userReducer(e,t){return void 0===e?initialState$3:t.type===GET_CURRENT_USER_SUCCESS?Object.assign(Object.assign({},e),{currentUser:t.payload,status:"success"}):t.type===UPLOADING_AVATAR?Object.assign(Object.assign({},e),{loading:t.payload}):t.type===LOGOUT_USER?Object.assign(Object.assign({},e),{authStatus:AuthStatus.LOGGING_OUT}):t.type===LOGOUT_SUCCESS?Object.assign(Object.assign({},e),{authStatus:AuthStatus.LOGGED_OUT}):t.type===LOGOUT_FAIL?Object.assign(Object.assign({},e),{authStatus:AuthStatus.AUTHENTICATED}):e}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={},o=Object.keys(e),i=0;i<o.length;i++)n=o[i],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 o,e=new Date(e),i={hour12:!1,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"},r=(r&&(i.timeZone=r),Object.assign({timeZoneName:t},i)),t=hasIntl();return t&&hasFormatToParts()?(o=new Intl.DateTimeFormat(n,r).formatToParts(e).find(function(e){return"timezonename"===e.type.toLowerCase()}))?o.value:null:t?(o=new Intl.DateTimeFormat(n,i).format(e),new Intl.DateTimeFormat(n,r).format(e).substring(o.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,o,i={};for(r in e)!hasOwnProperty(e,r)||0<=n.indexOf(r)||null!=(o=e[r])&&(i[t(r)]=asNumber(o));return i}function formatOffset(e,t){var n=Math.trunc(Math.abs(e/60)),r=Math.trunc(Math.abs(e%60)),o=0<=e?"+":"-";switch(t){case"short":return o+padStart(n,2)+":"+padStart(r,2);case"narrow":return o+n+(0<r?":"+r:"");case"techie":return o+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 o={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."]},i=-1===["hours","minutes","seconds"].indexOf(e);if("auto"===n&&i){var a="days"===e;switch(t){case 1:return a?"tomorrow":"next "+o[e][0];case-1:return a?"yesterday":"last "+o[e][0];case 0:return a?"today":"this "+o[e][0]}}var n=Object.is(t,-0)||t<0,i=Math.abs(t),t=1===i,s=o[e],r=r?!t&&s[2]||s[1]:t?o[e][0]:e;return n?i+" "+r+" ago":"in "+i+" "+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);!(o=r()).done;){var o=o.value;o.literal?n+=o.val:n+=t(o.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 p(e,t){this.opts=t,this.loc=e,this.systemLoc=null}p.create=function(e,t){return new p(e,t=void 0===t?{}:t)},p.parseFormat=function(e){for(var t=null,n="",r=!1,o=[],i=0;i<e.length;i++){var a=e.charAt(i);"'"===a?(0<n.length&&o.push({literal:r,val:n}),t=null,n="",r=!r):r||a===t?n+=a:(0<n.length&&o.push({literal:!1,val:n}),t=n=a)}return 0<n.length&&o.push({literal:r,val:n}),o},p.macroTokenToFormatOpts=function(e){return _macroTokenToFormatOpts[e]};var e=p.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,o="en"===this.loc.listingMode(),t=this.loc.outputCalendar&&"gregory"!==this.loc.outputCalendar&&hasFormatToParts(),i=function(e,t){return r.loc.extract(n,e,t)},a=function(e){return n.isOffsetFixed&&0===n.offset&&e.allowZ?"Z":n.isValid?n.zone.formatOffset(n.ts,e.format):""},s=function(){return o?meridiemForDateTime(n):i({hour:"numeric",hour12:!0},"dayperiod")},l=function(e,t){return o?monthForDateTime(n,e):i(t?{month:e}:{month:e,day:"numeric"},"month")},c=function(e,t){return o?weekdayForDateTime(n,e):i(t?{weekday:e}:{weekday:e,month:"long",day:"numeric"},"weekday")},u=function(e){var t=p.macroTokenToFormatOpts(e);return t?r.formatWithSystemDefault(n,t):e},d=function(e){return o?eraForDateTime(n,e):i({era:e},"era")};return stringifyTokens(p.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 a({format:"narrow",allowZ:r.opts.allowZ});case"ZZ":return a({format:"short",allowZ:r.opts.allowZ});case"ZZZ":return a({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 s();case"d":return t?i({day:"numeric"},"day"):r.num(n.day);case"dd":return t?i({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?i({month:"numeric",day:"numeric"},"month"):r.num(n.month);case"LL":return t?i({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?i({month:"numeric"},"month"):r.num(n.month);case"MM":return t?i({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?i({year:"numeric"},"year"):r.num(n.year);case"yy":return t?i({year:"2-digit"},"year"):r.num(n.year.toString().slice(-2),2);case"yyyy":return t?i({year:"numeric"},"year"):r.num(n.year,4);case"yyyyyy":return t?i({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,o=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=p.parseFormat(t),i=t.reduce(function(e,t){var n=t.literal,t=t.val;return n?e:e.concat(t)},[]),e=e.shiftTo.apply(e,i.map(o).filter(function(e){return e}));return stringifyTokens(t,(n=e,function(e){var t=o(e);return t?r.num(n.get(t),e.length):e}))},p}(),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=[],o=0;o<n.length;o++){var i=n[o],a=i.type,i=i.value,a=typeToPos[a];isUndefined(a)||(r[a]=parseInt(i,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],o=t[2],i=t[3],e=+e,a=e%1e3;return(objToLocalTS({year:n,month:r,day:o,hour:24===i?0:i,minute:t[4],second:t[5],millisecond:0})-(e-=0<=a?a:1e3+a))/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$1=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$1},set:function(e){defaultLocale$1=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,o){e=e.listingMode(n);return"error"===e?null:("en"===e?r:o)(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,o,i;this.opts=n,this.hasIntl=hasIntl(),e.zone.universal&&this.hasIntl?(o=e.offset/60*-1,i=IANAZone.isValidZone(o=0<=o?"Etc/GMT+"+o:"Etc/GMT"+o),0!==e.offset&&i?(r=o,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&&(i=Object.assign({},this.opts),r&&(i.timeZone=r),this.dtf=getCachedDTF(t,i))}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 o(e,t,n,r){var e=parseLocaleString(e),o=e[0],i=e[1],e=e[2];this.locale=o,this.numberingSystem=t||i||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}o.fromOpts=function(e){return o.create(e.locale,e.numberingSystem,e.outputCalendar,e.defaultToEN)},o.create=function(e,t,n,r){void 0===r&&(r=!1);e=e||Settings.defaultLocale;return new o(e||(r?"en-US":systemLocale()),t||Settings.defaultNumberingSystem,n||Settings.defaultOutputCalendar,e)},o.resetCache=function(){sysLocaleCache=null,intlDTCache={},intlNumCache={},intlRelCache={}},o.fromObject=function(e){var e=void 0===e?{}:e,t=e.locale,n=e.numberingSystem,e=e.outputCalendar;return o.create(t,n,e)};var e=o.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?o.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 o=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 o.monthsCache[e][n]||(o.monthsCache[e][n]=mapMonths(function(e){return o.extract(e,t,"month")})),o.monthsCache[e][n]})},e.weekdays=function(n,r,e){var o=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 o.weekdaysCache[e][n]||(o.weekdaysCache[e][n]=mapWeekdays(function(e){return o.extract(e,t,"weekday")})),o.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(o,[{key:"fastNumbers",get:function(){return null==this.fastNumbersCached&&(this.fastNumbersCached=supportsFastNumbers(this)),this.fastNumbersCached}}]),o}();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(i){return t.reduce(function(e,t){var n=e[0],r=e[1],e=e[2],t=t(i,e),e=t[0],o=t[1],t=t[2];return[Object.assign(n,e),r||o,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 o=0,i=n;o<i.length;o++){var a=i[o],s=a[0],a=a[1],s=s.exec(e);if(s)return a(s)}return[null,null]}function simpleParse(){for(var e=arguments.length,o=new Array(e),t=0;t<e;t++)o[t]=arguments[t];return function(e,t){for(var n={},r=0;r<o.length;r++)n[o[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],o=e[2],i=e[3],a=e[4],s=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(o)),weeks:t(parseInteger(i)),days:t(parseInteger(a)),hours:t(parseInteger(s)),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,o,i,a){t={year:2===t.length?untruncateYear(parseInteger(t)):parseInteger(t),month:monthsShort.indexOf(n)+1,day:parseInteger(r),hour:parseInteger(o),minute:parseInteger(i)};return a&&(t.second=parseInteger(a)),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],o=e[4],i=e[5],a=e[6],s=e[7],l=e[8],c=e[9],u=e[10],e=e[11],t=fromStrings(t,o,r,n,i,a,s),o=l?obsOffsets[l]:c?0:signedOffset(u,e);return[t,new FixedOffsetZone(o)]}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],o=e[4],i=e[5],a=e[6];return[fromStrings(t,e[7],n,r,o,i,a),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,o){var e=e[o][n],i=t[n]/e,i=!(Math.sign(i)===Math.sign(r[o]))&&0!==r[o]&&Math.abs(i)<=1?antiTrunc(i):Math.trunc(i);r[o]+=i,t[n]-=i*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 h(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}h.fromMillis=function(e,t){return h.fromObject(Object.assign({milliseconds:e},t))},h.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 h({values:normalizeObject(e,h.normalizeUnit,["locale","numberingSystem","conversionAccuracy","zone"]),loc:Locale.fromObject(e),conversionAccuracy:e.conversionAccuracy})},h.fromISO=function(e,t){var n=parseISODuration(e)[0];return n?(n=Object.assign(n,t),h.fromObject(n)):h.invalid("unparsable",'the input "'+e+"\" can't be parsed as ISO 8601")},h.fromISOTime=function(e,t){var n=parseISOTimeOnly(e)[0];return n?(n=Object.assign(n,t),h.fromObject(n)):h.invalid("unparsable",'the input "'+e+"\" can't be parsed as ISO 8601")},h.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 h({invalid:e})},h.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)},h.isDuration=function(e){return e&&e.isLuxonDuration||!1};var e=h.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);!(o=r()).done;){var o=o.value;(hasOwnProperty(t.values,o)||hasOwnProperty(this.values,o))&&(n[o]=t.get(o)+this.get(o))}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 o=r[n];t[o]=asNumber(e(this.values[o],o))}return clone(this,{values:t},!0)},e.get=function(e){return this[h.normalizeUnit(e)]},e.set=function(e){return this.isValid?clone(this,{values:Object.assign(this.values,normalizeObject(e,h.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 h.normalizeUnit(e)}),o={},i={},a=this.toObject(),s=_createForOfIteratorHelperLoose(orderedUnits);!(f=s()).done;){var l=f.value;if(0<=t.indexOf(l)){var c,u=l,d=0;for(c in i)d+=this.matrix[c][l]*i[c],i[c]=0;isNumber(a[l])&&(d+=a[l]);var p,f=Math.trunc(d);for(p in o[l]=f,i[l]=d-f,a)orderedUnits.indexOf(p)>orderedUnits.indexOf(l)&&convert(this.matrix,a,p,o,l)}else isNumber(a[l])&&(i[l]=a[l])}for(r in i)0!==i[r]&&(o[u]+=r===u?i[r]:i[r]/this.matrix[u][r]);return clone(this,{values:o},!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(h,[{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}}]),h}();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,o,i=(e||"").split("/",2),a=i[0],s=i[1];if(a&&s){try{l=(n=DateTime.fromISO(a,t)).isValid}catch(s){l=!1}try{o=(r=DateTime.fromISO(s,t)).isValid}catch(s){o=!1}if(l&&o)return c.fromDateTimes(n,r);if(l){i=Duration.fromISO(s,t);if(i.isValid)return c.after(n,i)}else if(o){var l=Duration.fromISO(a,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 o=n.map(friendlyDateTime).filter(function(e){return t.contains(e)}).sort(),i=[],a=this.s,s=0;a<this.e;){var l=o[s]||this.e,l=+l>+this.e?this.e:l;i.push(c.fromDateTimes(a,l)),a=l,s+=1}return i},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,o=[];n<this.e;){var i=this.start.plus(t.mapUnits(function(e){return e*r})),i=+i>+this.e?this.e:i;o.push(c.fromDateTimes(n,i)),n=i,r+=1}return o},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,o=[],e=e.map(function(e){return[{time:e.s,type:"s"},{time:e.e,type:"e"}]}),i=_createForOfIteratorHelperLoose((t=Array.prototype).concat.apply(t,e).sort(function(e,t){return e.time-t.time}));!(a=i()).done;)var a=a.value,n=1===(r+="s"===a.type?1:-1)?a.time:(n&&+n!=+a.time&&o.push(c.fromDateTimes(n,a.time)),null);return c.merge(o)},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,o=t.locObj,o=void 0===o?null:o,t=t.outputCalendar;return(o||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,o=t.locObj,o=void 0===o?null:o,t=t.outputCalendar;return(o||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={},o=0,i=[["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]];o<i.length;o++){var a,s,l,c=i[o],u=c[0],c=c[1];0<=n.indexOf(u)&&(a=u,c=c(e,t),t<(l=e.plus(((s={})[u]=c,s)))?(e=e.plus(((s={})[u]=c-1,s)),--c):e=l,r[u]=c)}return[e,r,l,a]}function _diff(e,t,n,r){var e=highOrderDiffs(e,t,n),o=e[0],i=e[1],a=e[2],e=e[3],s=t-o,n=n.filter(function(e){return 0<=["hours","minutes","seconds","milliseconds"].indexOf(e)}),t=(0===n.length&&(a=a<t?o.plus(((t={})[e]=1,t)):a)!==o&&(i[e]=(i[e]||0)+s/(a-o)),Duration.fromObject(Object.assign(i,r)));return 0<n.length?(e=Duration.fromMillis(s,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 o in numberingSystemsUTF16){var o=numberingSystemsUTF16[o],i=o[0],o=o[1];i<=r&&r<=o&&(t+=r-i)}}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 o=digitRegex(n),i=digitRegex(n,"{2}"),a=digitRegex(n,"{3}"),s=digitRegex(n,"{4}"),l=digitRegex(n,"{6}"),c=digitRegex(n,"{1,2}"),u=digitRegex(n,"{1,3}"),d=digitRegex(n,"{1,6}"),p=digitRegex(n,"{1,9}"),f=digitRegex(n,"{2,4}"),h=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(f,untruncateYear);case"yyyy":return intUnit(s);case"yyyyy":return intUnit(h);case"yyyyyy":return intUnit(l);case"M":return intUnit(c);case"MM":return intUnit(i);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(i);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(i);case"o":return intUnit(u);case"ooo":return intUnit(a);case"HH":return intUnit(i);case"H":return intUnit(c);case"hh":return intUnit(i);case"h":return intUnit(c);case"mm":return intUnit(i);case"m":case"q":return intUnit(c);case"qq":return intUnit(i);case"s":return intUnit(c);case"ss":return intUnit(i);case"S":return intUnit(u);case"SSS":return intUnit(a);case"u":return simple(p);case"a":return oneOf(n.meridiems(),0);case"kkkk":return intUnit(s);case"kk":return intUnit(f,untruncateYear);case"W":return intUnit(c);case"WW":return intUnit(i);case"E":case"c":return intUnit(o);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+")(?::("+i.source+"))?"),2);case"ZZZ":return offset(new RegExp("([+-]"+c.source+")("+i.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 o,i,a,s={},l=1;for(o in n)hasOwnProperty(n,o)&&(a=(i=n[o]).groups?i.groups+1:1,!i.literal&&i.token&&(s[i.token.val[0]]=i.deser(r.slice(l,l+a))),l+=a);return[r,s]}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)}),o=r.find(function(e){return e.invalidReason});if(o)return{input:e,tokens:n,invalidReason:o.invalidReason};var o=buildRegex(r),r=o[0],o=o[1],r=RegExp(r,"i"),o=match(e,r,o),i=o[0],o=o[1],a=o?dateTimeFromMatches(o):[null,null],s=a[0],a=a[1];if(hasOwnProperty(o,"a")&&hasOwnProperty(o,"H"))throw new ConflictingSpecificationError("Can't include meridiem when specifying 24-hour format");return{input:e,tokens:n,regex:r,rawMatches:i,matches:o,result:s,zone:a}}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,o=e.day,i=computeOrdinal(n,r,o),r=dayOfWeek(n,r,o),o=Math.floor((i-r+10)/7);return o<1?o=weeksInWeekYear(t=n-1):o>weeksInWeekYear(n)?(t=n+1,o=1):t=n,Object.assign({weekYear:t,weekNumber:o,weekday:r},timeObject(e))}function weekToGregorian(e){var t,n=e.weekYear,r=e.weekNumber,o=e.weekday,i=dayOfWeek(n,1,4),a=daysInYear(n),r=7*r+o-i-3,o=(r<1?r+=daysInYear(t=n-1):a<r?(t=n+1,r-=daysInYear(n)):t=n,uncomputeOrdinal(t,r)),i=o.month,a=o.day;return Object.assign({year:t,month:i,day:a},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,o=integerBetween(t,0,23)||24===t&&0===n&&0===r&&0===e,i=integerBetween(n,0,59),a=integerBetween(r,0,59),s=integerBetween(e,0,999);return o?i?a?!s&&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,o=n.offset(r);if(t===o)return[r,t];n=n.offset(r-=60*(o-t)*1e3);return o===n?[r,o]:[e-60*Math.min(o,n)*1e3,Math.max(o,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),o=e.c.month+Math.trunc(t.months)+3*Math.trunc(t.quarters),r=Object.assign({},e.c,{year:r,month:o,day:Math.min(e.c.day,daysInMonth(r,o))+Math.trunc(t.days)+7*Math.trunc(t.weeks)}),o=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!==o&&(n=e.zone.offset(r+=o)),{ts:r,o:n}}function parseDataToDateTime(e,t,n,r,o){var i=n.setZone,a=n.zone;return e&&0!==Object.keys(e).length?(e=DateTime.fromObject(Object.assign(e,n,{zone:t||a,setZone:void 0})),i?e:e.setZone(a)):DateTime.invalid(new Invalid("unparsable",'the input "'+o+"\" 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,o=t.includeOffset,i=t.includePrefix,i=void 0!==i&&i,a=t.includeZone,a=void 0!==a&&a,s=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")),(a||o)&&(void 0!==s&&s)&&(l+=" "),a?l+="z":o&&(l+="basic"===t?"ZZZ":"ZZ"),toTechFormat(e,l));return n=i?"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 o=hasInvalidGregorianData(e)||hasInvalidTimeData(e);if(o)return DateTime.invalid(o);var o=Settings.now(),o=objToTS(e,t.offset(o),t),i=o[0],o=o[1];return new DateTime({ts:i,zone:t,o:o})}function diffRelative(t,n,r){function e(e,t){return e=roundTo(e,i||r.calendary?0:2,!0),n.loc.clone(r).relFormatter(r).format(e,t)}function o(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 i=!!isUndefined(r.round)||r.round;if(r.unit)return e(o(r.unit),r.unit);for(var a=_createForOfIteratorHelperLoose(r.units);!(s=a()).done;){var s=s.value,l=o(s);if(1<=Math.abs(l))return e(l,s)}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)),o=(this.ts=isUndefined(e.ts)?Settings.now():e.ts,null),i=null;r||(i=e.old&&e.old.ts===this.ts&&e.old.zone.equals(n)?(o=(t=[e.old.c,e.old.o])[0],t[1]):(t=n.offset(this.ts),o=tsToObj(this.ts,t),o=(r=Number.isNaN(o.year)?new Invalid("invalid input"):null)?null:o,r?null:t)),this._zone=n,this.loc=e.loc||Locale.create(),this.invalid=r,this.weekData=null,this.c=o,this.o=i,this.isLuxonDateTime=!0}g.now=function(){return new g({})},g.local=function(e,t,n,r,o,i,a){return isUndefined(e)?g.now():quickDT({year:e,month:t,day:n,hour:r,minute:o,second:i,millisecond:a},Settings.defaultZone)},g.utc=function(e,t,n,r,o,i,a){return isUndefined(e)?new g({ts:Settings.now(),zone:FixedOffsetZone.utcInstance}):quickDT({year:e,month:t,day:n,hour:r,minute:o,second:i,millisecond:a},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),o=normalizeObject(e,normalizeUnit,["zone","locale","outputCalendar","numberingSystem"]),i=!isUndefined(o.ordinal),a=!isUndefined(o.year),s=!isUndefined(o.month)||!isUndefined(o.day),a=a||s,l=o.weekYear||o.weekNumber,c=Locale.fromObject(e);if((a||i)&&l)throw new ConflictingSpecificationError("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(s&&i)throw new ConflictingSpecificationError("Can't mix ordinal dates with month/day");for(var u,s=l||o.weekday&&!a,d=tsToObj(n,r),p=(s?(m=orderedWeekUnits,u=defaultWeekUnitValues,d=gregorianToWeek(d)):i?(m=orderedOrdinalUnits,u=defaultOrdinalUnitValues,d=gregorianToOrdinal(d)):(m=orderedUnits$1,u=defaultUnitValues),!1),f=_createForOfIteratorHelperLoose(m);!(h=f()).done;){var h=h.value;isUndefined(o[h])?o[h]=(p?u:d)[h]:p=!0}l=(s?hasInvalidWeekData:i?hasInvalidOrdinalData:hasInvalidGregorianData)(o)||hasInvalidTimeData(o);if(l)return g.invalid(l);var n=objToTS(s?weekToGregorian(o):i?ordinalToGregorian(o):o,r,t),m=new g({ts:n[0],zone:t,o:n[1],loc:c});return o.weekday&&a&&e.weekday!==m.weekday?g.invalid("mismatched weekday","you can't specify both a weekday of "+o.weekday+" and a date of "+m.toISO()):m},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,o=r.locale,r=r.numberingSystem,o=parseFromTokens(Locale.fromOpts({locale:void 0===o?null:o,numberingSystem:void 0===r?null:r,defaultToEN:!0}),e,t),r=o[0],i=o[1],o=o[2];return o?g.invalid(o):parseDataToDateTime(r,i,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),o=!isUndefined(e.year),i=!isUndefined(e.month)||!isUndefined(e.day),a=e.weekYear||e.weekNumber;if((o||i||r)&&a)throw new ConflictingSpecificationError("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(i&&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));o=objToTS(t,this.o,this.zone);return clone$1(this,{ts:o[0],o:o[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,o=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!==o&&o,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"],o=e.unit;return Array.isArray(e.unit)&&(r=e.unit,o=void 0),diffRelative(t,this.plus(n),Object.assign(e,{numeric:"always",units:r,unit:o}))},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 useStyles$b=makeStyles()(()=>({root:{padding:"15px 30px"},title:{display:"flex"},action:{fontWeight:600},time:{fontSize:"12px",paddingLeft:"15px",lineHeight:"21px"},description:{lineHeight:"150%",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},divider:{margin:"0 30px",backgroundColor:"#D5DFE9",height:"0.5px"}})),ActivityCard=({longFormatTime:e=!1,data:{createdDateTime:t,event:n,description:r}})=>{var o=useStyles$b()["classes"];return jsxRuntime.exports.jsxs(react.exports.Fragment,{children:[jsxRuntime.exports.jsxs("div",Object.assign({className:o.root,"data-testid":"activity-card"},{children:[jsxRuntime.exports.jsxs("div",Object.assign({className:o.title},{children:[jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"body1",className:o.action},{children:n})),jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"body2",className:o.time},{children:e?DateTime_1.fromISO(t||"").toFormat("F"):DateTime_1.fromISO(t||"").toFormat("tt")}))]})),jsxRuntime.exports.jsx("div",{children:jsxRuntime.exports.jsx(Tooltip$1,Object.assign({placement:"top-start",title:r||""},{children:jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"body1",className:o.description},{children:r}))}))})]})),jsxRuntime.exports.jsx(Divider$1,{className:o.divider})]})},useStyles$a=makeStyles()(e=>({root:{width:"100%",height:"100%"},header:{opacity:.9,display:"flex",justifyContent:"space-between",padding:e.spacing(4,6),position:"relative"},title:{opacity:.9,padding:e.spacing(4,6,2,6)},titleText:{textTransform:"uppercase",color:e.palette.secondary.main},scrollContent:{overflowY:"auto",height:"calc(100% - 65px)"}})),filters$2=[{value:"all",title:"All Activities"},{value:"today",title:"Activities today"}],today$1=DateTime_1.local().startOf("day"),yesterday=DateTime_1.local().plus({days:-1}).startOf("day"),ActivityPanel=({data:e,filter:t,onChangeFilter:n})=>{var r=useStyles$a()["classes"];const o=null==e?void 0:e.filter(e=>DateTime_1.fromISO(e.createdDateTime||"").hasSame(today$1,"day")),i=null==e?void 0:e.filter(e=>DateTime_1.fromISO(e.createdDateTime||"").hasSame(yesterday,"day")),a=null==e?void 0:e.filter(e=>DateTime_1.fromISO(e.createdDateTime||"").startOf("day")<yesterday);return jsxRuntime.exports.jsxs("div",Object.assign({className:r.root},{children:[jsxRuntime.exports.jsxs("div",Object.assign({className:r.header},{children:[jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"body2",className:r.titleText},{children:"Today"})),jsxRuntime.exports.jsx(Filter,{data:filters$2,filter:t,onFilter:e=>{n(null==(e=null==e?void 0:e.target)?void 0:e.value)}})]})),jsxRuntime.exports.jsxs(Box$1,Object.assign({className:r.scrollContent},{children:[jsxRuntime.exports.jsx(Box$1,{children:null===o||void 0===o?void 0:o.map((e,t)=>jsxRuntime.exports.jsx(ActivityCard,{longFormatTime:!1,data:e},t))}),"all"===t&&jsxRuntime.exports.jsxs(react.exports.Fragment,{children:[0<(null===i||void 0===i?void 0:i.length)&&jsxRuntime.exports.jsxs(react.exports.Fragment,{children:[jsxRuntime.exports.jsx(Box$1,Object.assign({className:r.title,"data-testid":"filter-all-box"},{children:jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"body2",className:r.titleText},{children:"Yesterday"}))})),jsxRuntime.exports.jsx(Box$1,{children:i.map((e,t)=>jsxRuntime.exports.jsx(ActivityCard,{longFormatTime:!1,data:e},t))})]}),0<(null===a||void 0===a?void 0:a.length)&&jsxRuntime.exports.jsxs(react.exports.Fragment,{children:[jsxRuntime.exports.jsx(Box$1,Object.assign({className:r.title},{children:jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"body2",className:r.titleText},{children:"Older"}))})),jsxRuntime.exports.jsx(Box$1,{children:a.map((e,t)=>jsxRuntime.exports.jsx(ActivityCard,{longFormatTime:!0,data:e},t))})]})]})]}))]}))},useStyles$9=makeStyles()((e,t,n)=>({listItem:{display:"flex",cursor:"pointer",alignItems:"center",height:70,width:"100%",padding:e.spacing(0,6),"&:hover":{backgroundColor:"#EEF3F9"},["& ."+n.appName]:{marginLeft:e.spacing(3)}},iconButton:{borderRadius:4,textAlign:"center",width:"94px",height:"110px",cursor:"pointer",["& ."+n.appName]:{marginBottom:e.spacing(3)}},appName:{textAlign:"center",textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden",textTransform:"capitalize"},image:{display:"flex",justifyContent:"center",alignItems:"center",margin:e.spacing(3.8,0)},bounding:{padding:"17px 27px 19px 27px"},img:{width:40,height:40}})),iconMapper={CMS:img$V,Discovery:img$U,Collection:img$T,Library:img$S,Admin:img$1s,Developer:img$R};function AppIcon({id:e,icon:t,type:n,iconUrl:r,appName:o,onClick:i}){var a=useStyles$9()["classes"];const[s,l]=react.exports.useState(t||r||o&&iconMapper[o]||img$R);return jsxRuntime.exports.jsx(Tooltip$1,Object.assign({title:o||"",PopperProps:{disablePortal:!0}},{children:jsxRuntime.exports.jsxs("div",Object.assign({onClick:function(){i&&i(e)},className:classNames({[a.iconButton]:"grid"===n,[a.listItem]:"list"===n}),"data-test":"dt-button-app-icon","data-testid":"dt-button-app-icon"},{children:[jsxRuntime.exports.jsx("div",Object.assign({className:a.image},{children:jsxRuntime.exports.jsx("img",{alt:"app-icon",onError:function(){l(img$R)},src:s,draggable:"false",className:a.img})})),jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"body2",className:a.appName},{children:o}))]}))}))}const useStyles$8=makeStyles()((e,{row:t})=>({tabsContainer:{width:"100%"},gridContainer:{display:"flex"},listContainer:{},gridItem:{display:"flex",justifyContent:"center",paddingBottom:e.spacing(1.6),"&:hover":{backgroundColor:"#EEF3F9",borderRadius:"4px"}},padding:{padding:e.spacing(0,6,3,6)},moreAppContainer:{height:`calc(100vh - ${0===t?175:1===t?275:2===t?395:500}px - 56px - 66px - 10px)`,minHeight:3===t?300:0,overflow:"overlay",overflowX:"hidden"},relativeParent:{position:"relative"},noMoreApps:{padding:e.spacing(0,9,3,9)},noSelect:{userSelect:"none"},gridTitle:{margin:"-5px 0 -5px","& > $noSelect":{marginBottom:15}},appItemDivider:{margin:e.spacing(0,6)}}));function AppList({title:e,selectedAppId:t,onSelectApplication:n,applications:r=[],useGrid:o=!1,row:i=0}){const a=useStyles$8({row:i})["classes"],[s,l]=react.exports.useState(t),[c,u]=react.exports.useState([]);function d(e){l(e),n(e)}function p(e,t){return e.name>t.name?1:e.name<t.name?-1:0}return react.exports.useEffect(()=>{if(0<r.length){const t=[...r];var e=t.sort(p);u(e)}},[r]),react.exports.useEffect(()=>{t!==s&&l(t)},[t,s]),jsxRuntime.exports.jsxs("div",Object.assign({className:classNames({[a.gridTitle]:o},a.tabsContainer)},{children:[jsxRuntime.exports.jsx("div",Object.assign({className:classNames({[a.padding]:!o},a.noSelect)},{children:jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"h3"},{children:e}))})),o&&jsxRuntime.exports.jsx("div",Object.assign({className:a.gridContainer},{children:jsxRuntime.exports.jsx(Grid$1,Object.assign({container:!0},{children:0===r.length?jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"body2"},{children:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar-panel.Xzhf45",defaultMessage:"No Applications",description:"the label no app will show if we have no application for grid view"})})):0<c.length&&c.map((e,t)=>{var{id:e=t,iconUrl:t,name:n}=e;return jsxRuntime.exports.jsx(Grid$1,Object.assign({item:!0,xs:4},{children:jsxRuntime.exports.jsx("div",Object.assign({className:a.gridItem},{children:jsxRuntime.exports.jsx(AppIcon,{type:"grid",selected:e===s,onClick:d,iconUrl:t,id:e,appName:n})}))}),e)})}))})),!o&&jsxRuntime.exports.jsx("div",Object.assign({className:a.listContainer},{children:0===r.length?jsxRuntime.exports.jsx("div",Object.assign({className:a.noMoreApps},{children:jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"body2"},{children:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar-panel.dyhBih",defaultMessage:"No Applications",description:"the label no app will show if we have no application for list view"})}))})):jsxRuntime.exports.jsx("div",Object.assign({className:a.moreAppContainer},{children:0<r.length&&r.sort(p).map((e,t)=>{var{id:e=t,iconUrl:n,name:r}=e;return jsxRuntime.exports.jsxs("div",Object.assign({className:a.relativeParent},{children:[jsxRuntime.exports.jsx(AppIcon,{type:"list",selected:e===s,onClick:d,iconUrl:n,id:e,appName:r}),jsxRuntime.exports.jsx(Divider$1,{className:a.appItemDivider})]}),e+"_"+t)})}))}))]}))}const useStyles$7=makeStyles()(e=>({tabsContainer:{padding:e.spacing(4.8,6,6.4,6)},listContainer:{padding:e.spacing(4,0),overflow:"hidden"},skeletonContainer:{position:"absolute",width:"100%",height:"100%",zIndex:5,backgroundColor:"white"}}));function ApplicationPanel({selectedAppId:e,onChangeTab:t,recentApplist:n=[],applications:r=[],onClickApp:o}){var i=useStyles$7()["classes"],a=useSelector(preferredLanguageSelector);const s=AIWareFormatMessage(a),[l,c]=react.exports.useState(0===n.length?0:n.length<4?1:2),[u,d]=(react.exports.useEffect(()=>{var e=0===n.length?0:n.length<4?1:2;c(e)},[n]),react.exports.useState(e));function p(e){d(e),null!=t&&t(e),null!=o&&o(e)}return react.exports.useEffect(()=>{e!==u&&d(e)},[e,u]),jsxRuntime.exports.jsxs(jsxRuntime.exports.Fragment,{children:[jsxRuntime.exports.jsx("div",Object.assign({className:i.tabsContainer},{children:jsxRuntime.exports.jsx(AppList,{useGrid:!0,title:s({id:"os-app-bar-panel.name.recentApps",defaultMessage:[{type:0,value:"Recent Applications"}]}),type:"Recent",applications:n,onSelectApplication:p,selectedAppId:null})})),jsxRuntime.exports.jsx(Divider$1,{}),jsxRuntime.exports.jsx("div",Object.assign({className:i.listContainer},{children:jsxRuntime.exports.jsx(AppList,{useGrid:!1,title:s({id:"os-app-bar-panel.name.moreApps",defaultMessage:[{type:0,value:"More Applications"}]}),type:"More",applications:r,onSelectApplication:p,selectedAppId:null,row:l})}))]})}const useStyles$6=makeStyles()(e=>({root:{width:"100%",height:"calc(100% - 30px)"},tabs:{margin:e.spacing(6)},tabPanels:{width:"100%",height:"calc(100% - 80px)"},logRoot:{padding:e.spacing(0,6)},logHeader:{display:"flex",justifyContent:"space-between"},logTitleText:{paddingTop:"4px"},logContent:{marginTop:"12px"},overviewRoot:{padding:e.spacing(0,6),height:"100%"},overviewHeader:{display:"flex",justifyContent:"space-between"},overviewTitleText:{fontWeight:600},overviewContent:{width:"100%",height:"calc(100% - 50px)",display:"flex",flexDirection:"column",overflowY:"auto"},overviewLineChart:{padding:e.spacing(6,0),flex:1},overviewPieChart:{marginTop:0}})),filters$1=[{value:"all",title:"View Current Week"},{value:"no data",title:"View Current Month"}];function Overview(){var e=useStyles$6()["classes"];const[t,n]=react.exports.useState("all");return jsxRuntime.exports.jsxs(Box$1,Object.assign({className:e.overviewRoot,"data-testid":"performance-monitor-overview"},{children:[jsxRuntime.exports.jsxs(Box$1,Object.assign({className:e.overviewHeader},{children:[jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"subtitle1",className:e.overviewTitleText},{children:"CPU Load"})),jsxRuntime.exports.jsx(Filter,{data:filters$1,filter:t,onFilter:e=>{n(e.target.value)}})]})),jsxRuntime.exports.jsx(Box$1,{className:e.overviewContent})]}))}const useStyles$5=makeStyles()(e=>({table:{minWidth:650},SdkTableCellData:{fontSize:12,color:"#000"},SdkTableCellHeader:{fontSize:12,color:"#9CA8B4",borderBottom:"none",paddingBottom:0},SdkTableCellAvatar:{width:"32px",padding:e.spacing(3,0,3,1)},smallAvatar:{width:32,height:32},SdkTableCellStatus:{color:"#219653",textTransform:"capitalize"},SdkTableCellStatusDeactived:{color:"#8D0707",textTransform:"capitalize"}}));function MuiTable({columns:t=[],data:e=[]}){const r=useStyles$5()["classes"];return jsxRuntime.exports.jsx("div",{children:jsxRuntime.exports.jsxs(Table$1,Object.assign({className:r.table,"aria-label":"simple table"},{children:[jsxRuntime.exports.jsx(TableHead$1,{children:jsxRuntime.exports.jsx(TableRow$1,{children:t.map((e,t)=>jsxRuntime.exports.jsx(TableCell$1,Object.assign({classes:{root:r.SdkTableCellHeader},align:e.align},{children:e.label}),t))})}),jsxRuntime.exports.jsx(TableBody$1,{children:e.map((n,e)=>jsxRuntime.exports.jsx(TableRow$1,{children:t.map((e,t)=>"avatar"===e.value?jsxRuntime.exports.jsx(TableCell$1,Object.assign({padding:"checkbox",classes:{root:classNames(r.SdkTableCellData,r.SdkTableCellAvatar)},align:"right"},{children:jsxRuntime.exports.jsx(Avatar$1,{alt:"",src:n[e.value],className:r.smallAvatar})}),t):"status"===e.value?jsxRuntime.exports.jsx(TableCell$1,Object.assign({padding:"checkbox",classes:{root:r.SdkTableCellData},align:e.align},{children:jsxRuntime.exports.jsx("span",Object.assign({className:"deactived"===n[e.value]||"failed"===n[e.value]?r.SdkTableCellStatusDeactived:r.SdkTableCellStatus},{children:n[e.value]}))}),t):jsxRuntime.exports.jsx(TableCell$1,Object.assign({classes:{root:r.SdkTableCellData},align:e.align},{children:n[e.value]}),t))},e))})]}))})}const data=[1,2,3,4,5,6,7,8].map(e=>[{name:"LogoGrab - V3F - "+e,engineId:"0006676754"+e,jobId:"20104106_6WnM4rGlXj",status:"Pending",duration:"1s",appName:"Attribute"}]),columns=[{value:"name",label:"Engine Name",align:"left"},{value:"engineId",label:"Engine ID",align:"left"},{value:"jobId",label:"Job ID",align:"left"},{value:"status",label:"Status",align:"left"},{value:"duration",label:"Time",align:"left"},{value:"appName",label:"App Name",align:"left"}],filters=[{value:"all",title:"View All Applications"},{value:"no data",title:"Active Applications"}];function PerformanceLogs(){var e=useStyles$6()["classes"];const[t,n]=react.exports.useState("all");return jsxRuntime.exports.jsxs(Box$1,Object.assign({className:e.logRoot,"data-testid":"performance-monitor-logs"},{children:[jsxRuntime.exports.jsxs(Box$1,Object.assign({className:e.logHeader},{children:[jsxRuntime.exports.jsx(Filter,{data:filters,filter:t,onFilter:e=>{n(e.target.value)}}),jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"body2",className:e.logTitleText},{children:"Last 24 Hours"}))]})),jsxRuntime.exports.jsx(Box$1,Object.assign({className:e.logContent},{children:jsxRuntime.exports.jsx(MuiTable,{columns:columns,data:data})}))]}))}const Resources=()=>jsxRuntime.exports.jsx("div",Object.assign({"data-testid":"performance-monitor-resources"},{children:"Resources"}));function PerformanceErrors(){return jsxRuntime.exports.jsx("div",Object.assign({"data-testid":"performance-monitor-errors"},{children:"Performance Errors"}))}const tabsList$1=[{label:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar-panel.xgDIjO",defaultMessage:"Overview",description:"tab label: Overview"}),disabled:!1},{label:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar-panel.NXAxMt",defaultMessage:"Logs",description:"tab label: Logs"}),disabled:!1},{label:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar-panel.Mxysi8",defaultMessage:"Resources",description:"tab label: Resources"}),disabled:!0},{label:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar-panel.Qj95LF",defaultMessage:"Errors",description:"tab label: Errors"}),disabled:!0}];function PerformanceMonitor(){var e=useStyles$6()["classes"];const[t,n]=react.exports.useState(0);return jsxRuntime.exports.jsxs(Box$1,Object.assign({className:e.root,"data-testid":"performance-monitor"},{children:[jsxRuntime.exports.jsx(Box$1,Object.assign({className:e.tabs},{children:jsxRuntime.exports.jsx(CustomTabs,{selectedId:t,onChangeTab:e=>{n(Number(e))},tabsList:tabsList$1})})),jsxRuntime.exports.jsxs(Box$1,Object.assign({className:e.tabPanels},{children:[jsxRuntime.exports.jsx(TabPanel,Object.assign({value:t,index:0},{children:jsxRuntime.exports.jsx(Overview,{})})),jsxRuntime.exports.jsx(TabPanel,Object.assign({value:t,index:1},{children:jsxRuntime.exports.jsx(PerformanceLogs,{})})),jsxRuntime.exports.jsx(TabPanel,Object.assign({value:t,index:2},{children:jsxRuntime.exports.jsx(Resources,{})})),jsxRuntime.exports.jsx(TabPanel,Object.assign({value:t,index:3},{children:jsxRuntime.exports.jsx(PerformanceErrors,{})}))]}))]}))}const useStyles$4=makeStyles()(e=>({root:{display:"flex",justifyContent:"center"},changeAvatarIcon:{color:"#121212 !important",backgroundColor:"#ffffff !important",padding:e.spacing(1.2)+" !important","&:hover":{backgroundColor:"#ffffff !important"}},avatarLarge:{color:e.palette.secondary.main,backgroundColor:"#ffffff !important",fontSize:"30px !important",width:"84px !important",height:"84px !important",border:"5px solid #E8E8E8"}})),AvatarProfile=({avatar:e,sortName:t,onEditAvatarClick:n,loadingStatus:r})=>{var o=useStyles$4()["classes"];return jsxRuntime.exports.jsx("div",{children:jsxRuntime.exports.jsx("div",Object.assign({className:o.root},{children:jsxRuntime.exports.jsx(Badge$1,Object.assign({"data-test":"dt-button-upload-avatar-icon",overlap:"circular","data-testid":"dt-button-upload-avatar-icon",anchorOrigin:{vertical:"bottom",horizontal:"right"},badgeContent:jsxRuntime.exports.jsx(IconButton$1,Object.assign({color:"primary","aria-label":"upload picture",className:o.changeAvatarIcon,onClick:()=>{n()},"data-test":"app-bar-update-avatar",size:"large","data-testid":"app-bar-update-avatar"},{children:jsxRuntime.exports.jsx("img",{src:img$16,alt:""})}))},{children:"loading"===r?jsxRuntime.exports.jsx(CircularProgress$1,{}):e?jsxRuntime.exports.jsx(Avatar$1,{"data-test":"dt-user-avatar-image",src:e,className:o.avatarLarge}):jsxRuntime.exports.jsx(Avatar$1,Object.assign({className:o.avatarLarge},{children:null==t?void 0:t.toUpperCase()}))}))}))})},SHARED_TEXT={buttonLink:()=>jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar-panel.aaaaa1",defaultMessage:"Link",description:"label of link open id connector button on profile panel"}),buttonUnlink:()=>jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar-panel.L4gr2p",defaultMessage:"Unlink",description:"label of unlink open id connector button on profile panel"}),basicInfoTabLabel:()=>jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar-panel.lpZXMT",defaultMessage:"Basic Info",description:"Personal Profile: Basic info name, email etc"}),accountLinkingTabLabel:()=>jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar-panel.AgbO9g",defaultMessage:"Account Linking",description:"Personal Profile: Open ID Connector Account Linking"}),settingsTabLabel:()=>jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar-panel.oYYEos",defaultMessage:"Settings",description:"Profile Settings"}),accountLinkingLabel:()=>jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar-panel.JxMDBr",defaultMessage:"Link your Account",description:"label of manage basic infomation container"}),accountLinkingDescription:()=>jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar-panel.77MHtz",defaultMessage:"View your accounts from other identify providers that are linked with this account.",description:"description of manage account linking"}),unlinkDialogTitle:()=>jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar-panel.naysir",defaultMessage:"Unlink this Identity Provider?",description:"title for unlink identity provider"}),unlinkDialogContent:e=>jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar-panel.dwZfY7",defaultMessage:"Are you sure you want to unlink {name} from your account?",description:"content for unlink identity provider",values:{name:e||""}}),unlinkDialogCancel:()=>jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar-panel.SNjPPT",defaultMessage:"Cancel",description:"cancel for unlink identity provider"}),unlinkDialogConfirm:()=>jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar-panel.KJyVd9",defaultMessage:"Yes, Unlink",description:"confirm for unlink identity provider"}),successDialogTitle:()=>jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar-panel.ZaKL3e",defaultMessage:"Account Successfully linked!",description:"title for success identity provider"}),successDialogContent:e=>jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar-panel.IP+fpM",defaultMessage:"You can now log into this account using {name}.",description:"content for success identity provider",values:{name:e||""}}),successDialogConfirm:()=>jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar-panel.1DTtvD",defaultMessage:"Okay",description:"confirm for success identity provider"}),nullState:()=>jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar-panel.u6gP99",defaultMessage:"Your account currently has no available account linking options",description:"account linking null state"}),errorState:()=>jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar-panel.KG2JIz",defaultMessage:"There was an error while loading the available account linking options",description:"account linking error state"}),retry:()=>jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar-panel.IYUdD6",defaultMessage:"Retry",description:"account linking retry"}),settingsHeader:()=>jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar-panel.IIE3bM",defaultMessage:"Application Preferences",description:"account settings header"}),settingsSubHeader:()=>jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar-panel.9xcAYc",defaultMessage:"Manage the settings of aiWARE services and applications.",description:"account settings sub header"})},useStyles$3=makeStyles()(e=>({container:{marginTop:e.spacing(4),padding:e.spacing(4,4),textAlign:"center",border:"0.5px solid #D5DFE9",borderRadius:e.spacing(2)},text:{marginTop:e.spacing(3)},icon:{display:"inline !important"}})),NullState=()=>{var e=useStyles$3()["classes"];return jsxRuntime.exports.jsxs("div",Object.assign({className:e.container},{children:[jsxRuntime.exports.jsx(Icon$1,Object.assign({className:e.icon},{children:jsxRuntime.exports.jsx(NoLink,{fontSize:"large"})})),jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"body2",className:e.text},{children:SHARED_TEXT.nullState()})),jsxRuntime.exports.jsx(Box$1,{mb:9})]}))},ErrorState=({onRetry:e})=>{var t=useStyles$3()["classes"];return jsxRuntime.exports.jsxs("div",Object.assign({className:t.container},{children:[jsxRuntime.exports.jsx(Icon$1,Object.assign({className:t.icon},{children:jsxRuntime.exports.jsx(AlarmTwo,{fontSize:"large"})})),jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"body2",className:t.text,"data-test":"account-linking-error-message"},{children:SHARED_TEXT.errorState()})),jsxRuntime.exports.jsx(Box$1,{mt:4}),jsxRuntime.exports.jsx(Button$1,Object.assign({variant:"text",size:"large","data-test":"account-linking-retry-btn",onClick:e},{children:SHARED_TEXT.retry()}))]}))};var LoadingStatus,useStyles$2=makeStyles()(e=>({accountLinkingLabel:{fontWeight:"normal",userSelect:"none"},openIdLogo:{width:e.spacing(5),height:e.spacing(5),backgroundColor:"#ffffff",color:"#555F7C"},listAvatar:{minWidth:"45px"},openIdContainer:{marginTop:e.spacing(3)},openIdItem:{padding:e.spacing(3)+"px 0px"},openIdTextContainer:{marginLeft:e.spacing(3.5),display:"inline-block",verticalAlign:"top"},secondaryAction:{right:"0"},linkBtn:{textTransform:"capitalize"},linkIcon:{marginRight:e.spacing(1),color:e.palette.primary.main},dialogTitle:{padding:`${e.spacing(6)} ${e.spacing(6)} ${e.spacing(1)}px !important `},dialogContent:{padding:`${e.spacing(1)} ${e.spacing(6)} !important `},dialogTitleText:{fontWeight:600},dialogAction:{padding:e.spacing(4)},displayNone:{display:"none"},displayInlineBlock:{display:"inline-block"}}));const OpenIdConnectorButton=({isConnected:e,onLink:t,onUnlink:n})=>{var r=useStyles$2()["classes"];return jsxRuntime.exports.jsx("div",{children:e?jsxRuntime.exports.jsx(Button$1,Object.assign({className:r.linkBtn+" "+r.displayNone,variant:"text","data-test":"account-linking-unlink-btn",onClick:n},{children:SHARED_TEXT.buttonUnlink()})):jsxRuntime.exports.jsxs(Button$1,Object.assign({variant:"outlined",color:"primary",className:r.linkBtn,"data-test":"account-linking-link-btn",onClick:t},{children:[jsxRuntime.exports.jsx(default_1,{className:r.linkIcon}),SHARED_TEXT.buttonLink()]}))})};function OpenIdConnectors({openIdItems:i,onOpenUnlinkModal:a,onClickOpenIdUrl:s,isOpenIdConnected:l}){const c=useStyles$2()["classes"];return jsxRuntime.exports.jsx(List$2,{children:i.map((e,t)=>{const{name:n,loginButtonStyle:r}=e;var o=null==r?void 0:r.btnLogo;return jsxRuntime.exports.jsxs(react.exports.Fragment,{children:[jsxRuntime.exports.jsxs(ListItem$1,Object.assign({className:c.openIdItem},{children:[jsxRuntime.exports.jsx(ListItemAvatar$1,Object.assign({className:c.listAvatar},{children:jsxRuntime.exports.jsx(Avatar$1,Object.assign({className:c.openIdLogo,src:o},{children:jsxRuntime.exports.jsx(OrgFilled,{})}))})),jsxRuntime.exports.jsx(ListItemText$1,{primary:jsxRuntime.exports.jsx(Tooltip$1,Object.assign({title:25<n.length?n:"",placement:"bottom-end"},{children:jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"body1",className:c.accountLinkingLabel},{children:25<n.length?n.substring(0,25)+"...":n}))}))}),jsxRuntime.exports.jsx(ListItemSecondaryAction$1,Object.assign({className:c.secondaryAction},{children:jsxRuntime.exports.jsx(OpenIdConnectorButton,{isConnected:l(e.connectId),onLink:()=>s(e),onUnlink:()=>a(e)})}))]})),t!==i.length-1&&jsxRuntime.exports.jsx(Divider$1,{})]})})})}const LoaderSkeletonItem=()=>{var e=useStyles$2()["classes"];return jsxRuntime.exports.jsxs(ListItem$1,Object.assign({className:e.openIdItem},{children:[jsxRuntime.exports.jsx(ListItemAvatar$1,Object.assign({className:e.listAvatar},{children:jsxRuntime.exports.jsx(Skeleton$1,{variant:"circular",width:25,height:25})})),jsxRuntime.exports.jsx(ListItemText$1,{children:jsxRuntime.exports.jsx(Skeleton$1,{variant:"text",width:150,height:21})}),jsxRuntime.exports.jsx(ListItemSecondaryAction$1,Object.assign({className:e.secondaryAction},{children:jsxRuntime.exports.jsx(Skeleton$1,{variant:"rectangular",width:87,height:35})}))]}))},LoaderSkeleton=()=>jsxRuntime.exports.jsxs(List$2,{children:[jsxRuntime.exports.jsx(LoaderSkeletonItem,{}),jsxRuntime.exports.jsx(Divider$1,{}),jsxRuntime.exports.jsx(LoaderSkeletonItem,{}),jsxRuntime.exports.jsx(Divider$1,{}),jsxRuntime.exports.jsx(LoaderSkeletonItem,{})]}),namespace$2=(!function(e){e.Failed="failed",e.Idle="idle",e.Pending="pending"}(LoadingStatus=LoadingStatus||{}),"openId"),selectOpenIdConnectors=e=>{return null==(e=null==e?void 0:e[namespace$2])?void 0:e.openIdConnectors},selectConnectedOpenIds=e=>{return null==(e=null==e?void 0:e[namespace$2])?void 0:e.connectedOpenIds},selectLoadingStatus=e=>{return null==(e=null==e?void 0:e[namespace$2])?void 0:e.status},GET_OPEN_ID_CONNECTORS=`aiware/${namespace$2}/get open id connectors`,GET_OPEN_ID_SUCCESS=`aiware/${namespace$2}/get open id connectors success`,GET_CONNECTED_OPEN_ID_SUCCESS=`aiware/${namespace$2}/get connected open id connectors success`,GET_OPEN_ID_ERROR=`aiware/${namespace$2}/get open id connectors error`;function getOpenIdConnectors(){return{type:GET_OPEN_ID_CONNECTORS}}function getOpenIdConnectorSuccess(e){return{type:GET_OPEN_ID_SUCCESS,payload:{data:e}}}function getConnectedOpenIdsSuccess(e){return{type:GET_CONNECTED_OPEN_ID_SUCCESS,payload:{data:e}}}function getOpenIdConnectorError(e){return{type:GET_OPEN_ID_ERROR,payload:{message:e}}}const AccountLinking=()=>{const e=useDispatch(),[t,n]=react.exports.useState(!1),[r,o]=react.exports.useState(!1),[i,a]=react.exports.useState(null);const[s,l]=react.exports.useState({}),[c,u]=react.exports.useState(),d=useSelector(selectLoadingStatus)||"",p=useSelector(selectOpenIdConnectors)||[],f=useSelector(selectConnectedOpenIds)||[];var h=useStyles$2()["classes"];react.exports.useEffect(()=>{e(getOpenIdConnectors())},[e]);const m=e=>{l(e),n(!0)};var g=()=>{n(!1)},v=()=>{o(!1)};const y=()=>{e(getOpenIdConnectors())},x=(useInterval(()=>{e(getOpenIdConnectors())},i),e=>{l(e);e=window.open(e.loginUrl);u(e),a(2e3)}),C=react.exports.useCallback(t=>f.some(e=>e.connectId===t),[f]);react.exports.useEffect(()=>{""!==s.connectId&&null!==i&&C(s.connectId)&&(a(null),null!==c&&void 0!==c&&c.close(),o(!0))},[C,e]);return jsxRuntime.exports.jsxs("div",{children:[jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"body1",className:h.accountLinkingLabel,"data-test":"account-linking-label"},{children:SHARED_TEXT.accountLinkingLabel()})),jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"body2"},{children:SHARED_TEXT.accountLinkingDescription()})),d===LoadingStatus.Pending?jsxRuntime.exports.jsx(LoaderSkeleton,{}):d===LoadingStatus.Failed?jsxRuntime.exports.jsx(ErrorState,{onRetry:y}):0===p.length?jsxRuntime.exports.jsx(NullState,{}):jsxRuntime.exports.jsx(OpenIdConnectors,{openIdItems:p,onOpenUnlinkModal:m,onClickOpenIdUrl:x,isOpenIdConnected:C}),jsxRuntime.exports.jsxs(Dialog$1,Object.assign({open:t,maxWidth:"xs",onClose:g,"aria-labelledby":"unlink-dialog-title","aria-describedby":"unlink-dialog-description"},{children:[jsxRuntime.exports.jsx(DialogTitle$1,Object.assign({id:"unlink-dialog-title","data-test":"account-linking-unlink-dialog-title",className:h.dialogTitle},{children:jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"h2",className:h.dialogTitleText},{children:SHARED_TEXT.unlinkDialogTitle()}))})),jsxRuntime.exports.jsx(DialogContent$1,Object.assign({className:h.dialogContent},{children:jsxRuntime.exports.jsx(DialogContentText$1,Object.assign({id:"unlink-dialog-description"},{children:SHARED_TEXT.unlinkDialogContent(s.name)}))})),jsxRuntime.exports.jsxs(DialogActions$1,Object.assign({className:h.dialogAction},{children:[jsxRuntime.exports.jsx(Button$1,Object.assign({onClick:g,variant:"text",size:"large",className:h.linkBtn,"data-test":"account-linking-unlink-dialog-cancel-btn"},{children:SHARED_TEXT.unlinkDialogCancel()})),jsxRuntime.exports.jsx(Button$1,Object.assign({onClick:g,size:"large",variant:"contained",color:"primary",className:h.linkBtn,"data-test":"account-linking-unlink-dialog-confirm-btn"},{children:SHARED_TEXT.unlinkDialogConfirm()}))]}))]})),jsxRuntime.exports.jsxs(Dialog$1,Object.assign({open:r,maxWidth:"xs",onClose:v,"aria-labelledby":"success-dialog-title","aria-describedby":"success-dialog-description"},{children:[jsxRuntime.exports.jsx(DialogTitle$1,Object.assign({id:"success-dialog-title",className:h.dialogTitle,"data-test":"account-linking-success-dialog-title"},{children:jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"h2",className:h.dialogTitleText},{children:SHARED_TEXT.successDialogTitle()}))})),jsxRuntime.exports.jsx(DialogContent$1,Object.assign({className:h.dialogContent},{children:jsxRuntime.exports.jsx(DialogContentText$1,Object.assign({id:"success-dialog-description"},{children:SHARED_TEXT.successDialogContent(s.name)}))})),jsxRuntime.exports.jsx(DialogActions$1,Object.assign({className:h.dialogAction},{children:jsxRuntime.exports.jsx(Button$1,Object.assign({onClick:v,size:"large",variant:"contained",color:"primary",className:h.linkBtn,"data-test":"account-linking-success-dialog-confirm-btn"},{children:SHARED_TEXT.successDialogConfirm()}))}))]}))]})};var useStyles$1$1=makeStyles()(e=>({personalProfileContainer:{overflowY:"auto"},firstBox:{paddingTop:e.spacing(6),textAlign:"center",borderBottom:"0.5px solid "+e.palette.divider},loggedBox:{fontWeight:400,paddingTop:e.spacing(2),paddingBottom:e.spacing(5)},email:{color:e.palette.primary.main},logoutBox:{paddingBottom:e.spacing(8)},btnLogin:{textTransform:"capitalize",fontSize:"14px",lineHeight:"19px",padding:e.spacing(1,7)},secondBox:{padding:e.spacing(5,6),"& div":{height:"auto !important"}},headerBox:{display:"flex"},editIconBox:{margin:e.spacing(0,-2.4,0,0)},descBox:{fontSize:"14px",color:e.palette.secondary.main},formBox:{marginTop:e.spacing(4)},formItem:{borderBottom:"0.5px solid "+e.palette.divider,marginBottom:e.spacing(4)},formItemPw:{marginBottom:e.spacing(4)+" !important"},titleItem:{color:e.palette.text.disabled,marginBottom:e.spacing(2),cursor:"default"},valueItem:{fontWeight:"normal",color:e.palette.text.secondary,marginBottom:e.spacing(2)},disabledText:{opacity:.6},lastUpdate:{color:"#9CA8B4"},reset:{color:e.palette.primary.main,opacity:.9,marginTop:"35px",cursor:"pointer"},passwordBox:{display:"flex",justifyContent:"space-between",alignItems:"center"},iconResetPw:{margin:"-18px -12px 0 0"},textField:{marginLeft:0,marginRight:0,marginTop:0,marginBottom:"30px",width:"100%"},actionForm:{padding:0,marginBottom:e.spacing(4)},inputBase:{padding:e.spacing(3.4,2.8)},notchedOutline:{"& legend":{height:"16px"}},btnAction:{textTransform:"capitalize",fontSize:"14px",lineHeight:"19px"},btnSave:{marginLeft:e.spacing(1.6)},btnActionCancel:{color:e.palette.secondary.main},pwResetTitle:{color:"#D43060 !important"},pwResetDes1:{marginBottom:"20px"},mainTitleText:{color:e.palette.text.secondary,userSelect:"none",fontSize:"18px",lineHeight:"23px",letterSpacing:"0.25px",textTransform:"uppercase"},contentUserView:{height:"100%",textAlign:"left",position:"relative"},headerDrawer:{padding:e.spacing(3,6),display:"flex",justifyContent:"space-between",alignItems:"center",borderBottom:"0.5px solid "+e.palette.divider},contentEditAvatar:{padding:e.spacing(6)},areaUpload:{background:e.palette.background.default,textAlign:"center",height:"300px",border:"1px solid "+e.palette.divider,boxSizing:"border-box",borderRadius:"4px",padding:e.spacing(10)},descDrag:{fontSize:"16px",color:"#828282",marginBottom:e.spacing(4)},descDrag2:{color:"#828282",margin:e.spacing(4,0)},btnSelectPhoto:{textTransform:"capitalize",fontSize:"14px",lineHeight:"19px"},recentlyBox:{marginTop:e.spacing(4)},recentlyText:{margin:e.spacing(2,0)},imgRecently:{width:"113px",height:"113px",background:"#C4C4C4",borderRadius:"4px"},imgRecentlyRow:{display:"flex",justifyContent:"space-between",marginBottom:"20px"},resetBiometric:{marginTop:e.spacing(7)},actionButton:{},inputFile:{display:"none !important"},imageGrid:{display:"flex",alignItems:"center",justifyContent:"center",marginBottom:e.spacing(4)},dragging:{filter:"blur(2px)"},currentlyLoggedIn:{fontWeight:"normal",color:e.palette.info.main,lineHeight:e.spacing(3.8),display:"flex",flexDirection:"column",cursor:"default"},manageBasicInfoLabel:{fontWeight:"normal",cursor:"default"},tabsParent:{"& div":{padding:e.spacing(0,0,0,1.6),borderBottom:"none"},"& .Sdk-MuiTab-root.Mui-selected":{color:e.palette.text.primary,fontWeight:600}},editProfilePictureContainer:{height:"calc(100vh - 60px)",display:"flex",flexDirection:"column",position:"relative"},editProfilePictureFooterButtons:{right:"30px",bottom:"30px",position:"absolute"}})),useStyles$c=makeStyles()(e=>({settingsHeader:{fontWeight:"normal",cursor:"default"},topMargin:{marginTop:"30px"},fullWidth:{width:"100%"},inputLabel:{fontFamily:"Nunito",fontWeight:300,display:"block",fontSize:14,color:"#5C6269",marginBottom:6},disclaimerText:{fontWeight:400,display:"block",fontSize:12,color:"#9CA8B4",marginTop:12}}));const ProfileSettings=({onPreferredLanguageChange:t,selectedLanguage:e})=>{const[n,r]=react.exports.useState("");var o=useStyles$c()["classes"];react.exports.useEffect(()=>{r(e)},[e]);const i=langs.map(({locale:e,name:t})=>({value:e,name:t}));return jsxRuntime.exports.jsxs(jsxRuntime.exports.Fragment,{children:[jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"body1",className:o.settingsHeader},{children:SHARED_TEXT.settingsHeader()})),jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"body2"},{children:SHARED_TEXT.settingsSubHeader()})),jsxRuntime.exports.jsxs(FormControl$1,Object.assign({className:o.fullWidth+" "+o.topMargin},{children:[jsxRuntime.exports.jsx("label",Object.assign({className:o.inputLabel,htmlFor:"personal-profile-settings-preferred-language"},{children:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar-panel.preferredLanguage",defaultMessage:"Preferred Language",description:"Language selection label"})})),jsxRuntime.exports.jsx(Select$1,Object.assign({id:"personal-profile-settings-preferred-language",className:""+o.fullWidth,value:n,onChange:function(e){e=e.target.value,r(e),t(e)}},{children:null===i||void 0===i?void 0:i.map(e=>jsxRuntime.exports.jsx(MenuItem$1,Object.assign({value:null==e?void 0:e.value},{children:null==e?void 0:e.name})))})),jsxRuntime.exports.jsx(Typography$1,Object.assign({className:o.disclaimerText,variant:"subtitle1"},{children:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar-panel.preferredLanguageDisclaimer",defaultMessage:"Not all products within aiWARE may support your preferred language selection. If you choose a primary language that isn’t available, you may not see it reflected in the product you are currently viewing.",description:"Disclaimer text for preferred language"})}))]}))]})},tabsList$2=[{label:SHARED_TEXT.basicInfoTabLabel(),disabled:!1,id:"Basic Info"},{label:SHARED_TEXT.accountLinkingTabLabel(),disabled:!1,id:"Account Linking"},{label:SHARED_TEXT.settingsTabLabel(),disabled:!1,id:"Settings"}],PersonalProfile=({currentUser:e,handleResetBiometric:t,handleResetPassword:n,handleLogout:r,handleUpdateProfile:o,handleUploadAvatar:i,avatarHistory:a=[],enableResetBiometric:s=!1,loadingStatus:l})=>{var c;const u="EDIT_PROFILE_PICTURE";var d=useStyles$1$1()["classes"];const p=useDispatch();var f=useSelector(hidePasswordResetSelector)||!1,h=useSelector(preferredLanguageSelector)||"en";const[m,g]=react.exports.useState({firstName:"",lastName:"",phoneNumber:"",email:""}),[v,y]=react.exports.useState({firstName:"",lastName:"",phoneNumber:""}),[x,C]=react.exports.useState(!1),[b,w]=react.exports.useState(null),[$,S]=react.exports.useState(!1),[_,E]=react.exports.useState(!1),[j,T]=react.exports.useState(0);var R=useSelector(userAuthStatusSelector);const L=AIWareFormatMessage(h);react.exports.useEffect(()=>{e&&M(e)},[e]);const M=e=>{const{firstName:t,lastName:n,imageUrl:r,userSettings:o}=e;e=null===o||void 0===o?void 0:o.find(e=>"phoneNumber"===e.key);g({firstName:t||"",lastName:n||"",phoneNumber:(null==e?void 0:e.value)||"",email:""}),r&&w(r)};var O=react.exports.useCallback(()=>{null!=e&&e.email&&(S(!1),n(null==e?void 0:e.email))},[e,n]);var I=n=>e=>{const t=e.target.value;g(e=>Object.assign(Object.assign({},e),{[n]:t})),y(e=>Object.assign(Object.assign({},e),{[n]:""}))};const k=()=>{p(hidePanel$1(u))},A=e=>{i(e),setTimeout(()=>{p(hidePanel$1(u))},500)};R=[AuthStatus.LOGGING_OUT,AuthStatus.LOGGED_OUT].includes(R);return jsxRuntime.exports.jsxs("div",Object.assign({className:d.personalProfileContainer},{children:[jsxRuntime.exports.jsxs("div",Object.assign({className:d.firstBox},{children:[jsxRuntime.exports.jsx(AvatarProfile,{avatar:b,sortName:""+((null==(c=m.firstName)?void 0:c.substr(0,1))||"")+((null==(c=m.lastName)?void 0:c.substr(0,1))||""),onEditAvatarClick:()=>{var e={name:"EDIT_PROFILE_PICTURE",config:{name:"Veritone",dataId:"dataId",type:"APP_BAR_PANEL_TEMPLATE",onClose:k,onSaveAvatar:A,avatarHistory:a}},t={panelId:u,type:"APP_BAR_PANEL_TEMPLATE",marginTop:55,withTab:!1,marginStart:490,width:450,parentPanelId:"PERSONAL_PANEL",dimmed:0,dimmedStatus:"dimParent"};p(mountPanel$1({panelId:u,microFrontend:e,panelConfig:t}))},loadingStatus:l}),jsxRuntime.exports.jsx("div",Object.assign({className:d.loggedBox},{children:jsxRuntime.exports.jsxs(Typography$1,Object.assign({variant:"body2",className:d.currentlyLoggedIn},{children:[jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar-panel.ch1heq",defaultMessage:"Currently logged in as:",description:"personal profile panel currently logged in label"})," ",jsxRuntime.exports.jsx("span",Object.assign({"data-test":"Currently-logged-in-as-email",className:d.email},{children:null==e?void 0:e.email}))]}))})),jsxRuntime.exports.jsx("div",Object.assign({className:d.logoutBox},{children:jsxRuntime.exports.jsx(LoadingButton$1,Object.assign({onClick:r,variant:"outlined",color:"primary","data-test":"dt-button-logout",className:d.btnLogin,loading:R},{children:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar-panel.bRcFCr",defaultMessage:"Logout",description:"label of logout button on profile panel"})}))})),jsxRuntime.exports.jsx("div",Object.assign({className:d.tabsParent},{children:jsxRuntime.exports.jsx(CustomTabs,{selectedId:j,onChangeTab:e=>{T(e)},tabsList:tabsList$2})}))]})),jsxRuntime.exports.jsxs("div",Object.assign({className:d.secondBox},{children:[jsxRuntime.exports.jsx(TabPanel,Object.assign({value:j,index:0},{children:jsxRuntime.exports.jsxs(jsxRuntime.exports.Fragment,{children:[jsxRuntime.exports.jsxs("div",Object.assign({className:d.headerBox},{children:[jsxRuntime.exports.jsxs("div",{children:[jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"body1",className:d.manageBasicInfoLabel},{children:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar-panel.5oScQa",defaultMessage:"Manage Your Basic Information",description:"label of manage basic infomation container"})})),jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"body2"},{children:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar-panel.DjVGBt",defaultMessage:"Basic info, like your name and photo, that you use on Veritone services.",description:"description of manage basic infomation container"})}))]}),jsxRuntime.exports.jsx("div",Object.assign({className:d.editIconBox},{children:!x&&jsxRuntime.exports.jsx(IconButton$1,Object.assign({id:"button-edit",onClick:()=>{E(!1),S(!1),C(!0)},size:"large"},{children:jsxRuntime.exports.jsx("img",{src:img$13,alt:""})}))}))]})),jsxRuntime.exports.jsxs("div",Object.assign({className:d.formBox},{children:[x?jsxRuntime.exports.jsxs(jsxRuntime.exports.Fragment,{children:[jsxRuntime.exports.jsxs("div",{children:[jsxRuntime.exports.jsx(TextField$1,{id:"firstName",label:L({id:"os-app-bar-panel.firstName",defaultMessage:[{type:0,value:"First Name"}]}),variant:"outlined",className:d.textField,value:null===m||void 0===m?void 0:m.firstName,onChange:I("firstName"),margin:"normal",error:""!==v.firstName,helperText:v.firstName,InputProps:{classes:{input:d.inputBase,notchedOutline:d.notchedOutline}}}),jsxRuntime.exports.jsx(TextField$1,{id:"lastName",label:L({id:"os-app-bar-panel.lastName",defaultMessage:[{type:0,value:"Last Name"}]}),variant:"outlined",className:d.textField,value:null===m||void 0===m?void 0:m.lastName,onChange:I("lastName"),margin:"normal",error:""!==v.lastName,helperText:v.lastName,InputProps:{classes:{input:d.inputBase,notchedOutline:d.notchedOutline}}}),jsxRuntime.exports.jsx(TextField$1,{id:"phoneNumber",label:L({id:"os-app-bar-panel.phone",defaultMessage:[{type:0,value:"Phone"}]}),variant:"outlined",className:d.textField,value:null===m||void 0===m?void 0:m.phoneNumber,onChange:I("phoneNumber"),margin:"normal",error:""!==v.phoneNumber,helperText:v.phoneNumber,InputProps:{classes:{input:d.inputBase,notchedOutline:d.notchedOutline}}})]}),jsxRuntime.exports.jsxs(DialogActions$1,Object.assign({className:d.actionForm},{children:[jsxRuntime.exports.jsx(Button$1,Object.assign({onClick:()=>{e&&M(e),C(!1)},color:"primary",id:"button-cancel-edit",className:classNames(d.btnAction,d.btnActionCancel)},{children:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar-panel.qpPFGp",defaultMessage:"Cancel",description:"label of cancel button on profile panel"})})),jsxRuntime.exports.jsx(Button$1,Object.assign({onClick:function(){(()=>{let e=!0;return m.firstName||(y(Object.assign(Object.assign({},v),{firstName:"This field is required."})),e=!1),m.lastName||(y(Object.assign(Object.assign({},v),{lastName:"This field is required."})),e=!1),m.phoneNumber&&!/^\+?(\d){6,}$/.test(m.phoneNumber.toLowerCase())&&(y(Object.assign(Object.assign({},v),{phoneNumber:"Invalid phone number."})),e=!1),e})()&&(o(m),C(!1))},"data-test":"button-save-edit","data-testid":"button-save-edit",color:"primary",variant:"contained",className:d.btnAction},{children:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar-panel.C1oyBr",defaultMessage:"Save",description:"label of save button on profile panel"})}))]}))]}):jsxRuntime.exports.jsxs(jsxRuntime.exports.Fragment,{children:[jsxRuntime.exports.jsxs("div",Object.assign({className:d.formItem},{children:[jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"body2",className:d.titleItem},{children:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar-panel.a5aLpI",defaultMessage:"Name",description:"label of name field on profile panel"})})),jsxRuntime.exports.jsx(Typography$1,Object.assign({"data-test":"profile-panel-name",variant:"body1",className:d.valueItem},{children:`${(null===m||void 0===m?void 0:m.firstName)||""} `+((null===m||void 0===m?void 0:m.lastName)||"")}))]})),(null===m||void 0===m?void 0:m.phoneNumber)&&jsxRuntime.exports.jsxs("div",Object.assign({className:d.formItem},{children:[jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"body2",className:d.titleItem},{children:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar-panel.73xPqY",defaultMessage:"Phone",description:"label of phone field on profile panel"})})),jsxRuntime.exports.jsx(Typography$1,Object.assign({"data-test":"profile-panel-phone",variant:"body1",className:d.valueItem},{children:null===m||void 0===m?void 0:m.phoneNumber}))]}))]}),jsxRuntime.exports.jsxs("div",Object.assign({className:d.formItem},{children:[jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"body2",className:d.titleItem},{children:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar-panel.zieKdP",defaultMessage:"Email",description:"label of email field on profile panel"})})),jsxRuntime.exports.jsx(Typography$1,Object.assign({"data-test":"profile-panel-email",variant:"body1",className:classNames(d.valueItem,d.disabledText)},{children:null==e?void 0:e.email}))]})),$?jsxRuntime.exports.jsxs(jsxRuntime.exports.Fragment,{children:[jsxRuntime.exports.jsxs("div",{children:[jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"subtitle1",className:d.pwResetTitle},{children:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar-panel.I7feCi",defaultMessage:"Password Reset",description:"reset password label on profile panel"})})),jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"body2",className:d.pwResetDes1},{children:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar-panel.Zcj+4v",defaultMessage:"Veritone will send a reset password link via the email on your account.",description:"reset password description on profile panel"})})),jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"body2"},{children:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar-panel.kk8TY8",defaultMessage:"Would you like to continue?",description:"confirm message of reset biometric on profile panel"})}))]}),jsxRuntime.exports.jsxs(DialogActions$1,Object.assign({className:d.actionForm},{children:[jsxRuntime.exports.jsx(Button$1,Object.assign({onClick:()=>{S(!1)},color:"primary","data-test":"button-cancel-reset-password","data-testid":"button-cancel-reset-password",className:classNames(d.btnAction,d.btnActionCancel)},{children:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar-panel.hdbMmi",defaultMessage:"Cancel",description:"the label of cancel button"})})),jsxRuntime.exports.jsx(Button$1,Object.assign({onClick:O,"data-test":"button-reset-password","data-testid":"button-reset-password",color:"primary",variant:"contained",className:d.btnAction},{children:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar-panel.ZXvsuR",defaultMessage:"Reset",description:"the label of reset button"})}))]}))]}):jsxRuntime.exports.jsxs(jsxRuntime.exports.Fragment,{children:[jsxRuntime.exports.jsxs("div",Object.assign({className:classNames(d.formItem,d.formItemPw)},{children:[jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"body2",className:d.titleItem},{children:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar-panel.uIEJAQ",defaultMessage:"Password",description:"label of pasword field on profile panel"})})),jsxRuntime.exports.jsxs("div",Object.assign({className:d.passwordBox},{children:[jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"body1",className:d.valueItem},{children:"********"})),!f&&jsxRuntime.exports.jsx(IconButton$1,Object.assign({id:"btn-click-pw-reset",className:d.iconResetPw,onClick:()=>{E(!1),S(!0),C(!1)},size:"large"},{children:jsxRuntime.exports.jsx("img",{src:img$12,alt:""})}))]}))]})),jsxRuntime.exports.jsx("div",{children:jsxRuntime.exports.jsxs(Typography$1,Object.assign({variant:"subtitle1",className:d.lastUpdate},{children:[jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar-panel.qTqazR",defaultMessage:"Last updated",description:"last updated text label text on profile panel"})," ",(null!=e&&e.lastUpdated?DateTime_1.fromISO(null==e?void 0:e.lastUpdated):DateTime_1.local()).toFormat("LLL dd, yyyy")]}))})]})]})),_?jsxRuntime.exports.jsxs(jsxRuntime.exports.Fragment,{children:[jsxRuntime.exports.jsxs("div",Object.assign({className:d.resetBiometric},{children:[jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"subtitle1",className:d.pwResetTitle},{children:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar-panel.+DTt+G",defaultMessage:"Biometric Reset",description:"label of reset biometric container on profile panel"})})),jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"body1",className:d.pwResetDes1},{children:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar-panel.nzzfrY",defaultMessage:"Your Biometric Profile will be reset.",description:"description of reset biometric container on profile panel"})})),jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"body1"},{children:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar-panel.kk8TY8",defaultMessage:"Would you like to continue?",description:"confirm message of reset biometric on profile panel"})}))]})),jsxRuntime.exports.jsxs(DialogActions$1,Object.assign({className:d.actionForm},{children:[jsxRuntime.exports.jsx(Button$1,Object.assign({onClick:()=>{E(!1)},"data-test":"button-cancel-reset-biometric",color:"primary",className:classNames(d.btnAction,d.btnActionCancel)},{children:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar-panel.hdbMmi",defaultMessage:"Cancel",description:"the label of cancel button"})})),jsxRuntime.exports.jsx(Button$1,Object.assign({onClick:()=>{E(!1),t()},color:"primary",variant:"contained","data-test":"button-reset-biometric",className:d.btnAction},{children:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar-panel.ZXvsuR",defaultMessage:"Reset",description:"the label of reset button"})}))]}))]}):!$&&s&&jsxRuntime.exports.jsx("div",Object.assign({id:"click-reset-biometric",onClick:()=>{E(!0),S(!1),C(!1)}},{children:jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"body2",className:d.reset},{children:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar-panel.OlJtmF",defaultMessage:"Reset Biometric Profile",description:"label of Reset Biometric Profile on profile panel"})}))}))]})})),jsxRuntime.exports.jsx(TabPanel,Object.assign({value:j,index:1},{children:jsxRuntime.exports.jsx(AccountLinking,{})})),jsxRuntime.exports.jsx(TabPanel,Object.assign({value:j,index:2},{children:jsxRuntime.exports.jsx(ProfileSettings,{selectedLanguage:h,onPreferredLanguageChange:e=>{p(updateUserLanguageStart(e))}})}))]}))]}))};function SettingPanel({currentUser:e,activities:t,activityFilter:n,onChangeActivityFilter:r,handleResetBiometric:o,handleResetPassword:i,handleLogout:a,handleUpdateProfile:s,tabId:l,recentApp:c,applications:u,onClickApp:d,handleUploadAvatar:p,avatarHistory:f}){const h=useSelector(userSelector),[m,g]=react.exports.useState("");return react.exports.useEffect(()=>{g(h.loading)},[h]),jsxRuntime.exports.jsxs(jsxRuntime.exports.Fragment,{children:[l===TabId.PERSONAL_PANEL&&jsxRuntime.exports.jsx(PersonalProfile,{currentUser:e,handleLogout:a,handleResetBiometric:o,handleResetPassword:i,handleUpdateProfile:s,handleUploadAvatar:p,avatarHistory:f,loadingStatus:m}),l===TabId.APP_PANEL&&jsxRuntime.exports.jsx(ApplicationPanel,{recentApplist:c,applications:u,onClickApp:d}),l===TabId.ACTIVITY_PANEL&&jsxRuntime.exports.jsx(ActivityPanel,{filter:n,onChangeFilter:r,data:t||[]}),l===TabId.PERFORMANCE_MONITOR&&jsxRuntime.exports.jsx(PerformanceMonitor,{})]})}const namespace$1="applications",applicationSelector=e=>{return null==(e=null==e?void 0:e.aiWareHeaderBarPanel)?void 0:e[namespace$1]},HANDLE_CLICK_APP=`aiware/${namespace$1}/get handle click app`,REQUEST_GET_APPLICATION_V1=`aiware/${namespace$1}/request get app`,GET_APPLICATION_V1_START=`aiware/${namespace$1}/get app list start`,GET_APPLICATION_V1_SUCCESS=`aiware/${namespace$1}/get app list success`,GET_APPLICATION_V1_ERROR=`aiware/${namespace$1}/get app list error`;function requestGetApplications(){return{type:REQUEST_GET_APPLICATION_V1,payload:{}}}function getApplicationStart(){return{type:GET_APPLICATION_V1_START}}function getApplicationSuccess(e){return{type:GET_APPLICATION_V1_SUCCESS,payload:{data:e}}}function getApplicationError(e){return{type:GET_APPLICATION_V1_ERROR,payload:{message:e}}}const initialState$2={application:[],message:"",status:"idle"};function applicationReducer(e,t){if(void 0===e)return initialState$2;switch(t.type){case GET_APPLICATION_V1_START:return Object.assign(Object.assign({},e),{status:"loading"});case GET_APPLICATION_V1_SUCCESS:return Object.assign(Object.assign({},e),{application:t.payload.data,status:"success"});case GET_APPLICATION_V1_ERROR:return Object.assign(Object.assign({},e),{message:t.payload.message,status:"failure"});default:return e}}const namespace$4="activities",allActivitySeletor=e=>{return(null==(e=null==e?void 0:e.aiWareHeaderBarPanel)?void 0:e[namespace$4])||[]},today=DateTime_1.local().startOf("day"),activitySelector=createSelector([allActivitySeletor],e=>{const{records:t,filter:n}=e;return"today"===n?t.filter(e=>DateTime_1.fromISO(e.createdDateTime).hasSame(today,"day")):t}),GET_ACTIVITY=`os-app-bar-panel/${namespace$4}/get activity`,GET_ACTIVITY_SUCCESS=`os-app-bar-panel/${namespace$4}/get activity success`,UPDATE_ACTIVITY_FILTER=`os-app-bar-panel/${namespace$4}/update activity filter`;function getActivity(){return{type:GET_ACTIVITY}}function updateActivityFilter(e){return{type:UPDATE_ACTIVITY_FILTER,payload:e}}function getActivitySuccess(e){return{type:GET_ACTIVITY_SUCCESS,payload:e}}const initialState$1={records:[],filter:"all",fetched:!1,fetching:!1,processing:!1};function activityReducer(e,t){if(void 0===e)return initialState$1;switch(t.type){case GET_ACTIVITY_SUCCESS:return Object.assign(Object.assign({},e),{records:t.payload});case UPDATE_ACTIVITY_FILTER:var n=t.payload["filter"];return Object.assign(Object.assign({},e),{filter:n});default:return e}}combineReducers({[namespace$3]:userReducer,[namespace$4]:activityReducer,[namespace$1]:applicationReducer});const nameSpace$1="aiWareHeaderBarPanel";function*handleClickAppSaga(e){yield call$7(storeRecentApplications,e.payload)}function*getApplicationsSaga(){yield put(getApplicationStart());var e=yield select(rootApiSelector),t=yield select(sessionTokenSelector);const n=yield call$7(getApplicationsApi,e,t);n&&n.results?yield put(getApplicationSuccess(((null===n||void 0===n?void 0:n.results)||[]).map(e=>({id:e.applicationId,name:e.applicationName,iconUrl:e.signedApplicationIconUrl||e.applicationIconUrl||e.applicationIconSvg,description:e.applicationDescription})))):yield put(getApplicationError("something wrong"))}function*storeRecentApplications(e){var t=yield select(userSelector),t=(null==(t=null==t?void 0:t.currentUser)?void 0:t.id)||"",n=JSON.parse(localStorage.getItem("recentApplicationWithUserId")||"{}"),r=(null==n?void 0:n[t])||[],r=(r?(r=slice$3(uniq([e,...r]),0,6),localStorage.setItem("recentApplicationWithUserId",JSON.stringify(Object.assign(Object.assign({},n),{[t]:r})))):localStorage.setItem("recentApplicationWithUserId",JSON.stringify(Object.assign(Object.assign({},n),{[t]:[e]}))),yield select(switchApiSelector));window.open(r+"/"+e)}function*applicationSaga(){yield all([takeEvery$1(HANDLE_CLICK_APP,handleClickAppSaga),takeLatest$1(REQUEST_GET_APPLICATION_V1,getApplicationsSaga)])}function __awaiter(e,a,s,l){return new(s=s||Promise)(function(n,t){function r(e){try{i(l.next(e))}catch(e){t(e)}}function o(e){try{i(l.throw(e))}catch(e){t(e)}}function i(e){var t;e.done?n(e.value):((t=e.value)instanceof s?t:new s(function(e){e(t)})).then(r,o)}i((l=l.apply(e,a||[])).next())})}function delay(t=1e3){return __awaiter(this,void 0,void 0,function*(){return new Promise(e=>setTimeout(e,t))})}function goToPage(e){window.location.href=e}const uploadingStatus={LOADING:"loading",DONE:"done"};function*getCurrentUserSaga(){var e,t=yield select(graphEndpointSelector),n=yield select(sessionTokenSelector),t=yield call$7(getCurrentUserGraphQLApi,t,n);if(null!=t&&t.errors&&0<(null==t?void 0:t.errors.length)&&(null==(n=t.errors[0].path)||!n.includes("userSettings")))console.error("getCurrentUser error");else{n=(null==(n=null==(n=null==t?void 0:t.data)?void 0:n.me)?void 0:n.recentImageUrls)||[];const r=(null==(e=null==(e=null==t?void 0:t.data)?void 0:e.myRights)?void 0:e.operations)||[];yield put(getCurrentUserSuccess(Object.assign(Object.assign({},(null==(e=null==t?void 0:t.data)?void 0:e.me)||{}),{organizationRole:{organizationId:get$3(t,"data.me.organization.id",""),role:r.includes("veritone.superadmin")?"superadmin":r.includes("admin.access")?"admin":"user"},organization:Object.assign({},(null==(e=null==(e=null==t?void 0:t.data)?void 0:e.me)?void 0:e.organization)||{}),roles:((null==(t=null==(e=null==t?void 0:t.data)?void 0:e.me)?void 0:t.roles)||[]).map(e=>e.appName),avatarHistory:n})))}}function*resetBiometricSaga(){var e=yield select(rootApiSelector),t=yield select(sessionTokenSelector);yield call$7(resetBiometricApi,e,t)}function*resetPasswordSaga(e){var e=(null==(e=null==e?void 0:e.payload)?void 0:e.email)||"",t=yield select(graphEndpointSelector),e=yield call$7(resetPasswordApi,e,t);!1===(null==e?void 0:e.success)?yield put(resetPasswordFail()):yield put(showMessage({content:(null==(e=null==(t=null==e?void 0:e.data)?void 0:t.createPasswordResetRequest)?void 0:e.message)||"",severity:MessageSeverity.Info}))}function*updateProfileSaga(e){const t=null==e?void 0:e.payload,n=yield select(graphEndpointSelector),r=yield select(sessionTokenSelector);var e=yield select(preferredLanguageSelector),o=yield call$7(()=>updateUserProfileApi(t,n,r));const i=AIWareFormatMessage(e);!1===(null==o?void 0:o.success)?yield put(updateProfileFail()):(yield put(getCurrentUser()),yield put(showMessage({content:i({id:"os-app-bar-panel.snackbar.updateProfileSuccess",defaultMessage:[{type:0,value:"Success"}]}),severity:MessageSeverity.Success})))}function*uploadAvatarSaga(e){var e=null==e?void 0:e.payload,t=yield select(graphEndpointSelector),n=yield select(sessionTokenSelector),e=yield call$7(uploadUserAvatarApi,e,t,n);yield put(uploadingAvatar(uploadingStatus.LOADING)),e&&(yield put(updateAvatar(e)))}function*updateAvatarSaga(e){var e=null==e?void 0:e.payload,t=yield select(graphEndpointSelector),n=yield select(sessionTokenSelector),r=yield select(preferredLanguageSelector),e=yield call$7(updateUserAvatarApi,e,t,n);const o=AIWareFormatMessage(r);e.errors?yield put(updateProfileFail()):(yield put(showMessage({content:o({id:"os-app-bar-panel.snackbar.updateAvatarSuccess",defaultMessage:[{type:0,value:"Update avatar successfully"}]}),severity:MessageSeverity.Success})),yield put(getCurrentUser()),yield put(uploadingAvatar(uploadingStatus.DONE)))}function*hardLogout(){goToPage(yield select(logoutUrlSelector))}function*handleLogoutError(){var e=yield select(preferredLanguageSelector);const t=AIWareFormatMessage(e);yield put(showMessage({content:t({id:"os-app-bar-panel.snackbar.logoutError",defaultMessage:[{type:0,value:"Could not log out current user"}]}),severity:MessageSeverity.Error}))}function*redirectToLogoutOrError(){var e=yield select(logoutRedirectUrlSelector);e?goToPage(e):yield call$7(handleLogoutError)}function*logoutUser(){var e=yield select(graphEndpointSelector),t=yield select(authSelector),n=yield select(sessionTokenSelector),r=yield select(loginUrlSelector),o=yield select(logoutRedirectUrlSelector);try{if(!n)return yield put(logoutUserSuccess()),void(yield call$7(hardLogout));window.__logout_requested=!0,yield call$7(postNotificationApi,e,null==t?void 0:t.userId,{eventType:aiwareEvent,command:null===notificationCommands||void 0===notificationCommands?void 0:notificationCommands.goToLoginPage,value:window.navigator.userAgent},!0,"json",aiwareEvent,n),yield delay(500);var i=yield call$7(logoutUserApi,n,e);if(null!=i&&i.errors||!1===(null==i?void 0:i.success))return yield call$7(redirectToLogoutOrError),void(yield put(logoutUserFail()));yield put(logoutUserSuccess()),goToPage(o||r)}catch(e){yield call$7(handleLogoutError),yield put(logoutUserFail()),console.log(e)}}function*userSaga(){yield all([takeEvery$1(GET_CURRENT_USER,getCurrentUserSaga),takeLatest$1(RESET_BIOMETRIC,resetBiometricSaga),takeLatest$1(RESET_PASSWORD,resetPasswordSaga),takeLatest$1(UPDATE_PROFILE,updateProfileSaga),takeLatest$1(UPLOAD__AVATAR,uploadAvatarSaga),takeLatest$1(UPDATE__AVATAR,updateAvatarSaga),takeLatest$1(LOGOUT_USER,logoutUser)])}const formatActivityData=e=>{var t,{id:e,event:n,userId:r,userName:o,payload:i,createdDateTime:a}=e;return"login_succeeded"===n?{id:e,userId:r,createdDateTime:a,event:"Login succeeded",description:o+" logged in to Veritone"}:"logout_succeeded"===n?{id:e,userId:r,createdDateTime:a,event:"Logout succeeded",description:o+" successfully logged out"}:"add_user_succeeded"===n?(t=i["userName"],{id:e,userId:r,createdDateTime:a,event:"Add user succeeded",description:t+" successfully added"}):"org_updated"===n?(t=i["organizationName"],{id:e,userId:r,createdDateTime:a,event:"Org Name Changed",description:o+` updated org "${t}"`}):{id:e,userId:r,createdDateTime:a,event:"Unknown activity",description:"Unknown activity"}};function*getActivitySaga(){var e=yield call$7(getActivityApi);if(e.success){const t=e.data["records"];yield put(getActivitySuccess(t.map(formatActivityData)))}else{e=yield select(preferredLanguageSelector);const n=AIWareFormatMessage(e);yield put(showMessage({content:n({id:"os-app-bar-panel.snackbar.activityError",defaultMessage:[{type:0,value:"Something went wrong!"}]}),severity:MessageSeverity.Error}))}}function*activitySaga(){yield takeEvery$1(GET_ACTIVITY,getActivitySaga)}const BOOTING="aiware-header-bar/booting",BOOTED="aiware-header-bar/booted";function*bootFunction(){yield take(BOOTED)}function*booting(){yield takeEvery$1(BOOTING,bootFunction)}function*rootSaga(){yield all([fork(applicationSaga),fork(userSaga),fork(booting),fork(activitySaga)])}function getAppbarPanelModule(){return{id:"os-appbar-panel",reducerMap:{[nameSpace$1]:combineReducers({users:userReducer,activities:activityReducer,applications:applicationReducer})},sagas:[rootSaga],initialActions:[getActivity(),getCurrentUser(),requestGetApplications()],retained:!0}}const initialState$4={openIdConnectors:[],connectedOpenIds:[],message:"",status:LoadingStatus.Idle};function openIdConReducer(e,t){if(void 0===e)return initialState$4;switch(t.type){case GET_OPEN_ID_CONNECTORS:return Object.assign(Object.assign({},e),{status:0===e.openIdConnectors.length&&LoadingStatus.Pending});case GET_OPEN_ID_SUCCESS:return Object.assign(Object.assign({},e),{openIdConnectors:t.payload.data,status:LoadingStatus.Idle});case GET_CONNECTED_OPEN_ID_SUCCESS:return Object.assign(Object.assign({},e),{connectedOpenIds:t.payload.data});case GET_OPEN_ID_ERROR:return Object.assign(Object.assign({},e),{message:t.payload.message,status:LoadingStatus.Failed});default:return e}}const getAllOpenIdConnectorApi=(t,n,r)=>__awaiter(void 0,void 0,void 0,function*(){try{const e=yield fetch(t+"/api/admin/openid/org/"+n,{method:"GET",headers:Object.assign({"Content-Type":"application/json"},r&&{Authorization:"Bearer "+r}),credentials:"include"});return e.json()}catch(e){console.error(e)}}),getConnectedOpenIdConnectorApi=(t,n,r)=>__awaiter(void 0,void 0,void 0,function*(){try{const e=yield fetch(t+"/api/admin/openid/user/"+n,{method:"GET",headers:Object.assign({"Content-Type":"application/json"},r&&{Authorization:"Bearer "+r}),credentials:"include"});return e.json()}catch(e){console.error(e)}});function*getOpenIdConnectorSaga(){var n=yield select(sessionTokenSelector),r=yield select(rootApiSelector),o=(yield select(userSelector$1))["userName"];if(n&&r&&o){let e={},t={};e.results=yield select(selectOpenIdConnectors);try{var i=call$7(getAllOpenIdConnectorApi,r,o,n),a=call$7(getConnectedOpenIdConnectorApi,r,o,n);if(0===(null===e||void 0===e?void 0:e.results.length)?[e,t]=yield all([i,a]):t=yield a,!e||!t)return void(yield put(getOpenIdConnectorError("error on loading open ids")));yield put(getOpenIdConnectorSuccess(e.results)),yield put(getConnectedOpenIdsSuccess(t.results))}catch(e){yield put(getOpenIdConnectorError("error on loading open ids"))}}else yield put(getOpenIdConnectorError("Missing token,base url or username"))}function*openIdRootSaga(){yield takeEvery$1(GET_OPEN_ID_CONNECTORS,getOpenIdConnectorSaga)}function getOpenIdModule(){return{id:"open-id",reducerMap:{[namespace$2]:openIdConReducer},sagas:[openIdRootSaga],initialActions:[]}}function SettingPanelComponent({tabId:e}){const t=useDispatch(),{application:n=[]}=useSelector(applicationSelector)||{};var{currentUser:r={}}=useSelector(userSelector)||{};const{avatarHistory:o=[],id:i}=r;var a=useSelector(activitySelector)||[],s=useSelector(allActivitySeletor)["filter"];const[l,c]=react.exports.useState(0),[u,d]=react.exports.useState([]),[p,f]=react.exports.useState([]),h=react.exports.useCallback(()=>{var e=get$3(JSON.parse(localStorage.getItem("recentApplicationWithUserId")||"{}"),[i],[]);f(e)},[i]);return react.exports.useEffect(()=>{i&&h()},[i,h]),react.exports.useEffect(()=>{t(requestGetApplications()),t(getActivity()),t(getCurrentUser())},[t]),react.exports.useEffect(()=>{c(e||0)},[e]),react.exports.useEffect(()=>{if(0<p.length&&0<n.length){const t=p.join(",");var e=n.filter(e=>t.includes(""+e.id));d(e)}},[p,n]),jsxRuntime.exports.jsx(CacheProvider,Object.assign({value:muiCache},{children:jsxRuntime.exports.jsx(AIWareThemeProvider,{children:jsxRuntime.exports.jsx(AIWareIntlProvider,{children:jsxRuntime.exports.jsx(lib$4.DynamicModuleLoader,Object.assign({modules:[getAppbarPanelModule(),getOpenIdModule()]},{children:jsxRuntime.exports.jsx(SettingPanel,{tabId:l,currentUser:r,activities:a,activityFilter:s,onChangeActivityFilter:function(e){t(updateActivityFilter({filter:e}))},handleResetBiometric:function(){t(resetBiometric())},handleResetPassword:function(e){t(resetPassword({email:e}))},handleLogout:function(){t(logout())},handleUpdateProfile:function(e){t(updateProfile(e))},organizationRole:get$3(r,"organizationRole",{}),recentApp:u,applications:function(){const t=p.join(",");return n.filter(e=>!t.includes(""+e.id))}(),onClickApp:function(e){t(appSwitcherHandleClick(""+e)),setTimeout(()=>{h()},500)},handleUploadAvatar:function(e){t(uploadAvatar(e))},avatarHistory:o})}))})})}))}const CropImage=({url:e,handleCroppedImage:t})=>{const n=react.exports.useRef();return jsxRuntime.exports.jsx("div",Object.assign({style:{padding:"10px",background:"#F8F8F8",borderRadius:"4px",border:"1px solid #D5DFE9"}},{children:jsxRuntime.exports.jsx(ReactCropper,{ref:n,src:e,style:{height:"100%",width:"100%",borderRadius:"4px",maxHeight:"300px"},dragMode:"move",viewMode:1,width:"",aspectRatio:1,guides:!0,crop:()=>{n.current&&n.current.cropper.getCroppedCanvas().toBlob(function(e){t(e)},"image/jpeg")},cropBoxMovable:!1,cropBoxResizable:!1,toggleDragModeOnDblclick:!1})}))};function EditProFilePicture({onClose:e,onSaveAvatar:t,avatarHistory:n}){const r=useStyles$1$1()["classes"],[o,i]=react.exports.useState(""),[a,s]=react.exports.useState(),[l,c]=react.exports.useState(!1),[u,d]=react.exports.useState(!1);var p=react.exports.useRef(null);const f=react.exports.useRef(0),h=react.exports.useRef(null);const m=e=>{h.current&&(h.current.value=""),i(e),c(!0)};return jsxRuntime.exports.jsx(AIWareIntlProvider,{children:jsxRuntime.exports.jsxs("div",Object.assign({className:r.editProfilePictureContainer},{children:[jsxRuntime.exports.jsx("input",{accept:"image/*",className:r.inputFile,id:"icon-button-file",type:"file",onChange:e=>{e=e.target.files;if(e&&0<e.length){e=e[0];if(URL)m(URL.createObjectURL(e));else if(FileReader){const t=new FileReader;t.onload=function(){m(t.result)},t.readAsDataURL(e)}}},ref:h,"data-test":"image-upload-input","data-testid":"image-upload-input"}),jsxRuntime.exports.jsxs(Box$1,Object.assign({className:r.contentUserView},{children:[jsxRuntime.exports.jsx(Box$1,Object.assign({className:r.headerDrawer},{children:jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"h1",className:r.mainTitleText,"data-test":"edit-profile-picture-header"},{children:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar-panel.npW7Np",defaultMessage:"Edit Profile Picture",description:"The title of edit profile picture panel"})}))})),jsxRuntime.exports.jsxs(Box$1,Object.assign({className:r.contentEditAvatar},{children:[jsxRuntime.exports.jsx("div",Object.assign({className:classNames(u&&r.dragging),ref:p,onDragEnter:e=>{e.preventDefault(),e.stopPropagation(),f.current++,e.dataTransfer.items&&0<e.dataTransfer.items.length&&d(!0)},onDragLeave:e=>{e.preventDefault(),e.stopPropagation(),f.current--,0<f.current||d(!1)},onDragOver:e=>{e.preventDefault(),e.stopPropagation()},onDrop:e=>{if(e.preventDefault(),e.stopPropagation(),d(!1),e.dataTransfer.files&&0<e.dataTransfer.files.length){var t=e.dataTransfer.files;if(FileReader&&0<t.length){const n=new FileReader;n.onload=function(){m(n.result)},n.readAsDataURL(t[0])}e.dataTransfer.clearData(),f.current=0}}},{children:l?jsxRuntime.exports.jsx(CropImage,{url:o,handleCroppedImage:e=>{s(e)}}):jsxRuntime.exports.jsxs(Box$1,Object.assign({className:r.areaUpload},{children:[jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"subtitle1",className:r.descDrag},{children:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar-panel.LeafC8",defaultMessage:"Drag a profile photo here",description:"the label of upload file container"})})),jsxRuntime.exports.jsx(Box$1,{children:jsxRuntime.exports.jsx("img",{src:img$1t,alt:""})}),jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"subtitle2",className:r.descDrag2},{children:"- or -"})),jsxRuntime.exports.jsx(Button$1,Object.assign({variant:"outlined",color:"primary",id:"on-select-photo",className:r.btnSelectPhoto,onClick:()=>{h.current&&h.current.click()},"data-test":"edit-profile-picture-upload-file-button"},{children:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar-panel.CaHXXC",defaultMessage:"Select a photo from your computer",description:"edit profile picture panel: select photo label"})}))]}))})),0<(null==n?void 0:n.length)&&jsxRuntime.exports.jsxs(Box$1,Object.assign({className:r.recentlyBox},{children:[jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"subtitle1",className:r.recentlyText},{children:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar-panel.3gg72P",defaultMessage:"Recently Used Photos",description:"the label of recently used profile picture container"})})),jsxRuntime.exports.jsx(Grid$1,Object.assign({container:!0},{children:0<n.length&&n.map(e=>jsxRuntime.exports.jsx(Grid$1,Object.assign({xs:4,item:!0,className:r.imageGrid,"data-test":"recent-profile-picture"},{children:jsxRuntime.exports.jsx("img",{className:r.imgRecently,src:e,alt:"avatar"})}),e))}))]}))]}))]})),jsxRuntime.exports.jsxs(Box$1,Object.assign({className:r.actionButton+" "+r.editProfilePictureFooterButtons},{children:[jsxRuntime.exports.jsx(Button$1,Object.assign({color:"primary",onClick:()=>{i(""),s(void 0),c(!1),null!=e&&e()},className:classNames(r.btnAction,r.btnActionCancel),"data-test":"edit-profile-picture-cancel-button","data-testid":"edit-profile-picture-cancel-button"},{children:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar-panel.hdbMmi",defaultMessage:"Cancel",description:"the label of cancel button"})})),jsxRuntime.exports.jsx(Button$1,Object.assign({color:"primary",variant:"contained",id:"button-save-cropped-image",className:classNames(r.btnAction,r.btnSave),onClick:()=>{var e;a&&(e="avatar-"+(new Date).toISOString()+".jpeg",e=new File([a],e,{type:"image/jpeg"}),t(e),setTimeout(()=>{i(""),c(!1)},250))},"data-test":"edit-profile-picture-save-button"},{children:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar-panel.tcZkqy",defaultMessage:"Save",description:"label of save button in edit profile picture panel"})}))]}))]}))})}var index_esm$1=Object.freeze({__proto__:null,AppList:AppList,EditProFilePicture:EditProFilePicture,VeritonePanel:SettingPanelComponent,applicationSelector:applicationSelector,getAppbarPanelModule:getAppbarPanelModule,requestGetApplications:requestGetApplications});!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 nameSpace="@helpPanel",updateSelectedTab=createAction(nameSpace+"/UPDATE_SELECTED_TAB",function(e,t){return{payload:{selectedTabId:e,tabLink:t}}}),setCustomKnowledgeBaseUrl=createAction(nameSpace+"/SET_CUSTOM_KNOWLEDGE_BASE_URL",function(e){return{payload:{url:e}}}),setCustomDocsUrl=createAction(nameSpace+"/SET_CUSTOM_DOCS_URL",function(e){return{payload:{url:e}}}),initialState={selectedTabId:0,tabLink:"https://help.veritone.com/",customKnowledgeBaseUrl:"",customDocsUrl:""},getTabLinkReducer=createReducer(initialState,e=>{e.addCase(updateSelectedTab,(e,t)=>Object.assign(Object.assign({},e),{tabLink:t.payload.tabLink,selectedTabId:t.payload.selectedTabId})),e.addCase(setCustomKnowledgeBaseUrl,(e,t)=>Object.assign(Object.assign({},e),{customKnowledgeBaseUrl:t.payload.url})),e.addCase(setCustomDocsUrl,(e,t)=>Object.assign(Object.assign({},e),{customDocsUrl:t.payload.url}))});function*helpSaga(){yield takeEvery$1("OPEN_HELP_LINK",function*(){var e=yield select(e=>e.helpPanel.tabLink);yield put(openLinkOnNewTab({url:e}))})}const namespace="helpPanel",helpCenterSelectedTabIdSelector=e=>null!=e&&e[namespace]?e[namespace].selectedTabId:0,customDocsUrlSelector=e=>null!=e&&e[namespace]?e[namespace].customDocsUrl:"",customKnowledgeBaseUrlSelector=e=>null!=e&&e[namespace]?e[namespace].customKnowledgeBaseUrl:"";function getHelpPanelModule(){return{id:"help",reducerMap:{[namespace]:getTabLinkReducer},sagas:[helpSaga],initialActions:[]}}var knowledgeBaseUrl$1="https://docs.veritone.com/help/index.html",documentUrl$1="https://docs.veritone.com",config={knowledgeBaseUrl:knowledgeBaseUrl$1,documentUrl:documentUrl$1};const useStyles$1=makeStyles()(e=>({root:{height:"calc(100% - 110px)",textAlign:"left","& .Sdk-MuiTab-root.Mui-selected":{color:e.palette.text.primary,fontWeight:600}},tabs:{padding:e.spacing(2.4,6,0,6)},tabPanels:{width:"100%",height:"100%"},aiWareIcon:{position:"relative",maxHeight:50,opacity:"inherit",padding:e.spacing(4,3.2,0,3.2),display:"flex",justifyContent:"flex-end"},customTabs:{margin:e.spacing(0,4)},kbRoot:{height:"100%",textAlign:"left"},loadingContainer:{position:"absolute",height:"100%",width:"100%",display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:"white"},kbToolBarBox:{padding:e.spacing(6,6,1.6,6)},kbTabContent:{height:"calc(100% - 92px)"},kbTabPanel:{padding:e.spacing(6)},dRoot:{height:"100%",width:"100%"},dNavBar:{height:"100%",overflow:"hidden",background:"#F4F4F4"},dTitle:{color:"#2A323C",fontWeight:600,fontSize:"18px",lineHeight:"24px",padding:e.spacing(3.2)},dContent:{height:"100%",width:"100%",position:"relative"},dMenu:{overflowY:"auto",height:"calc(100% - 52px)"},drawerContainer:{display:"flex",height:"100%",background:e.palette.background.default},tabContainer:{borderRight:"0.5px solid #D5DFE9",overflow:"hidden",height:"100%",width:"100%"},tabName:{borderBottom:"0.5px solid #D5DFE9",display:"flex",justifyContent:"space-between",alignItems:"center",height:"64px",padding:e.spacing(0,6)},actionIcons:{margin:e.spacing(-2.4)},tabContent:{height:"calc(100vh - 57px - 60px)",overflowY:"auto",overflowX:"hidden"}})),documentUrl=config.documentUrl,Documentation=({path:e=documentUrl})=>{var t=useStyles$1()["classes"];const[n,r]=react.exports.useState(!0);return jsxRuntime.exports.jsxs("div",Object.assign({className:classNames(t.dRoot,"hide-in-percy")},{children:[n&&jsxRuntime.exports.jsx("div",Object.assign({className:t.loadingContainer},{children:jsxRuntime.exports.jsx(CircularProgress$1,{})})),jsxRuntime.exports.jsx("iframe",{"data-cy":"docs-iframe",title:"Document Iframe",style:{width:"100%",height:"100%"},src:e,frameBorder:"0",onLoad:function(){setTimeout(()=>{r(!1)},1e3)}})]}))},knowledgeBaseUrl=config["knowledgeBaseUrl"];function Knowledgebase({path:e=knowledgeBaseUrl}){var t=useStyles$1()["classes"];const[n,r]=react.exports.useState(!0);return jsxRuntime.exports.jsxs("div",Object.assign({className:t.kbRoot},{children:[n&&jsxRuntime.exports.jsx("div",Object.assign({className:t.loadingContainer},{children:jsxRuntime.exports.jsx(CircularProgress$1,{})})),jsxRuntime.exports.jsx("iframe",{"data-cy":"knowledgebase-iframe",title:"Knowledgebase Iframe",style:{width:"100%",height:"100%"},src:e,frameBorder:"0",onLoad:function(){r(!1)}})]}))}const defaultLocale="en-us",tabsList=[{label:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-help-panel.au1+VZ",defaultMessage:"Knowledgebase",description:"Help Panel: Knowledgebase tab label"}),disabled:!1,url:"https://help.veritone.com/"},{label:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-help-panel.8bnkm8",defaultMessage:"Documentation",description:"Help Panel: Documentation tab label"}),disabled:!1,url:"https://docs.veritone.com/#/aiware/"}];function HelpCenter(e){var t=useSelector(initialConfigSelector),n=useSelector(customKnowledgeBaseUrlSelector),r=useSelector(customDocsUrlSelector),o=useSelector(helpCenterSelectedTabIdSelector);const i=useSelector(e=>null==e?void 0:e.panels);var a=useStyles$1()["classes"],[s]=react.exports.useState(defaultLocale);const l=useDispatch();var c=null===i||void 0===i?void 0:i.find(e=>"CUSTOM_HELP_PANEL_ID"===e.panelId),n=c&&n?n:t.knowledgeBaseURL,c=c&&r?r:t.docsURL;return jsxRuntime.exports.jsx(lib$4.DynamicModuleLoader,Object.assign({modules:[getHelpPanelModule()]},{children:jsxRuntime.exports.jsx(AIWareIntlProvider,Object.assign({locale:s},{children:jsxRuntime.exports.jsx("div",Object.assign({className:a.drawerContainer},{children:jsxRuntime.exports.jsx("div",Object.assign({id:"setting-content",className:a.tabContainer},{children:jsxRuntime.exports.jsx("div",Object.assign({className:a.tabContent},{children:jsxRuntime.exports.jsx("div",Object.assign({className:a.root},{children:jsxRuntime.exports.jsxs("div",Object.assign({className:a.tabPanels},{children:[jsxRuntime.exports.jsx("div",Object.assign({className:a.customTabs},{children:jsxRuntime.exports.jsx(CustomTabs,{selectedId:o,onChangeTab:e=>{l(updateSelectedTab(e,tabsList[e].url))},tabsList:tabsList})})),jsxRuntime.exports.jsxs(Box$1,Object.assign({className:a.tabPanels},{children:[jsxRuntime.exports.jsx(TabPanel,Object.assign({value:o,index:0},{children:jsxRuntime.exports.jsx(Knowledgebase,{path:n})})),jsxRuntime.exports.jsx(TabPanel,Object.assign({value:o,index:1},{children:jsxRuntime.exports.jsx(Documentation,{path:c})}))]})),jsxRuntime.exports.jsx("div",Object.assign({className:a.aiWareIcon},{children:jsxRuntime.exports.jsx("img",{src:img$w,alt:"icon",draggable:"false"})}))]}))}))}))}))}))}))}))}var index_esm=Object.freeze({__proto__:null,HelpCenterPanel:HelpCenter,customDocsUrlSelector:customDocsUrlSelector,customKnowledgeBaseUrlSelector:customKnowledgeBaseUrlSelector,helpCenterSelectedTabIdSelector:helpCenterSelectedTabIdSelector,setCustomDocsUrl:setCustomDocsUrl,setCustomKnowledgeBaseUrl:setCustomKnowledgeBaseUrl,updateSelectedTab:updateSelectedTab});const useStyles=makeStyles()(()=>({dialog:{top:"125px",overflowX:"hidden",overflowY:"hidden",display:"flex",alignItems:"center",flexDirection:"column"},container:{borderRadius:"4px",backgroundColor:"#fff",width:"430px",overflow:"hidden",outline:0,boxShadow:"0px 0px 7px rgba(0, 0, 0, .25)"},header:{textTransform:"capitalize"},appListContainer:{width:"100%"},orgName:{fontWeight:"bold"}})),ApplicationDialog=()=>{var e=useSelector(userSelector$1),t=useStyles()["classes"];const n=useSelector(initialConfigSelector).applicationId;var r=useSelector(applicationSelector);const o=useSelector(switchApiSelector),i=(null==r?void 0:r.application)||[];r=null==r?void 0:r.status;const a=[...i];var s=a.sort(function(e,t){return e.name>t.name?1:e.name<t.name?-1:0}),l=i.findIndex(e=>e.id===n);return/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i.test(n)&&l<0&&"success"===r?jsxRuntime.exports.jsx(Modal$1,Object.assign({className:t.dialog,open:!0},{children:jsxRuntime.exports.jsxs("div",Object.assign({className:t.container},{children:[jsxRuntime.exports.jsx(Typography$1,Object.assign({"data-test":"application-dialog-title",className:t.header,variant:"h1",sx:{px:"30px",pt:"30px"}},{children:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"js-core-app-dialog-title",defaultMessage:"Application Not Available",description:"Title for modal"})})),jsxRuntime.exports.jsxs(Typography$1,Object.assign({variant:"body2",sx:{px:"30px",pt:"10px"}},{children:[jsxRuntime.exports.jsx(FormattedMessage$1,{id:"js-core-app-dialog-message1",defaultMessage:"Looks like you switched organizations, your current application is not available in the current",description:"Description current application not available"})," ",jsxRuntime.exports.jsx("span",Object.assign({className:t.orgName},{children:null!=(l=null==e?void 0:e.organization)&&l.organizationName?e.organization.organizationName:""}))," ",jsxRuntime.exports.jsx(FormattedMessage$1,{id:"js-core-app-dialog-message2",defaultMessage:"organization you are viewing.",description:"Description current application not available"})]})),jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"body2",sx:{px:"30px",pt:"20px"}},{children:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"js-core-app-dialog-message3",defaultMessage:"Please select from the available applications below to be redirected.",description:"Instructions for current application not available"})})),jsxRuntime.exports.jsx("div",Object.assign({className:t.appListContainer},{children:jsxRuntime.exports.jsx(AppList,{title:"",selectedAppId:null,onSelectApplication:e=>{window.open(o+"/"+e,"_self")},applications:s,useGrid:!1,row:3})}))]}))})):null};function SnackbarRenderer(){return jsxRuntime.exports.jsx(Provider$1,Object.assign({store:store$4},{children:jsxRuntime.exports.jsx(lib$4.DynamicModuleLoader,Object.assign({modules:[getSnackbarModule()]},{children:jsxRuntime.exports.jsx(CustomSnackbar,{})}))}))}store$4.addModules([getWidgetsModule(),getPanelsModule(registry,registryLookup),getDataModule(),getConfigModule(),getAuthModule()]);let hasLoaded=!1;const AppBarPreLoader=()=>{var e=useSelector(authSelector);return(null==(e=null==e?void 0:e.user)?void 0:e.token)&&!hasLoaded&&(hasLoaded=!0,setTimeout(()=>{store$4.addModules([getAppbarPanelModule()])},0)),null};function ApplicationDialogPreLoader(){var e=useSelector(authSelector);return(null==(e=null==e?void 0:e.user)?void 0:e.token)&&hasLoaded?jsxRuntime.exports.jsx(ApplicationDialog,{}):null}const authHelpers={updateToken(e){e?store$4.dispatch(updateTokenRequest({token:e})):console.error("[AiWARE JS]: Please provide a valid token!")},logout(e){"function"==typeof e?(e(),setTimeout(()=>{store$4.dispatch(logout())},1e3)):store$4.dispatch(logout())}};function PortalRenderer(){return jsxRuntime.exports.jsxs(jsxRuntime.exports.Fragment,{children:[jsxRuntime.exports.jsx(SupportCenterPixel,{}),jsxRuntime.exports.jsx(Provider$1,Object.assign({store:store$4},{children:jsxRuntime.exports.jsx(AppBarPreLoader,{})}))]})}function ApplicationDialogRenderer(){return jsxRuntime.exports.jsx(jsxRuntime.exports.Fragment,{children:jsxRuntime.exports.jsx(Provider$1,Object.assign({store:store$4},{children:jsxRuntime.exports.jsx(AIWareIntlProvider,{children:jsxRuntime.exports.jsx(ApplicationDialogPreLoader,{})})}))})}const ThemeInitializer=()=>(useTheme(),null),root=getElement("aiWARE"),mountWidget=(root.classList.add("aiware-el"),ReactDOM.render(jsxRuntime.exports.jsx(CacheProvider,Object.assign({value:muiCache},{children:jsxRuntime.exports.jsxs(AIWareThemeProvider,{children:[jsxRuntime.exports.jsx(PortalRenderer,{}),jsxRuntime.exports.jsx(SnackbarRenderer,{}),jsxRuntime.exports.jsx(ApplicationDialogRenderer,{}),jsxRuntime.exports.jsx(ThemeInitializer,{})]})})),root),e=>{var t=getUniqueID(),{name:e,elementId:n,config:r}=e;return e&&n&&r||console.error("[aiwarejs-error]: `mountWidget` function should include all the following params: name, elementId, config"),store$4.dispatch(mountWidget$1({elementId:n,widgetName:e,widgetConfig:r,widgetId:t})),t}),unmountWidget=e=>(store$4.dispatch(unmountWidget$1(e)),!0),mountPanel=(e,t)=>{const n=e.panelId||getUniqueID();var{microFrontend:e,panelConfig:r}=e;store$4.dispatch(mountPanel$1({microFrontend:e,panelId:n,panelConfig:r}));const o=[...(null==(e=null==r?void 0:r.header)?void 0:e.actions)||[],...(null==(e=null==r?void 0:r.footer)?void 0:e.actions)||[]].filter(e=>e.submit).map(e=>e.action);r={id:n,sagas:[function*(){yield takeEvery$1(o.map(e=>e.type),function*(){var e=(yield select(e=>e.data.find(e=>e.id===n)))["data"];t&&t(e)})}]};return store$4.addModule(r),n},unmountPanel=e=>(store$4.dispatch(unmountPanel$1(e)),!0),hidePanel=e=>(store$4.dispatch(hidePanel$1(e)),!0),unmountAllPanel=()=>{store$4.dispatch(unmountAllPanel$1(""))};function init(e,t){validateConfig(e)&&store$4.dispatch(getInitConfig(Object.assign(Object.assign({},e),{onComplete:t})))}function helpCenter(){const e=new HelpCenter$2({actions:{setCustomKnowledgeBaseUrlAction:setCustomKnowledgeBaseUrl,setCustomDocsUrlAction:setCustomDocsUrl,updateSelectedTabAction:updateSelectedTab}});return{openKnowledgeBasePanel:e.openKnowledgeBasePanel.bind(e),openDocsPanel:e.openDocsPanel.bind(e)}}function dataCenter(){const e=new DataCenter$1;return{openImporterPanel:e.openImporterPanel.bind(e)}}function handleEvents(){function n(e){if(!e||"string"!=typeof e)throw new SdkError("Please provide a valid event name!");if(!SdkEvents[e])throw new SdkError("Unknown event: "+e)}return{on:function(e,t){n(e),sdkEventManager.on.call(sdkEventManager,e,t)},off:function(e){n(e),sdkEventManager.off.call(sdkEventManager,e)}}}const mountPanelForResponse=e=>mountPanelForResponse$1(e,store$4),aiwareEvents=handleEvents();window&&(window.aiWare_initTesting=()=>{window.aiWare_store=store$4,window.aiWare_theme={darkTheme:darkTheme,lightTheme:lightTheme}},window.aiware={init:init,auth:authHelpers,helpCenter:helpCenter(),dataCenter:dataCenter(),on:aiwareEvents.on,off:aiwareEvents.off,hidePanel:hidePanel,unmountPanel:unmountPanel,store:store$4,registry:registry,registerComponent:registerComponent,AvailableWidgets:AvailableWidgets,mountPanelAction:mountPanel$1,unmountPanelAction:unmountPanel$1,hidePanelAction:hidePanel$1,updatePanelMicroFrontendPropsAction:updatePanelMicroFrontendProps,setData:setData,mountWidget:mountWidget,mountPanel:mountPanel,mountPanelForResponse:mountPanelForResponse,unmountWidget:unmountWidget,commit:"6dabc2e7a"});export{getSortName as $,AIWareIntlProvider as A,ButtonBase$1 as B,img$18 as C,img$3 as D,img$17 as E,FormattedMessage$1 as F,useDispatch as G,useSelector as H,betaFeaturesSelector as I,authSelector as J,applicationSelector as K,mountPanel$1 as L,listenLogout as M,appSwitcherSetupListener as N,AIWareThemeProvider as O,Provider$1 as P,lib$4 as Q,getAppbarPanelModule as R,getEventsModule as S,Typography$1 as T,isEqual as U,IconButton$1 as V,classNames as W,Tooltip$1 as X,Badge$1 as Y,Avatar$1 as Z,_extends as _,generateUtilityClasses as a,img$1b as a$,img$O as a0,TabId as a1,Popover$1 as a2,List$2 as a3,ListItem$1 as a4,ListItemText$1 as a5,Divider$1 as a6,isIdleSelector as a7,userSelector$1 as a8,sessionTokenSelector as a9,logoutUser$1 as aA,call$7 as aB,appSwitcherHandleClick as aC,appSwitcherHandleClickAppNatively as aD,select as aE,graphEndpointSelector as aF,get$3 as aG,baseGraphQLApi as aH,__rest$4 as aI,invariant$2 as aJ,__assign$2 as aK,useIntl as aL,createAction as aM,createReducer as aN,delay$1 as aO,configSelector as aP,eventChannel as aQ,gql as aR,createApolloWs as aS,createApolloClient as aT,fetchUserSuccess as aU,cancel as aV,createSvgIcon$2 as aW,createSelector as aX,img$D as aY,img$1c as aZ,img$1a as a_,loginUrlSelector as aa,callLogoutSelector as ab,clickedLogoutSelector as ac,callResetIdleTimerSelector as ad,sessionTimeoutSelector as ae,reloadPageSelector as af,resetIdleTimerCallCounterSelector as ag,postNotificationCommand as ah,aiwareEvent as ai,notificationCommands as aj,logoutRequest as ak,refreshTokenRequest as al,Dialog$1 as am,DialogTitle$1 as an,DialogContent$1 as ao,DialogContentText$1 as ap,DialogActions$1 as aq,Button$1 as ar,all as as,fork as at,takeLatest$1 as au,hidePanel$1 as av,takeEvery$1 as aw,take as ax,logout as ay,put as az,styled$1 as b,img$n as b$,img$C as b0,img$B as b1,img$A as b2,Notifications as b3,img$1i as b4,img$1h as b5,img$1g as b6,img$1e as b7,img$1f as b8,img$1d as b9,createChainedFunction as bA,useForkRef as bB,useId as bC,formControlState as bD,authStatusSelector as bE,authContextSelector as bF,AuthContext as bG,lodash as bH,Alert$1 as bI,authErrorMessage as bJ,Grid$1 as bK,TextField$1 as bL,LoadingButton$1 as bM,resetPasswordRequest as bN,createSlice as bO,ENGINE_OWNER_TYPES as bP,ENGINE_FILTER_TYPES as bQ,preferredLanguageSelector as bR,baseUrlSelector as bS,rootApiSelector as bT,controllerNodeRedImageSelector as bU,controllerUrlSelector as bV,automateControllerUrlSelector as bW,automateUrlSelector as bX,Portal$1 as bY,img$k as bZ,img$l as b_,NotificationFlag as ba,CircularProgress$1 as bb,Filter as bc,Email as bd,HelpCenter$1 as be,Banner as bf,FormControl$1 as bg,Box$1 as bh,img$E as bi,unmountPanel$1 as bj,ListItemAvatar$1 as bk,img$1n as bl,img$1m as bm,img$1l as bn,TableContainer$1 as bo,Table$1 as bp,TableHead$1 as bq,TableRow$1 as br,TableCell$1 as bs,TableBody$1 as bt,Icon$1 as bu,img$1k as bv,img$1j as bw,ListContext$1 as bx,getListItemIconUtilityClass as by,rootShouldForwardProp$1 as bz,Paper$1 as c,getAuthModule as c$,img$o as c0,img$e as c1,getNodeRedVersionEdgeApi as c2,createEnginebuild as c3,Skeleton$1 as c4,fetchAllTags as c5,fetchFlows as c6,fetchTemplateGallery as c7,isRevisionsExistOnServerRequest as c8,FormLabel$1 as c9,Tab$1 as cA,deleteEngine as cB,img$g as cC,AIWareFormatMessage as cD,FormattedDate as cE,useTheme as cF,KeyboardArrowRight as cG,KeyboardArrowLeft as cH,InputUnstyled as cI,isHostComponent as cJ,getDefaultExportFromNamespaceIfNotNamed as cK,commonjsRequire as cL,_assertThisInitialized$1 as cM,_setPrototypeOf$2 as cN,reactDom as cO,React$1 as cP,_inheritsLoose$1 as cQ,ReactDOM as cR,__awaiter$6 as cS,__generator$2 as cT,__spread as cU,connect as cV,Bookmark as cW,EngineFlagIcons as cX,createAsyncThunk as cY,withStyles as cZ,getConfigModule as c_,default_1$1 as ca,fetchTemplateGalleryFallback as cb,img$i as cc,flowStyles as cd,NoResults as ce,fetchVeritoneGraphQLApi as cf,img$8 as cg,setApiEndpoint as ch,getTemplateById as ci,getTemplateByIdFallback as cj,TableSortLabel$1 as ck,img$d as cl,Popper$1 as cm,ClickAwayListener as cn,Fade$1 as co,img$p as cp,img$m as cq,img$M as cr,img$y as cs,Snackbar$1 as ct,Select$1 as cu,MenuItem$1 as cv,img$f as cw,img$h as cx,img$Q as cy,Tabs$1 as cz,capitalize$2 as d,_arrayPush as d$,getSnackbarModule as d0,CacheProvider as d1,muiCache as d2,img$N as d3,img$a as d4,img$9 as d5,isEmpty_1 as d6,Backdrop$1 as d7,getDefaultMiddleware as d8,isNil_1 as d9,useEnhancedEffect$1 as dA,combineReducers as dB,Close as dC,FullscreenExit as dD,Fullscreen as dE,TabPanel as dF,MoreVert as dG,Menu$1 as dH,Edit as dI,Upload as dJ,Delete as dK,CustomTabs as dL,useBackupImg as dM,baseGraphQLApiWithError as dN,useDoubleClick as dO,VerifiedFilled as dP,Add as dQ,img$12 as dR,Filter$1 as dS,Collapse$1 as dT,DynamicTable as dU,useTheme$2 as dV,getThemeProps as dW,React$2 as dX,_Symbol as dY,isArguments_1 as dZ,isArray_1 as d_,UpDown as da,get_1 as db,map_1 as dc,keys_1 as dd,img$s as de,FormHelperText$1 as df,img$c as dg,StyledEngineProvider as dh,ThemeProvider as di,lightTheme as dj,CssBaseline as dk,Hide as dl,showMessage as dm,MessageSeverity as dn,fetchEngine as dp,_hasPath as dq,_createCompounder as dr,_baseIteratee as ds,isArrayLike_1 as dt,toInteger_1 as du,hoistNonReactStatics_cjs as dv,Transition$1 as dw,commonjsGlobal$1 as dx,getDefaultExportFromCjs as dy,TransitionGroup$1 as dz,_objectWithoutPropertiesLoose$1 as e,EngineClassIcons as e$,_getNative as e0,eq_1 as e1,_castPath as e2,_isIndex as e3,isObject_1 as e4,_toKey as e5,_root as e6,_Uint8Array as e7,_overArg as e8,_isPrototype as e9,composeWithDevTools as eA,orange$1 as eB,deepOrange$1 as eC,createTheme$1 as eD,createIntl as eE,SvgIcon$1 as eF,unmountAllPanel$1 as eG,isNull_1 as eH,size_1 as eI,startCase_1 as eJ,times_1 as eK,ReactIs as eL,upperFirst_1 as eM,isString_1 as eN,_baseSlice as eO,channel as eP,VideoCamera as eQ,Image$1 as eR,Sound as eS,Description as eT,toNumber_1 as eU,ProgressStepper as eV,CurlyBraces as eW,UnknownDocument as eX,sdkEventManager as eY,SdkEvents as eZ,SdkError as e_,isObjectLike_1 as ea,_baseGetTag as eb,_arrayLikeKeys as ec,isBuffer$3 as ed,isFunction_1 as ee,isTypedArray_1 as ef,_Stack as eg,_baseFor as eh,identity_1 as ei,_isIterateeCall as ej,_Set as ek,_setToArray as el,_SetCache as em,_cacheHas as en,_baseToString as eo,_baseTrim as ep,_castSlice as eq,_stringToArray as er,toString_1 as es,isSymbol_1 as et,_arrayMap as eu,_baseMap as ev,_baseGet as ew,_baseUnary as ex,lib as ey,getThunkExtension_1 as ez,clsx as f,emphasize as f$,Mode2 as f0,EngineModeIcons as f1,DeploymentModelIcons as f2,guid as f3,FormControlContext$1 as f4,extendSxProp as f5,handleBreakpoints as f6,resolveBreakpointValues as f7,createUnarySpacing as f8,deepmerge as f9,LibraryCenter as fA,AdminCenter as fB,img$P as fC,img$1 as fD,img$w as fE,enableBetaFeatures as fF,openLinkOnNewTab as fG,avatarClasses$1 as fH,injectIntl as fI,img$5 as fJ,InputLabel$1 as fK,OrganizationTabIcon as fL,ScopedCssBaseline$1 as fM,AlarmTwo as fN,getApplicationsApi as fO,ListItemSecondaryAction$1 as fP,updateTokenSuccess as fQ,panelsSelector as fR,css as fS,img$J as fT,img$I as fU,img$1r as fV,img$1q as fW,img$1p as fX,img$G as fY,img$1s as fZ,img$F as f_,getValue$2 as fa,useEventCallback as fb,setRef as fc,inputClasses$1 as fd,inputBaseClasses$1 as fe,outlinedInputClasses$1 as ff,filledInputClasses$1 as fg,ClearIcon as fh,ArrowDropDownIcon as fi,_baseEach as fj,_arrayFilter as fk,useIsFocusVisible as fl,ownerDocument as fm,appendOwnerState as fn,slotShouldForwardProp as fo,shouldSpreadAdditionalProps$1 as fp,Slide$1 as fq,updatePanelMicroFrontendProps as fr,setData as fs,keyframes as ft,PersonalProfile$1 as fu,Organizations as fv,DataCenter as fw,FlowCenter2 as fx,DeveloperCenter as fy,Marketplace as fz,generateUtilityClass as g,Input$1 as g$,_arraySome as g0,Process as g1,Information as g2,NewFolder as g3,SpecialFolder as g4,User as g5,Source as g6,ProcessingDetail as g7,Search as g8,getLibraryModule as g9,YoutubeSource as gA,PodcastSource as gB,TVSource as gC,RadioSource as gD,selectOrgGuid as gE,selectOrgId as gF,selectIsUserAdmin as gG,ErrorState$1 as gH,StepConnector$1 as gI,NullState$2 as gJ,Group as gK,PermissionChangedAction as gL,AddGroup as gM,StepperContext$1 as gN,StepContext$1 as gO,initialConfigSelector as gP,ConfirmationModal as gQ,EnumHelpers as gR,formatBytes as gS,NotInterested as gT,mountPanelForResponse$1 as gU,Lock as gV,SecurityGroup as gW,selectors as gX,LibraryDropdown as gY,Remove as gZ,Save as g_,selectApiConfigs$1 as ga,FullScreenContainer as gb,cmsUrlSelector as gc,UserAddFilled as gd,MenuList$1 as ge,MoveFolder as gf,ErrorBoundary as gg,Download as gh,img$6 as gi,selectPanelByPanelName as gj,EngineCategoryIcons as gk,Settings$1 as gl,Hamburger as gm,List as gn,EditAttributes as go,MoreHor as gp,ExpandMore as gq,img$r as gr,img$t as gs,img as gt,FolderOpen as gu,Voice as gv,FolderFilled as gw,Time as gx,img$u as gy,Undefined as gz,composeClasses as h,AvailableComponents as h0,registry as h1,registerComponent as h2,AvailableWidgets as h3,root as h4,mountWidget as h5,unmountWidget as h6,mountPanel as h7,unmountPanel as h8,hidePanel as h9,unmountAllPanel as ha,init as hb,alpha as i,jsxRuntime as j,darken as k,lighten as l,makeStyles as m,useControlled as n,useFormControl as o,createSvgIcon$1 as p,interopRequireDefault as q,react as r,store$4 as s,img$1v as t,useThemeProps as u,img$_ as v,img$1u as w,img$19 as x,img$2 as y,img$4 as z};