aiware-js 1.0.0-master.871 → 1.0.0-master.873
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 +1 -1
- package/js-core.esm.js.gz +0 -0
- package/js-core.esm4.js +1 -1
- package/js-core.esm4.js.gz +0 -0
- package/js-core.umd.css +92 -92
- package/js-core.umd.css.gz +0 -0
- package/js-core.umd.js +2 -2
- package/js-core.umd.js.gz +0 -0
- package/js-core.umd.min.css +92 -92
- package/js-core.umd.min.css.gz +0 -0
- package/locales/en.json +1 -1
- package/locales/es.json +1 -1
- package/locales/fr.json +1 -1
- package/package.json +1 -1
package/js-core.esm.js
CHANGED
|
@@ -1528,4 +1528,4 @@ createScheduledJob(input:{
|
|
|
1528
1528
|
}
|
|
1529
1529
|
`)}),n},[]).join("\r\n")}
|
|
1530
1530
|
}
|
|
1531
|
-
`,l={entityId:t,entityType:e};try{a=yield baseGraphQLApi({query:s,operationName:n,variables:l,graphEndpoint:u,token:d})}catch(e){i=!0}if(a.errors){if(0===(o=a.errors.filter(({message:e})=>e.includes(' does not exist in "AuthPermissionType" enum.')).map(({message:e})=>{var t='Value "',n=e.substring(t.length).indexOf('"');return e.substring(t.length,t.length+n)})).length)throw i=!0,a={},new Error((null==(f=(a.errors||[])[0])?void 0:f.message)||"Error")}else i=!0}const c=a.data||{};return Object.keys(c).map(e=>{var t=e.split("__");return 3===t.length?{fetchedTargetEntityType:t[0],fetchedTargetGroupType:t[1],fetchedTargetAction:t[2],hasPermission:c[e][0].hasPermission}:{fetchedTargetEntityType:t[0],fetchedTargetAction:t[1],hasPermission:c[e][0].hasPermission}}).reduce((e,t)=>{var n=t.fetchedTargetGroupType||t.fetchedTargetEntityType;return t.hasPermission&&(e[n]||(e[n]={}),e[n][t.fetchedTargetAction]=t.hasPermission),e},{})})}function getMyRights(t){return __awaiter(this,void 0,void 0,function*(){var e="getMyRights";return(yield baseGraphQLApiWithError(Object.assign({query:"\n query getMyRights {\n myRights {\n operations\n }\n }\n ",operationName:e},t))).myRights.operations})}const selectPermissionsByEntity=(t,n,r)=>e=>{return t&&n&&(e=e[namespace].permissionsByObject[t])&&e[n]?e[n][r||t]:void 0},selectMyRights=e=>e[namespace].rights;var index=Object.freeze({__proto__:null,selectPermissionsByEntity:selectPermissionsByEntity,selectMyRights:selectMyRights});function*fetchObjectPermissions(t){var{entityId:t,entityType:n}=t.payload,i=yield select(selectApiConfigs$2),e=yield select(graphEndpointSelector),o=yield select(sessionTokenSelector),a=yield select(selectIsOLPEnabled),r=yield select(selectPermissionsByEntity(n,t));if(!r||"success"!==r.status&&"pending"!==r.status){yield put(actions.fetchObjectPermissionsStarted({entityId:t,entityType:n}));try{let r={};if(a)r=yield call$j(getObjectPermissions,e,o,{entityType:n,entityId:t});else{let e=yield select(selectMyRights);if("success"!==e.status&&"pending"!==e.status){yield put(actions.fetchMyRightsStarted);try{var s=yield call$j(getMyRights,i);yield put(actions.fetchMyRightsSucceeded(s)),e=yield select(selectMyRights)}catch(e){throw yield put(actions.fetchMyRightsFailed),e}}else"pending"===e.status&&(yield take([actions.fetchMyRightsFailed,actions.fetchMyRightsSucceeded]),e=yield select(selectMyRights));const l=e["myRights"];getPermissionTypesToQuery(n).forEach(n=>{var{action:e,resource:t}=n.targetActions.reduce((e,t)=>(e.action[t.targetAction]=convertPermissionsToRights(t.resource||n.targetObjectType,t.targetAction,l),e.resource=t.resource,e),{action:{}});r[t||n.targetObjectType]=e})}yield put(actions.fetchObjectPermissionsSucceeded({entityId:t,entityType:n,permissions:r}))}catch(e){actions.fetchObjectPermissionsFailed({entityId:t,entityType:n})}}}function*watchPermissionsStart(){yield takeEvery$1(actions.fetchObjectPermissionsStart.type,fetchObjectPermissions)}function*rootSaga(){yield all$2([watchPermissionsStart()])}function getPermissionsModule(){return{id:namespace,reducerMap:{[namespace]:permissionsReducer},sagas:[rootSaga],initialActions:[]}}const useOrganizationPermissions=e=>{const t=react$1.exports.useRef(),n=useDispatch(),r=null==(o=useSelector(userSelector$2).organization)?void 0:o.organizationId,i=useSelector(selectPermissionsByEntity(EAuthResourceType.Organization,String(r),e));react$1.exports.useEffect(()=>{!r||i&&"failure"!==i.status&&"idle"!==i.status&&t.current===r||(t.current=r,n(actions.fetchObjectPermissionsStart({entityType:EAuthResourceType.Organization,entityId:String(r)})))},[n,r,i]);var o=react$1.exports.useCallback(e=>{return!isPermissionLoading(i)&&hasPermission(i,e)},[i]);return{permissions:i,hasPermission:o}},rateLimiter=new RateLimiter,checkAndDecodeBase64String=t=>{if(null==t||!t.trim())return t;try{return window.btoa(window.atob(t))==t?window.atob(t):t}catch(e){return t}};function SnackbarRenderer(){return jsxRuntime.exports.jsx(Provider$2,Object.assign({store:store$5},{children:jsxRuntime.exports.jsx(DynamicModuleLoader,Object.assign({modules:[getSnackbarModule()]},{children:jsxRuntime.exports.jsx(CustomSnackbar,{})}))}))}store$5.addModules([getWidgetsModule(),getPanelsModule(registry,registryLookup),getDataModule(),getConfigModule(),getAuthModule(),getPermissionsModule()]);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$5.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$5.dispatch(updateTokenRequest({token:e})):console.error("[AiWARE JS]: Please provide a valid token!")},logout(e){"function"==typeof e?(e(),setTimeout(()=>{store$5.dispatch(logout())},1e3)):store$5.dispatch(logout())},reportAppActivity(e){rateLimiter.checkIfCanCall(e)&&store$5.dispatch(updateActivityStatus$1())}};function PortalRenderer(){return jsxRuntime.exports.jsxs(jsxRuntime.exports.Fragment,{children:[jsxRuntime.exports.jsx(SupportCenterPixel,{}),jsxRuntime.exports.jsx(Provider$2,Object.assign({store:store$5},{children:jsxRuntime.exports.jsx(AppBarPreLoader,{})}))]})}function ApplicationDialogRenderer(){return jsxRuntime.exports.jsx(jsxRuntime.exports.Fragment,{children:jsxRuntime.exports.jsx(Provider$2,Object.assign({store:store$5},{children:jsxRuntime.exports.jsx(AIWareIntlProvider,{children:jsxRuntime.exports.jsx(ApplicationDialogPreLoader,{})})}))})}const ThemeInitializer=()=>(useTheme(),null),root=getElement("aiWARE"),reactDOMroot=(root.classList.add("aiware-el"),client$1.createRoot(root)),mountWidget=("_auth"===window.name?handleImplicitRedirect(window.location.hash,window.opener):reactDOMroot.render(jsxRuntime.exports.jsx(AIWareCacheProvider,{children:jsxRuntime.exports.jsxs(AIWareThemeProvider$1,{children:[jsxRuntime.exports.jsx(PortalRenderer,{}),jsxRuntime.exports.jsx(SnackbarRenderer,{}),jsxRuntime.exports.jsx(ApplicationDialogRenderer,{}),jsxRuntime.exports.jsx(ThemeInitializer,{})]})})),(e,t)=>{var n=getUniqueID(),{name:e,elementId:r,config:i}=e;return e&&r&&i||console.error("[aiwarejs-error]: `mountWidget` function should include all the following params: name, elementId, config"),store$5.dispatch(mountWidget$1({elementId:r,widgetName:e,widgetConfig:i,widgetId:n,onComplete:t})),n}),unmountWidget=e=>(store$5.dispatch(unmountWidget$1(e)),!0),mountPanel=(e,t)=>{const n=e.panelId||getUniqueID();var{microFrontend:e,panelConfig:r}=e;store$5.dispatch(mountPanel$1({microFrontend:e,panelId:n,panelConfig:r}));const i=[...(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(i.map(e=>e.type),function*(){var e=(yield select(e=>e.data.find(e=>e.id===n)))["data"];t&&t(e)})}]};return store$5.addModule(r),n},unmountPanel=e=>(store$5.dispatch(unmountPanel$1(e)),!0),hidePanel=e=>(store$5.dispatch(hidePanel$1(e)),!0),unmountAllPanel=()=>{store$5.dispatch(unmountAllPanel$1(""))};function init(e,t){var n,e=validateConfig(e);e?(n=e["authToken"],n=checkAndDecodeBase64String(n||""),store$5.dispatch(getInitConfig(Object.assign(Object.assign({},e),{authToken:n,onComplete:t})))):console.error("@aiware/js initialization failed. Please pass valid configuration object.")}function helpCenter(){var e=new HelpCenter$2({actions:{setCustomKnowledgeBaseUrlAction:setCustomKnowledgeBaseUrl,setCustomDocsUrlAction:setCustomDocsUrl,updateSelectedTabAction:updateSelectedTab}});return{openKnowledgeBasePanel:e.openKnowledgeBasePanel.bind(e),openDocsPanel:e.openDocsPanel.bind(e)}}function dataCenter(){var 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$5),aiwareEvents=handleEvents();window&&(window.aiWare_initTesting=()=>{window.aiWare_store=store$5,window.aiWare_theme={darkTheme:darkTheme$1,lightTheme:lightTheme$1}},window.aiware={init:init,auth:authHelpers,helpCenter:helpCenter(),dataCenter:dataCenter(),on:aiwareEvents.on,off:aiwareEvents.off,hidePanel:hidePanel,unmountPanel:unmountPanel,store:store$5,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,version:"sdk_release_version",commit:"6fe59b017",releaseDate:"2023-09-28T19:18:43.794Z"});export{IconButton$1 as $,AIWareIntlProvider as A,Box$1 as B,useLocation as C,DynamicModuleLoader as D,Button$1 as E,FormattedMessage$1 as F,useSearchParams as G,img$5 as H,StyledEngineProvider as I,Fade$1 as J,classNames as K,LinearProgress$1 as L,getAppbarPanelModule as M,LoadingButton$1 as N,authErrorMessage as O,Provider$2 as P,Grid$1 as Q,Routes as R,Switch$1 as S,Typography$1 as T,FormControl$1 as U,TextField$1 as V,resetPasswordRequest as W,InputLabel$1 as X,OutlinedInput$1 as Y,InputAdornment$1 as Z,_extends$5 as _,generateUtilityClasses as a,img$k as a$,Select$1 as a0,Location as a1,MenuItem$1 as a2,Divider$1 as a3,Popover$1 as a4,applicationSelector as a5,setUser as a6,logoutUser$1 as a7,all$2 as a8,Stack$4 as a9,createBox$1 as aA,createAction as aB,createReducer as aC,ENGINE_OWNER_TYPES as aD,ENGINE_FILTER_TYPES as aE,preferredLanguageSelector as aF,baseUrlSelector as aG,rootApiSelector as aH,sessionTokenSelector as aI,graphEndpointSelector as aJ,controllerNodeRedImageSelector as aK,controllerUrlSelector as aL,automateControllerUrlSelector as aM,flowCenterDialogSelector as aN,automateUrlSelector as aO,Portal$1 as aP,flowCenterDialogReducer as aQ,List$2 as aR,ListItem$1 as aS,ListItemIcon$1 as aT,ListItemText$1 as aU,flowCenterDialogAction as aV,img$q as aW,img$r as aX,img$t as aY,img$u as aZ,Tooltip$1 as a_,CheckmarkFilled as aa,Bullet as ab,takeEvery$1 as ac,select as ad,call$j as ae,put as af,showMessage as ag,MessageSeverity as ah,createTheme$1 as ai,systemStyled as aj,useThemeProps$1 as ak,useId as al,useControlled$1 as am,usePreviousProps$1 as an,useEventCallback as ao,setRef as ap,inputClasses$1 as aq,inputBaseClasses$1 as ar,outlinedInputClasses$1 as as,filledInputClasses$1 as at,Popper$1 as au,alpha as av,ListSubheader$1 as aw,ClearIcon as ax,ArrowDropDownIcon as ay,Chip$1 as az,styled$1 as b,_setPrototypeOf$z as b$,img$J as b0,Skeleton$1 as b1,takeLatest$1 as b2,fetchAllTags as b3,fetchFlows as b4,fetchTemplateGallery as b5,isRevisionsExistOnServerRequest as b6,FormLabel$1 as b7,default_1$e as b8,FormGroup$1 as b9,img$F as bA,DialogTitle$1 as bB,DialogContent$1 as bC,DialogActions$1 as bD,Snackbar$1 as bE,default_1$6 as bF,Search$1 as bG,img$l as bH,img$n as bI,img$X as bJ,Tabs$2 as bK,Tab$2 as bL,deleteEngine as bM,fetchEngine as bN,img$m as bO,AIWareFormatMessage as bP,FormattedDate as bQ,fetchVeritoneGraphQLApi as bR,useTheme as bS,KeyboardArrowRight as bT,KeyboardArrowLeft as bU,InputUnstyled as bV,isHostComponent as bW,getDefaultExportFromNamespaceIfNotNamed as bX,commonjsRequire as bY,_typeof$D as bZ,_assertThisInitialized$x as b_,FormControlLabel$1 as ba,Checkbox$1 as bb,fetchTemplateGalleryFallback as bc,Card$1 as bd,CardContent$1 as be,img$o as bf,CardActions$1 as bg,flowStyles as bh,NoResults as bi,CircularProgress$1 as bj,img$e as bk,Dialog$1 as bl,setApiEndpoint as bm,TableContainer$1 as bn,Table$1 as bo,TableHead$1 as bp,TableRow$1 as bq,TableCell$1 as br,TableSortLabel$1 as bs,TableBody$1 as bt,img$j as bu,default_1 as bv,ClickAwayListener as bw,img$v as bx,img$s as by,img$T as bz,Paper$1 as c,TabPanel as c$,reactDom as c0,Transition$1 as c1,_defineProperty$x as c2,__awaiter$e as c3,__generator$2 as c4,__spread as c5,React5 as c6,PropTypes as c7,TransitionGroup$1 as c8,connect$1 as c9,default_1$9 as cA,Controller as cB,FormHelperText$2 as cC,img$i as cD,ThemeProvider as cE,lightTheme$1 as cF,CssBaseline as cG,Hide as cH,has_1 as cI,Radio$2 as cJ,createSvgIcon$2 as cK,_createCompounder as cL,_toPropertyKey as cM,_inheritsLoose$2 as cN,hoistNonReactStatics_cjs as cO,commonjsGlobal$2 as cP,combineReducers as cQ,createSelector$1 as cR,fork as cS,statusPill as cT,AIWareThemeProvider$1 as cU,LocalizationProvider as cV,AdapterDateFns as cW,CalendarPicker as cX,Close$1 as cY,FullscreenExit as cZ,Fullscreen as c_,Bookmark as ca,EngineFlagIcons as cb,createAsyncThunk as cc,withStyles as cd,getConfigModule as ce,getAuthModule as cf,getSnackbarModule as cg,AIWareCacheProvider as ch,img$U as ci,img$g as cj,img$f as ck,isEmpty_1 as cl,find_1 as cm,Backdrop$1 as cn,getDefaultMiddleware as co,isNil_1 as cp,useForm as cq,UpDown as cr,Icon$1 as cs,get_1 as ct,map_1 as cu,keys_1 as cv,RadioGroup$1 as cw,Avatar$1 as cx,img$z as cy,baseGraphQLApi as cz,capitalize$2 as d,CurlyBraces as d$,ReactMarkdown as d0,default_1$8 as d1,unmountPanel$1 as d2,AvailableComponents as d3,delay$1 as d4,hidePanel$1 as d5,mountPanel$1 as d6,DialogContentText$1 as d7,userSelector$2 as d8,MoreVert$1 as d9,_baseTrim as dA,_castSlice as dB,_stringToArray as dC,toString_1 as dD,upperFirst_1 as dE,isArrayLike_1 as dF,isString_1 as dG,toInteger_1 as dH,_baseGet as dI,_baseSlice as dJ,_castPath as dK,_toKey as dL,_isIndex as dM,channel$2 as dN,useFormContext as dO,useIntl as dP,useFieldArray as dQ,VideoCamera as dR,Image$1 as dS,Sound as dT,Description as dU,toNumber_1 as dV,FormProvider as dW,ProgressStepper as dX,size_1 as dY,findIndex_1 as dZ,take as d_,Menu$1 as da,Edit as db,Upload as dc,Delete$1 as dd,CustomTabs as de,useBackupImg as df,img$1C as dg,validate as dh,img$19 as di,baseGraphQLApiWithError as dj,VerifiedFilled as dk,Add as dl,ExpandLess$1 as dm,ExpandMore$1 as dn,Collapse$1 as dp,Filter$1 as dq,DynamicTable as dr,useTheme$3 as ds,getThemeProps as dt,useEnhancedEffect$3 as du,React as dv,_arrayPush as dw,isArray_1 as dx,_baseIteratee as dy,_baseToString as dz,_objectWithoutPropertiesLoose$2 as e,Information as e$,UnknownDocument as e0,VariableSizeList as e1,sdkEventManager as e2,SdkEvents as e3,SdkError as e4,distributionTypes as e5,EngineClassIcons as e6,Mode2 as e7,EngineModeIcons as e8,DeploymentModelIcons as e9,isSymbol_1 as eA,_baseMap as eB,_baseUnary as eC,_baseFindIndex as eD,_Set as eE,_setToArray as eF,_SetCache as eG,_cacheHas as eH,img$Q as eI,img$P as eJ,img$1y as eK,img$1x as eL,img$1w as eM,img$N as eN,img$1A as eO,img$M as eP,authSelector as eQ,ListItemAvatar$1 as eR,emphasize as eS,useSlotProps as eT,_arraySome as eU,EntityType as eV,generateState as eW,injectIntl as eX,ErrorBoundary$1 as eY,EPermissionAction as eZ,Process as e_,markdown as ea,guid as eb,EditList as ec,ButtonBase$1 as ed,isObject_1 as ee,_arrayMap as ef,_Symbol as eg,isArguments_1 as eh,_baseEach as ei,_arrayFilter as ej,_getNative as ek,eq_1 as el,_root as em,_Uint8Array as en,_overArg as eo,_isPrototype as ep,isObjectLike_1 as eq,_baseGetTag as er,_arrayLikeKeys as es,isBuffer$5 as et,isFunction_1 as eu,isTypedArray_1 as ev,_Stack as ew,_baseFor as ex,identity_1 as ey,_isIterateeCall as ez,clsx as f,selectOrgId as f$,Download as f0,NewFolder as f1,SpecialFolder as f2,User as f3,Source as f4,Search$2 as f5,selectIsOLPEnabled as f6,ListItemSecondaryAction$1 as f7,getLibraryModule as f8,cmsUrlSelector as f9,convertEntityToAuthResource as fA,AutoSizer as fB,InfiniteLoader as fC,FixedSizeList as fD,selectUserOrgEdgeVersion as fE,EditAttributes as fF,imageUpload as fG,gqlIntrospection as fH,ProcessingDetail as fI,img$y as fJ,img$A as fK,img$6 as fL,FilterRemove as fM,AlarmTwo as fN,tableInfiniteScroll as fO,CheckCircle as fP,FolderOpen as fQ,Voice as fR,useDoubleClick as fS,FolderFilled as fT,Time as fU,img$B as fV,Undefined as fW,PodcastSource as fX,YoutubeSource as fY,TVSource as fZ,RadioSource as f_,debounce_1 as fa,SearchStructuredData as fb,Grow$1 as fc,configSelector as fd,index as fe,betaFeaturesSelector as ff,actions as fg,hasPermission as fh,UserAddFilled as fi,MenuList$1 as fj,MoveFolder as fk,EAuthResourceType as fl,Slide$1 as fm,img$c as fn,selectApiConfigs$2 as fo,selectPanelByPanelName as fp,FullScreenContainer as fq,EngineCategoryIcons as fr,isPermissionLoading as fs,Settings$2 as ft,Hamburger as fu,List as fv,enginesFilter as fw,panelsSelector as fx,Badge$1 as fy,MoreHor as fz,generateUtilityClass as g,_nodeUtil as g$,navSectionStyles as g0,selectIsUserAdmin as g1,AvatarGroup$1 as g2,index$1 as g3,ErrorState$2 as g4,Stepper$1 as g5,StepConnector$1 as g6,Step$1 as g7,StepLabel$1 as g8,isEqual_1 as g9,getOrganizationPanelModule as gA,Lock2 as gB,EApplicationConfigLevel as gC,NoApps as gD,EApplicationConfigType as gE,green$1 as gF,md5 as gG,selectIsSuperAdmin as gH,organizations_selector as gI,actions$5 as gJ,AddUser as gK,selectors as gL,LibraryDropdown as gM,Remove as gN,Save as gO,Input$3 as gP,getElement as gQ,client$1 as gR,Copy as gS,ArrowForward as gT,Modal$1 as gU,Slider$1 as gV,getDefaultExportFromCjs as gW,_getSymbols as gX,stubArray_1 as gY,_baseGetAllKeys as gZ,_getTag as g_,NullState$2 as ga,Group as gb,PermissionChangedAction as gc,Lock as gd,useOrganizationPermissions as ge,EAuthSubResourceType as gf,AddGroup as gg,initialConfigSelector as gh,EMessageTypes as gi,errors as gj,ConfirmationModal as gk,panelComponents as gl,EnumHelpers as gm,formatBytes as gn,NotInterested as go,mountPanelForResponse$1 as gp,default_1$a as gq,tableStyles as gr,ArrowDown as gs,ArrowUp as gt,useInterval as gu,Iam as gv,safeFormatMessage as gw,contextMenuStyles as gx,Users as gy,SecurityGroup as gz,composeClasses as h,mountPanel as h$,_getAllKeys as h0,_castFunction as h1,Article as h2,Task as h3,View as h4,isNumber_1 as h5,Check as h6,EngineIconsRenderer as h7,FormattedRelativeTime$1 as h8,BottomQueue as h9,PackagesAvatar as hA,actionChannel as hB,cancelled as hC,flush$4 as hD,tableSearchComponents as hE,cancel as hF,FlowTemplate as hG,Node as hH,Palette as hI,FlowCenter2 as hJ,ArrowBack as hK,Schema$1 as hL,truncatedString as hM,img$1 as hN,img$x as hO,AutomateNode as hP,Clear as hQ,ExpandLess as hR,ExpandMore as hS,registry as hT,registerComponent as hU,AvailableWidgets as hV,updatePanelMicroFrontendProps as hW,setData as hX,root as hY,mountWidget as hZ,unmountWidget as h_,TopQueue as ha,Pause as hb,Cancel as hc,Folder as hd,Hidden as he,dateRangeFilter as hf,statusFilter as hg,TableLoadingState as hh,setDuration as hi,resetDuration as hj,ButtonGroupContext$1 as hk,toFinite_1 as hl,_baseForOwn as hm,_arrayReduce as hn,hasIn_1 as ho,now_1 as hp,useSyncExternalStoreExports as hq,Engines as hr,EngineComponentLoader as hs,EngineFieldType as ht,characterCountTextField as hu,createStack as hv,tabsClasses$1 as hw,Packages as hx,Resources$1 as hy,selectUserCanCreatePackage as hz,createSvgIcon$1 as i,unmountPanel as i0,hidePanel as i1,unmountAllPanel as i2,init as i3,aiwareEvents as i4,jsxRuntime as j,interopRequireDefault as k,createSlice as l,makeStyles as m,Route as n,useDispatch as o,useSelector as p,authStatusSelector as q,react$1 as r,store$5 as s,authContextSelector as t,useThemeProps as u,AuthContext as v,lodash as w,Alert$1 as x,useNavigate as y,devErrorLogger as z};
|
|
1531
|
+
`,l={entityId:t,entityType:e};try{a=yield baseGraphQLApi({query:s,operationName:n,variables:l,graphEndpoint:u,token:d})}catch(e){i=!0}if(a.errors){if(0===(o=a.errors.filter(({message:e})=>e.includes(' does not exist in "AuthPermissionType" enum.')).map(({message:e})=>{var t='Value "',n=e.substring(t.length).indexOf('"');return e.substring(t.length,t.length+n)})).length)throw i=!0,a={},new Error((null==(f=(a.errors||[])[0])?void 0:f.message)||"Error")}else i=!0}const c=a.data||{};return Object.keys(c).map(e=>{var t=e.split("__");return 3===t.length?{fetchedTargetEntityType:t[0],fetchedTargetGroupType:t[1],fetchedTargetAction:t[2],hasPermission:c[e][0].hasPermission}:{fetchedTargetEntityType:t[0],fetchedTargetAction:t[1],hasPermission:c[e][0].hasPermission}}).reduce((e,t)=>{var n=t.fetchedTargetGroupType||t.fetchedTargetEntityType;return t.hasPermission&&(e[n]||(e[n]={}),e[n][t.fetchedTargetAction]=t.hasPermission),e},{})})}function getMyRights(t){return __awaiter(this,void 0,void 0,function*(){var e="getMyRights";return(yield baseGraphQLApiWithError(Object.assign({query:"\n query getMyRights {\n myRights {\n operations\n }\n }\n ",operationName:e},t))).myRights.operations})}const selectPermissionsByEntity=(t,n,r)=>e=>{return t&&n&&(e=e[namespace].permissionsByObject[t])&&e[n]?e[n][r||t]:void 0},selectMyRights=e=>e[namespace].rights;var index=Object.freeze({__proto__:null,selectPermissionsByEntity:selectPermissionsByEntity,selectMyRights:selectMyRights});function*fetchObjectPermissions(t){var{entityId:t,entityType:n}=t.payload,i=yield select(selectApiConfigs$2),e=yield select(graphEndpointSelector),o=yield select(sessionTokenSelector),a=yield select(selectIsOLPEnabled),r=yield select(selectPermissionsByEntity(n,t));if(!r||"success"!==r.status&&"pending"!==r.status){yield put(actions.fetchObjectPermissionsStarted({entityId:t,entityType:n}));try{let r={};if(a)r=yield call$j(getObjectPermissions,e,o,{entityType:n,entityId:t});else{let e=yield select(selectMyRights);if("success"!==e.status&&"pending"!==e.status){yield put(actions.fetchMyRightsStarted);try{var s=yield call$j(getMyRights,i);yield put(actions.fetchMyRightsSucceeded(s)),e=yield select(selectMyRights)}catch(e){throw yield put(actions.fetchMyRightsFailed),e}}else"pending"===e.status&&(yield take([actions.fetchMyRightsFailed,actions.fetchMyRightsSucceeded]),e=yield select(selectMyRights));const l=e["myRights"];getPermissionTypesToQuery(n).forEach(n=>{var{action:e,resource:t}=n.targetActions.reduce((e,t)=>(e.action[t.targetAction]=convertPermissionsToRights(t.resource||n.targetObjectType,t.targetAction,l),e.resource=t.resource,e),{action:{}});r[t||n.targetObjectType]=e})}yield put(actions.fetchObjectPermissionsSucceeded({entityId:t,entityType:n,permissions:r}))}catch(e){actions.fetchObjectPermissionsFailed({entityId:t,entityType:n})}}}function*watchPermissionsStart(){yield takeEvery$1(actions.fetchObjectPermissionsStart.type,fetchObjectPermissions)}function*rootSaga(){yield all$2([watchPermissionsStart()])}function getPermissionsModule(){return{id:namespace,reducerMap:{[namespace]:permissionsReducer},sagas:[rootSaga],initialActions:[]}}const useOrganizationPermissions=e=>{const t=react$1.exports.useRef(),n=useDispatch(),r=null==(o=useSelector(userSelector$2).organization)?void 0:o.organizationId,i=useSelector(selectPermissionsByEntity(EAuthResourceType.Organization,String(r),e));react$1.exports.useEffect(()=>{!r||i&&"failure"!==i.status&&"idle"!==i.status&&t.current===r||(t.current=r,n(actions.fetchObjectPermissionsStart({entityType:EAuthResourceType.Organization,entityId:String(r)})))},[n,r,i]);var o=react$1.exports.useCallback(e=>{return!isPermissionLoading(i)&&hasPermission(i,e)},[i]);return{permissions:i,hasPermission:o}},rateLimiter=new RateLimiter,checkAndDecodeBase64String=t=>{if(null==t||!t.trim())return t;try{return window.btoa(window.atob(t))==t?window.atob(t):t}catch(e){return t}};function SnackbarRenderer(){return jsxRuntime.exports.jsx(Provider$2,Object.assign({store:store$5},{children:jsxRuntime.exports.jsx(DynamicModuleLoader,Object.assign({modules:[getSnackbarModule()]},{children:jsxRuntime.exports.jsx(CustomSnackbar,{})}))}))}store$5.addModules([getWidgetsModule(),getPanelsModule(registry,registryLookup),getDataModule(),getConfigModule(),getAuthModule(),getPermissionsModule()]);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$5.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$5.dispatch(updateTokenRequest({token:e})):console.error("[AiWARE JS]: Please provide a valid token!")},logout(e){"function"==typeof e?(e(),setTimeout(()=>{store$5.dispatch(logout())},1e3)):store$5.dispatch(logout())},reportAppActivity(e){rateLimiter.checkIfCanCall(e)&&store$5.dispatch(updateActivityStatus$1())}};function PortalRenderer(){return jsxRuntime.exports.jsxs(jsxRuntime.exports.Fragment,{children:[jsxRuntime.exports.jsx(SupportCenterPixel,{}),jsxRuntime.exports.jsx(Provider$2,Object.assign({store:store$5},{children:jsxRuntime.exports.jsx(AppBarPreLoader,{})}))]})}function ApplicationDialogRenderer(){return jsxRuntime.exports.jsx(jsxRuntime.exports.Fragment,{children:jsxRuntime.exports.jsx(Provider$2,Object.assign({store:store$5},{children:jsxRuntime.exports.jsx(AIWareIntlProvider,{children:jsxRuntime.exports.jsx(ApplicationDialogPreLoader,{})})}))})}const ThemeInitializer=()=>(useTheme(),null),root=getElement("aiWARE"),reactDOMroot=(root.classList.add("aiware-el"),client$1.createRoot(root)),mountWidget=("_auth"===window.name?handleImplicitRedirect(window.location.hash,window.opener):reactDOMroot.render(jsxRuntime.exports.jsx(AIWareCacheProvider,{children:jsxRuntime.exports.jsxs(AIWareThemeProvider$1,{children:[jsxRuntime.exports.jsx(PortalRenderer,{}),jsxRuntime.exports.jsx(SnackbarRenderer,{}),jsxRuntime.exports.jsx(ApplicationDialogRenderer,{}),jsxRuntime.exports.jsx(ThemeInitializer,{})]})})),(e,t)=>{var n=getUniqueID(),{name:e,elementId:r,config:i}=e;return e&&r&&i||console.error("[aiwarejs-error]: `mountWidget` function should include all the following params: name, elementId, config"),store$5.dispatch(mountWidget$1({elementId:r,widgetName:e,widgetConfig:i,widgetId:n,onComplete:t})),n}),unmountWidget=e=>(store$5.dispatch(unmountWidget$1(e)),!0),mountPanel=(e,t)=>{const n=e.panelId||getUniqueID();var{microFrontend:e,panelConfig:r}=e;store$5.dispatch(mountPanel$1({microFrontend:e,panelId:n,panelConfig:r}));const i=[...(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(i.map(e=>e.type),function*(){var e=(yield select(e=>e.data.find(e=>e.id===n)))["data"];t&&t(e)})}]};return store$5.addModule(r),n},unmountPanel=e=>(store$5.dispatch(unmountPanel$1(e)),!0),hidePanel=e=>(store$5.dispatch(hidePanel$1(e)),!0),unmountAllPanel=()=>{store$5.dispatch(unmountAllPanel$1(""))};function init(e,t){var n,e=validateConfig(e);e?(n=e["authToken"],n=checkAndDecodeBase64String(n||""),store$5.dispatch(getInitConfig(Object.assign(Object.assign({},e),{authToken:n,onComplete:t})))):console.error("@aiware/js initialization failed. Please pass valid configuration object.")}function helpCenter(){var e=new HelpCenter$2({actions:{setCustomKnowledgeBaseUrlAction:setCustomKnowledgeBaseUrl,setCustomDocsUrlAction:setCustomDocsUrl,updateSelectedTabAction:updateSelectedTab}});return{openKnowledgeBasePanel:e.openKnowledgeBasePanel.bind(e),openDocsPanel:e.openDocsPanel.bind(e)}}function dataCenter(){var 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$5),aiwareEvents=handleEvents();window&&(window.aiWare_initTesting=()=>{window.aiWare_store=store$5,window.aiWare_theme={darkTheme:darkTheme$1,lightTheme:lightTheme$1}},window.aiware={init:init,auth:authHelpers,helpCenter:helpCenter(),dataCenter:dataCenter(),on:aiwareEvents.on,off:aiwareEvents.off,hidePanel:hidePanel,unmountPanel:unmountPanel,store:store$5,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,version:"sdk_release_version",commit:"70739609a",releaseDate:"2023-09-29T13:51:44.471Z"});export{IconButton$1 as $,AIWareIntlProvider as A,Box$1 as B,useLocation as C,DynamicModuleLoader as D,Button$1 as E,FormattedMessage$1 as F,useSearchParams as G,img$5 as H,StyledEngineProvider as I,Fade$1 as J,classNames as K,LinearProgress$1 as L,getAppbarPanelModule as M,LoadingButton$1 as N,authErrorMessage as O,Provider$2 as P,Grid$1 as Q,Routes as R,Switch$1 as S,Typography$1 as T,FormControl$1 as U,TextField$1 as V,resetPasswordRequest as W,InputLabel$1 as X,OutlinedInput$1 as Y,InputAdornment$1 as Z,_extends$5 as _,generateUtilityClasses as a,img$k as a$,Select$1 as a0,Location as a1,MenuItem$1 as a2,Divider$1 as a3,Popover$1 as a4,applicationSelector as a5,setUser as a6,logoutUser$1 as a7,all$2 as a8,Stack$4 as a9,createBox$1 as aA,createAction as aB,createReducer as aC,ENGINE_OWNER_TYPES as aD,ENGINE_FILTER_TYPES as aE,preferredLanguageSelector as aF,baseUrlSelector as aG,rootApiSelector as aH,sessionTokenSelector as aI,graphEndpointSelector as aJ,controllerNodeRedImageSelector as aK,controllerUrlSelector as aL,automateControllerUrlSelector as aM,flowCenterDialogSelector as aN,automateUrlSelector as aO,Portal$1 as aP,flowCenterDialogReducer as aQ,List$2 as aR,ListItem$1 as aS,ListItemIcon$1 as aT,ListItemText$1 as aU,flowCenterDialogAction as aV,img$q as aW,img$r as aX,img$t as aY,img$u as aZ,Tooltip$1 as a_,CheckmarkFilled as aa,Bullet as ab,takeEvery$1 as ac,select as ad,call$j as ae,put as af,showMessage as ag,MessageSeverity as ah,createTheme$1 as ai,systemStyled as aj,useThemeProps$1 as ak,useId as al,useControlled$1 as am,usePreviousProps$1 as an,useEventCallback as ao,setRef as ap,inputClasses$1 as aq,inputBaseClasses$1 as ar,outlinedInputClasses$1 as as,filledInputClasses$1 as at,Popper$1 as au,alpha as av,ListSubheader$1 as aw,ClearIcon as ax,ArrowDropDownIcon as ay,Chip$1 as az,styled$1 as b,_setPrototypeOf$z as b$,img$J as b0,Skeleton$1 as b1,takeLatest$1 as b2,fetchAllTags as b3,fetchFlows as b4,fetchTemplateGallery as b5,isRevisionsExistOnServerRequest as b6,FormLabel$1 as b7,default_1$e as b8,FormGroup$1 as b9,img$F as bA,DialogTitle$1 as bB,DialogContent$1 as bC,DialogActions$1 as bD,Snackbar$1 as bE,default_1$6 as bF,Search$1 as bG,img$l as bH,img$n as bI,img$X as bJ,Tabs$2 as bK,Tab$2 as bL,deleteEngine as bM,fetchEngine as bN,img$m as bO,AIWareFormatMessage as bP,FormattedDate as bQ,fetchVeritoneGraphQLApi as bR,useTheme as bS,KeyboardArrowRight as bT,KeyboardArrowLeft as bU,InputUnstyled as bV,isHostComponent as bW,getDefaultExportFromNamespaceIfNotNamed as bX,commonjsRequire as bY,_typeof$D as bZ,_assertThisInitialized$x as b_,FormControlLabel$1 as ba,Checkbox$1 as bb,fetchTemplateGalleryFallback as bc,Card$1 as bd,CardContent$1 as be,img$o as bf,CardActions$1 as bg,flowStyles as bh,NoResults as bi,CircularProgress$1 as bj,img$e as bk,Dialog$1 as bl,setApiEndpoint as bm,TableContainer$1 as bn,Table$1 as bo,TableHead$1 as bp,TableRow$1 as bq,TableCell$1 as br,TableSortLabel$1 as bs,TableBody$1 as bt,img$j as bu,default_1 as bv,ClickAwayListener as bw,img$v as bx,img$s as by,img$T as bz,Paper$1 as c,TabPanel as c$,reactDom as c0,Transition$1 as c1,_defineProperty$x as c2,__awaiter$e as c3,__generator$2 as c4,__spread as c5,React5 as c6,PropTypes as c7,TransitionGroup$1 as c8,connect$1 as c9,default_1$9 as cA,Controller as cB,FormHelperText$2 as cC,img$i as cD,ThemeProvider as cE,lightTheme$1 as cF,CssBaseline as cG,Hide as cH,has_1 as cI,Radio$2 as cJ,createSvgIcon$2 as cK,_createCompounder as cL,_toPropertyKey as cM,_inheritsLoose$2 as cN,hoistNonReactStatics_cjs as cO,commonjsGlobal$2 as cP,combineReducers as cQ,createSelector$1 as cR,fork as cS,statusPill as cT,AIWareThemeProvider$1 as cU,LocalizationProvider as cV,AdapterDateFns as cW,CalendarPicker as cX,Close$1 as cY,FullscreenExit as cZ,Fullscreen as c_,Bookmark as ca,EngineFlagIcons as cb,createAsyncThunk as cc,withStyles as cd,getConfigModule as ce,getAuthModule as cf,getSnackbarModule as cg,AIWareCacheProvider as ch,img$U as ci,img$g as cj,img$f as ck,isEmpty_1 as cl,find_1 as cm,Backdrop$1 as cn,getDefaultMiddleware as co,isNil_1 as cp,useForm as cq,UpDown as cr,Icon$1 as cs,get_1 as ct,map_1 as cu,keys_1 as cv,RadioGroup$1 as cw,Avatar$1 as cx,img$z as cy,baseGraphQLApi as cz,capitalize$2 as d,CurlyBraces as d$,ReactMarkdown as d0,default_1$8 as d1,unmountPanel$1 as d2,AvailableComponents as d3,delay$1 as d4,hidePanel$1 as d5,mountPanel$1 as d6,DialogContentText$1 as d7,userSelector$2 as d8,MoreVert$1 as d9,_baseTrim as dA,_castSlice as dB,_stringToArray as dC,toString_1 as dD,upperFirst_1 as dE,isArrayLike_1 as dF,isString_1 as dG,toInteger_1 as dH,_baseGet as dI,_baseSlice as dJ,_castPath as dK,_toKey as dL,_isIndex as dM,channel$2 as dN,useFormContext as dO,useIntl as dP,useFieldArray as dQ,VideoCamera as dR,Image$1 as dS,Sound as dT,Description as dU,toNumber_1 as dV,FormProvider as dW,ProgressStepper as dX,size_1 as dY,findIndex_1 as dZ,take as d_,Menu$1 as da,Edit as db,Upload as dc,Delete$1 as dd,CustomTabs as de,useBackupImg as df,img$1C as dg,validate as dh,img$19 as di,baseGraphQLApiWithError as dj,VerifiedFilled as dk,Add as dl,ExpandLess$1 as dm,ExpandMore$1 as dn,Collapse$1 as dp,Filter$1 as dq,DynamicTable as dr,useTheme$3 as ds,getThemeProps as dt,useEnhancedEffect$3 as du,React as dv,_arrayPush as dw,isArray_1 as dx,_baseIteratee as dy,_baseToString as dz,_objectWithoutPropertiesLoose$2 as e,Information as e$,UnknownDocument as e0,VariableSizeList as e1,sdkEventManager as e2,SdkEvents as e3,SdkError as e4,distributionTypes as e5,EngineClassIcons as e6,Mode2 as e7,EngineModeIcons as e8,DeploymentModelIcons as e9,isSymbol_1 as eA,_baseMap as eB,_baseUnary as eC,_baseFindIndex as eD,_Set as eE,_setToArray as eF,_SetCache as eG,_cacheHas as eH,img$Q as eI,img$P as eJ,img$1y as eK,img$1x as eL,img$1w as eM,img$N as eN,img$1A as eO,img$M as eP,authSelector as eQ,ListItemAvatar$1 as eR,emphasize as eS,useSlotProps as eT,_arraySome as eU,EntityType as eV,generateState as eW,injectIntl as eX,ErrorBoundary$1 as eY,EPermissionAction as eZ,Process as e_,markdown as ea,guid as eb,EditList as ec,ButtonBase$1 as ed,isObject_1 as ee,_arrayMap as ef,_Symbol as eg,isArguments_1 as eh,_baseEach as ei,_arrayFilter as ej,_getNative as ek,eq_1 as el,_root as em,_Uint8Array as en,_overArg as eo,_isPrototype as ep,isObjectLike_1 as eq,_baseGetTag as er,_arrayLikeKeys as es,isBuffer$5 as et,isFunction_1 as eu,isTypedArray_1 as ev,_Stack as ew,_baseFor as ex,identity_1 as ey,_isIterateeCall as ez,clsx as f,selectOrgId as f$,Download as f0,NewFolder as f1,SpecialFolder as f2,User as f3,Source as f4,Search$2 as f5,selectIsOLPEnabled as f6,ListItemSecondaryAction$1 as f7,getLibraryModule as f8,cmsUrlSelector as f9,convertEntityToAuthResource as fA,AutoSizer as fB,InfiniteLoader as fC,FixedSizeList as fD,selectUserOrgEdgeVersion as fE,EditAttributes as fF,imageUpload as fG,gqlIntrospection as fH,ProcessingDetail as fI,img$y as fJ,img$A as fK,img$6 as fL,FilterRemove as fM,AlarmTwo as fN,tableInfiniteScroll as fO,CheckCircle as fP,FolderOpen as fQ,Voice as fR,useDoubleClick as fS,FolderFilled as fT,Time as fU,img$B as fV,Undefined as fW,PodcastSource as fX,YoutubeSource as fY,TVSource as fZ,RadioSource as f_,debounce_1 as fa,SearchStructuredData as fb,Grow$1 as fc,configSelector as fd,index as fe,betaFeaturesSelector as ff,actions as fg,hasPermission as fh,UserAddFilled as fi,MenuList$1 as fj,MoveFolder as fk,EAuthResourceType as fl,Slide$1 as fm,img$c as fn,selectApiConfigs$2 as fo,selectPanelByPanelName as fp,FullScreenContainer as fq,EngineCategoryIcons as fr,isPermissionLoading as fs,Settings$2 as ft,Hamburger as fu,List as fv,enginesFilter as fw,panelsSelector as fx,Badge$1 as fy,MoreHor as fz,generateUtilityClass as g,_nodeUtil as g$,navSectionStyles as g0,selectIsUserAdmin as g1,AvatarGroup$1 as g2,index$1 as g3,ErrorState$2 as g4,Stepper$1 as g5,StepConnector$1 as g6,Step$1 as g7,StepLabel$1 as g8,isEqual_1 as g9,getOrganizationPanelModule as gA,Lock2 as gB,EApplicationConfigLevel as gC,NoApps as gD,EApplicationConfigType as gE,green$1 as gF,md5 as gG,selectIsSuperAdmin as gH,organizations_selector as gI,actions$5 as gJ,AddUser as gK,selectors as gL,LibraryDropdown as gM,Remove as gN,Save as gO,Input$3 as gP,getElement as gQ,client$1 as gR,Copy as gS,ArrowForward as gT,Modal$1 as gU,Slider$1 as gV,getDefaultExportFromCjs as gW,_getSymbols as gX,stubArray_1 as gY,_baseGetAllKeys as gZ,_getTag as g_,NullState$2 as ga,Group as gb,PermissionChangedAction as gc,Lock as gd,useOrganizationPermissions as ge,EAuthSubResourceType as gf,AddGroup as gg,initialConfigSelector as gh,EMessageTypes as gi,errors as gj,ConfirmationModal as gk,panelComponents as gl,EnumHelpers as gm,formatBytes as gn,NotInterested as go,mountPanelForResponse$1 as gp,default_1$a as gq,tableStyles as gr,ArrowDown as gs,ArrowUp as gt,useInterval as gu,Iam as gv,safeFormatMessage as gw,contextMenuStyles as gx,Users as gy,SecurityGroup as gz,composeClasses as h,mountPanel as h$,_getAllKeys as h0,_castFunction as h1,Article as h2,Task as h3,View as h4,isNumber_1 as h5,Check as h6,EngineIconsRenderer as h7,FormattedRelativeTime$1 as h8,BottomQueue as h9,PackagesAvatar as hA,actionChannel as hB,cancelled as hC,flush$4 as hD,tableSearchComponents as hE,cancel as hF,FlowTemplate as hG,Node as hH,Palette as hI,FlowCenter2 as hJ,ArrowBack as hK,Schema$1 as hL,truncatedString as hM,img$1 as hN,img$x as hO,AutomateNode as hP,Clear as hQ,ExpandLess as hR,ExpandMore as hS,registry as hT,registerComponent as hU,AvailableWidgets as hV,updatePanelMicroFrontendProps as hW,setData as hX,root as hY,mountWidget as hZ,unmountWidget as h_,TopQueue as ha,Pause as hb,Cancel as hc,Folder as hd,Hidden as he,dateRangeFilter as hf,statusFilter as hg,TableLoadingState as hh,setDuration as hi,resetDuration as hj,ButtonGroupContext$1 as hk,toFinite_1 as hl,_baseForOwn as hm,_arrayReduce as hn,hasIn_1 as ho,now_1 as hp,useSyncExternalStoreExports as hq,Engines as hr,EngineComponentLoader as hs,EngineFieldType as ht,characterCountTextField as hu,createStack as hv,tabsClasses$1 as hw,Packages as hx,Resources$1 as hy,selectUserCanCreatePackage as hz,createSvgIcon$1 as i,unmountPanel as i0,hidePanel as i1,unmountAllPanel as i2,init as i3,aiwareEvents as i4,jsxRuntime as j,interopRequireDefault as k,createSlice as l,makeStyles as m,Route as n,useDispatch as o,useSelector as p,authStatusSelector as q,react$1 as r,store$5 as s,authContextSelector as t,useThemeProps as u,AuthContext as v,lodash as w,Alert$1 as x,useNavigate as y,devErrorLogger as z};
|
package/js-core.esm.js.gz
CHANGED
|
Binary file
|
package/js-core.esm4.js
CHANGED
|
@@ -10,4 +10,4 @@ import{i as createSvgIcon,k as interopRequireDefault,j as jsxRuntime,F as Format
|
|
|
10
10
|
message
|
|
11
11
|
}
|
|
12
12
|
}
|
|
13
|
-
`,variables:{input:{userName:r}}};try{return yield fetch(e,{method:"POST",credentials:"include",headers:{"Content-Type":"application/json; charset=utf-8"},body:JSON.stringify(t)})}catch(e){return devErrorLogger(e),null}}),createUserInHub=t=>__awaiter(void 0,void 0,void 0,function*(){var e=window.location.protocol+`//${window.location.hostname}:`+window.location.port;try{return!!(yield(yield fetch(getConfig().hubUrl+"/admin/users",{method:"POST",headers:{"Content-Type":"application/json; charset=utf-8"},body:JSON.stringify(Object.assign(Object.assign({},t),{userUrl:e+"/ui/auth/activate?token=%token%&username=%username%"}))})).json()).success}catch(e){return devErrorLogger(e),!1}}),activateUser=(o,i,a)=>__awaiter(void 0,void 0,void 0,function*(){var e=`/admin/users/${i}/activate`;try{var t={request:{userInviteToken:a,userPassword:o}},{success:r,result:{organizationUUID:n}}=yield(yield fetch(getConfig().hubUrl+e,{method:"POST",headers:{"Content-Type":"application/json; charset=utf-8"},body:JSON.stringify(t)})).json();return!(!r||!n)&&n}catch(e){return devErrorLogger(e),!1}}),BlueLinkText=({onClick:e,text:t,type:r})=>jsxRuntime.exports.jsx(Typography,Object.assign({sx:{fontFamily:"Nunito",fontSize:"14px",lineHeight:"20px",letterSpacing:"-1.30385e-09px",color:"#0C53B0",cursor:"pointer"},onClick:e,"data-testid":`os-auth-${r}-link-button`},{children:t})),OrDivider=()=>jsxRuntime.exports.jsxs(Box,Object.assign({sx:{marginTop:"20px",position:"relative"}},{children:[jsxRuntime.exports.jsx(Divider,{sx:{margin:"0 14px",color:"#D5DFE9"}}),jsxRuntime.exports.jsx(Typography,Object.assign({sx:{color:"#D5DFE9",fontSize:"14px",margin:0,top:"-12px",padding:"0 10px",position:"absolute",left:"calc(50% - 15px)",background:"#FFFFFF",fontFamily:"Roboto",letterSpacing:"- 1.30385e-09px",fontStyle:"normal",fontWeight:"normal"}},{children:"or"}))]})),SLICE_NAME="signUp",namespace="initStep",initialState={env:"",status:"idle",activeStep:1,1:{email:"",firstName:"",lastName:""},2:{orgName:"",teamSize:"",country:"",industry:""},errors:{1:{email:!1,firstName:!1,lastName:!1},2:{orgName:!1,country:!1}},userUUID:"",userEmail:"",organizationUUID:""};function isKeyOfObject(e,t){return e in t}function validateEmail(e){return e.match(/^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/)}const signUpSlice=createSlice({name:SLICE_NAME+"/"+namespace,initialState:initialState,reducers:{setStep(e,t){e.activeStep=t.payload},setValue(e,t){var{key:t,value:r}=t.payload;isKeyOfObject(t,e[e.activeStep])&&(e[e.activeStep][t]=r,isKeyOfObject(t,e.errors[e.activeStep]))&&(e.errors[e.activeStep][t]=!1)},validate(e){for(var[t,r]of Object.entries(e[e.activeStep]))isKeyOfObject(t,e.errors[e.activeStep])&&!r&&(e.errors[e.activeStep][t]=!0);1!==e.activeStep||validateEmail(e[1].email)||(e.errors[1].email=!0)},createUserStart(e){e.status="loading"},createUserSuccess(e){e.status="success"},createUserFailure(e){e.status="failure"},setEnv(e,t){t=t.payload;e.env=`https://hub${"prod"===t?"":"."+t}.aiware.com`},resetState:()=>initialState,activateUserStart(e,t){e.status="loading"},activateUserSuccess(e){e.status="success"},activateUserFailure(e){e.status="failure"}}}),actions=signUpSlice.actions;var signUpSlice$1=signUpSlice.reducer,whitespaces$2="\t\n\v\f\r \u2028\u2029\ufeff",uncurryThis$1=functionUncurryThis,requireObjectCoercible$1=requireObjectCoercible$8,toString$2=toString$a,whitespaces$1=whitespaces$2,replace$1=functionUncurryThis("".replace),ltrim=RegExp("^["+whitespaces$1+"]+"),rtrim=RegExp("(^|[^"+whitespaces$1+"])["+whitespaces$1+"]+$"),createMethod=function(t){return function(e){e=toString$2(requireObjectCoercible$1(e));return 1&t&&(e=replace$1(e,ltrim,"")),e=2&t?replace$1(e,rtrim,"$1"):e}},stringTrim={start:createMethod(1),end:createMethod(2),trim:createMethod(3)},PROPER_FUNCTION_NAME=functionName.PROPER,fails$1=fails$n,whitespaces=whitespaces$2,non="
",stringTrimForced=function(e){return fails$1(function(){return!!whitespaces[e]()||non[e]()!==non||PROPER_FUNCTION_NAME&&whitespaces[e].name!==e})},$=_export,$trim=stringTrim.trim,forcedStringTrimMethod=stringTrimForced;$({target:"String",proto:!0,forced:stringTrimForced("trim")},{trim:function(){return $trim(this)}});const selectStatus=e=>{return null==(e=null==e?void 0:e[SLICE_NAME])?void 0:e.status},selectActiveStep=e=>{return null==(e=null==e?void 0:e[SLICE_NAME])?void 0:e.activeStep},selectFormValues=e=>{var t;return null==(t=null==e?void 0:e[SLICE_NAME])?void 0:t[null==(t=null==e?void 0:e[SLICE_NAME])?void 0:t.activeStep]},selectErrors=e=>{var t;return null==(t=null==(t=null==e?void 0:e[SLICE_NAME])?void 0:t.errors)?void 0:t[null==(t=null==e?void 0:e[SLICE_NAME])?void 0:t.activeStep]},selectCreateUserPayload=e=>{var{1:{email:e,firstName:t,lastName:r},2:{orgName:n,teamSize:o,country:i,industry:a}}=(null==e?void 0:e[SLICE_NAME])||{1:{},2:{}};return{userFirstName:t.trim(),userLastName:r.trim(),userEmail:e,userPhoneNumber:"",userOccupation:"",userCompany:"",organizationName:n.trim(),salesforceAttributes:JSON.stringify({teamSize:o,country:i,industry:a})}};function*createUserSaga(e){try{var t=yield select(selectCreateUserPayload);(yield call$n(createUserInHub,t))?yield put(actions.createUserSuccess()):(yield put(actions.createUserFailure()),yield put(showMessage({content:"Cannot create user at this time. Please try again later or use a different email address",severity:MessageSeverity.Error})))}catch(e){yield put(actions.createUserFailure()),yield put(showMessage({content:"Cannot create user at this time. Please try again later or use a different email address",severity:MessageSeverity.Error})),devErrorLogger(e)}}function*activateUserSaga(e){var{password:e,userId:t,token:r}=e.payload;try{(yield call$n(activateUser,e,t,r))?yield put(actions.activateUserSuccess()):(yield put(actions.activateUserFailure()),yield put(showMessage({content:"Cannot activate user at this time. Please try again later or use a different email address",severity:MessageSeverity.Error})))}catch(e){yield put(actions.activateUserFailure()),yield put(showMessage({content:"Cannot activate user at this time. Please try again later or use a different email address",severity:MessageSeverity.Error})),console.log(e)}}function*createUserWatcher(){yield takeEvery$1(actions.createUserStart.type,createUserSaga)}function*activateUserWatcher(){yield takeEvery$1(actions.activateUserStart.type,activateUserSaga)}function*rootSaga(){yield all([createUserWatcher(),activateUserWatcher()])}function getSignUpModule(){return{id:SLICE_NAME,reducerMap:{[SLICE_NAME]:signUpSlice$1},sagas:[rootSaga],initialActions:[]}}const useStyles$3=makeStyles()((e,{label:t})=>{t="Sign Up"===t;return{button:{position:"absolute",right:t?"220px":"40px",top:"30px",background:t?"#388E3C":"none",border:t?"none":"1px solid #5C6269",color:t?"white":"#5C6269",borderRadius:"4px",paddingLeft:"14px",paddingRight:"14px",fontWeight:400,"&:hover":{background:t?"#42a647":"none"}}}}),SignUpButton=({label:e="Sign Up",navigateTo:t="sign-up"})=>{const r=useNavigate();var n=useSelector(selectStatus),o=useStyles$3({label:e})["classes"];return jsxRuntime.exports.jsx(Button,Object.assign({className:o.button,onClick:()=>{r("/ui/auth/"+t)},disabled:"sign-up"!==t&&"loading"===n},{children:e}))},LoginPage=()=>{const[e,r]=react.exports.useState(1),[t,n]=react.exports.useState(""),[o,i]=react.exports.useState([]),[a,s]=react.exports.useState([]),[l,c]=react.exports.useState(""),[u,p]=react.exports.useState(""),[d,$]=react.exports.useState(""),[g,h]=react.exports.useState(!1),[m,f]=react.exports.useState(!1),[b,y]=react.exports.useState(!1),x=useNavigate();let S=!1;react.exports.useEffect(()=>{var e=new URL(window.location.href);let t=e.searchParams.get("redirect");e.hash&&(t+=e.hash),t&&n(t),S||(S=!0,__awaiter(void 0,void 0,void 0,function*(){var e=yield getGlobalProviders();i(e)}))},[]);const R=()=>__awaiter(void 0,void 0,void 0,function*(){if(u){h(!0);var e=yield userLoginMutation(l,u);if(h(!1),e&&e.ok){e=yield e.json();if(e.errors&&e.errors.length)return"not_found"===e.errors[0].name?void $("Email or Password is incorrect"):void $("Something went wrong with login. Please try again");t?window.location.href=t:window.location.href=getRestApiUrlFromConfig().replace("api","aiware")+"/switch-app/default"}else $("Something went wrong with login. Please try again")}else $("Password is required")});return jsxRuntime.exports.jsxs(PageContainer,{children:[jsxRuntime.exports.jsx(SignUpButton,{}),getConfig().showEnvironmentSelector&&jsxRuntime.exports.jsx(DestinationDropdown,{handleDestination:e=>{window.location.href=e}}),jsxRuntime.exports.jsxs("div",Object.assign({style:{display:1===e?"block":"none"}},{children:[jsxRuntime.exports.jsx(Header,{text:"Welcome back"}),jsxRuntime.exports.jsx(EmailInput,{email:l,setEmail:e=>{c(e),$("")},onNextStep:()=>{__awaiter(void 0,void 0,void 0,function*(){f(!0),y(!1);var e=yield getOrgOpenIdProviders(l),t=e.find(e=>e.required),e=e.filter(e=>!e.isGlobal);t&&y(!0),s(e),f(!1),r(2)}).catch(e=>{devErrorLogger("Error: "+JSON.stringify(e))})},isLoading:m,buttonText:"Continue"}),o&&0<o.length&&jsxRuntime.exports.jsxs(jsxRuntime.exports.Fragment,{children:[jsxRuntime.exports.jsx(OrDivider,{})," ",jsxRuntime.exports.jsx(OpenID,{openIdItems:o})]})]})),jsxRuntime.exports.jsx("div",Object.assign({style:{display:2===e?"block":"none"}},{children:b?jsxRuntime.exports.jsxs(jsxRuntime.exports.Fragment,{children:[jsxRuntime.exports.jsx(Header,{text:"Choose Authentication Option for",subText:l})," ",a&&0<a.length&&jsxRuntime.exports.jsx(OpenID,{openIdItems:a}),jsxRuntime.exports.jsx(Box,Object.assign({sx:{mt:"20px"}},{children:jsxRuntime.exports.jsx(BlueLinkText,{onClick:()=>r(1),text:"Back to Login",type:"login"})}))]}):jsxRuntime.exports.jsxs(jsxRuntime.exports.Fragment,{children:[jsxRuntime.exports.jsx(Header,{text:"Enter Password for",subText:l})," ",jsxRuntime.exports.jsx(PasswordInput,{password:u,errorMessage:d,onPasswordChange:e=>{d&&$(""),p(e)},onPressEnter:()=>{R().catch(e=>{devErrorLogger("Error: "+JSON.stringify(e))})}}),jsxRuntime.exports.jsx(Box,Object.assign({sx:{mt:"14px"}},{children:jsxRuntime.exports.jsx(BlueLinkText,{onClick:()=>{x("/ui/auth/forgot",{state:{emailFromLogin:l}})},text:"Forgot Password?",type:"forgot"})})),jsxRuntime.exports.jsx(Box,Object.assign({sx:{mt:"25px"}},{children:jsxRuntime.exports.jsx(BlueButton,{onClick:()=>{R().catch(e=>{devErrorLogger("Error: "+JSON.stringify(e))})},text:"Login",type:"login",loading:g})})),a&&0<a.length&&jsxRuntime.exports.jsxs(jsxRuntime.exports.Fragment,{children:[jsxRuntime.exports.jsx(OrDivider,{})," ",jsxRuntime.exports.jsx(OpenID,{openIdItems:a})]}),jsxRuntime.exports.jsx(Box,Object.assign({sx:{mt:"20px"}},{children:jsxRuntime.exports.jsx(BlueLinkText,{onClick:()=>r(1),text:"Back to Login",type:"login"})}))]})}))]})},Forgot=()=>{const[r,e]=react.exports.useState(""),[t,n]=react.exports.useState(!1),[o,i]=react.exports.useState(1),a=useNavigate(),s=useLocation()["state"],l=(react.exports.useEffect(()=>{s&&s.emailFromLogin&&e(s.emailFromLogin)},[s]),()=>__awaiter(void 0,void 0,void 0,function*(){n(!0);try{var e=yield createPasswordResetRequestMutation(r),t=yield null==e?void 0:e.json();t.errors&&t.errors.length?(alert("Something went wrong. Please try again."),n(!1)):(n(!1),i(2))}catch(e){alert("Something went wrong. Please try again."),n(!1)}}));return jsxRuntime.exports.jsxs(PageContainer,{children:[1===o?jsxRuntime.exports.jsxs(jsxRuntime.exports.Fragment,{children:[jsxRuntime.exports.jsx(Header,{text:"Forgot Password",subText:"Enter your registered email to reset your password."}),jsxRuntime.exports.jsx(EmailInput,{email:r,setEmail:e,onNextStep:()=>{l().catch(e=>{devErrorLogger("Error: "+JSON.stringify(e))})},isLoading:t,buttonText:"Send"})]}):jsxRuntime.exports.jsxs(jsxRuntime.exports.Fragment,{children:[jsxRuntime.exports.jsx(Header,{text:"Password reset requested",subText:"Your password reset will be sent to the email provided if it matches our records."}),jsxRuntime.exports.jsx(Box,Object.assign({sx:{mt:"25px"}},{children:jsxRuntime.exports.jsx(BlueButton,{onClick:()=>{l().catch(e=>{devErrorLogger("Error: "+JSON.stringify(e))})},text:"Request Password Again",type:"reset-pw",loading:t})}))]}),jsxRuntime.exports.jsx(Box,Object.assign({sx:{mt:"20px"}},{children:jsxRuntime.exports.jsx(BlueLinkText,{onClick:()=>a("/ui/auth/login"),text:"Back to Login",type:"login"})}))]})},RestrictedProvider=()=>{const e=useNavigate();return jsxRuntime.exports.jsxs(PageContainer,{children:[jsxRuntime.exports.jsx(Header,{text:"Authentication Restriction",subText:"Authenticating with this OpenID provider has been restricted by an admin of your account. We are sorry for the inconvenience. Please return to the login screen and choose another authentication provider.",type:"restricted-provider"}),jsxRuntime.exports.jsx(BlueButton,{onClick:()=>e("/ui/auth/login"),text:"Back to Login",type:"back-to-login",loading:!1})]})};var sameValue$1=Object.is||function(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t},call=functionCall,fixRegExpWellKnownSymbolLogic=fixRegexpWellKnownSymbolLogic,anObject=anObject$i,isNullOrUndefined=isNullOrUndefined$7,requireObjectCoercible=requireObjectCoercible$8,sameValue=sameValue$1,toString$1=toString$a,getMethod=getMethod$6,regExpExec=regexpExecAbstract;fixRegexpWellKnownSymbolLogic("search",function(n,o,i){return[function(e){var t=requireObjectCoercible(this),r=isNullOrUndefined(e)?void 0:getMethod(e,n);return r?call(r,e,t):new RegExp(e)[n](toString$1(t))},function(e){var t=anObject(this),e=toString$1(e),r=i(o,t,e);return r.done?r.value:(r=t.lastIndex,sameValue(r,0)||(t.lastIndex=0),e=regExpExec(t,e),sameValue(t.lastIndex,r)||(t.lastIndex=r),null===e?-1:e.index)}]});const AccountLinking=()=>{const[e,t]=react.exports.useState(1),[r,n]=react.exports.useState(""),[o,i]=react.exports.useState(""),a=useNavigate(),[s,l]=react.exports.useState(!1),[c,u]=react.exports.useState(""),[p,d]=react.exports.useState(""),$=(react.exports.useEffect(()=>{var e=new URLSearchParams(window.location.search).get("session");e&&u(e)},[]),react.exports.useEffect(()=>{d("")},[r,o]),()=>__awaiter(void 0,void 0,void 0,function*(){if(!s){l(!0);try{var e=yield linkUserToOidAndLogin(r,o,c);200===e.status?window.location.href=getRestApiUrlFromConfig().replace("api","aiware")+"/switch-app/default":404===e.status?d("Email or Password is incorrect."):d("Something went wrong. Please try again.")}catch(e){d("Something went wrong. Please try again.")}finally{l(!1)}}}));return jsxRuntime.exports.jsx(PageContainer,{children:1===e?jsxRuntime.exports.jsxs(jsxRuntime.exports.Fragment,{children:[jsxRuntime.exports.jsx(Header,{text:"Account Does Not Exist",subText:"This AiWARE account does not exist. Are you sure you’re using the correct Authentication Provider?",type:"link-oid"}),jsxRuntime.exports.jsx(BlueButton,{onClick:()=>t(2),text:"Link to Existing Account",type:"oid-linking",loading:!1}),jsxRuntime.exports.jsx(Box,Object.assign({sx:{mt:"14px"}},{children:jsxRuntime.exports.jsx(BlueLinkText,{onClick:()=>a("/ui/auth/login"),text:"Back to Login",type:"login"})}))]}):jsxRuntime.exports.jsxs(jsxRuntime.exports.Fragment,{children:[jsxRuntime.exports.jsx(Header,{text:"Link Account",subText:"Provide the email and password to your aiWARE account."}),jsxRuntime.exports.jsx(EmailInput,{email:r,setEmail:n}),jsxRuntime.exports.jsx(Box,Object.assign({sx:{mt:"20px"}},{children:jsxRuntime.exports.jsx(PasswordInput,{password:o,onPasswordChange:i,onPressEnter:()=>{$().catch(e=>{devErrorLogger("Error: "+JSON.stringify(e))})},errorMessage:p,autoFocus:!1})})),jsxRuntime.exports.jsx(Box,Object.assign({sx:{mt:"14px"}},{children:jsxRuntime.exports.jsx(BlueLinkText,{onClick:()=>a("/ui/auth/forgot"),text:"Forgot Password?",type:"forgot"})})),jsxRuntime.exports.jsx(Box,Object.assign({sx:{mt:"25px"}},{children:jsxRuntime.exports.jsx(BlueButton,{onClick:()=>{$().catch(e=>{devErrorLogger("Error: "+JSON.stringify(e))})},text:"Link Account & Login",type:"link-oid",loading:s})})),jsxRuntime.exports.jsx(Box,Object.assign({sx:{mt:"20px"}},{children:jsxRuntime.exports.jsx(BlueLinkText,{onClick:()=>a("/ui/auth/login"),text:"Back to Login",type:"login"})}))]})})},ResetPasswordPage=()=>{const e=useNavigate();var t=new URLSearchParams(window.location.search),r=t.get("username")||"",n=t.get("resettoken")||"",o=t.get("organizationinviteid")||"";const i=t.get("redirect");t=parseToken(n),t=!!t&&t.enablePasswordRestriction;return jsxRuntime.exports.jsx(PageContainer,{children:jsxRuntime.exports.jsx(Box,Object.assign({sx:{width:"368px"}},{children:jsxRuntime.exports.jsx(ResetPasswordWidget,{resetToken:n,username:r,organizationInviteId:o,onSuccess:()=>{i?window.location.href=i:e("/ui/auth/login")},requiresPasswordRestriction:t,isNewPage:!0,containerWidth:"100%"})}))})},useStyles$2=makeStyles()(()=>({button:{position:"absolute",left:"40px",top:"30px",border:"none",color:"#5C6269",borderRadius:"4px",paddingLeft:"14px",paddingRight:"14px",fontWeight:400},select:{height:"52px",width:"100%",marginTop:"20px",textAlign:"left"},menu:{"& > .Sdk-MuiPopover-paper":{padding:"0"},"& > .Sdk-MuiPaper-root > ul":{padding:"5px"}},stepOneFullWidthInput:{height:"52px",width:"100%"},stepOneHalfWidthInputContainer:{display:"flex",justifyContent:"space-between",width:"100%",marginTop:"20px"},stepOneHalfWidthInput:{height:"52px",width:"calc(50% - 10px)"},stepTwoContainer:{width:"542px",textAlign:"center",maxWidth:"85vw"},stepTwoTextField:{height:"52px",width:"100%"},menuItem:{width:"100%"},autoCompleteContainer:{width:"100%",display:"flex",justifyContent:"center"},autoComplete:{width:"100%",marginTop:"20px",height:"52px"},formInputTopMargin:{marginTop:"20px"},formInputTopDoubleMargin:{marginTop:"40px"},previewBox:{width:"164px",height:"164px",borderRadius:"5px",border:"2px dashed #D5DFE9",padding:"10px",boxSizing:"border-box",cursor:"pointer"},logoLanding:{width:"140px",height:"140px",background:"rgba(247, 247, 247, 0.80)",display:"flex",alignItems:"center",justifyContent:"center"},addIcon:{fill:"#555F7C"},logoDescriptionText:{textAlign:"left"},logoUploadBtn:{borderRadius:"4px",border:"1px solid #5C6269",color:"#5C6269",fontWeight:"400",padding:"8px 15px"},orgLogoPreview:{width:"164px",height:"164px"},errorMessage:{color:"red"},confirmationText:{fontSize:"22px",color:"#2A323C",lineHeight:"28px"}}));var countries=[{label:"Afghanistan",id:"AF"},{label:"Åland Islands",id:"AX"},{label:"Albania",id:"AL"},{label:"Algeria",id:"DZ"},{label:"American Samoa",id:"AS"},{label:"Andorra",id:"AD"},{label:"Angola",id:"AO"},{label:"Anguilla",id:"AI"},{label:"Antarctica",id:"AQ"},{label:"Antigua and Barbuda",id:"AG"},{label:"Argentina",id:"AR"},{label:"Armenia",id:"AM"},{label:"Aruba",id:"AW"},{label:"Australia",id:"AU"},{label:"Austria",id:"AT"},{label:"Azerbaijan",id:"AZ"},{label:"Bahamas",id:"BS"},{label:"Bahrain",id:"BH"},{label:"Bangladesh",id:"BD"},{label:"Barbados",id:"BB"},{label:"Belarus",id:"BY"},{label:"Belgium",id:"BE"},{label:"Belize",id:"BZ"},{label:"Benin",id:"BJ"},{label:"Bermuda",id:"BM"},{label:"Bhutan",id:"BT"},{label:"Bolivia",id:"BO"},{label:"Bosnia and Herzegovina",id:"BA"},{label:"Botswana",id:"BW"},{label:"Bouvet Island",id:"BV"},{label:"Brazil",id:"BR"},{label:"British Indian Ocean Territory",id:"IO"},{label:"Brunei Darussalam",id:"BN"},{label:"Bulgaria",id:"BG"},{label:"Burkina Faso",id:"BF"},{label:"Burundi",id:"BI"},{label:"Cambodia",id:"KH"},{label:"Cameroon",id:"CM"},{label:"Canada",id:"CA"},{label:"Cape Verde",id:"CV"},{label:"Cayman Islands",id:"KY"},{label:"Central African Republic",id:"CF"},{label:"Chad",id:"TD"},{label:"Chile",id:"CL"},{label:"China",id:"CN"},{label:"Christmas Island",id:"CX"},{label:"Cocos (Keeling) Islands",id:"CC"},{label:"Colombia",id:"CO"},{label:"Comoros",id:"KM"},{label:"Congo",id:"CG"},{label:"Congo, The Democratic Republic of the",id:"CD"},{label:"Cook Islands",id:"CK"},{label:"Costa Rica",id:"CR"},{label:"Cote D'Ivoire",id:"CI"},{label:"Croatia",id:"HR"},{label:"Cuba",id:"CU"},{label:"Cyprus",id:"CY"},{label:"Czech Republic",id:"CZ"},{label:"Denmark",id:"DK"},{label:"Djibouti",id:"DJ"},{label:"Dominica",id:"DM"},{label:"Dominican Republic",id:"DO"},{label:"Ecuador",id:"EC"},{label:"Egypt",id:"EG"},{label:"El Salvador",id:"SV"},{label:"Equatorial Guinea",id:"GQ"},{label:"Eritrea",id:"ER"},{label:"Estonia",id:"EE"},{label:"Ethiopia",id:"ET"},{label:"Falkland Islands (Malvinas)",id:"FK"},{label:"Faroe Islands",id:"FO"},{label:"Fiji",id:"FJ"},{label:"Finland",id:"FI"},{label:"France",id:"FR"},{label:"French Guiana",id:"GF"},{label:"French Polynesia",id:"PF"},{label:"French Southern Territories",id:"TF"},{label:"Gabon",id:"GA"},{label:"Gambia",id:"GM"},{label:"Georgia",id:"GE"},{label:"Germany",id:"DE"},{label:"Ghana",id:"GH"},{label:"Gibraltar",id:"GI"},{label:"Greece",id:"GR"},{label:"Greenland",id:"GL"},{label:"Grenada",id:"GD"},{label:"Guadeloupe",id:"GP"},{label:"Guam",id:"GU"},{label:"Guatemala",id:"GT"},{label:"Guernsey",id:"GG"},{label:"Guinea",id:"GN"},{label:"Guinea-Bissau",id:"GW"},{label:"Guyana",id:"GY"},{label:"Haiti",id:"HT"},{label:"Heard Island and Mcdonald Islands",id:"HM"},{label:"Holy See (Vatican City State)",id:"VA"},{label:"Honduras",id:"HN"},{label:"Hong Kong",id:"HK"},{label:"Hungary",id:"HU"},{label:"Iceland",id:"IS"},{label:"India",id:"IN"},{label:"Indonesia",id:"ID"},{label:"Iran, Islamic Republic Of",id:"IR"},{label:"Iraq",id:"IQ"},{label:"Ireland",id:"IE"},{label:"Isle of Man",id:"IM"},{label:"Israel",id:"IL"},{label:"Italy",id:"IT"},{label:"Jamaica",id:"JM"},{label:"Japan",id:"JP"},{label:"Jersey",id:"JE"},{label:"Jordan",id:"JO"},{label:"Kazakhstan",id:"KZ"},{label:"Kenya",id:"KE"},{label:"Kiribati",id:"KI"},{label:"Korea, Democratic People'S Republic of",id:"KP"},{label:"Korea, Republic of",id:"KR"},{label:"Kuwait",id:"KW"},{label:"Kyrgyzstan",id:"KG"},{label:"Lao People'S Democratic Republic",id:"LA"},{label:"Latvia",id:"LV"},{label:"Lebanon",id:"LB"},{label:"Lesotho",id:"LS"},{label:"Liberia",id:"LR"},{label:"Libyan Arab Jamahiriya",id:"LY"},{label:"Liechtenstein",id:"LI"},{label:"Lithuania",id:"LT"},{label:"Luxembourg",id:"LU"},{label:"Macao",id:"MO"},{label:"Macedonia, The Former Yugoslav Republic of",id:"MK"},{label:"Madagascar",id:"MG"},{label:"Malawi",id:"MW"},{label:"Malaysia",id:"MY"},{label:"Maldives",id:"MV"},{label:"Mali",id:"ML"},{label:"Malta",id:"MT"},{label:"Marshall Islands",id:"MH"},{label:"Martinique",id:"MQ"},{label:"Mauritania",id:"MR"},{label:"Mauritius",id:"MU"},{label:"Mayotte",id:"YT"},{label:"Mexico",id:"MX"},{label:"Micronesia, Federated States of",id:"FM"},{label:"Moldova, Republic of",id:"MD"},{label:"Monaco",id:"MC"},{label:"Mongolia",id:"MN"},{label:"Montserrat",id:"MS"},{label:"Morocco",id:"MA"},{label:"Mozambique",id:"MZ"},{label:"Myanmar",id:"MM"},{label:"Namibia",id:"NA"},{label:"Nauru",id:"NR"},{label:"Nepal",id:"NP"},{label:"Netherlands",id:"NL"},{label:"Netherlands Antilles",id:"AN"},{label:"New Caledonia",id:"NC"},{label:"New Zealand",id:"NZ"},{label:"Nicaragua",id:"NI"},{label:"Niger",id:"NE"},{label:"Nigeria",id:"NG"},{label:"Niue",id:"NU"},{label:"Norfolk Island",id:"NF"},{label:"Northern Mariana Islands",id:"MP"},{label:"Norway",id:"NO"},{label:"Oman",id:"OM"},{label:"Pakistan",id:"PK"},{label:"Palau",id:"PW"},{label:"Palestinian Territory, Occupied",id:"PS"},{label:"Panama",id:"PA"},{label:"Papua New Guinea",id:"PG"},{label:"Paraguay",id:"PY"},{label:"Peru",id:"PE"},{label:"Philippines",id:"PH"},{label:"Pitcairn",id:"PN"},{label:"Poland",id:"PL"},{label:"Portugal",id:"PT"},{label:"Puerto Rico",id:"PR"},{label:"Qatar",id:"QA"},{label:"Reunion",id:"RE"},{label:"Romania",id:"RO"},{label:"Russian Federation",id:"RU"},{label:"RWANDA",id:"RW"},{label:"Saint Helena",id:"SH"},{label:"Saint Kitts and Nevis",id:"KN"},{label:"Saint Lucia",id:"LC"},{label:"Saint Pierre and Miquelon",id:"PM"},{label:"Saint Vincent and the Grenadines",id:"VC"},{label:"Samoa",id:"WS"},{label:"San Marino",id:"SM"},{label:"Sao Tome and Principe",id:"ST"},{label:"Saudi Arabia",id:"SA"},{label:"Senegal",id:"SN"},{label:"Serbia and Montenegro",id:"CS"},{label:"Seychelles",id:"SC"},{label:"Sierra Leone",id:"SL"},{label:"Singapore",id:"SG"},{label:"Slovakia",id:"SK"},{label:"Slovenia",id:"SI"},{label:"Solomon Islands",id:"SB"},{label:"Somalia",id:"SO"},{label:"South Africa",id:"ZA"},{label:"South Georgia and the South Sandwich Islands",id:"GS"},{label:"Spain",id:"ES"},{label:"Sri Lanka",id:"LK"},{label:"Sudan",id:"SD"},{label:"Surilabel",id:"SR"},{label:"Svalbard and Jan Mayen",id:"SJ"},{label:"Swaziland",id:"SZ"},{label:"Sweden",id:"SE"},{label:"Switzerland",id:"CH"},{label:"Syrian Arab Republic",id:"SY"},{label:"Taiwan, Province of China",id:"TW"},{label:"Tajikistan",id:"TJ"},{label:"Tanzania, United Republic of",id:"TZ"},{label:"Thailand",id:"TH"},{label:"Timor-Leste",id:"TL"},{label:"Togo",id:"TG"},{label:"Tokelau",id:"TK"},{label:"Tonga",id:"TO"},{label:"Trinidad and Tobago",id:"TT"},{label:"Tunisia",id:"TN"},{label:"Turkey",id:"TR"},{label:"Turkmenistan",id:"TM"},{label:"Turks and Caicos Islands",id:"TC"},{label:"Tuvalu",id:"TV"},{label:"Uganda",id:"UG"},{label:"Ukraine",id:"UA"},{label:"United Arab Emirates",id:"AE"},{label:"United Kingdom",id:"GB"},{label:"United States",id:"US"},{label:"United States Minor Outlying Islands",id:"UM"},{label:"Uruguay",id:"UY"},{label:"Uzbekistan",id:"UZ"},{label:"Vanuatu",id:"VU"},{label:"Venezuela",id:"VE"},{label:"Viet Nam",id:"VN"},{label:"Virgin Islands, British",id:"VG"},{label:"Virgin Islands, U.S.",id:"VI"},{label:"Wallis and Futuna",id:"WF"},{label:"Western Sahara",id:"EH"},{label:"Yemen",id:"YE"},{label:"Zambia",id:"ZM"},{label:"Zimbabwe",id:"ZW"}],industries=["Accounting","Airlines/Aviation","Alternative Dispute Resolution","Alternative Medicine","Animation","Apparel & Fashion","Architecture & Planning","Arts & Crafts","Automotive","Aviation & Aerospace","Banking","Biotechnology","Broadcast Media","Building Materials","Business Supplies & Equipment","Capital Markets","Chemicals","Civic & Social Organization","Civil Engineering","Commercial Real Estate","Computer & Network Security","Computer Games","Computer Hardware","Computer Networking","Computer Software","Construction","Consumer Electronics","Consumer Goods","Consumer Services","Cosmetics","Dairy","Defense & Space","Design","Education Management","E-learning","Electrical & Electronic Manufacturing","Entertainment","Environmental Services","Events Services","Executive Office","Facilities Services","Farming","Financial Services","Fine Art","Fishery","Food & Beverages","Food Production","Fundraising","Furniture","Gambling & Casinos","Glass, Ceramics & Concrete","Government Administration","Government Relations","Graphic Design","Health, Wellness & Fitness","Higher Education","Hospital & Health Care","Hospitality","Human Resources","Import & Export","Individual & Family Services","Industrial Automation","Information Services","Information Technology & Services","Insurance","International Affairs","International Trade & Development","Internet","Investment Banking/Venture","Investment Management","Judiciary","Law Enforcement","Law Practice","Legal Services","Legislative Office","Leisure & Travel","Libraries","Logistics & Supply Chain","Luxury Goods & Jewelry","Machinery","Management Consulting","Maritime","Marketing & Advertising","Market Research","Mechanical or Industrial Engineering","Media Production","Medical Device","Medical Practice","Mental Health Care","Military","Mining & Metals","Motion Pictures & Film","Museums & Institutions","Music","Nanotechnology","Newspapers","Nonprofit Organization Management","Oil & Energy","Online Publishing","Outsourcing/Offshoring","Package/Freight Delivery","Packaging & Containers","Paper & Forest Products","Performing Arts","Pharmaceuticals","Philanthropy","Photography","Plastics","Political Organization","Primary/Secondary","Printing","Professional Training","Program Development","Public Policy","Public Relations","Public Safety","Publishing","Railroad Manufacture","Ranching","Real Estate","Recreational","Facilities & Services","Religious Institutions","Renewables & Environment","Research","Restaurants","Retail","Security & Investigations","Semiconductors","Shipbuilding","Sporting Goods","Sports","Staffing & Recruiting","Supermarkets","Telecommunications","Textiles","Think Tanks","Tobacco","Translation & Localization","Transportation/Trucking/Railroad","Utilities","Venture Capital","Veterinary","Warehousing","Wholesale","Wine & Spirits","Wireless","Writing & Editing"];const teamSizeOptions=["1-10","10-50","50-100","100-500","500-1000","> 1000"],industryOptions=industries.map(e=>({id:e,label:e})),SignUpStep_2=()=>{var e=react.exports.useRef();const r=useDispatch(),t=useSelector(selectFormValues),n=useSelector(selectErrors),o=useSelector(selectStatus),i=!!Object.keys(n).find(e=>n[e])||!!Object.keys(n).find(e=>!t[e])||"loading"===o,a=useStyles$2()["classes"],s=useNavigate(),l=()=>{r(actions.createUserStart())},c=e=>{"Enter"===e.key&&(r(actions.validate()),i||l())};return jsxRuntime.exports.jsxs(Box,Object.assign({className:a.stepTwoContainer},{children:[jsxRuntime.exports.jsx(Header,{text:"success"!==o?"Let's set up your Organization":"",type:"info"}),"success"!==o?jsxRuntime.exports.jsxs(jsxRuntime.exports.Fragment,{children:[jsxRuntime.exports.jsx(TextField,{id:"orgName","data-testid":"os-auth-orgName-input-field",label:"Organization Name",variant:"outlined",value:"orgName"in t&&(null===t||void 0===t?void 0:t.orgName),autoComplete:"organization",autoFocus:!0,className:a.stepTwoTextField,error:"orgName"in n&&n.orgName,onChange:e=>r(actions.setValue({key:"orgName",value:e.target.value})),onKeyDown:c,disabled:"loading"===o}),jsxRuntime.exports.jsxs(FormControl,Object.assign({sx:{width:"100%"}},{children:[jsxRuntime.exports.jsx(InputLabel,Object.assign({id:"os-auth.sign-up.teamSize",className:a.formInputTopMargin},{children:"Team Size"})),jsxRuntime.exports.jsx(Select,Object.assign({labelId:"os-auth.sign-up.teamSize",id:"os-auth.sign-up.teamSize","data-testid":"os-auth-team-size-input-field",value:"teamSize"in t&&(null===t||void 0===t?void 0:t.teamSize),className:a.select,MenuProps:{className:a.menu},label:"Team Size",onChange:e=>r(actions.setValue({key:"teamSize",value:e.target.value||""})),disabled:"loading"===o},{children:teamSizeOptions.map(e=>jsxRuntime.exports.jsx(MenuItem,Object.assign({value:e,className:a.menuItem},{children:e})))}))]})),jsxRuntime.exports.jsx(Box,Object.assign({className:a.autoCompleteContainer},{children:jsxRuntime.exports.jsx(Autocomplete,{disablePortal:!0,id:"os-auth.sign-up.country-autocomplete","data-testid":"os-auth.sign-up.country-autocomplete",options:countries,value:"country"in t&&countries.find(e=>e.id===t.country),onChange:(e,t)=>r(actions.setValue({key:"country",value:(t||{}).id||""})),className:a.autoComplete,autoComplete:!0,renderInput:e=>jsxRuntime.exports.jsx(TextField,Object.assign({},e,{label:"Country",autoComplete:"country",onKeyDown:c,disabled:"loading"===o}))})})),jsxRuntime.exports.jsx(Box,Object.assign({className:a.autoCompleteContainer},{children:jsxRuntime.exports.jsx(Autocomplete,{disablePortal:!0,id:"os-auth.sign-up.industry-autocomplete","data-testid":"os-auth.sign-up.industry-autocomplete",options:industryOptions,value:"industry"in t&&industryOptions.find(e=>e.id===t.industry),onChange:(e,t)=>r(actions.setValue({key:"industry",value:(t||{}).id||""})),className:a.autoComplete,renderInput:e=>jsxRuntime.exports.jsx(TextField,Object.assign({},e,{label:"Industry",onKeyDown:c,disabled:"loading"===o}))})})),jsxRuntime.exports.jsx(BlueButton,{onClick:l,text:"Create Account",type:"create-account",disableButton:i,className:a.formInputTopDoubleMargin,ref:null!=e&&e.current?e:void 0,loading:"loading"===o})]}):jsxRuntime.exports.jsxs(Box,{children:[jsxRuntime.exports.jsx(Typography,Object.assign({"data-testid":"os-auth.sign-up.success-message",variant:"body1",className:a.confirmationText},{children:"Thank you for registering! A confirmation email has been sent with an activation link for your new aiWARE account."})),jsxRuntime.exports.jsx(BlueButton,{onClick:()=>s("/ui/auth/login"),text:"Return To Homepage",className:a.formInputTopDoubleMargin,type:"return"})]})]}))},SignUpStep_1=()=>{var e=react.exports.useRef();const t=useDispatch(),r=useSelector(selectFormValues);var n=useSelector(selectErrors);const o=!!Object.entries(n).find(([,e])=>e)||!!Object.keys(n).find(e=>!r[e])||!validateEmail$1("email"in r&&(null===r||void 0===r?void 0:r.email)||"");var i=useStyles$2()["classes"],a=e=>{"Enter"===e.key&&(t(actions.validate()),o||s())};const s=()=>{t(actions.setStep(2))};return jsxRuntime.exports.jsxs("div",Object.assign({style:{maxWidth:"85vw"}},{children:[jsxRuntime.exports.jsx(Header,{text:"Sign Up for your aiWARE account",type:"sign-up"}),jsxRuntime.exports.jsx(TextField,{id:"email","data-testid":"os-auth-email-input-field",label:"email"in n&&n.email?"Please provide a valid email":"Email",InputProps:{type:"email"},variant:"outlined",value:"email"in r&&(null===r||void 0===r?void 0:r.email),autoComplete:"email",autoFocus:!0,className:i.stepOneFullWidthInput,error:"email"in n&&n.email,onChange:e=>t(actions.setValue({key:"email",value:e.target.value.trim()})),onKeyDown:a}),jsxRuntime.exports.jsxs(Box,Object.assign({className:i.stepOneHalfWidthInputContainer},{children:[jsxRuntime.exports.jsx(TextField,{id:"firstName","data-testid":"os-auth-firstName-input-field",label:"First Name",variant:"outlined",value:"firstName"in r&&(null===r||void 0===r?void 0:r.firstName),autoComplete:"given-name",className:i.stepOneHalfWidthInput,error:"firstName"in n&&n.firstName,onChange:e=>t(actions.setValue({key:"firstName",value:e.target.value})),onKeyDown:a}),jsxRuntime.exports.jsx(TextField,{id:"lastName","data-testid":"os-auth-lastName-input-field",label:"Last Name",variant:"outlined",value:"lastName"in r&&(null===r||void 0===r?void 0:r.lastName),autoComplete:"family-name",className:i.stepOneHalfWidthInput,error:"lastName"in n&&n.lastName,onChange:e=>t(actions.setValue({key:"lastName",value:e.target.value})),onKeyDown:a})]})),jsxRuntime.exports.jsx(BlueButton,{onClick:s,text:"Continue",type:"Continue",disableButton:o,className:i.formInputTopMargin,ref:null!=e&&e.current?e:void 0})]}))},SignUp=()=>{var e=useSelector(selectActiveStep);const t=useDispatch();var r=useStyles$2()["classes"],n=useSelector(selectStatus);return react.exports.useEffect(()=>{t(actions.resetState()),envChecker("local")||envChecker("dev")||window.location.href.includes("localhost")?t(actions.setEnv("dev")):envChecker("stage")?t(actions.setEnv("stage")):t(actions.setEnv("prod"))},[]),jsxRuntime.exports.jsx(DynamicModuleLoader,Object.assign({modules:[getSignUpModule()]},{children:jsxRuntime.exports.jsxs(PageContainer,Object.assign({showLogoInFooter:!1},{children:[jsxRuntime.exports.jsx(SignUpButton,{label:"Login",navigateTo:"login"}),2===e&&"success"!==n&&jsxRuntime.exports.jsxs(Button,Object.assign({className:r.button,onClick:()=>t(actions.setStep(1)),disabled:"loading"===n},{children:[jsxRuntime.exports.jsx(default_1,{fontSize:"small",sx:{marginRight:"5px"}})," Back"]})),jsxRuntime.exports.jsx("div",{children:1===e?jsxRuntime.exports.jsx(SignUpStep_1,{}):jsxRuntime.exports.jsx(SignUpStep_2,{})})]}))}))},useStyles$1=makeStyles()((e,{error:t,passwordRequirementsMet:r})=>{let n="auto";return t?n="red":r||(n="rgba(0, 0, 0, 0.26)"),{passwordLabel:{background:"white",padding:"0 3px"},passwordFormMarginTop:{marginTop:"20px"},passwordInput:{width:"368px",maxWidth:"85vw"},confirmPasswordLabel:{color:n,"&.Mui-focused":{color:n}}}}),usePasswordRequirementStyles=makeStyles()(()=>({container:{width:"368px",maxWidth:"85vw",display:"flex",alignItems:"center",justifyContent:"center"},barContainer:{display:"flex",width:"100%",justifyContent:"space-between",padding:"15px 0px"},bar:{width:"23%",height:"4px",borderRadius:"20px"},metRequirement:{color:"#9CA8B4",textDecorationLine:"line-through"},unmetRequirement:{color:"#5C6269"},requirement:{display:"flex",alignItems:"center"},bullet:{transform:"translateY(8px)",marginLeft:"5px"},checkMark:{fill:"#0E6EEC",marginRight:"8px",marginLeft:"-3px"}}));var isCallable=isCallable$p,isObject=isObject$b,setPrototypeOf=objectSetPrototypeOf,inheritIfRequired$1=function(e,t,r){return setPrototypeOf&&isCallable(t=t.constructor)&&t!==r&&isObject(t=t.prototype)&&t!==r.prototype&&setPrototypeOf(e,t),e},defineProperty=objectDefineProperty.f,proxyAccessor$1=function(e,t,r){r in e||defineProperty(e,r,{configurable:!0,get:function(){return t[r]},set:function(e){t[r]=e}})},DESCRIPTORS=descriptors,global$1=global$n,uncurryThis=functionUncurryThis,isForced=isForced_1,inheritIfRequired=inheritIfRequired$1,createNonEnumerableProperty=createNonEnumerableProperty$6,getOwnPropertyNames=objectGetOwnPropertyNames.f,isPrototypeOf=objectIsPrototypeOf,isRegExp=isRegexp,toString=toString$a,getRegExpFlags=regexpGetFlags,stickyHelpers=regexpStickyHelpers,proxyAccessor=proxyAccessor$1,defineBuiltIn=defineBuiltIn$b,fails=fails$n,hasOwn=hasOwnProperty_1,enforceInternalState=internalState.enforce,setSpecies=setSpecies$2,wellKnownSymbol=wellKnownSymbol$l,UNSUPPORTED_DOT_ALL=regexpUnsupportedDotAll,UNSUPPORTED_NCG=regexpUnsupportedNcg,MATCH=wellKnownSymbol$l("match"),NativeRegExp=global$1.RegExp,RegExpPrototype=NativeRegExp.prototype,SyntaxError=global$1.SyntaxError,exec=uncurryThis(RegExpPrototype.exec),charAt=uncurryThis("".charAt),replace=uncurryThis("".replace),stringIndexOf=uncurryThis("".indexOf),stringSlice=uncurryThis("".slice),IS_NCG=/^\?<[^\s\d!#%&*+<=>@^][^\s!#%&*+<=>@^]*>/,re1=/a/g,re2=/a/g,CORRECT_NEW=new NativeRegExp(re1)!==re1,MISSED_STICKY=stickyHelpers.MISSED_STICKY,UNSUPPORTED_Y=stickyHelpers.UNSUPPORTED_Y,BASE_FORCED=DESCRIPTORS&&(!CORRECT_NEW||MISSED_STICKY||UNSUPPORTED_DOT_ALL||UNSUPPORTED_NCG||fails(function(){return re2[MATCH]=!1,NativeRegExp(re1)!=re1||NativeRegExp(re2)==re2||"/a/i"!=NativeRegExp(re1,"i")})),handleDotAll=function(e){for(var t,r=e.length,n=0,o="",i=!1;n<=r;n++)"\\"===(t=charAt(e,n))?o+=t+charAt(e,++n):i||"."!==t?("["===t?i=!0:"]"===t&&(i=!1),o+=t):o+="[\\s\\S]";return o},handleNCG=function(e){for(var t,r=e.length,n=0,o="",i=[],a={},s=!1,l=!1,c=0,u="";n<=r;n++){if("\\"===(t=charAt(e,n)))t+=charAt(e,++n);else if("]"===t)s=!1;else if(!s)switch(!0){case"["===t:s=!0;break;case"("===t:exec(IS_NCG,stringSlice(e,n+1))&&(n+=2,l=!0),o+=t,c++;continue;case">"===t&&l:if(""===u||hasOwn(a,u))throw new SyntaxError("Invalid capture group name");a[u]=!0,l=!(i[i.length]=[u,c]),u="";continue}l?u+=t:o+=t}return[o,i]};if(isForced("RegExp",BASE_FORCED)){for(var RegExpWrapper=function(e,t){var r,n,o=isPrototypeOf(RegExpPrototype,this),i=isRegExp(e),a=void 0===t,s=[],l=e;if(!o&&i&&a&&e.constructor===RegExpWrapper)return e;if((i||isPrototypeOf(RegExpPrototype,e))&&(e=e.source,a)&&(t=getRegExpFlags(l)),e=void 0===e?"":toString(e),t=void 0===t?"":toString(t),l=e,i=t=UNSUPPORTED_DOT_ALL&&"dotAll"in re1&&(r=!!t&&-1<stringIndexOf(t,"s"))?replace(t,/s/g,""):t,MISSED_STICKY&&"sticky"in re1&&(n=!!t&&-1<stringIndexOf(t,"y"))&&UNSUPPORTED_Y&&(t=replace(t,/y/g,"")),UNSUPPORTED_NCG&&(e=(a=handleNCG(e))[0],s=a[1]),a=inheritIfRequired(NativeRegExp(e,t),o?this:RegExpPrototype,RegExpWrapper),(r||n||s.length)&&(t=enforceInternalState(a),r&&(t.dotAll=!0,t.raw=RegExpWrapper(handleDotAll(e),i)),n&&(t.sticky=!0),s.length)&&(t.groups=s),e!==l)try{createNonEnumerableProperty(a,"source",""===l?"(?:)":l)}catch(e){}return a},keys=getOwnPropertyNames(NativeRegExp),index=0;keys.length>index;)proxyAccessor(RegExpWrapper,NativeRegExp,keys[index++]);(RegExpPrototype.constructor=RegExpWrapper).prototype=RegExpPrototype,defineBuiltIn(global$1,"RegExp",RegExpWrapper,{constructor:!0})}setSpecies("RegExp");const PasswordRequirements=({password:r,setPasswordRequirementsMet:n})=>{var e=window.innerWidth<=850;const o=usePasswordRequirementStyles()["classes"];const i=[{id:"upperLower",label:"Upper & lower case letters",regex:new RegExp("(?=.*[a-z])(?=.*[A-Z])","g"),met:!1},{id:"length",label:"At least 8 characters",regex:new RegExp(".{8}$"),met:!1},{id:"specialCharacter",label:"A symbol (#$&!)",regex:new RegExp("[!#$&()]"),met:!1}],[a,s]=react.exports.useState(i),l={0:"#FF5722",1:"#FFC107",2:"#00BCD4",3:"#4CAF50"};return react.exports.useEffect(()=>{var e=[...i];for(const t of e)t.regex.test(r)&&(t.met=!0);e.find(e=>!e.met)?n(!1):n(!0),s(e)},[r]),jsxRuntime.exports.jsx(Box$1,Object.assign({className:o.container,"data-testid":"sign-up.password-requirements.pop-up"},{children:jsxRuntime.exports.jsxs(Box$1,Object.assign({sx:{boxSizing:"border-box",padding:"15px 20px",width:"100%",marginTop:"10px",marginBottom:"10px",borderRadius:"5px",marginRight:e?void 0:"15px",boxShadow:"0px 2px 10px 0px rgba(0, 0, 0, 0.20)",backgroundColor:"rgb(255, 255,255)","&::before":e?{}:{backgroundColor:"white",content:'""',display:"block",position:"absolute",width:12,height:12,top:"calc(50% - 6px)",transform:"rotate(45deg)",left:"calc(100% - 20px)"}}},{children:[jsxRuntime.exports.jsx(Typography,Object.assign({variant:"body1","data-testid":"sign-up.password-requirements.pop-up.message"},{children:r?{0:"Weak Password",1:"Average Password",2:"Good Password",3:"Strong Password 💪"}[a.filter(e=>e.met).length]:"Please set a strong password"})),jsxRuntime.exports.jsx(Box$1,Object.assign({className:o.barContainer},{children:Array.from(Array(4).keys()).map(e=>{var t=a.filter(e=>e.met).length;return jsxRuntime.exports.jsx(Box$1,{className:o.bar,sx:{background:e<=t&&r?l[t]:"#9CA8B4"}},e)})})),jsxRuntime.exports.jsx(Stack,Object.assign({sx:{gap:e?void 0:"13px"}},{children:a.map(e=>jsxRuntime.exports.jsxs(Box$1,Object.assign({className:classNames(o.requirement,e.met?o.metRequirement:o.unmetRequirement)},{children:[e.met?jsxRuntime.exports.jsx(CheckmarkFilled,{className:o.checkMark}):jsxRuntime.exports.jsx(Bullet,{className:o.bullet}),jsxRuntime.exports.jsx(Typography,Object.assign({variant:"body2"},{children:e.label}))]}),e.id))}))]}))}))},SignUpPassword=({userId:e,token:t})=>{const[r,n]=react.exports.useState(!1),[o,i]=react.exports.useState(!1),[a,s]=react.exports.useState(""),[l,c]=react.exports.useState(""),[u,p]=react.exports.useState(!1),[d,$]=react.exports.useState(!1),[g,h]=react.exports.useState(!1),[m,f]=react.exports.useState(null);var b=useStyles$1({error:g,passwordRequirementsMet:d})["classes"];const y=useDispatch();var x=react.exports.useRef();react.exports.useEffect(()=>{a&&l&&a===l&&d&&p(!0),setTimeout(()=>O(),1e3)},[a,l,d]);const S=e=>{e(e=>!e)};var R=e=>{e.preventDefault()},E=e=>{"Enter"===e.key&&u&&w()};const O=()=>{a&&l&&a!==l?h(!0):h(!1)},I={password:s,confirmPassword:c},T=(e,t)=>{e.target.id===j&&e.target.value&&f(e.currentTarget),h(!1);e=e.target.value;I[t](e)};var P=window.innerWidth<=850,v=Boolean(m),C=v?"simple-popover":void 0;const j="sign-up.password";const w=()=>{y(actions.activateUserStart({password:a,userId:e,token:t}))};return jsxRuntime.exports.jsxs(Box$1,Object.assign({className:b.passwordInput},{children:[jsxRuntime.exports.jsxs(Box$1,Object.assign({sx:{position:"relative"}},{children:[P&&jsxRuntime.exports.jsx(Fade,Object.assign({in:v},{children:jsxRuntime.exports.jsx(Box$1,Object.assign({sx:{position:"absolute",bottom:"-20px"}},{children:jsxRuntime.exports.jsx(PasswordRequirements,{password:a,setPasswordRequirementsMet:$})}))})),jsxRuntime.exports.jsx(Header,{text:"Set a password for your account"})]})),jsxRuntime.exports.jsxs(FormControl,Object.assign({variant:"outlined",className:b.passwordInput},{children:[jsxRuntime.exports.jsx(InputLabel,Object.assign({htmlFor:j,className:b.passwordLabel},{children:"Password"})),jsxRuntime.exports.jsx(OutlinedInput,{id:j,"data-testid":j,ref:x,type:r?"text":"password",onChange:e=>T(e,"password"),value:a,autoFocus:!0,inputProps:{autoComplete:"new-password"},endAdornment:jsxRuntime.exports.jsx(InputAdornment,Object.assign({position:"end"},{children:jsxRuntime.exports.jsx(IconButton,Object.assign({"aria-label":"toggle password visibility",onClick:()=>S(n),onMouseDown:R,edge:"end"},{children:r?jsxRuntime.exports.jsx(default_1$3,{}):jsxRuntime.exports.jsx(default_1$4,{})}))})),onKeyDown:E,onClick:e=>{f(e.currentTarget)}}),jsxRuntime.exports.jsx(Popover,Object.assign({id:C,open:v&&!P,anchorEl:m,onClose:()=>{f(null)},disableAutoFocus:!0,disableEnforceFocus:!0,anchorReference:m,transformOrigin:{vertical:"center",horizontal:"right"},anchorOrigin:{vertical:"center",horizontal:"left"},PaperProps:{style:{backgroundColor:"transparent",boxShadow:"none",borderRadius:0}}},{children:jsxRuntime.exports.jsx(PasswordRequirements,{password:a,setPasswordRequirementsMet:$})}))]})),jsxRuntime.exports.jsxs(FormControl,Object.assign({className:classNames(b.passwordInput,b.passwordFormMarginTop),variant:"outlined"},{children:[jsxRuntime.exports.jsx(InputLabel,Object.assign({htmlFor:"sign-up.confirm-password",className:classNames(b.passwordLabel,b.confirmPasswordLabel)},{children:g?"Passwords must match":"Confirm Password"})),jsxRuntime.exports.jsx(OutlinedInput,{id:"sign-up.confirm-password","data-testid":"sign-up.confirm-password",type:o?"text":"password",onChange:e=>T(e,"confirmPassword"),value:l,inputProps:{autoComplete:"new-password"},endAdornment:jsxRuntime.exports.jsx(InputAdornment,Object.assign({position:"end"},{children:jsxRuntime.exports.jsx(IconButton,Object.assign({"aria-label":"toggle password visibility",onClick:d?()=>S(i):()=>({}),onMouseDown:R,edge:"end"},{children:o?jsxRuntime.exports.jsx(default_1$3,{}):jsxRuntime.exports.jsx(default_1$4,{})}))})),error:g,onKeyDown:E})]})),jsxRuntime.exports.jsx(BlueButton,{className:b.passwordFormMarginTop,onClick:w,text:"Create Account",type:"sign-up",disableButton:!u})]}))},SetPassword=()=>{const[n]=useSearchParams(),[t,o]=react.exports.useState(""),[r,i]=react.exports.useState(""),[e,a]=react.exports.useState(""),s=useNavigate(),l=useSelector(selectStatus),c=useDispatch();return react.exports.useEffect(()=>{var e=n.get("useruuid")||"",t=n.get("token")||"",r=n.get("username")||"";e&&t?(o(e),a(t),i(r)):s("/ui/auth/login")},[]),react.exports.useEffect(()=>{c(actions.resetState()),envChecker("local")||envChecker("dev")?c(actions.setEnv("dev")):envChecker("stage")?c(actions.setEnv("stage")):c(actions.setEnv("prod"))},[]),react.exports.useEffect(()=>{var e;"success"===l&&(e=new URLSearchParams({userId:t,username:r}).toString(),s("/ui/auth/plans?"+e))},[l]),jsxRuntime.exports.jsx(DynamicModuleLoader,Object.assign({modules:[getSignUpModule()]},{children:jsxRuntime.exports.jsx(PageContainer,Object.assign({showLogoInFooter:!1},{children:jsxRuntime.exports.jsx(SignUpPassword,{userId:t,token:e})}))}))},stripePricingPlanIdByEnv={dev:"prctbl_1No7MMIyHt9R0gSlZV4mqouD",stage:"prctbl_1NkvOrInolL392yPOejCV1RT",prod:"prctbl_1Nj36dInolL392yPggkeo88e"},stripePublishableKeyByEnv={dev:"pk_test_51No7B2IyHt9R0gSl5J4qqbZvRVLokabSDFw36G58tO1oxXO4mJzXmV0FvszOAfJcb25d5HgqZSlFIyMbL9bTFTb700vr9Fvgb9",stage:"pk_test_51NNcicInolL392yPuFClPywpUYp0ppNltcHBEdkPNkpMgmagbymPCeal9Dl3dDYn63IOfIafuobscqZhCJQfp3KN00Th3bxbLx",prod:"pk_live_51NNcicInolL392yPxizaLizsnPFeNfU1QgFBOG7bB44OLhLcQDc7CyH8hlyweN6VDDLr2lB9lLyiUh1KGBaSEjPS00uSQ1sFFP"},Plans=()=>{var e=useLocation();const n=new URLSearchParams(e.search),[t,o]=react.exports.useState(""),[r,i]=react.exports.useState("");react.exports.useEffect(()=>{var e=n.get("userId")||"",t=n.get("username")||"";e&&t&&(o(e),i(t),setCookie("userId",e,7),setCookie("username",t,7));const r=document.createElement("script");return r.src="https://js.stripe.com/v3/pricing-table.js",r.async=!0,document.body.appendChild(r),()=>{document.body.removeChild(r)}},[]);return jsxRuntime.exports.jsxs(PageContainer,Object.assign({showLogoInFooter:!1},{children:[jsxRuntime.exports.jsx(Header,{text:"Choose your aiWARE Account Plan"}),jsxRuntime.exports.jsx(Box,Object.assign({sx:{width:"100vw"}},{children:jsxRuntime.exports.jsx("stripe-pricing-table",{"pricing-table-id":(e=envDetector(),getConfig().stripePricingPlanId||stripePricingPlanIdByEnv[e]),"publishable-key":(e=envDetector(),getConfig().stripePublishableKey||stripePublishableKeyByEnv[e]),"customer-email":r,"client-reference-id":t})}))]}))},useStyles=makeStyles()(e=>({paymentResultMessage:{color:"#2A323C",textTransform:"none",marginTop:e.spacing(4),fontSize:"18px",fontWeight:600,lineHeight:"24px",letterSpacing:"-1.3038520263464193e-9px",textAlign:"center"},instanceProvisionedMessage:{color:"#2A323C",textTransform:"none",marginBottom:e.spacing(4),fontSize:"18px",fontWeight:600,lineHeight:"24px",letterSpacing:"-1.3038520263464193e-9px",textAlign:"center"},linearProgress:{height:"7px",backgroundColor:"#D9D9D9",marginTop:e.spacing(2),borderRadius:"20px"},paymentResultLogo:{height:"200px",width:"200px"},paymentResultContainer:{position:"fixed",width:"100%",height:"100vh",top:"0",left:"0",backgroundColor:"#ffffff",display:"flex",justifyContent:"center",alignItems:"center",flexDirection:"column",textAlign:"center",fontSize:"14px",zIndex:99999},loaderAnimation:{height:"200px",width:"405px",marginBottom:e.spacing(3)}})),PaymentResult=()=>{const i=useNavigate(),[e,a]=react.exports.useState(""),[t,s]=react.exports.useState(!1),[l,c]=react.exports.useState(!1);var r=useStyles()["classes"];return react.exports.useEffect(()=>{const r=getCookie("userId");let n,o;return r&&"timeout"!==e&&(s(!0),n=setInterval(()=>__awaiter(void 0,void 0,void 0,function*(){var e=yield(yield fetch(`${getConfig().hubUrl}/account_requests?userID=${r}&type=new`)).json(),t=((null==(t=null==e?void 0:e.result)?void 0:t[0])||{})["accountRequestStatus"];e&&("done"===t||"error"===t?(clearInterval(n),clearTimeout(o),a(t),"done"===t&&setTimeout(()=>{i("/ui/auth/login")},2e3)):"requested"!==t||l||(setTimeout(()=>{clearInterval(n),clearTimeout(o),a("timeout")},12e4),c(!0)))}),1e3),o=setTimeout(()=>{clearInterval(n)},12e4)),()=>{clearInterval(n),clearTimeout(o)}},[e,l]),jsxRuntime.exports.jsxs(Box,Object.assign({className:r.paymentResultContainer},{children:[jsxRuntime.exports.jsx(Box,Object.assign({className:r.loaderAnimation,id:"loaderAnimation"},{children:jsxRuntime.exports.jsx("img",{src:img,alt:"aiware-logo",className:r.paymentResultLogo})})),t&&"done"!==e&&"error"!==e&&"timeout"!==e&&jsxRuntime.exports.jsxs(Box,Object.assign({sx:{height:"200px",width:"405px"}},{children:[jsxRuntime.exports.jsx(StyledEngineProvider,Object.assign({injectFirst:!0},{children:jsxRuntime.exports.jsx(LinearProgress,{color:"primary",className:r.linearProgress})})),jsxRuntime.exports.jsx(Typography,Object.assign({variant:"body1","data-testid":"os-auth-sign-up-payment-result-in-progress",className:r.paymentResultMessage},{children:"Creating your custom experience..."}))]})),!t&&jsxRuntime.exports.jsx(Typography,Object.assign({variant:"body1",className:r.paymentResultMessage},{children:"Oops! Looks like the URL you are trying to access is invalid"})),"done"===e&&jsxRuntime.exports.jsx(Fade,Object.assign({in:!0,timeout:1e3,easing:"cubic-bezier(0.4, 0, 1, 1)"},{children:jsxRuntime.exports.jsx(Box,Object.assign({sx:{height:"200px",width:"405px"}},{children:jsxRuntime.exports.jsx(Typography,Object.assign({variant:"body1","data-testid":"os-auth-sign-up-payment-result-success",className:classNames(r.paymentResultMessage)},{children:"Your new instance is now ready! Taking you to the login page..."}))}))})),"error"===e&&jsxRuntime.exports.jsxs(Typography,Object.assign({variant:"body1","data-testid":"os-auth-sign-up-payment-result-error",className:r.paymentResultMessage},{children:["An error occurred when creating your Organization.",jsxRuntime.exports.jsx("br",{})," Please contact support"]})),"timeout"===e&&jsxRuntime.exports.jsxs(Typography,Object.assign({variant:"body1","data-testid":"os-auth-sign-up-payment-result-timeout",className:r.paymentResultMessage},{children:["Creating your custom experience is taking longer than expected.",jsxRuntime.exports.jsx("br",{}),"Please reach out to customer support"," ",jsxRuntime.exports.jsx("a",Object.assign({href:"mailto:support@veritone.com",style:{color:"#0E6EEC"}},{children:"support@veritone.com"}))]}))]}))},LogoutTool=()=>{const r=useDispatch(),n=useSelector(applicationSelector),o=useSelector(authStatusSelector);return react.exports.useEffect(()=>{var e,t;"failure"===o?(window.location.href="/ui/auth/login",setUser(null),null!=(e=null==(t=window.analytics)?void 0:t.reset)&&e.call(t)):"success"===(null===n||void 0===n?void 0:n.status)&&(setUser(null),null!=(t=null==(e=window.analytics)?void 0:e.reset)&&t.call(e),r(logoutUser$1()))},[r,n,o]),null},Logout=({aiwareInit:e})=>{const[t,r]=react.exports.useState(!1);return react.exports.useEffect(()=>{e().then(()=>{r(!0)})},[e]),t?jsxRuntime.exports.jsx(DynamicModuleLoader,Object.assign({modules:[getAppbarPanelModule()]},{children:jsxRuntime.exports.jsx(LogoutTool,{})})):null},AuthRoutes=({aiwareInit:e})=>jsxRuntime.exports.jsxs(Routes,{children:[jsxRuntime.exports.jsx(Route,{path:"/login",element:jsxRuntime.exports.jsx(LoginPage,{})}),jsxRuntime.exports.jsx(Route,{path:"sign-up",element:jsxRuntime.exports.jsx(SignUp,{})}),jsxRuntime.exports.jsx(Route,{path:"/plans",element:jsxRuntime.exports.jsx(Plans,{})}),jsxRuntime.exports.jsx(Route,{path:"/payment-result",element:jsxRuntime.exports.jsx(PaymentResult,{})}),jsxRuntime.exports.jsx(Route,{path:"/forgot",element:jsxRuntime.exports.jsx(Forgot,{})}),jsxRuntime.exports.jsx(Route,{path:"/restricted-provider",element:jsxRuntime.exports.jsx(RestrictedProvider,{})}),jsxRuntime.exports.jsx(Route,{path:"/link-oid",element:jsxRuntime.exports.jsx(AccountLinking,{})}),jsxRuntime.exports.jsx(Route,{path:"/reset-password",element:jsxRuntime.exports.jsx(ResetPasswordPage,{})}),jsxRuntime.exports.jsx(Route,{path:"/activate",element:jsxRuntime.exports.jsx(SetPassword,{})}),jsxRuntime.exports.jsx(Route,{path:"/logout",element:jsxRuntime.exports.jsx(Logout,{aiwareInit:e})})]});export{AuthRoutes,ResetPassword,getConfig,getRestApiUrlFromConfig};
|
|
13
|
+
`,variables:{input:{userName:r}}};try{return yield fetch(e,{method:"POST",credentials:"include",headers:{"Content-Type":"application/json; charset=utf-8"},body:JSON.stringify(t)})}catch(e){return devErrorLogger(e),null}}),createUserInHub=t=>__awaiter(void 0,void 0,void 0,function*(){var e=window.location.protocol+`//${window.location.hostname}:`+window.location.port;try{return!!(yield(yield fetch(getConfig().hubUrl+"/admin/users",{method:"POST",headers:{"Content-Type":"application/json; charset=utf-8"},body:JSON.stringify(Object.assign(Object.assign({},t),{userUrl:e+"/ui/auth/activate?token=%token%&username=%username%"}))})).json()).success}catch(e){return devErrorLogger(e),!1}}),activateUser=(o,i,a)=>__awaiter(void 0,void 0,void 0,function*(){var e=`/admin/users/${i}/activate`;try{var t={request:{userInviteToken:a,userPassword:o}},{success:r,result:{organizationUUID:n}}=yield(yield fetch(getConfig().hubUrl+e,{method:"POST",headers:{"Content-Type":"application/json; charset=utf-8"},body:JSON.stringify(t)})).json();return!(!r||!n)&&n}catch(e){return devErrorLogger(e),!1}}),BlueLinkText=({onClick:e,text:t,type:r})=>jsxRuntime.exports.jsx(Typography,Object.assign({sx:{fontFamily:"Nunito",fontSize:"14px",lineHeight:"20px",letterSpacing:"-1.30385e-09px",color:"#0C53B0",cursor:"pointer"},onClick:e,"data-testid":`os-auth-${r}-link-button`},{children:t})),OrDivider=()=>jsxRuntime.exports.jsxs(Box,Object.assign({sx:{marginTop:"20px",position:"relative"}},{children:[jsxRuntime.exports.jsx(Divider,{sx:{margin:"0 14px",color:"#D5DFE9"}}),jsxRuntime.exports.jsx(Typography,Object.assign({sx:{color:"#D5DFE9",fontSize:"14px",margin:0,top:"-12px",padding:"0 10px",position:"absolute",left:"calc(50% - 15px)",background:"#FFFFFF",fontFamily:"Roboto",letterSpacing:"- 1.30385e-09px",fontStyle:"normal",fontWeight:"normal"}},{children:"or"}))]})),SLICE_NAME="signUp",namespace="initStep",initialState={env:"",status:"idle",activeStep:1,1:{email:"",firstName:"",lastName:""},2:{orgName:"",teamSize:"",country:"",industry:""},errors:{1:{email:!1,firstName:!1,lastName:!1},2:{orgName:!1,country:!1}},userUUID:"",userEmail:"",organizationUUID:""};function isKeyOfObject(e,t){return e in t}function validateEmail(e){return e.match(/^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/)}const signUpSlice=createSlice({name:SLICE_NAME+"/"+namespace,initialState:initialState,reducers:{setStep(e,t){e.activeStep=t.payload},setValue(e,t){var{key:t,value:r}=t.payload;isKeyOfObject(t,e[e.activeStep])&&(e[e.activeStep][t]=r,isKeyOfObject(t,e.errors[e.activeStep]))&&(e.errors[e.activeStep][t]=!1)},validate(e){for(var[t,r]of Object.entries(e[e.activeStep]))isKeyOfObject(t,e.errors[e.activeStep])&&!r&&(e.errors[e.activeStep][t]=!0);1!==e.activeStep||validateEmail(e[1].email)||(e.errors[1].email=!0)},createUserStart(e){e.status="loading"},createUserSuccess(e){e.status="success"},createUserFailure(e){e.status="failure"},setEnv(e,t){t=t.payload;e.env=`https://hub${"prod"===t?"":"."+t}.aiware.com`},resetState:()=>initialState,activateUserStart(e,t){e.status="loading"},activateUserSuccess(e){e.status="success"},activateUserFailure(e){e.status="failure"}}}),actions=signUpSlice.actions;var signUpSlice$1=signUpSlice.reducer,whitespaces$2="\t\n\v\f\r \u2028\u2029\ufeff",uncurryThis$1=functionUncurryThis,requireObjectCoercible$1=requireObjectCoercible$8,toString$2=toString$a,whitespaces$1=whitespaces$2,replace$1=functionUncurryThis("".replace),ltrim=RegExp("^["+whitespaces$1+"]+"),rtrim=RegExp("(^|[^"+whitespaces$1+"])["+whitespaces$1+"]+$"),createMethod=function(t){return function(e){e=toString$2(requireObjectCoercible$1(e));return 1&t&&(e=replace$1(e,ltrim,"")),e=2&t?replace$1(e,rtrim,"$1"):e}},stringTrim={start:createMethod(1),end:createMethod(2),trim:createMethod(3)},PROPER_FUNCTION_NAME=functionName.PROPER,fails$1=fails$n,whitespaces=whitespaces$2,non="
",stringTrimForced=function(e){return fails$1(function(){return!!whitespaces[e]()||non[e]()!==non||PROPER_FUNCTION_NAME&&whitespaces[e].name!==e})},$=_export,$trim=stringTrim.trim,forcedStringTrimMethod=stringTrimForced;$({target:"String",proto:!0,forced:stringTrimForced("trim")},{trim:function(){return $trim(this)}});const selectStatus=e=>{return null==(e=null==e?void 0:e[SLICE_NAME])?void 0:e.status},selectActiveStep=e=>{return null==(e=null==e?void 0:e[SLICE_NAME])?void 0:e.activeStep},selectFormValues=e=>{var t;return null==(t=null==e?void 0:e[SLICE_NAME])?void 0:t[null==(t=null==e?void 0:e[SLICE_NAME])?void 0:t.activeStep]},selectErrors=e=>{var t;return null==(t=null==(t=null==e?void 0:e[SLICE_NAME])?void 0:t.errors)?void 0:t[null==(t=null==e?void 0:e[SLICE_NAME])?void 0:t.activeStep]},selectCreateUserPayload=e=>{var{1:{email:e,firstName:t,lastName:r},2:{orgName:n,teamSize:o,country:i,industry:a}}=(null==e?void 0:e[SLICE_NAME])||{1:{},2:{}};return{userFirstName:t.trim(),userLastName:r.trim(),userEmail:e,userPhoneNumber:"",userOccupation:"",userCompany:"",organizationName:n.trim(),salesforceAttributes:JSON.stringify({teamSize:o,country:i,industry:a})}};function*createUserSaga(e){try{var t=yield select(selectCreateUserPayload);(yield call$n(createUserInHub,t))?yield put(actions.createUserSuccess()):(yield put(actions.createUserFailure()),yield put(showMessage({content:"Cannot create user at this time. Please try again later or use a different email address",severity:MessageSeverity.Error})))}catch(e){yield put(actions.createUserFailure()),yield put(showMessage({content:"Cannot create user at this time. Please try again later or use a different email address",severity:MessageSeverity.Error})),devErrorLogger(e)}}function*activateUserSaga(e){var{password:e,userId:t,token:r}=e.payload;try{(yield call$n(activateUser,e,t,r))?yield put(actions.activateUserSuccess()):(yield put(actions.activateUserFailure()),yield put(showMessage({content:"Cannot activate user at this time. Please try again later or use a different email address",severity:MessageSeverity.Error})))}catch(e){yield put(actions.activateUserFailure()),yield put(showMessage({content:"Cannot activate user at this time. Please try again later or use a different email address",severity:MessageSeverity.Error})),console.log(e)}}function*createUserWatcher(){yield takeEvery$1(actions.createUserStart.type,createUserSaga)}function*activateUserWatcher(){yield takeEvery$1(actions.activateUserStart.type,activateUserSaga)}function*rootSaga(){yield all([createUserWatcher(),activateUserWatcher()])}function getSignUpModule(){return{id:SLICE_NAME,reducerMap:{[SLICE_NAME]:signUpSlice$1},sagas:[rootSaga],initialActions:[]}}const useStyles$3=makeStyles()((e,{label:t})=>{t="Sign Up"===t;return{button:{position:"absolute",right:t?"220px":"40px",top:"30px",background:t?"#388E3C":"none",border:t?"none":"1px solid #5C6269",color:t?"white":"#5C6269",borderRadius:"4px",paddingLeft:"14px",paddingRight:"14px",fontWeight:400,"&:hover":{background:t?"#42a647":"none"}}}}),SignUpButton=({label:e="Sign Up",navigateTo:t="sign-up"})=>{const r=useNavigate();var n=useSelector(selectStatus),o=useStyles$3({label:e})["classes"];return jsxRuntime.exports.jsx(Button,Object.assign({className:o.button,onClick:()=>{r("/ui/auth/"+t)},disabled:"sign-up"!==t&&"loading"===n},{children:e}))},LoginPage=()=>{const[e,r]=react.exports.useState(1),[t,n]=react.exports.useState(""),[o,i]=react.exports.useState([]),[a,s]=react.exports.useState([]),[l,c]=react.exports.useState(""),[u,p]=react.exports.useState(""),[d,$]=react.exports.useState(""),[g,h]=react.exports.useState(!1),[m,f]=react.exports.useState(!1),[b,y]=react.exports.useState(!1),x=useNavigate();let S=!1;react.exports.useEffect(()=>{var e=new URL(window.location.href);let t=e.searchParams.get("redirect");e.hash&&(t+=e.hash),t&&n(t),S||(S=!0,__awaiter(void 0,void 0,void 0,function*(){var e=yield getGlobalProviders();i(e)}))},[]);const R=()=>__awaiter(void 0,void 0,void 0,function*(){if(u){h(!0);var e=yield userLoginMutation(l,u);if(h(!1),e&&e.ok){e=yield e.json();if(e.errors&&e.errors.length)return"not_found"===e.errors[0].name?void $("Email or Password is incorrect"):void $("Something went wrong with login. Please try again");t?window.location.href=t:window.location.href=getRestApiUrlFromConfig().replace("api","aiware")+"/switch-app/default"}else $("Something went wrong with login. Please try again")}else $("Password is required")});return jsxRuntime.exports.jsxs(PageContainer,{children:[jsxRuntime.exports.jsx(SignUpButton,{}),getConfig().showEnvironmentSelector&&jsxRuntime.exports.jsx(DestinationDropdown,{handleDestination:e=>{window.location.href=e}}),jsxRuntime.exports.jsxs("div",Object.assign({style:{display:1===e?"block":"none"}},{children:[jsxRuntime.exports.jsx(Header,{text:"Welcome back"}),jsxRuntime.exports.jsx(EmailInput,{email:l,setEmail:e=>{c(e),$("")},onNextStep:()=>{__awaiter(void 0,void 0,void 0,function*(){f(!0),y(!1);var e=yield getOrgOpenIdProviders(l),t=e.find(e=>e.required),e=e.filter(e=>!e.isGlobal);t&&y(!0),s(e),f(!1),r(2)}).catch(e=>{devErrorLogger("Error: "+JSON.stringify(e))})},isLoading:m,buttonText:"Continue"}),o&&0<o.length&&jsxRuntime.exports.jsxs(jsxRuntime.exports.Fragment,{children:[jsxRuntime.exports.jsx(OrDivider,{})," ",jsxRuntime.exports.jsx(OpenID,{openIdItems:o})]})]})),jsxRuntime.exports.jsx("div",Object.assign({style:{display:2===e?"block":"none"}},{children:b?jsxRuntime.exports.jsxs(jsxRuntime.exports.Fragment,{children:[jsxRuntime.exports.jsx(Header,{text:"Choose Authentication Option for",subText:l})," ",a&&0<a.length&&jsxRuntime.exports.jsx(OpenID,{openIdItems:a}),jsxRuntime.exports.jsx(Box,Object.assign({sx:{mt:"20px"}},{children:jsxRuntime.exports.jsx(BlueLinkText,{onClick:()=>r(1),text:"Back to Login",type:"login"})}))]}):jsxRuntime.exports.jsxs(jsxRuntime.exports.Fragment,{children:[jsxRuntime.exports.jsx(Header,{text:"Enter Password for",subText:l})," ",jsxRuntime.exports.jsx(PasswordInput,{password:u,errorMessage:d,onPasswordChange:e=>{d&&$(""),p(e)},onPressEnter:()=>{R().catch(e=>{devErrorLogger("Error: "+JSON.stringify(e))})}}),jsxRuntime.exports.jsx(Box,Object.assign({sx:{mt:"14px"}},{children:jsxRuntime.exports.jsx(BlueLinkText,{onClick:()=>{x("/ui/auth/forgot",{state:{emailFromLogin:l}})},text:"Forgot Password?",type:"forgot"})})),jsxRuntime.exports.jsx(Box,Object.assign({sx:{mt:"25px"}},{children:jsxRuntime.exports.jsx(BlueButton,{onClick:()=>{R().catch(e=>{devErrorLogger("Error: "+JSON.stringify(e))})},text:"Login",type:"login",loading:g})})),a&&0<a.length&&jsxRuntime.exports.jsxs(jsxRuntime.exports.Fragment,{children:[jsxRuntime.exports.jsx(OrDivider,{})," ",jsxRuntime.exports.jsx(OpenID,{openIdItems:a})]}),jsxRuntime.exports.jsx(Box,Object.assign({sx:{mt:"20px"}},{children:jsxRuntime.exports.jsx(BlueLinkText,{onClick:()=>r(1),text:"Back to Login",type:"login"})}))]})}))]})},Forgot=()=>{const[r,e]=react.exports.useState(""),[t,n]=react.exports.useState(!1),[o,i]=react.exports.useState(1),a=useNavigate(),s=useLocation()["state"],l=(react.exports.useEffect(()=>{s&&s.emailFromLogin&&e(s.emailFromLogin)},[s]),()=>__awaiter(void 0,void 0,void 0,function*(){n(!0);try{var e=yield createPasswordResetRequestMutation(r),t=yield null==e?void 0:e.json();t.errors&&t.errors.length?(alert("Something went wrong. Please try again."),n(!1)):(n(!1),i(2))}catch(e){alert("Something went wrong. Please try again."),n(!1)}}));return jsxRuntime.exports.jsxs(PageContainer,{children:[1===o?jsxRuntime.exports.jsxs(jsxRuntime.exports.Fragment,{children:[jsxRuntime.exports.jsx(Header,{text:"Forgot Password",subText:"Enter your registered email to reset your password."}),jsxRuntime.exports.jsx(EmailInput,{email:r,setEmail:e,onNextStep:()=>{l().catch(e=>{devErrorLogger("Error: "+JSON.stringify(e))})},isLoading:t,buttonText:"Send"})]}):jsxRuntime.exports.jsxs(jsxRuntime.exports.Fragment,{children:[jsxRuntime.exports.jsx(Header,{text:"Password reset requested",subText:"Your password reset will be sent to the email provided if it matches our records."}),jsxRuntime.exports.jsx(Box,Object.assign({sx:{mt:"25px"}},{children:jsxRuntime.exports.jsx(BlueButton,{onClick:()=>{l().catch(e=>{devErrorLogger("Error: "+JSON.stringify(e))})},text:"Request Password Again",type:"reset-pw",loading:t})}))]}),jsxRuntime.exports.jsx(Box,Object.assign({sx:{mt:"20px"}},{children:jsxRuntime.exports.jsx(BlueLinkText,{onClick:()=>a("/ui/auth/login"),text:"Back to Login",type:"login"})}))]})},RestrictedProvider=()=>{const e=useNavigate();return jsxRuntime.exports.jsxs(PageContainer,{children:[jsxRuntime.exports.jsx(Header,{text:"Authentication Restriction",subText:"Authenticating with this OpenID provider has been restricted by an admin of your account. We are sorry for the inconvenience. Please return to the login screen and choose another authentication provider.",type:"restricted-provider"}),jsxRuntime.exports.jsx(BlueButton,{onClick:()=>e("/ui/auth/login"),text:"Back to Login",type:"back-to-login",loading:!1})]})};var sameValue$1=Object.is||function(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t},call=functionCall,fixRegExpWellKnownSymbolLogic=fixRegexpWellKnownSymbolLogic,anObject=anObject$i,isNullOrUndefined=isNullOrUndefined$7,requireObjectCoercible=requireObjectCoercible$8,sameValue=sameValue$1,toString$1=toString$a,getMethod=getMethod$6,regExpExec=regexpExecAbstract;fixRegexpWellKnownSymbolLogic("search",function(n,o,i){return[function(e){var t=requireObjectCoercible(this),r=isNullOrUndefined(e)?void 0:getMethod(e,n);return r?call(r,e,t):new RegExp(e)[n](toString$1(t))},function(e){var t=anObject(this),e=toString$1(e),r=i(o,t,e);return r.done?r.value:(r=t.lastIndex,sameValue(r,0)||(t.lastIndex=0),e=regExpExec(t,e),sameValue(t.lastIndex,r)||(t.lastIndex=r),null===e?-1:e.index)}]});const AccountLinking=()=>{const[e,t]=react.exports.useState(1),[r,n]=react.exports.useState(""),[o,i]=react.exports.useState(""),a=useNavigate(),[s,l]=react.exports.useState(!1),[c,u]=react.exports.useState(""),[p,d]=react.exports.useState(""),$=(react.exports.useEffect(()=>{var e=new URLSearchParams(window.location.search).get("session");e&&u(e)},[]),react.exports.useEffect(()=>{d("")},[r,o]),()=>__awaiter(void 0,void 0,void 0,function*(){if(!s){l(!0);try{var e=yield linkUserToOidAndLogin(r,o,c);200===e.status?window.location.href=getRestApiUrlFromConfig().replace("api","aiware")+"/switch-app/default":404===e.status?d("Email or Password is incorrect."):d("Something went wrong. Please try again.")}catch(e){d("Something went wrong. Please try again.")}finally{l(!1)}}}));return jsxRuntime.exports.jsx(PageContainer,{children:1===e?jsxRuntime.exports.jsxs(jsxRuntime.exports.Fragment,{children:[jsxRuntime.exports.jsx(Header,{text:"Account Does Not Exist",subText:"This AiWARE account does not exist. Are you sure you’re using the correct Authentication Provider?",type:"link-oid"}),jsxRuntime.exports.jsx(BlueButton,{onClick:()=>t(2),text:"Link to Existing Account",type:"oid-linking",loading:!1}),jsxRuntime.exports.jsx(Box,Object.assign({sx:{mt:"14px"}},{children:jsxRuntime.exports.jsx(BlueLinkText,{onClick:()=>a("/ui/auth/login"),text:"Back to Login",type:"login"})}))]}):jsxRuntime.exports.jsxs(jsxRuntime.exports.Fragment,{children:[jsxRuntime.exports.jsx(Header,{text:"Link Account",subText:"Provide the email and password to your aiWARE account."}),jsxRuntime.exports.jsx(EmailInput,{email:r,setEmail:n}),jsxRuntime.exports.jsx(Box,Object.assign({sx:{mt:"20px"}},{children:jsxRuntime.exports.jsx(PasswordInput,{password:o,onPasswordChange:i,onPressEnter:()=>{$().catch(e=>{devErrorLogger("Error: "+JSON.stringify(e))})},errorMessage:p,autoFocus:!1})})),jsxRuntime.exports.jsx(Box,Object.assign({sx:{mt:"14px"}},{children:jsxRuntime.exports.jsx(BlueLinkText,{onClick:()=>a("/ui/auth/forgot"),text:"Forgot Password?",type:"forgot"})})),jsxRuntime.exports.jsx(Box,Object.assign({sx:{mt:"25px"}},{children:jsxRuntime.exports.jsx(BlueButton,{onClick:()=>{$().catch(e=>{devErrorLogger("Error: "+JSON.stringify(e))})},text:"Link Account & Login",type:"link-oid",loading:s})})),jsxRuntime.exports.jsx(Box,Object.assign({sx:{mt:"20px"}},{children:jsxRuntime.exports.jsx(BlueLinkText,{onClick:()=>a("/ui/auth/login"),text:"Back to Login",type:"login"})}))]})})},ResetPasswordPage=()=>{const e=useNavigate();var t=new URLSearchParams(window.location.search),r=t.get("username")||"",n=t.get("resettoken")||"",o=t.get("organizationinviteid")||"";const i=t.get("redirect");t=parseToken(n),t=!!t&&t.enablePasswordRestriction;return jsxRuntime.exports.jsx(PageContainer,{children:jsxRuntime.exports.jsx(Box,Object.assign({sx:{width:"368px"}},{children:jsxRuntime.exports.jsx(ResetPasswordWidget,{resetToken:n,username:r,organizationInviteId:o,onSuccess:()=>{i?window.location.href=i:e("/ui/auth/login")},requiresPasswordRestriction:t,isNewPage:!0,containerWidth:"100%"})}))})},useStyles$2=makeStyles()(()=>({button:{position:"absolute",left:"40px",top:"30px",border:"none",color:"#5C6269",borderRadius:"4px",paddingLeft:"14px",paddingRight:"14px",fontWeight:400},select:{height:"52px",width:"100%",marginTop:"20px",textAlign:"left"},menu:{"& > .Sdk-MuiPopover-paper":{padding:"0"},"& > .Sdk-MuiPaper-root > ul":{padding:"5px"}},stepOneFullWidthInput:{height:"52px",width:"100%"},stepOneHalfWidthInputContainer:{display:"flex",justifyContent:"space-between",width:"100%",marginTop:"20px"},stepOneHalfWidthInput:{height:"52px",width:"calc(50% - 10px)"},stepTwoContainer:{width:"542px",textAlign:"center",maxWidth:"85vw"},stepTwoTextField:{height:"52px",width:"100%"},menuItem:{width:"100%"},autoCompleteContainer:{width:"100%",display:"flex",justifyContent:"center"},autoComplete:{width:"100%",marginTop:"20px",height:"52px"},formInputTopMargin:{marginTop:"20px"},formInputTopDoubleMargin:{marginTop:"40px"},previewBox:{width:"164px",height:"164px",borderRadius:"5px",border:"2px dashed #D5DFE9",padding:"10px",boxSizing:"border-box",cursor:"pointer"},logoLanding:{width:"140px",height:"140px",background:"rgba(247, 247, 247, 0.80)",display:"flex",alignItems:"center",justifyContent:"center"},addIcon:{fill:"#555F7C"},logoDescriptionText:{textAlign:"left"},logoUploadBtn:{borderRadius:"4px",border:"1px solid #5C6269",color:"#5C6269",fontWeight:"400",padding:"8px 15px"},orgLogoPreview:{width:"164px",height:"164px"},errorMessage:{color:"red"},confirmationText:{fontSize:"22px",color:"#2A323C",lineHeight:"28px"}}));var countries=[{label:"Afghanistan",id:"AF"},{label:"Åland Islands",id:"AX"},{label:"Albania",id:"AL"},{label:"Algeria",id:"DZ"},{label:"American Samoa",id:"AS"},{label:"Andorra",id:"AD"},{label:"Angola",id:"AO"},{label:"Anguilla",id:"AI"},{label:"Antarctica",id:"AQ"},{label:"Antigua and Barbuda",id:"AG"},{label:"Argentina",id:"AR"},{label:"Armenia",id:"AM"},{label:"Aruba",id:"AW"},{label:"Australia",id:"AU"},{label:"Austria",id:"AT"},{label:"Azerbaijan",id:"AZ"},{label:"Bahamas",id:"BS"},{label:"Bahrain",id:"BH"},{label:"Bangladesh",id:"BD"},{label:"Barbados",id:"BB"},{label:"Belarus",id:"BY"},{label:"Belgium",id:"BE"},{label:"Belize",id:"BZ"},{label:"Benin",id:"BJ"},{label:"Bermuda",id:"BM"},{label:"Bhutan",id:"BT"},{label:"Bolivia",id:"BO"},{label:"Bosnia and Herzegovina",id:"BA"},{label:"Botswana",id:"BW"},{label:"Bouvet Island",id:"BV"},{label:"Brazil",id:"BR"},{label:"British Indian Ocean Territory",id:"IO"},{label:"Brunei Darussalam",id:"BN"},{label:"Bulgaria",id:"BG"},{label:"Burkina Faso",id:"BF"},{label:"Burundi",id:"BI"},{label:"Cambodia",id:"KH"},{label:"Cameroon",id:"CM"},{label:"Canada",id:"CA"},{label:"Cape Verde",id:"CV"},{label:"Cayman Islands",id:"KY"},{label:"Central African Republic",id:"CF"},{label:"Chad",id:"TD"},{label:"Chile",id:"CL"},{label:"China",id:"CN"},{label:"Christmas Island",id:"CX"},{label:"Cocos (Keeling) Islands",id:"CC"},{label:"Colombia",id:"CO"},{label:"Comoros",id:"KM"},{label:"Congo",id:"CG"},{label:"Congo, The Democratic Republic of the",id:"CD"},{label:"Cook Islands",id:"CK"},{label:"Costa Rica",id:"CR"},{label:"Cote D'Ivoire",id:"CI"},{label:"Croatia",id:"HR"},{label:"Cuba",id:"CU"},{label:"Cyprus",id:"CY"},{label:"Czech Republic",id:"CZ"},{label:"Denmark",id:"DK"},{label:"Djibouti",id:"DJ"},{label:"Dominica",id:"DM"},{label:"Dominican Republic",id:"DO"},{label:"Ecuador",id:"EC"},{label:"Egypt",id:"EG"},{label:"El Salvador",id:"SV"},{label:"Equatorial Guinea",id:"GQ"},{label:"Eritrea",id:"ER"},{label:"Estonia",id:"EE"},{label:"Ethiopia",id:"ET"},{label:"Falkland Islands (Malvinas)",id:"FK"},{label:"Faroe Islands",id:"FO"},{label:"Fiji",id:"FJ"},{label:"Finland",id:"FI"},{label:"France",id:"FR"},{label:"French Guiana",id:"GF"},{label:"French Polynesia",id:"PF"},{label:"French Southern Territories",id:"TF"},{label:"Gabon",id:"GA"},{label:"Gambia",id:"GM"},{label:"Georgia",id:"GE"},{label:"Germany",id:"DE"},{label:"Ghana",id:"GH"},{label:"Gibraltar",id:"GI"},{label:"Greece",id:"GR"},{label:"Greenland",id:"GL"},{label:"Grenada",id:"GD"},{label:"Guadeloupe",id:"GP"},{label:"Guam",id:"GU"},{label:"Guatemala",id:"GT"},{label:"Guernsey",id:"GG"},{label:"Guinea",id:"GN"},{label:"Guinea-Bissau",id:"GW"},{label:"Guyana",id:"GY"},{label:"Haiti",id:"HT"},{label:"Heard Island and Mcdonald Islands",id:"HM"},{label:"Holy See (Vatican City State)",id:"VA"},{label:"Honduras",id:"HN"},{label:"Hong Kong",id:"HK"},{label:"Hungary",id:"HU"},{label:"Iceland",id:"IS"},{label:"India",id:"IN"},{label:"Indonesia",id:"ID"},{label:"Iran, Islamic Republic Of",id:"IR"},{label:"Iraq",id:"IQ"},{label:"Ireland",id:"IE"},{label:"Isle of Man",id:"IM"},{label:"Israel",id:"IL"},{label:"Italy",id:"IT"},{label:"Jamaica",id:"JM"},{label:"Japan",id:"JP"},{label:"Jersey",id:"JE"},{label:"Jordan",id:"JO"},{label:"Kazakhstan",id:"KZ"},{label:"Kenya",id:"KE"},{label:"Kiribati",id:"KI"},{label:"Korea, Democratic People'S Republic of",id:"KP"},{label:"Korea, Republic of",id:"KR"},{label:"Kuwait",id:"KW"},{label:"Kyrgyzstan",id:"KG"},{label:"Lao People'S Democratic Republic",id:"LA"},{label:"Latvia",id:"LV"},{label:"Lebanon",id:"LB"},{label:"Lesotho",id:"LS"},{label:"Liberia",id:"LR"},{label:"Libyan Arab Jamahiriya",id:"LY"},{label:"Liechtenstein",id:"LI"},{label:"Lithuania",id:"LT"},{label:"Luxembourg",id:"LU"},{label:"Macao",id:"MO"},{label:"Macedonia, The Former Yugoslav Republic of",id:"MK"},{label:"Madagascar",id:"MG"},{label:"Malawi",id:"MW"},{label:"Malaysia",id:"MY"},{label:"Maldives",id:"MV"},{label:"Mali",id:"ML"},{label:"Malta",id:"MT"},{label:"Marshall Islands",id:"MH"},{label:"Martinique",id:"MQ"},{label:"Mauritania",id:"MR"},{label:"Mauritius",id:"MU"},{label:"Mayotte",id:"YT"},{label:"Mexico",id:"MX"},{label:"Micronesia, Federated States of",id:"FM"},{label:"Moldova, Republic of",id:"MD"},{label:"Monaco",id:"MC"},{label:"Mongolia",id:"MN"},{label:"Montserrat",id:"MS"},{label:"Morocco",id:"MA"},{label:"Mozambique",id:"MZ"},{label:"Myanmar",id:"MM"},{label:"Namibia",id:"NA"},{label:"Nauru",id:"NR"},{label:"Nepal",id:"NP"},{label:"Netherlands",id:"NL"},{label:"Netherlands Antilles",id:"AN"},{label:"New Caledonia",id:"NC"},{label:"New Zealand",id:"NZ"},{label:"Nicaragua",id:"NI"},{label:"Niger",id:"NE"},{label:"Nigeria",id:"NG"},{label:"Niue",id:"NU"},{label:"Norfolk Island",id:"NF"},{label:"Northern Mariana Islands",id:"MP"},{label:"Norway",id:"NO"},{label:"Oman",id:"OM"},{label:"Pakistan",id:"PK"},{label:"Palau",id:"PW"},{label:"Palestinian Territory, Occupied",id:"PS"},{label:"Panama",id:"PA"},{label:"Papua New Guinea",id:"PG"},{label:"Paraguay",id:"PY"},{label:"Peru",id:"PE"},{label:"Philippines",id:"PH"},{label:"Pitcairn",id:"PN"},{label:"Poland",id:"PL"},{label:"Portugal",id:"PT"},{label:"Puerto Rico",id:"PR"},{label:"Qatar",id:"QA"},{label:"Reunion",id:"RE"},{label:"Romania",id:"RO"},{label:"Russian Federation",id:"RU"},{label:"RWANDA",id:"RW"},{label:"Saint Helena",id:"SH"},{label:"Saint Kitts and Nevis",id:"KN"},{label:"Saint Lucia",id:"LC"},{label:"Saint Pierre and Miquelon",id:"PM"},{label:"Saint Vincent and the Grenadines",id:"VC"},{label:"Samoa",id:"WS"},{label:"San Marino",id:"SM"},{label:"Sao Tome and Principe",id:"ST"},{label:"Saudi Arabia",id:"SA"},{label:"Senegal",id:"SN"},{label:"Serbia and Montenegro",id:"CS"},{label:"Seychelles",id:"SC"},{label:"Sierra Leone",id:"SL"},{label:"Singapore",id:"SG"},{label:"Slovakia",id:"SK"},{label:"Slovenia",id:"SI"},{label:"Solomon Islands",id:"SB"},{label:"Somalia",id:"SO"},{label:"South Africa",id:"ZA"},{label:"South Georgia and the South Sandwich Islands",id:"GS"},{label:"Spain",id:"ES"},{label:"Sri Lanka",id:"LK"},{label:"Sudan",id:"SD"},{label:"Surilabel",id:"SR"},{label:"Svalbard and Jan Mayen",id:"SJ"},{label:"Swaziland",id:"SZ"},{label:"Sweden",id:"SE"},{label:"Switzerland",id:"CH"},{label:"Syrian Arab Republic",id:"SY"},{label:"Taiwan, Province of China",id:"TW"},{label:"Tajikistan",id:"TJ"},{label:"Tanzania, United Republic of",id:"TZ"},{label:"Thailand",id:"TH"},{label:"Timor-Leste",id:"TL"},{label:"Togo",id:"TG"},{label:"Tokelau",id:"TK"},{label:"Tonga",id:"TO"},{label:"Trinidad and Tobago",id:"TT"},{label:"Tunisia",id:"TN"},{label:"Turkey",id:"TR"},{label:"Turkmenistan",id:"TM"},{label:"Turks and Caicos Islands",id:"TC"},{label:"Tuvalu",id:"TV"},{label:"Uganda",id:"UG"},{label:"Ukraine",id:"UA"},{label:"United Arab Emirates",id:"AE"},{label:"United Kingdom",id:"GB"},{label:"United States",id:"US"},{label:"United States Minor Outlying Islands",id:"UM"},{label:"Uruguay",id:"UY"},{label:"Uzbekistan",id:"UZ"},{label:"Vanuatu",id:"VU"},{label:"Venezuela",id:"VE"},{label:"Viet Nam",id:"VN"},{label:"Virgin Islands, British",id:"VG"},{label:"Virgin Islands, U.S.",id:"VI"},{label:"Wallis and Futuna",id:"WF"},{label:"Western Sahara",id:"EH"},{label:"Yemen",id:"YE"},{label:"Zambia",id:"ZM"},{label:"Zimbabwe",id:"ZW"}],industries=["Accounting","Airlines/Aviation","Alternative Dispute Resolution","Alternative Medicine","Animation","Apparel & Fashion","Architecture & Planning","Arts & Crafts","Automotive","Aviation & Aerospace","Banking","Biotechnology","Broadcast Media","Building Materials","Business Supplies & Equipment","Capital Markets","Chemicals","Civic & Social Organization","Civil Engineering","Commercial Real Estate","Computer & Network Security","Computer Games","Computer Hardware","Computer Networking","Computer Software","Construction","Consumer Electronics","Consumer Goods","Consumer Services","Cosmetics","Dairy","Defense & Space","Design","Education Management","E-learning","Electrical & Electronic Manufacturing","Entertainment","Environmental Services","Events Services","Executive Office","Facilities Services","Farming","Financial Services","Fine Art","Fishery","Food & Beverages","Food Production","Fundraising","Furniture","Gambling & Casinos","Glass, Ceramics & Concrete","Government Administration","Government Relations","Graphic Design","Health, Wellness & Fitness","Higher Education","Hospital & Health Care","Hospitality","Human Resources","Import & Export","Individual & Family Services","Industrial Automation","Information Services","Information Technology & Services","Insurance","International Affairs","International Trade & Development","Internet","Investment Banking/Venture","Investment Management","Judiciary","Law Enforcement","Law Practice","Legal Services","Legislative Office","Leisure & Travel","Libraries","Logistics & Supply Chain","Luxury Goods & Jewelry","Machinery","Management Consulting","Maritime","Marketing & Advertising","Market Research","Mechanical or Industrial Engineering","Media Production","Medical Device","Medical Practice","Mental Health Care","Military","Mining & Metals","Motion Pictures & Film","Museums & Institutions","Music","Nanotechnology","Newspapers","Nonprofit Organization Management","Oil & Energy","Online Publishing","Outsourcing/Offshoring","Package/Freight Delivery","Packaging & Containers","Paper & Forest Products","Performing Arts","Pharmaceuticals","Philanthropy","Photography","Plastics","Political Organization","Primary/Secondary","Printing","Professional Training","Program Development","Public Policy","Public Relations","Public Safety","Publishing","Railroad Manufacture","Ranching","Real Estate","Recreational","Facilities & Services","Religious Institutions","Renewables & Environment","Research","Restaurants","Retail","Security & Investigations","Semiconductors","Shipbuilding","Sporting Goods","Sports","Staffing & Recruiting","Supermarkets","Telecommunications","Textiles","Think Tanks","Tobacco","Translation & Localization","Transportation/Trucking/Railroad","Utilities","Venture Capital","Veterinary","Warehousing","Wholesale","Wine & Spirits","Wireless","Writing & Editing"];const teamSizeOptions=["1-10","10-50","50-100","100-500","500-1000","> 1000"],industryOptions=industries.map(e=>({id:e,label:e})),SignUpStep_2=()=>{var e=react.exports.useRef();const r=useDispatch(),t=useSelector(selectFormValues),n=useSelector(selectErrors),o=useSelector(selectStatus),i=!!Object.keys(n).find(e=>n[e])||!!Object.keys(n).find(e=>!t[e])||"loading"===o,a=useStyles$2()["classes"],s=useNavigate(),l=()=>{r(actions.createUserStart())},c=e=>{"Enter"===e.key&&(r(actions.validate()),i||l())};return jsxRuntime.exports.jsxs(Box,Object.assign({className:a.stepTwoContainer},{children:[jsxRuntime.exports.jsx(Header,{text:"success"!==o?"Let's set up your Organization":"",type:"info"}),"success"!==o?jsxRuntime.exports.jsxs(jsxRuntime.exports.Fragment,{children:[jsxRuntime.exports.jsx(TextField,{id:"orgName","data-testid":"os-auth-orgName-input-field",label:"Organization Name",variant:"outlined",value:"orgName"in t&&(null===t||void 0===t?void 0:t.orgName),autoComplete:"organization",autoFocus:!0,className:a.stepTwoTextField,error:"orgName"in n&&n.orgName,onChange:e=>r(actions.setValue({key:"orgName",value:e.target.value})),onKeyDown:c,disabled:"loading"===o}),jsxRuntime.exports.jsxs(FormControl,Object.assign({sx:{width:"100%"}},{children:[jsxRuntime.exports.jsx(InputLabel,Object.assign({id:"os-auth.sign-up.teamSize",className:a.formInputTopMargin},{children:"Team Size"})),jsxRuntime.exports.jsx(Select,Object.assign({labelId:"os-auth.sign-up.teamSize",id:"os-auth.sign-up.teamSize","data-testid":"os-auth-team-size-input-field",value:"teamSize"in t&&(null===t||void 0===t?void 0:t.teamSize),className:a.select,MenuProps:{className:a.menu},label:"Team Size",onChange:e=>r(actions.setValue({key:"teamSize",value:e.target.value||""})),disabled:"loading"===o},{children:teamSizeOptions.map(e=>jsxRuntime.exports.jsx(MenuItem,Object.assign({value:e,className:a.menuItem},{children:e})))}))]})),jsxRuntime.exports.jsx(Box,Object.assign({className:a.autoCompleteContainer},{children:jsxRuntime.exports.jsx(Autocomplete,{disablePortal:!0,id:"os-auth.sign-up.country-autocomplete","data-testid":"os-auth.sign-up.country-autocomplete",options:countries,value:"country"in t&&countries.find(e=>e.id===t.country),onChange:(e,t)=>r(actions.setValue({key:"country",value:(t||{}).id||""})),className:a.autoComplete,autoComplete:!0,renderInput:e=>jsxRuntime.exports.jsx(TextField,Object.assign({},e,{label:"Country",autoComplete:"country",onKeyDown:c,disabled:"loading"===o}))})})),jsxRuntime.exports.jsx(Box,Object.assign({className:a.autoCompleteContainer},{children:jsxRuntime.exports.jsx(Autocomplete,{disablePortal:!0,id:"os-auth.sign-up.industry-autocomplete","data-testid":"os-auth.sign-up.industry-autocomplete",options:industryOptions,value:"industry"in t&&industryOptions.find(e=>e.id===t.industry),onChange:(e,t)=>r(actions.setValue({key:"industry",value:(t||{}).id||""})),className:a.autoComplete,renderInput:e=>jsxRuntime.exports.jsx(TextField,Object.assign({},e,{label:"Industry",onKeyDown:c,disabled:"loading"===o}))})})),jsxRuntime.exports.jsx(BlueButton,{onClick:l,text:"Create Account",type:"create-account",disableButton:i,className:a.formInputTopDoubleMargin,ref:null!=e&&e.current?e:void 0,loading:"loading"===o})]}):jsxRuntime.exports.jsxs(Box,{children:[jsxRuntime.exports.jsx(Typography,Object.assign({"data-testid":"os-auth.sign-up.success-message",variant:"body1",className:a.confirmationText},{children:"Thank you for registering! A confirmation email has been sent with an activation link for your new aiWARE account."})),jsxRuntime.exports.jsx(BlueButton,{onClick:()=>s("/ui/auth/login"),text:"Return To Homepage",className:a.formInputTopDoubleMargin,type:"return"})]})]}))},SignUpStep_1=()=>{var e=react.exports.useRef();const t=useDispatch(),r=useSelector(selectFormValues);var n=useSelector(selectErrors);const o=!!Object.entries(n).find(([,e])=>e)||!!Object.keys(n).find(e=>!r[e])||!validateEmail$1("email"in r&&(null===r||void 0===r?void 0:r.email)||"");var i=useStyles$2()["classes"],a=e=>{"Enter"===e.key&&(t(actions.validate()),o||s())};const s=()=>{t(actions.setStep(2))};return jsxRuntime.exports.jsxs("div",Object.assign({style:{maxWidth:"85vw"}},{children:[jsxRuntime.exports.jsx(Header,{text:"Sign Up for your aiWARE account",type:"sign-up"}),jsxRuntime.exports.jsx(TextField,{id:"email","data-testid":"os-auth-email-input-field",label:"email"in n&&n.email?"Please provide a valid email":"Email",InputProps:{type:"email"},variant:"outlined",value:"email"in r&&(null===r||void 0===r?void 0:r.email),autoComplete:"email",autoFocus:!0,className:i.stepOneFullWidthInput,error:"email"in n&&n.email,onChange:e=>t(actions.setValue({key:"email",value:e.target.value.trim()})),onKeyDown:a}),jsxRuntime.exports.jsxs(Box,Object.assign({className:i.stepOneHalfWidthInputContainer},{children:[jsxRuntime.exports.jsx(TextField,{id:"firstName","data-testid":"os-auth-firstName-input-field",label:"First Name",variant:"outlined",value:"firstName"in r&&(null===r||void 0===r?void 0:r.firstName),autoComplete:"given-name",className:i.stepOneHalfWidthInput,error:"firstName"in n&&n.firstName,onChange:e=>t(actions.setValue({key:"firstName",value:e.target.value})),onKeyDown:a}),jsxRuntime.exports.jsx(TextField,{id:"lastName","data-testid":"os-auth-lastName-input-field",label:"Last Name",variant:"outlined",value:"lastName"in r&&(null===r||void 0===r?void 0:r.lastName),autoComplete:"family-name",className:i.stepOneHalfWidthInput,error:"lastName"in n&&n.lastName,onChange:e=>t(actions.setValue({key:"lastName",value:e.target.value})),onKeyDown:a})]})),jsxRuntime.exports.jsx(BlueButton,{onClick:s,text:"Continue",type:"Continue",disableButton:o,className:i.formInputTopMargin,ref:null!=e&&e.current?e:void 0})]}))},SignUp=()=>{var e=useSelector(selectActiveStep);const t=useDispatch();var r=useStyles$2()["classes"],n=useSelector(selectStatus);return react.exports.useEffect(()=>{t(actions.resetState()),envChecker("local")||envChecker("dev")||window.location.href.includes("localhost")?t(actions.setEnv("dev")):envChecker("stage")?t(actions.setEnv("stage")):t(actions.setEnv("prod"))},[]),jsxRuntime.exports.jsx(DynamicModuleLoader,Object.assign({modules:[getSignUpModule()]},{children:jsxRuntime.exports.jsxs(PageContainer,Object.assign({showLogoInFooter:!1},{children:[jsxRuntime.exports.jsx(SignUpButton,{label:"Login",navigateTo:"login"}),2===e&&"success"!==n&&jsxRuntime.exports.jsxs(Button,Object.assign({className:r.button,onClick:()=>t(actions.setStep(1)),disabled:"loading"===n},{children:[jsxRuntime.exports.jsx(default_1,{fontSize:"small",sx:{marginRight:"5px"}})," Back"]})),jsxRuntime.exports.jsx("div",{children:1===e?jsxRuntime.exports.jsx(SignUpStep_1,{}):jsxRuntime.exports.jsx(SignUpStep_2,{})})]}))}))},useStyles$1=makeStyles()((e,{error:t,passwordRequirementsMet:r})=>{let n="auto";return t?n="red":r||(n="rgba(0, 0, 0, 0.26)"),{passwordLabel:{background:"white",padding:"0 3px"},passwordFormMarginTop:{marginTop:"20px"},passwordInput:{width:"368px",maxWidth:"85vw"},confirmPasswordLabel:{color:n,"&.Mui-focused":{color:n}}}}),usePasswordRequirementStyles=makeStyles()(()=>({container:{width:"368px",maxWidth:"85vw",display:"flex",alignItems:"center",justifyContent:"center"},barContainer:{display:"flex",width:"100%",justifyContent:"space-between",padding:"15px 0px"},bar:{width:"23%",height:"4px",borderRadius:"20px"},metRequirement:{color:"#9CA8B4",textDecorationLine:"line-through"},unmetRequirement:{color:"#5C6269"},requirement:{display:"flex",alignItems:"center"},bullet:{transform:"translateY(8px)",marginLeft:"5px"},checkMark:{fill:"#0E6EEC",marginRight:"8px",marginLeft:"-3px"}}));var isCallable=isCallable$p,isObject=isObject$b,setPrototypeOf=objectSetPrototypeOf,inheritIfRequired$1=function(e,t,r){return setPrototypeOf&&isCallable(t=t.constructor)&&t!==r&&isObject(t=t.prototype)&&t!==r.prototype&&setPrototypeOf(e,t),e},defineProperty=objectDefineProperty.f,proxyAccessor$1=function(e,t,r){r in e||defineProperty(e,r,{configurable:!0,get:function(){return t[r]},set:function(e){t[r]=e}})},DESCRIPTORS=descriptors,global$1=global$n,uncurryThis=functionUncurryThis,isForced=isForced_1,inheritIfRequired=inheritIfRequired$1,createNonEnumerableProperty=createNonEnumerableProperty$6,getOwnPropertyNames=objectGetOwnPropertyNames.f,isPrototypeOf=objectIsPrototypeOf,isRegExp=isRegexp,toString=toString$a,getRegExpFlags=regexpGetFlags,stickyHelpers=regexpStickyHelpers,proxyAccessor=proxyAccessor$1,defineBuiltIn=defineBuiltIn$b,fails=fails$n,hasOwn=hasOwnProperty_1,enforceInternalState=internalState.enforce,setSpecies=setSpecies$2,wellKnownSymbol=wellKnownSymbol$l,UNSUPPORTED_DOT_ALL=regexpUnsupportedDotAll,UNSUPPORTED_NCG=regexpUnsupportedNcg,MATCH=wellKnownSymbol$l("match"),NativeRegExp=global$1.RegExp,RegExpPrototype=NativeRegExp.prototype,SyntaxError=global$1.SyntaxError,exec=uncurryThis(RegExpPrototype.exec),charAt=uncurryThis("".charAt),replace=uncurryThis("".replace),stringIndexOf=uncurryThis("".indexOf),stringSlice=uncurryThis("".slice),IS_NCG=/^\?<[^\s\d!#%&*+<=>@^][^\s!#%&*+<=>@^]*>/,re1=/a/g,re2=/a/g,CORRECT_NEW=new NativeRegExp(re1)!==re1,MISSED_STICKY=stickyHelpers.MISSED_STICKY,UNSUPPORTED_Y=stickyHelpers.UNSUPPORTED_Y,BASE_FORCED=DESCRIPTORS&&(!CORRECT_NEW||MISSED_STICKY||UNSUPPORTED_DOT_ALL||UNSUPPORTED_NCG||fails(function(){return re2[MATCH]=!1,NativeRegExp(re1)!=re1||NativeRegExp(re2)==re2||"/a/i"!=NativeRegExp(re1,"i")})),handleDotAll=function(e){for(var t,r=e.length,n=0,o="",i=!1;n<=r;n++)"\\"===(t=charAt(e,n))?o+=t+charAt(e,++n):i||"."!==t?("["===t?i=!0:"]"===t&&(i=!1),o+=t):o+="[\\s\\S]";return o},handleNCG=function(e){for(var t,r=e.length,n=0,o="",i=[],a={},s=!1,l=!1,c=0,u="";n<=r;n++){if("\\"===(t=charAt(e,n)))t+=charAt(e,++n);else if("]"===t)s=!1;else if(!s)switch(!0){case"["===t:s=!0;break;case"("===t:exec(IS_NCG,stringSlice(e,n+1))&&(n+=2,l=!0),o+=t,c++;continue;case">"===t&&l:if(""===u||hasOwn(a,u))throw new SyntaxError("Invalid capture group name");a[u]=!0,l=!(i[i.length]=[u,c]),u="";continue}l?u+=t:o+=t}return[o,i]};if(isForced("RegExp",BASE_FORCED)){for(var RegExpWrapper=function(e,t){var r,n,o=isPrototypeOf(RegExpPrototype,this),i=isRegExp(e),a=void 0===t,s=[],l=e;if(!o&&i&&a&&e.constructor===RegExpWrapper)return e;if((i||isPrototypeOf(RegExpPrototype,e))&&(e=e.source,a)&&(t=getRegExpFlags(l)),e=void 0===e?"":toString(e),t=void 0===t?"":toString(t),l=e,i=t=UNSUPPORTED_DOT_ALL&&"dotAll"in re1&&(r=!!t&&-1<stringIndexOf(t,"s"))?replace(t,/s/g,""):t,MISSED_STICKY&&"sticky"in re1&&(n=!!t&&-1<stringIndexOf(t,"y"))&&UNSUPPORTED_Y&&(t=replace(t,/y/g,"")),UNSUPPORTED_NCG&&(e=(a=handleNCG(e))[0],s=a[1]),a=inheritIfRequired(NativeRegExp(e,t),o?this:RegExpPrototype,RegExpWrapper),(r||n||s.length)&&(t=enforceInternalState(a),r&&(t.dotAll=!0,t.raw=RegExpWrapper(handleDotAll(e),i)),n&&(t.sticky=!0),s.length)&&(t.groups=s),e!==l)try{createNonEnumerableProperty(a,"source",""===l?"(?:)":l)}catch(e){}return a},keys=getOwnPropertyNames(NativeRegExp),index=0;keys.length>index;)proxyAccessor(RegExpWrapper,NativeRegExp,keys[index++]);(RegExpPrototype.constructor=RegExpWrapper).prototype=RegExpPrototype,defineBuiltIn(global$1,"RegExp",RegExpWrapper,{constructor:!0})}setSpecies("RegExp");const PasswordRequirements=({password:r,setPasswordRequirementsMet:n})=>{var e=window.innerWidth<=850;const o=usePasswordRequirementStyles()["classes"];const i=[{id:"upperLower",label:"Upper & lower case letters",regex:new RegExp("(?=.*[a-z])(?=.*[A-Z])","g"),met:!1},{id:"length",label:"At least 8 characters",regex:new RegExp(".{8}$"),met:!1},{id:"specialCharacter",label:"A symbol (#$&!)",regex:new RegExp("[!#$&()]"),met:!1}],[a,s]=react.exports.useState(i),l={0:"#FF5722",1:"#FFC107",2:"#00BCD4",3:"#4CAF50"};return react.exports.useEffect(()=>{var e=[...i];for(const t of e)t.regex.test(r)&&(t.met=!0);e.find(e=>!e.met)?n(!1):n(!0),s(e)},[r]),jsxRuntime.exports.jsx(Box$1,Object.assign({className:o.container,"data-testid":"sign-up.password-requirements.pop-up"},{children:jsxRuntime.exports.jsxs(Box$1,Object.assign({sx:{boxSizing:"border-box",padding:"15px 20px",width:"100%",marginTop:"10px",marginBottom:"10px",borderRadius:"5px",marginRight:e?void 0:"15px",boxShadow:"0px 2px 10px 0px rgba(0, 0, 0, 0.20)",backgroundColor:"rgb(255, 255,255)","&::before":e?{}:{backgroundColor:"white",content:'""',display:"block",position:"absolute",width:12,height:12,top:"calc(50% - 6px)",transform:"rotate(45deg)",left:"calc(100% - 20px)"}}},{children:[jsxRuntime.exports.jsx(Typography,Object.assign({variant:"body1","data-testid":"sign-up.password-requirements.pop-up.message"},{children:r?{0:"Weak Password",1:"Average Password",2:"Good Password",3:"Strong Password 💪"}[a.filter(e=>e.met).length]:"Please set a strong password"})),jsxRuntime.exports.jsx(Box$1,Object.assign({className:o.barContainer},{children:Array.from(Array(4).keys()).map(e=>{var t=a.filter(e=>e.met).length;return jsxRuntime.exports.jsx(Box$1,{className:o.bar,sx:{background:e<=t&&r?l[t]:"#9CA8B4"}},e)})})),jsxRuntime.exports.jsx(Stack,Object.assign({sx:{gap:e?void 0:"13px"}},{children:a.map(e=>jsxRuntime.exports.jsxs(Box$1,Object.assign({className:classNames(o.requirement,e.met?o.metRequirement:o.unmetRequirement)},{children:[e.met?jsxRuntime.exports.jsx(CheckmarkFilled,{className:o.checkMark}):jsxRuntime.exports.jsx(Bullet,{className:o.bullet}),jsxRuntime.exports.jsx(Typography,Object.assign({variant:"body2"},{children:e.label}))]}),e.id))}))]}))}))},SignUpPassword=({userId:e,token:t})=>{const[r,n]=react.exports.useState(!1),[o,i]=react.exports.useState(!1),[a,s]=react.exports.useState(""),[l,c]=react.exports.useState(""),[u,p]=react.exports.useState(!1),[d,$]=react.exports.useState(!1),[g,h]=react.exports.useState(!1),[m,f]=react.exports.useState(null);var b=useStyles$1({error:g,passwordRequirementsMet:d})["classes"];const y=useDispatch();var x=react.exports.useRef();react.exports.useEffect(()=>{var e=!!(a&&l&&a===l&&d);p(e),setTimeout(()=>O(),1e3)},[a,l,d]);const S=e=>{e(e=>!e)};var R=e=>{e.preventDefault()},E=e=>{"Enter"===e.key&&u&&w()};const O=()=>{a&&l&&a!==l?h(!0):h(!1)},I={password:s,confirmPassword:c},T=(e,t)=>{e.target.id===j&&e.target.value&&f(e.currentTarget),h(!1);e=e.target.value;I[t](e)};var P=window.innerWidth<=850,v=Boolean(m),C=v?"simple-popover":void 0;const j="sign-up.password";const w=()=>{y(actions.activateUserStart({password:a,userId:e,token:t}))};return jsxRuntime.exports.jsxs(Box$1,Object.assign({className:b.passwordInput},{children:[jsxRuntime.exports.jsxs(Box$1,Object.assign({sx:{position:"relative"}},{children:[P&&jsxRuntime.exports.jsx(Fade,Object.assign({in:v},{children:jsxRuntime.exports.jsx(Box$1,Object.assign({sx:{position:"absolute",bottom:"-20px"}},{children:jsxRuntime.exports.jsx(PasswordRequirements,{password:a,setPasswordRequirementsMet:$})}))})),jsxRuntime.exports.jsx(Header,{text:"Set a password for your account"})]})),jsxRuntime.exports.jsxs(FormControl,Object.assign({variant:"outlined",className:b.passwordInput},{children:[jsxRuntime.exports.jsx(InputLabel,Object.assign({htmlFor:j,className:b.passwordLabel},{children:"Password"})),jsxRuntime.exports.jsx(OutlinedInput,{id:j,"data-testid":j,ref:x,type:r?"text":"password",onChange:e=>T(e,"password"),value:a,autoFocus:!0,inputProps:{autoComplete:"new-password"},endAdornment:jsxRuntime.exports.jsx(InputAdornment,Object.assign({position:"end"},{children:jsxRuntime.exports.jsx(IconButton,Object.assign({"aria-label":"toggle password visibility",onClick:()=>S(n),onMouseDown:R,edge:"end"},{children:r?jsxRuntime.exports.jsx(default_1$3,{}):jsxRuntime.exports.jsx(default_1$4,{})}))})),onKeyDown:E,onClick:e=>{f(e.currentTarget)}}),jsxRuntime.exports.jsx(Popover,Object.assign({id:C,open:v&&!P,anchorEl:m,onClose:()=>{f(null)},disableAutoFocus:!0,disableEnforceFocus:!0,anchorReference:m,transformOrigin:{vertical:"center",horizontal:"right"},anchorOrigin:{vertical:"center",horizontal:"left"},PaperProps:{style:{backgroundColor:"transparent",boxShadow:"none",borderRadius:0}}},{children:jsxRuntime.exports.jsx(PasswordRequirements,{password:a,setPasswordRequirementsMet:$})}))]})),jsxRuntime.exports.jsxs(FormControl,Object.assign({className:classNames(b.passwordInput,b.passwordFormMarginTop),variant:"outlined"},{children:[jsxRuntime.exports.jsx(InputLabel,Object.assign({htmlFor:"sign-up.confirm-password",className:classNames(b.passwordLabel,b.confirmPasswordLabel)},{children:g?"Passwords must match":"Confirm Password"})),jsxRuntime.exports.jsx(OutlinedInput,{id:"sign-up.confirm-password","data-testid":"sign-up.confirm-password",type:o?"text":"password",onChange:e=>T(e,"confirmPassword"),value:l,inputProps:{autoComplete:"new-password"},endAdornment:jsxRuntime.exports.jsx(InputAdornment,Object.assign({position:"end"},{children:jsxRuntime.exports.jsx(IconButton,Object.assign({"aria-label":"toggle password visibility",onClick:d?()=>S(i):()=>({}),onMouseDown:R,edge:"end",disabled:!d},{children:o?jsxRuntime.exports.jsx(default_1$3,{}):jsxRuntime.exports.jsx(default_1$4,{})}))})),error:g,onKeyDown:E,disabled:!d})]})),jsxRuntime.exports.jsx(BlueButton,{className:b.passwordFormMarginTop,onClick:w,text:"Create Account",type:"sign-up",disableButton:!u})]}))},SetPassword=()=>{const[n]=useSearchParams(),[t,o]=react.exports.useState(""),[r,i]=react.exports.useState(""),[e,a]=react.exports.useState(""),s=useNavigate(),l=useSelector(selectStatus),c=useDispatch();return react.exports.useEffect(()=>{var e=n.get("useruuid")||"",t=n.get("token")||"",r=n.get("username")||"";e&&t?(o(e),a(t),i(r)):s("/ui/auth/login")},[]),react.exports.useEffect(()=>{c(actions.resetState()),envChecker("local")||envChecker("dev")?c(actions.setEnv("dev")):envChecker("stage")?c(actions.setEnv("stage")):c(actions.setEnv("prod"))},[]),react.exports.useEffect(()=>{var e;"success"===l&&(e=new URLSearchParams({userId:t,username:r}).toString(),s("/ui/auth/plans?"+e))},[l]),jsxRuntime.exports.jsx(DynamicModuleLoader,Object.assign({modules:[getSignUpModule()]},{children:jsxRuntime.exports.jsx(PageContainer,Object.assign({showLogoInFooter:!1},{children:jsxRuntime.exports.jsx(SignUpPassword,{userId:t,token:e})}))}))},stripePricingPlanIdByEnv={dev:"prctbl_1No7MMIyHt9R0gSlZV4mqouD",stage:"prctbl_1NkvOrInolL392yPOejCV1RT",prod:"prctbl_1Nj36dInolL392yPggkeo88e"},stripePublishableKeyByEnv={dev:"pk_test_51No7B2IyHt9R0gSl5J4qqbZvRVLokabSDFw36G58tO1oxXO4mJzXmV0FvszOAfJcb25d5HgqZSlFIyMbL9bTFTb700vr9Fvgb9",stage:"pk_test_51NNcicInolL392yPuFClPywpUYp0ppNltcHBEdkPNkpMgmagbymPCeal9Dl3dDYn63IOfIafuobscqZhCJQfp3KN00Th3bxbLx",prod:"pk_live_51NNcicInolL392yPxizaLizsnPFeNfU1QgFBOG7bB44OLhLcQDc7CyH8hlyweN6VDDLr2lB9lLyiUh1KGBaSEjPS00uSQ1sFFP"},Plans=()=>{var e=useLocation();const n=new URLSearchParams(e.search),[t,o]=react.exports.useState(""),[r,i]=react.exports.useState("");react.exports.useEffect(()=>{var e=n.get("userId")||"",t=n.get("username")||"";e&&t&&(o(e),i(t),setCookie("userId",e,7),setCookie("username",t,7));const r=document.createElement("script");return r.src="https://js.stripe.com/v3/pricing-table.js",r.async=!0,document.body.appendChild(r),()=>{document.body.removeChild(r)}},[]);return jsxRuntime.exports.jsxs(PageContainer,Object.assign({showLogoInFooter:!1},{children:[jsxRuntime.exports.jsx(Header,{text:"Choose your aiWARE Account Plan"}),jsxRuntime.exports.jsx(Box,Object.assign({sx:{width:"100vw"}},{children:jsxRuntime.exports.jsx("stripe-pricing-table",{"pricing-table-id":(e=envDetector(),getConfig().stripePricingPlanId||stripePricingPlanIdByEnv[e]),"publishable-key":(e=envDetector(),getConfig().stripePublishableKey||stripePublishableKeyByEnv[e]),"customer-email":r,"client-reference-id":t})}))]}))},useStyles=makeStyles()(e=>({paymentResultMessage:{color:"#2A323C",textTransform:"none",marginTop:e.spacing(4),fontSize:"18px",fontWeight:600,lineHeight:"24px",letterSpacing:"-1.3038520263464193e-9px",textAlign:"center"},instanceProvisionedMessage:{color:"#2A323C",textTransform:"none",marginBottom:e.spacing(4),fontSize:"18px",fontWeight:600,lineHeight:"24px",letterSpacing:"-1.3038520263464193e-9px",textAlign:"center"},linearProgress:{height:"7px",backgroundColor:"#D9D9D9",marginTop:e.spacing(2),borderRadius:"20px"},paymentResultLogo:{height:"200px",width:"200px"},paymentResultContainer:{position:"fixed",width:"100%",height:"100vh",top:"0",left:"0",backgroundColor:"#ffffff",display:"flex",justifyContent:"center",alignItems:"center",flexDirection:"column",textAlign:"center",fontSize:"14px",zIndex:99999},loaderAnimation:{height:"200px",width:"405px",marginBottom:e.spacing(3)}})),PaymentResult=()=>{const i=useNavigate(),[e,a]=react.exports.useState(""),[t,s]=react.exports.useState(!1),[l,c]=react.exports.useState(!1);var r=useStyles()["classes"];return react.exports.useEffect(()=>{const r=getCookie("userId");let n,o;return r&&"timeout"!==e&&(s(!0),n=setInterval(()=>__awaiter(void 0,void 0,void 0,function*(){var e=yield(yield fetch(`${getConfig().hubUrl}/account_requests?userID=${r}&type=new`)).json(),t=((null==(t=null==e?void 0:e.result)?void 0:t[0])||{})["accountRequestStatus"];e&&("done"===t||"error"===t?(clearInterval(n),clearTimeout(o),a(t),"done"===t&&setTimeout(()=>{i("/ui/auth/login")},2e3)):"requested"!==t||l||(setTimeout(()=>{clearInterval(n),clearTimeout(o),a("timeout")},12e4),c(!0)))}),1e3),o=setTimeout(()=>{clearInterval(n)},12e4)),()=>{clearInterval(n),clearTimeout(o)}},[e,l]),jsxRuntime.exports.jsxs(Box,Object.assign({className:r.paymentResultContainer},{children:[jsxRuntime.exports.jsx(Box,Object.assign({className:r.loaderAnimation,id:"loaderAnimation"},{children:jsxRuntime.exports.jsx("img",{src:img,alt:"aiware-logo",className:r.paymentResultLogo})})),t&&"done"!==e&&"error"!==e&&"timeout"!==e&&jsxRuntime.exports.jsxs(Box,Object.assign({sx:{height:"200px",width:"405px"}},{children:[jsxRuntime.exports.jsx(StyledEngineProvider,Object.assign({injectFirst:!0},{children:jsxRuntime.exports.jsx(LinearProgress,{color:"primary",className:r.linearProgress})})),jsxRuntime.exports.jsx(Typography,Object.assign({variant:"body1","data-testid":"os-auth-sign-up-payment-result-in-progress",className:r.paymentResultMessage},{children:"Creating your custom experience..."}))]})),!t&&jsxRuntime.exports.jsx(Typography,Object.assign({variant:"body1",className:r.paymentResultMessage},{children:"Oops! Looks like the URL you are trying to access is invalid"})),"done"===e&&jsxRuntime.exports.jsx(Fade,Object.assign({in:!0,timeout:1e3,easing:"cubic-bezier(0.4, 0, 1, 1)"},{children:jsxRuntime.exports.jsx(Box,Object.assign({sx:{height:"200px",width:"405px"}},{children:jsxRuntime.exports.jsx(Typography,Object.assign({variant:"body1","data-testid":"os-auth-sign-up-payment-result-success",className:classNames(r.paymentResultMessage)},{children:"Your new instance is now ready! Taking you to the login page..."}))}))})),"error"===e&&jsxRuntime.exports.jsxs(Typography,Object.assign({variant:"body1","data-testid":"os-auth-sign-up-payment-result-error",className:r.paymentResultMessage},{children:["An error occurred when creating your Organization.",jsxRuntime.exports.jsx("br",{})," Please contact support"]})),"timeout"===e&&jsxRuntime.exports.jsxs(Typography,Object.assign({variant:"body1","data-testid":"os-auth-sign-up-payment-result-timeout",className:r.paymentResultMessage},{children:["Creating your custom experience is taking longer than expected.",jsxRuntime.exports.jsx("br",{}),"Please reach out to customer support"," ",jsxRuntime.exports.jsx("a",Object.assign({href:"mailto:support@veritone.com",style:{color:"#0E6EEC"}},{children:"support@veritone.com"}))]}))]}))},LogoutTool=()=>{const r=useDispatch(),n=useSelector(applicationSelector),o=useSelector(authStatusSelector);return react.exports.useEffect(()=>{var e,t;"failure"===o?(window.location.href="/ui/auth/login",setUser(null),null!=(e=null==(t=window.analytics)?void 0:t.reset)&&e.call(t)):"success"===(null===n||void 0===n?void 0:n.status)&&(setUser(null),null!=(t=null==(e=window.analytics)?void 0:e.reset)&&t.call(e),r(logoutUser$1()))},[r,n,o]),null},Logout=({aiwareInit:e})=>{const[t,r]=react.exports.useState(!1);return react.exports.useEffect(()=>{e().then(()=>{r(!0)})},[e]),t?jsxRuntime.exports.jsx(DynamicModuleLoader,Object.assign({modules:[getAppbarPanelModule()]},{children:jsxRuntime.exports.jsx(LogoutTool,{})})):null},AuthRoutes=({aiwareInit:e})=>jsxRuntime.exports.jsxs(Routes,{children:[jsxRuntime.exports.jsx(Route,{path:"/login",element:jsxRuntime.exports.jsx(LoginPage,{})}),jsxRuntime.exports.jsx(Route,{path:"sign-up",element:jsxRuntime.exports.jsx(SignUp,{})}),jsxRuntime.exports.jsx(Route,{path:"/plans",element:jsxRuntime.exports.jsx(Plans,{})}),jsxRuntime.exports.jsx(Route,{path:"/payment-result",element:jsxRuntime.exports.jsx(PaymentResult,{})}),jsxRuntime.exports.jsx(Route,{path:"/forgot",element:jsxRuntime.exports.jsx(Forgot,{})}),jsxRuntime.exports.jsx(Route,{path:"/restricted-provider",element:jsxRuntime.exports.jsx(RestrictedProvider,{})}),jsxRuntime.exports.jsx(Route,{path:"/link-oid",element:jsxRuntime.exports.jsx(AccountLinking,{})}),jsxRuntime.exports.jsx(Route,{path:"/reset-password",element:jsxRuntime.exports.jsx(ResetPasswordPage,{})}),jsxRuntime.exports.jsx(Route,{path:"/activate",element:jsxRuntime.exports.jsx(SetPassword,{})}),jsxRuntime.exports.jsx(Route,{path:"/logout",element:jsxRuntime.exports.jsx(Logout,{aiwareInit:e})})]});export{AuthRoutes,ResetPassword,getConfig,getRestApiUrlFromConfig};
|
package/js-core.esm4.js.gz
CHANGED
|
Binary file
|
package/js-core.umd.css
CHANGED
|
@@ -288,98 +288,6 @@
|
|
|
288
288
|
background-color: #fff;
|
|
289
289
|
}
|
|
290
290
|
|
|
291
|
-
/* dosis-200normal - latin */
|
|
292
|
-
@font-face {
|
|
293
|
-
font-family: 'Dosis';
|
|
294
|
-
font-style: normal;
|
|
295
|
-
font-display: swap;
|
|
296
|
-
font-weight: 200;
|
|
297
|
-
src:
|
|
298
|
-
local('Dosis Extra Light '),
|
|
299
|
-
local('Dosis-Extra Light'),
|
|
300
|
-
url('./files/dosis-latin-200.woff2') format('woff2'), /* Super Modern Browsers */
|
|
301
|
-
url('./files/dosis-latin-200.woff') format('woff'); /* Modern Browsers */
|
|
302
|
-
}
|
|
303
|
-
|
|
304
|
-
/* dosis-300normal - latin */
|
|
305
|
-
@font-face {
|
|
306
|
-
font-family: 'Dosis';
|
|
307
|
-
font-style: normal;
|
|
308
|
-
font-display: swap;
|
|
309
|
-
font-weight: 300;
|
|
310
|
-
src:
|
|
311
|
-
local('Dosis Light '),
|
|
312
|
-
local('Dosis-Light'),
|
|
313
|
-
url('./files/dosis-latin-300.woff2') format('woff2'), /* Super Modern Browsers */
|
|
314
|
-
url('./files/dosis-latin-300.woff') format('woff'); /* Modern Browsers */
|
|
315
|
-
}
|
|
316
|
-
|
|
317
|
-
/* dosis-400normal - latin */
|
|
318
|
-
@font-face {
|
|
319
|
-
font-family: 'Dosis';
|
|
320
|
-
font-style: normal;
|
|
321
|
-
font-display: swap;
|
|
322
|
-
font-weight: 400;
|
|
323
|
-
src:
|
|
324
|
-
local('Dosis Regular '),
|
|
325
|
-
local('Dosis-Regular'),
|
|
326
|
-
url('./files/dosis-latin-400.woff2') format('woff2'), /* Super Modern Browsers */
|
|
327
|
-
url('./files/dosis-latin-400.woff') format('woff'); /* Modern Browsers */
|
|
328
|
-
}
|
|
329
|
-
|
|
330
|
-
/* dosis-500normal - latin */
|
|
331
|
-
@font-face {
|
|
332
|
-
font-family: 'Dosis';
|
|
333
|
-
font-style: normal;
|
|
334
|
-
font-display: swap;
|
|
335
|
-
font-weight: 500;
|
|
336
|
-
src:
|
|
337
|
-
local('Dosis Medium '),
|
|
338
|
-
local('Dosis-Medium'),
|
|
339
|
-
url('./files/dosis-latin-500.woff2') format('woff2'), /* Super Modern Browsers */
|
|
340
|
-
url('./files/dosis-latin-500.woff') format('woff'); /* Modern Browsers */
|
|
341
|
-
}
|
|
342
|
-
|
|
343
|
-
/* dosis-600normal - latin */
|
|
344
|
-
@font-face {
|
|
345
|
-
font-family: 'Dosis';
|
|
346
|
-
font-style: normal;
|
|
347
|
-
font-display: swap;
|
|
348
|
-
font-weight: 600;
|
|
349
|
-
src:
|
|
350
|
-
local('Dosis SemiBold '),
|
|
351
|
-
local('Dosis-SemiBold'),
|
|
352
|
-
url('./files/dosis-latin-600.woff2') format('woff2'), /* Super Modern Browsers */
|
|
353
|
-
url('./files/dosis-latin-600.woff') format('woff'); /* Modern Browsers */
|
|
354
|
-
}
|
|
355
|
-
|
|
356
|
-
/* dosis-700normal - latin */
|
|
357
|
-
@font-face {
|
|
358
|
-
font-family: 'Dosis';
|
|
359
|
-
font-style: normal;
|
|
360
|
-
font-display: swap;
|
|
361
|
-
font-weight: 700;
|
|
362
|
-
src:
|
|
363
|
-
local('Dosis Bold '),
|
|
364
|
-
local('Dosis-Bold'),
|
|
365
|
-
url('./files/dosis-latin-700.woff2') format('woff2'), /* Super Modern Browsers */
|
|
366
|
-
url('./files/dosis-latin-700.woff') format('woff'); /* Modern Browsers */
|
|
367
|
-
}
|
|
368
|
-
|
|
369
|
-
/* dosis-800normal - latin */
|
|
370
|
-
@font-face {
|
|
371
|
-
font-family: 'Dosis';
|
|
372
|
-
font-style: normal;
|
|
373
|
-
font-display: swap;
|
|
374
|
-
font-weight: 800;
|
|
375
|
-
src:
|
|
376
|
-
local('Dosis ExtraBold '),
|
|
377
|
-
local('Dosis-ExtraBold'),
|
|
378
|
-
url('./files/dosis-latin-800.woff2') format('woff2'), /* Super Modern Browsers */
|
|
379
|
-
url('./files/dosis-latin-800.woff') format('woff'); /* Modern Browsers */
|
|
380
|
-
}
|
|
381
|
-
|
|
382
|
-
|
|
383
291
|
/* nunito-200normal - latin */
|
|
384
292
|
@font-face {
|
|
385
293
|
font-family: 'Nunito';
|
|
@@ -563,6 +471,98 @@
|
|
|
563
471
|
}
|
|
564
472
|
|
|
565
473
|
|
|
474
|
+
/* dosis-200normal - latin */
|
|
475
|
+
@font-face {
|
|
476
|
+
font-family: 'Dosis';
|
|
477
|
+
font-style: normal;
|
|
478
|
+
font-display: swap;
|
|
479
|
+
font-weight: 200;
|
|
480
|
+
src:
|
|
481
|
+
local('Dosis Extra Light '),
|
|
482
|
+
local('Dosis-Extra Light'),
|
|
483
|
+
url('./files/dosis-latin-200.woff2') format('woff2'), /* Super Modern Browsers */
|
|
484
|
+
url('./files/dosis-latin-200.woff') format('woff'); /* Modern Browsers */
|
|
485
|
+
}
|
|
486
|
+
|
|
487
|
+
/* dosis-300normal - latin */
|
|
488
|
+
@font-face {
|
|
489
|
+
font-family: 'Dosis';
|
|
490
|
+
font-style: normal;
|
|
491
|
+
font-display: swap;
|
|
492
|
+
font-weight: 300;
|
|
493
|
+
src:
|
|
494
|
+
local('Dosis Light '),
|
|
495
|
+
local('Dosis-Light'),
|
|
496
|
+
url('./files/dosis-latin-300.woff2') format('woff2'), /* Super Modern Browsers */
|
|
497
|
+
url('./files/dosis-latin-300.woff') format('woff'); /* Modern Browsers */
|
|
498
|
+
}
|
|
499
|
+
|
|
500
|
+
/* dosis-400normal - latin */
|
|
501
|
+
@font-face {
|
|
502
|
+
font-family: 'Dosis';
|
|
503
|
+
font-style: normal;
|
|
504
|
+
font-display: swap;
|
|
505
|
+
font-weight: 400;
|
|
506
|
+
src:
|
|
507
|
+
local('Dosis Regular '),
|
|
508
|
+
local('Dosis-Regular'),
|
|
509
|
+
url('./files/dosis-latin-400.woff2') format('woff2'), /* Super Modern Browsers */
|
|
510
|
+
url('./files/dosis-latin-400.woff') format('woff'); /* Modern Browsers */
|
|
511
|
+
}
|
|
512
|
+
|
|
513
|
+
/* dosis-500normal - latin */
|
|
514
|
+
@font-face {
|
|
515
|
+
font-family: 'Dosis';
|
|
516
|
+
font-style: normal;
|
|
517
|
+
font-display: swap;
|
|
518
|
+
font-weight: 500;
|
|
519
|
+
src:
|
|
520
|
+
local('Dosis Medium '),
|
|
521
|
+
local('Dosis-Medium'),
|
|
522
|
+
url('./files/dosis-latin-500.woff2') format('woff2'), /* Super Modern Browsers */
|
|
523
|
+
url('./files/dosis-latin-500.woff') format('woff'); /* Modern Browsers */
|
|
524
|
+
}
|
|
525
|
+
|
|
526
|
+
/* dosis-600normal - latin */
|
|
527
|
+
@font-face {
|
|
528
|
+
font-family: 'Dosis';
|
|
529
|
+
font-style: normal;
|
|
530
|
+
font-display: swap;
|
|
531
|
+
font-weight: 600;
|
|
532
|
+
src:
|
|
533
|
+
local('Dosis SemiBold '),
|
|
534
|
+
local('Dosis-SemiBold'),
|
|
535
|
+
url('./files/dosis-latin-600.woff2') format('woff2'), /* Super Modern Browsers */
|
|
536
|
+
url('./files/dosis-latin-600.woff') format('woff'); /* Modern Browsers */
|
|
537
|
+
}
|
|
538
|
+
|
|
539
|
+
/* dosis-700normal - latin */
|
|
540
|
+
@font-face {
|
|
541
|
+
font-family: 'Dosis';
|
|
542
|
+
font-style: normal;
|
|
543
|
+
font-display: swap;
|
|
544
|
+
font-weight: 700;
|
|
545
|
+
src:
|
|
546
|
+
local('Dosis Bold '),
|
|
547
|
+
local('Dosis-Bold'),
|
|
548
|
+
url('./files/dosis-latin-700.woff2') format('woff2'), /* Super Modern Browsers */
|
|
549
|
+
url('./files/dosis-latin-700.woff') format('woff'); /* Modern Browsers */
|
|
550
|
+
}
|
|
551
|
+
|
|
552
|
+
/* dosis-800normal - latin */
|
|
553
|
+
@font-face {
|
|
554
|
+
font-family: 'Dosis';
|
|
555
|
+
font-style: normal;
|
|
556
|
+
font-display: swap;
|
|
557
|
+
font-weight: 800;
|
|
558
|
+
src:
|
|
559
|
+
local('Dosis ExtraBold '),
|
|
560
|
+
local('Dosis-ExtraBold'),
|
|
561
|
+
url('./files/dosis-latin-800.woff2') format('woff2'), /* Super Modern Browsers */
|
|
562
|
+
url('./files/dosis-latin-800.woff') format('woff'); /* Modern Browsers */
|
|
563
|
+
}
|
|
564
|
+
|
|
565
|
+
|
|
566
566
|
/*!
|
|
567
567
|
* Cropper.js v1.5.9
|
|
568
568
|
* https://fengyuanchen.github.io/cropperjs
|
package/js-core.umd.css.gz
CHANGED
|
Binary file
|