PageSourceSearch

https://clawintelli.com/assets/Admin-Cw8UvyFa.js

js clawintelli.com collected 2026-10-08 21:27:32 UTC 4,211 bytes, 2 lines download raw bytes

1import{b as t,j as a}from"./vendor-MqsK_g65.js";import{L as j,K as v,A as C}from"./charts-q-1n0JL6.js";import{K as y}from"./index-vcSPLiYa.js";import"./ui-CDdlgVHd.js";import"./solana-BrFlpkzG.js";import"./utils-rXHWPD0r.js";const f="PVRBX",g="e-Sto",b="_681Se",S="e-Zem",L="C2WIx",A="NlLc0",B="a4VA0",D="BMiAY",T="yGDWm",V="X2VHA",w="dyvSC",G="QZKgg",R="hrxAg",e={wrapper:f,title:g,statsGrid:b,statCard:S,statLabel:L,statValue:A,rangeSelector:B,rangeButton:D,rangeButtonActive:T,chartsGrid:V,chartCard:w,chartTitle:G,chartContainer:R},E=[{label:"7d",days:7},{label:"30d",days:30},{label:"90d",days:90}],M={layout:{background:{type:C.Solid,color:"#12121a"},textColor:"#9ca3af"},grid:{vertLines:{visible:!1},horzLines:{color:"#2d2d2d"}},height:200};function m(s,i,c){t.useEffect(()=>{if(!s.current)return;const l=j(s.current,{...M,width:s.current.clientWidth}),d=l.addSeries(v,{color:c,lineWidth:2}),o=[...i].sort((r,u)=>r.date.localeCompare(u.date));d.setData(o.map(r=>({time:r.date,value:r.count}))),l.timeScale().fitContent();const n=()=>{s.current&&l.applyOptions({width:s.current.clientWidth})};return window.addEventListener("resize",n),()=>{window.removeEventListener("resize",n),l.remove()}},[i,c,s])}function P(){const[s,i]=t.useState(null),[c,l]=t.useState(30),d=t.useRef(null),o=t.useRef(null),n=t.useRef(null),r=t.useRef(null);t.useEffect(()=>{y.getUserStats(c).then(i).catch(console.error)},[c]);const u=t.useMemo(()=>(s==null?void 0:s.byDay)??[],[s]),x=t.useMemo(()=>(s==null?void 0:s.activeByDay)??[],[s]),N=t.useMemo(()=>(s==null?void 0:s.messagesByDay)??[],[s]),p=t.useMemo(()=>(s==null?void 0:s.chatsByDay)??[],[s]);return m(d,u,"#3b82f6"),m(o,x,"#00d4ff"),m(n,N,"#a855f7"),m(r,p,"#f59e0b"),a.jsxs("div",{className:e.wrapper,children:[a.jsx("h1",{className:e.title,children:"Admin Panel"}),a.jsxs("div",{className:e.statsGrid,children:[a.jsxs("div",{className:e.statCard,children:[a.jsx("span",{className:e.statLabel,children:"Total users"}),a.jsx("span",{className:e.statValue,children:(s==null?void 0:s.total)??"—"})]}),a.jsxs("div",{className:e.statCard,children:[a.jsx("span",{className:e.statLabel,children:"Active subscriptions"}),a.jsx("span",{className:e.statValue,children:(s==null?void 0:s.activeSubscriptions)??"—"})]}),a.jsxs("div",{className:e.statCard,children:[a.jsx("span",{className:e.statLabel,children:"Total messages"}),a.jsx("span",{className:e.statValue,children:(s==null?void 0:s.totalMessages)??"—"})]}),a.jsxs("div",{className:e.statCard,children:[a.jsx("span",{className:e.statLabel,children:"Total chats"}),a.jsx("span",{className:e.statValue,children:(s==null?void 0:s.totalChats)??"—"})]}),a.jsxs("div",{className:e.statCard,children:[a.jsx("span",{className:e.statLabel,children:"Registered computers"}),a.jsx("span",{className:e.statValue,children:(s==null?void 0:s.registeredComputers)??"—"})]}),a.jsxs("div",{className:e.statCard,children:[a.jsx("span",{className:e.statLabel,children:"Scheduled tasks"}),a.jsx("span",{className:e.statValue,children:(s==null?void 0:s.scheduledTasks)??"—"})]}),a.jsxs("div",{className:e.statCard,children:[a.jsx("span",{className:e.statLabel,children:"Sandboxes"}),a.jsx("span",{className:e.statValue,children:(s==null?void 0:s.sandboxes)??"—"})]})]}),a.jsx("div",{className:e.rangeSelector,children:E.map(h=>a.jsx("button",{className:`${e.rangeButton} ${c===h.days?e.rangeButtonActive:""}`,onClick:()=>l(h.days),children:h.label},h.days))}),a.jsxs("div",{className:e.chartsGrid,children:[a.jsxs("div",{className:e.chartCard,children:[a.jsx("span",{className:e.chartTitle,children:"New registrations"}),a.jsx("div",{ref:d,className:e.chartContainer})]}),a.jsxs("div",{className:e.chartCard,children:[a.jsx("span",{className:e.chartTitle,children:"Daily active users"}),a.jsx("div",{ref:o,className:e.chartContainer})]}),a.jsxs("div",{className:e.chartCard,children:[a.jsx("span",{className:e.chartTitle,children:"Messages per day"}),a.jsx("div",{ref:n,className:e.chartContainer})]}),a.jsxs("div",{className:e.chartCard,children:[a.jsx("span",{className:e.chartTitle,children:"Chats per day"}),a.jsx("div",{ref:r,className:e.chartContainer})]})]})]})}export{P as Admin};
2//# sourceMappingURL=Admin-Cw8UvyFa.js.map

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.