PageSourceSearch

https://indiancaucus.org/_next/static/chunks/pages/app/admin/active-5cccf94eafd503c5.js

js indiancaucus.org collected 2026-10-02 01:07:31 UTC 4,249 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8754],{38136:(e,t,a)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/app/admin/active",function(){return a(50370)}])},50370:(e,t,a)=>{"use strict";a.r(t),a.d(t,{default:()=>c});var r=a(37876),s=a(14232),n=a(89099),i=a(62422),l=a(62406),o=a(77073);let d={admin:"Admin",staff:"Staff",moderator:"Moderator",participant:"Coordinator",volunteer:"Volunteer"};function c(){let e=(0,n.useRouter)(),{member:t,loading:a}=(0,l.IG)(),[c,h]=(0,s.useState)(null),[m,p]=(0,s.useState)("");(0,s.useEffect)(()=>{if(!a){if(t&&!(t.is_staff&&["staff","admin"].includes(t.staff_role||"staff")))return void e.replace("/app");t&&(0,o.B)("/api/member/mod/active-members",e=>h(e.members||[])).catch(()=>h([]))}},[a,t]);let x=(0,s.useMemo)(()=>{if(!c)return null;let e=m.trim().toLowerCase();return e?c.filter(t=>`${t.name||""} ${t.email||""}`.toLowerCase().includes(e)):c},[c,m]);return(0,r.jsxs)(i.Ay,{title:"Active today",active:"/app/admin",children:[(0,r.jsx)("h1",{className:"app-fade-up text-xl font-extrabold text-brand-navy dark:text-white mb-1",children:"Active today"}),(0,r.jsx)("p",{className:"app-fade-up text-gray-500 dark:text-white/55 text-sm mb-4",children:c?`${c.length} ${1===c.length?"person":"people"} opened the app in the last 24 hours.`:"Everyone who opened the app in the last 24 hours."}),(0,r.jsxs)("div",{className:"app-fade-up relative mb-4",children:[(0,r.jsxs)("svg",{className:"absolute left-3 top-1/2 -translate-y-1/2 text-gray-400",width:"18",height:"18",fill:"none",stroke:"currentColor",strokeWidth:"2",viewBox:"0 0 24 24",children:[(0,r.jsx)("circle",{cx:"11",cy:"11",r:"8"}),(0,r.jsx)("path",{d:"m21 21-4.3-4.3"})]}),(0,r.jsx)("input",{value:m,onChange:e=>p(e.target.value),placeholder:"Search by name or email",className:"w-full pl-10 pr-3 py-2.5 rounded-2xl bg-white border border-orange-100 text-sm text-brand-navy dark:text-white dark:bg-white/5 dark:border-white/10 focus:outline-hidden focus:ring-2 focus:ring-orange-200"})]}),null===x?(0,r.jsx)("div",{className:"space-y-2",children:[0,1,2,3,4].map(e=>(0,r.jsx)("div",{className:"h-16 bg-white/70 border border-orange-100 rounded-2xl animate-pulse"},e))}):0===x.length?(0,r.jsx)("p",{className:"text-gray-400 dark:text-white/45 text-sm text-center py-10",children:m?`No one matches “${m.trim()}”.`:"No one active in the last 24 hours yet."}):(0,r.jsx)("div",{className:"space-y-2 app-stagger",children:x.map(e=>{var t,a;return(0,r.jsxs)("div",{className:"bg-white border border-orange-100 rounded-2xl p-3 shadow-xs dark:bg-white/5 dark:border-white/10 flex items-center gap-3",children:[(0,r.jsxs)("span",{className:"relative w-10 h-10 rounded-full bg-orange-50 text-brand-orange font-extrabold flex items-center justify-center shrink-0 text-sm",children:[(t=e.name,a=e.email,String(t||a||"?").trim().split(/\s+/).slice(0,2).map(e=>e[0]).join("").toUpperCase()||"?"),e.live&&(0,r.jsx)("span",{className:"absolute -bottom-0.5 -right-0.5 w-3 h-3 rounded-full bg-brand-green-dark ring-2 ring-white dark:ring-[#1a1a22]"})]}),(0,r.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,r.jsx)("p",{className:"font-bold text-brand-navy dark:text-white text-sm leading-tight truncate",children:e.name||e.email||"Member"}),(0,r.jsx)("p",{className:"text-gray-400 dark:text-white/45 text-xs truncate",children:e.email})]}),(0,r.jsxs)("div",{className:"text-right shrink-0",children:[e.is_staff&&(0,r.jsx)("span",{className:"block text-[10px] font-bold uppercase tracking-wide text-brand-orange",children:d[e.staff_role]||"Staff"}),(0,r.jsx)("span",{className:"text-[11px] text-gray-400 dark:text-white/45",children:e.live?"Live now":function(e){if(!e)return"";let t=Math.floor((Date.now()-new Date(e).getTime())/1e3);return t<60?"just now":t<3600?`${Math.floor(t/60)}m ago`:t<86400?`${Math.floor(t/3600)}h ago`:new Date(e).toLocaleDateString("en-US",{month:"short",day:"numeric"})}(e.active_at)})]})]},e.id)})})]})}},77073:(e,t,a)=>{"use strict";a.d(t,{B:()=>s});var r=a(79004);function s(e,t,{key:a=e}={}){if(a){let e=(0,r.tv)(`json:${a}`);if(void 0!==e)try{t(e)}catch{}}return fetch(e).then(e=>e.json()).then(e=>(a&&(0,r.lx)(`json:${a}`,e),t(e)))}}},e=>{e.O(0,[8230,900,8766,2422,636,6593,8792],()=>e(e.s=38136)),_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.