PageSourceSearch

https://kanu.us/_next/static/chunks/pages/network-admin-28350b470b06466d.js

js kanu.us collected 2026-10-07 03:01:38 UTC 75,573 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4784,7387],{13548:()=>{},23694:(e,t,s)=>{"use strict";s.d(t,{S:()=>o});var a=s(84108),r=s(62544),l=s(6608),n=s(39772),i=s(54382);function o(e){let{tabs:t,isLoading:s,search:o,searchResults:c,refresh:d,applyLastMessage:u}=(0,a.RL)(),{subscribeLastMessage:m,subscribeUsersTyping:h}=(0,n._Q)(),p=(0,a.TA)();(0,r.useEffect)(()=>{let e=()=>void d();return window.addEventListener("focus",e),()=>window.removeEventListener("focus",e)},[d]);let{mutate:x,cache:f}=(0,l.iX)();(0,r.useEffect)(()=>{let t,s=m(s=>{let r=u(s,{openChatId:e,selfId:p}),l=s.chat?`chat/${s.chat}`:null;(l&&f.get(l)?.data&&x(l,e=>e&&{...e,messages:(0,a.xz)(e.messages??[],s)},{revalidate:!1}),clearTimeout(t),r)?t=setTimeout(()=>void d(),1500):d()});return()=>{clearTimeout(t),s()}},[u,f,e,x,d,p,m]);let[g,v]=(0,r.useState)({}),b=(0,r.useRef)({});(0,r.useEffect)(()=>{let e=b.current,t=t=>{clearTimeout(e[t]),delete e[t],v(e=>{if(!(t in e))return e;let s={...e};return delete s[t],s})},s=h(s=>{if(!s?.chat)return;let a=s.chat;s.typing?(v(e=>({...e,[a]:`${s.user||"Someone"} is typing`})),clearTimeout(e[a]),e[a]=setTimeout(()=>t(a),6e3)):t(a)});return()=>{for(let t of(s(),Object.keys(e)))clearTimeout(e[t]);b.current={}}},[h]);let j=(e,t)=>e.map(e=>({row:g[e.id]?{...e,typingLabel:g[e.id]}:e,tab:t})),N=(e,t)=>(0,a.DD)(e.row,t.row);return{sections:[{key:"marketplace",label:"Marketplace",icon:i.p.marketplace,rows:[...j(t.consumer,"consumer"),...j(t.provider,"provider")].sort(N)},{key:"team",label:"My Team",icon:i.p.team,rows:j(t.team,"team").sort(N)},{key:"classroom",label:"Classroom",icon:i.p.classroom,rows:j(t.classroom,"classroom").sort(N)},{key:"staff",label:"Staff",icon:i.p.staff,rows:j(t.staff,"staff").sort(N)}],isLoading:s,search:o,searchResults:c,refresh:d}}},26473:()=>{},29675:()=>{},32288:(e,t,s)=>{"use strict";s.d(t,{T:()=>i});var a=s(10940),r=s(97375),l=s(64052);let n={[r.PS.INVITED]:{label:"Invited",className:"bg-softgrey1 text-black3"},[r.PS.JOINED]:{label:"Joined",className:"bg-aeroblue text-bluedark"},[r.PS.TRAINING_COMPLETE]:{label:"Training complete",className:"bg-aeroyellow text-ongoing"},[r.PS.SCHOOL_LIVE]:{label:"School live",className:"bg-aeroteal text-green"}};function i({status:e}){if(!e)return null;let{label:t,className:s}=n[e];return(0,a.jsx)("span",{className:(0,l.cn)("inline-flex items-center px-2 py-1 rounded-md text-sm font-semibold whitespace-nowrap",s),children:t})}},34872:(e,t,s)=>{"use strict";s.d(t,{Mz:()=>V,Rp:()=>B,UC:()=>W,ZL:()=>G,bL:()=>z,bm:()=>Z,i3:()=>Q,l9:()=>K});var a=s(62544),r=s(41375),l=s(67237),n=s(39717),i=s(21048),o=s(67722),c=s(85378),d=s(6896),u=s(36413),m=s(37959),h=s(61678),p=s(48776),x=s(58159),f=s(76496),g=s(15207),v=s(17971),b=s(10940),j="Popover",[N,y]=(0,n.A)(j,[u.Bk]),k=(0,u.Bk)(),[w,_]=N(j),C=e=>{let{__scopePopover:t,children:s,open:r,defaultOpen:l,onOpenChange:n,modal:i=!1}=e,o=k(t),c=a.useRef(null),[m,h]=a.useState(!1),[p,x]=(0,f.i)({prop:r,defaultProp:l??!1,onChange:n,caller:j});return(0,b.jsx)(u.bL,{...o,children:(0,b.jsx)(w,{scope:t,contentId:(0,d.B)(),triggerRef:c,open:p,onOpenChange:x,onOpenToggle:a.useCallback(()=>x(e=>!e),[x]),hasCustomAnchor:m,onCustomAnchorAdd:a.useCallback(()=>h(!0),[]),onCustomAnchorRemove:a.useCallback(()=>h(!1),[]),modal:i,children:s})})};C.displayName=j;var I="PopoverAnchor",S=a.forwardRef((e,t)=>{let{__scopePopover:s,...r}=e,l=_(I,s),n=k(s),{onCustomAnchorAdd:i,onCustomAnchorRemove:o}=l;return a.useEffect(()=>(i(),()=>o()),[i,o]),(0,b.jsx)(u.Mz,{...n,...r,ref:t})});S.displayName=I;var R="PopoverTrigger",A=a.forwardRef((e,t)=>{let{__scopePopover:s,...a}=e,n=_(R,s),i=k(s),o=(0,l.s)(t,n.triggerRef),c=(0,b.jsx)(p.sG.button,{type:"button","aria-haspopup":"dialog","aria-expanded":n.open,"aria-controls":n.contentId,"data-state":H(n.open),...a,ref:o,onClick:(0,r.mK)(e.onClick,n.onOpenToggle)});return n.hasCustomAnchor?c:(0,b.jsx)(u.Mz,{asChild:!0,...i,children:c})});A.displayName=R;var E="PopoverPortal",[T,L]=N(E,{forceMount:void 0}),O=e=>{let{__scopePopover:t,forceMount:s,children:a,container:r}=e,l=_(E,t);return(0,b.jsx)(T,{scope:t,forceMount:s,children:(0,b.jsx)(h.C,{present:s||l.open,children:(0,b.jsx)(m.Z,{asChild:!0,container:r,children:a})})})};O.displayName=E;var P="PopoverContent",D=a.forwardRef((e,t)=>
1{let s=L(P,e.__scopePopover),{forceMount:a=s.forceMount,...r}=e,l=_(P,e.__scopePopover);return(0,b.jsx)(h.C,{present:a||l.open,children:l.modal?(0,b.jsx)(M,{...r,ref:t}):(0,b.jsx)(U,{...r,ref:t})})});D.displayName=P;var $=(0,x.TL)("PopoverContent.RemoveScroll"),M=a.forwardRef((e,t)=>{let s=_(P,e.__scopePopover),n=a.useRef(null),i=(0,l.s)(t,n),o=a.useRef(!1);return a.useEffect(()=>{let e=n.current;if(e)return(0,g.Eq)(e)},[]),(0,b.jsx)(v.A,{as:$,allowPinchZoom:!0,children:(0,b.jsx)(q,{...e,ref:i,trapFocus:s.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:(0,r.mK)(e.onCloseAutoFocus,e=>{e.preventDefault(),o.current||s.triggerRef.current?.focus()}),onPointerDownOutside:(0,r.mK)(e.onPointerDownOutside,e=>{let t=e.detail.originalEvent,s=0===t.button&&!0===t.ctrlKey;o.current=2===t.button||s},{checkForDefaultPrevented:!1}),onFocusOutside:(0,r.mK)(e.onFocusOutside,e=>e.preventDefault(),{checkForDefaultPrevented:!1})})})}),U=a.forwardRef((e,t)=>{let s=_(P,e.__scopePopover),r=a.useRef(!1),l=a.useRef(!1);return(0,b.jsx)(q,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{e.onCloseAutoFocus?.(t),t.defaultPrevented||(r.current||s.triggerRef.current?.focus(),t.preventDefault()),r.current=!1,l.current=!1},onInteractOutside:t=>{e.onInteractOutside?.(t),t.defaultPrevented||(r.current=!0,"pointerdown"===t.detail.originalEvent.type&&(l.current=!0));let a=t.target;s.triggerRef.current?.contains(a)&&t.preventDefault(),"focusin"===t.detail.originalEvent.type&&l.current&&t.preventDefault()}})}),q=a.forwardRef((e,t)=>{let{__scopePopover:s,trapFocus:a,onOpenAutoFocus:r,onCloseAutoFocus:l,disableOutsidePointerEvents:n,onEscapeKeyDown:d,onPointerDownOutside:m,onFocusOutside:h,onInteractOutside:p,...x}=e,f=_(P,s),g=k(s);return(0,o.Oh)(),(0,b.jsx)(c.n,{asChild:!0,loop:!0,trapped:a,onMountAutoFocus:r,onUnmountAutoFocus:l,children:(0,b.jsx)(i.qW,{asChild:!0,disableOutsidePointerEvents:n,onInteractOutside:p,onEscapeKeyDown:d,onPointerDownOutside:m,onFocusOutside:h,onDismiss:()=>f.onOpenChange(!1),children:(0,b.jsx)(u.UC,{"data-state":H(f.open),role:"dialog",id:f.contentId,...g,...x,ref:t,style:{...x.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),F="PopoverClose",Y=a.forwardRef((e,t)=>{let{__scopePopover:s,...a}=e,l=_(F,s);return(0,b.jsx)(p.sG.button,{type:"button",...a,ref:t,onClick:(0,r.mK)(e.onClick,()=>l.onOpenChange(!1))})});Y.displayName=F;var B=a.forwardRef((e,t)=>{let{__scopePopover:s,...a}=e,r=k(s);return(0,b.jsx)(u.i3,{...r,...a,ref:t})});function H(e){return e?"open":"closed"}B.displayName="PopoverArrow";var z=C,V=S,K=A,G=O,W=D,Z=Y,Q=B},39968:(e,t,s)=>{"use strict";s.d(t,{e:()=>j});var a=s(10940),r=s(62544),l=s(43652),n=s(27965),i=s(69789),o=s(76255),c=s(7684),d=s(35295),u=s(20788),m=s(58704),h=s(93176),p=s(21818),x=s(11461),f=s(99994),g=s(50316);let v=({networkName:e,collapsed:t,onToggle:s})=>{let r=(0,d.useRouter)(),{isLoading:l,classrooms:n}=(0,m.O)(),i=r.asPath.split("?")[0],o="string"==typeof r.query.classroomId?r.query.classroomId:void 0;return(0,a.jsxs)(g.n,{collapsed:t,onToggle:s,children:[(0,a.jsx)(p.m,{label:"Network",entityName:e,entityHref:"/network-admin",activeHref:r.pathname,links:[{label:"Training",href:"/network-admin/training",icon:u.z7B},{label:"People",href:"/network-admin/people",icon:u.SrR}]}),(0,a.jsxs)("div",{className:"flex flex-col gap-1 w-full",children:[(0,a.jsx)(f.H,{label:"Products",activeHref:r.pathname,items:[{label:"Marketplace",href:"/network-admin/marketplace",icon:u.$H1},{label:"Competitions",href:"/network-admin/competitions",icon:u.pyc}]}),(0,a.jsx)(x.y,{label:"Classrooms",groupHeader:{href:"/network-admin/classrooms",icon:u.Tb7},activeItemId:o,activeHref:i,items:l?[]:(0,h.c)(n,"/network-admin/classrooms")})]})]})};function b({breadcrumbSuffix:e,trailingBadge:t,actions:s,children:i}){let{networkAdmin:d}=(0,l.F)(),u=d?.networkName??"Your Network",{collapsed:m,onToggle:h}=(0,n.X)("network-admin-sidebar-collapsed"),[p,x]=(0,r.useState)(!1);return(0,a.jsxs)(c.N,{sidebar:(0,a.jsx)(v,{networkName:u,collapsed:m,onToggle:h}),breadcrumbs:[{label:u},...e],trailingBadge:t,extraActions:s,onMessagesClick:()=>x(!0),children:[i,p&&(0,a.jsx)(o._u,{onClose:()=>x(!1)})]})}let j=e=>(0,a.jsx)(i.n,{children:(0,a.jsx)(l.L,{children:(0,a.jsx)(b,{...e})})})},41795:(e,t,s)=>{"use strict";s.d(t,{pE:()=>l,Ic:()=>d,hE:()=>u});var a,r,l,n,i=s(88073);(a=l||(l={})).CONSUMER_CHAT="consumerChat",a.PROVIDER_CHAT="providerChat",a.TEAM_CHAT="teamChat",a.CLASSROOM_CHAT="classroomChat",a.STAFF_CHAT="staffChat",a.PROVIDER_REQUEST="providerRequest",a.PROVIDER_ORDER_STATUS="providerOrderStatus",a.CONSUMER_REQUEST="consumerRequest",a.REQUEST_HISTORY="requestHistory",a.PROVIDER_REQUEST_HISTORY="providerRequestHistory",a.CONSUMER_REQUEST_HISTORY="consumerRequestHistory",a.NOTIFICATION="notification",a.CLASSROOM="classroom",a.BADGE="badge",a.VOYAGE_PROGRESS_NOTIFICATION="voyageProgressNotification",a.LEARNING_NAVBAR_VOYAGE="learningNavBarVoyage",a.LEARNING_NAVBAR_LEADERBOARD="learningNavBarLeaderboard",a.LEARNING_NAVBAR_NOTEPAD="learningNavBarNotepad",a.LEARNING_NAVBAR_BADGE="learningNavBarBadge",a.EDUCATOR_DASHBOARD_CLASSROOM_STUDENTS="educatorDashboardClassroomStudents",a.EDUCATOR_DASHBOARD_CLASSROOM_ACTIVITY="educatorDashboardClassroomActivity",a.EDUCATOR_DASHBOARD_CLASSROOM_GRADES="educatorDashboardClassroomGrades",(r=n||(n={})).JOIN="joinDotIndicator",r.LEAVE="leaveDotIndicator",r.LISTEN="listenDotIndicator",r.LOG="log",r.TRIGGER_EMIT_INDICATOR="triggerEmitIndicator";var o=s(32569);(0,o.Ik)({type:(0,o.vP)(["text","picture"]),content:(0,o.lq)((0,o.Yj)()),photos:(0,o.lq)((0,o.YO)((0,o.Yj)())),quote:(0,o.lq)((0,o.Yj)())}),(0,o.Ik)({placement:(0,o.vP)(Object.values(l))}),(0,o.Ik)({placements:(0,o.YO)((0,o.vP)(Object.values(l)))}),(0,o.Ik)({placements:(0,o.YO)((0,o.vP)(Object.values(l))),modelId:(0,o.Yj)(),milestoneId:(0,o.lq)((0,o.Yj)()),moduleId:(0,o.lq)((0,o.Yj)()),studentId:(0,o.lq)((0,o.Yj)()),businessId:(0,o.lq)((0,o.Yj)()),notepadId:(0,o.lq)((0,o.Yj)())}),(0,o.Ik)({placement:(0,o.vP)(Object.values(l)),modelId:(0,o.Yj)()}),(0,o.Ik)({token:(0,o.Yj)()});var c=s(82887);let d=async e=>{if((0,i.hasCookie)("accessToken"))return await (0,c.Ay)().post("dot-indicator/unmark-all-placements",e)},u=async e=>{if((0,i.hasCookie)("accessToken"))return await (0,c.Ay)().post("dot-indicator/unmark-many-placements",e)}},43652:(e,t,s)=>{"use strict";s.d(t,{F:()=>d,L:()=>c});
1var a=s(10940),r=s(62544),l=s(21072),n=s(25298),i=s(82887);let o=(0,r.createContext)({networkAdmin:null,isLoading:!1,error:void 0}),c=({children:e})=>{let{data:t,isLoading:s,error:r}=(0,l.Ay)("users/me/navigation",i.hS,{revalidateOnFocus:!1}),c=t?.role===n.tz.NETWORK_ADMIN?{networkId:t.network?._id,networkName:t.network?.title,moduleZero:t.moduleZero,moduleZeroRedirectId:t.voyageRedirect?.moduleZeroId,moduleZeroRedirectStepId:t.voyageRedirect?.stepId}:null;return(0,a.jsx)(o.Provider,{value:{networkAdmin:c,isLoading:s,error:r},children:e})},d=()=>(0,r.useContext)(o)},45269:(e,t,s)=>{"use strict";s.d(t,{Q:()=>r});var a=s(62544);function r(){let[e,t]=(0,a.useState)(0);return(0,a.useEffect)(()=>{let e=window.visualViewport;if(!e)return;let s=()=>{let s=window.innerHeight-(e.height+e.offsetTop);t(s>80?Math.round(s):0)};return s(),e.addEventListener("resize",s),e.addEventListener("scroll",s),()=>{e.removeEventListener("resize",s),e.removeEventListener("scroll",s)}},[]),e}},53950:()=>{},54382:(e,t,s)=>{"use strict";s.d(t,{Y:()=>i,p:()=>n});var a=s(10940),r=s(61913),l=s(62544);let n={marketplace:(0,a.jsx)(function(){return(0,a.jsx)("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",children:(0,a.jsx)("path",{d:"M3 9.5 4.5 4h15L21 9.5M3 9.5h18M3 9.5v10h18v-10M3 9.5a2.5 2.5 0 0 0 5 0 2.5 2.5 0 0 0 5 0 2.5 2.5 0 0 0 5 0 2.5 2.5 0 0 0 3 0",stroke:"currentColor",strokeWidth:"1.5",strokeLinejoin:"round"})})},{}),team:(0,a.jsx)(function(){return(0,a.jsxs)("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",children:[(0,a.jsx)("circle",{cx:"9",cy:"8",r:"3.2",stroke:"currentColor",strokeWidth:"1.5"}),(0,a.jsx)("path",{d:"M3.5 19a5.5 5.5 0 0 1 11 0M16 5.5a3 3 0 0 1 0 5.6M17.5 19a5.4 5.4 0 0 0-2-4.2",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})]})},{}),classroom:(0,a.jsx)(function(){return(0,a.jsxs)("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",children:[(0,a.jsx)("path",{d:"M12 4 2 8.5 12 13l10-4.5L12 4Z",stroke:"currentColor",strokeWidth:"1.5",strokeLinejoin:"round"}),(0,a.jsx)("path",{d:"M6 10.5V16c0 1.4 2.7 2.5 6 2.5s6-1.1 6-2.5v-5.5M20 8.5V15",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]})},{}),staff:(0,a.jsx)(function(){return(0,a.jsxs)("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",children:[(0,a.jsx)("path",{d:"M5 20V6.5L12 3l7 3.5V20",stroke:"currentColor",strokeWidth:"1.5",strokeLinejoin:"round"}),(0,a.jsx)("path",{d:"M9 20v-5h6v5M9 11h.01M15 11h.01M12 11h.01",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]})},{})};function i({sections:e,hrefFor:t,selectedId:s,onSelect:n,linkComponent:o,onSearch:c,searchResults:d,hrefForSearch:u,isLoading:m}){let[h,p]=(0,l.useState)(""),[x,f]=(0,l.useState)({}),g=h.trim().length>0;(0,l.useEffect)(()=>{let e=h.trim();if(!e)return void c("");let t=setTimeout(()=>c(e),1e3);return()=>clearTimeout(t)},[h,c]);let v=(e,t)=>e.map(({row:e,tab:l})=>(0,a.jsx)(r.gG,{item:e,href:t({row:e,tab:l}),linkComponent:o,selected:s===e.id,onSelect:n},`${l}-${e.id}`));return(0,a.jsxs)("div",{className:"flex flex-col h-full min-h-0 bg-white",children:[(0,a.jsx)("div",{className:"px-4 pt-4 pb-3",children:(0,a.jsx)("h2",{className:"text-lg font-bold text-black1 tracking-[0.4px]",children:"Message"})}),(0,a.jsx)("div",{className:"px-4 pb-3",children:(0,a.jsxs)("div",{className:"flex items-center gap-2 rounded-full border border-softgrey1 px-3 py-2",children:[(0,a.jsx)("img",{src:"/assets/icon/search.svg",alt:"","aria-hidden":"true",className:"w-4 h-4"}),(0,a.jsx)("input",{className:"flex-1 bg-transparent text-sm outline-none placeholder:text-placeholder",type:"text",placeholder:"Search","aria-label":"Search conversations",value:h,onChange:e=>p(e.target.value),"data-e2e":"chats-search"})]})}),(0,a.jsx)("div",{className:"flex-1 min-h-0 overflow-y-auto pb-4",children:m?(0,a.jsx)("div",{role:"status",className:"px-4 py-3 text-sm text-text","data-e2e":"chats-loading",children:"Loading conversations…"}):g?d?0===d.users.length&&0===d.messages.length?(0,a.jsx)("div",{role:"status",className:"px-4 py-6 text-sm text-text","data-e2e":"chats-empty",children:"Nothing found!"}):(0,a.jsxs)(a.Fragment,{children:[d.users.length>0&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("h3",{className:"px-4 pt-2 pb-1 text-xs font-bold text-placeholder",children:"Users"}),v(d.users.map(e=>({row:e,tab:"team"})),({row:e})=>u(e.id))]}),d.messages.length>0&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("h3",{className:"px-4 pt-2 pb-1 text-xs font-bold text-placeholder",children:"Messages"}),v(d.messages.map(e=>({row:e,tab:"team"})),({row:e})=>u(e.id))]})]}):(0,a.jsx)("div",{role:"status",className:"px-4 py-3 text-sm text-text","data-e2e":"chats-loading",children:"Searching…"}):e.every(e=>0===e.rows.length)?(0,a.jsx)("div",{role:"status",className:"px-4 py-6 text-sm text-text","data-e2e":"chats-empty",children:"No conversation yet"}):e.filter(e=>e.rows.length>0).map(e=>{let s=x[e.key],r=e.rows.reduce((e,{row:t})=>e+(t.unread??0),0);return(0,a.jsxs)("section",{children:[(0,a.jsxs)("button",{type:"button",className:"flex w-full items-center gap-3 px-4 py-2.5 text-left text-black1 hover:bg-softgrey2","aria-expanded":!s,"aria-label":r>0?`${e.label}, ${r} unread`:e.label,"data-e2e":`chats-section-${e.key}`,onClick:()=>f(t=>({...t,[e.key]:!t[e.key]})),children:[(0,a.jsx)("span",{className:"text-text",children:e.icon}),(0,a.jsx)("span",{className:"flex-1 text-sm font-semibold tracking-[0.4px]",children:e.label}),r>0&&(0,a.jsx)("span",{"aria-hidden":"true",className:"min-w-[20px] rounded-full bg-red px-1.5 text-center text-xs font-bold leading-5 text-white",children:r}),(0,a.jsx)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",className:`transition-transform ${s?"":"rotate-180"}`,children:(0,a.jsx)("path",{d:"m6 9 6 6 6-6",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})]}),!s&&v(e.rows,t)]},e.key)})})]})}},58704:(e,t,s)=>{"use strict";s.d(t,{O:()=>l});var a=s(21072),r=s(82887);let l=()=>{let{data:e,isLoading:t,error:s,mutate:l}=(0,a.Ay)("admin/classrooms",r.hS,{revalidateOnFocus:!0,revalidateIfStale:!0});return{isLoading:t,data:e,classrooms:e?e.classrooms:[],error:s,mutate:l}}},61682:(e,t,s)=>{"use strict";s.d(t,{w:()=>u});
1var a=s(10940),r=s(88997),l=s(5529),n=s(13222),i=s(11230),o=s.n(i),c=s(62544),d=s(20788);let u=({children:e,navigation:t,disabledDismiss:s,onClose:i})=>{let[u,m]=(0,c.useState)(t?.page??0),h=(0,c.useRef)(null);return(0,a.jsx)(r.Ay,{open:!0,onClose:(e,t)=>{s&&"backdropClick"===t?h.current.focus():i()},anchor:"right",elevation:0,PaperProps:{sx:{backgroundColor:"transparent",maxWidth:"100vw"}},slotProps:{backdrop:{sx:{backgroundColor:"rgba(0, 0, 0, 0.2)"}}},children:(0,a.jsxs)("div",{className:"flex flex-row",role:"region","aria-label":t?.name??"Detail panel",children:[(0,a.jsxs)("div",{className:"p-2 gap-1 flex flex-col items-end relative",children:[(0,a.jsx)(l.A,{title:"Close",placement:"left",arrow:!0,children:(0,a.jsx)(n.A,{ref:h,"aria-label":"Close",onClick:i,className:"focus:animate-breathing",children:(0,a.jsx)(d.bsq,{className:"size-9 cursor-pointer"})})}),t&&t.totalPages>1&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(l.A,{title:`Next ${t.name}`,placement:"left",arrow:!0,children:(0,a.jsx)("span",{className:"",children:(0,a.jsx)(n.A,{"aria-label":`Next ${t.name}`,onClick:()=>{if(u<t?.totalPages-1){let e=u+1;m(e),t?.onPageChanged(e)}},disabled:u===t?.totalPages-1,children:(0,a.jsx)(d.Td3,{className:o()("size-9",u===t.totalPages-1?"fill-grey2 cursor-not-allowed":"fill-teallight cursor-pointer")})})})}),(0,a.jsx)(l.A,{title:`Prev ${t.name}`,placement:"left",arrow:!0,children:(0,a.jsx)("span",{children:(0,a.jsx)(n.A,{"aria-label":`Previous ${t.name}`,onClick:()=>{if(u>0){let e=u-1;m(e),t?.onPageChanged(e)}},disabled:0===u,children:(0,a.jsx)(d.XTR,{className:o()("size-9",0===u?"fill-grey2 cursor-not-allowed":"fill-teallight cursor-pointer")})})})})]})]}),e]})})}},61913:(e,t,s)=>{"use strict";s.d(t,{u6:()=>c,RB:()=>u,gG:()=>i});var a=s(10940),r=s(62544);function l(e){if(!e)return"";let t=new Date(e);return Number.isNaN(t.getTime())?"":`${t.getFullYear()}-${t.getMonth()}-${t.getDate()}`}function n({href:e,children:t,...s}){return(0,a.jsx)("a",{href:e,...s,children:t})}function i({item:e,href:t,linkComponent:s=n,selected:r,onSelect:l}){let o=l?s=>{s.defaultPrevented||0!==s.button||s.metaKey||s.ctrlKey||s.shiftKey||s.altKey||(s.preventDefault(),l(e.id,t))}:void 0;return(0,a.jsxs)(s,{href:t,onClick:o,className:`dialog-item${r?" dialog-item--selected":""}`,"aria-current":r?"true":void 0,"data-e2e":"chat-list-item",children:[(0,a.jsx)("div",{className:"dialog-item__photo",children:e.photoUrl?(0,a.jsx)("img",{src:e.photoUrl,alt:""}):null}),(0,a.jsxs)("div",{className:"dialog-item__body",children:[e.requestReferenceId?(0,a.jsxs)("span",{className:"dialog-item__meta","data-e2e":"chat-request-id",children:["ID: ",e.requestReferenceId]}):null,(0,a.jsxs)("div",{className:"dialog-item__row",children:[(0,a.jsx)("span",{className:"dialog-item__name",children:e.name}),(0,a.jsx)("span",{className:"dialog-item__time",children:function(e,t=new Date){if(!e)return"";let s=new Date(e);return Number.isNaN(s.getTime())?"":s.getFullYear()===t.getFullYear()&&s.getMonth()===t.getMonth()&&s.getDate()===t.getDate()?s.toLocaleTimeString([],{hour:"numeric",minute:"2-digit"}):s.getFullYear()===t.getFullYear()?s.toLocaleDateString([],{day:"numeric",month:"short"}):s.toLocaleDateString([],{day:"numeric",month:"short",year:"numeric"})}(e.timestamp)})]}),e.businessName?(0,a.jsx)("span",{className:"dialog-item__meta","data-e2e":"chat-row-business",children:e.businessName}):null,(0,a.jsxs)("div",{className:"dialog-item__row",children:[e.typingLabel?(0,a.jsx)("span",{className:"dialog-item__last dialog-item__last--typing","data-e2e":"chat-row-typing",children:e.typingLabel}):(0,a.jsx)("span",{className:"dialog-item__last",children:e.lastMessage||"Tap to start conversation"}),e.unread?(0,a.jsx)("span",{className:"dialog-item__unread",children:e.unread}):null]})]})]})}function o({images:e,index:t,onClose:s}){let[l,n]=(0,r.useState)(t),i=e.length-1;return(0,r.useEffect)(()=>{let e=e=>{"Escape"===e.key&&s(),"ArrowLeft"===e.key&&n(e=>e>0?e-1:e),"ArrowRight"===e.key&&n(e=>e<i?e+1:e)};return document.addEventListener("keydown",e),()=>document.removeEventListener("keydown",e)},[s,i]),(0,a.jsxs)("div",{className:"chat-gallery",role:"dialog","aria-modal":"true","data-e2e":"chat-gallery",onClick:s,children:[(0,a.jsx)("img",{className:"chat-gallery__img",src:e[l],alt:"",onClick:e=>e.stopPropagation()}),(0,a.jsxs)("div",{className:"chat-gallery__controls",onClick:e=>e.stopPropagation(),children:[(0,a.jsxs)("span",{className:"chat-gallery__counter",children:[l+1," of ",e.length]}),(0,a.jsxs)("div",{className:"chat-gallery__nav",children:[(0,a.jsx)("button",{type:"button","aria-label":"Previous photo",disabled:0===l,onClick:()=>n(e=>e>0?e-1:e),children:"‹"}
1),(0,a.jsx)("button",{type:"button","aria-label":"Next photo",disabled:l===i,onClick:()=>n(e=>e<i?e+1:e),children:"›"}),(0,a.jsx)("button",{type:"button",className:"chat-gallery__close","aria-label":"Close","data-e2e":"chat-gallery-close",onClick:s,children:"\xd7"})]})]})]})}function c({message:e}){return(0,a.jsx)("div",{className:"chat-thread-placeholder","data-e2e":"chat-thread-placeholder",children:(0,a.jsx)("p",{children:e??"Select a conversation to start messaging"})})}function d({message:e,onOpenPhoto:t,onReply:s,onRetry:r}){let l=["message",e.isMine?"message--mine":"",e.pending?"message--pending":"",e.failed?"message--failed":""].filter(Boolean).join(" ");return(0,a.jsxs)("div",{className:l,"data-e2e":"chat-message",children:[e.isMine?null:(0,a.jsx)("div",{className:"message__avatar",children:(0,a.jsx)("img",{src:e.avatarUrl||"/assets/default/user.svg",alt:""})}),(0,a.jsxs)("div",{className:"message__content",children:[(0,a.jsx)("span",{className:"message__time",children:function(e){if(!e)return"";let t=new Date(e);return Number.isNaN(t.getTime())?"":t.toLocaleTimeString([],{hour:"numeric",minute:"2-digit"})}(e.timestamp)}),e.quote?(0,a.jsxs)("div",{className:"message__quote","data-e2e":"chat-message-quote",children:[e.quote.author?(0,a.jsx)("span",{className:"message__quote-author",children:e.quote.author}):null,(0,a.jsx)("span",{className:"message__quote-text",children:e.quote.text})]}):null,e.text?(0,a.jsx)("p",{className:"message__text","data-e2e":"chat-message-text",children:e.text}):null,e.photos&&e.photos.length>0?(0,a.jsx)("div",{className:"message__photos","data-e2e":"chat-message-photos",children:e.photos.slice(0,4).map((s,r)=>(0,a.jsxs)("button",{type:"button",className:"message__photo","aria-label":"Open photo",onClick:()=>t?.(e.photos??[],r),children:[(0,a.jsx)("img",{src:s,alt:""}),3===r&&e.photos&&e.photos.length>4?(0,a.jsxs)("span",{className:"message__photo-more",children:["+",e.photos.length-4]}):null]},r))}):null,e.failed?(0,a.jsxs)("span",{className:"message__status message__status--failed",children:["Not sent",r?(0,a.jsx)("button",{type:"button",className:"message__retry","data-e2e":"chat-message-retry",onClick:()=>r(e.id),children:"Try again"}):null]}):null]}),!s||e.pending||e.failed?null:(0,a.jsx)("button",{type:"button",className:"message__reply","aria-label":"Reply","data-e2e":"chat-message-reply",onClick:()=>s(e.id),children:"↩"})]})}function u({title:e,subtitle:t,requestId:s,onRequestClick:n,typingLabel:i,messages:c,isLoading:m,isRefreshing:h,isSending:p,onSend:x,onType:f,onAttachFiles:g,attachments:v,onRemoveAttachment:b,replyTo:j,onReplyTo:N,onRetryMessage:y,onCancelReply:k,onBack:w,keyboardInset:_=0}){let[C,I]=(0,r.useState)(""),S=v??[],R=S.some(e=>void 0!==e.progress&&!e.failed),A=(C.trim().length>0||S.length>0)&&!p&&!R,[E,T]=(0,r.useState)(null),L=(0,r.useRef)(null),O=(0,r.useRef)(null);(0,r.useEffect)(()=>{let e=O.current;if(!e)return;let t=()=>{e.scrollTop=e.scrollHeight};t();let s=Array.from(e.querySelectorAll("img"));return s.forEach(e=>{e.complete||e.addEventListener("load",t,{once:!0})}),()=>s.forEach(e=>e.removeEventListener("load",t))},[c,_]);let P=()=>{A&&(x(C.trim()),I(""))};return(0,a.jsxs)("div",{className:"chat-thread",children:[(0,a.jsxs)("div",{className:"chat-thread__header",children:[w?(0,a.jsx)("button",{type:"button",className:"chat-thread__back","aria-label":"Back",onClick:w,children:(0,a.jsx)("img",{src:"/assets/icon/chevron-left.svg",alt:"","aria-hidden":"true"})}):null,(0,a.jsxs)("div",{className:"chat-thread__heading",children:[(0,a.jsx)("p",{className:"chat-thread__name","data-e2e":"chat-thread-name",children:e}),i?(0,a.jsxs)("p",{className:"chat-thread__typing","data-e2e":"chat-typing",children:[i,(0,a.jsxs)("span",{className:"chat-thread__typing-dots","aria-hidden":"true",children:[(0,a.jsx)("span",{className:"chat-thread__typing-dot"}),(0,a.jsx)("span",{className:"chat-thread__typing-dot"}),(0,a.jsx)("span",{className:"chat-thread__typing-dot"})]})]}):t?(0,a.jsx)("p",{className:"chat-thread__role",children:t}):null]})]}),s?(0,a.jsxs)("button",{type:"button",className:"chat-thread__banner","data-e2e":"chat-request-banner",onClick:n,children:[(0,a.jsx)("img",{src:"/assets/navigation-tabs/checklist-active.svg",alt:"","aria-hidden":"true"}),(0,a.jsxs)("span",{className:"chat-thread__banner-text",children:[(0,a.jsx)("span",{className:"chat-thread__banner-title",children:"Tap to check your Request"}),(0,a.jsxs)("span",{className:"chat-thread__banner-id",children:["ID: ",s]})]})]}):null,h?(0,a.jsxs)("div",{className:"chat-thread__refreshing",role:"status","data-e2e":"chat-thread-refreshing",children:[(0,a.jsx)("span",{className:"chat-thread__refreshing-bar","aria-hidden":"true"}),(0,a.jsx)("span",{className:"chat-thread__sr-only",children:"Checking for new messages"})]}):null,(0,a.jsxs)("div",{className:"chat-thread__messages",ref:O,"data-e2e":"chat-thread-messages",children:[c.map((e,t)=>
1{let s=l(e.timestamp)!==l(c[t-1]?.timestamp);return(0,a.jsxs)(r.Fragment,{children:[s&&e.timestamp?(0,a.jsx)("div",{className:"chat-thread__day","data-e2e":"chat-thread-day",children:(0,a.jsx)("span",{className:"chat-thread__day-label",children:function(e,t=new Date){if(!e)return"";let s=new Date(e);if(Number.isNaN(s.getTime()))return"";if(l(e)===l(t.toISOString()))return"Today";let a=new Date(t);return(a.setDate(t.getDate()-1),l(e)===l(a.toISOString()))?"Yesterday":s.getFullYear()===t.getFullYear()?s.toLocaleDateString([],{day:"numeric",month:"short"}):s.toLocaleDateString([],{day:"numeric",month:"short",year:"numeric"})}(e.timestamp)})}):null,(0,a.jsx)(d,{message:e,onOpenPhoto:(e,t)=>T({images:e,index:t}),onReply:N,onRetry:y})]},e.id)}),m||0!==c.length?null:(0,a.jsx)("div",{className:"chat-thread__empty","data-e2e":"chat-thread-empty",children:(0,a.jsx)("span",{children:"No messages yet. Say hello!"})})]}),(0,a.jsxs)("div",{className:"chat-thread__footer",style:_?{paddingBottom:_+12}:void 0,children:[j?(0,a.jsxs)("div",{className:"chat-thread__reply","data-e2e":"chat-reply-preview",children:[(0,a.jsxs)("div",{className:"chat-thread__reply-body",children:[j.author?(0,a.jsx)("span",{className:"chat-thread__reply-author",children:j.author}):null,(0,a.jsx)("span",{className:"chat-thread__reply-text",children:j.preview})]}),(0,a.jsx)("button",{type:"button",className:"chat-thread__reply-cancel","aria-label":"Cancel reply",onClick:k,children:"\xd7"})]}):null,S.length?(0,a.jsx)("div",{className:"chat-thread__attachments","data-e2e":"chat-attachments",children:S.map(e=>(0,a.jsxs)("div",{className:`chat-thread__thumb${e.failed?" chat-thread__thumb--failed":""}`,"data-e2e":"chat-attachment",children:[(0,a.jsx)("img",{src:e.previewUrl,alt:""}),void 0===e.progress||e.failed?null:(0,a.jsx)("span",{className:"chat-thread__thumb-progress",role:"progressbar","aria-valuenow":e.progress,"aria-label":"Uploading photo",children:(0,a.jsx)("span",{style:{width:`${e.progress}%`}})}),e.failed?(0,a.jsx)("span",{className:"chat-thread__thumb-failed",children:"Failed"}):null,(0,a.jsx)("button",{type:"button",className:"chat-thread__thumb-remove","aria-label":"Remove photo",onClick:()=>b?.(e.id),children:"\xd7"})]},e.id))}):null,(0,a.jsxs)("div",{className:"chat-thread__compose-row",children:[g?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("input",{ref:L,type:"file",accept:"image/png,image/jpeg",multiple:!0,hidden:!0,"data-e2e":"chat-attach-input",onChange:e=>{let t=Array.from(e.target.files??[]);t.length&&g(t),e.target.value=""}}),(0,a.jsx)("button",{type:"button",className:"chat-thread__attach","aria-label":"Attach photo",onClick:()=>L.current?.click(),children:(0,a.jsx)("img",{src:"/assets/icon/attachment.svg",alt:"","aria-hidden":"true"})})]}):null,(0,a.jsxs)("div",{className:"chat-thread__composer",children:[(0,a.jsx)("textarea",{className:"chat-thread__input","aria-label":"Message",placeholder:"Type a message",rows:1,value:C,onChange:e=>{I(e.target.value),f?.()},onKeyDown:e=>{"Enter"!==e.key||e.shiftKey||(e.preventDefault(),P())},"data-e2e":"chat-input"}),(0,a.jsx)("button",{type:"button",className:"chat-thread__send","aria-label":"Send",disabled:!A,onClick:P,"data-e2e":"chat-send",children:p?(0,a.jsx)("span",{className:"chat-thread__send-spinner","aria-hidden":"true"}):(0,a.jsx)("img",{src:"/assets/icon/send.svg",alt:"","aria-hidden":"true"})})]})]})]}),E?(0,a.jsx)(o,{images:E.images,index:E.index,onClose:()=>T(null)}):null]})}s(26473),s(94445),s(13548),s(90354),s(29675),s(53950)},67387:(e,t,s)=>{"use strict";s.d(t,{X8:()=>f,d3:()=>j});var a=s(10940),r=s(61913),l=s(84108),n=s(45269),i=s(90122),o=s.n(i),c=s(35295),d=s(62544),u=s(20788),m=s(41795),h=s(69789),p=s(54382),x=s(23694);function f(e){return"consumer"===e?"provider":"provider"===e?"consumer":"classroom"===e?"classroom":"team"}function g({chatId:e,type:t}){let s=(0,c.useRouter)(),{title:i,subtitle:o,request:u,messages:h,isLoading:p,isRefreshing:x,isSending:f,sendMessage:v,retrySend:b,typingLabel:j,notifyTyping:N,attachments:y,attachFiles:k,removeAttachment:w,replyTo:_,startReply:C,cancelReply:I,error:S}=(0,l.UU)(e,t),R=(0,n.Q)();return((0,d.useEffect)(()=>{(0,m.hE)({placements:"classroom"===t?[m.pE.CLASSROOM_CHAT]:[m.pE.CONSUMER_CHAT,m.pE.PROVIDER_CHAT,m.pE.TEAM_CHAT],modelId:e})},[e,t]),!S||h.length||p)?(0,a.jsx)(r.RB,{title:i,subtitle:o,requestId:u?.requestId,onRequestClick:u?()=>s.push(u.requestUrl):void 0,typingLabel:j,messages:h,isLoading:p,isRefreshing:x,isSending:f,onSend:v,onType:N,onAttachFiles:k,attachments:y,onRemoveAttachment:w,replyTo:_,onReplyTo:C,onRetryMessage:b,onCancelReply:I,onBack:()=>window.history.length>1?s.back():s.push("/chat"),keyboardInset:R}):(0,a.jsx)(r.u6,{message:"This conversation could not be opened."})}let v={student:"/student",admin:"/admin",networkAdmin:"/network-admin",coordinator:"/coordinator"};function b({chatId:e,type:t}){let s=(0,c.useRouter)(),n=function(e){var t;if(e.backHref&&(t=e.backHref).startsWith("/")&&!t.startsWith("//")&&!t.startsWith("/\\"))return{href:e.backHref,label:"Back to dashboard"};let s=e.from?v[e.from]:void 0;return s?{href:s,label:"Back to dashboard"}:{href:"/marketplace",label:"Explore Marketplace"}}({from:s.query.from,backHref:s.query.backHref}),{sections:i,isLoading:d,search:m,searchResults:h}=(0,x.S)(e),j=(0,l._h)(),N=s.query.from,y=e=>N?`${e}&from=${N}`:e,k=(0,a.jsx)(p.Y,{sections:i,hrefFor:({row:e,tab:t})=>y(`/chat/${e.id}?type=${f(t)}`),hrefForSearch:e=>y(`/chat/${e}?type=team`),onSearch:m,searchResults:h,isLoading:d,linkComponent:j,selectedId:e,onSelect:(e,t)=>
1s.push(t)});return(0,a.jsxs)("div",{className:"flex flex-col h-[100dvh] overflow-hidden bg-webapp",children:[(0,a.jsx)("a",{href:"#main-content",className:"sr-only focus:not-sr-only focus:fixed focus:top-4 focus:left-1/2 focus:-translate-x-1/2 focus:z-[100] focus:px-4 focus:py-2 focus:bg-white focus:text-green focus:rounded-lg focus:shadow-lg focus:outline-none",children:"Skip to main content"}),(0,a.jsxs)("header",{className:"flex flex-none items-center gap-4 border-b border-softgrey1 bg-white px-4 py-3",children:[(0,a.jsx)(o(),{href:"/","aria-label":"KANU home",className:"flex shrink-0 items-center",children:(0,a.jsx)(u.VTb,{className:"h-6 w-auto"})}),(0,a.jsx)("h1",{className:"min-w-0 truncate text-sm font-bold tracking-[0.4px] text-black1",children:"Inbox"}),(0,a.jsx)(o(),{href:n.href,className:"ml-auto shrink-0 whitespace-nowrap rounded-full border border-softgrey1 px-3 py-1.5 text-sm font-semibold text-black1 hover:bg-softgrey2",children:n.label})]}),(0,a.jsxs)("div",{className:"flex-1 min-h-0 desktop:grid desktop:grid-cols-[360px_1fr] desktop:gap-4 desktop:p-4",children:[(0,a.jsx)("aside",{"aria-label":"Conversations",className:`min-h-0 h-full overflow-hidden rounded-2xl bg-white ${e?"hidden desktop:block":"block"}`,children:k}),(0,a.jsx)("main",{id:"main-content",tabIndex:-1,className:`min-h-0 h-full overflow-hidden rounded-2xl bg-white outline-none ${e?"block":"hidden desktop:block"}`,children:e?(0,a.jsx)("div",{className:"kanu-chat-thread h-full",children:(0,a.jsx)(g,{chatId:e,type:t},e)}):(0,a.jsx)(r.u6,{})})]})]})}function j(e){return(0,a.jsx)(h.n,{children:(0,a.jsx)(b,{...e})})}},69789:(e,t,s)=>{"use strict";s.d(t,{n:()=>x});var a=s(10940),r=s(88063),l=s(88073),n=s(90122),i=s.n(n),o=s(62544),c=s(82887),d=s(15755),u=s(49007);function m({href:e,children:t,...s}){return(0,a.jsx)(i(),{href:e,...s,children:t})}let h={async get(e){let t=await (0,c.Qg)(e);return t?.data??t},async post(e,t){let s=await (0,c.I9)(e,t);return s?.data??s}},p={requestUrl:(e,t)=>`/requests/${e}s/${t}`};function x({children:e}){let{data:t}=(0,d.J)(),s=t?._id??null,n=(0,o.useCallback)(()=>(0,l.getCookie)("accessToken")??null,[]),i=(0,o.useCallback)(()=>s,[s]),c=(0,o.useMemo)(u.N,[]);return(0,a.jsx)(r.g,{http:h,getToken:n,getUserId:i,wsBaseUrl:c,routes:p,linkComponent:m,children:e})}},72237:(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>O});var a=s(10940),r=s(38740),l=s.n(r),n=s(39968),i=s(87439),o=s.n(i),c=s(29229),d=s(62544),u=s(25298),m=s(20788),h=s(52827),p=s(72977),x=s(75852),f=s(43652),g=s(21072),v=s(82887);function b(e){let{data:t,isLoading:s,error:a,mutate:r}=(0,g.Ay)(e?`admin/network/${e}/performance`:null,v.hS,{revalidateOnFocus:!1});return{performance:t,isLoading:s,error:a,refresh:()=>r()}}var j=s(64052),N=s(32288);function y(){let{networkAdmin:e}=(0,f.F)(),{performance:t}=b(e?.networkId);return t?.summary?.schoolLive?(0,a.jsx)("span",{className:"bg-green-deep text-white text-sm font-semibold px-2 py-1 rounded-md",children:"Live"}):null}function k({label:e,value:t,isLoading:s}){return(0,a.jsxs)("div",{className:"flex-1 h-full flex flex-col justify-center gap-1 p-4 bg-softgrey2 rounded-2xl overflow-hidden",children:[s?(0,a.jsx)(c.A,{variant:"text",width:48,height:40}):(0,a.jsx)("p",{className:(0,j.cn)("text-[35px] font-bold",void 0===t?"text-[#9aa5b1]":"text-black1"),children:t??"-"}),(0,a.jsx)("p",{className:"text-sm text-black1",children:e})]})}function w({label:e,tiles:t,isLoading:s}){return(0,a.jsxs)("div",{className:"flex flex-col gap-4 w-full",children:[(0,a.jsx)("p",{className:"text-sm font-bold text-black2",children:e}),(0,a.jsx)("div",{className:"flex gap-4 h-[105px] w-full",children:t.map(e=>(0,a.jsx)(k,{...e,isLoading:s},e.label))})]})}function _({product:e}){let t="competition"===e;return(0,a.jsx)("span",{className:(0,j.cn)("inline-flex items-center px-2 py-1 rounded-md text-sm font-semibold whitespace-nowrap",t?"bg-aeroyellow text-ongoing":"bg-aeroteal text-green"),children:t?"Competitions":"Classroom"})}function C({plan:e}){let t="paid"===e;return(0,a.jsx)("span",{className:(0,j.cn)("inline-flex items-center px-2 py-1 rounded-md text-sm font-semibold whitespace-nowrap",t?"bg-aeroteal text-green":"bg-softgrey1 text-black2"),children:t?"Paid":"Free"})}function I({onInviteClick:e}){return(0,a.jsxs)("div",{className:"flex flex-col gap-4 items-center py-10 px-4",children:[(0,a.jsx)(o(),{src:"/static/no-result.svg",alt:"",width:128,height:128}),(0,a.jsxs)("div",{className:"flex flex-col gap-2 items-center text-center max-w-lg",children:[(0,a.jsx)("p",{className:"text-base font-semibold text-black2",children:"No admin yet"}),(0,a.jsx)("p",{className:"text-sm text-black3",children:"Invite your admin — once they join, their rollout stage and activity show here."})]}),(0,a.jsxs)(h.$,{variant:"outlined",className:"w-fit normal-case",onClick:e,children:[(0,a.jsx)(m.Amp,{className:"size-4 fill-tealdarker"}),"Invite Admin"]})]})}function S({admins:e}){return(0,a.jsxs)("div",{className:"flex flex-col gap-4 w-full",children:[(0,a.jsx)("p",{className:"text-sm font-bold text-black2",children:"Admin rollout"}),(0,a.jsx)("div",{className:"w-full rounded-2xl border border-softgrey1 overflow-hidden",children:(0,a.jsxs)("table",{className:"w-full border-collapse",children:[(0,a.jsx)("thead",{children:(0,a.jsxs)("tr",{className:"bg-softgrey2 border-b border-[#DEE2E6]",children:[(0,a.jsx)("th",{className:"text-left px-4 py-2 text-sm font-bold text-black2 w-[360px]",children:"Admin"}),(0,a.jsx)("th",{className:"text-left px-4 py-2 text-sm font-bold text-black2",children:"School"}),(0,a.jsx)("th",{className:"text-left px-4 py-2 text-sm font-bold text-black2",children:"Status"}),(0,a.jsx)("th",{className:"text-left px-4 py-2 text-sm font-bold text-black2",children:"Educator"})]})}),(0,a.jsx)("tbody",{children:e.map((e,t)=>(0,a.jsxs)("tr",{className:"border-b border-softgrey1 last:border-0",children:[(0,a.jsx)("td",{className:"px-4 py-2",children:(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)(p.v,{src:e.user.photoUrl,name:e.user.name,size:42}),(0,a.jsx)("span",{className:"text-sm font-semibold text-black1",children:e.user.name})]})}),(0,a.jsx)("td",{className:"px-4 py-2",children:e.school?(0,a.jsxs)("div",{className:"flex items-center gap-1",children:[(0,a.jsx)(p.v,{src:e.school.logoUrl,name:e.school.name,size:28,rounded:"full"}),(0,a.jsx)("span",{className:"text-sm text-black2",children:e.school.name})]}):(0,a.jsx)("span",{className:"text-sm text-black2",children:"-"})}),(0,a.jsx)("td",{className:"px-4 py-2",children:(0,a.jsx)(N.T,{status:e.status})}),(0,a.jsx)("td",{className:"px-4 py-2 text-sm text-black2",children:e.educatorCount??"-"})]},e.user._id??`${e.user.name}-${t}`))})]})})]})}function R(){return(0,a.jsxs)("tr",{className:"border-b border-softgrey1 last:border-0",children:[(0,a.jsx)("td",{className:"px-4 py-2",children:(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)(c.A,{variant:"rounded",width:42,he
1ight:42}),(0,a.jsx)(c.A,{variant:"text",width:140,height:20})]})}),(0,a.jsx)("td",{className:"px-4 py-2",children:(0,a.jsx)(c.A,{variant:"rounded",width:48,height:26})}),(0,a.jsx)("td",{className:"px-4 py-2",children:(0,a.jsx)(c.A,{variant:"rounded",width:90,height:26})}),(0,a.jsx)("td",{className:"px-4 py-2 text-right",children:(0,a.jsx)(c.A,{variant:"rounded",width:64,height:34,className:"ml-auto"})})]})}function A({schools:e,isLoading:t,onInviteClick:s}){return(0,a.jsxs)("div",{className:"flex flex-col gap-4 w-full",children:[(0,a.jsx)("div",{className:"flex items-center gap-1 w-full",children:(0,a.jsx)("p",{className:"flex-1 text-sm font-bold text-black2",children:"My Schools"})}),(0,a.jsx)("div",{className:"w-full rounded-2xl border border-softgrey1 overflow-hidden",children:(0,a.jsxs)("table",{className:"w-full border-collapse",children:[(0,a.jsx)("thead",{children:(0,a.jsxs)("tr",{className:"bg-softgrey2 border-b border-[#DEE2E6]",children:[(0,a.jsx)("th",{className:"text-left px-4 py-2 text-sm font-bold text-black2",children:"Schools"}),(0,a.jsx)("th",{className:"text-left px-4 py-2 text-sm font-bold text-black2",children:"Plan"}),(0,a.jsx)("th",{className:"text-left px-4 py-2 text-sm font-bold text-black2",children:"Live products"}),(0,a.jsx)("th",{className:"w-[98px]",children:(0,a.jsx)("span",{className:"sr-only",children:"Actions"})})]})}),(0,a.jsx)("tbody",{children:t?Array.from({length:3},(e,t)=>(0,a.jsx)(R,{},t)):0===e.length?(0,a.jsx)("tr",{children:(0,a.jsx)("td",{colSpan:4,children:(0,a.jsx)(I,{onInviteClick:s})})}):e.map(e=>(0,a.jsxs)("tr",{className:"border-b border-softgrey1 last:border-0",children:[(0,a.jsxs)("td",{className:"px-4 py-2 flex items-center gap-2 text-sm font-semibold text-black1",children:[(0,a.jsx)(p.v,{src:e.logoUrl,name:e.name,size:42,rounded:"md"}),e.name]}),(0,a.jsx)("td",{className:"px-4 py-2",children:(0,a.jsx)(C,{plan:e.plan})}),(0,a.jsx)("td",{className:"px-4 py-2",children:(0,a.jsx)("div",{className:"flex items-center gap-1",children:e.liveProducts?.length?e.liveProducts.map(e=>(0,a.jsx)(_,{product:e},e)):(0,a.jsx)("span",{className:"text-sm text-black2",children:"-"})})}),(0,a.jsx)("td",{className:"px-4 py-2 text-right",children:(0,a.jsx)("button",{type:"button",disabled:!0,className:"px-4 py-1.5 rounded-md border border-green bg-softgrey2 text-sm font-bold text-green disabled:opacity-60",children:"View"})})]},e._id))})]})})]})}function E({networkName:e,performance:t,isLoading:s,networkId:r,onInvited:l}){let[n,i]=(0,d.useState)(!1),c=t?.admins??[],p=t?.schools??[],f=t?.summary,g=c.length>0;return(0,a.jsxs)("div",{className:"flex flex-col items-center bg-white rounded-2xl overflow-hidden",children:[(0,a.jsxs)("div",{className:"relative w-full flex items-center gap-4 border-2 border-solid border-white bg-[#f5f7fa] p-4",children:[(0,a.jsx)("span",{"aria-hidden":!0,className:"flex size-[63px] shrink-0 items-center justify-center rounded-[14px] bg-softgrey1 text-[25px] font-semibold text-black3",children:e.charAt(0).toUpperCase()}),(0,a.jsxs)("div",{className:"flex flex-1 flex-col gap-1",children:[(0,a.jsx)("p",{className:"text-sm text-black3",children:"Overview"}),(0,a.jsx)("p",{className:"text-[28px] font-bold text-black2",children:e})]})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-6 p-4 w-full",children:[!g&&!s&&(0,a.jsxs)("div",{className:"relative overflow-hidden bg-[#edfcf4] border-l-4 border-green rounded-2xl px-6 py-4 flex flex-col gap-4",children:[(0,a.jsxs)("div",{className:"flex flex-col gap-2 max-w-[650px]",children:[(0,a.jsx)("p",{className:"text-[17.5px] font-bold text-black2",children:"Let's get your schools running"}),(0,a.jsx)("p",{className:"text-sm text-black3",children:"Invite the admins who'll run each school. Each one sets up their building and invites their own educators. The network fills as they go."})]}),(0,a.jsx)("div",{children:(0,a.jsxs)(h.$,{className:"w-fit normal-case",onClick:()=>i(!0),children:[(0,a.jsx)(m.Amp,{className:"size-4 fill-black1"}),"Invite Admin"]})}),(0,a.jsx)(o(),{src:"/static/network-performance-banner.png",alt:"",width:319,height:157,className:"hidden md:block absolute right-0 top-0 h-full w-auto object-cover"})]}),(0,a.jsx)(w,{label:"Network at a glance",isLoading:s,tiles:[{label:"Schools",value:f?.schools},{label:"Paid Schools",value:f?.paidSchools},{label:"Educators",value:f?.educators},{label:"Students",value:f?.students},{label:"Revenue",value:f?.revenue!==void 0?`$${f.revenue}`:void 0},{label:"Competitions",value:f?.competitions}]}),(0,a.jsx)(w,{label:"Admin rollout",isLoading:s,tiles:[{label:"Invited",value:f?.invitedAdmins},{label:"Joined",value:f?.joinedAdmins},{label:"Training complete",value:f?.adminTrainingComplete},{label:"School live",value:f?.schoolLive}]}),g&&(0,a.jsx)(S,{admins:c}),(0,a.jsx)(A,{schools:p,isLoading:s,onInviteClick:()=>i(!0)})]}),(0,a.jsx)(x.j,{open:n,onClose:()=>
1i(!1),role:u.tz.ADMIN,scopeId:r,onInvited:()=>l?.()})]})}var T=s(96024);function L(){let{networkAdmin:e,isLoading:t}=(0,f.F)(),s=e?.networkId,r=e?.networkName??"Your Network",{performance:l,isLoading:n,refresh:i}=b(s),{redirectPending:o}=(0,T.K)({moduleZeroId:e?.moduleZeroRedirectId,stepId:e?.moduleZeroRedirectStepId,trainingHref:"/network-admin/training",storageKey:"network-admin-module-zero-redirect-seen"});return t||o?null:(0,a.jsx)("div",{className:"p-4",children:(0,a.jsx)(E,{networkName:r,performance:l,isLoading:t||n,networkId:s,onInvited:i})})}function O(){return(0,a.jsxs)(n.e,{breadcrumbSuffix:[{label:"Overview"}],trailingBadge:(0,a.jsx)(y,{}),children:[(0,a.jsx)(l(),{children:(0,a.jsx)("title",{children:"Overview | KANU"})}),(0,a.jsx)(L,{})]})}},72977:(e,t,s)=>{"use strict";s.d(t,{v:()=>i});var a=s(10940),r=s(87439),l=s.n(r),n=s(64052);function i({src:e,name:t,size:s,rounded:r="md"}){let o="full"===r?"rounded-full":"rounded-md";return e?(0,a.jsx)(l(),{src:e,alt:"",width:s,height:s,className:(0,n.cn)(o,"object-cover shrink-0"),style:{width:s,height:s}}):(0,a.jsx)("span",{className:(0,n.cn)("flex items-center justify-center bg-softgrey1 text-black3 font-semibold shrink-0",o),style:{width:s,height:s,fontSize:.4*s},"aria-hidden":!0,children:t.charAt(0).toUpperCase()})}},75852:(e,t,s)=>{"use strict";s.d(t,{j:()=>b});var a=s(10940),r=s(87439),l=s.n(r),n=s(62544),i=s(25298),o=s(20788),c=s(40784),d=s(52827),u=s(82887),m=s(64052);let h=/^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/,p={[i.tz.ADMIN]:{modalTitle:"Invite Admins",inputPlaceholder:"Admin emails (one per line or paste CSV)",roleLabel:"Admin",fromScopeLabel:"[Network Name]",toText:"[email protected]",previewIntro:"You're invited to administer",previewBody:"[Inviter Full Name] from [Network Name] has set up [School Name] on KANU and named you as Admin. You'll invite educators and coordinators, and monitor activity on KANU across your school.",footerLinkStyle:"underline",successNote:"Recipients will receive an email invitation to join the Admin team. You can track their progress in the People → Admins table."},[i.tz.EDUCATOR]:{modalTitle:"Invite Educators",inputPlaceholder:"Educator emails (one per line or paste CSV)",roleLabel:"Educator",fromScopeLabel:"[School Name]",toText:"[Inviter Email]",previewIntro:"You're invited to teach with KANU at",previewBody:"[Inviter Full Name] has added you as an Educator at [School Name]. You'll deploy projects to your students, track their progress, and see what they're building.",footerLinkStyle:"bracket",successNote:"Recipients will receive an email invitation to join as an Educator. They can create their account using the invited email."},[i.tz.COORDINATOR]:{modalTitle:"Invite Coordinators",inputPlaceholder:"Coordinator emails (one per line or paste CSV)",roleLabel:"Coordinator",fromScopeLabel:"[School Name]",toText:"[Inviter Email]",previewIntro:"You're invited to coordinate at",previewBody:"[Inviter Full Name] has added you as a Coordinator at [School Name]. You'll run competitions, manage participants, and track team progress.",footerLinkStyle:"underline",successNote:"Recipients will receive an email invitation to join as a Coordinator. They can create their account using the invited email."}};function x({onClose:e}){return(0,a.jsx)("button",{type:"button",onClick:e,"aria-label":"Close",className:"absolute top-4 right-4 text-black3 hover:text-black1 text-xl leading-none",children:(0,a.jsx)(o.USm,{})})}function f({copy:e,emails:t,setEmails:s,onPreview:r,onSend:l,isSending:i,sendError:c,canSend:u,onClose:p}){let[g,v]=(0,n.useState)(""),[b,j]=(0,n.useState)(!1),N=()=>{let e=g.trim();e&&(h.test(e)&&!t.includes(e)?(s([...t,e]),v(""),j(!1)):j(!0))};return(0,a.jsxs)("div",{className:"relative flex flex-col gap-4 p-6",children:[(0,a.jsx)(x,{onClose:p}),(0,a.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,a.jsx)("p",{className:"text-2xl font-bold text-black1",children:e.modalTitle}),(0,a.jsx)("p",{className:"text-sm text-black3",children:"Send free invites to your staff. No Voyage Passes consumed."})]}),(0,a.jsxs)("label",{htmlFor:"capability-emails-input",className:(0,m.cn)("flex flex-wrap items-start content-start gap-2 p-[10.5px] rounded-md border min-h-[124px] focus-within:border-green transition-colors cursor-text",b?"border-red":"border-[#ced4da]"),children:[t.map(e=>(0,a.jsxs)("span",{className:"flex items-center gap-2 px-2 py-1 rounded-full bg-softgrey2 text-sm font-semibold text-black2",children:[(0,a.jsx)("button",{type:"button",onClick:()=>s(t.filter(t=>t!==e)),"aria-label":`Remove ${e}`,className:"text-black3 hover:text-black1",children:"\xd7"}),e]},e)),(0,a.jsx)("input",{id:"capability-emails-input","aria-label":"Emails",className:(0,m.cn)("flex-1 min-w-[160px] outline-none text-sm bg-transparent",b&&"text-red"),placeholder:0===t.length?e.inputPlaceholder:"",value:g,onChange:e=>{v(e.target.value),j(!1)},onKeyDown:e=>{"Enter"===e.key||","===e.key||" "===e.key?(e.preventDefault(),N()):"Backspace"===e.key&&!g&&t.length>0&&s(t.slice(0,-1))},onPaste:e=>{let a=e.clipboardData.getData("text");if(/[\n,]/.test(a)){e.preventDefault();let r=a.split(/[\n,]+/).map(e=>
1e.trim()).filter(Boolean).filter(e=>h.test(e)&&!t.includes(e));r.length&&s([...t,...r]),v("")}},onBlur:()=>{N()}})]}),b&&(0,a.jsx)("p",{className:"text-xs text-red -mt-3",children:"That doesn't look like a valid email address."}),c&&(0,a.jsxs)("div",{className:"flex items-start gap-2 p-3 rounded-md bg-aerored border border-red",children:[(0,a.jsx)(o.Rb4,{className:"size-3.5 shrink-0 mt-0.5"}),(0,a.jsx)("p",{className:"text-sm text-red",children:c})]}),(0,a.jsxs)("div",{className:"flex gap-4",children:[(0,a.jsx)(d.$,{variant:"outlined",className:"w-fit normal-case",onClick:r,children:"Email Preview"}),(0,a.jsx)(d.$,{className:"normal-case flex-1",disabled:0===t.length||i||!u,onClick:l,children:i?"Sending…":`Send ${t.length||""} Invite${1===t.length?"":"s"}`})]})]})}function g({copy:e,onBack:t,onClose:s}){return(0,a.jsxs)("div",{className:"flex flex-col",children:[(0,a.jsxs)("div",{className:"flex gap-3 items-center p-4 border-b border-softgrey1",children:[(0,a.jsx)("button",{type:"button",onClick:t,"aria-label":"Back",children:(0,a.jsx)(o.YJP,{className:"size-6"})}),(0,a.jsx)("p",{className:"flex-1 text-2xl font-bold text-black1",children:"Email Preview"}),(0,a.jsx)("button",{type:"button",onClick:s,"aria-label":"Close",className:"text-black3 hover:text-black1",children:(0,a.jsx)(o.USm,{className:"size-6"})})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-3 p-4 bg-background rounded-b-2xl",children:[(0,a.jsxs)("p",{className:"pl-10 text-base font-bold text-black2",children:["[Inviter Full Name] invited you to join [School Name] as"," ",e.roleLabel]}),(0,a.jsxs)("div",{className:"flex gap-3 items-center",children:[(0,a.jsx)("span",{className:"flex items-center justify-center size-7 rounded-xl bg-black1 shrink-0",children:(0,a.jsx)(o.SSm,{})}),(0,a.jsxs)("div",{className:"flex flex-col",children:[(0,a.jsxs)("div",{className:"flex gap-1 items-end",children:[(0,a.jsxs)("p",{className:"text-xs font-bold text-black2 whitespace-nowrap",children:["[Inviter Full Name] (",e.fromScopeLabel,") via KANU"]}),(0,a.jsx)("p",{className:"text-[10px] text-black1/54 whitespace-nowrap",children:"<[email protected]>"})]}),(0,a.jsxs)("div",{className:"flex gap-1 items-center",children:[(0,a.jsx)("p",{className:"text-xs font-semibold text-black1/54",children:"to"}),(0,a.jsx)("p",{className:"text-xs font-semibold text-black1/54",children:e.toText}),(0,a.jsx)(o.yM_,{className:"size-4 fill-black1/54"})]})]})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-4 pl-10 pb-10",children:[(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)("p",{className:"text-xs text-black3",children:e.previewIntro}),(0,a.jsx)("p",{className:"text-base font-bold text-black2",children:"[School Name]"}),(0,a.jsx)("p",{className:"text-xs text-black2",children:e.previewBody})]}),(0,a.jsxs)(d.$,{size:"small",className:"w-fit normal-case",children:["Accept Invitation",(0,a.jsx)(o.LSg,{className:"size-3.5"})]}),(0,a.jsx)("p",{className:"text-xs text-black2",children:"Questions? Reply to this email to reach [Inviter First Name] directly. This invitation expires in 7 days. If you weren't expecting this, you can ignore it."}),"underline"===e.footerLinkStyle?(0,a.jsxs)("p",{className:"text-xs text-black2",children:["KANU is the K-12 platform for experiential entrepreneurship education."," ",(0,a.jsx)("span",{className:"font-bold underline",children:"Privacy Policy"})," \xb7"," ",(0,a.jsx)("span",{className:"font-bold underline",children:"Help Center"})," \xb7 kanu.us"]}):(0,a.jsxs)("p",{className:"text-xs text-black2",children:["KANU is the K-12 platform for experiential entrepreneurship education. ",(0,a.jsx)("span",{className:"font-bold",children:"[Privacy Policy]"})," \xb7"," ",(0,a.jsx)("span",{className:"font-bold",children:"[Help Center]"})," \xb7 kanu.us"]})]})]})]})}function v({copy:e,result:t,onInviteMore:s,onDone:r}){let{successfulInvites:n,failedInvites:i}=t,c=n.length+i.length;return(0,a.jsxs)("div",{className:"relative flex flex-col gap-4 p-6 items-center text-center",children:[(0,a.jsx)(x,{onClose:r}),(0,a.jsx)(l(),{src:"/static/new-classroom-success.svg",alt:"",width:128,height:128}),(0,a.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,a.jsx)("p",{className:"text-2xl font-bold text-black1",children:0===i.length?"Invites sent successfully!":0===n.length?"Invites could not be sent":"Some invites sent successfully"}),(0,a.jsxs)("p",{className:"text-sm text-black3",children:[n.length," of ",c," invitation",1===c?"":"s"," sent and added to your tracking table."]})]}),n.length>0&&(0,a.jsxs)("div",{className:"w-full text-left",children:[(0,a.jsxs)("p",{className:"text-sm font-bold text-black2 mb-2",children:["Sent to (",n.length,")"]}),(0,a.jsx)("div",{className:"flex flex-wrap gap-2",children:n.map(e=>(0,a.jsxs)("span",{className:"flex items-center gap-2 px-2 py-1 rounded-full border border-softgrey1 text-sm font-semibold text-black3",children:[(0,a.jsx)(o.K$O,{className:"size-3.5 shrink-0"}),e]},e))})]}),i.length>0&&(0,a.jsxs)("div",{className:"w-full text-left",children:[(0,a.jsxs)("p",{className:"text-sm font-bold text-black2 mb-2",children:["Not sent (",i.length,")"]}),(0,a.jsx)("div",{className:"flex flex-col gap-2",children:i.map(({email:e,reason:t})=>(0,a.jsxs)("div",{className:"flex items-start gap-2 px-3 py-2 rounded-md border border-softgrey1",children:[(0,a.jsx)(o.Rb4,{className:"size-3.5 shrink-0 mt-0.5"}),(0,a.jsxs)("div",{className:"flex flex-col min-w-0",children:[(0,a.jsx)("span",{className:"text-sm font-semibold text-black3",children:e}),(0,a.jsx)("span",{className:"text-xs text-black3/70",children:t})]})]},e))})]}),(0,a.jsxs)("div",{className:"w-full flex items-start gap-2 p-3 rounded-md bg-softgrey2 border border-softgrey1 text-left",children:[(0,a.jsx)(o.eeW,{className:"size-5 shrink-0 fill-black3"}),(0,a.jsx)("p",{className:"text-sm text-black3",children:e.successNote})]}),(0,a.jsxs)("div",{className:"flex gap-3 w-full",children:[(0,a.jsx)(d.$,{variant:"outlined",className:"flex-1 h-[38px] normal-case !border-teallight !text-teallight",onClick:s,children:"Invite more"}),(0,a.jsx)(d.$,{className:"flex-1 h-[38px] normal-case !text-black1",onClick:r,children:"Done"})]})]})}
1function b({open:e,onClose:t,role:s,scopeId:r,onInvited:l}){let[o,d]=(0,n.useState)("compose"),[m,h]=(0,n.useState)([]),[x,j]=(0,n.useState)(!1),[N,y]=(0,n.useState)(null),[k,w]=(0,n.useState)(null),_=p[s],C=()=>{t(),d("compose"),h([]),y(null),w(null)},I=async()=>{if(r&&0!==m.length){j(!0),y(null);try{let e=s===i.tz.ADMIN?{role:s,emails:m,networkId:r}:{role:s,emails:m,ecosystemId:r},t=await (0,u.I9)("account/capability-invite",e);w(t),d("success"),l?.()}catch{y("Something went wrong sending these invites. Please try again.")}finally{j(!1)}}};return(0,a.jsx)(c.I,{open:e,onClose:C,customContent:!0,hideHeader:!0,disabledDismiss:!0,"aria-label":_.modalTitle,children:(0,a.jsxs)("div",{className:"w-[520px] max-w-full rounded-2xl overflow-hidden",children:["compose"===o&&(0,a.jsx)(f,{copy:_,emails:m,setEmails:h,onPreview:()=>d("preview"),onSend:I,isSending:x,sendError:N,canSend:!!r,onClose:C}),"preview"===o&&(0,a.jsx)(g,{copy:_,onBack:()=>d("compose"),onClose:C}),"success"===o&&k&&(0,a.jsx)(v,{copy:_,result:k,onInviteMore:()=>{d("compose"),h([]),w(null)},onDone:C})]})})}},76255:(e,t,s)=>{"use strict";s.d(t,{_u:()=>p});var a=s(10940),r=s(61913),l=s(84108),n=s(62544),i=s(61682),o=s(69789),c=s(96246),d=s(54382),u=s(67387),m=s(23694);function h(){let[e,t]=(0,n.useState)(),{sections:s,isLoading:i,search:o,searchResults:h}=(0,m.S)(e?.chatId),p=(0,l._h)(),x=(0,a.jsx)(d.Y,{sections:s,hrefFor:({row:e,tab:t})=>`/chat/${e.id}?type=${(0,u.X8)(t)}`,hrefForSearch:e=>`/chat/${e}?type=team`,onSearch:o,searchResults:h,isLoading:i,linkComponent:p,selectedId:e?.chatId,onSelect:(e,s)=>t({chatId:e,type:new URLSearchParams(s.split("?")[1]).get("type")??void 0})});return(0,a.jsxs)("div",{className:"flex w-[860px] max-w-[100vw] h-screen overflow-hidden bg-white",children:[(0,a.jsx)("div",{className:"w-[340px] shrink-0 h-full overflow-hidden border-r border-softgrey1",children:x}),(0,a.jsx)("div",{className:"flex-1 h-full overflow-hidden",children:e?(0,a.jsx)(c.q,{chatId:e.chatId,type:e.type,onClose:()=>t(void 0)},e.chatId):(0,a.jsx)(r.u6,{})})]})}function p({onClose:e}){return(0,a.jsx)(i.w,{onClose:e,children:(0,a.jsx)(o.n,{children:(0,a.jsx)(h,{})})})}},84108:(e,t,s)=>{"use strict";s.d(t,{DD:()=>u,xz:()=>y,_h:()=>_,UU:()=>w,RL:()=>h,TA:()=>n});var a=s(62544),r=s(21072),l=s(88063);function n(){let{getUserId:e}=(0,l.q)(),[t,s]=(0,a.useState)(()=>{let t=e();return"string"==typeof t?t:null});return(0,a.useEffect)(()=>{let t=!0;return Promise.resolve(e()).then(e=>{t&&s(e??null)}),()=>{t=!1}},[e]),t}function i(e){return`${e?.firstName??""} ${e?.lastName??""}`.trim()}function o(e){return"products"===e.businessType?e.businessLogoUrl||e.businessPhotoUrl||void 0:e.businessPhotoUrl??void 0}function c(e,t){let s=e.chat??{},a=s.group??[],r=a.map(i).filter(Boolean).join(", "),l={id:s._id??"",requestReferenceId:s.requestReferenceId,lastMessage:e.lastMessage?.content,timestamp:e.lastMessage?.createdAt,unread:e.unreadMessage,participantIds:a.map(e=>e._id).filter(e=>!!e),participants:a.filter(e=>!!e._id).map(e=>({id:e._id,name:i(e)})),classroomId:s.classroomId,ecosystemId:s.ecosystemId};if("provider"===t){let e=a[1],t=i(e);return{...l,name:t||(s.businessName?`${s.businessName} team`:r||"Chat"),photoUrl:e?.photoUrl??void 0,businessName:s.businessName}}return"team"===t?{...l,name:s.businessName?`${s.businessName} team`:r||"Chat",photoUrl:o(s)}:"classroom"===t||"staff"===t?{...l,name:r||"Chat"}:{...l,name:s.businessName||r||"Chat",photoUrl:o(s)}}let d={consumer:[],provider:[],team:[],classroom:[],staff:[]};function u(e,t){return new Date(t.timestamp??0).getTime()-new Date(e.timestamp??0).getTime()}function m(e,t){return t?e.map(e=>{let s=e.participants?.find(e=>e.id!==t&&e.name);return s&&s.name!==e.name?{...e,name:s.name}:e}):e}function h(){let{http:e}=(0,l.q)(),{data:t,error:s,isLoading:i,mutate:o}=(0,r.Ay)("chat",async t=>{let s=await e.get(t);return{consumer:(s?.preparedConsumer??[]).map(e=>c(e,"consumer")),provider:(s?.preparedProvider??[]).map(e=>c(e,"provider")),team:(s?.preparedTeam??[]).map(e=>c(e,"team")),classroom:(s?.preparedClassroom??[]).map(e=>c(e,"classroom")),staff:(s?.preparedStaff??[]).map(e=>c(e,"staff"))}}),u=n(),h=t??d,p=(0,a.useMemo)(()=>0===h.classroom.length&&0===h.staff.length?h:{...h,classroom:m(h.classroom,u),staff:m(h.staff,u)},[h,u]),x=(0,a.useRef)(p);x.current=p;let f=(0,a.useCallback)((e,t)=>{let s=function(e,t,s){let a=t?.chat;if(!a)return null;let r="object"==typeof t.owner&&null!==t.owner?String(t.owner._id??""):String(t.owner??""),l=(!s?.selfId||r!==s.selfId)&&a!==s?.openChatId,n=!1,i={};for(let s of["consumer","provider","team","classroom","staff"]){let r=e[
1s],o=r.findIndex(e=>e.id===a);if(-1===o){i[s]=r;continue}n=!0;let c={...r[o],lastMessage:t.content??r[o].lastMessage,timestamp:t.createdAt??r[o].timestamp,unread:l?(r[o].unread??0)+1:r[o].unread};i[s]=[c,...r.slice(0,o),...r.slice(o+1)]}return n?i:null}(x.current,e,t);return s&&o(s,{revalidate:!1}),null!==s},[o]),[g,v]=(0,a.useState)(null),b=(0,a.useRef)(0),j=(0,a.useRef)(""),N=(0,a.useCallback)(async t=>{let s=t.trim();j.current=s;let a=++b.current;if(v(null),s)try{let t=await e.get(`chat/find/messages?searchText=${encodeURIComponent(s)}`);if(a!==b.current)return;let r=new Map;for(let e of[...x.current.consumer,...x.current.provider,...x.current.team,...x.current.classroom,...x.current.staff])r.has(e.id)||r.set(e.id,e.name);v({users:(t?.users??[]).map(e=>c(e,"team")),messages:(t?.messages??[]).map(e=>({id:e.chat??"",name:r.get(e.chat??"")??"Chat",lastMessage:e.content,timestamp:e.createdAt}))})}catch{a===b.current&&v({users:[],messages:[]})}},[e]),y=(0,a.useCallback)(()=>j.current?N(j.current):Promise.resolve(),[N]);return{tabs:p,error:s,isLoading:i,refresh:o,applyLastMessage:f,search:N,searchResults:g,refreshSearch:y}}var p=s(6608),x=s(24767);function f(e){return e?.toLowerCase()||void 0}function g(e){return`${e?.firstName??""} ${e?.lastName??""}`.trim()}function v(e){return e._id??(null!=e.id?String(e.id):void 0)}function b(e){return"string"==typeof e.owner?e.owner:e.owner?._id}function j(e){return"string"==typeof e.owner?void 0:e.owner}function N(e){return"string"==typeof e.quote?e.quote:e.quote?._id}function y(e,t){let s=v(t);if(s&&e.some(e=>v(e)===s))return e.map(e=>v(e)===s?{...e,pending:!1}:e);let a=b(t),r=e.findIndex(e=>e.pending&&!e._id&&e.content===t.content&&b(e)===a&&void 0!==a);return -1!==r?e.map((e,s)=>s===r?{...e,_id:t._id,pending:!1}:e):[...e,t]}function k(e){return(e.photos??[]).map(e=>"string"==typeof e?e:e.webviewPath||e.s3Url).filter(e=>!!e)}function w(e,t,s){var i;let o,c,{http:d,routes:u}=(0,l.q)(),m=n(),h=s?`?guestIdentifier=${encodeURIComponent(s)}`:"",w=e?`chat/${e}${h}`:null,_=(0,a.useRef)(!1),{data:C,error:I,isLoading:S,isValidating:R,mutate:A}=(0,r.Ay)(w,async e=>{let t=await d.get(e);return{messages:t?.message??[],chat:t?.chat??{},businessName:t?.business?.businessName,request:t?.request,viewerId:t?.viewerId}},s&&!m?{refreshInterval:12e3,isPaused:()=>_.current}:void 0),E=m??C?.viewerId??null,[T,L]=(0,a.useState)(!1),[O,P]=(0,a.useState)(null),D=function(e,t){let{http:s}=(0,l.q)(),[r,n]=(0,a.useState)([]),i=(0,a.useRef)(new Map),o=(0,a.useRef)([]);(0,a.useEffect)(()=>()=>{for(let e of o.current)URL.revokeObjectURL(e)},[]);let c=(0,a.useCallback)(a=>{for(let r of a){let a=`${r.name}-${r.size}-${o.current.length}-${Math.random().toString(36).slice(2)}`,l=URL.createObjectURL(r);o.current.push(l),n(e=>[...e,{id:a,previewUrl:l,progress:0}]),(async()=>{try{let l=function(e){let t=e.name.includes(".")?e.name.split(".").pop():void 0,s=`${Date.now()}-${Math.random().toString(36).slice(2,14)}`;return t?`${s}.${t}`:s}(r),{presigned:o}=await s.post("upload-credential",{path:e?`chat/${e}`:"chat",...t&&e?{chatId:e,guestIdentifier:t}:{}}),c=await function(e,t,s,a){let{url:r,key:l,...n}=e,i=new FormData;for(let[e,t]of(i.append("key",l),Object.entries(n)))i.append(e,t);return i.append("file",t,s),new Promise((e,t)=>{let n=new XMLHttpRequest;n.open("POST",r),n.timeout=6e4,n.upload.onprogress=e=>{e.lengthComputable&&a(Math.round(e.loaded/e.total*100))},n.onload=()=>{let a,i,o;return n.status>=200&&n.status<300?e((i=(a=l.includes("${filename}")?l.replace("${filename}",s):l).startsWith("/")?a.slice(1):a,o=r.endsWith("/")?r:`${r}/`,`${o}${i}`)):t(Error(`S3 upload failed (${n.status})`))},n.onerror=()=>t(Error("S3 upload failed")),n.ontimeout=()=>t(Error("S3 upload timed out")),n.send(i)})}(o,r,l,e=>n(t=>t.map(t=>t.id===a?{...t,progress:e}:t)));i.current.set(a,c),n(e=>e.map(e=>e.id===a?{id:e.id,previewUrl:e.previewUrl}:e))}catch{n(e=>e.map(e=>e.id===a?{...e,progress:void 0,failed:!0}:e))}})()}},[s,e,t]),d=(0,a.useCallback)(e=>{i.current.delete(e),n(t=>{let s=t.find(t=>t.id===e);return s&&(URL.revokeObjectURL(s.previewUrl),o.current=o.current.filter(e=>e!==s.previewUrl)),t.filter(t=>t.id!==e)})},[]),u=(0,a.useCallback)(()=>{let e=r.filter(e=>i.current.has(e.id)),t=e.map(e=>i.current.get(e.id));for(let t of e)URL.revokeObjectURL(t.previewUrl),i.current.delete(t.id);let s=new Set(e.map(e=>e.previewUrl));return o.current=o.current.filter(e=>!s.has(e)),n(t=>t.filter(t=>!e.some(e=>e.id===t.id))),t},[r]),m=r.filter(e=>i.current.has(e.id)).length;return{attachments:r,add:c,remove:d,takeUrls:u,readyCount:m}}(e,s);(0,a.useEffect)(()=>{P(null)},[e]);let{mutate:$,cache:M}=(0,p.iX)();(0,a.useEffect)(()=>
1{if(!e||!M.get("chat")?.data)return;let t=(t=[])=>t.map(t=>t.id===e?{...t,unread:0}:t);$("chat",e=>e&&{consumer:t(e.consumer),provider:t(e.provider),team:t(e.team),classroom:t(e.classroom),staff:t(e.staff)},{revalidate:!1})},[e,$,M]);let U=(0,a.useMemo)(()=>{let e=(C?.messages??[]).slice().sort((e,t)=>new Date(e.createdAt??0).getTime()-new Date(t.createdAt??0).getTime()),t=new Map;for(let s of e)s._id&&t.set(s._id,s);return e.map((e,s)=>{let a,r;return a=e._id??(null!=e.id?String(e.id):void 0)??`idx-${s}`,r=N(e)?t.get(N(e)):void 0,{id:a,text:e.content??"",timestamp:e.createdAt,isMine:!!E&&b(e)===E,avatarUrl:j(e)?.photoUrl??void 0,author:g(j(e))||void 0,photos:k(e),pending:e.pending,failed:e.failed,quote:r?{author:g(j(r))||void 0,text:r.content||(k(r).length?"Photo":"")}:void 0}})},[C,E]),{typing:q,notifyTyping:F,stopTyping:Y}=function(e,t){let{userId:s}=t,{getToken:r,wsBaseUrl:n}=(0,l.q)(),i=(0,a.useRef)(null),[o,c]=(0,a.useState)(null),d=(0,a.useRef)(!1),u=(0,a.useRef)(void 0),m=(0,a.useRef)(t.onMessage);m.current=t.onMessage;let h=(0,a.useRef)(t.onReconnect);h.current=t.onReconnect;let p=(0,a.useRef)(t.userId);p.current=t.userId;let f=(0,a.useRef)(r);f.current=r;let g=(0,a.useRef)(null);(0,a.useEffect)(()=>{if(!e)return;let t=!1;g.current=null;let s=new x.$({baseUrl:n,getToken:()=>f.current(),namespace:"message",onReconnect:a=>{if(t)return;let r=p.current??void 0;g.current=r??null,s.emit("enter-chat-room",{chatId:e,owner:r}),s.emit("read-message",{chatId:e,owner:r}),a&&h.current?.()}});return i.current=s,s.on("message",e=>m.current(e)),s.on("users-typing",e=>{c(e?.typing?e:null)}),s.connect().catch(()=>{}),()=>{t=!0,clearTimeout(u.current),d.current&&(d.current=!1,s.emit("is-typing",{chatId:e,owner:p.current??void 0,typing:!1})),s.emit("leave-chat-room",{chatId:e,owner:p.current??void 0}),s.disconnect(),i.current=null}},[e,n]),(0,a.useEffect)(()=>{e&&s&&g.current!==s&&(g.current=s,i.current?.emit("enter-chat-room",{chatId:e,owner:s}),i.current?.emit("read-message",{chatId:e,owner:s}))},[e,s]);let v=(0,a.useCallback)(t=>{i.current?.emit("is-typing",{chatId:e,owner:p.current??void 0,typing:t})},[e]);return{typing:o,notifyTyping:(0,a.useCallback)(()=>{d.current||(d.current=!0,v(!0)),clearTimeout(u.current),u.current=setTimeout(()=>{d.current=!1,v(!1)},600)},[v]),stopTyping:(0,a.useCallback)(()=>{clearTimeout(u.current),d.current&&(d.current=!1,v(!1))},[v])}}(e,{userId:E,onMessage:(0,a.useCallback)(e=>{e&&A(t=>{let s=t??{messages:[],chat:{}};return{...s,messages:y(s.messages,e)}},{revalidate:!1})},[A]),onReconnect:()=>void A()}),B=(0,a.useCallback)(async(t,s)=>{L(!0),_.current=!0;try{let a=await d.post(`chat/${e}${h}`,{type:s.type,content:s.content??"",...s.photos?.length?{photos:s.photos}:{},...s.quote?{quote:s.quote}:{}}),r=a?.created?.message;await A(e=>{var s;let a;return{...e??{chat:{}},messages:(s=(e?.messages??[]).map(e=>e.id===t?{...e,_id:r?._id,pending:!1}:e),a=new Set,s.filter(e=>!e._id||!a.has(e._id)&&(a.add(e._id),!0)))}},{revalidate:!1})}catch{await A(e=>({...e??{chat:{}},messages:(e?.messages??[]).map(e=>e.id===t?{...e,pending:!1,failed:!0}:e)}),{revalidate:!1})}finally{_.current=!1,L(!1)}},[e,h,d,A]),H=(0,a.useCallback)(async t=>{let s=t.trim();if(!e||!s&&!D.readyCount)return;let a=D.takeUrls();Y();let r=O?.id;P(null);let l=`tmp-${Date.now()}`,n={id:l,content:s,owner:{_id:E??void 0},createdAt:new Date().toISOString(),type:a.length?"picture":"text",photos:a,quote:r,pending:!0};await A(e=>({...e??{chat:{}},messages:[...e?.messages??[],n]}),{revalidate:!1}),await B(l,{type:a.length?"picture":"text",content:s,photos:a,quote:r})},[e,E,A,Y,O,D,B]),z=(0,a.useCallback)(async e=>{let t=(C?.messages??[]).find(t=>v(t)===e&&t.failed&&!t.pending);t&&(await A(t=>({...t??{chat:{}},messages:(t?.messages??[]).map(t=>v(t)===e?{...t,pending:!0,failed:!1}:t)}),{revalidate:!1}),await B(e,{type:t.type??(k(t).length?"picture":"text"),content:t.content,photos:k(t),quote:N(t)}))},[C,A,B]),V=(0,a.useCallback)(e=>{let t=U.find(t=>t.id===e);t&&P({id:e,author:t.isMine?"You":t.author,preview:t.text||(t.photos?.length?"Photo":"")})},[U]),K=q?.typing?`${q.user||"Someone"} is typing`:void 0;return{title:C?(c=(o=C.chat.group??[]).filter(e=>
1e._id!==E).map(g).filter(Boolean).join(", "),"consumer"===f(t)?g(o[1])||c||C.businessName||"Chat":C.businessName||c||"Chat"):"",subtitle:(i=f(t))?i.charAt(0).toUpperCase()+i.slice(1):void 0,request:C?function(e,t,s){if("provider"!==f(t)||!e?._id)return;let a="service"===e.type||"product"===e.type?e.type:void 0;if(!a)return;let r=s.requestUrl(a,e._id);if(r)return{requestId:e.referenceId||e._id,requestUrl:r}}(C.request,t,u):void 0,messages:U,isLoading:S,isRefreshing:R&&!S&&!!C,isSending:T,error:I,sendMessage:H,retrySend:z,typingLabel:K,notifyTyping:F,attachments:D.attachments,attachFiles:D.add,removeAttachment:D.remove,replyTo:O,startReply:V,cancelReply:(0,a.useCallback)(()=>P(null),[])}}function _(){return(0,l.q)().linkComponent}},88063:(e,t,s)=>{"use strict";s.d(t,{g:()=>l,q:()=>n});var a=s(62544);let r=(0,a.createContext)(null);function l({children:e,http:t,getToken:s,getUserId:n,wsBaseUrl:i,routes:o,linkComponent:c}){let d=(0,a.useMemo)(()=>({http:t,getToken:s,getUserId:n,wsBaseUrl:i,routes:o,linkComponent:c}),[t,s,n,i,o,c]);return(0,a.createElement)(r.Provider,{value:d},e)}function n(){let e=(0,a.useContext)(r);if(!e)throw Error("Messaging runtime used outside a <MessagingUiProvider>. Wrap the chat screens in one and pass the app's http, token, user-id, ws and route adapters.");return e}},90354:()=>{},92189:(e,t,s)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/network-admin",function(){return s(72237)}])},93176:(e,t,s)=>{"use strict";s.d(t,{c:()=>l});var a=s(10940),r=s(20788);function l(e,t){return e.map(e=>({id:e._id,label:e.abbreviation??e.name,href:`${t}/${e._id}`,subLinks:[{label:"Activity",href:`${t}/${e._id}/activity`,icon:(0,a.jsx)(r.p3o,{className:"fill-black1"})},{label:"Students",href:`${t}/${e._id}/students`,icon:(0,a.jsx)(r.hjP,{className:"fill-black1"})},{label:"Grades",href:`${t}/${e._id}/grades`,icon:(0,a.jsx)(r.WfV,{className:"fill-black1"})},{label:"Insights",href:`${t}/${e._id}/insights`,icon:(0,a.jsx)(r.YCQ,{className:"fill-black1"})}]}))}},94445:()=>{},96024:(e,t,s)=>{"use strict";s.d(t,{K:()=>l});var a=s(35295),r=s(62544);function l({moduleZeroId:e,stepId:t,trainingHref:s,storageKey:n,showWelcome:i}){let o=(0,a.useRouter)(),[c,d]=(0,r.useState)(!1);return(0,r.useEffect)(()=>d(!0),[]),(0,r.useEffect)(()=>{if(!e||sessionStorage.getItem(n)===e)return;sessionStorage.setItem(n,e);let a=new URLSearchParams({moduleZeroId:e});t&&a.set("stepId",t),i&&a.set("showWelcome","true"),o.replace(`${s}?${a}`)},[e,t,o,s,n,i]),{redirectPending:!!e&&(!c||sessionStorage.getItem(n)!==e)}}},96246:(e,t,s)=>{"use strict";s.d(t,{I:()=>m,q:()=>u});var a=s(10940),r=s(61913),l=s(84108),n=s(45269),i=s(62544),o=s(61682),c=s(41795),d=s(69789);function u({chatId:e,type:t,guestIdentifier:s,onClose:o}){let{title:d,subtitle:m,request:h,messages:p,isLoading:x,isRefreshing:f,isSending:g,sendMessage:v,retrySend:b,typingLabel:j,notifyTyping:N,attachments:y,attachFiles:k,removeAttachment:w,replyTo:_,startReply:C,cancelReply:I,error:S}=(0,l.UU)(e,t,s),R=(0,n.Q)();return((0,i.useEffect)(()=>{(0,c.hE)({placements:"classroom"===t?[c.pE.CLASSROOM_CHAT]:"staff"===t?[c.pE.STAFF_CHAT]:[c.pE.CONSUMER_CHAT,c.pE.PROVIDER_CHAT,c.pE.TEAM_CHAT],modelId:e})},[e,t]),!S||p.length||x)?(0,a.jsx)(r.RB,{title:d,subtitle:m,requestId:h?.requestId,onRequestClick:void 0,typingLabel:j,messages:p,isLoading:x,isRefreshing:f,isSending:g,onSend:v,onType:N,onAttachFiles:k,attachments:y,onRemoveAttachment:w,replyTo:_,onReplyTo:C,onRetryMessage:b,onCancelReply:I,onBack:o,keyboardInset:R}):(0,a.jsx)(r.u6,{message:"This conversation could not be opened."})}let m=({chatId:e,type:t,guestIdentifier:s,onClose:r})=>(0,a.jsx)(o.w,{onClose:r,children:(0,a.jsx)("div",{className:"w-screen max-w-[480px] h-screen flex flex-col bg-white overflow-hidden",children:(0,a.jsx)(d.n,{children:(0,a.jsx)(u,{chatId:e,type:t,guestIdentifier:s,onClose:r},e)})})})},97375:(e,t,s)=>{"use strict";s.d(t,{PS:()=>i,F3:()=>n,RN:()=>o});var a,r,l,n=((a={}).INVITED="invited",a.JOINED="joined",a.TRAINING_COMPLETE="trainingComplete",a.CLASSROOM_LIVE="classroomLive",a),i=((r={}).INVITED="invited",r.JOINED="joined",r.TRAINING_COMPLETE="trainingComplete",r.SCHOOL_LIVE="schoolLive",r),o=((l={}
1).JOINED="joined",l.REGISTERED="registered",l.READY="ready",l),c=s(32569);(0,c.Ik)({token:(0,c.Yj)()});var d=s(69925);let u=(0,d.KC)([(0,c.ai)(),(0,c.Yj)()]),m=(0,d.KC)([(0,c.zM)(),(0,c.Yj)()]);(0,c.NW)({offset:(0,c.lq)(u),limit:(0,c.lq)(u),search:(0,c.lq)((0,c.Yj)()),includeTest:(0,c.lq)(m)}),(0,c.Ik)({receiverEmail:(0,c.Yj)(),referralId:(0,c.Yj)()}),(0,c.Ik)({receiverEmail:(0,c.Yj)(),universityId:(0,c.Yj)()}),(0,c.Ik)({connectionFilter:(0,c.lq)((0,c.Yj)())}),(0,c.NW)({name:(0,c.Yj)(),email:(0,c.Yj)(),connection:(0,c.lq)((0,c.Yj)()),motive:(0,c.lq)((0,c.Yj)())})},99994:(e,t,s)=>{"use strict";s.d(t,{H:()=>d});var a=s(10940),r=s(90122),l=s.n(r),n=s(64052),i=s(56152),o=s(81448);function c(e,t){return e===t||e?.startsWith(`${t}/`)}let d=({label:e,items:t,activeHref:s})=>(0,o.h)()?(0,a.jsx)("div",{className:"flex flex-col gap-1 items-center w-full",children:t.map(e=>{let t=c(s,e.href);return(0,a.jsx)(i.rK,{content:e.label,side:"right",sideOffset:8,delayDuration:0,children:(0,a.jsx)(l(),{href:e.href,"aria-label":e.label,className:(0,n.cn)("flex items-center justify-center p-2 rounded-lg",t?"bg-softgrey2":"hover:bg-softgrey2"),children:(0,a.jsx)(e.icon,{className:"size-5 shrink-0 fill-black1"})})},e.href)})}):(0,a.jsxs)("div",{className:"flex flex-col items-start w-full",children:[(0,a.jsx)("div",{className:"flex items-center p-2 rounded-lg w-full",children:(0,a.jsx)("p",{className:"flex-1 text-sm font-semibold text-gray-700",children:e})}),(0,a.jsx)("div",{className:"flex flex-col gap-1 items-start w-full",children:t.map(e=>{let t=c(s,e.href);return(0,a.jsxs)(l(),{href:e.href,className:(0,n.cn)("flex gap-2 items-center p-2 rounded-lg w-full",t?"bg-softgrey2":"hover:bg-softgrey2"),children:[(0,a.jsx)(e.icon,{className:"size-5 shrink-0 fill-black1"}),(0,a.jsx)("span",{className:"text-sm font-semibold text-black1",children:e.label})]},e.href)})})]})}},e=>{e.O(0,[4906,122,5302,7267,7536,4465,1359,1250,8357,9229,1772,3460,3234,5754,438,4308,2224,2543,5529,7595,8997,9362,9001,6506,636,6593,8792],()=>e(e.s=92189)),_N_E=e.O()}]);

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.