PageSourceSearch

https://vienthonga.vn/_next/static/chunks/2520-2268cfbb513f53c4.js

js vienthonga.vn collected 2026-10-08 07:25:31 UTC 26,639 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2520],{24831:function(e,t,r){r.d(t,{G:function(){return l}});let l={FLASH_SALE_ICON:"https://gofiber.b-cdn.net/Vienthonga/1735371652559_flashsale-bolt-icon.svg",VIENTHONGA_PLACEHOLDER:"data:image/webp;base64,UklGRkoDAABXRUJQVlA4ID4DAAAQQACdASpmAWYBPpFIn0ulpCKhpDR4iLASCWlu4XYBG/MzoaARsx8agovAope4s78+1y1EOLO/PtctRDizvz7XLUQ4s78+1y1EOLO/PtctRDizvz7XLUQ4s78+1y1EOLO/PtctRDizvz7XLUQ4s78+1y1EOLO/PtctRDURbVLMxT63ayESAvZfx68U+t2shEf1W+jtDAs78+1y1EOLNhoSM04HdL8ZpRfU1mmQ7buHS6WtBhgsXv4I4zbGQ8bKwLuzmvSPStottfNdGgfVZ3Fzjt+EsRwid/xZ3WgHNzgsRaeReimTh+Bo+tI/9JLUx52gyqTDNJzb3fImQYf1NAyfAayydphU294hVRb5kCZQ9d5w9KkatS6poeyJEAQZOB5as3lJG6eJNrf6+jUftp/xwZAThQq7wOUc8RUhroeNRFMc5sQ4npyQlwgpov/SobDGF2ObGbU4pXdec6V/JR4XTmoBjOU50BmoEbQnok2hFYilwbFxKuBgj63O2Pfmnr7jvuYGo8gXppDHJvmVfnvuZV8y+89XzCYESLVP7IJEYW14MUG57MqkfDbyZIYcg1JDDD41BReBRS9xZ359rlqIcWd+fa5aiHFnfn2uWohxZ359rlqIcWd+fa5aiHFnfn2uWohxZ359rlqIcWd+fa5aiHFnfn2uWohxZ359rlqIcWd+fa5aiHFmoAD+/5OYAAAAAAzs6t8bJryOS37jpdxWt6Sqr2HREnFEvT2hbM3TXsBWINC6IfNWlchh18vEGbOT1KACjVuI82LkBJklk3gmEfKfYRiXuBv4lClxOKy0LvXXAQZb7JE2BBlOOV1l+KZgQyIyBZTLx6HdLN9U9AAAksLLNsQNYIAKd3S4dwxxT0rnaM5i1ep00v7sPDMzoSz+6FMmWo97ZRIkJSm/diOw7c9GwwjufrdWhfqSKrth1rskBfQIHpRBponb7+d2w9HfmV3BAxEpSR8ka7VInjmtSnPNLCaUaxcm+lpO3M2l45B6PdF4D061a0ZkW7J7GkXxLW+3DZgWeot48DMzThwPpvnCsoc4AMYM2NuBXx/g3NzHPQqsNgLySnqR/dEachE6UY5gK7+gAAAAAAAAAA=="}},18630:function(e,t){class r{set(e,t){try{this.storage.setItem(e,JSON.stringify(t))}catch(e){console.error("Error saving to localStorage",e)}}get(e,t){try{let r=this.storage.getItem(e);return r?JSON.parse(r):null!=t?t:null}catch(e){return console.error("Error reading from localStorage",e),null!=t?t:null}}remove(e){this.storage.removeItem(e)}clear(){this.storage.clear()}has(e){return null!==this.storage.getItem(e)}keys(){return Object.keys(this.storage)}constructor(){this.storage=window.localStorage}}let l=null;t.Z=l||(l=new r)},21791:function(e,t,r){let l;r.d(t,{TRPCReactProvider:function(){return j},h:function(){return b}});var a=r(57437),s=r(93191),n=r(79839),i=r(79106),o=r(49463),c=r(2265),d=r(16865),u=r(24519),x=r(87416),h=r(73499),p=r(94329),f=r(27776),m=r(60065);let v=()=>new u.S({queryCache:new x.t({onError:e=>{if(e instanceof i.ss){var t,r;console.error("QueryCache error:",e.shape);let l=null===(r=e.shape)||void 0===r?void 0:null===(t=r.data)||void 0===t?void 0:t.code;("UNAUTHORIZED"===l||"FORBIDDEN"===l)&&(f.toast.error("Phi\xean đăng nhập đ\xe3 hết hạn, vui l\xf2ng đăng nhập lại",{id:"UNAUTHORIZED"}),m.M.getState().logout().then(()=>{window.location.href="/"}))}}}),mutationCache:new h.L({onError:e=>{if(e instanceof i.ss){var t,r;console.error("MutationCache error:",e.shape);let l=null===(r=e.shape)||void 0===r?void 0:null===(t=r.data)||void 0===t?void 0:t.code;("UNAUTHORIZED"===l||"FORBIDDEN"===l)&&(f.toast.error("Phi\xean đăng nhập đ\xe3 hết hạn, vui l\xf2ng đăng nhập lại",{id:"UNAUTHORIZED"}),m.M.getState().logout().then(()=>{window.location.href="/"}))}}}),defaultOptions:{queries:{staleTime:3e4,retry:3},dehydrate:{serializeData:d.ZP.serialize,shouldDehydrateQuery:e=>(0,p.d_)(e)||"pending"===e.state.status},hydrate:{deserializeData:d.ZP.deserialize}}});r(25566);let g=()=>null!=l?l:l=v(),b=(0,o.ec)();function j(e){let t=g(),[r]=(0,c.useState)(()=>b.createClient({links:[(0,i.gb)({enabled:e=>"down"===e.direction&&e.result instanceof Error}),(0,i.Pq)({transformer:d.ZP,url:window.location.origin+"/api/trpc",headers:()=>{let e=new Headers;return e.set("x-trpc-source","nextjs-react"),e}})]}));return(0,a.jsxs)(s.QueryClientProvider,{client:t,children:[(0,a.jsx)(b.Provider,{client:r,queryClient:t,children:e.children}),(0,a.jsx)(n.t,{initialIsOpen:!1})]})}},74765:function(e,t,r){r.r(t),r.d(t,{default:function(){return c}});var l=r(57437),a=r(66648),s=r(87138),n=r(78302);r(57441);var i=r(57325),o=r(29735),c=e=>{var t,r,c,d,u,x,h,p,f,m;let{homeCategories:v,homePageBanners:g}=e;return(0,l.jsxs)("div",{className:"vta-container relative",children:[(0,l.jsxs)("div",{className:"flex gap-3",children:[(0,l.jsx)(o.j,{homeCategories:v,className:"w-[220px]"}),(0,l.jsxs)("div",{className:"grid flex-1 grid-cols-12 gap-3",children:[(0,l.jsx)("div",{className:"relative col-span-12 h-auto overflow-hidden rounded-lg border shadow-lg lg:col-span-8 lg:h-[376px]",children:(0,l.jsx)(n.BannerCenter,{items:null!==(m=null==g?void 0:g.carouselBanners)&&void 0!==m?m:[]})}),(0,l.jsx)("div",{className:"col-span-4 hidden h-[376px] grid-rows-3 gap-2 lg:grid",children:null==g?void 0:null===(r=g.staticBanners)||void 0===r?void 0:null===(t=r.slice(0,3))||void 0===t?void 0:t.map((e,t)=>(0,l.jsx)(s.default,{href:e.link,children:(0,l.jsx)(a.default,{height:120,width:300,src:e.imageUrl,alt:e.title,loading:"lazy",className:"h-full w-full overflow-hidden rounded-lg border object-cover shadow-lg"})},t))})]})]}),(null==g?void 0:null===(c=g.staticBanners)||void 0===c?void 0:c[3])&&(0,l.jsx)(s.default,{href:null==g?void 0:null===(u=g.staticBanners)||void 0===u?void 0:null===(d=u[3])||void 0===d?void 0:d.link,
1children:(0,l.jsx)(a.default,{width:1200,height:90,unoptimized:!0,src:null==g?void 0:null===(h=g.staticBanners)||void 0===h?void 0:null===(x=h[3])||void 0===x?void 0:x.imageUrl,alt:null==g?void 0:null===(f=g.staticBanners)||void 0===f?void 0:null===(p=f[3])||void 0===p?void 0:p.title,className:"col-span-12 mt-3 hidden w-full rounded-xl border object-contain md:block"})}),(0,l.jsx)(i.PopupBanner,{})]})}},78302:function(e,t,r){r.r(t),r.d(t,{BannerCenter:function(){return x}});var l=r(57437),a=r(48059),s=r.n(a),n=r(66648),i=r(87138),o=r(2265),c=r(87805),d=r(53267),u=r(98509);let x=e=>{let{items:t}=e,[r,a]=(0,o.useState)(null),[x,h]=(0,o.useState)(0),p=(0,o.useRef)(null);return(0,o.useEffect)(()=>{if(p&&p.current){var e;null===(e=p.current)||void 0===e||e.slideTo(x)}},[x]),(0,l.jsxs)("div",{className:"jsx-bd3ce4b1d06e6bb0 relative md:h-[85%] [@media(max-width:540px)]:h-auto",children:[(0,l.jsx)(s(),{id:"bd3ce4b1d06e6bb0",children:".custom-bullet.swiper-pagination-bullet-active{background-color:#2e318e;-webkit-border-radius:50px;-moz-border-radius:50px;border-radius:50px;width:20px}"}),(0,l.jsx)(d.tq,{onSwiper:e=>p.current=e,autoplay:{delay:5e3,disableOnInteraction:!1},spaceBetween:10,pagination:{clickable:!0,renderBullet:(e,t)=>'<span class="'.concat(t,' custom-bullet"></span>')},thumbs:{swiper:r},modules:[c.o3,c.pt,c.tl],className:"!z-0 h-full w-full shadow-inner",onSlideChange:e=>h(e.activeIndex),children:t.map((e,t)=>(0,l.jsx)(d.o5,{children:(0,l.jsx)(i.default,{href:e.link,className:"relative flex h-full w-full items-center",children:(0,l.jsx)(n.default,{width:650,height:300,src:e.imageUrl,alt:"".concat(e.title),className:"h-full w-full object-cover"})})},t))}),(0,l.jsx)(d.tq,{onSwiper:a,slidesPerView:4,watchSlidesProgress:!0,modules:[c.o3],className:"gallery-thumbs relative !z-10 h-auto shadow-inner [@media(max-width:540px)]:!h-0",onSlideChange:e=>h(e.activeIndex),children:t.map((e,r)=>(0,l.jsx)(d.o5,{className:"!h-[55px]",children:(0,l.jsx)("div",{className:"jsx-bd3ce4b1d06e6bb0 "+((0,u.cn)("bg-swiper-active relative z-50 flex h-full cursor-pointer items-center justify-center border-b-2 border-transparent px-2 hover:bg-[#f3f4f6]",{"border-l-2":0===r,"!border-b-violet font-bold":x===r,"border-r-2":t.length-1===r})||""),children:(0,l.jsx)("span",{className:"jsx-bd3ce4b1d06e6bb0 line-clamp-1 text-ellipsis text-center text-[12px] xl:text-[13px]",children:e.title})})},r))})]})}},57441:function(e,t,r){r.r(t),r.d(t,{BannerRight:function(){return o}});var l=r(57437),a=r(66648),s=r(87138),n=r(87805),i=r(53267);let o=e=>{let{listImage:t=[]}=e;return(0,l.jsx)(i.tq,{spaceBetween:10,rewind:!0,navigation:!0,modules:[n.W_,n.pt],className:"mySwiper h-auto",autoplay:{delay:2500,disableOnInteraction:!1},children:t.map((e,t)=>(0,l.jsx)(i.o5,{className:"border border-violet shadow-[0_1px_2px_0_rgba(60,64,67,0.1),0_2px_6px_2px_rgba(60,64,67,0.15)]",children:(0,l.jsx)(s.default,{href:e.href,children:(0,l.jsx)(a.default,{src:e.image,alt:"".concat(e.image),className:"h-full w-full rounded-xl xl:max-h-[174px]"})})},t))})}},57325:function(e,t,r){r.r(t),r.d(t,{PopupBanner:function(){return d}});var l=r(57437),a=r(66648),s=r(2265),n=r(70750),i=r(18630),o=r(21791),c=r(83306);let d=()=>{var e;let{data:t}=o.h.banners.getHomePageBanners.useQuery(void 0,{refetchOnWindowFocus:!1}),r=null==t?void 0:null===(e=t.data)||void 0===e?void 0:e.popupBanner,[d,u]=(0,s.useState)(!1);return((0,n.KS)(()=>{if(r){let e=null==r?void 0:r._id;i.Z.get("POPUP-".concat(e))||u(!0)}},5e3),r)?(0,l.jsx)(c.Vq,{open:d,onOpenChange:()=>{if(!r)return;let e=null==r?void 0:r._id;i.Z.set("POPUP-".concat(e),!0),u(!1)},children:(0,l.jsx)(c.cZ,{className:"min-h-0 p-0",children:(0,l.jsx)(a.default,{src:r.imageUrl,alt:r.title,width:425,height:0,className:"w-full"})})}):null}},70512:function(e,t,r){r.d(t,{b:function(){return n}});var l=r(57437),a=r(66648);r(2265);var s=r(24831);let n=e=>{let{src:t,alt:r,placeholder:n=s.G.VIENTHONGA_PLACEHOLDER,width:i=100,height:o=100,className:c="h-full w-full overflow-hidden object-cover"}=e;return(0,l.jsx)(a.default,{placeholder:n,width:i,height:o,src:t,alt:r,className:c})}},29735:function(e,t,r){r.d(t,{j:function(){return x}});var l=r(57437),a=r(87592),s=r(66648),n=r(87138),i=r(2265),o=r(98509),c=r(71275);let d=e=>{var t;let{item:r,onMouseEnter:i,onMouseLeave:c,isActive:d,setIsOpenCategory:u}=e;return(0,l.jsx)("div",{className:(0,o.cn)("group hover:rounded-[15p
1x] hover:bg-[#f3f4f6]",{"rounded-[15px] bg-[#f3f4f6]":d}),onMouseEnter:i,onMouseLeave:c,children:(0,l.jsxs)(n.default,{href:"/danh-muc/".concat(r.slug),className:"flex min-h-[31.3px] w-full cursor-pointer items-center justify-between px-[10px] text-xs font-bold text-[#343a40] no-underline hover:text-violet",onClick:u?()=>u():null,children:[(0,l.jsxs)("div",{className:"flex items-center gap-1",children:[(0,l.jsx)(s.default,{src:r.icon,alt:"icon",width:24,height:24,className:"min-w-6"}),(0,l.jsx)("span",{children:r.name})]}),(null==r?void 0:null===(t=r.quickFilters)||void 0===t?void 0:t.length)>0&&(0,l.jsx)(a.Z,{size:20,color:"#777",className:"min-w-5"})]})})},u=e=>{let{item:t,setIsOpenCategory:r}=e;return t&&t.quickFilters&&!(t.quickFilters.length<1)?(0,l.jsx)("div",{className:"absolute left-[220px] right-0 top-0 z-[11] ml-5 mr-2 max-h-[60vh] min-h-[205px] rounded-[10px_10px_10px_10px] bg-white p-4 text-[#4a4a4a] shadow-[0_0.5em_1em_-0.125em_hsla(0,0%,4%,0.1),0_0_0_1px_hsla(0,0%,4%,0.02)] lg:ml-3 lg:mr-0",children:(0,l.jsx)("div",{className:"flex flex-wrap gap-4",children:t.quickFilters.map((e,t)=>(0,l.jsxs)("div",{className:"flex flex-col",children:[(0,l.jsx)("p",{className:"font-bold",children:e.groupName}),e.groupChild.map((e,t)=>(0,l.jsx)(n.default,{href:"".concat(e.href),className:"",onClick:r?()=>r():null,children:(0,l.jsx)("p",{className:"py-[5px] text-[14px] text-[#707070] hover:text-violet",children:e.name},t)},t))]},t))})}):null},x=e=>{let{homeCategories:t,className:r,setIsOpenCategory:a}=e,[s,n]=i.useState(null),[x,h]=i.useState(!1),p=i.useRef(null),f=e=>{n(e),h(!0),p.current&&clearTimeout(p.current)},m=()=>{p.current&&clearTimeout(p.current),p.current=setTimeout(()=>{h(!1)},300)};return(0,l.jsxs)("div",{className:(0,o.cn)("hidden h-[376px] w-[220px] rounded-[15px] shadow-[0_1px_2px_0_rgba(60,64,67,0.1),0_2px_6px_2px_rgba(60,64,67,0.15)] md:block",r),children:[(0,l.jsx)(c.ScrollArea,{className:"h-full",children:t.map((e,t)=>(0,l.jsx)(d,{item:e,isActive:s===e&&x,onMouseEnter:()=>f(e),onMouseLeave:m,setIsOpenCategory:a},e._id))}),x&&(0,l.jsx)("div",{onMouseEnter:()=>{p.current&&clearTimeout(p.current),h(!0)},onMouseLeave:()=>{h(!1)},children:(0,l.jsx)(u,{item:s,setIsOpenCategory:a})})]})}},6528:function(e,t,r){r.d(t,{FavoriteButton:function(){return i}});var l=r(57437),a=r(89627),s=r(64042),n=r(25708);let i=e=>{let{product:t}=e,{isFavorited:r,toggleFavorite:i,isAddingFavorite:o}=(0,n.d)(t);return(0,l.jsx)(l.Fragment,{children:o?(0,l.jsx)(a.Z,{onClick:i,className:"pointer-events-none animate-spin",width:16,height:16,strokeWidth:2.25,absoluteStrokeWidth:!0,fill:"#96989b",color:"#96989b"}):(0,l.jsx)(s.Z,{onClick:i,className:"hover:fill-[#de4255]",color:"transparent",fill:r?"#de4255":"#96989b",width:16,height:16,strokeWidth:2.25,absoluteStrokeWidth:!0})})}},38624:function(e,t,r){r.d(t,{iJ:function(){return x},mA:function(){return f}});var l=r(57437),a=r(29338),s=r(66648),n=r(87138),i=r(2265),o=r(24831),c=r(98509),d=r(70512),u=r(6528);let x=e=>{let{type:t,product:r,productSaleItem:a}=e;if("common"===t){var s;return(0,l.jsx)(h,{productLink:r.slug,productThumbnail:r.thumbnail,firstPromotion:null===(s=r.morePromotions)||void 0===s?void 0:s[0],isPriceContact:r.isPriceContactOnly,basePrice:r.price,discountPrice:r.specialPrice,discountPercent:r.discountPercentage,productName:r.name,specifications:r.specifications,product:r})}if("weekend-hot-sale"===t){let{isMainColor:e,mainColor:t,color:r,salePrice:s}=a,n=e?t:r;return(0,l.jsx)(h,{productLink:e?t.slug:"".concat(t.slug,"?variant=").concat(null==r?void 0:r._id),productThumbnail:null==n?void 0:n.thumbnail,isPriceContact:null==n?void 0:n.isPriceContactOnly,basePrice:(null==n?void 0:n.price)||0,discountPrice:(null==n?void 0:n.specialPrice)||0,discountPercent:(null==n?void 0:n.discountPercentage)||0,productName:"".concat(t.name," - ").concat(null==n?void 0:n.color),specifications:null==t?void 0:t.specifications,product:t})}if("flash-sale"===t){let{isMainColor:e,mainColor:t,color:r,salePrice:s}=a,n=e?t:r;return(0,l.jsx)(h,{productLink:e?t.slug:"".concat(t.slug,"?variant=").concat(null==r?void 0:r._id),productThumbn
1ail:null==n?void 0:n.thumbnail,isPriceContact:null==n?void 0:n.isPriceContactOnly,basePrice:(null==n?void 0:n.price)||0,discountPrice:(null==n?void 0:n.specialPrice)||0,discountPercent:(null==n?void 0:n.discountPercentage)||0,productName:"".concat(t.name," - ").concat(null==n?void 0:n.color),specifications:null==t?void 0:t.specifications,product:n})}},h=e=>{var t;let{productLink:r,productThumbnail:s,firstPromotion:o,isPriceContact:x,basePrice:h,discountPrice:f,discountPercent:m,productName:v,specifications:g,product:b}=e,j=(null==b?void 0:null===(t=b.flashSales)||void 0===t?void 0:t.length)>0;return(0,l.jsxs)("div",{className:"relative h-full rounded-[8px] bg-white shadow-[0_1px_2px_0_rgba(60,64,67,0.1),0_2px_6px_2px_rgba(60,64,67,0.15)]",children:[!x&&m>0&&(0,l.jsx)("div",{className:"product__price--percent",children:(0,l.jsxs)("p",{className:"product__price--percent-detail",children:["Giảm\xa0",m,"%"]})}),(0,l.jsx)("div",{className:"absolute right-0 top-0 z-[1] w-[-moz-fit-content] w-fit rounded-[5px] border border-solid border-[#0c53b7] bg-white px-[5px] py-0.5 text-[10px] font-medium text-[#0c53b7]",children:"Trả g\xf3p 0%"}),(0,l.jsxs)(n.default,{href:"/san-pham/".concat(r),className:"h-full",children:[(0,l.jsxs)("div",{className:"absolute z-[2] h-full w-full overflow-hidden rounded-[8px] bg-white px-[10px] py-[5px] opacity-0 transition-opacity hover:opacity-100",children:[(0,l.jsxs)("div",{className:"mb-[10px] mt-[5px]",children:[(0,l.jsx)("h3",{className:"text-[12px] font-bold leading-[1.5] lg:text-[14px]",children:v}),(0,l.jsx)("div",{className:"flex flex-col gap-[4px] sm:flex-row",children:x?(0,l.jsx)("p",{className:"text-[12px] font-semibold text-[#e81c24] lg:text-[14px]",children:"Li\xean hệ"}):(0,l.jsx)(l.Fragment,{children:m>0?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("p",{className:"text-[12px] font-semibold text-[#e81c24] lg:text-[14px]",children:(0,c.lb)(f)}),(0,l.jsx)("p",{className:"text-[10px] font-semibold text-[#707070] line-through lg:text-[12px]",children:(0,c.lb)(h)})]}):(0,l.jsx)("p",{className:"text-[12px] font-semibold text-[#e81c24] lg:text-[14px]",children:(0,c.lb)(h)})})})]}),(0,l.jsxs)("div",{className:"",children:[(0,l.jsx)("p",{className:"text-[12px] font-bold lg:text-[14px]",children:"Th\xf4ng tin cấu h\xecnh"}),(0,l.jsxs)("ul",{className:"relative h-[185px] overflow-hidden lg:text-[14px] [&>li]:text-[12px]",children:[null==g?void 0:g.map((e,t)=>(0,l.jsx)("li",{children:Object.keys(e).map((t,r)=>(0,l.jsxs)(i.Fragment,{children:[(0,l.jsx)("span",{className:"font-semibold",children:t}),": ",e[t]]},r+t))},t)),(0,l.jsx)("div",{className:"absolute bottom-0 left-0 right-0 h-20 bg-gradient-to-t from-white to-transparent"})]})]}),(0,l.jsx)("div",{className:"absolute bottom-0 left-[10px] right-[10px] bg-[linear-gradient(180deg,hsla(0,0%,100%,0)_0,hsla(0,0%,100%,0.9)_35%,#fff_0)] pb-[10px]",children:(0,l.jsxs)("div",{className:"flex justify-between gap-1",children:[(0,l.jsxs)("div",{className:"flex items-center gap-[1px] text-[14px]",children:["5",(0,l.jsx)(a.Z,{size:14,fill:"yellow"})]}),(0,l.jsx)("div",{className:"flex items-center gap-1",children:(0,l.jsx)(u.FavoriteButton,{product:b})})]})})]}),(0,l.jsx)("div",{className:"relative mt-[5px] h-[135px] w-full p-[7px] sm:h-[180px]",children:(0,l.jsx)(d.b,{src:s,width:160,height:160,alt:v,className:(0,c.cn)("mx-auto h-full w-auto rounded-bl-md rounded-br-md object-contain")})}),(0,l.jsxs)("div",{className:"mt-[7px] px-[10px] py-[10px]",children:[(0,l.jsx)("h3",{className:"line-clamp-2 h-[40px] overflow-hidden text-ellipsis text-[12px] font-bold leading-[1.5] sm:h-[42px] lg:text-[14px]",children:v}),(0,l.jsx)("div",{className:"flex flex-col gap-[4px] sm:flex-row",children:x?(0,l.jsx)("p",{className:"text-[12px] font-semibold text-[#e81c24] lg:text-[14px]",children:"Li\xean hệ"}):(0,l.jsx)(l.Fragment,{children:m>0?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("p",{className:"text-[12px] font-semibold text-[#e81c24] lg:text-[14px]",children:(0,c.lb)(f)}),(0,l.jsx)("p",{className:"text-[10px] font-semibold text-[#707070] line-through lg:text-[12px]",children:(0,c.lb)(h)})]}):(0,l.jsx)("p",{className:"text-[12px] font-semibold text-[#e81c24] lg:text-[14px]",children:(0,c.lb)(h)})})}),j&&(0,l.jsx)(p,{text:b.flashSales[0].flashSale.name})]}),o&&(0,l.jsxs)("div",{className:"my-[5px] px-[5px]",children:[(0,l.jsx)("div",{className:"border-t border-dashed border-t-[#e2e3e4] pt-[7px]"}),(0,l.jsx)("div",{className:"flex items-center gap-1 rounded-[5px] border bg-[#f3f4f6] p-[5px]",children:(0,l.jsx)("span",{className:"line-clamp-2 text-[0.75rem]",children:null==o?void 0:o.name})})]})]})]})},p=e=>{let{text:t}=e;return(0,l.jsxs)("div",{className:"relative flex h-[2.4rem] w-[20.5rem] max-w-full items-center",children:[(0,l.jsx)(s.default,{className:"absolute z-[1] h-[24px]",src:o.G.FLASH_SALE_ICON,width:20,height:24,alt:""})," ",(0,l.jsx)("span",{className:"absolute ml-[10px] rounded-[3px] bg-[#eb3e3e] px-[10px] text-[10px] font-bold uppercase text-[#ffd600] sm:text-[12px] md:text-[12px]",children:t})]})},f=()=>(0,l.jsxs)("div",{className:"relative rounded-lg bg-white p-4 shadow",children:[(0,l.jsx)("div",{className:"mb-4 aspect-square h-[110px] w-full rounded-lg bg-gray-200 sm:h-[121px] md:h-[186px]"}),(0,l.jsxs)("div",{className:"mb-4 space-y-2",children:[(0,l.jsx)("div",{className:"h-4 w-4/5 rounded bg-gray-200 md:h-5"}),(0,l.jsx)("div",{className:"h-3 w-2/3 rounded bg-gray-200 md:h-4"})]}),(0,l.jsx)("div",{className:"space-y-3",children:(0,l.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,l.jsx)("div",{className:"h-3 w-24 rounded bg-gray-200 md:h-4"}),(0,l.jsx)("div",{className:"h-3 w-20 rounded bg-gray-200 opacity-50 md:h-4"})]})})]})},83306:function(e,t,r){r.d(t,{$N:function(){return p},PK:function(){return d},Vq:function(){return o},cZ:function(){return x},fK:function(){return h},hg:function(){return c},t9:function(){return u}});var l=r(57437),a=r(98966),s=r(4867),n=r(2265),i=r(98509);let o=a.fC,c=a.xz,d=a.h_;a.x8;let u=n.forwardRef((e,t)=>
1{let{className:r,...s}=e;return(0,l.jsx)(a.aV,{ref:t,className:(0,i.cn)("fixed inset-0 z-50 grid place-items-center overflow-y-auto bg-black bg-opacity-25 py-3 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",r),...s})});u.displayName=a.aV.displayName;let x=n.forwardRef((e,t)=>{let{className:r,children:n,...o}=e;return(0,l.jsxs)(d,{children:[(0,l.jsx)(u,{}),(0,l.jsxs)(a.VY,{ref:t,className:(0,i.cn)("fixed left-[50%] top-[50%] z-50 grid max-h-screen w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 overflow-y-auto border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",r),...o,children:[n,(0,l.jsxs)(a.x8,{className:"absolute right-4 top-4 roun
1ded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",children:[(0,l.jsx)(s.Pxu,{className:"h-4 w-4"}),(0,l.jsx)("span",{className:"sr-only",children:"Close"})]})]})]})});x.displayName=a.VY.displayName;let h=e=>{let{className:t,...r}=e;return(0,l.jsx)("div",{className:(0,i.cn)("flex flex-col space-y-1.5 text-center sm:text-left",t),...r})};h.displayName="DialogHeader";let p=n.forwardRef((e,t)=>{let{className:r,...s}=e;return(0,l.jsx)(a.Dx,{ref:t,className:(0,i.cn)("text-lg font-semibold leading-none tracking-tight",r),...s})});p.displayName=a.Dx.displayName,n.forwardRef((e,t)=>{let{className:r,...s}=e;return(0,l.jsx)(a.dk,{ref:t,className:(0,i.cn)("text-sm text-muted-foreground",r),...s})}).displayName=a.dk.displayName},71275:function(e,t,r){r.d(t,{B:function(){return o},ScrollArea:function(){return i}});var l=r(57437),a=r(80023),s=r(2265),n=r(98509);let i=s.forwardRef((e,t)=>{let{className:r,children:s,...i}=e;return(0,l.jsxs)(a.fC,{ref:t,className:(0,n.cn)("relative overflow-hidden",r),...i,children:[(0,l.jsx)(a.l_,{className:"h-full w-full rounded-[inherit]",children:s}),(0,l.jsx)(o,{}),(0,l.jsx)(a.Ns,{})]})});i.displayName=a.fC.displayName;let o=s.forwardRef((e,t)=>{let{className:r,orientation:s="vertical",...i}=e;return(0,l.jsx)(a.gb,{ref:t,orientation:s,className:(0,n.cn)("flex touch-none select-none transition-colors","vertical"===s&&"h-full w-2.5 border-l border-l-transparent p-[1px]","horizontal"===s&&"h-2.5 flex-col border-t border-t-transparent p-[1px]",r),...i,children:(0,l.jsx)(a.q4,{className:"relative flex-1 rounded-full bg-border"})})});o.displayName=a.gb.displayName},25708:function(e,t,r){r.d(t,{d:function(){return n}});var l=r(2265),a=r(27776),s=r(71613);let n=e=>{let[t,r]=(0,l.useState)(!1),n=(0,s.eQ)(e=>e.addProductToFavorite),i=(0,s.eQ)(e=>e.removeProductFromFavorite),o=(0,s.eQ)(e=>e.favoriteProducts).some(t=>t._id===e._id),c=async l=>{var s,c;if(l.preventDefault(),!t){if(o){r(!0);let t=await i(e._id);r(!1),t.success?a.toast.success("Đ\xe3 x\xf3a khỏi danh s\xe1ch y\xeau th\xedch"):a.toast.error(null!==(s=null==t?void 0:t.message)&&void 0!==s?s:"Đ\xe3 c\xf3 lỗi xảy ra")}else{r(!0);let t=await n(e);r(!1),t.success?"created"===t.action?a.toast.success("Đ\xe3 th\xeam v\xe0o danh s\xe1ch y\xeau th\xedch"):"deleted"===t.action&&a.toast.success("Đ\xe3 x\xf3a khỏi danh s\xe1ch y\xeau th\xedch"):a.toast.error(null!==(c=null==t?void 0:t.message)&&void 0!==c?c:"Đ\xe3 c\xf3 lỗi xảy ra")}}};return{isFavorited:o,isAddingFavorite:t,toggleFavorite:c}}},98509:function(e,t,r){r.d(t,{cn:function(){return s},lb:function(){return n},wk:function(){return i}});var l=r(44839),a=r(96164);function s(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return(0,a.m6)((0,l.W)(t))}let n=e=>{try{return e.toLocaleString("vi-VN",{style:"currency",currency:"VND"}).replace("₫","đ").replace(/\s/g,"")}catch(e){return"Li\xean hệ"}};function i(e,t){let r=[...new Intl.Segmenter("vi",{granularity:"word"}).segment(e)].map(e=>e.segment);return r.length>t?r.slice(0,t).join(" ")+"...":e}},60065:function(e,t,r){r.d(t,{M:function(){return u},t:function(){return d}});var l=r(10903),a=r(89291),s=r(52844),n=r(18630);r(74590);var i=r(58064),o=(0,i.$)("9f9012fd4c220205cc358d89ae0036754c457d51"),c=(0,i.$)("a495da870e75a17691c411bcd2e1ac076d4690b3");let d=(0,l.U)()((0,a.mW)((0,s.n)(e=>({isAuthenticated:!1,profile:n.Z.get("profile"),isShowAuthDialog:!1,setAuth:t=>e(e=>{var r;e.profile=null!==(r=t.profile)&&void 0!==r?r:e.profile,e.isAuthenticated=!!e.profile}),setAuthStatus:async()=>{let{data:t}=await o({});e(e=>{e.isAuthenticated=t.isAuthenticated})},logout:async()=>{await c({}),e(e=>{e.isAuthenticated=!1,e.profile=null}),n.Z.remove("profile")},setIsShowAuthDialog:t=>e(e=>{e.isShowAuthDialog=null!=t?t:e.isShowAuthDialog})})),{name:"AuthStore"})),u=d},71613:function(e,t,r){r.d(t,{hx:function(){return p},ju:function(){return x},L5:function(){return h},eQ:function(){return u}});var l=r(10903),a=r(89291),s=r(52844),n=r(18630);r(74590);var i=r(58064),o=(0,i.$)("a5684fe15d3545ad78570967c4fb5aa3dd7c0799"),c=(0,i.$)("0893462daf096882e0980c2f8509af48c87a83e6"),d=r(60065);let u=(0,l.U)()((0,a.mW)((0,s.n)((e,t)=>({favoriteProducts:[],addProductToFavorite:async r=>{if(!d.M.getState().isAuthenticated)return e(e=>{e.favoriteProducts.push(r)}),n.Z.set("favoriteProducts",t().favoriteProducts),{success:!0,action:"created"};try{var l,a;let t=await o({productId:r._id});if(!(null==t?void 0:null===(l=t.data)||void 0===l?void 0:l.isSuccess))return{success:!1,message:null==t?void 0:null===(a=t.serverError)||void 0===a?void 0:a.message};let{action:s}=t.data;return e(e=>{e.favoriteProducts="created"===s?[...e.favoriteProducts,r]:e.favoriteProducts.filter(e=>e._id!==r._id)}),{success:!0,action:s,message:void 0}}catch(e){return{success:!1,action:void 0,message:void 0}}},removeProductFromFavorite:async r=>{let l=d.M.getState().isAuthenticated;try{var a;if(!l)return e(e=>{e.favoriteProducts=e.favoriteProducts.filter(e=>e._id!==r)}),n.Z.set("favoriteProducts",t().favoriteProducts),{success:!0};let s=await c({productId:r});if(null==s?void 0:s.data)return e(e=>{e.favoriteProducts=e.favoriteProducts.filter(e=>e._id!==r)}),{success:!0};return{success:!1,message:(null==s?void 0:null===(a=s.serverError)||void 0===a?void 0:a.message)||void 0}}catch(e){return console.error("Failed to remove product from favorite:",e),{success:!1}}},setFavoriteProducts:t=>{e(e=>{e.favoriteProducts=t||[]})}})),{name:"FavoriteProductStore"})),x=e=>{d.M.getState().isAuthenticated&&u.getState().setFavoriteProducts(e)},h=()=>{let e=n.Z.get("favoriteProducts");u.getState().setFavoriteProducts(e)},p=()=>{u.setState({favoriteProducts:[]})}}}]);

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.