1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9189],{52599:function(e,t,i){(window.__NEXT_P=window.__NEXT_P||[]).push(["/admin/dashboard",function(){return i(14991)}])},32602:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var i in t)Object.defineProperty(e,i,{enumerable:!0,get:t[i]})}(t,{default:function(){return s},noSSR:function(){return r}});let n=i(38754);i(85893),i(67294);let l=n._(i(35491));function a(e){return{default:(null==e?void 0:e.default)||e}}function r(e,t){return delete t.webpack,delete t.modules,e(t)}function s(e,t){let i=l.default,n={loading:e=>{let{error:t,isLoading:i,pastDelay:n}=e;return null}};e instanceof Promise?n.loader=()=>e:"function"==typeof e?n.loader=e:"object"==typeof e&&(n={...n,...e});let s=(n={...n,...t}).loader;return(n.loadableGenerated&&(n={...n,...n.loadableGenerated},delete n.loadableGenerated),"boolean"!=typeof n.ssr||n.ssr)?i({...n,loader:()=>null!=s?s().then(a):Promise.resolve(a(()=>null))}):(delete n.webpack,delete n.modules,r(i,n))}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},1159:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"LoadableContext",{enumerable:!0,get:function(){return n}});let n=i(38754)._(i(67294)).default.createContext(null)},35491:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return h}});let n=i(38754)._(i(67294)),l=i(1159),a=[],r=[],s=!1;function o(e){let t=e(),i={loading:!0,loaded:null,error:null};return i.promise=t.then(e=>(i.loading=!1,i.loaded=e,e)).catch(e=>{throw i.loading=!1,i.error=e,e}),i}class d{promise(){return this._res.promise}retry(){this._clearTimeouts(),this._res=this._loadFn(this._opts.loader),this._state={pastDelay:!1,timedOut:!1};let{_res:e,_opts:t}=this;e.loading&&("number"==typeof t.delay&&(0===t.delay?this._state.pastDelay=!0:this._delay=setTimeout(()=>{this._update({pastDelay:!0})},t.delay)),"number"==typeof t.timeout&&(this._timeout=setTimeout(()=>{this._update({timedOut:!0})},t.timeout))),this._res.promise.then(()=>{this._update({}),this._clearTimeouts()}).catch(e=>{this._update({}),this._clearTimeouts()}),this._update({})}_update(e){this._state={...this._state,error:this._res.error,loaded:this._res.loaded,loading:this._res.loading,...e},this._callbacks.forEach(e=>e())}_clearTimeouts(){clearTimeout(this._delay),clearTimeout(this._timeout)}getCurrentValue(){return this._state}subscribe(e){return this._callbacks.add(e),()=>{this._callbacks.delete(e)}}constructor(e,t){this._loadFn=e,this._opts=t,this._callbacks=new Set,this._delay=null,this._timeout=null,this.retry()}}function u(e){return function(e,t){let i=Object.assign({loader:null,loading:null,delay:200,timeout:null,webpack:null,modules:null},t),a=null;function o(){if(!a){let t=new d(e,i);a={getCurrentValue:t.getCurrentValue.bind(t),subscribe:t.subscribe.bind(t),retry:t.retry.bind(t),promise:t.promise.bind(t)}}return a.promise()}if(!s){let e=i.webpack?i.webpack():i.modules;e&&r.push(t=>{for(let i of e)if(t.includes(i))return o()})}function u(e,t){!function(){o();let e=n.default.useContext(l.LoadableContext);e&&Array.isArray(i.modules)&&i.modules.forEach(t=>{e(t)})}();let r=n.default.useSyncExternalStore(a.subscribe,a.getCurrentValue,a.getCurrentValue);return n.default.useImperativeHandle(t,()=>({retry:a.retry}),[]),n.default.useMemo(()=>{var t;return r.loading||r.error?n.default.createElement(i.loading,{isLoading:r.loading,pastDelay:r.pastDelay,timedOut:r.timedOut,error:r.error,retry:a.retry}):r.loaded?n.default.createElement((t=r.loaded)&&t.default?t.default:t,e):null},[e,r])}return u.preload=()=>o(),u.displayName="LoadableComponent",n.default.forwardRef(u)}(o,e)}function c(e,t){let i=[];for(;e.length;){let n=e.pop();i.push(n(t))}return Promise.all(i).then(()=>{if(e.length)return c(e,t)})}u.preloadAll=()=>new Promise((e,t)=>
1{c(a).then(e,t)}),u.preloadReady=e=>(void 0===e&&(e=[]),new Promise(t=>{let i=()=>(s=!0,t());c(r,e).then(i,i)})),window.__NEXT_PRELOADREADY=u.preloadReady;let h=u},14991:function(e,t,i){"use strict";i.r(t),i.d(t,{__N_SSP:function(){return h}});var n=i(85893),l=i(67294),a=i(9008),r=i.n(a),s=i(41664),o=i.n(s),d=i(29882),u=i(5152);let c=i.n(u)()(()=>Promise.all([i.e(5675),i.e(1412)]).then(i.bind(i,31412)),{loadableGenerated:{webpack:()=>[31412]},ssr:!1,loading:()=>(0,n.jsx)("div",{children:"Loading..."})});var h=!0;t.default=()=>{let[e,t]=(0,l.useState)({totalArticles:0,publishedArticles:0,totalCategories:0,totalTags:0}),[i,a]=(0,l.useState)(!0);(0,l.useEffect)(()=>{s()},[]);let s=async()=>{try{let e=localStorage.getItem("admin_token"),i="/api",n={Authorization:`Bearer ${e}`},[l,a,r]=await Promise.all([fetch(`${i}/blog/articles`,{headers:n}),fetch(`${i}/blog/categories`,{headers:n}),fetch(`${i}/blog/tags`,{headers:n})]),s=await l.json(),o=await a.json(),d=await r.json();t({totalArticles:s.data?.length||0,publishedArticles:s.data?.filter(e=>"published"===e.status).length||0,totalCategories:o.data?.length||0,totalTags:d.data?.length||0})}catch(e){}finally{a(!1)}};return(0,n.jsxs)(c,{title:"Dashboard",children:[(0,n.jsxs)(r(),{children:[(0,n.jsx)("title",{children:"Dashboard - RedAI Admin"}),(0,n.jsx)("meta",{name:"robots",content:"noindex, nofollow"})]}),(0,n.jsxs)("div",{className:"mb-6",children:[(0,n.jsx)("h2",{className:"mb-2 text-2xl font-bold text-gray-900",children:"Ch\xe0o mừng trá» lại!"}),(0,n.jsx)("p",{className:"text-gray-600",children:"Quản l\xfd tất cả c\xe1c module v\xe0 chức nÄng cá»§a há» thá»ng từ Ä\xe2y"})]}),(0,n.jsx)("div",{className:"grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4",children:[{id:"blog",title:"Blog",description:"Quản l\xfd b\xe0i viết, danh mục v\xe0 tags",href:"/admin/blog",iconName:"file-text"},{id:"tutorials",title:"Tutorial",description:"Quản l\xfd hưá»ng dẫn v\xe0 danh mục tutorial",href:"/admin/tutorials",iconName:"book-open"},{id:"features",title:"T\xednh nÄng",description:"Quản l\xfd features hiá»n thá» tr\xean trang chá»§",href:"/admin/features",iconName:"zap"},{id:"usecases",title:"Use Cases",description:"Quản l\xfd c\xe1c use case cá»§a sản phẩm",href:"/admin/use-cases",iconName:"clipboard-list"},{id:"media",title:"Media",description:"Quản l\xfd file ảnh, video v\xe0 t\xe0i liá»u",href:"/admin/media",iconName:"image"},{id:"casestudies",title:"Case Studies",description:"Quản l\xfd c\xe1c case study kh\xe1ch h\xe0ng",href:"/admin/case-studies",iconName:"bar-chart-3"},{id:"pricing",title:"Bảng gi\xe1",description:"Quản l\xfd c\xe1c g\xf3i gi\xe1 v\xe0 t\xednh nÄng",href:"/admin/pricing",iconName:"dollar-sign"},{id:"promotions",title:"Promotions",description:"Quản l\xfd th\xf4ng b\xe1o khuyến m\xe3i v\xe0 lá»
há»i",href:"/admin/promotions",iconName:"gift"},{id:"section",title:"Section",description:"Quản l\xfd c\xe1c Section Giao diá»n",href:"/admin/sections",iconName:"layout"},{id:"account",title:"T\xe0i khoản",description:"Quản l\xfd c\xe1c T\xe0i khoản Admin",href:"/admin/users",iconName:"user-2"},{id:"mail",title:"Li\xean há»",description:"Quản l\xfd c\xe1c li\xean há»",href:"/admin/contacts",iconName:"mail"},{id:"settings",title:"C\xe0i Äặt",description:"Cấu h\xecnh theme, fonts, colors ...",href:"/admin/settings",iconName:"settings"}].map(e=>(0,n.jsx)(o(),{href:e.href,children:(0,n.jsxs)("div",{className:"group flex cursor-pointer items-start gap-4 roun
1ded-lg border border-gray-200 bg-white p-5 transition-all hover:border-red-200 hover:shadow-md",children:[(0,n.jsx)("div",{className:"flex h-12 w-12 flex-shrink-0 items-center justify-center rounded-lg bg-red-50",children:(0,n.jsx)(d.Z,{name:e.iconName,className:"h-6 w-6 text-red-500",strokeWidth:1.5})}),(0,n.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,n.jsx)("h3",{className:"text-base font-semibold text-gray-900 mb-1",children:e.title}),(0,n.jsx)("p",{className:"text-sm text-gray-500 line-clamp-2",children:e.description})]})]})},e.id))})]})}},5152:function(e,t,i){e.exports=i(32602)}},function(e){e.O(0,[1664,9882,2888,9774,179],function(){return e(e.s=52599)}),_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.