1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7813],{17813:function(e,t,a){a.r(t);var r=a(85893),s=a(67294),i=a(41664),l=a.n(i),n=a(11163),c=a(25675),o=a.n(c),u=a(29882),d=a(6169),f=a(63164),g=a(60322),m=a(22771);let h=e=>{if(!e)return"";let t=e.match(/^.*(youtu.be\/|v\/|u\/\w\/|embed\/|watch\?v=|\&v=)([^#\&\?]*).*/);return t&&11===t[2].length?t[2]:e},p=e=>`https://i.ytimg.com/vi/${e}/maxresdefault.jpg`,x=e=>{let t=(e?.slug||e?.id||"").toString().trim().toLowerCase();return t?t.normalize("NFD").replace(/[\u0300-\u036f]/g,"").replace(/[^a-z0-9-]/g,"-").replace(/-+/g,"-").replace(/^-|-$/g,""):"cluster"},v=s.memo(e=>{let{feature:t,locale:a,categoryTitle:s,categorySlug:i}=e,n="video"===t.type,c=h(t.video_url||""),f="blog"===t.type?t.blog_articles:void 0,x=f?f.title:t.title,v=f?.excerpt||f?.description||t.description,y=n?t.thumbnail_url||p(c):f?.featured_image||"/image/placeholder-feature.png",b=n?(0,m.cd)({...t,feature_categories:{...t.feature_categories||{},slug:i||t.feature_categories?.slug||"tinh-nang",title:t.feature_categories?.title||{vi:s}}},a):f?.slug?`/blog/${f.slug}`:`/features/${t.id}`;return(0,r.jsxs)(l(),{href:b,className:"group relative flex flex-col bg-white rounded-none active:scale-[0.99] h-full",children:[(0,r.jsxs)("div",{className:"relative aspect-[16/10] overflow-hidden bg-slate-50",children:[(0,r.jsx)(o(),{src:y,alt:(0,g._)(x,a),fill:!0,className:"object-cover"}),n&&(0,r.jsx)("div",{className:"absolute inset-0 flex items-center justify-center bg-black/5 opacity-0 group-hover:opacity-100 transition-opacity",children:(0,r.jsx)("div",{className:"w-12 h-12 bg-white/90 text-[#ff3333] flex items-center justify-center shadow-xl",children:(0,r.jsx)(u.Z,{name:"play",className:"w-4 h-4 ml-0.5"})})})]}),(0,r.jsxs)("div",{className:"p-2 flex flex-col flex-1",children:[(0,r.jsx)(d.ZP,{variant:"h6",as:"p",lines:2,className:"text-slate-900 group-hover:text-[#ff3333] transition-colors leading-tight mb-2 text-[14px]",children:(0,g._)(x,a)}),(0,r.jsx)(d.ZP,{variant:"body2",lines:2,className:"text-slate-500 text-[11px] leading-relaxed mb-2 opacity-80 group-hover:opacity-100 transition-opacity",children:(0,g._)(v,a)})]})]})});v.displayName="DoraCard",t.default=()=>{let e=(0,n.useRouter)().locale||"vi",{data:t,isLoading:a}=(0,f.RX)(),[i,l]=(0,s.useState)(!1);(0,s.useEffect)(()=>
1{l(!0)},[]);let c=(0,s.useMemo)(()=>t?.data||[],[t]),[o,m]=(0,s.useState)("all");return((0,s.useEffect)(()=>{if(!i||0===c.length)return;let e=new IntersectionObserver(e=>{e.forEach(e=>{if(e.isIntersecting){let t=e.target.id;m(t);{let e=`#${t}`;window.location.hash!==e&&window.history.replaceState({},"",e)}}})},{rootMargin:"-10% 0px -80% 0px"});return c.forEach(t=>{let a=x(t),r=document.getElementById(a);r&&e.observe(r)}),()=>e.disconnect()},[c,i]),(0,s.useEffect)(()=>{if(!i||0===c.length)return;let e=window.location.hash.replace(/^#/,"").trim();if(!e)return;let t=document.getElementById(e);t&&(m(e),t.scrollIntoView({behavior:"smooth",block:"start"}))},[c,i]),a||!i)?(0,r.jsx)("div",{className:"flex h-screen items-center justify-center bg-white",children:(0,r.jsx)(u.Z,{name:"loader-2",className:"h-8 w-8 animate-spin text-[#ff3333] opacity-20"})}):0===c.length?(0,r.jsx)("div",{className:"py-24 text-center",children:(0,r.jsx)(d.ZP,{variant:"body1",className:"text-slate-400",children:"Kh\xf4ng t\xecm thấy t\xednh nÄng n\xe0o."})}):(0,r.jsxs)("div",{className:"relative bg-white min-h-screen pb-12 pt-12 sm:pt-16 lg:pt-20",children:[(0,r.jsxs)("div",{className:"absolute top-0 left-0 w-full h-full pointer-events-none overflow-hidden -z-10",children:[(0,r.jsx)("div",{className:"absolute top-[-10%] right-[-10%] w-[50%] h-[50%] bg-[#ff3333]/5 blur-[120px] rounded-full"}),(0,r.jsx)("div",{className:"absolute bottom-[10%] left-[-5%] w-[40%] h-[40%] bg-[#ffcc99]/8 blur-[100px] rounded-full"})]}),(0,r.jsxs)("div",{className:"mx-auto max-w-[1400px] px-6 grid grid-cols-1 lg:grid-cols-12 gap-12 items-start",children:[(0,r.jsx)("aside",{className:"lg:col-span-3 sticky top-28 hidden lg:block z-30",children:(0,r.jsx)("div",{className:"p-2 bg-white/60 backdrop-blur-[32px] rounded-[2.5rem]",children:(0,r.jsxs)("div",{className:"px-6 py-10",children:[(0,r.jsx)("div",{className:"mb-8 px-4",children:(0,r.jsx)("p",{className:"text-sm font-bold text-slate-900",children:"Danh mục t\xednh nÄng"})}),(0,r.jsx)("nav",{className:"flex flex-col gap-2",children:c.map(t=>{let a=x(t);return(0,r.jsxs)("a",{href:`#${a}`,onClick:e=>{e.preventDefault();let t=document.getElementById(a);t&&(m(a),window.history.replaceState({},"",`#${a}`),t.scrollIntoView({behavior:"smooth",block:"start"}))},className:`relative px-5 py-3.5 text-[14px] transition-all duration-500 rounded-2xl group flex items-center overflow-hidden ${o===a?"text-white font-black":"text-slate-600 font-bold hover:text-slate-900"}`,children:[(0,r.jsx)("div",{className:`absolute inset-0 bg-gradient-to-r from-[#ff3333] to-[#ffcc99] transition-transform duration-500 ease-out ${o===a?"translate-x-0":"-translate-x-full group-hover:-translate-x-[95%]"}`}),(0,r.jsx)("span",{className:"relative z-10",children:(0,g._)(t.title,e)})]},t.id)})})]})})}),(0,r.jsx)("main",{className:"lg:col-span-9 space-y-12 pt-0",children:c.map(t=>{let a=x(t);return(0,r.jsxs)("section",{id:a,className:"scroll-mt-32",children:[(0,r.jsxs)("div",{className:"mb-6",children:[(0,r.jsx)(d.ZP,{variant:"h4",weight:"black",className:"text-xl lg:text-2xl tracking-tighter mb-2 inline-block text-transparent bg-clip-text bg-gradient-to-r from-[#ff3333] via-[#ff3333] to-[#ffcc99]",children:(0,g._)(t.title,e)}),(0,r.jsx)("div",{className:"h-1 w-24 rounded-full bg-gradient-to-r from-[#ff3333] to-[#ffcc99] opacity-80"})]}),(0,r.jsx)("div",{className:"grid grid-cols-1 md:grid-cols-2 xl:grid-cols-3 gap-5",children:t.features.map(a=>(0,r.jsx)(v,{feature:a,locale:e,categoryTitle:(0,g._)(t.title,e),categorySlug:t.slug},a.id))})]},t.id)})})]})]})}},63164:function(e,t,a){a.d(t,{$L:function(){return p},DK:function(){return v},K$:function(){return u},RX:function(){return d},hz:function(){return h},iA:function(){return f},iy:function(){return g},u4:function(){return x},y5:function(){return m}});var r=a(51740),s=a(3628),i=a(30190),l=a(87066);let n="/api",c=()=>localStorage.getItem("admin_token"),o=()=>({headers:{Authorization:`Bearer ${c()}`}}),u=()=>(0,r.a)({queryKey:["featureCategories"],queryFn:async()=>{let{data:e}=await l.Z.get(`${n}/feature-categories`,o());return e}}),d=()=>(0,r.a)({queryKey:["groupedFeatures"],queryFn:async()=>{let{data:e}=await l.Z.get(`${n}/features/public/grouped`);return e},staleTime:0,gcTime:6e5,refetchOnMount:"always",refetchOnWindowFocus:!0}),f=()=>{let e=(0,s.NL)();return(0,i.D)({mutationFn:async e=>(await l.Z.post(`${n}/feature-categories`,e,o())).data,onSuccess:()=>e.invalidateQueries({queryKey:["featureCategories"]})})},g=()=>{let e=(0,s.NL)();return(0,i.D)({mutationFn:async e=>{let{id:t,data:a}=e;return(await l.Z.put(`${n}/feature-categories/${t}`,a,o())).data},onSuccess:()=>e.invalidateQueries({queryKey:["featureCategories"]})})},m=()=>{let e=(0,s.NL)();return(0,i.D)({mutationFn:async e=>(await l.Z.delete(`${n}/feature-categories/${e}`,o())).data,onSuccess:()=>e.invalidateQueries({queryKey:["featureCategories"]})})},h=e=>(0,r.a)({queryKey:["features",e],queryFn:async()=>{let t=e?`${n}/features?category_id=${e}
1`:`${n}/features`,{data:a}=await l.Z.get(t,o());return a}}),p=()=>{let e=(0,s.NL)();return(0,i.D)({mutationFn:async e=>(await l.Z.post(`${n}/features`,e,o())).data,onSuccess:()=>e.invalidateQueries({queryKey:["features"]})})},x=()=>{let e=(0,s.NL)();return(0,i.D)({mutationFn:async e=>{let{id:t,data:a}=e;return(await l.Z.put(`${n}/features/${t}`,a,o())).data},onSuccess:()=>e.invalidateQueries({queryKey:["features"]})})},v=()=>{let e=(0,s.NL)();return(0,i.D)({mutationFn:async e=>(await l.Z.delete(`${n}/features/${e}`,o())).data,onSuccess:()=>e.invalidateQueries({queryKey:["features"]})})}},22771:function(e,t,a){a.d(t,{cd:function(){return n}});var r=a(60322);let s=e=>(e||"").toLowerCase().normalize("NFD").replace(/[\u0300-\u036f]/g,"").replace(/[^a-z0-9\s-]/g,"").trim().replace(/\s+/g,"-").replace(/-+/g,"-"),i=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"vi";if("string"==typeof e?.slug&&e.slug.trim())return s(e.slug);let a=e?.config?.slug;return"string"==typeof a&&a.trim()?s(a):s((0,r._)(e.title,t)||(0,r._)(e.title,"vi")||`feature-${e?.id||"item"}`)||`feature-${e?.id||"item"}`},l=e=>(e.feature_categories?.slug||"").trim()||"tinh-nang",n=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"vi";return`/${l(e)}/${i(e,t)}`}}}]);
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.