PageSourceSearch

https://app.alltius.ai/assets/LaunchWorkspace-BAzwgMBW.js

js alltius.ai collected 2026-10-01 15:23:18 UTC 4,428 bytes, 1 lines download raw bytes

1import{cw as S,a5 as c,a4 as t,bD as O,bs as l,z as r,bR as y,v as z,bm as L,bG as G,aj as k,bq as J,bu as K,bA as F,bv as j,bw as q,U as V,ao as D,a9 as $,ay as Y,ad as X}from"./useChatMessagesProps-CmGOEEIA.js";import{C as Q,A as P,H as _,r as N,aJ as Z}from"./light_logo_neoflo-BrO_D15h.js";import{U as tt,av as at,W as d,az as et,aA as nt,A as m}from"./index-DI-HYGmG.js";import"./LocalStorage-nn7SSwH8.js";import"./Snackbar-jAWmTaZK.js";const{LAUNCH_WORKSPACE:ot}=L,I=({workspace:i,buttonVariant:o,buttonText:x,handleClick:C,userCount:g,workspaceRole:T})=>{const{workspace_name:v,avatar:A}=i,E=async()=>{await C(i._id)},n=S(v),h=()=>o==ot.LAUNCH_BTN?`${g} member(s) | ${G(T)}`:`${g} member(s)`;return c(z,{sx:{border:`1px solid ${Q};`,boxShadow:"none",px:2,py:2,display:"flex",mt:2,width:"80%"},children:[t(O,{variant:"square",src:A,sx:{height:44,width:44,background:P,borderRadius:"8px"},children:n}),c(l,{sx:{ml:1,marginRight:"auto"},children:[t(l,{direction:"row",alignItems:"center",children:t(r,{children:v})}),t(r,{color:_,variant:"body1",fontSize:"0.875rem",children:h()})]}),t(l,{sx:{pt:"0.225rem"},children:t(y,{variant:o==="Launch"?"outlined":"contained",onClick:E,children:x})})]})},rt=N.memo(()=>c(J,{children:[t(k,{variant:"rounded",width:"80%",height:"80px"}),t(k,{sx:{mt:2},variant:"rounded",width:"80%",height:"80px"}),t(k,{sx:{mt:2},variant:"rounded",width:"80%",height:"80px"})]})),{LAUNCH_WORKSPACE:e}=L,ht=()=>{const{user:i}=N.useContext(tt),o=K(),[x,C]=N.useState(null),g=!!x,{logout:T}=at(),v=S(i.name),{data:A,isLoading:E}=F({queryFn:()=>Promise.all([d.getWorkspacesForUserApiWorkspaceListGet(),d.getWorkspaceMembersCountApiWorkspaceMembersCountGet()]),useErrorBoundary:!0}),[n,h]=A||[void 0,void 0],[u,p,s]=[n==null?void 0:n.existing_workspaces,n==null?void 0:n.invited_workspaces,n==null?void 0:n.other_workspaces],W=async a=>{const b={workspace_id:a};await d.acceptInviteApiWorkspaceAcceptInvitePost({...b}),o(m.HOME)},f=async a=>{await d.launchWorkspaceApiWorkspaceLaunchPatch(a),o(m.HOME)},w=async a=>{const b={workspace_id:a,name:i.name};await d.askAdminApprovalApiWorkspaceAskToJoinPost({...b}),o(m.ADMIN_APPROVAL)},B=async a=>{await d.joinWorkspaceApiWorkspaceJoinWorkspacePost(a),o(m.HOME)},U=()=>{o(m.CREATE_WORKSPACE)},H=a=>{C(a.currentTarget)},R=()=>{C(null)},M=()=>{R(),T({logoutParams:{returnTo:window.location.origin}}),nt()};return t(l,{sx:{width:"100vw",height:"100vh"},alignItems:"center",children:c(l,{sx:{ml:10,width:"720px",maxWidth:"100%"},children:[c(l,{sx:{alignSelf:"end",mr:10,transform:"translateY(30px)"},children:[t(j,{trackEventOptions:{id:"avatar"},onClick:H,sx:{p:0,ml:1},children:t(O,{sx:{height:36,width:36,fontSize:"0.75rem",background:P,borderRadius:"8px"},src:i.avatar,children:v})}),t(q,{anchorEl:x,open:g,onClose:R,children:c(V,{onClick:M,children:[t(D,{children:t(et,{fontSize:"small"})}),"Logout"]})})]}),t(r,{variant:"h4",sx:{color:_,fontSize:"1.125rem",mt:1.25},children:e.WELCOME}),t(r,{variant:"h2",sx:{fontSize:"1.5rem",mt:1.25,mb:2.5,fontWeight:"400"},children:e.CHOICE}),E&&t(rt,{}),p&&p.length>0&&t(r,{variant:"h4",sx:{color:_,fontSize:"0.75rem",mt:2.5},children:e.INVITATION.toUpperCase()}),p==null?void 0:p.map(a=>t(I,{workspace:a,buttonText:e.ACCEPT_INVITE_BTN,buttonVariant:e.INVITE_TEXT,handleClick:W,userCount:h[a._id]},a._id)),s&&(s==null?void 0:s.length)>0&&t(r,{variant:"h4",sx:{color:_,fontSize:"0.75rem",mt:2.5},children:e.EXISTING_WORKSPACE_JOIN(i.domain).toUpperCase()}),s==null?void 0:s.map(a=>a.display_workspace===!0&&t(I,{workspace:a,buttonText:a.skip_admin_approval?e.JOIN_BTN:e.ASK_TO_JOIN_BTN,buttonVariant:a.skip_admin_approval?e.JOIN_BTN:e.ASK_TO_JOIN_BTN,handleClick:a.skip_admin_approval?B:w,userCount:h[a._id]},a._id)),u&&u.length>0&&t(r,{variant:"h4",sx:{color:_,fontSize:"0.75rem",mt:2.5},children:e.MEMBERSHIP.toUpperCase()}),u==null?void 0:u.map(a=>t(I,{workspace:a.workspace,buttonText:e.LAUNCH_BTN,buttonVariant:e.LAUNCH_BTN,handleClick:f,workspaceRole:a.user_role,userCount:h[a.workspace._id]},a.workspace._id)),t($,{sx:{mt:8,width:"80%"},children:t(Y,{sx:{transform:"translateY(50%)"},label:"OR"})}),c(l,{direction:"row",sx:{backgroundColor:Z,mt:8,width:"80%",height:"64px",borderRadius:"10px",justifyContent:"space-around",alignItems:"center"},children:[t(r,{variant:"h4",sx:{fontSize:"0.9rem",p:2.8},children:e.CREATE_WORKSPACE}),t(X,{variant:"text",onClick:U,children:e.CREATE_BTN})]})]})})};export{ht as default};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.