1"use strict";(self.webpackChunkclient_v2=self.webpackChunkclient_v2||[]).push([[4676],{122110:()=>{var Ls={}},209406:(Ls,K,s)=>{s.r(K),s.d(K,{default:()=>c});var t=s(715621),y=s(537953),J=s(145926),W=s(419611),S=s(698879),B=s(312279),V=s(579858);const F=()=>(0,B.d)(a=>{var A,M;return{isLoading:!!((A=a.group)!=null&&A.loading),id:(M=a.group)==null?void 0:M.id}});var C=s(226898),j=s(163081);const Q=(0,S.A)(()=>Promise.all([s.e(6365),s.e(8394),s.e(4048),s.e(8457),s.e(5801),s.e(7417),s.e(9436),s.e(4088),s.e(9363),s.e(8246)]).then(s.bind(s,537524))),c=()=>{const a=(0,B.w)(),{groupIdentifier:A}=(0,J.g)(),{id:M,isLoading:m}=F(),I=(0,j.useSelector)(V.C);return(0,y.useEffect)(()=>{a((0,V.Ui)({groupIdentifier:A}))},[]),(0,y.useEffect)(()=>{if(I!=null&&I.id)return a((0,C.uWP)(I.id)),()=>{a((0,C.uWP)(null))}},[a,I.id]),(0,t.jsx)(t.Fragment,{children:m||!M?(0,t.jsx)(W.A,{}):(0,t.jsx)(Q,{})})}},267235:(Ls,K,s)=>{s.d(K,{g:()=>B});var t=s(715621),y=s(226898),J=s(239952),W=s(312279);const S="https://cdn.peoplegrove.com/admin/1710780556103Mask%20Group.png",B=({className:V,title:F,organizationId:C,photoUrl:j})=>{const Q=(0,W.w)(),Y=async c=>{Q((0,y.UQT)({key:"pathwayUIntegration",params:c}))};return(0,t.jsx)(J.A,{id:C,photoUrl:(j==null?void 0:j.trim())||S,title:F!=null?F:"PathwayU",className:V,isApproved:!0,handleOnClick:()=>Y({organizationId:C})})}},272329:(Ls,K,s)=>{s.d(K,{At:()=>vs,MH:()=>b,U$:()=>ps,eh:()=>m});var t=s(283766),y=s(989949),J=s(90570),W=s(972185),S=s(882750),B=s(839050),V=s(527510),F=s(449793),C=s(850504),j=s(807771),Q=s(518319);const{groupFilters:Y,groupsList:c}=F.A,a="groupBookmarkFilter",A=(U=[])=>U.some(D=>D.slug===a&&(D.value===!0||D.value==="true")),M=async({pageType:U,hub:D,clusterText:z,clusterInfo:Z})=>{const{data:ds}=await(0,S.bt)({type:U}),{cookedFilters:rs}=(0,Q.nA)({filterData:ds||[],hub:D,clusterText:z,clusterInfo:Z});return rs},m=({pageType:U,hub:D,clusterText:z})=>{const Z=(0,B.er)();return(0,t.useQuery)([Y,U],()=>M({pageType:U,hub:D,clusterInfo:Z,clusterText:z}))},I=async U=>{const{data:D}=await(0,S.nR)(U);return D},ps=({groupsOf:U,groupType:D,searchText:z,limit:Z,filterRules:ds,enabled:rs,nonOnboardingSkipped:H})=>(0,t.useInfiniteQuery)([c,D,U,ds],({pageParam:Ps})=>I({groupsOf:U,groupType:D,page:Ps,searchText:z,limit:Z,filterRules:ds,nonOnboardingSkipped:H,includeActiveUsersCount:!0}),{enabled:rs,retry:!1,getNextPageParam:(Ps,Is)=>Ps.hasMore?Is.length:void 0,onError:()=>{(0,C.A)(`Error fetching ${D===j.M.GROUP?"groups":D===j.M.PROGRAM?"programs":"organizations"}. Please try again.`,"error")}}),b=U=>V.A.invalidateQueries([c,U.groupType,U.groupsOf]),fs=async({group:U,groupType:D,groupsOf:z})=>{if((0,J.A)(U))return;const Z={bookmark:U.id,objectType:D};return U!=null&&U.isBookmarked?(0,S.OQ)(Z):(0,S.bE)(Z),Z},ms=({group:U,groupId:D,bookmarkStatus:z,groupType:Z,groupsOf:ds})=>{const rs=[c,Z,ds];V.A.getQueriesData(rs).forEach(([Ps,Is])=>{var Ks,bs;if(!((Ks=Is==null?void 0:Is.pages)!=null&&Ks.length))return;const as=(bs=Ps[3])!=null?bs:[],Ns=A(as);let Cs;if(Ns&&z){const es={...U,isBookmarked:!0};Cs=(0,W.A)(Is.pages,(w,xs)=>xs===0?{...w,groups:[es,...w.groups||[]]}:w)}else Ns&&!z?Cs=(0,W.A)(Is.pages,es=>({...es,groups:(0,y.A)(es.groups||[],w=>w.id!==D)})):Cs=(0,W.A)(Is.pages,es=>{const w=(0,W.A)(es.groups||[],xs=>xs.id===D?{...xs,isBookmarked:z}:xs);return{...es,groups:w}});V.A.setQueryData(Ps,{...Is,pages:Cs})})},vs=()=>(0,t.useMutation)(fs,{onMutate:U=>{const{group:D,groupType:z,groupsOf:Z}=U,{id:ds,isBookmarked:rs}=D;[Z,Z===j.n.MINE?j.n.ALL:j.n.MINE].forEach(H=>ms({group:D,groupId:ds,bookmarkStatus:!rs,groupType:z,groupsOf:H}))},onSuccess:(U,D)=>{const{group:z}=D;z.isBookmarked?(0,C.A)("Successfully Unbookmarked","success"):(0,C.A)("Successfully Bookmarked","success")},onError:(U,D)=>{const{group:z,groupType:Z}=D,{id:ds,isBookmarked:rs}=z;[j.n.MINE,j.n.ALL].forEach(H=>ms({group:z,groupId:ds,bookmarkStatus:!!rs,groupType:Z,groupsOf:H}))}})},428787:(Ls,K,s)=>{s.r(K),s.d(K,{default:()=>Gt});var t=s(715621),y=s(419611),J=s(537953),W=s(283766),S=s(145926),B=s(939291),V=s(90570),F=s(972185),C=s(532153),j=s(226898),Q=s(925079),Y=s(163081),c=s(967489);const a=({onSuccess:o,onError:v}={})=>{var N;const E=(0,Y.useSelector)(j.CaX),R=(N=E==null?void 0:E.groupSettings)==null?void 0:N.isPublished,[p,O]=(0,J.useState)(!1),f=(0,Y.useDispatch)();return{isPublishedLoading:p,isPublished:R,publishOrganization:async q=>{if(!E)throw Error("organization not found");O(!0);try{f((0,j.sIw)({...E,groupSettings:{...E.groupSettings,isPublished:q}}));const{data:ts}=await(0,c.jyX)({id:E.id,body:{group:E.id,updatedOrganizationSettings:{isPublished:q}}});f((0,j.sIw)(ts)),o==null||o(ts)}catch(ts){console.error(ts),f((0,j.sIw)(E)),v==null||v(ts)}O(!1)}}};var A=s(594952),M=s(356029),m=s(839050),I=s(312279),ps=s(499642),b=s(425170),fs=s(710366),ms=s(176148),vs=s(807771),U=s(31157),D=s(785868),z=s(674626),Z=s(361001),ds=s(324816),rs=s(248883);const H={leaveOrganizationModal:"leaveOrganizationModal__TGMg4",Content:"Content__uJiUB",Footer:"Footer__HZjnU"},Ps=({id:o,visible:v,onCancel:N,onConfirm:E,onLoading:R,content:p,primaryBtnType:O,primaryBtnText:f,secondaryBtnType:os,secondaryBtnText:q,secondaryBtnColor:ts,title:Es})=>(0,t.jsx)(rs.aF,{id:o,className:H.leaveOrganizationModal,title:Es,onClose:N,open:v,footer:(0,t.jsxs)("div",{className:H.Footer,children:[(0,t.jsx)(rs.$n,{onClick:N,disabled:R,type:os,color:ts,children:q},"cancel"),(0,t.jsx)(rs.$n,{onClick:E,type:O,loading:R,children:f},"continue")]}),children:(0,t.jsx)("p",{className:H.Content,children:p})});var Is=s(22443),Ks=s(670619),bs=s(766652),as=s(73627),Ns=s(160707),Cs=s(549547);const es=(o,v)=>{const N={};
1return o&&Object.keys(o).forEach(E=>{const R=v.find(({id:O})=>O===Number(E)),p=o[E];R&&!(0,Ns.A)(p)&&(N[E]={value:p})}),N},w=({fields:o=[],loading:v=!1,isStandardHub:N=!1,togglePrivacy:E=()=>{}})=>{const R=[];return o.forEach(p=>{if(!p||p.readOnly&&!p.value)return null;const O=(0,B.A)(p,"hint.name")?(0,B.A)(p,"hint.isLink",!1)&&(0,B.A)(p,"hint.hintUrl")&&(0,B.A)(p,"hint.hintUrl")!==""?(0,t.jsx)("a",{href:(0,B.A)(p,"hint.hintUrl"),target:"_blank",rel:"noopener noreferrer",children:(0,B.A)(p,"hint.name")}):(0,B.A)(p,"hint.name"):null;let f={id:p.slug,label:(0,t.jsxs)("div",{children:[p.name," ",p.readOnly?(0,t.jsx)("em",{children:"(Read Only)"}):null]}),labelText:`${p.name}${p.readOnly?" (Read only)":""}`,placeholder:p.placeholder,helperText:O,disabled:v||p.readOnly,rules:{required:{value:p.required}}};switch(p.type){case Cs.Y.float:f={...f,field:"number"};break;case Cs.Y.list:{f={...f};let os=(p.json||[]).map(q=>({label:q.name,value:q.name}));p.allowMultiple?(f.field="autocomplete",f.multiple=!0):(f.field="select",f.showClear=!0),f.options=os,f.autoComplete="off";break}case Cs.Y.link:f.rules={...f.rules,type:{value:"url"}},f.autoComplete="off";break;case Cs.Y.switch:f.field="checkbox",f.heading=f.label,f.label=p.placeholder,p.required&&(f.rules={...f.rules,validator:{value:(os,q,ts,Es)=>q===!1?(Es(`${p.header} is a required field.`),!1):!0}});break;case Cs.Y.longtext:f.field="richtext";break;default:f.field="text",f.autoComplete="off";break}R.push(f)}),R},xs={footer:"footer__DNPMV",joiningForm:"joiningForm__xcNlP",registrationCard:"registrationCard__bKUn6"};var As=s(537953);const yt=o=>o.map(v=>({slug:v.id,readOnly:!1,hint:v.data.hint,name:v.data.name,required:v.required,placeholder:v.data.placeholder,json:v.data.options,type:v.type,allowMultiple:!!v.data.allowMultiple})),tt=({userFields:o,questions:v,isQuestionLoading:N,fieldSetsObject:E,onSave:R,isSaving:p,joinButtonText:O="Join"})=>{const f=As.useRef(null),[os,q]=As.useState(es(o,v)),ts=e=>{q({...os,...e})},Es=w({fields:yt(v||[]),loading:N||p}),x=[{...E,fields:Es,title:"Registration Questions",srHiddenLegend:!0}],n=()=>
1{if(f.current&&f.current.validateForm()){const e=(0,as.A)(os,r=>r.value),i={flexCustomFields:{}};Object.keys(e).forEach(r=>{const l=v.find(u=>u.id===Number(r));if(l){let u=(0,B.A)(e,r);Array.isArray(u)&&(u=u.map(h=>h.value||h)),i.flexCustomFields[l.id]=u}}),R(i)}};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(bs.A,{className:xs.registrationCard,title:"Registration Questions",children:(0,t.jsx)(rs.lV,{id:"organization-joining-form",ref:f,fieldSets:x,data:os,onChange:ts,footer:null,className:xs.joiningForm})}),(0,t.jsx)("div",{className:xs.footer,children:(0,t.jsx)(rs.$n,{htmlType:"submit",className:xs.joinButton,onClick:n,size:"large",disabled:N||p,children:O})})]})},zs={QuestionFormContainer:"QuestionFormContainer__oU6BB",QuestionFormWrapper:"QuestionFormWrapper__zSWCG",heading:"heading__sBArl"},Xt=(o,v)=>`${getHubUrl(o)}/organizations/${v}`,Pt=({organization:o,questions:v,isQuestionLoading:N,saveOrganizationUser:E,isQuestionSaving:R})=>{const p=`You're almost there! Just a few more steps to join - ${o.name}`,O=f=>{E({identifier:o.identifier,data:f})};return(0,t.jsx)("div",{className:zs.QuestionFormContainer,children:N?(0,t.jsx)(y.A,{}):(0,t.jsxs)("div",{className:zs.QuestionFormWrapper,children:[(0,t.jsx)("h2",{className:zs.heading,children:p}),(0,t.jsx)(tt,{userFields:o.flexCustomFields||{},questions:v||[],isQuestionLoading:N,fieldSetsObject:{id:"organizationQuestionForm"},onSave:O,isSaving:R})]})})};var ys=s(202274),et=s(537953);const ot=(o,v)=>{const[N,E]=et.useState({}),{data:R,isLoading:p}=(0,ys.U$)(o.id,v);return et.useEffect(()=>{var O,f;!p&&R&&E({...R,all:((O=R.all)==null?void 0:O.sort((os,q)=>{var ts;return(ts=os==null?void 0:os.name)==null?void 0:ts.localeCompare(q==null?void 0:q.name)}))||R.all,mine:((f=R.mine)==null?void 0:f.sort((os,q)=>{var ts;return(ts=os==null?void 0:os.name)==null?void 0:ts.localeCompare(q==null?void 0:q.name)}))||R.mine})},[R,v,p]),{data:N,isLoading:p}};var Ms=s(910780);const Ys=o=>{const v=(0,m.iZ)(),N=(0,m.lx)(),E=(0,b.Gr)(v,N),R=E==null?void 0:E.userType,{data:p,isLoading:O,refetch:f}=(0,ys.xb)(o.id);return{questions:(0,Ms.yS)(p||[],R),isLoading:O,refetch:f}};var Vs=s(537953);const Ct=(o,v)=>{const[N,E]=Vs.useState([]),[R,p]=Vs.useState(0),{data:O,isLoading:f}=(0,ys.Gq)(o.id,v);return Vs.useEffect(()=>{f||(E(O==null?void 0:O.users),p((O==null?void 0:O.totalUsers)||0))},[O,v,f]),{users:N,totalUsers:R,isLoading:f}};var xt=s(537953);const nt=(o,v)=>{const[N,E]=xt.useState({}),{data:R,isLoading:p}=(0,ys.nq)(o.id,v);return xt.useEffect(()=>{p||E(R)},[R,v,p]),{resourceData:N,isLoading:p}};var Qs=s(537953);const Mt=(o,v)=>{const[N,E]=Qs.useState({}),{data:R,isLoading:p,refetch:O}=(0,ys.ZP)(o.id,v);return Qs.useEffect(()=>{p||E(R)},[R,v,p]),{eventsData:N,isLoading:p,refetch:O}};var Ot=s(961257),jt=s(527510),us=s(403948),kt=s(521260);const Tt=async(o,v)=>{const{data:N}=await Ot.Ay.fetchPosts({groupId:o.id},{useV2:v});return N},Rt=o=>{const v=(0,m.lx)(),N=(0,kt.ml)(v),E=(0,S.zy)();return(0,J.useEffect)(()=>()=>{jt.A.removeQueries([us.A.groupDiscussions,o.id])},[E.pathname]),(0,W.useQuery)({queryFn:async()=>{const R=await Tt(o,N);return R!=null?R:{questions:[],count:0}},queryKey:[us.A.groupDiscussions,o.id,N]})},it={organizationLandingPage:"organizationLandingPage__b1AqE"};var rt=s(644879);const at="joinModal",Zs="leaveModal",$s="publishModal",Xs="unpublishModal",lt="unsavedChangesModal",Lt={events:"Events",groups:"Groups",programs:"Programs",resources:"Resources",jobs:"Jobs",community:"Community",discussions:"Discussions"},It=({organization:o,refetchOrganization:v})=>{var N,E,R,p,O,f,os,q,ts,Es,x,n;const e=(0,S.W6)(),i=((N=(0,b.vAc)(e.location.search))==null?void 0:N.showRegistrationModal)==="true",l=new URLSearchParams(((E=e==null?void 0:e.location)==null?void 0:E.search)||"").has("redirectToLogin"),u=(R=o==null?void 0:o.groupSettings)==null?void 0:R.landingPage,[h,T]=(0,J.useState)(null),g=(0,m.lx)(),G=(0,m.er)(),d=(0,m.iZ)(),P=(0,m.Ay)(),L=(0,U.k)("singular"),$=(0,I.w)(),_=(0,M.E)(),X=(0,W.useQueryClient)(),Os=(0,B.A)(o,"groupSettings.isBaseVersion",!1),ns=(0,Ms.nv)(g,o,d),is=(0,B.A)(o,"groupSettings.featuredResourcesCategoryId",-1),hs=is>
10,js=(0,V.A)(d);(0,J.useEffect)(()=>{if(js&&l)return e.push(`/auth/sign-in?postLoginRedirect=${window.location.pathname}`);(!js&&!(0,Ms.yA)(g,P)||!(0,b.DLA)("organizations","advancedVersionEnabled",g)||Os)&&e.push("/404")},[g]);const Ts=(ls,Bs)=>{_({pgAnalytics:"Organization: User Action",pgAnalyticsCTA:Bs,pgAnalyticsSection:Lt[ls],pgAnalyticsOrganizationName:o.name,pgAnalyticsOrganizationId:o.id})},{getPendingOrganizations:Rs}=(0,Z.cb)(),Us=Rs(),cs=(0,Ms.dh)(d,g,o),gs=(0,Ms.s8)(d,g,o),k=(0,J.useMemo)(()=>(0,Ms.nk)(d,g,o),[d,g,o]),Ds=(0,ms.dt)(d,g,o)&&o.importStatus==="joined",ss=()=>T(null),ws=(0,Ms._1)(g),{questions:qs,isLoading:Fs}=Ys(o),{mutate:dt,isLoading:St}=(0,ys.Nr)({organizationId:o.id,onSuccess:()=>{_({pgAnalytics:"Organizations: Join Organization",pgAnalyticsCategory:"Organizations",pgAnalyticsPG_Is_Organization:!0,pgAnalyticsOrganizationName:o.name,pgAnalyticsOrganizationId:o.id}),window.location.href=ws,ss()}}),{mutate:_s,isLoading:Ws}=(0,ys.hg)({refetchOrganization:v,onSuccess:()=>{_({pgAnalytics:"Organizations: Join Organization",pgAnalyticsCategory:"Organizations",pgAnalyticsPG_Is_Organization:!0,pgAnalyticsOrganizationName:o.name,pgAnalyticsOrganizationId:o.id});const ls=(0,F.A)(d.groups,Bs=>Bs.groupType===vs.M.ORGANIZATION&&Bs.identifier===o.identifier?{...Bs,importStatus:"joined"}:Bs);X.invalidateQueries([ps.A.resources,o.id]),$((0,j.ltL)({...d,groups:ls})),e.push(`${ws}/${o.identifier}`),ss()}}),{users:st,totalUsers:ct,isLoading:ut}=Ct(o,gs),{data:Dt,isLoading:Ft}=ot(o,gs),{resourceData:ht,isLoading:Jt}=nt(o,gs),{data:Hs,isLoading:Bt}=(0,ys.nq)(o==null?void 0:o.id,gs,{resourceGroup:is},{enabled:hs}),{data:Js,isLoading:qt}=(0,ys.gH)(o==null?void 0:o.id),{data:Gs,isLoading:bt}=(0,ys.Gv)({organizationId:o.id}),gt=(0,Ms.rm)(g,o.identifier),{eventsData:pt,isLoading:mt,refetch:$t}=Mt(o,gs),{data:vt,isLoading:Wt,refetch:Ss}=Rt(o),ft=()=>T(at),Ht=()=>T(Zs),At=()=>T($s),Vt=()=>T(Xs),Qt=()=>e.push(gt),{programsModule:_t,groupsModule:Kt}=(0,ms.No)(g),se=Kt&&(0,b.SxS)(g,d,"groups",(p=e.location)==null?void 0:p.pathname),te=_t&&(0,b.SxS)(g,d,"programs",(O=e.location)==null?void 0:O.pathname),re=(0,b.mWh)("resources",g)&&(0,b.SxS)(g,d,"resources",(f=e.location)==null?void 0:f.pathname),ae=(0,b.mWh)("events",g)&&(0,b.SxS)(g,d,"events",(os=e.location)==null?void 0:os.pathname),le=(0,b.mWh)("opportunities",g)&&(0,b.DLA)("jobConnections","enabled",g)&&(0,b.SxS)(g,d,"opportunities",(q=e.location)==null?void 0:q.pathname),de=(0,b.mWh)("discussion",g)&&(0,b.SxS)(g,d,"discussion",(ts=e.location)==null?void 0:ts.pathname),zt=()=>{if((0,V.A)(d)){$((0,j.HPL)("groupPrograms")),(0,b.xn7)(g)&&$((0,ds.OS)("groupPrograms"));let ls;o.id&&(ls=(0,C.A)(o,["members","registration","loading","showJoinModal","showAdminsSection"]),(0,fs.SO)("groupDetails",JSON.stringify(ls))),$((0,j.M8X)({postLoginRedirectUrl:window.location.pathname,groupDetails:ls}));return}qs.length?ft():_s({identifier:o.identifier,data:{}})};(0,J.useEffect)(()=>{const ls=Us.find(({id:Bs})=>o.id===Bs);ls&&ls.importStatus==="imported"&&i&&!Fs&&zt()},[o,Fs]);const ee=()=>{$((0,j.pE9)(lt))},oe=()=>{$((0,j.k9u)())},ce=()=>{oe(),ss()},ue=ls=>`${(0,b.LmZ)(g)}/${ls}?organization=${o.id}`,ne=(0,B.A)(o,"groupSettings.showAdminsInDirectory",!1),{isPublished:he,publishOrganization:ie,isPublishedLoading:Yt}=a({onSuccess(){const ls=h===$s?"published":"unpublished";(0,b.mei)(`Successfully ${ls} ${o.name}`),ss()},onError(){const ls=h===$s?"publish":"unpublish";(0,b.mei)(`Failed to ${ls} ${o.name}`,"error"),ss()}}),Zt=(0,J.useMemo)(()=>(0,Ms.fq)({status:o.status,importStatus:o.importStatus,isPendingApproval:Ds,onJoinButtonClick:zt,showLeaveModal:Ht,organizationHubText:L,isJoinButtonDisabled:!!Fs,isJoinButtonLoading:!!Ws,completedRegistrationDate:o.completedRegistrationDate,showAdminsInDirectory:ne,hasAdminAccess:cs}),[o.status,o.importStatus,o.completedRegistrationDate,Ds,zt,Ht,L,Fs,Ws,ne,cs]),ge=(0,J.useMemo)(()=>{var ls;return`${(0,rt.Ye)({hubInfo:g,clusterInfo:G})} - Join ${(ls=o==null?void 0:o.name)!=null?ls:L}`},[g,G,o==null?void 0:o.name,L]);return(0,t.jsxs)("div",{className:it.organizationLandingPage,children:[!gs||(Zt==null?void 0:Zt.type)==="join"?(0,t.jsx)(rt.ZY,{customTitle:ge}):null,(0,t.jsx)(Is.$,{organization:o,landingPageData:u,handleJoinClick:ft,goToManageLandingPage:Qt,topViewButtonProps:Zt,hasAdminAccess:cs,organizationAccess:gs,finalJoinedAt:o==null?void 0:o.finalJoinedAt,users:st,totalUsers:ct,publishingProps:{isPublished:he,isPublishedLoading:Yt,handlePublishClick:At,handleUnpublishClick:Vt},adminToolsEnabled:k,organizationAdminURL:(0,Ms.Hj)(g,o.identifier)}),(0,t.jsx)(Ks.y,{organizationId:o.id,organizationIdentifier:o.identifier,organizationName:o==null?void 0:o.name,sections:((x=(Es=o==null?void 0:o.groupSettings)==null?void 0:Es.landingPage)==null?void 0:x.sections)||[],showUsers:!0,isGroupsEnabled:se,isProgramsEnabled:te,isResourcesEnabled:re,getViewAllUrl:ue,users:st,isUsersLoading:ut,allGroupsData:Dt,isAllGroupsLoading:Ft,resources:ht==null?void 0:ht.resources,isResourcesLoading:Jt,featuredResources:Hs==null?void 0:Hs.resources,isFeaturedResourcesLoading:Bt,organizationAccess:gs,showMainContent:!0,events:pt==null?void 0:pt.events,isEventsLoading:mt,isEventsEnabled:ae,refetchEvents:$t,organization:o,jobs:Js||[],isJobsEnabled:le,
1isJobsLoading:qt,showAlumniDirectory:ns&&!(0,V.A)(Gs==null?void 0:Gs.users),alumniDirectoryUsers:Gs==null?void 0:Gs.users,isAlumniListLoading:bt,trackUserActionEvents:Ts,isDiscussionEnabled:de,isDiscussionsLoading:Wt,discussions:vt==null?void 0:vt.questions,refetchDiscussions:Ss}),(0,t.jsx)(Q.A,{footer:null,visible:h===at&&!Fs,onCancel:ee,className:it.landingPagePreviewModal,dialogLabel:"Preview",destroyOnClose:!0,children:(0,t.jsxs)("div",{children:[(0,t.jsx)(z.A,{hideModal:ee}),(0,t.jsx)(Pt,{questions:qs||[],isQuestionLoading:Fs,organization:o,saveOrganizationUser:_s,isQuestionSaving:!!Ws})]})}),(0,t.jsx)(Ps,{id:Zs,title:"Confirm Leave",visible:h===Zs,onCancel:ss,primaryBtnType:"danger",onConfirm:()=>{dt({identifier:o.identifier,userId:d.id})},onLoading:St,content:`Are you sure you want to leave ${(n=o==null?void 0:o.name)!=null?n:L} ?`,primaryBtnText:"Leave",secondaryBtnText:"No",secondaryBtnType:"secondary"}),(0,t.jsx)(Ps,{id:$s,title:"Confirmation!",visible:h===$s,onCancel:ss,onConfirm:()=>ie(!0),onLoading:Yt,content:`Once the page is published, you will not be able to revert this 2 setting. Make sure all changes are done before publishing the page.`,primaryBtnType:"primary",primaryBtnText:"Publish",secondaryBtnText:"Cancel",secondaryBtnType:"tertiary",secondaryBtnColor:"blue"}),(0,t.jsx)(Ps,{id:Xs,title:"Confirmation!",visible:h===Xs,onCancel:ss,onConfirm:()=>ie(!1),onLoading:Yt,content:"Are you sure you want to unpublish the page?",primaryBtnType:"danger",primaryBtnText:"Unpublish",secondaryBtnText:"Cancel",secondaryBtnType:"tertiary",secondaryBtnColor:"blue"}),(0,t.jsx)(A.A,{id:lt,onCancel:oe,onContinue:ce,description:"Warning! Navigating away will cause you to lose unsaved changes."}),(0,t.jsx)(D.A,{})]})};var ks=s(579858),Nt=s(537953);const Et=()=>{const o=(0,I.w)(),{groupIdentifier:v}=(0,S.g)(),{isLoading:N,data:E}=(0,I.d)(p=>{var O;let f=p.group;return(f==null?void 0:f.identifier)!==v&&(f={}),{isLoading:!!((O=p.group)!=null&&O.loading),data:f}});return Nt.useEffect(()=>(o((0,ks.Ui)({groupIdentifier:v})),()=>{o((0,ks.Mj)())}),[v]),{data:E,isLoading:N,refetch:()=>{o((0,ks.Ui)({groupIdentifier:v}))}}},Ut={},Gt=()=>{const{data:o,isLoading:v,refetch:N}=Et();return(0,t.jsx)("div",{className:Ut.landingPagePreview,children:v||!(o!=null&&o.id)?(0,t.jsx)(y.A,{}):(0,t.jsx)("div",{children:(0,t.jsx)(It,{organization:o,refetchOrganization:N})})})}},474203:(Ls,K,s)=>{s.r(K),s.d(K,{default:()=>ps});var t=s(715621),y=s(145926),J=s(698879),W=s(537953),S=s(163081),B=s(226898),V=s(910780),F=s(839050),C=s(425170);const j=()=>{var b;const fs=(0,S.useSelector)(B.CaX),ms=(b=fs==null?void 0:fs.groupSettings)==null?void 0:b.isPublished,vs=(0,y.W6)(),U=(0,F.lx)(),D=(0,F.iZ)(),z=(0,V.dh)(D,U,fs);(0,W.useEffect)(()=>{ms===!1&&!z&&((0,C.mei)("This page is not published yet."),(0,C.eOV)({user:D,hub:U,history:vs}))},[ms])};var Q=s(413981);const Y=(0,J.A)(()=>Promise.all([s.e(1119),s.e(1256),s.e(223),s.e(928),s.e(8394),s.e(3874),s.e(8457),s.e(527),s.e(9356),s.e(1954),s.e(8645),s.e(6216),s.e(133),s.e(6392),s.e(8331),s.e(4676)]).then(s.bind(s,428787))),c=(0,J.A)(()=>Promise.all([s.e(1119),s.e(1256),s.e(223),s.e(928),s.e(8394),s.e(3874),s.e(8457),s.e(527),s.e(9356),s.e(1954),s.e(8645),s.e(6216),s.e(133),s.e(6392),s.e(8331),s.e(4676)]).then(s.bind(s,209406))),a="/hub/:identifier",A="/organizations/:groupIdentifier",M=()=>(j(),(0,t.jsxs)(y.dO,{children:[(0,t.jsx)(y.qh,{path:`${a}${A}`,component:Y,exact:!0}),(0,t.jsx)(Q.A,{path:`${a}${A}/resources/:resourceGroup`,component:c,permissionLevel:"approvedUser"}),(0,t.jsx)(Q.A,{path:`${a}${A}/resources`,component:c,permissionLevel:"approvedUser"})]})),m=(0,y.y)(M),ps=()=>(0,t.jsx)(m,{})},518319:(Ls,K,s)=>{s.d(K,{dt:()=>S,nA:()=>F,nr:()=>V,p_:()=>B});var t=s(961530),y=s(425170),J=s(807771),W=s(234860);const S="groupOrganizationFilter",B=({filterData:C,disabledFilters:j={}})=>{const Q=[],Y=[],c={};C=C.filter(m=>!(m.id==="groupCategoryFilter"&&m.json&&m.json.length===0)),C.forEach((m,I)=>{if(m.hidden=!0,window.innerWidth<767?(c[m.slug]={header:m.header},m.hidden=!1):((m.type==="search"||m.type==="icon"||m.slug==="groupCategoryFilter")&&(c[m.slug]={header:m.header},m.hidden=!1),I<5&&window.innerWidth>767&&(c[m.slug]={header:m.header},m.filterOrder=I,m.hidden=!1)),m.hidden){Q.push(m);return}Y.push(m)});const a={id:"remainingFilter",slug:"remainingFilter",header:"More Filters",icon:"campuskudos-ellipsis-h",type:"hidden",subFilters:Q},A=(0,t.A)(Y,m=>m.filterOrder);let M=A;return Q.length>0&&(M=A.concat(a)),j&&(M=(0,W.y3)({filterData:M,disabledFilters:j})),{filterData:M,nameObj:c}},V=C=>C==="organizations"?J.M.ORGANIZATION:C==="groups"?J.M.GROUP:J.M.PROGRAM;function F({filterData:C,hub:j,clusterText:Q,clusterInfo:Y}){return{cookedFilters:C.map(a=>{let A=a.header,M=a.placeholder;return a.hubTextIdentifier?(A=(0,y.HG4)(a.hubTextIdentifier,j,null,Q),M&&(M=M.replace("{{hubTextIdentifier}}",A))):a.clusterTextIdentifier&&(A=(0,y.HG4)(a.clusterTextIdentifier,null,null,Q),M&&(M=M.replace("{{clusterTextIdentifier}}",a.header||""))),{...a,header:A,placeholder:M}})}}},549547:(Ls,K,s)=>{s.d(K,{Y:()=>t});var t=(y=>(y.text="text",y.number="number",y.list="list",y.date="date",y.paragraph="paragraph",y.checkbox="checkbox",y.link="link",y.location="location",y.float="float",
2y.longtext="longtext",y.switch="switch",y))(t||{})},563561:(Ls,K,s)=>{s.d(K,{A:()=>B});var t=s(715621),y=s(248883),J=s(768835);const W={chip:"chip__wwpLh",selected:"selected__oJEIA",functional:"functional__dzeqD"},B=({text:V,isChecked:F,onChange:C,className:j})=>V?(0,t.jsx)(y.vu,{className:(0,J.A)(W.chip,!!j&&j,{[W.selected]:F,[W.functional]:!!C}),text:V,size:"xsmall",showBorder:!0,color:"grey",onClick:()=>C==null?void 0:C(!F)}):null},594952:(Ls,K,s)=>{s.d(K,{A:()=>B});var t=s(715621),y=s(665790),J=s(201172);const W={},B=({id:V,onCancel:F,onContinue:C,description:j="Navigating away from this page will cause you to lose unsaved changes."})=>(0,t.jsx)(J.A,{id:V,wrapClassName:"video-answers",className:"unsaved-changes-modal__alert",title:"Warning!",onCancel:F,footer:[(0,t.jsx)(y.A,{onClick:F,children:"Cancel"},"cancel"),(0,t.jsx)(y.A,{className:"bg-danger",onClick:C,children:"Continue"},"continue")],width:"471px",children:(0,t.jsx)("p",{children:j})})},695145:(Ls,K,s)=>{s.d(K,{P0:()=>j,Tg:()=>Q,h9:()=>c,xO:()=>Y});var t=s(939291),y=s(90570),J=s(575076),W=s(990454),S=s(425170),B=s(331237),V=s(176148),F=s(807771),C=(a=>(a[a.loggedOut=0]="loggedOut",a[a.loadingInvite=1]="loadingInvite",a[a.invalidUserType=2]="invalidUserType",a[a.invalidApplicationTimelineForNewUser=3]="invalidApplicationTimelineForNewUser",a[a.invalidApplicationTimelineForInvitedUser=4]="invalidApplicationTimelineForInvitedUser",a[a.pendingHubApproval=5]="pendingHubApproval",a[a.pendingGroupApproval=6]="pendingGroupApproval",a[a.pendingRegistrationQuestions=7]="pendingRegistrationQuestions",a[a.groupUserNotFound=8]="groupUserNotFound",a[a.pendingJoinConfirmation=9]="pendingJoinConfirmation",a[a.nonParticipatingAdmin=10]="nonParticipatingAdmin",a[a.joinedAndCanLeave=11]="joinedAndCanLeave",a[a.joinedAndCannotLeave=12]="joinedAndCannotLeave",a[a.groupNotPresent=13]="groupNotPresent",a[a.noModuleOrTabAccess=14]="noModuleOrTabAccess",a[a.invalidGroupType=15]="invalidGroupType",a))(C||{});class j{constructor({currentUser:A,hubInfo:M,clusterInfo:m,group:I,emailInviteLoading:ps=!1}){this.isProgram=!1,this.isGroup=!1,this.isGroupUserNotFound=!1,this.isJoinedUser=!1,this.isInvitedUser=!1,this.isGroupAdmin=!1,this.state=null,this.infoText=null,this.canJoin=!1;var b,fs,ms,vs,U;if((0,W.A)([M,m],J.A))throw new Error("GroupAccessControl Missing arguments");this.currentUser=A,this.hubInfo=M,this.clusterInfo=m,this.group=I,this.emailInviteLoading=ps,this.isProgram=((b=this.group)==null?void 0:b.groupType)===F.M.PROGRAM,this.isGroup=((fs=this.group)==null?void 0:fs.groupType)===F.M.GROUP,this.groupTypeLabel=this.isProgram?"program":"group",this.isGroupUserNotFound=((ms=this.group)==null?void 0:ms.status)==="not found",this.isJoinedUser=((vs=this.group)==null?void 0:vs.importStatus)==="joined",this.isInvitedUser=((U=this.group)==null?void 0:U.importStatus)==="imported",this.isGroupAdmin=(0,V.yM)(this.group),this.updateGroupAccess()}static getAccessInfo(A){return new j(A)}updateGroupAccess(){this.isEmptyGroupCheck()||this.isInvalidGroupTypeCheck()||this.isLoggedOutUserCheck()||this.hasNoModuleOrTabAccessCheck()||this.isFetchingInviteTokenCheck()||this.isHubUnapprovedUserCheck()||this.isNonParticipatingAdminCheck()||this.isInvalidUserTypeCheck()||this.isInvalidApplicationTimelineCheck()||this.isPendingRegistrationQuestionsCheck()||this.isPendingGroupApprovalCheck()||this.isInvitedUserCheck()||this.isGroupUserNotFoundCheck()||this.isJoinedUserCheck()||console.error("INVALID GROUP USER STATE")}isEmptyGroupCheck(){return!this.group||(0,y.A)(this.group)?(this.state=13,this.canJoin=!1,!0):!1}isInvalidGroupTypeCheck(){return!this.isProgram&&!this.isGroup?(this.state=15,this.canJoin=!1,console.error("This module is only for programs and groups"),!0):!1}isLoggedOutUserCheck(){return(0,y.A)(this.currentUser)&&this.isGroupUserNotFound?(this.state=0,this.canJoin=!0,!0):!1}hasNoModuleOrTabAccessCheck(){var A;const M=`${this.groupTypeLabel}s`;if(!(0,S.SxS)(this.hubInfo,this.currentUser,M,(A=window.location)==null?void 0:A.pathname))return this.canJoin=!1,this.state=14,!0;const{groupsModule:I,programsModule:ps}=(0,V.No)(this.hubInfo);return this.isGroup&&!I?(this.canJoin=!1,this.state=14,!0):this.isProgram&&!ps?(this.canJoin=!1,this.state=14,!0):!1}isFetchingInviteTokenCheck(){return this.emailInviteLoading?(this.state=1,this.infoText="Please wait while we fetch your invite details",this.canJoin=!1,!0):!1}isHubUnapprovedUserCheck(){var A;const{isApprovedUser:M}=(0,S.MDA)(this.currentUser,(A=this.hubInfo)==null?void 0:A.id);return M?!1:(this.state=5,this.infoText=`Your account must be approved before you can join this ${this.groupTypeLabel}. Please try again later after your account is approved`,this.canJoin=!1,!0)}isNonParticipatingAdminCheck(){var A;const{isSuperAdmin:M}=(0,S.MDA)(this.currentUser,(A=this.hubInfo)==null?void 0:A.id),m=this.isGroupAdmin&&!(0,t.A)(this.group,"groupSettings.showAdminsInDirectory",!1);return M||m?(this.state=10,this.infoText=`As an admin user, you are authorized to access all ${this.groupTypeLabel}s on your platform`,this.canJoin=!1,!0):!1}isInvalidUserTypeCheck(){var A;if(!this.isProgram||this.isJoinedUser||this.isInvitedUser)return!1;const M=((A=(0,S.mRd)(this.currentUser,this.hubInfo))==null?void 0:A.userType)||"",m=!(0,B.$s)(this.group,M);return this.isProgram&&m?(this.infoText="You are not eligible to join this program",this.state=2,this.canJoin=!1,!0):!1}isInvalidApplicationTimelineCheck(){if(!this.isProgram||this.isJoinedUser)return!1;const{canJoinAsMentee:A,canJoinAsMentor:M,infoText:m}=(0,B.Y5)({clusterInfo:this.clusterInfo,hubInfo:this.hubInfo,currentUser:this.currentUser,group:this.group});return!A&&!M?(this.state=this.isInvitedUser?4:3,this.infoText=m,this.canJoin=!1,!0):!1}isPendingRegistrationQuestionsCheck(){return!this.group||this.isGroupUserNotFound?!1:(0,y.A)(this.group.completedRegistrationDate)?(this.state=7,this.infoText=null,this.canJoin=!0,!0):!1}isPendingGroupApprovalCheck(){return!this.group||this.isGroupUserNotFound?!1:this.group.status==="pending"?(this.state=6,this.infoText=`Your registration must be approved before you can join this ${this.groupTypeLabel}. Please try again later after your registration is approved.`,this.canJoin=!1,!0):!1}isInvitedUserCheck(){return this.isInvitedUser?(this.state=9,this.canJoin=!0,!0):!1}isJoinedUserCheck(){if(this.group&&this.isJoinedUser){const A=this.group.groupType==="group"?"groups":"programs",M=(0,t.A)(this.hubInfo,`settings.moduleSettings.${A}.hideExitButton`,!1);return this.state=M?12:11,this.canJoin=!1,!0}return!1}isGroupUserNotFoundCheck(){return this.isGroupUserNotFound?(this.state=8,this.canJoin=!0,!0):!1}}const Q=({groupType:a,hubInfo:A})=>{try{const m={[F.M.PROGRAM]:"programs",[F.M.GROUP]:"groups"}[a];return m?(0,S.DLA)(m,"enableRefactoredAccessV1",A):!1}
2catch(M){return console.error(M),!1}};var Y=(a=>(a[a.join=0]="join",a[a.disabledJoin=1]="disabledJoin",a[a.disabledPendingApproval=2]="disabledPendingApproval",a[a.confirmRegistration=3]="confirmRegistration",a[a.disabledConfirmRegistration=4]="disabledConfirmRegistration",a[a.leave=5]="leave",a[a.noButton=6]="noButton",a))(Y||{});const c=({state:a})=>{const{nonParticipatingAdmin:A,loadingInvite:M,noModuleOrTabAccess:m,pendingHubApproval:I,groupNotPresent:ps,invalidApplicationTimelineForNewUser:b,invalidApplicationTimelineForInvitedUser:fs,invalidGroupType:ms,invalidUserType:vs,groupUserNotFound:U,loggedOut:D,joinedAndCanLeave:z,joinedAndCannotLeave:Z,pendingGroupApproval:ds,pendingJoinConfirmation:rs,pendingRegistrationQuestions:H}=C;switch(a){case A:case M:case m:case I:case ps:case ms:case b:case vs:return 1;case D:case U:return 0;case ds:return 2;case H:case rs:return 3;case fs:return 4;case z:return 5;case Z:return 6;default:return 6}}},763326:(Ls,K,s)=>{s.r(K),s.d(K,{default:()=>Es});var t=s(715621),y=s(537953),J=s(163081),W=s(145926),S=s(248883),B=s(251981),V=s(62644),F=s(768835),C=s(90570),j=s(736608),Q=s(939291),Y=s(698879),c=s(425170),a=s(710366),A=s(644879),M=s(662180),m=s(369780),I=s(226898),ps=s(246239),b=s(766652),fs=s(532153),ms=s(970806),vs=s(331237),U=s(324816),D=s(740751),z=s(660452),Z=s(829080),ds=s(579858),rs=s(366392),H=s(176148),Ps=s(167102);const Is={},bs=({allMembers:x,isPublic:n,isExtraSmall:e=!1,onMembersClick:i=void 0})=>((0,y.useEffect)(()=>{const l=document.getElementsByClassName("group-pills-container")[0].getElementsByClassName("members")[0];i&&(l.setAttribute("tabindex","0"),l.setAttribute("role","button"))},[]),(0,t.jsxs)("div",{role:"list",className:"group-pills-container",children:[(0,t.jsx)("span",{role:"listitem",children:(0,t.jsxs)("span",{className:"members",style:{cursor:i?"pointer":"default"},role:i?"button":"none",tabIndex:i?"0":"-1",onClick:i,children:[(0,t.jsx)(Ps.A,{className:"members-icon",focusable:!1,"aria-hidden":!0}),!e&&"Members:",(0,t.jsx)("span",{style:{fontWeight:"bold",marginLeft:"4px"},children:x})]})}),(0,t.jsxs)("span",{role:"listitem",className:`public ${n?"is_public":"is_private"}`,children:[n?(0,t.jsx)(S.C0,{icon:"pg-lock-open-o",size:16,"aria-hidden":"true"}):(0,t.jsx)(S.C0,{icon:"pg-lock-closed",size:16,"aria-hidden":"true"}),!e&&(0,t.jsx)("span",{style:{marginLeft:"4px"},children:n?"Public":"Private"})]})]}));var as=s(665790),Ns=s(560109),Cs=s(102736),es=s.n(Cs),w=s(695145),xs=s(551471),As=s.n(xs),yt=s(238891);const tt=({group:x,currentUser:n,hubInfo:e,clusterInfo:i})=>{var r,l,u;let h=null;const T=(0,vs.by)(x),{id:g}=(0,yt.A)(n,e),G=(0,vs.ag)(x,g);if(G&&["mentor","mentee"].includes(G))h=(r=T==null?void 0:T[G])==null?void 0:r.applicationEnd;else{const d=(l=T==null?void 0:T.mentor)==null?void 0:l.applicationEnd,P=(u=T==null?void 0:T.mentee)==null?void 0:u.applicationEnd;d&&P?As()(d).isAfter(As()(new Date))&&As()(P).isAfter(As()(new Date))?h=As()(P).isBefore(d)?P:d:As()(d).isAfter(As()(new Date))?h=d:As()(P).isAfter(As()(new Date))?h=P:h=As()(d).isAfter(As()(P))?d:P:d?h=d:P?h=P:h=null}return h?(0,c.poE)(h,i,"medium",!1,!1):null};var zs=s(537953);const Xt=({group:x,currentUser:n,hubInfo:e,clusterInfo:i})=>{const r=(0,y.useMemo)(()=>tt({clusterInfo:i,currentUser:n,group:x,hubInfo:e}),[i,n,x,e]);return r?(0,t.jsxs)("div",{style:{marginRight:"16px"},children:[(0,t.jsx)("div",{children:"Join program by"}),(0,t.jsx)("div",{children:(0,c.poE)(r,i,"medium",!1,!1)})]}):null},Pt=zs.memo(Xt),ys=({clusterInfo:x,hubInfo:n,currentUser:e,emailInviteLoading:i,group:r,groupType:l,handleEditQuestions:u,handleLeave:h,handleOnClickJoin:T,leavingGroup:g,onAdminButtonClick:G,questionsLoading:d,toggleAboutModal:P,toggleNotificationModal:L,status:$,userRole:_})=>{const X=l==="group"?"group":"program",Os=(0,W.zy)(),ns=(0,y.useRef)();(0,y.useEffect)(()=>{var Rs;new URLSearchParams(Os.search).get("openQuestions")==="true"&&((Rs=ns==null?void 0:ns.current)==null||Rs.handleClick())},[Os.search]);const{action:is,disabled:hs,infoText:js}=(0,y.useMemo)(()=>(0,H.$X)({currentUser:e,hubInfo:n,clusterInfo:x,group:{...r,status:(r==null?void 0:r.oldStatus)||r.status},emailInviteLoading:i}),[e,n,x,r,i]),Ts=()=>
2{if((0,w.Tg)({groupType:l,hubInfo:n})){const k=w.P0.getAccessInfo({clusterInfo:x,currentUser:e,hubInfo:n,emailInviteLoading:i,group:r});switch((0,w.h9)(k)){case w.xO.join:return(0,t.jsx)(as.A,{id:"join-group-cta",className:"join-group-cta",onClick:T,loading:d||i,"aria-label":`Join ${X}`,ref:ns,children:"Join"});case w.xO.disabledJoin:return(0,t.jsx)(Ns.A,{placement:"top",title:k.infoText,getPopupContainer:ss=>ss&&ss.parentNode?ss.parentNode:document.body,children:(0,t.jsx)(as.A,{id:"join-group-cta",className:"join-group-cta",loading:d||i,"aria-label":`Join ${X}`,disabled:!0,children:"Join"})});case w.xO.disabledPendingApproval:return(0,t.jsx)(Ns.A,{placement:"top",title:k.infoText,getPopupContainer:ss=>ss&&ss.parentNode?ss.parentNode:document.body,children:(0,t.jsx)(as.A,{disabled:!0,className:"join-group-cta",children:"Pending Approval"})});case w.xO.confirmRegistration:return(0,t.jsx)(as.A,{className:"join-group-cta",onClick:u,loading:d,children:"Confirm Registration"});case w.xO.disabledConfirmRegistration:return(0,t.jsx)(Ns.A,{placement:"top",title:k.infoText,getPopupContainer:ss=>ss&&ss.parentNode?ss.parentNode:document.body,children:(0,t.jsx)(as.A,{disabled:!0,className:"join-group-cta",children:"Confirm Registration"})});case w.xO.leave:return(0,t.jsx)(as.A,{type:"danger",className:"leave-cta",onClick:h,loading:g,children:`Leave ${X}`});case w.xO.noButton:return null;default:return console.error("INVALID GROUP BUTTON JOIN STATE"),null}}if(is===H.IN.join)return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(Pt,{group:r,hubInfo:n,currentUser:e}),(0,t.jsx)("div",{children:(0,t.jsx)(Ns.A,{placement:"top",title:js,getPopupContainer:k=>k&&k.parentNode?k.parentNode:document.body,children:(0,t.jsx)(as.A,{id:"join-group-cta",className:"join-group-cta",onClick:T,loading:d||i,"aria-label":`Join ${X}`,disabled:hs,ref:ns,children:"Join"})})})]});const Us=(0,c.vAc)(Os.search)||{}
2,{isViewOnly:cs}=Us;return cs||!!sessionStorage.getItem("isViewOnly")?null:is===H.IN.pendingApproval?(0,t.jsx)(as.A,{disabled:!0,className:"join-group-cta",children:"Pending Approval"}):is===H.IN.confirmRegistration?(0,t.jsx)(Ns.A,{placement:"top",title:js,getPopupContainer:k=>k&&k.parentNode?k.parentNode:document.body,children:(0,t.jsx)(as.A,{className:"join-group-cta",onClick:u,disabled:hs,loading:d,children:"Confirm Registration"})}):is===H.IN.leave?(0,t.jsx)(as.A,{type:"danger",className:"leave-cta",onClick:h,loading:g,children:`Leave ${X}`}):is===H.IN.permissionUser?(0,t.jsx)(Ns.A,{placement:"top",title:`As an admin user, you are authorized to access all ${X}s on your platform`,getPopupContainer:k=>k&&k.parentNode?k.parentNode:document.body,children:(0,t.jsx)(as.A,{disabled:!0,className:"join-group-cta",children:"Join"})}):null};return(0,y.useEffect)(()=>{!window.localStorage.getItem(`question-modal-${r==null?void 0:r.identifier}-${e&&e.id}`)&&is===H.IN.confirmRegistration&&!hs&&r.importStatus==="imported"&&(u(),window.localStorage.setItem(`question-modal-${r==null?void 0:r.identifier}-${e&&e.id}`,!0))},[is,hs]),(0,t.jsx)("div",{className:`main-cta__wrapper ${r.isFunctionalGroup?"functional_group":""}`,children:r.isFunctionalGroup?(0,t.jsxs)("div",{className:"functional-group__pills",role:"list",children:[r.isGroupAdmin&&!(0,vs.IF)(e,r,n)&&(0,t.jsx)("span",{role:"listitem",children:(0,t.jsx)(as.A,{onClick:()=>G("admin"),children:"Admin"})}),$==="approved"&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("span",{role:"listitem",children:(0,t.jsxs)(as.A,{onClick:()=>L(!0),children:[(0,t.jsx)("img",{src:"https://cdn.peoplegrove.com/admin/1639995402818Vector.svg",alt:"gear","aria-hidden":!0}),"Manage"]})}),(0,t.jsx)("span",{role:"listitem",children:(0,t.jsxs)(as.A,{onClick:()=>P(!0),children:[(0,t.jsx)("img",{src:"https://cdn.peoplegrove.com/admin/1639995466373Vector.svg",alt:"info","aria-hidden":!0}),"About"]})})]}),(0,t.jsx)("span",{role:"listitem",children:Ts()})]}):Ts()})};ys.propTypes={groupType:es().string.isRequired,status:es().string.isRequired,handleLeave:es().func.isRequired};const et={toggleNotificationModal:ds.c4,toggleAboutModal:ds.J$},ot=(0,J.connect)(null,et)(ys);var Ms=s(992972),Ys=s.n(Ms);const Vs=({windowWidth:x,shrink:n,allMembers:e,isPublic:i,showAdmins:r,isFunctionalGroup:l,activeKey:u,handleShowAdminsClick:h,isLoggedOutUser:T,noLogo:g,groupType:G,onClickMembersPill:d})=>{const P=x<=c.MJO.screen_xxs,L=x<c.MJO.screen_sm,$=x>=c.MJO.screen_sm&&x<c.MJO.screen_lg,_=x>=c.MJO.screen_lg;return(0,t.jsxs)("div",{className:Ys()("group-header__pills-bar",{fixed:n&&!L,hidden:n&&L||_,"show-xs":L,"tablet-fixed":$,"logged-out":T,"no-logo":g,"xs-view":P}),children:[(0,t.jsx)(bs,{allMembers:e,isPublic:i,onMembersClick:d||void 0,isExtraSmall:P}),r&&(0,t.jsx)(as.A,{className:Ys()("group-header__pills-bar__btn",{hide:u!=="about"||l&&x>575}),"aria-label":P?"Admins":G==="group"?"Group Admins":"Program Admins",onClick:h,children:P||L?"Admins":G==="group"?"Group Admins":"Program Admins"})]})};Vs.propTypes={windowWidth:es().number.isRequired,shrink:es().bool.isRequired,allMembers:es().number.isRequired,isPublic:es().bool.isRequired,showAdmins:es().bool.isRequired,activeKey:es().string.isRequired,handleShowAdminsClick:es().func.isRequired};const Ct=Vs,xt={};var nt=s(272329),Qs=s(807771),Mt=s(37608),Ot=Object.defineProperty,jt=(x,n,e)=>n in x?Ot(x,n,{enumerable:!0,configurable:!0,writable:!0,value:e}):x[n]=e,us=(x,n,e)=>jt(x,typeof n!="symbol"?n+"":n,e);const{Meta:kt}=b.A;class Tt extends y.Component{constructor(){super(...arguments),us(this,"state",{isLeaveModalOpen:!1,completeRegistration:!1,programModal:""}),us(this,"handleShowAdminsClick",()=>{const{showAdminsSection:n,handleShowAdmins:e}=this.props;e(!n)}),us(this,"handleLeaveClick",()=>{(0,c.b7U)(this.props.history,["source"]),this.setState({isLeaveModalOpen:!0})}),us(this,"closeLeaveModal",()=>{this.setState({isLeaveModalOpen:!1})}),us(this,"handleLeaveGroup",()=>{const{leaveGroup:n,group:e,trackPGAnalytics:i}=this.props;(0,nt.MH)({groupsOf:Qs.n.MINE,groupType:e==null?void 0:e.groupType}),i({pgAnalytics:"Groups: Leave Group",pgAnalyticsCategory:"Groups / Programs V2",pgAnalyticsGroupId:e&&e.id,pgAnalyticsGroupType:e&&e.groupType,pgAnalyticsSource:e&&(e.groupType==="group"?"Group":"Program"),...e.parentGroup&&{pgAnalyticsPG_Is_Organization:!0,pgAnalyticsOrganizationId:e.parentGroup}}
2),n(),this.closeLeaveModal()}),us(this,"renderLeaveModal",()=>{const{isLeaveModalOpen:n}=this.state,{leavingGroup:e,groupType:i}=this.props;return(0,t.jsx)(S.aF,{className:"modal__alert__group",title:`Leave ${i==="group"?"Group":"Program"}`,titleAs:"h2",open:n,onClose:this.closeLeaveModal,footer:(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(S.$n,{type:"tertiary",onClick:this.closeLeaveModal,children:"Cancel"}),",",(0,t.jsx)(S.$n,{type:"danger",onClick:this.handleLeaveGroup,loading:e,children:`Yes, leave ${i==="group"?"group":"program"}`}),","]}),disableBackdropClose:!0,children:(0,t.jsxs)("div",{className:"modal-alert-group__body",children:[(0,t.jsx)(D.A,{className:"modal-alert-group__alert","aria-label":"warning"}),"Are you sure you want to leave this"," ",i==="group"?"group":"program"]})})}),us(this,"shouldRedirectToProgramsOnboarding",()=>{try{const{group:n,hubInfo:e,currentUser:i}=this.props;return(0,C.A)(n)||(0,C.A)(e)||!(0,C.A)(i)?!1:!!((n==null?void 0:n.groupType)===Qs.M.PROGRAM&&(0,Mt.x)(e))}catch(n){return console.error(n),!1}}),us(this,"getPostLoginRedirectUrl",({joinGroup:n=!1}={})=>{var e;const{group:i,hubInfo:r}=this.props||{};let l=window.location.pathname;return n&&(l+="?joinGroup=true"),this.shouldRedirectToProgramsOnboarding()?(((e=i==null?void 0:i.groupSettings)==null?void 0:e.liteAccessForInvitedMembers)&&sessionStorage.setItem("programOnboardingPrimaryIdentifier",i.identifier),`${(0,c.LmZ)(r)}/programs/onboarding/${i.identifier}`):l}),us(this,"handleOnClickJoin",()=>{const{currentUser:n,group:e,postInviteAction:i,authSetAuthModalVisible:r,trackPGAnalytics:l,setGroupShowJoinModal:u,handleActionFetchFromInviteToken:h,handleJoinGroup:T,name:g,authSetAuthModalSource:G,clusterInfo:d,setAuthSource:P,postLoginRedirect:L}=this.props;(0,nt.MH)({groupsOf:Qs.n.MINE,groupType:e==null?void 0:e.groupType}),l({pgAnalytics:"Groups: Join Group",pgAnalyticsCategory:"Groups / Programs V2",pgAnalyticsGroupId:e&&e.id,pgAnalyticsGroupType:e&&e.groupType,pgAnalyticsSource:e&&(e.groupType==="group"?"Group":"Program"),pgAnalyticsGroupName:g,...e.parentGroup&&{pgAnalyticsPG_Is_Organization:!0,pgAnalyticsOrganizationId:e.parentGroup}}),G("groupPrograms"),(0,c.K3Z)(d)&&P("groupPrograms");const $=sessionStorage.getItem("groupInviteToken");if($){h({token:$,objectType:"group",groupId:e.id,groupObject:e,postLoginRedirectUrl:this.getPostLoginRedirectUrl()}),sessionStorage.removeItem("groupInviteToken");return}if((0,C.A)(n)){let _;if(e.id&&(_=(0,fs.A)(e,["members","registration","loading","showJoinModal","showAdminsSection"]),(0,a.SO)("groupDetails",JSON.stringify(_))),i==="openAuthModal")r(!0);else{const[X,Os]=(L==null?void 0:L.split("?"))||[];let ns="";X?ns=`${L}${Os?"&":"?"}joinGroup=true`:ns=this.getPostLoginRedirectUrl({joinGroup:!0}),T({postLoginRedirectUrl:ns,groupDetails:_});return}}else u(!0)}),us(this,"showEditQuestions",()=>{const{setGroupShowJoinModal:n,setGroupEditingResponse:e,group:i}=this.props;n(!0),i!=null&&i.completedRegistrationDate&&e(!0)}),us(this,"handleNotNowClick",()=>{this.setState({completeRegistration:!1})}),us(this,"handleCompleteRegistrationClick",()=>{sessionStorage.removeItem("programModalFor"),this.setState({completeRegistration:!1,programModal:!1})}),us(this,"handleCancelButtonClick",()=>{const{hubInfo:n,group:e}=this.props;window.location.href=`/hub/${n.identifier}/manage-program/${e.identifier}`})}componentDidMount(){const{identifier:n,status:e,checkForPermission:i,importStatus:r=void 0}=this.props,l=!i()&&sessionStorage.getItem("programModalFor");l===n&&e==="not found"&&r!==void 0&&sessionStorage.removeItem("programModalFor"),l&&l===n&&["approved","pending"].includes(e)&&this.setState({completeRegistration:!this.state.completeRegistration,programModal:l})}render(){const{group:n,hubInfo:e,currentUser:i,activeKey:r,shrink:l,name:u,logoUrl:h,allMembers:T,activeUserCount:g,isPublic:G,showAdmins:d,windowWidth:P,groupType:L,status:$,checkForPermission:_,confirmRegistration:X,showJoinModal:Os,questionsLoading:ns,isLoggedOutUser:is,emailInviteLoading:hs,leavingGroup:js,isMobile:Ts,goBack:Rs,showBack:Us,clusterInfo:cs,onClickMembersPill:gs,isFunctionalGroup:k,onAdminButtonClick:Ds,completedRegistrationDate:ss,importStatus:ws,userRole:qs,history:Fs,showActiveMemberCount:dt}=this.props,St=(0,Z.MU)(),_s=(0,c.V8b)(i,e),Ws=(0,H.aJ)(i,n),{registration:{registrationInProgress:st}
2,coverPhotoUrl:ct,coverBackgroundColor:ut,groupSettings:Dt}=n,{coverPhotodisplayMode:Ft}=Dt||{},{navBackgroundColor:ht,navBarTheme:Jt}=(0,Q.A)(cs,"settings.coreSettings.branding",{});let Hs={};ut?Hs={backgroundColor:ut}:ct&&(Hs={backgroundImage:`url('${ct}')`});const Bt=h?{}:{marginLeft:"0px"},Js=!h;let Gs=(P>1114?1114:P)-(Js?365:482);$==="approved"&&(Gs-=15),$==="pending"&&(Gs-=35);const bt=tt({clusterInfo:cs,currentUser:i,group:n,hubInfo:e});let gt=!1;L==="mentorshipProgram"&&!(0,C.A)(bt)&&(gt=!0),Gs-=106,k&&(Gs=Js?430:320);const pt=P>=c.MJO.screen_lg?{maxWidth:`${Gs}px`}:null,mt=(0,H.kq)(i,e,n),{action:$t}=(0,H.$X)({currentUser:i,hubInfo:e,clusterInfo:cs,group:n}),vt=()=>{let{userRole:Wt,showJoinModal:Ss}=n;const{source:ft}=(0,c.vAc)(Fs.location.search)||{};if(ft==="jtbd"&&!Ss&&(!Ws||$t===H.IN.confirmRegistration)&&((0,I.Ijh)(!0),Ss=!0),(0,w.Tg)({groupType:L,hubInfo:e})){const{canJoin:Kt}=w.P0.getAccessInfo({clusterInfo:cs,currentUser:i,hubInfo:e,emailInviteLoading:hs,group:n});return(Kt||mt)&&(Ss||st)}const At=(0,c.xn7)(e)&&!(0,ms.A)(["admin","not found"],$),Vt=(0,Q.A)((0,c.Gr)(i,e),"userType");if(!(0,C.A)(this.state.programModal)&&this.state.programModal===n.identifier)return!1;const Qt=L==="group"&&$==="admin"&&(n==null?void 0:n.id)&&!_()&&Ss;return($!=="admin"&&L==="mentorshipProgram"?(0,vs.$s)(n,Vt):!0)&&(Ss||st)&&(mt||X()||$==="not found"&&!_()||At)||At&&(0,C.A)(ss)&&!_()&&Ss||!Wt&&L==="mentorshipProgram"&&$!=="not found"&&(n==null?void 0:n.id)&&!_()&&Ss||Qt};return(0,t.jsxs)("div",{className:"group-header-container",children:[(0,t.jsxs)("div",{className:"group-header",children:[(0,t.jsx)(ps.hR,{title:"",navBarTheme:Jt,navBackgroundColor:ht,showNav:Ts&&Us&&(0,c.VsJ)(i,e),backButtonOnClick:Rs}),(0,t.jsx)("div",{className:(0,F.A)("group-header__cover",(0,C.A)(Hs)&&"group-header__cover__empty",Ft==="focus"&&"group-header__cover--focus"),style:Hs}),(0,t.jsx)("div",{className:(0,F.A)("group-header__info",{fixed:l,"logged-out":is,"no-logo":Js,"has-logo":!Js,"functional-group__header":k}),children:(0,t.jsxs)("div",{className:"pg-container",children:[h&&(0,t.jsx)(ps.A0,{className:(0,F.A)("group-header__info_logo",{shrinked:l}),src:h,alt:`${u} Logo`}),(0,t.jsxs)("div",{className:(0,F.A)("group-header__info_meta",{"move-to-left":l}),style:Bt,children:[(0,t.jsxs)("div",{className:(0,F.A)("group-header__info_meta__left",{"full-width":Js,"has-join-by-date":gt}),children:[(0,t.jsx)(z.A,{placement:"top",title:u,className:`group-header__info_meta__left__name__tooltip${St?" group-header__info_meta__left__name__tooltip__font-scaled-up":""}`,children:(0,t.jsx)("h2",{className:"group-header__info_meta__left__name",style:pt,children:u})}),(0,t.jsx)("div",{className:"group-header__info_meta__left__cta show-xs",children:(0,t.jsx)(ot,{hubInfo:e,clusterInfo:cs,currentUser:i,group:n,groupType:L,status:$,handleLeave:this.handleLeaveClick,handleOnClickJoin:this.handleOnClickJoin,questionsLoading:ns,emailInviteLoading:hs,leavingGroup:js,handleEditQuestions:this.showEditQuestions,approvedUser:_s,onAdminButtonClick:Ds,importStatus:ws,userRole:qs})}),P>=c.MJO.screen_lg&&(0,t.jsx)("div",{className:"hidden-xs",style:{display:"flex"},children:(0,t.jsx)(bs,{allMembers:dt?g:T,isPublic:G,onMembersClick:Ws||n.isGroupAdmin?gs:void 0})})]}),(0,t.jsx)("div",{className:"group-header__info_meta__right hidden-xs",children:(0,t.jsx)(ot,{hubInfo:e,clusterInfo:cs,onAdminButtonClick:Ds,currentUser:i,group:n,groupType:L,status:$,checkForPermission:_,confirmRegistration:X,handleLeave:this.handleLeaveClick,handleOnClickJoin:this.handleOnClickJoin,questionsLoading:ns,emailInviteLoading:hs,leavingGroup:js,handleEditQuestions:this.showEditQuestions,approvedUser:_s,importStatus:ws,userRole:qs})})]})]})}),(0,t.jsx)(Ct,{windowWidth:P,shrink:l,activeKey:r,isFunctionalGroup:n.isFunctionalGroup,isPublic:G,allMembers:dt?g:T,showAdmins:d,handleShowAdminsClick:this.handleShowAdminsClick,isLoggedOutUser:is,noLogo:Js,groupType:L,onClickMembersPill:Ws?gs:null})]}),this.renderLeaveModal(),vt()&&(0,t.jsx)(rs.A,{handleCancelButtonClick:this.handleCancelButtonClick}),(0,t.jsxs)(S.aF,{id:"complete-registration-modal",className:"complete-registration-modal",title:"Complete Your Registration",bodyProps:{className:"complete-registration-modal-body"},footerProps:{className:"complete-registration-modal-footer"},footer:(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(S.$n,{className:"footer-btn",type:"tertiary",onClick:this.handleNotNowClick,children:"Not now"}),(0,t.jsx)(S.$n,{className:"footer-btn",type:"primary",onClick:this.handleCompleteRegistrationClick,children:"Complete registration"})]}),disableBackdropClose:!1,open:this.state.completeRegistration,hideClose:!0,children:[(0,t.jsx)(S.C0,{src:"https://cdn.peoplegrove.com/admin/1681709673920Frame%2018887.svg"}),(0,t.jsxs)("p",{children:["You're almost there! To get started with our ",n.name,", you'll need to finish the registration process."]}),(0,t.jsxs)("p",{children:["To do this later, go to Connect ",">"," Programs."]})]})]})}}const Rt=({appReducer:{hubInfo:x,currentUser:n,clusterInfo:e,windowWidth:i,isMobile:r},group:l,group:{activeKey:u,allMembers:h,activeUserCount:T,groupSettings:{showAdmins:g=!1,showActiveMemberCount:G=!1},groupType:d,identifier:P,leavingGroup:L,loading:$,logoUrl:_,name:X,public:Os,showAdminsSection:ns,showJoinModal:is,status:hs,visibleTabs:js,registration:{questionsLoading:Ts,questions:Rs},importStatus:Us,completedRegistrationDate:cs},auth:{emailInviteLoading:gs,postInviteAction:k,postLoginRedirect:Ds}})=>({activeKey:u,allMembers:h,postLoginRedirect:Ds,activeUserCount:T,clusterInfo:e,currentUser:n,emailInviteLoading:gs,group:l,groupType:d,hubInfo:x,identifier:P,isPublic:Os,leavingGroup:L,loading:$,logoUrl:_,name:X,postInviteAction:k,questions:Rs,questionsLoading:Ts,showAdmins:g,showAdminsSection:ns,showJoinModal:is,status:hs,visibleTabs:js,windowWidth:i,isMobile:r,importStatus:Us,completedRegistrationDate:cs,showActiveMemberCount:G}),it={authSetAuthModalVisible:I.sYP,handleShowAdmins:I.gym,leaveGroup:I.jaN,setGroupEditingResponse:I.VK9,setGroupShowJoinModal:I.Ijh,trackPGAnalytics:I.xrH,handleActionFetchFromInviteToken:I.F7r,handleJoinGroup:I.M8X,setGroup:ds.sI,authSetAuthModalSource:I.HPL,setAuthSource:U.OS},rt=(0,W.y)((0,J.connect)(Rt,it)(Tt));var at=s(393418),Zs=s(882154),$s=s(422487),Xs=s(391954);class lt extends y.PureComponent{getVisibleTabs(){const{total:n,tabs:e,activeKey:i}=this.props;let r=[];return e.forEach(l=>l.visible&&!(l.id==="events"&&n===0)&&r.push({key:l.id,label:l.title,active:i===l.id,className:"group-navigation-tab"})),r}componentDidMount(){const{groupId:n,groupIdState:e,fetchEventsWithGroupId:i,tabs:r}=this.props;let l=!1;for(let u of r)if(u.id==="events"){l=!0;break}(0,at.A)(n)&&n!==e&&l&&i(n)}componentDidUpdate(n){const{history:e,setActiveTabKey:i,tabs:r}=this.props,l=r.map(u=>u.id);if(e.action==="POP"){const u=e.location.pathname.split("/"),h=u[u.length-1];l.includes(h)&&h!==n.activeKey&&i(h)}}render(){const{tabs:n,activeKey:e,shrink:i,windowWidth:r,isLoggedOutUser:l,noLogo:u,handleTabChange:h,total:T,loading:g,hubInfo:G}=this.props,d=(0,c.qwl)(G);return(0,t.jsx)("div",{className:Ys()("tabs-container",{fixed:i,"tablet-fixed":r>=c.MJO.screen_sm&&r<c.MJO.screen_lg,"logged-out":l,"no-logo":u,"nav-bar-v2":d,"nav-bar-v1":!d}),children:(0,t.jsx)("div",{className:"pg-container",children:(0,t.jsx)(S.tU,{position:"top",tabs:this.getVisibleTabs(),className:"visible-tabs",tabListClassName:"tab-list-container",onChange:h,theme
2Color:"green"})})})}}const Lt=({events:{total:x,groupId:n,loading:e},appReducer:{hubInfo:i}})=>({total:x,groupIdState:n,loading:e,hubInfo:i}),It={fetchEventsWithGroupId:$s.aq},ks=(0,Zs.A)((0,W.y)((0,J.connect)(Lt,It)((0,y.memo)(lt))),[Xs.A]),Nt=(0,Y.A)(()=>Promise.all([s.e(1119),s.e(7450)]).then(s.bind(s,474751))),Et=(0,Y.A)(()=>Promise.all([s.e(8924),s.e(2035),s.e(1888),s.e(8457),s.e(527),s.e(2822),s.e(7507),s.e(8331),s.e(6675)]).then(s.bind(s,20455))),Ut=(0,Y.A)(()=>Promise.all([s.e(1119),s.e(928),s.e(3566),s.e(3874),s.e(7093),s.e(5253),s.e(1954),s.e(4962),s.e(1791),s.e(2906),s.e(6260),s.e(7756)]).then(s.bind(s,122304))),wt=(0,Y.A)(()=>Promise.all([s.e(1119),s.e(9787),s.e(9624),s.e(9356),s.e(3368),s.e(3232)]).then(s.bind(s,313823))),Gt=(0,Y.A)(()=>Promise.all([s.e(6365),s.e(8394),s.e(4048),s.e(8457),s.e(5801),s.e(7417),s.e(9436),s.e(4088),s.e(9363),s.e(8246)]).then(s.bind(s,537524))),o=(0,Y.A)(()=>Promise.all([s.e(2685),s.e(6365),s.e(6722),s.e(793),s.e(1959),s.e(7236),s.e(7875),s.e(3206),s.e(6583),s.e(281),s.e(8477),s.e(5688),s.e(4079),s.e(3918)]).then(s.bind(s,282073))),v=x=>{switch(x){case"about":return Nt;case"members":case"mentors":return wt;case"discussion":return Et;case"resources":return Gt;case"events":return Ut;case"opportunities":return o;default:console.warn(`Unknown tab key: ${x}`)}};var N=s(122110);const E={};var R=Object.defineProperty,p=(x,n,e)=>n in x?R(x,n,{enumerable:!0,configurable:!0,writable:!0,value:e}):x[n]=e,O=(x,n,e)=>p(x,typeof n!="symbol"?n+"":n,e);const f=(0,Y.A)(()=>Promise.all([s.e(1119),s.e(8924),s.e(2035),s.e(1888),s.e(8457),s.e(527),s.e(5801),s.e(2822),s.e(7507),s.e(5213)]).then(s.bind(s,70577)));class os extends y.PureComponent{constructor(n){super(n),O(this,"checkForFlags",()=>{const{hubInfo:e,history:i={},pageType:r,currentUser:l}=this.props,{location:u}=i,{programsModule:h,groupsModule:T}=(0,H.No)(e);return r==="group"&&(!T||!(0,C.A)(l)&&!(0,c.GHD)(e,l,"groups",u==null?void 0:u.pathname))||r==="program"&&(!h||!(0,C.A)(l)&&!(0,c.GHD)(e,l,"programs",u==null?void 0:u.pathname))?(i.push("/404"),!0):!1}),O(this,"shouldShowJoinModal",(e,i,r)=>{const l=(0,j.A)((0,Q.A)(e,"groups",[]),{identifier:r,groupType:i==="program"?"mentorshipProgram":"group"});return(0,C.A)(l)}),O(this,"shouldShowContinueRegistrationModal",({currentUser:e,groupIdentifier:i,pageType:r})=>{const l=(0,j.A)((0,Q.A)(e,"groups",[]),{identifier:i,groupType:r==="program"?"mentorshipProgram":"group"});return!(0,C.A)(l)&&(0,Q.A)(l,"completedRegistrationDate",null)===null}),O(this,"handlePageHeight",e=>{const{minPageHeight:i,maxPageHeight:r}=this.state;i||this.setState({minPageHeight:e}),r||this.setState({maxPageHeight:e}),e<i?this.setState({minPageHeight:e}):e>r&&this.setState({maxPageHeight:e,minPageHeight:null})}),O(this,"getWindowHeight",()=>{const{windowWidth:e,windowHeight:i,currentUser:r,hubInfo:l}=this.props,{shrink:u,minPageHeight:h}=this.state,T=window.scrollY,g=document.querySelector(".group-header-container");if(!g)return;const G=g.offsetTop,d=(0,c.qwl)(l);let P=0;if(d?e<c.MJO.screen_lg?(0,C.A)(r)?P=e<c.MJO.screen_sm?46:90:P=40:P=90:e<c.MJO.screen_lg?(0,C.A)(r)?P=e<c.MJO.screen_sm?46:90:P=-11:P=46,e<c.MJO.screen_sm){if((0,Z.MU)()){u&&this.setState({shrink:!1});return}const L=document.getElementById("group-page-height").scrollHeight;this.handlePageHeight(L)}if(T>=G+P&&(e>=c.MJO.screen_sm||h>i)){if(u)return;this.setState({shrink:!0})}else{if(!u)return;this.setState({shrink:!1})}}),O(this,"checkForGroupPermission",()=>{const{currentUser:e,hubInfo:i,group:r}=this.props;return(0,H.BE)(e,i,r)}),O(this,"checkConfirmRegistration",()=>{const{currentUser:e,hubInfo:i,group:r}=this.props;return(0,H.kw)(e,i,r)}),O(this,"renderTabContent",()=>{const{group:e}=this.props,{shrink:i}=this.state,{activeKey:r}=e,l=v(r);return(0,t.jsx)(l,{shrink:i})}),O(this,"goBack",()=>{const{history:e,hubInfo:i,pageType:r,location:l,group:{totalGroupsCount:u},currentUser:h}=this.props;if((0,m.Oq)("organizationGoBackUrl")){(0,m.Sj)("organizationGoBackUrl"),e.goBack();return}const g=(0,c.LmZ)(i),G=r==="group"?"groups":"programs";
2if((0,M.tN)()&&this.getSourceSearchParam(l.search)==="profile"){e.goBack();return}if((0,c.uwx)(h,i)){e.push(`${g}/programs?tab=my-programs`);return}e.push(u>1?`${g}/${G}`:"/")}),O(this,"handleRedirection",(e,i=!0)=>{const{group:r,hubInfo:l,setActiveTabKey:u,history:h,location:T}=this.props,{visibleTabs:g,groupType:G,identifier:d}=r;if(e==="feed"){const P=`${(0,c.LmZ)(l)}/${G==="group"?"groups":"programs"}/${d}`;return u("feed"),h.push(P)}if(G==="group"||G==="mentorshipProgram"){const P=(0,j.A)(g,{id:e});if(!P)h.push("/404");else{let L;if(P.id==="admin"){L=`${(0,c.LmZ)(l)}/manage-${G==="group"?"group":"program"}-v2/${d}/basic`,h.push(L);return}else L=`${(0,c.LmZ)(l)}/${G==="group"?"groups":"programs"}/${d}/${e}${h.location.search}`;if(u(e),(0,M.tN)()&&this.getSourceSearchParam(T.search)==="profile"){L+="?source=profile",i&&h.replace(L);return}i&&h.replace(L)}}}),O(this,"onClickMembersPill",()=>{const{group:e}=this.props,{visibleTabs:i}=e;i.find(r=>r.id==="members")&&this.handleRedirection("members")}),this.state={shrink:!1,minPageHeight:null,maxPageHeight:null}}componentDidMount(){const{match:n,group:e,fetchGroup:i,location:r,resetGroupState:l,history:u,setGroupShowJoinModal:h,currentUser:T,pageType:g,setClusterNavVisibility:G}=this.props,{params:{groupIdentifier:d}}=n,P=(0,c.vAc)(r.search)||{},{showBack:L,invite:$,joinGroup:_,continueRegistration:X}=P;this.checkForFlags()||((!e.id||e.identifier!==d||!e.activeKey||!e.visibleTabs)&&(l(),i({groupIdentifier:d,token:$,onGroupFetchComplete:()=>{X&&this.shouldShowContinueRegistrationModal({currentUser:T,groupIdentifier:d,pageType:g})&&h(!0)}}),this.setState({showBack:L})),(0,a.Gq)("groupDetails")&&(0,a.Ai)("groupDetails"),_&&this.shouldShowJoinModal(T,g,d)&&h(!0),(0,c.b7U)(u,["invite","joinGroup"]),window.addEventListener("scroll",this.getWindowHeight),G(!0))}componentWillUnmount(){const{history:n={},pageType:e}=this.props,i=e==="group"?"groups":"programs";n.location&&!n.location.pathname.includes(i)&&this.props.resetGroupState(),window.removeEventListener("scroll",this.getWindowHeight)}componentDidUpdate(n){const{match:e,fetchGroup:i,resetGroupState:r,group:l,location:u,history:h,setGroupShowJoinModal:T}=this.props,{params:{groupIdentifier:g}}=e,G=(0,Q.A)(n,"match.params.groupIdentifier"),d=(0,c.vAc)(u.search)||{},{joinGroup:P}=d;P&&(T(!0),(0,c.b7U)(h,["joinGroup"])),G!==g&&(r(),i({groupIdentifier:g})),n.group.activeKey!==l.activeKey&&this.setState({minPageHeight:null,maxPageHeight:null})}getSourceSearchParam(n){return new URLSearchParams(n).get("source")}render(){const{shrink:n,showBack:e}=this.state,{clusterInfo:i,currentUser:r,group:l,hubInfo:u,match:{path:h,params:{groupIdentifier:T}},setActiveTabKey:g,windowWidth:G}=this.props,{activeKey:d,id:P,identifier:L,status:$,loading:_,isFunctionalGroup:X,logoUrl:Os,visibleTabs:ns}=l,is=(0,C.A)(r),hs=!Os,js=ns&&ns.find(gs=>gs.id==="members")&&X,Ts=h.startsWith("/hub/:identifier/groups")?"group":"program",Rs=L===T,Us=(0,t.jsx)(A.ZY,{clusterInfo:i,hubInfo:u,currentUser:r,moduleName:Ts}),cs=(0,Z.MU)();return(0,t.jsxs)(t.Fragment,{children:[Us,(0,t.jsx)(ps.DZ,{title:(0,A.wS)({moduleName:Ts,clusterInfo:i,hubInfo:u,currentUser:r,withoutPrefix:!0})}),!P||_||!d&&!X||!Rs?(0,t.jsx)("div",{className:"group-page-loader",children:(0,t.jsx)(B.A,{tip:`Fetching ${Ts} details`,size:"large",indicator:(0,t.jsx)(V.A,{type:"loading",spin:!0})})}
2):(0,t.jsxs)("div",{id:"group-page-height",className:(0,F.A)("group-page-container",{"logged-out":is,"no-logo":hs,"nav-bar-v1":!(0,c.qwl)(u),"nav-bar-v2":(0,c.qwl)(u),"white-background":d==="opportunities","group-page-container__font-scaled-up":cs}),children:[(0,t.jsx)(rt,{checkForPermission:this.checkForGroupPermission,confirmRegistration:this.checkConfirmRegistration,isLoggedOutUser:is,shrink:n,goBack:this.goBack,showBack:e,isFunctionalGroup:X,onClickMembersPill:js?this.onClickMembersPill:null,onAdminButtonClick:X?()=>this.handleRedirection("admin"):null}),X?(0,t.jsx)(f,{group:l,hubInfo:u,activeKey:d,approved:$==="approved",handleRedirection:this.handleRedirection,tabs:ns}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("div",{className:(0,F.A)("group-page-container__tabs-container",{"logged-out":is}),children:(0,t.jsx)("div",{className:"group-tabs",children:(0,t.jsx)(ks,{tabs:ns,activeKey:d,isLoggedOutUser:is,noLogo:hs,setActiveTabKey:g,shrink:n,windowWidth:G,handleTabChange:this.handleRedirection,groupId:P})})}),(0,t.jsx)(S.tU.TabPanel,{tabKey:d,className:(0,F.A)("group-page-container__content",{"pg-container":!["members","mentors","resources","opportunities"].concat(G<c.MJO.screen_lg?["discussion","events"]:[]).includes(d),"add-padding":d==="members"||d==="mentors","no-logo":hs,"opportunities-tab":d==="opportunities","opportunities-tab-shrunk":d==="opportunities"&&n}),children:this.renderTabContent()})]})]})]})}}const q=({appReducer:{hubInfo:x,currentUser:n,windowWidth:e,windowHeight:i,clusterInfo:r},group:l,group:{registration:{questionsLoading:u,questions:h}},auth:{emailInviteLoading:T,postInviteAction:g}})=>({clusterInfo:r,currentUser:n,emailInviteLoading:T,group:l,hubInfo:x,postInviteAction:g,questions:h,questionsLoading:u,windowWidth:e,windowHeight:i}),ts={fetchGroup:I.UiV,setActiveTabKey:I.BLu,resetGroupState:I.MjB,setGroupShowJoinModal:I.Ijh,setClusterNavVisibility:I.gZ2},Es=(0,W.y)((0,J.connect)(q,ts)(os))}}]);
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.