1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5740],{58621:function(e,t,i){"use strict";i.d(t,{Z:function(){return s}});let s=(0,i(91373).Z)("CreditCard",[["rect",{width:"20",height:"14",x:"2",y:"5",rx:"2",key:"ynyp8z"}],["line",{x1:"2",x2:"22",y1:"10",y2:"10",key:"1b3vmo"}]])},87764:function(e,t,i){"use strict";i.d(t,{Z:function(){return s}});let s=(0,i(91373).Z)("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]])},19858:function(e,t,i){"use strict";i.d(t,{Z:function(){return s}});let s=(0,i(91373).Z)("TrendingUp",[["polyline",{points:"22 7 13.5 15.5 8.5 10.5 2 17",key:"126l90"}],["polyline",{points:"16 7 22 7 22 13",key:"kwv8wd"}]])},87966:function(e,t,i){"use strict";i.d(t,{Z:function(){return s}});let s=(0,i(91373).Z)("UserCheck",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["polyline",{points:"16 11 18 13 22 9",key:"1pwet4"}]])},57349:function(e,t,i){"use strict";i.d(t,{Z:function(){return s}});let s=(0,i(91373).Z)("UserPlus",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["line",{x1:"19",x2:"19",y1:"8",y2:"14",key:"1bvyxn"}],["line",{x1:"22",x2:"16",y1:"11",y2:"11",key:"1shjgl"}]])},74485:function(e,t,i){"use strict";i.d(t,{Z:function(){return s}});let s=(0,i(91373).Z)("UserX",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["line",{x1:"17",x2:"22",y1:"8",y2:"13",key:"3nzzx3"}],["line",{x1:"22",x2:"17",y1:"8",y2:"13",key:"1swrse"}]])},53750:function(e,t,i){(window.__NEXT_P=window.__NEXT_P||[]).push(["/admin/_components/LatestUpdate",function(){return i(13730)}])},44115:function(e,t,i){"use strict";var s=i(85893);i(67294),t.Z=function(e){let{length:t=10}=e;return(0,s.jsx)("div",{className:"loading-skeleton",style:{width:"".concat(t,"ch")}})}},13730:function(e,t,i){"use strict";i.r(t);var s=i(85893),a=i(67294),r=i(27039),n=i(19858),c=i(57349),l=i(74485),o=i(58621),d=i(87966),y=i(87764),u=i(57712),x=i(44115),h=i(755);let p={hidden:{opacity:0,y:20},visible:{opacity:1,y:0,transition:{duration:.6,ease:[.22,1,.36,1]}}},b={TrendingUp:n.Z,UserPlus:c.Z,UserX:l.Z,CreditCard:o.Z,UserCheck:d.Z};t.default=()=>{let[e,t]=(0,a.useState)("today"),[i,n]=(0,a.useState)(""),[c,l]=(0,a.useState)([]),[o,m]=(0,a.useState)(!0),[f,w]=(0,a.useState)(0),g=async e=>{try{m(!0);let t=await u.default.get("".concat("https://generateugc.ai/api","/admin/stats/latest-activities?period=").concat(e));t&&t.activities&&(l(t.activities),w(t.totalActivities||t.activities.length))}catch(e){h.K9.error("Error fetching activities:",e),l([]),w(0)}finally{m(!1)}};(0,a.useEffect)(()=>{g(e)},[e]);let v=c.filter(e=>e.title.toLowerCase().includes(i.toLowerCase())||e.description.toLowerCase().includes(i.toLowerCase()));return(0,s.jsxs)(r.E.div,{variants:p,className:"bg-[#0b0b0b] backdrop-blur-lg border border-white/5 p-6 rounded-xl",children:[(0,s.jsx)("h3",{className:"text-lg font-semibold mb-4",children:"Latest Update"}),(0,s.jsxs)("div",{className:"flex gap-2 mb-4",children:[(0,s.jsx)("button",{onClick:()=>{t("today"),n("")},disabled:o,className:"px-4 py-1.5 text-sm rounded-lg transition-colors disabled:opacity-50 ".concat("today"===e?"bg-white/10 text-white":"bg-transparent text-gray-400 hover:bg-white/5"),children:"Today"}),(0,s.jsx)("button",{onClick:()=>{t("yesterday"),n("")},disabled:o,className:"px-4 py-1.5 text-sm rounded-lg transition-colors border disabled:opacity-50 ".concat("yesterday"===e?"bg-white/10 text-white border-white/20":"bg-transparent text-gray-400 border-white/10 hover:bg-white/5"),children:"Yesterday"}),(0,s.jsx)("button",{onClick:()=>{t("week"),n("")},disabled:o,className:"px-4 py-1.5 text-sm rounded-lg transition-colors border disabled:opacity-50 ".concat("week"===e?"bg-white/10 text-white border-white/20":"bg-transparent text-gray-400 border-white/10 hover:bg-white/5"),children:"This week"})]}),(0,s.jsxs)("div",{className:"relative mb-4",children:[(0,s.jsx)(y.Z,{className:"absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-gray-400"}),(0,s.jsx)("input",{type:"text",placeholder:"Search activities",value:i,onChange:e=>n(e.target.value),className:"w-full pl-10 pr-4 py-2 bg-[#1a1a1a] border border-white/10 rounded-lg text-sm text-white placeholder-gray-400 focus:outline-none focus:border-white/20 transition-colors"})]}),(0,s.jsx)("div",{className:"mb-3",children:(0,s.jsxs)("p",{className:"text-sm font-medium text-gray-300",children:[(0,s.jsx)("span",{className:"font-bold text-white",children:f})," new activities ","today"===e?"today":"yesterday"===e?"yesterday":"this week"]})}),o?(0,s.jsx)("div",{className:"flex items-center justify-center py-8",children:(0,s.jsx)(x.Z,{length:15})}):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("div",{className:"space-y-4",children:v.map((e,t)=>{let i=b[e.icon]||d.Z;return(0,s.jsxs)("div",{className:"flex items-start gap-3",children:[(0,s.jsx)("div",{className:"rounded-lg bg-white/5 p-2 flex-shrink-0",children:(0,s.jsx)(i,{className:"h-4 w-4 text-gray-400"})}),(0,s.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,s.jsx)("p",{className:"text-sm font-medium text-white",children:e.title}),(0,s.jsx)("p",{className:"text-xs text-gray-400",children:e.description})]})]},t)})}),0===v.length&&!o&&(0,s.jsx)("div",{className:"text-center py-8",children:(0,s.jsx)("p",{className:"text-sm text-gray-400",children:"No activities found"})})]})]})}}},function(e){e.O(0,[7039,9774,2888,179],function(){return e(e.s=53750)}),_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.