(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6230],{49737:function(e,t,o){"use strict";o.d(t,{f:function(){return M}});var i=o(67294),r=o(3594),n=o(64761),a=o(56817),l=Object.defineProperty,d=Object.defineProperties,s=Object.getOwnPropertyDescriptors,c=Object.getOwnPropertySymbols,u=Object.prototype.hasOwnProperty,p=Object.prototype.propertyIsEnumerable,h=(e,t,o)=>t in e?l(e,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[t]=o,m=(e,t)=>{for(var o in t||(t={}))u.call(t,o)&&h(e,o,t[o]);if(c)for(var o of c(t))p.call(t,o)&&h(e,o,t[o]);return e},g=(e,t)=>d(e,s(t)),f=(0,a.k)(e=>({root:g(m({},e.fn.cover()),{display:"flex",alignItems:"center",justifyContent:"center",overflow:"hidden"})})),v=o(58036),y=o(64523),b=o(20966),w=o(17577),x=Object.defineProperty,P=Object.defineProperties,C=Object.getOwnPropertyDescriptors,T=Object.getOwnPropertySymbols,E=Object.prototype.hasOwnProperty,O=Object.prototype.propertyIsEnumerable,Z=(e,t,o)=>t in e?x(e,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[t]=o,S=(e,t)=>{for(var o in t||(t={}))E.call(t,o)&&Z(e,o,t[o]);if(T)for(var o of T(t))O.call(t,o)&&Z(e,o,t[o]);return e},I=(e,t)=>P(e,C(t)),A=(e,t)=>{var o={};for(var i in e)E.call(e,i)&&0>t.indexOf(i)&&(o[i]=e[i]);if(null!=e&&T)for(var i of T(e))0>t.indexOf(i)&&O.call(e,i)&&(o[i]=e[i]);return o};let _={overlayOpacity:.75,transitionDuration:0,radius:0,zIndex:(0,r.w)("overlay")},M=(0,i.forwardRef)((e,t)=>{let o=(0,n.N4)("LoadingOverlay",_,e),{className:r,visible:a,loaderProps:l,overlayOpacity:d,overlayColor:s,transitionDuration:c,exitTransitionDuration:u,zIndex:p,style:h,loader:m,radius:g,overlayBlur:x,unstyled:P,variant:C,keepMounted:T}=o,E=A(o,["className","visible","loaderProps","overlayOpacity","overlayColor","transitionDuration","exitTransitionDuration","zIndex","style","loader","radius","overlayBlur","unstyled","variant","keepMounted"]),{classes:O,cx:Z,theme:M}=f(null,{name:"LoadingOverlay",unstyled:P,variant:C}),D=`calc(${p} + 1)`;return i.createElement(v.u,{keepMounted:T,duration:c,exitDuration:u,mounted:a,transition:"fade"},e=>i.createElement(y.x,S({className:Z(O.root,r),style:I(S(S({},e),h),{zIndex:p}),ref:t},E),m?i.createElement("div",{style:{zIndex:D}},m):i.createElement(b.a,S({style:{zIndex:D}},l)),i.createElement(w.a,{opacity:d,zIndex:p,radius:g,blur:x,unstyled:P,color:s||("dark"===M.colorScheme?M.colors.dark[5]:M.white)})))});M.displayName="@mantine/core/LoadingOverlay"},38623:function(e,t,o){"use strict";o.d(t,{O:function(){return S}});var i=o(67294),r=o(64761),n=o(70917),a=o(56817),l=o(96768),d=Object.defineProperty,s=Object.defineProperties,c=Object.getOwnPropertyDescriptors,u=Object.getOwnPropertySymbols,p=Object.prototype.hasOwnProperty,h=Object.prototype.propertyIsEnumerable,m=(e,t,o)=>t in e?d(e,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[t]=o,g=(e,t)=>{for(var o in t||(t={}))p.call(t,o)&&m(e,o,t[o]);if(u)for(var o of u(t))h.call(t,o)&&m(e,o,t[o]);return e},f=(e,t)=>s(e,c(t));let v=(0,n.F4)({"from, to":{opacity:.4},"50%":{opacity:1}});var y=(0,a.k)((e,{height:t,width:o,radius:i,circle:r,animate:n})=>({root:{height:(0,l.h)(t),width:r?(0,l.h)(t):(0,l.h)(o),borderRadius:r?(0,l.h)(t):e.fn.radius(i),position:"relative",WebkitTransform:"translateZ(0)"},visible:{overflow:"hidden","&::before":f(g({},e.fn.cover(0)),{content:'""',background:"dark"===e.colorScheme?e.colors.dark[7]:e.white,zIndex:10}),"&::after":f(g({},e.fn.cover(0)),{content:'""',background:"dark"===e.colorScheme?e.colors.dark[4]:e.colors.gray[3],animation:n?`${v} 1500ms linear infinite`:"none",zIndex:11})}})),b=o(64523),w=Object.defineProperty,x=Object.getOwnPropertySymbols,P=Object.prototype.hasOwnProperty,C=Object.prototype.propertyIsEnumerable,T=(e,t,o)=>t in e?w(e,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[t]=o,E=(e,t)=>{for(var o in t||(t={}))P.call(t,o)&&T(e,o,t[o]);if(x)for(var o of x(t))C.call(t,o)&&T(e,o,t[o]);return e},O=(e,t)=>{var o={};for(var i in e)P.call(e,i)&&0>t.indexOf(i)&&(o[i]=e[i]);if(null!=e&&x)for(var i of x(e))0>t.indexOf(i)&&C.call(e,i)&&(o[i]=e[i]);return o};let Z={height:"auto",width:"100%",visible:!0,animate:!0},S=(0,i.forwardRef)((e,t)=>{let o=(0,r.N4)("Skeleton",Z,e),{height:n,width:a,visible:l,animate:d,className:s,circle:c,radius:u,unstyled:p,variant:h}=o,m=O(o,["height","width","visible","animate","className","circle","radius","unstyled","variant"]),{classes:g,cx:f}=y({height:n,width:a,circle:c,radius:u,animate:d},{name:"Skeleton",unstyled:p,variant:h});return i.createElement(b.x,E({className:f(g.root,{[g.visible]:l},s),ref:t},m))});S.displayName="@mantine/core/Skeleton"},32310:function(e,t,o){(window.__NEXT_P=window.__NEXT_P||[]).push(["/product/[...slug]",function(){return o(49867)}])},24738:function(e,t,o){"use strict";o.d(t,{T:function(){return p}});var i=o(35944);o(67294);var r=o(82248),n=o(48189),a=o(92525),l=o(90531),d=o(87379);let s=d.ZP.div.withConfig({componentId:"sc-80df87f3-0"})(["overflow:hidden;&[data-is-sidebar='true'][data-is-bottom-mobile='true']{","{order:2;}}"],l.M.tdDown),c=d.ZP.div.withConfig({componentId:"sc-80df87f3-1"})(["overflow:hidden;&[data-is-sidebar='true'][data-is-bottom-mobile='false']{","{order:-1;}}"],l.M.tdDown),u=d.ZP.div.withConfig({componentId:"sc-80df87f3-2"})(["position:relative;overflow:visible;"]),p=e=>{let{leftColumn:t,rightColumn:o,type:l="sidebar-left",sidebarWidth:d="320px",gapDesktop:p,gap:h="16px",isSidebarBottomMobile:m=!1,wrapperProps:g,customDataProps:f}=e,{isDesktop:v}=a.v.useDevice(),y="sidebar-left"===l?"".concat(d," 1fr"):"1fr ".concat(d),b=v?y:"1fr";return(0,i.tZ)(n.xu,{...g,children:o&&t?(0,i.BX)(r.G,{gridTemplateColumns:b,gridTemplateColumnsDesktop:y,gap:v&&p||h,...f,children:[(0,i.tZ)(s,{"data-is-bottom-mobile":m,"data-is-sidebar":"sidebar-left"===l,children:t}),(0,i.tZ)(c,{"data-is-bottom-mobile":m,"data-is-sidebar":"sidebar-right"===l,children:o})]}):(0,i.tZ)(u,{...f,children:o||t||(0,i.tZ)(i.HY,{})})})}},79512:function(e,t,o){"use strict";o.d(t,{O:function(){return d},W:function(){return s}});var i=o(35944);o(67294);var r=o(43967),n=o(48189),a=o(76318);let l=o(87379).ZP.div.withConfig({componentId:"sc-ee959cfc-0"})([""]),d=e=>{let{customDataProps:t,wrapperProps:o,pages:a=[],...d}=e,c=s(a);return(0,i.tZ)(n.xu,{...o,children:(0,i.tZ)(l,{...t,children:(0,i.tZ)(r.B,{...d,pages:c})})})},s=e=>{let t=(0,a.U)();return e.map(e=>({dataEventCategory:"Ecommerce",dataEventAction:"Breadcrumb Click",dataEventLabel:t,...e}))}},51541:function(e,t,o){"use strict";o.d(t,{E7:function(){return c},NV:function(){return f},OP:function(){return u},PK:function(){return y},S0:function(){return s},cF:function(){return b},dF:function(){return p},dI:function(){return v},iV:function(){return h},tm:function(){return d},yL:function(){return g},yg:function(){return l}});var i=o(90531),r=o(87379),n=o(48189),a=o(58370);let l=(0,r.ZP)(n.xu).withConfig({componentId:"sc-25a3f381-0"})(["width:100%;"]),d=r.ZP.div.withConfig({componentId:"sc-25a3f381-1"})(["height:0;width:100%;padding-top:100%;align-items:center;position:relative;margin-bottom:16px;&[data-in-popup='true']{margin-bottom:46px;","{margin-bottom:24px;}}&[data-no-bottom-list='true']{margin-bottom:0;}","{padding-top:54%;}.product-card-promotion-tag-wrapper{position:absolute;bottom:0;left:0;width:100%;display:flex;img{height:44px;display:block;}}"],i.M.mbDown,i.M.tdOnly),s=r.ZP.div.withConfig({componentId:"sc-25a3f381-2"})(["position:absolute;width:100%;height:100%;top:0;left:0;"]),c=(0,r.ZP)(n.E9).withConfig({componentId:"sc-25a3f381-3"})(["position:absolute;top:0;left:0;width:100%;height:100%;object-fit:contain;user-select:none;user-drag:none;&[data-blur='true']{filter:blur(4px);-webkit-filter:blur(4px);-moz-filter:blur(4px);-o-filter:blur(4px);-ms-filter:blur(4px);}"]),u=r.ZP.div.withConfig({componentId:"sc-25a3f381-4"})(["height:0;padding-top:calc(100% - 2px);position:relative;cursor:pointer;border-radius:4px;background:",";border:1px solid ",";overflow:hidden;&[data-no-border]{border:none;padding-top:100%;","{padding-top:54%;}}&[data-selected='true']{border-color:",";}> *{pointer-events:none;}"],e=>{let{theme:t}=e;return t.colors.white},e=>{let{theme:t}=e;return t.colors.neutral100},i.M.tdOnly,e=>{let{theme:t}=e;return t.colors.primaryBase}),p=r.ZP.div.withConfig({componentId:"sc-25a3f381-5"})(["position:absolute;top:0;left:0;width:100%;height:100%;background:rgba(255,255,255,0.5);display:flex;align-items:center;justify-content:center;text-align:center;"]),h=r.ZP.div.withConfig({componentId:"sc-25a3f381-6"})(["position:fixed;top:0;left:0;width:100%;height:100%;z-index:",";background:",";display:none;&[data-open='true']{display:block;}"],a.v3.zIndexes.imageCaroselPopup,e=>{let{theme:t}=e;return t.colors.gray800}),m=(0,r.iv)(["width:40px;height:40px;display:flex;align-items:center;justify-content:center;border:2px solid ",";border-radius:50%;position:absolute;cursor:pointer;"],e=>{let{theme:t}=e;return t.colors.white}),g=r.ZP.div.withConfig({componentId:"sc-25a3f381-7"})([""," top:68px;right:148px;","{top:40px;left:16px;width:unset;height:unset;border:none;right:unset;}"],m,i.M.mbDown),f=r.ZP.div.withConfig({componentId:"sc-25a3f381-8"})([""," top:50%;transform:translateY(-50%);left:148px;"],m),v=r.ZP.div.withConfig({componentId:"sc-25a3f381-9"})([""," top:50%;right:148px;transform:translateY(-50%);"],m),y=r.ZP.div.withConfig({componentId:"sc-25a3f381-10"})(["position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);width:600px;max-width:min(65vh,90vw);","{width:100%;}"],i.M.mbDown),b=r.ZP.div.withConfig({componentId:"sc-25a3f381-11"})([".grid-layout{grid-gap:8px;grid-template-columns:repeat(var(--carousel-max),1fr) !important;}&[data-in-popup='true']{","{padding:0 16px;}}"],i.M.mbDown)},29459:function(e,t,o){"use strict";o.d(t,{O:function(){return h}});var i=o(35944),r=o(67294),n=o(43967),a=o(10917),l=o(48189),d=o(76318);let s=(e,t)=>{let o=(0,r.useRef)({});return{onMouseDown:e=>{o.current={time:Date.now(),down:!0,x:e.clientX,y:e.clientY}},onMouseMove:e=>{o.current.down&&(Math.abs(e.clientX-(o.current.x||0))>40||Math.abs(e.clientY-(o.current.y||0))>40)&&(o.current.down=!1)},onClickCapture:i=>{if(o.current.down){if(Date.now()-(o.current.time||0)<200){o.current={},null==e||e();return}o.current={}}null==t||t(),i.preventDefault(),i.stopPropagation()},onMouseOut:()=>{o.current={}}}};var c=o(92525),u=o(34461),p=o(51541);let h=e=>{let{images:t,customDataProps:o,wrapperProps:h,currentImageIndex:m,setCurrentImageIndex:g,openPreviewImageIndex:f,isInPopup:v,hideBottomScrollList:y,productName:b,isOutOfStock:w,promotionTag:x}=e,P=(0,d.U)(),C=u.D.useTranslation(),[T,E]=(0,r.useState)(m||0),{isMobile:O}=c.v.useDevice(),Z=v?O?4:6:5,S=void 0!==m?m:T,I=e=>{E(e),"function"==typeof g&&g(e)},{onMouseDown:A,onMouseMove:_,onClickCapture:M,onMouseOut:D}=s(),k=(null==t?void 0:t.length)?t:["/shop/images/default-image.jpg"],B=v?k:k.slice(0,Z);return(0,i.BX)(p.yg,{...h,customDataProps:{...o,style:{"--carousel-max":Z}},children:[(0,i.BX)(p.tm,{"data-in-popup":v,"data-no-bottom-list":y,children:[w&&(0,i.tZ)("div",{style:{position:"absolute",top:"50%",left:"50%",transform:"translate(-50%,-50%)",borderRadius:"50%",padding:16,background:"rgba(38,38,38,0.8)",display:"flex",aspectRatio:"1",alignItems:"center",justifyContent:"center",zIndex:10},children:(0,i.tZ)(l.xv,{size:"p3",colour:"white",children:C({id:"tag.outOfStock",defaultMessage:"Hết h\xe0ng"})})}),(0,i.tZ)(p.S0,{onMouseDown:A,onMouseMove:_,onClickCapture:M,onMouseOut:D,children:(0,i.tZ)(n.S,{row:1,column:1,page:S,isDotsShown:!1,onChangePage:e=>I(e),mode:"snapped",children:k.map((e,t)=>(0,i.tZ)(p.OP,{onClick:()=>{null==f||f(t)},"data-no-border":!0,"data-event-category":"Ecommerce","data-event-action":"Product Image Click","data-event-label":P,children:(0,i.tZ)(p.E7,{src:e,loading:0===t?"eager":"lazy",alt:b||"product image ".concat(t+1)})},t))},k.length)}),(0,i.tZ)(l.Af,{customDataProps:{style:{background:a.r.colors.neutral100,padding:"2px 8px",position:"absolute",bottom:16,right:16}},size:"md",color:"tertiary",children:"".concat(S+1,"/").concat(k.length)}),!!(null==x?void 0:x.length)&&(0,i.tZ)("div",{className:"product-card-promotion-tag-wrapper",children:null==x?void 0:x.filter(e=>!!e.image).map((e,t)=>(0,i.tZ)("div",{children:(0,i.tZ)("img",{src:e.image,alt:e.name,loading:"lazy"})},t))})]}),!y&&(0,i.tZ)(p.cF,{"data-in-popup":v,children:(0,i.tZ)(n.S,{row:1,column:Z||6,page:Math.floor(S/Z),isDotsShown:!1,mode:"snapped",children:B.map((e,t)=>{let o=t+1===Z&&!v;return(0,i.BX)(p.OP,{"data-selected":t===S,onClick:()=>o?null==f?void 0:f(t):I(t),"data-event-category":"Ecommerce","data-event-action":"Product Image Click","data-event-label":P,children:[(0,i.tZ)(p.E7,{src:e}),o&&(0,i.tZ)(p.dF,{children:(0,i.tZ)(l.xv,{size:"description",wordWrap:"break-word",weight:"regular",children:C({id:"productImageCarousel.seeAll",defaultMessage:"Xem tất cả"})})})]},t)})},k.length+"-"+Z)})]})}},6508:function(e,t,o){"use strict";o.d(t,{_:function(){return l}});var i=o(35944),r=o(48189),n=o(87266),a=o(82753);let l=e=>{let{amount:t,setAmount:o,style:l}=e;return(0,i.BX)(a.Lk,{style:l,children:[(0,i.tZ)(r.hU,{onClick:()=>{o(Math.max(t-1,1))},size:"sm",color:"secondary",children:(0,i.tZ)(n.V_,{width:"16px"})}),(0,i.tZ)(r.II,{customDataProps:{style:{width:"unset"}},size:"sm",type:"numeric",value:String(t),onChange:e=>{o(Math.min(Math.max(Math.floor(Number(e.target.value)||0),1),999))}}),(0,i.tZ)(r.hU,{onClick:()=>{o(Math.min(t+1,999))},size:"sm",color:"secondary",children:(0,i.tZ)(n.pO,{width:"16px"})})]})}},82753:function(e,t,o){"use strict";o.d(t,{JF:function(){return d},Lk:function(){return v},Pc:function(){return l},QW:function(){return x},Qm:function(){return C},SD:function(){return P},Yn:function(){return h},ef:function(){return f},iN:function(){return c},ic:function(){return s},kG:function(){return p},mJ:function(){return u},pr:function(){return b},r8:function(){return y},uv:function(){return m},vy:function(){return w},zy:function(){return g}});var i=o(90531),r=o(87379),n=o(48189),a=o(58370);let l=r.ZP.div.withConfig({componentId:"sc-e7bfa0e4-0"})(["position:relative;","{padding:16px;}"],i.M.tdDown),d=r.ZP.div.withConfig({componentId:"sc-e7bfa0e4-1"})(["display:flex;gap:20px;","{flex-direction:column;gap:8px;}","{.buy-now-buttons-desktop{display:none;}}","{.buy-now-buttons-desktop{margin-bottom:16px;}.buy-now-buttons{display:none;}}"],i.M.tdDown,i.M.mbDown,i.M.mbUp),s=r.ZP.div.withConfig({componentId:"sc-e7bfa0e4-2"})(["align-self:start;width:150px;background:",";border:1px solid ",";border-radius:8px;padding:4px;cursor:pointer;","{display:flex;padding:12px;border:none;width:100%;border-radius:4px;}"],e=>e.theme.colors.neutral50,e=>e.theme.colors.neutral100,i.M.tdDown),c=(0,r.ZP)(n.E9).withConfig({componentId:"sc-e7bfa0e4-3"})(["border-radius:4px;width:100%;height:unset;min-height:64px;object-fit:contain;margin-bottom:8px;border-radius:4px;","{height:40px;width:unset;aspect-ratio:unset;margin-right:12px;margin-bottom:0;}"],i.M.tdDown),u=r.ZP.div.withConfig({componentId:"sc-e7bfa0e4-4"})(["display:flex;justify-content:center;text-align:center;align-items:center;"]);r.ZP.div.withConfig({componentId:"sc-e7bfa0e4-5"})(["width:calc(100% + 32px);height:1px;background:",";","{display:none;}"],e=>e.theme.colors.neutral100,i.M.tdDown);let p=r.ZP.table.withConfig({componentId:"sc-e7bfa0e4-6"})(["margin-bottom:24px;td:first-child{white-space:nowrap;}","{display:none;}"],i.M.mbDown),h=r.ZP.div.withConfig({componentId:"sc-e7bfa0e4-7"})(["padding:12px;border:1px solid ",";border-radius:4px;justify-content:space-between;display:none;cursor:pointer;","{display:flex;}"],e=>e.theme.colors.neutral100,i.M.tdDown),m=r.ZP.div.withConfig({componentId:"sc-e7bfa0e4-8"})(["flex:1;"]),g=r.ZP.div.withConfig({componentId:"sc-e7bfa0e4-9"})(["position:fixed;background:rgba(0,0,0,0.7);top:0;left:0;height:100%;width:100%;z-index:",";"],a.v3.zIndexes.dropdown+1),f=r.ZP.div.withConfig({componentId:"sc-e7bfa0e4-10"})(["position:absolute;background:#ffffff;border-radius:12px 12px 0px 0px;padding:16px;padding-bottom:24px;bottom:66px;width:100%;"]),v=r.ZP.div.withConfig({componentId:"sc-e7bfa0e4-11"})(["display:flex;gap:8px;align-items:center;.input-wrapper .input-inner-wrapper input{width:54px;height:32px;text-align:center;padding-left:8px;padding-right:8px;}"]),y=(0,r.ZP)(n.xu).withConfig({componentId:"sc-e7bfa0e4-12"})(["display:flex;flex-wrap:wrap;gap:8px;padding-left:16px;padding-bottom:8px;"]),b=r.ZP.div.withConfig({componentId:"sc-e7bfa0e4-13"})(["> [data-tag-type='standard']:hover{&[data-is-selected],&:active{background:",";}}"],e=>e.theme.colors.blue50),w=(0,r.ZP)(n.xu).withConfig({componentId:"sc-e7bfa0e4-14"})(["margin-bottom:8px;","{margin-bottom:4px;}.tag{margin:4px;:first-child{margin-left:0;}}"],i.M.tdDown);(0,r.ZP)(n.xu).withConfig({componentId:"sc-e7bfa0e4-15"})(["display:flex;justify-content:space-between;align-items:center;gap:4px;padding:2px;svg{width:18px;height:18px;object-fit:fit-contain;flex-shrink:0;}"]);let x=(0,r.ZP)(n.xu).withConfig({componentId:"sc-e7bfa0e4-16"})(["&[data-disabled='true']{pointer-events:none;}width:100%;display:flex;gap:16px;button[data-color='primary']{svg{path{fill:white;}}}","{gap:8px;padding:8px;> *{flex:1;}z-index:",";}"],i.M.tdDown,a.v3.zIndexes.dropdown),P=(0,r.ZP)(n.xu).withConfig({componentId:"sc-e7bfa0e4-17"})(["background:#fdfefe;","{position:fixed;bottom:0;left:0;width:100%;z-index:20;border-top:1px solid #e4e8ec;}"],i.M.tdDown),C=r.ZP.div.withConfig({componentId:"sc-e7bfa0e4-18"})(["display:flex;align-items:center;padding:6px 4px;width:100%;cursor:pointer;"])},12218:function(e,t,o){"use strict";o.d(t,{I:function(){return h}});var i=o(35944),r=o(10917),n=o(67294),a=o(24139),l=o(27037),d=o(30202);function s(e,t){return e.findAll(t.filters).map(e=>t.select?t.select(e):e.state)}var c=o(48189),u=o(34461),p=o(82753);let h=e=>{let{onAddToCart:t,onBuyNow:o,isInStock:h,productUrl:m}=e,g=u.D.useTranslation(),f=function(e,t){let o=(0,d.NL)(void 0);return function(e={},t){let o=(0,d.NL)(t).getMutationCache(),i=n.useRef(e),r=n.useRef();return r.current||(r.current=s(o,e)),n.useEffect(()=>{i.current=e}),n.useSyncExternalStore(n.useCallback(e=>o.subscribe(()=>{let t=(0,a.Q$)(r.current,s(o,i.current));r.current!==t&&(r.current=t,l.V.schedule(e))}),[o]),()=>r.current,()=>r.current)}({filters:{...e,status:"pending"}},o).length}({mutationKey:["addToCart"]})>0;return(0,i.tZ)(p.SD,{children:(0,i.tZ)(p.QW,{customDataProps:{"data-disable":!h},children:h?(0,i.BX)(i.HY,{children:[(0,i.tZ)(c.zx,{size:"lg",color:o?"secondary":"primary",onClick:t,icon:(0,i.tZ)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",children:(0,i.tZ)("path",{d:"M5.308 21.5q-.748 0-1.278-.53a1.74 1.74 0 0 1-.53-1.278V8.308q0-.75.53-1.278.53-.53 1.278-.53H7.5q0-1.873 1.313-3.187Q10.127 2 12 2t3.187 1.313T16.5 6.5h2.192q.749 0 1.278.53.53.53.53 1.278v11.384q0 .749-.53 1.278-.53.53-1.278.53zm0-1.5h13.384a.3.3 0 0 0 .212-.096.3.3 0 0 0 .096-.212V8.308a.3.3 0 0 0-.096-.212.3.3 0 0 0-.212-.096H5.308a.3.3 0 0 0-.212.096.3.3 0 0 0-.096.212v11.384q0 .116.096.212a.3.3 0 0 0 .212.096M9 6.5h6q0-1.25-.875-2.125A2.9 2.9 0 0 0 12 3.5q-1.25 0-2.125.875A2.9 2.9 0 0 0 9 6.5m2.985 7q1.695 0 3.047-1.148 1.35-1.148 1.335-2.606a.74.74 0 0 0-.207-.528.7.7 0 0 0-.527-.218.7.7 0 0 0-.471.182 1 1 0 0 0-.295.506 2.8 2.8 0 0 1-1.036 1.665 2.9 2.9 0 0 1-1.846.647 2.93 2.93 0 0 1-1.854-.647A2.73 2.73 0 0 1 9.1 9.688q-.086-.34-.278-.514A.66.66 0 0 0 8.367 9a.72.72 0 0 0-.534.218.72.72 0 0 0-.216.528q0 1.457 1.336 2.606 1.335 1.148 3.032 1.148",fill:o?r.r.colors.primaryBase:"#fff"})}),customDataProps:{"data-event-action":"Add To Cart Click","data-event-category":"Ecommerce","data-event-label":m},disabled:f,children:g({id:"productInfo.addToCart",defaultMessage:"Th\xeam v\xe0o giỏ h\xe0ng"})}),o&&(0,i.tZ)(c.zx,{size:"lg",color:"primary",onClick:o,customDataProps:{"data-event-action":"Buy Now Click","data-event-category":"Ecommerce","data-event-label":m},disabled:f,children:g({id:"productInfo.buyNow",defaultMessage:"Mua ngay"})})]}):(0,i.tZ)(c.zx,{size:"lg",color:"primary",disabled:!0,customDataProps:{style:{width:"100%"}},children:g({id:"tag.outOfStock",defaultMessage:"Hết h\xe0ng"})})})})}},41536:function(e,t,o){"use strict";o.d(t,{q:function(){return c}});var i=o(35944);o(67294);var r=o(86896),n=o(17180),a=o(54015),l=o(87266),d=o(58370),s=o(92525);let c=e=>{let{customDataProps:t,items:o=[],heading:c}=e,{formatMessage:u}=(0,r.Z)(),{isMobile:p}=s.v.useDevice(),h=d.zM.usePush();return(0,i.tZ)(a.Np,{background:{colour:"white"},heading:(0,i.tZ)(a.Np.Header,{colour:"secondaryDark",children:c}),customNavButton:{icon:(0,i.tZ)(l.Vm,{}),onClick:()=>h(d.zM.getLocalisedUrl("","PROMOTION")),colour:"primaryBase",content:u({id:"common.seeMore"}),href:d.zM.getLocalisedUrl("","PROMOTION").toString()},itemsPerPage:p?2.3:6,customDataProps:{...t,style:{marginBottom:p?8:16,...null==t?void 0:t.style}},customIndicator:{defaultColour:"neutral100",activeColour:"primaryBase"},withIndicators:!1,children:o.map((e,t)=>(0,i.tZ)(n.h,{customDataProps:{style:{"--reward-item-width":"unset",height:"100%"}},promotion:e},t))})}},75713:function(e,t,o){"use strict";o.d(t,{o:function(){return d}});var i=o(35944);o(67294);var r=o(11163),n=o(3527),a=o(58370),l=o(9268);let d=e=>{let{children:t,pageTitle:o,SEOData:d,customHead:s}=e,{locale:c="vi-VN"}=(0,r.useRouter)(),{isDesktop:u}=a.v3.useDevice(),p=(0,n.x)();return(0,i.tZ)(l._,{locale:c,showStickyBottomMenu:!1,headerProps:{topBarProps:{backProps:{visible:!0,onClick:p},titleProps:{visible:!0,content:o},cartProps:{visible:!0},searchProps:{visible:!0},rightKebabProps:{visible:!0},hasBorder:!0},showSearchBar:u},SEOData:d,customHead:s,children:t})}},42888:function(e,t,o){"use strict";o.d(t,{M:function(){return s},z:function(){return d}});var i=o(76902),r=o(72461),n=o(58370),a=o(65668);let l=!1,d={getCartId:async e=>{let t=n.mA.getCookie(i.QP,e)||"";if(t)return t;let o=await a.G.callApi({to:"ecom",path:"GUEST_GET_CART_ID",method:"POST"});return t=(null==o?void 0:o.data)||"",n.mA.setCookie(i.QP,t,{domain:"localhost"===window.location.hostname||"127.0.0.1"===window.location.hostname?window.location.hostname:".".concat(r.domainLocales["vi-VN"])}),t},addToCart:async(e,t)=>{if(!e||!t)return;let o=await d.getCartId();if(o)return a.G.callApi({to:"ecom",path:"GUEST_ADD_ITEM_TO_CART",method:"POST",params:{cartId:o},options:{data:{cartItem:{sku:e,qty:t}}}})},getCart:async function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=await d.getCartId();if(!t)return;let o=await a.G.callApi({to:"ecom",path:"GUEST_GET_CART",method:"GET",params:{cartId:t}});return e<2&&(null==o?void 0:o.status)!==1?(n.mA.removeCookie(i.QP,"localhost"===window.location.hostname||"127.0.0.1"===window.location.hostname?window.location.hostname:".".concat(r.domainLocales["vi-VN"])),d.getCart(e+1)):o},getCartTotals:async()=>{let e=await d.getCartId();if(e)return a.G.callApi({to:"ecom",path:"GUEST_GET_CART_TOTALS",method:"GET",params:{cartId:e}})},removeFromCart:async e=>{if(!e)return;let t=await d.getCartId();if(t)return a.G.callApi({to:"ecom",path:"GUEST_REMOVE_CART_ITEM",method:"DELETE",params:{cartId:t,itemId:e}})},updateCart:async(e,t)=>{if(!t||!e)return;let o=await d.getCartId();if(o)return a.G.callApi({to:"ecom",path:"GUEST_UPDATE_CART_ITEM",method:"PUT",params:{cartId:o,itemId:e},options:{data:{cartItem:{qty:t}}}})},estimateShipping:async e=>{let t=await d.getCartId();if(t)return a.G.callApi({to:"ecom",path:"GUEST_ESTIMATE_SHIPPING",method:"POST",params:{cartId:t},options:{data:{address:e.address}}})},setShipping:async e=>{if(!e)return;let t=await d.getCartId();if(t)return a.G.callApi({to:"ecom",path:"GUEST_SET_SHIPPING",method:"POST",params:{cartId:t},options:{data:{addressInformation:{shipping_address:e.shipping_address,billing_address:e.billing_address,shipping_carrier_code:e.shipping_carrier_code,shipping_method_code:e.shipping_method_code}}}})},removeOutOfStockItems:async()=>{let e=await d.getCartId();if(e)return a.G.callApi({to:"ecom",path:"GUEST_REMOVE_OUT_OF_STOCK_ITEMS",method:"DELETE",params:{cartId:e}})}},s={getCartId:e=>a.G.callApiWithAuth({to:"ecom",path:"GET_CART_ID",method:"POST",reqCookie:e}),addToCart:(e,t,o)=>{if(e&&t)return a.G.callApiWithAuth({to:"ecom",path:"ADD_ITEM_TO_CART",method:"POST",options:{data:{cartItem:{sku:e,qty:t}}},reqCookie:o})},getCart:async(e,t)=>{let o=await a.G.callApiWithAuth({to:"ecom",path:"GET_CART",method:"GET",reqCookie:e});if(!t&&(null==o?void 0:o.status)!==1){if(!l)try{l=!0,await s.getCartId(e)}finally{l=!1}return s.getCart(e,!0)}return o},getCartTotals:async e=>a.G.callApiWithAuth({to:"ecom",path:"GET_CART_TOTALS",method:"GET",reqCookie:e}),removeFromCart:(e,t)=>{if(e)return a.G.callApiWithAuth({to:"ecom",path:"REMOVE_CART_ITEM",method:"DELETE",params:{itemId:e},reqCookie:t})},updateCart:(e,t,o)=>{if(t&&e)return a.G.callApiWithAuth({to:"ecom",path:"UPDATE_CART_ITEM",method:"PUT",params:{itemId:e},options:{data:{cartItem:{qty:t}}},reqCookie:o})},estimateShipping:async e=>{let{address:t,cookie:o}=e;return a.G.callApiWithAuth({to:"ecom",path:"ESTIMATE_SHIPPING",method:"POST",options:{data:{address:t}},reqCookie:o})},mergeGuestCartToMine:async e=>{let t,{customerId:o,storeId:r,cookie:l}=e;if("number"!=typeof o||!o||"number"!=typeof r)return;let d=n.mA.getCookie(i.QP,l)||"";if(d){try{t=await a.G.callApiWithAuth({to:"ecom",path:"MERGE_GUEST_CART_TO_MINE",method:"PUT",params:{cartId:d},options:{data:{customerId:o,storeId:r}},reqCookie:l})}catch(e){console.log(e)}return t}},getCoupons:async()=>a.G.callApiWithAuth({to:"ecom",path:"GET_COUPON_LIST",method:"GET"}),applyCoupon:async e=>a.G.callApiWithAuth({to:"ecom",path:"PUT_APPLY_COUPON_TO_CART",method:"PUT",params:{couponCode:e}}),delCoupon:async()=>a.G.callApiWithAuth({to:"ecom",path:"DELETE_COUPON_FROM_CART",method:"DELETE"}),getShippingVendorList:async function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return a.G.callApiWithAuth({to:"ecom",path:"POST_SHIPPING_VENDOR_LIST",method:"POST",params:{method:e},options:{data:{addressId:t}}})},setShippingInformation:async(e,t)=>a.G.callApiWithAuth({to:"ecom",path:"POST_SET_SHIPPING_INFORMATION",method:"POST",params:{method:e},options:{data:{addressInformation:{shipping_carrier_code:t.shippingCarrierCode,shipping_method_code:t.shippingMethodCode,...t.customerAddressId?{shipping_address:{customer_address_id:t.customerAddressId},billing_address:{customer_address_id:t.customerAddressId}}:{}}}}}),createOrder:async(e,t)=>a.G.callApiWithAuth({to:"ecom",path:"POST_CREATE_ORDER",method:"POST",params:{method:e},options:{data:{paymentMethod:{method:t.paymentMethod},email:t.email,phone:t.phone}}}),createPayment:async(e,t,o)=>{let i=new FormData;return i.append("order_id",e),i.append("return_url",n.zM.getLocalisedUrl(e,"ORDER_CONFIRMATION").toString()),t&&i.append("type",t),a.G.callApiWithAuth({to:"ecom",path:"CREATE_PAYMENT",method:"POST",options:{data:i},reqCookie:o})},removeOutOfStockItems:async e=>a.G.callApiWithAuth({to:"ecom",path:"REMOVE_OUT_OF_STOCK_ITEMS",method:"DELETE",reqCookie:e}),addOrderToCart:async e=>a.G.callApiWithAuth({to:"ecom",path:"PUT_OLD_ORDER_TO_CART",method:"PUT",params:{code:e}}),getStoreAddressList:async function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;return a.G.callApiWithAuth({to:"ecom",path:"GET_STORE_ADDRESS_LIST",method:"GET",params:{provinceId:e,districtId:t,page:o}})},setPickupStore:async e=>a.G.callApiWithAuth({to:"ecom",path:"PUT_CART_SET_PICKUP_STORE",method:"PUT",params:{id:e}}),checkPMCProducts:async()=>a.G.callApiWithAuth({to:"ecom",path:"POST_CART_CHECK_PMC_PRODUCTS",method:"POST"}),checkPhone:async()=>a.G.callApiWithAuth({to:"ecom",path:"POST_CART_CHECK_PHONE",method:"POST"}),triggerPMCDeliveryEstimate:async e=>a.G.callApiWithAuth({to:"ecom",path:"TRIGGER_CART_PMC_DELIVERY_ESTIMATE",method:"POST",options:{data:{addressId:e}}}),getPromotions:async()=>a.G.callApiWithAuth({to:"ecom",path:"GET_CART_CHECK_PROMOTIONS",method:"GET"}),getPaymentMethods:async()=>a.G.callApi({to:"ecom",path:"GET_PAYMENT_METHODS",method:"GET"})}},5627:function(e,t,o){"use strict";o.d(t,{l:function(){return l}});var i=o(16192),r=o(81462),n=o(65668),a=o(76902);let l={getNavigationData:async()=>{var e;let[t,o,l]=await Promise.all([(0,i.g)("ecom-layout",()=>n.G.callApiWithAuth({to:"ecom",path:"GET_LAYOUT",method:"GET"}),e=>{var t;return!!(null==e?void 0:null===(t=e.data)||void 0===t?void 0:t.store_id)&&(null==e?void 0:e.status)===1},3e5),(0,i.g)("discover-footer",()=>n.G.callApi({to:"discover",path:"GET_FOOTER",method:"GET"}),e=>{var t,o;return!!(null==e?void 0:null===(o=e.data)||void 0===o?void 0:null===(t=o.data)||void 0===t?void 0:t.general)&&(null==e?void 0:e.status)===1},3e5),(0,r.a)(a.SP)]);return{...t,data:{...null==t?void 0:t.data,dataNavMenuContent:l,footer:(null==o?void 0:o.data)||(null==t?void 0:null===(e=t.data)||void 0===e?void 0:e.footer)}}},getHomePageData:()=>n.G.callApi({to:"ecom",path:"GET_HOME_PAGE",method:"GET"}),getCareTopService:()=>n.G.callApi({to:"care",path:"GET_HOMEPAGE_TOP_SERVICE",method:"GET"}),getBrandPageData:e=>n.G.callApi({to:"ecom",path:"GET_BRAND_PAGE",method:"GET",params:{slug:e}}),getCategoryPageData:e=>n.G.callApi({to:"ecom",path:"GET_CATEGORY_PAGE",method:"GET",params:{slug:e}}),getCategoryBestsellerProducts:e=>n.G.callApi({to:"ecom",path:"GET_CATEGORY_BEST_SELLER_PRODUCTS",method:"GET",params:{slug:e}}),getBrandBestsellerProducts:e=>n.G.callApi({to:"ecom",path:"GET_BRAND_BEST_SELLER_PRODUCTS",method:"GET",params:{slug:e}}),getProductDetailPageData:(e,t)=>n.G.callApiWithAuth({to:"ecom",path:"GET_PRODUCT_DETAIL_PAGE",method:"GET",params:{slug:e},reqCookie:t}),getSuggestionBlocksData:(e,t)=>n.G.callApi({to:"ecom",path:"GET_SUGGESTION_BLOCKS",method:"GET",reqCookie:t,params:{isHotdeal:String("boolean"==typeof e?e:"")}})}},3527:function(e,t,o){"use strict";o.d(t,{x:function(){return a}});var i=o(67294),r=o(11163),n=o(58370);let a=()=>{let e=(0,r.useRouter)(),{back:t}=e,o=(0,i.useRef)(!1);return(0,i.useEffect)(()=>{let e=()=>{o.current=!0};return window.addEventListener("beforeunload",e),()=>{o.current=!0,window.removeEventListener("beforeunload",e)}},[]),(0,i.useEffect)(()=>{o.current=!0,setTimeout(()=>{o.current=!1},700)},[e.asPath]),()=>{t(),setTimeout(()=>{o.current||e.push(n.zM.getNewRelativeURL("","shop").toString())},500)}}},49867:function(e,t,o){"use strict";o.r(t),o.d(t,{__N_SSP:function(){return e3},default:function(){return e4}});var i=o(35944),r=o(67294),n=o(49737),a=o(5152),l=o.n(a);let d="VMefTjL46qbbiQ3YFb2HgmoW";var s=()=>((0,r.useEffect)(()=>{let e=setTimeout(()=>{var e,t,o,i;let r="chatwoot-script";if(null===(e=document.querySelector("#"+r))||void 0===e||e.remove(),null===(t=document.querySelector(".woot--bubble-holder"))||void 0===t||t.remove(),null===(o=document.querySelector(".woot-widget-holder"))||void 0===o||o.remove(),delete window.$chatwoot,d){window.chatwootSettings={hideMessageBubble:!1,position:"right",locale:"vi",type:"standard"};let e="https://app.chatwoot.com",t=document.createElement("script"),o=document.getElementsByTagName("script")[0];t.setAttribute("id",r),t.src=e+"/packs/js/sdk.js",null===(i=o.parentNode)||void 0===i||i.insertBefore(t,o),t.async=!0,t.onload=function(){window.chatwootSDK.run({websiteToken:d,baseUrl:e})},document.body.classList.add("has-chatwoot")}},500);return()=>{var t,o,i;e&&clearTimeout(e),document.body.classList.remove("has-chatwoot"),null===(t=document.querySelector("#chatwoot-script"))||void 0===t||t.remove(),null===(o=document.querySelector(".woot--bubble-holder"))||void 0===o||o.remove(),null===(i=document.querySelector(".woot-widget-holder"))||void 0===i||i.remove(),delete window.$chatwoot}},[d]),null),c=o(30118),u=o(10917),p=o(38623),h=o(79033),m=o(2110),g=o(24738),f=o(79512),v=o(48189),y=o(87266),b=o(58370),w=o(330),x=o(90531),P=o(87379);let C=P.ZP.div.withConfig({componentId:"sc-71cc3823-0"})(["display:grid;gap:8px;&[data-more]{transition:max-height 0.6s;max-height:0;overflow:hidden;margin-top:8px;}&[data-show-all='true']{max-height:400px;}grid-template-columns:repeat(2,1fr);&[data-size='3']{","{grid-template-columns:repeat(3,1fr);}}"],x.M.mbUp),T=P.ZP.a.withConfig({componentId:"sc-71cc3823-1"})(["display:flex;text-decoration:none;padding:6px;align-items:center;gap:8px;border:1px solid ",";border-radius:8px;&:hover,&:active,&:focus{background-color:",";border-color:",";}.info-text{display:flex;flex-direction:column;.price-text{display:flex;align-items:center;}svg,img{margin-left:4px;}img{object-fit:cover;border-radius:4px;}svg path{fill:",";}}"],e=>{let{theme:t}=e;return t.colors.blue100},e=>{let{theme:t}=e;return t.colors.blue100},e=>{let{theme:t}=e;return t.colors.primaryBase},e=>{let{theme:t}=e;return t.colors.red800}),E=(0,P.ZP)(v.zx).withConfig({componentId:"sc-71cc3823-2"})(["&[data-show='true']{margin-top:0px;}> span{display:inline-flex;align-items:center;}margin-top:-8px;color:",";svg[data-show='true']{transform:rotate(-90deg);}svg path{fill:",";}","{padding-left:6px;}","{width:100%;}"],e=>{let{theme:t}=e;return t.colors.primaryBase},e=>{let{theme:t}=e;return t.colors.primaryBase},x.M.mbUp,x.M.mbDown),O={shopee:{name:"Shopee",icon:e=>(0,i.tZ)("img",{src:"/shop/images/vendors/vendor-shopee.png",style:{width:e,height:e},loading:"lazy",alt:"Lazada"})},lazada:{name:"Lazada",icon:e=>(0,i.tZ)("img",{src:"/shop/images/vendors/vendor-lazada.png",style:{width:e,height:e},loading:"lazy",alt:"Lazada"})},tiki:{name:"Tiki",icon:e=>(0,i.tZ)("img",{src:"/shop/images/vendors/vendor-tiki.png",style:{width:e,height:e},loading:"lazy",alt:"Tiki"})},hellobacsi:{name:"Hellobacsi",icon:e=>(0,i.tZ)("img",{src:"/shop/images/vendors/vendor-hellobacsi.png",style:{width:e,height:e},loading:"lazy",alt:"affiliate hellobacsi"})}},Z=e=>{var t,o;let{wrapperProps:n,affiliates:a,anchorProps:l,hideHeader:d,forceShowAll:s}=e,c=b.zM.useLocale(),{isMobile:u}=b.v3.useDevice(),p=b.D1.useTranslation(),h=u?4:8,[m,g]=r.useState(!1),f=a.length>h,x=3===a.length?"3":"2";return(0,i.BX)(v.xu,{...n,children:[!d&&(0,i.tZ)("div",{style:{marginBottom:8},children:u?(0,i.tZ)(v.X6,{tag:"h5",weight:"bold",as:"p",children:p({id:"product.affiliate.buyNow",defaultMessage:"Mua ngay"})}):(0,i.tZ)(v.xv,{size:"s4",weight:"regular",children:p({id:"product.affiliate.buyNow",defaultMessage:"Mua ngay"})})}),(0,i.tZ)(C,{"data-size":x,"data-one":(null==a?void 0:a.length)<=1,children:null==a?void 0:null===(t=a.slice(0,h))||void 0===t?void 0:t.map((e,t)=>O[e.channelCode]&&(0,i.BX)(T,{href:e.url,target:"_blank","data-event-category":"Ecommerce","data-event-action":"Shop Click","data-product-channel":e.channelCode.charAt(0).toUpperCase()+e.channelCode.slice(1),...l,children:[O[e.channelCode].icon(36),(0,i.BX)("div",{className:"info-text",children:[(0,i.tZ)(v.xv,{size:"description",weight:"regular",children:O[e.channelCode].name}),(0,i.BX)(v.xv,{className:"price-text",size:"s4",weight:"semi-bold",colour:"red800",children:[(0,w.OH)(e.price,c,"VND"),(0,i.tZ)(y.XC,{width:"16px"})]})]})]},e.channelCode+t))}),f&&(0,i.BX)(i.HY,{children:[(0,i.tZ)(C,{"data-size":"2","data-more":!0,"data-show-all":String(s||m),children:null==a?void 0:null===(o=a.slice(h))||void 0===o?void 0:o.map((e,t)=>O[e.channelCode]&&(0,i.BX)(T,{href:e.url,target:"_blank","data-event-category":"Ecommerce","data-event-action":"Shop Click","data-product-channel":e.channelCode.charAt(0).toUpperCase()+e.channelCode.slice(1),...l,children:[O[e.channelCode].icon(36),(0,i.BX)("div",{className:"info-text",children:[(0,i.tZ)(v.xv,{size:"description",weight:"regular",children:O[e.channelCode].name}),(0,i.BX)(v.xv,{className:"price-text",size:"s4",weight:"semi-bold",colour:"red800",children:[(0,w.OH)(e.price,c,"VND"),(0,i.tZ)(y.XC,{width:"16px"})]})]})]},e.channelCode+t))}),!s&&(0,i.BX)(E,{onClick:()=>g(!m),size:"sm",color:"ghost",customDataProps:{"data-show":m},children:[m?p({id:"common.seeLess",defaultMessage:"Thu gọn"}):p({id:"product.affiliate.seeMore",defaultMessage:"Xem th\xeam {count} s\xe0n"},{count:a.length-h}),(0,i.tZ)(y.XC,{"data-show":m,width:"16px"})]})]})]})};var S=o(64761);let[I,A]=(0,o(68216).R)("Drawer component was not found in tree");var _=o(96768),M=o(56817),D=o(14258);let k={xs:(0,_.h)(320),sm:(0,_.h)(380),md:(0,_.h)(440),lg:(0,_.h)(620),xl:(0,_.h)(780)};var B=(0,M.k)((e,{position:t},{size:o})=>({header:{zIndex:1e3},content:{flex:"right"===t||"left"===t?`0 0 ${(0,D.a)({size:o,sizes:k})}`:"0 0 100%",maxWidth:"100%",maxHeight:"100%",height:"right"===t||"left"===t?"100%":(0,D.a)({size:o,sizes:k}),borderRadius:0,overflowY:"auto"},inner:{display:"flex",justifyContent:"right"===t?"flex-end":"flex-start",alignItems:"bottom"===t?"flex-end":"flex-start"}})),R=o(12692),G=Object.defineProperty,z=Object.defineProperties,N=Object.getOwnPropertyDescriptors,X=Object.getOwnPropertySymbols,L=Object.prototype.hasOwnProperty,U=Object.prototype.propertyIsEnumerable,H=(e,t,o)=>t in e?G(e,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[t]=o,j=(e,t)=>{for(var o in t||(t={}))L.call(t,o)&&H(e,o,t[o]);if(X)for(var o of X(t))U.call(t,o)&&H(e,o,t[o]);return e},q=(e,t)=>z(e,N(t)),V=(e,t)=>{var o={};for(var i in e)L.call(e,i)&&0>t.indexOf(i)&&(o[i]=e[i]);if(null!=e&&X)for(var i of X(e))0>t.indexOf(i)&&U.call(e,i)&&(o[i]=e[i]);return o};let W={top:"slide-down",bottom:"slide-up",left:"slide-right",right:"slide-left"},F={top:"slide-down",bottom:"slide-up",right:"slide-right",left:"slide-left"},Y=q(j({},R.K),{position:"left"});function K(e){let t=(0,S.N4)("DrawerRoot",Y,e),{classNames:o,variant:i,size:n,scrollAreaComponent:a,position:l,transitionProps:d}=t,s=V(t,["classNames","variant","size","scrollAreaComponent","position","transitionProps"]),{classes:c,cx:u,theme:p}=B({position:l},{name:"Drawer",variant:i,size:n}),h=("rtl"===p.dir?F:W)[l];return r.createElement(I,{value:{scrollAreaComponent:a}},r.createElement(R.e,j({__staticSelector:"Drawer",size:n,variant:i,transitionProps:j({transition:h,duration:200},d),classNames:q(j({},o),{content:u(c.content,null==o?void 0:o.content),inner:u(c.inner,null==o?void 0:o.inner)})},s)))}var Q=Object.defineProperty,$=Object.getOwnPropertySymbols,J=Object.prototype.hasOwnProperty,ee=Object.prototype.propertyIsEnumerable,et=(e,t,o)=>t in e?Q(e,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[t]=o,eo=(e,t)=>{for(var o in t||(t={}))J.call(t,o)&&et(e,o,t[o]);if($)for(var o of $(t))ee.call(t,o)&&et(e,o,t[o]);return e},ei=(e,t)=>{var o={};for(var i in e)J.call(e,i)&&0>t.indexOf(i)&&(o[i]=e[i]);if(null!=e&&$)for(var i of $(e))0>t.indexOf(i)&&ee.call(e,i)&&(o[i]=e[i]);return o};let er={shadow:"xl"},en=(0,r.forwardRef)((e,t)=>{let o=(0,S.N4)("ModalContent",er,e),{children:i,scrollAreaComponent:n}=o,a=ei(o,["children","scrollAreaComponent"]),l=A(),d=n||l.scrollAreaComponent||R.e.NativeScrollArea;return r.createElement(R.e.Content,eo({ref:t,radius:0},a),r.createElement(d,{style:{height:"100vh"}},i))});var ea=Object.defineProperty,el=Object.defineProperties,ed=Object.getOwnPropertyDescriptors,es=Object.getOwnPropertySymbols,ec=Object.prototype.hasOwnProperty,eu=Object.prototype.propertyIsEnumerable,ep=(e,t,o)=>t in e?ea(e,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[t]=o,eh=(e,t)=>{for(var o in t||(t={}))ec.call(t,o)&&ep(e,o,t[o]);if(es)for(var o of es(t))eu.call(t,o)&&ep(e,o,t[o]);return e},em=(e,t)=>{var o={};for(var i in e)ec.call(e,i)&&0>t.indexOf(i)&&(o[i]=e[i]);if(null!=e&&es)for(var i of es(e))0>t.indexOf(i)&&eu.call(e,i)&&(o[i]=e[i]);return o};let eg=el(eh({},R.K),ed({withOverlay:!0,withCloseButton:!0}));function ef(e){let t=(0,S.N4)("Drawer",eg,e),{title:o,withOverlay:i,overlayProps:n,withCloseButton:a,closeButtonProps:l,children:d}=t,s=em(t,["title","withOverlay","overlayProps","withCloseButton","closeButtonProps","children"]),c=!!o||a;return r.createElement(K,eh({},s),i&&r.createElement(R.e.Overlay,eh({},n)),r.createElement(en,null,c&&r.createElement(R.e.Header,null,o&&r.createElement(R.e.Title,null,o),a&&r.createElement(R.e.CloseButton,eh({},l))),r.createElement(R.e.Body,null,d)))}ef.Root=K,ef.CloseButton=R.e.CloseButton,ef.Overlay=R.e.Overlay,ef.Content=en,ef.Header=R.e.Header,ef.Title=R.e.Title,ef.Body=R.e.Body,ef.NativeScrollArea=R.e.NativeScrollArea;var ev=o(23493),ey=o.n(ev);let eb=e=>{let{affiliates:t,productUrl:o}=e,{isDesktop:n}=b.v3.useDevice(),[a,l]=(0,r.useState)(!1),[d,s]=(0,r.useState)(!1),c=b.D1.useTranslation();return((0,r.useEffect)(()=>{let e=ey()(()=>{let e=document.getElementById("product-sticky-affiliate-marker");e&&l(e.getBoundingClientRect().top<=0)},200);return window.addEventListener("scroll",e,{passive:!0}),()=>{window.removeEventListener("scroll",e)}},[]),n)?null:(0,i.BX)(i.HY,{children:[(0,i.tZ)("div",{id:"product-sticky-affiliate-marker"}),a&&(0,i.BX)(ew,{children:[(0,i.tZ)(v.zx,{size:"lg",color:"primary",onClick:()=>s(!0),customDataProps:{"data-event-action":"Affiliate Popup Click","data-event-category":"Ecommerce","data-event-label":o,style:{width:"100%"}},children:c({id:"product.affiliate.buyNow",defaultMessage:"Mua ngay"})}),(0,i.tZ)(ef,{opened:d,onClose:()=>s(!1),title:(0,i.tZ)(v.X6,{tag:"h5",weight:"bold",as:"p",children:c({id:"product.affiliate.buyNow",defaultMessage:"Mua ngay"})}),position:"bottom",children:(0,i.tZ)(Z,{affiliates:t||[],hideHeader:!0,forceShowAll:!0})})]})]})},ew=P.ZP.div.withConfig({componentId:"sc-3d54a684-0"})(["position:fixed;bottom:0;left:0;width:100%;z-index:20;border-top:1px solid #e4e8ec;padding:8px;background-color:white;"]);var ex=o(30074),eP=o(41536),eC=o(97038),eT=o(37280),eE=o(15038),eO=o(38066),eZ=o(90143),eS=o(92525),eI=o(34461),eA=o(29459),e_=o(82248),eM=o(76902),eD=o(6508),ek=o(82753);let eB=e=>{let{amount:t,properties:o,selectedPropertyValues:n=[],setAmount:a,setSelectedPropertyValues:l}=e,d=eI.D.useTranslation(),[s,c]=(0,r.useState)(!1),[p,h]=(0,r.useState)(t),[m,g]=(0,r.useState)(n||[]);return(0,i.BX)(i.HY,{children:[(0,i.BX)(ek.Yn,{onClick:()=>{h(t),g(n),c(!0)},children:[(0,i.BX)(ek.uv,{children:[(null==o?void 0:o.length)&&!(null==n?void 0:n.length)?(0,i.tZ)(v.xv,{size:"description",weight:"regular",children:d({id:"productInfo.propertiesMobile.selectProperty",defaultMessage:"Chọn thuộc t\xednh"})}):null,!!(null==n?void 0:n.length)&&!!(null==o?void 0:o.length)&&o.map((e,t)=>{let o=e.values.find(e=>n.includes(e.value));return o?(0,i.BX)(v.xu,{customDataProps:{style:{display:"flex",alignItems:"end",gap:4}},children:[(0,i.tZ)(v.xv,{size:"description",weight:"regular",children:e.text}),(0,i.tZ)(v.xv,{size:"s4",weight:"semi-bold",colour:"gray400",children:"•"}),(0,i.tZ)(v.xv,{size:"s5",weight:"semi-bold",children:o.text})]},t):null}),t?(0,i.BX)(v.xu,{customDataProps:{style:{display:"flex",alignItems:"end",gap:4}},children:[(0,i.BX)(v.xv,{size:"description",weight:"regular",children:[d({id:"productInfo.amount",defaultMessage:"Số lượng"}),":"]}),(0,i.tZ)(v.xv,{size:"s5",weight:"semi-bold",children:t})]}):null]}),(0,i.BX)(v.xv,{size:"s5",colour:"primaryBase",weight:"semi-bold",children:[d({id:"productInfo.propertiesMobile.change",defaultMessage:"Thay đổi"}),(0,i.tZ)(y.Vm,{style:{width:18,height:18,verticalAlign:"middle"}})]})]}),s&&(0,i.tZ)(ek.zy,{onClick:()=>{c(!1)},children:(0,i.BX)(ek.ef,{onClick:e=>{e.stopPropagation()},children:[(0,i.BX)(v.xu,{customDataProps:{style:{display:"flex",justifyContent:"space-between"}},children:[(0,i.tZ)(v.X6,{tag:"h5",weight:"bold",children:d({id:"productInfo.propertiesMobile.popup.selectProperty",defaultMessage:"Chọn thuộc t\xednh"})}),(0,i.tZ)(y.Tw,{style:{width:24,cursor:"pointer"},onClick:()=>{c(!1)}})]}),(0,i.tZ)("div",{style:{width:"100%",background:u.r.colors.neutral100,height:1,margin:"16px 0"}}),null==o?void 0:o.map((e,t)=>(0,i.BX)(v.xu,{customDataProps:{style:{display:"flex",gap:16,flexDirection:"column",marginBottom:16}},children:[(0,i.tZ)(v.xv,{size:"s3",weight:"semi-bold",colour:"secondaryBase",children:e.text}),e.values.map((o,r)=>(0,i.tZ)(v.Y8,{name:e.text,isChecked:m.includes(o.value),onChange:t=>{t.currentTarget.checked?g(t=>t.filter(t=>-1===e.values.findIndex(e=>e.value===t)).concat(o.value)):g(e=>e.filter(e=>e!==o.value))},label:o.text,value:o.value},t+"-"+r))]},t)),(0,i.BX)(v.xu,{customDataProps:{style:{display:"flex",gap:16,alignItems:"center"}},children:[(0,i.tZ)(v.xv,{size:"s3",weight:"semi-bold",colour:"secondaryBase",children:d({id:"productInfo.propertiesMobile.popup.amount",defaultMessage:"Số lượng"})}),(0,i.BX)(ek.Lk,{"data-is-popup":!0,children:[(0,i.tZ)(v.hU,{onClick:()=>{h(Math.max(p-1,1))},size:"sm",color:"secondary",children:(0,i.tZ)(y.V_,{width:"16px"})}),(0,i.tZ)(v.II,{customDataProps:{style:{width:"unset"}},size:"sm",type:"numeric",value:String(p),onChange:e=>{h(Math.min(Math.max(Math.floor(Number(e.target.value)||0),1),999))}}),(0,i.tZ)(v.hU,{onClick:()=>{h(Math.min(p+1,999))},size:"sm",color:"secondary",children:(0,i.tZ)(y.pO,{width:"16px"})})]})]}),(0,i.tZ)(v.zx,{size:"lg",color:"primary",onClick:()=>{a(p),null==l||l(m),c(!1)},customDataProps:{style:{marginTop:24,width:"100%"}},children:d({id:"productInfo.propertiesMobile.popup.save",defaultMessage:"Lưu"})})]})})]})};var eR=o(12218);let eG=l()(()=>o.e(694).then(o.bind(o,90694)).then(e=>e.StickyProductInfoBuy),{loadableGenerated:{webpack:()=>[90694]},ssr:!1}),ez=l()(()=>Promise.all([o.e(7309),o.e(6162)]).then(o.bind(o,46162)).then(e=>e.TanganilPromotionPopup),{loadableGenerated:{webpack:()=>[46162]},ssr:!1}),eN=e=>{switch(e.toLowerCase()){case"chai":return"Chai";case"hop":return"Hộp";case"cai":return"C\xe1i";case"vien":return"Vi\xean";case"vi":return"Vỉ";case"lo":return"Lọ";default:return e}},eX=e=>{var t;let{wrapperProps:o,customDataProps:a,product:l,properties:d,onAddToCart:s,memberPoints:c,promotionTag:u,isRevalidating:p,onBuyNow:h}=e,m=eI.D.useTranslation(),g=b.zM.useRouter(),{tags:f,name:x,brand:P,price:C,unit:T,isInStock:E}=l,{isMobile:O,isDesktop:S}=b.v3.useDevice(),[I,A]=(0,r.useState)([]),[_,M]=(0,r.useState)(1),[D,k]=(0,r.useState)(!1),B=!!(null==l?void 0:l.campaignBanner),R=(null==l?void 0:l.sku)==="P01098",[G,z]=(0,r.useState)(!1),[N,X]=(0,r.useState)(!1);(0,r.useEffect)(()=>{let e=()=>{window.removeEventListener("scroll",e),z(!0)};return window.addEventListener("scroll",e),()=>{window.removeEventListener("scroll",e)}},[]),(0,r.useEffect)(()=>{D&&X(!0)},[D]);let L=()=>{A([]),M(1)};return(0,i.BX)(v.xu,{...o,children:[(0,i.BX)(ek.Pc,{...a,children:[(0,i.tZ)(n.f,{visible:!!p,color:"gray",zIndex:15,radius:"sm",overlayBlur:1}),(0,i.BX)(v.xu,{children:[(0,i.tZ)(ek.vy,{children:null==f?void 0:f.slice(0,5).map((e,t)=>(0,i.tZ)(e_.T,{className:"tag",isInline:!0,isSquared:!0,isSelected:!0,children:(0,i.tZ)(v.xv,{size:"description",colour:"primaryBase",weight:"regular",children:e.name})},t))}),(0,i.tZ)(v.xv,{size:"s1",as:"h1",weight:"semi-bold",dangerouslySetInnerHTML:{__html:x}})]}),(0,i.BX)(ek.JF,{children:[(0,i.BX)(v.xu,{customDataProps:{style:{flex:1}},children:[!B&&!R&&(0,i.BX)(v.xu,{display:{type:"flex",margin:"0 0 16px"},children:[(0,i.tZ)(v.xv,{customDataProps:{style:{marginRight:8}},size:S?"s1":"s2",weight:"semi-bold",colour:"red600",children:(0,w.OH)(C.final,eM.SP,"VND")}),(0,i.BX)(v.xu,{customDataProps:{style:{display:"flex",alignItems:"center",gap:8,marginTop:"auto"}},children:[C.regular&&C.regular!==C.final?(0,i.tZ)(v.xv,{size:S?"p3":"description",weight:"semi-bold",decoration:"line-through",children:(0,w.OH)(C.regular,eM.SP,"VND")}):null,T&&(0,i.BX)(v.xv,{size:S?"p3":"description",weight:"regular",children:["/",eN(T)]}),C.discountPercent?(0,i.BX)(v.Af,{size:"sm",color:"danger",children:["-",0===Math.floor(C.discountPercent)?Math.ceil(C.discountPercent):Math.floor(C.discountPercent),"%"]}):null]})]}),G&&(0,i.tZ)(eG,{onAddToCart:()=>{null==s||s({amount:_,selectedPropertyValues:[]}),L()},amount:_,setAmount:M,product:l,onBuyNow:()=>null==h?void 0:h({amount:_,selectedPropertyValues:[]})}),l.isAffiliateProduct&&(null===(t=l.affiliates)||void 0===t?void 0:t.length)&&!O?(0,i.tZ)(Z,{wrapperProps:{className:"buy-now-buttons-desktop"},affiliates:l.affiliates||[]}):null,O?null:(0,i.tZ)(ek.kG,{children:(0,i.BX)("tbody",{children:[(B||R)&&(0,i.tZ)("tr",{children:(0,i.tZ)("td",{colSpan:2,children:(0,i.BX)("div",{style:{position:"relative",marginBottom:16},children:[(0,i.tZ)("img",{src:S?R?"/shop/images/tardyferon/product_desktop.jpeg?v=2":"/shop/images/tanganil/product_desktop.png":R?"/shop/images/tardyferon/product_mobile.png?v=2":"/shop/images/tanganil/product_mobile.png",alt:R?"tardyferon":"Tanganil",style:{borderRadius:4,cursor:"pointer",display:"block"},onClick:R?void 0:()=>k(!0)}),(0,i.BX)("div",{style:{position:"absolute",height:"100%",display:"flex",flexDirection:"column",justifyContent:"center",gap:4,top:0,paddingLeft:16,pointerEvents:"none"},children:[(0,i.BX)("div",{style:{display:"flex",alignItems:"end"},children:[(0,i.tZ)(v.xv,{size:S?"s1":"s2",weight:"semi-bold",colour:"white",children:(0,w.OH)(C.final,eM.SP,"VND")}),T&&(0,i.BX)(v.xv,{size:S?"p3":"description",weight:"regular",colour:"white",children:["/",eN(T)]})]}),C.regular&&C.regular!==C.final||C.discountPercent?(0,i.BX)("div",{style:{display:"flex",gap:7,alignItems:"center"},children:[C.regular&&C.regular!==C.final?(0,i.tZ)(v.xv,{size:S?"p3":"description",weight:"regular",decoration:"line-through",colour:"white",children:(0,w.OH)(C.regular,eM.SP,"VND")}):null,C.discountPercent?(0,i.BX)(v.Af,{size:"sm",color:"tertiary",customDataProps:{style:{borderRadius:8,borderColor:"#FEAA96",backgroundColor:"white"}},textProps:{colour:"red800"},children:["-",0===Math.floor(C.discountPercent)?Math.ceil(C.discountPercent):Math.floor(C.discountPercent),"%"]}):null]}):null]})]})})}),!!(null==u?void 0:u.length)&&(0,i.BX)("tr",{children:[(0,i.tZ)("td",{style:{verticalAlign:"initial"},children:(0,i.tZ)(v.xv,{size:"p3",weight:"regular",children:m({id:"productDetail.promotion.title",defaultMessage:"Promotions"})})}),(0,i.tZ)("td",{children:(0,i.tZ)(v.xu,{customDataProps:{style:{display:"flex",flexWrap:"wrap",gap:8,paddingLeft:12,marginBottom:8}},children:u.filter(e=>!!e.name).map((e,t)=>(0,i.tZ)("div",{style:{padding:"3px 8px",gap:4,borderRadius:8,backgroundColor:"#F7F9FC",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:(0,i.tZ)(v.xv,{size:"description",weight:"regular",colour:"red700",children:e.name})},t))})})]}),!l.isAffiliateProduct&&!!(null==d?void 0:d.length)&&d.map((e,t)=>(0,i.BX)("tr",{children:[(0,i.tZ)("td",{style:{verticalAlign:"initial",paddingTop:5},children:(0,i.tZ)(v.xv,{size:"p3",weight:"regular",children:e.text})}),(0,i.tZ)("td",{children:(0,i.tZ)(ek.r8,{children:e.values.map((t,o)=>(0,i.tZ)(ek.pr,{onClick:()=>{I.includes(t.value)?A(e=>e.filter(e=>e!==t.value)):A(o=>o.filter(t=>-1===e.values.findIndex(e=>e.value===t)).concat(t.value))},children:(0,i.tZ)(e_.T,{type:"standard",isLight:!0,isInline:!0,isSquared:!0,isSelected:I.includes(t.value),children:(0,i.tZ)(v.xv,{size:"description",weight:"regular",children:t.text})})},o))})})]},t)),!l.isAffiliateProduct&&E?(0,i.BX)("tr",{children:[(0,i.tZ)("td",{children:(0,i.tZ)(v.xv,{size:"p3",weight:"regular",children:m({id:"productInfo.amount",defaultMessage:"Số lượng"})})}),(0,i.tZ)("td",{children:(0,i.tZ)(eD._,{amount:_,setAmount:M,style:{marginLeft:16,marginBottom:8}})})]}):null]})}),(B||R)&&O&&(0,i.BX)("div",{style:{position:"relative",marginBottom:8},children:[(0,i.tZ)("img",{src:R?"/shop/images/tardyferon/product_mobile.png":"/shop/images/tanganil/product_mobile.png",alt:R?"Tardyferon":"Tanganil",style:{borderRadius:8,cursor:"pointer",display:"block"},onClick:R?void 0:()=>k(!0)}),(0,i.BX)("div",{style:{position:"absolute",display:"flex",gap:4,top:0,padding:"12px 16px",alignItems:"end",pointerEvents:"none"},children:[(0,i.tZ)(v.xv,{customDataProps:{style:{marginRight:4}},size:S?"s1":"s2",weight:"semi-bold",colour:"white",children:(0,w.OH)(C.final,eM.SP,"VND")}),C.regular&&C.regular!==C.final||C.discountPercent?(0,i.tZ)(v.xv,{size:S?"p3":"description",weight:"regular",decoration:"line-through",colour:"white",customDataProps:{style:{marginBottom:2}},children:(0,w.OH)(C.regular,eM.SP,"VND")}):null,T&&(0,i.BX)(v.xv,{size:S?"p3":"description",weight:"regular",colour:"white",customDataProps:{style:{marginRight:8,marginBottom:2}},children:["/",eN(T)]}),C.discountPercent?(0,i.BX)(v.Af,{size:"sm",color:"tertiary",customDataProps:{style:{borderRadius:8,borderColor:"#FEAA96",backgroundColor:"white"}},textProps:{colour:"red800"},children:["-",0===Math.floor(C.discountPercent)?Math.ceil(C.discountPercent):Math.floor(C.discountPercent),"%"]}):null]})]}),c?(0,i.tZ)(e_.T,{type:"yellow",isLight:!0,isSquared:!0,style:{display:"block",marginBottom:S?24:8},children:(0,i.BX)(ek.Qm,{onClick:()=>{},children:[(0,i.tZ)(y.Kp,{style:{width:18,height:18,marginRight:8}}),(0,i.tZ)("div",{style:{flex:1},children:(0,i.tZ)(v.xv,{size:"p3",weight:"regular",children:m({id:"productInfo.gainMemberPoints",defaultMessage:"T\xedch điểm th\xe0nh vi\xean"})})}),(0,i.tZ)(e_.T,{type:"standard",isLight:!0,isInline:!0,style:{border:"none"},children:(0,i.tZ)(v.xv,{size:"s4",colour:"yellow900",children:c})})]})}):null,O?(0,i.BX)(i.HY,{children:[(0,i.tZ)(v.xu,{customDataProps:{style:{display:"flex",flexWrap:"wrap",gap:8,marginBottom:8}},children:null==u?void 0:u.map((e,t)=>(0,i.tZ)("div",{style:{padding:"3px 8px",gap:4,borderRadius:8,backgroundColor:"#F7F9FC"},children:(0,i.tZ)(v.xv,{size:"description",weight:"regular",colour:"red700",children:e.name})},t))}),!l.isAffiliateProduct&&(0,i.tZ)(eB,{amount:_,setAmount:M})]}):null,!l.isAffiliateProduct&&(0,i.tZ)(eR.I,{isInStock:E,onAddToCart:()=>{null==s||s({amount:_,selectedPropertyValues:[]}),L()},onBuyNow:()=>null==h?void 0:h({amount:_,selectedPropertyValues:[]}),productUrl:b.zM.getLocalisedUrl(l.slug,"PRODUCT").toString()})]}),P?(0,i.BX)(ek.ic,{onClick:()=>{g.push(b.zM.getLocalisedUrl(P.slug,"BRAND").toString())},"data-event-category":"Ecommerce","data-event-action":"Brand Click","data-event-label":b.zM.getLocalisedUrl(P.slug,"BRAND").toString(),children:[(0,i.tZ)(ek.iN,{src:P.image||P.pmcImage}),(0,i.tZ)(ek.mJ,{children:(0,i.tZ)(v.xv,{size:S?"s3":"s5",weight:"semi-bold",children:P.name})})]}):(0,i.tZ)("div",{style:{width:150}})]})]}),N&&(0,i.tZ)(ez,{isShow:D,setIsShow:k})]})};var eL=o(12354);let eU=(0,P.ZP)(v.xu).withConfig({componentId:"sc-a84bb16f-0"})(["display:flex;gap:16px;padding:24px 16px;background:",";> div:first-child{width:360px;}","{flex-direction:column;gap:0;padding:0;> div:first-child{width:100%;}}"],e=>{let{theme:t}=e;return t.colors.white},x.M.tdDown),eH=e=>{var t;let{customDataProps:o,product:r,promotionTag:n,isRevalidating:a}=e,{isDesktop:l}=b.v3.useDevice(),{globalStateDispatch:d}=b.f8.useAppContext(),{mutate:s}=(0,eL.tI)(),{push:c}=b.zM.useRouter();return(0,i.tZ)(v.EW,{noGutter:!l,children:(0,i.BX)(eU,{...o,children:[(0,i.BX)("div",{children:[(0,i.tZ)(eA.O,{images:(null===(t=r.images)||void 0===t?void 0:t.map(e=>e.medium))||[],openPreviewImageIndex:e=>{var t;return d({type:eO.M.SET_CAROUSEL_IMAGE_POPUP,payload:{imageCarousel:{isOpen:!0,images:(null===(t=r.images)||void 0===t?void 0:t.map(e=>e.large))||[],defaultCurrentImageIndex:e}}})},hideBottomScrollList:!l,productName:r.name,isOutOfStock:!r.isInStock,promotionTag:n}),!r.isAffiliateProduct&&(0,i.BX)(v.Af,{color:"quaternary",size:"md",customDataProps:{style:{backgroundColor:"#E3F2FF",width:l?void 0:"100%",marginTop:l?16:0,borderRadius:l?8:0,paddingLeft:l?void 0:16,paddingRight:l?void 0:16}},textProps:{style:{display:"flex",alignItems:"center",gap:8}},children:[(0,i.tZ)(y.aF,{width:16}),"Sản phẩm 100% ch\xednh h\xe3ng, mẫu m\xe3 c\xf3 thể thay đổi theo l\xf4 h\xe0ng"]})]}),(0,i.tZ)(eX,{product:r,wrapperProps:{style:{flex:1}},onAddToCart:async e=>{let{amount:t}=e;s({product:r,amount:t})},onBuyNow:async e=>{let{amount:t}=e;s({product:r,amount:t},{onSuccess:()=>{c(b.zM.getLocalisedUrl("","CART"))}})},promotionTag:n,isRevalidating:a})]})})};var ej=o(78160);let eq=(0,P.ZP)(v.xu).withConfig({componentId:"sc-834fd6b0-0"})(["background-color:",";border-radius:8px;width:100%;padding:20px 16px 12px;"],e=>e.theme.colors.white),eV=(0,P.ZP)(v.xu).withConfig({componentId:"sc-834fd6b0-1"})(["display:grid;row-gap:22px;margin-top:16px;"]),eW=e=>{let{wrapperProps:t,promotions:o}=e,r=b.D1.useTranslation(),n=b.zM.usePush();return(0,i.BX)(eq,{...t,children:[(0,i.tZ)(v.X6,{tag:"h5",isUppercase:!0,children:r({id:"productDetail.promotion.title",defaultMessage:"Khuyến m\xe3i"})}),(0,i.tZ)(eV,{children:o.filter(e=>!!e.name).slice(0,5).map((e,t)=>(0,i.tZ)(ej.wS,{promotion:e},t))}),(0,i.tZ)(v.xv,{size:"s4",wrapperProps:{tag:"div",style:{display:"flex",alignItems:"center",justifyContent:"center",padding:"22px 0 0",cursor:"pointer"},customDataProps:{onClick:()=>{n(b.zM.getLocalisedUrl("","PROMOTION"))}}},colour:"primaryBase",children:r({id:"home.popularBrands.seeAll",defaultMessage:"Xem tất cả"})})]})},eF=P.ZP.div.withConfig({componentId:"sc-ffdd8161-0"})(["background:",";padding-bottom:40px;","{padding-bottom:24px;}"],e=>{let{theme:t}=e;return t.colors.neutral50},x.M.tdDown),eY=P.ZP.div.withConfig({componentId:"sc-ffdd8161-1"})(["background:",";border-radius:8px;padding:20px;display:flex;flex-direction:column;gap:20px;","{padding:16px;border-radius:0;gap:16px;}"],e=>{let{theme:t}=e;return t.colors.white},x.M.mbDown),eK=P.ZP.div.withConfig({componentId:"sc-ffdd8161-2"})(["line-height:1.7;> *{&:not(:last-child){margin-bottom:16px;}}ul,ol{padding-left:16px;> li{margin-bottom:8px;}}ul{list-style:disc;> li{&::marker{color:",";font-size:10px;}}}ol{list-style:decimal;}table{table-layout:fixed;td *{max-width:100%;}}"],e=>{let{theme:t}=e;return t.colors.primaryBase}),eQ=e=>{var t,o,n,a;let{productDetailPage:l,viewedProducts:d,isRevalidating:s}=e,{state:{lastCategoryAccess:c}={},globalStateDispatch:v}=eE.f.useAppContext(),{isMobile:y,isDesktop:b}=eS.v.useDevice(),x=eI.D.useTranslation(),{categories:P=[]}=eE.f.useNavigationContext(),[C,T]=(0,r.useState)([]),[E,O]=(0,r.useState)([]),[S,I]=(0,r.useState)(!1);(0,r.useEffect)(()=>{setTimeout(()=>{I(!0)},500)},[]);let A=(0,r.useMemo)(()=>{let e=[],t=[],o=[],i=(r,n)=>r.map(r=>{var a;let l=r.children&&(null===(a=r.children)||void 0===a?void 0:a.length)>0;if(0===r.parentId&&(o=[],e=[]),r.parentId&&-1!==o.indexOf(r.parentId)){let t=o.indexOf(r.parentId);o=[...o.slice(0,t+1)],e=[...e.slice(0,t+1)]}if(o.push(r.id),e.push({label:r.name,value:eZ.z.getLocalisedUrl(r.fullSlug||r.slug,"CATEGORY").toString()}),r.id===n)t=[...e];else if(l)return i(r.children||[],n);if(l)return i(r.children||[],n)}),r=((null==l?void 0:l.categories)||[]).filter(e=>e.id===c);return r.length>0&&i(P,r[0].id),[{label:x({id:"breadcrumb.home",defaultMessage:"Trang chủ"}),value:eZ.z.getNewRelativeURL("","shop").toString()},...t,{label:l.name,value:""}]},[l,P,c]);return(0,r.useEffect)(()=>{(null==l?void 0:l.id)&&(eC.A.getBestSellerProducts(l.id).then(e=>{var t,o;T((null==e?void 0:null===(o=e.data)||void 0===o?void 0:null===(t=o.items)||void 0===t?void 0:t.map(eT.l.formatProduct).filter(w.$K))||[])}),eC.A.getRelatedProducts(l.id).then(e=>{var t,o;O((null==e?void 0:null===(o=e.data)||void 0===o?void 0:null===(t=o.items)||void 0===t?void 0:t.map(eT.l.formatProduct).filter(w.$K))||[])}))},[null==l?void 0:l.id]),(0,r.useEffect)(()=>{v({type:eO.M.SET_TOP_BAR_HEIGHT,payload:{topBarHeight:b?198:64}})},[b]),(0,i.BX)(eF,{children:[(0,i.tZ)("div",{className:"page-breadcrumbs-wrapper",children:(0,i.tZ)(h.E,{isDesktopPadding:!0,children:(0,i.tZ)(f.O,{size:"md",pages:A})})}),(0,i.tZ)(eH,{product:l,customDataProps:{style:{marginBottom:b?24:8,borderRadius:8}},promotionTag:l.promotionTag,isRevalidating:s}),y&&(null==l?void 0:l.isAffiliateProduct)&&(null===(t=l.affiliates)||void 0===t?void 0:t.length)?(0,i.tZ)(Z,{wrapperProps:{style:{backgroundColor:u.r.colors.white,padding:16,marginBottom:8}},affiliates:l.affiliates||[]}):null,(null==l?void 0:l.isAffiliateProduct)&&(null===(o=l.affiliates)||void 0===o?void 0:o.length)?(0,i.tZ)(eb,{affiliates:l.affiliates||[]}):null,(0,i.tZ)("div",{children:S?(0,i.BX)(i.HY,{children:[(0,i.tZ)("div",{style:{scrollMarginTop:200},id:"product-description"}),(0,i.tZ)(h.E,{noGutter:!b,children:(0,i.tZ)(g.T,{leftColumn:(0,i.BX)(eY,{children:[(0,i.tZ)(m.X,{tag:"h5",as:"h2",weight:"bold",children:x({id:"productDetailPage.productDescription",defaultMessage:"TH\xd4NG TIN SẢN PHẨM"})}),(0,i.tZ)(eK,{dangerouslySetInnerHTML:{__html:l.description.replace(/font-family:.*?;/,"")}})]}),rightColumn:(null===(n=l.promotions)||void 0===n?void 0:n.length)?b?(0,i.tZ)(eW,{promotions:l.promotions}):(0,i.tZ)(eP.q,{heading:x({id:"productDetail.promotion.title",defaultMessage:"Khuyến m\xe3i"}),items:l.promotions}):b?(0,i.tZ)(i.HY,{}):void 0,type:"sidebar-right",wrapperProps:{style:{marginBottom:b?24:8}}})}),(0,i.BX)(h.E,{noGutter:!b,children:[(0,i.tZ)(g.T,{leftColumn:(0,i.BX)(i.HY,{children:[!!(null==E?void 0:E.length)&&(0,i.tZ)(ex.N,{productRegion:"Recommendation",background:{colour:"blue50"},heading:(0,i.tZ)(ex.N.Header,{colour:"secondaryDark",children:x({id:"productDetail.relatedProducts.title",defaultMessage:"C\xd3 THỂ BẠN SẼ QUAN T\xc2M"})}),headingAlign:b?void 0:"center",showSlideArrow:!y,itemsPerPage:y?2:4,customDataProps:{style:{marginBottom:b?24:8,borderRadius:8}},children:E.map((e,t)=>(0,i.tZ)(ex.A,{product:e,customDataProps:{"data-product-region":"Recommendation"}},t))}),!!(null==C?void 0:C.length)&&(0,i.tZ)(ex.N,{productRegion:"Recommendation",background:{colour:"green50"},heading:(0,i.tZ)(ex.N.Header,{colour:"secondaryDark",children:x({id:"productDetail.brand.bestSellers",defaultMessage:"SẢN PHẨM B\xc1N CHẠY CỦA THƯƠNG HIỆU {brand}"},{brand:null===(a=l.brand)||void 0===a?void 0:a.name})}),customDataProps:{style:{marginBottom:b?24:8,borderRadius:8}},showSlideArrow:!y,itemsPerPage:y?2:4,children:C.map((e,t)=>(0,i.tZ)(ex.A,{product:e,customDataProps:{"data-product-region":"Recommendation"}},t))})]}),rightColumn:b?(0,i.tZ)(i.HY,{}):null,type:"sidebar-right"}),!!(null==d?void 0:d.length)&&(0,i.tZ)(ex.N,{productRegion:"Recently View",heading:(0,i.tZ)(ex.N.Header,{colour:"secondaryDark",children:x({id:"productDetail.viewedProducts",defaultMessage:"SẢN PHẨM Đ\xc3 XEM"})}),itemsPerPage:y?2:6,isDesktopPadding:!0,customDataProps:{style:{borderRadius:8}},showSlideArrow:!y,children:d.map((e,t)=>(0,i.tZ)(ex.A,{product:e,customDataProps:{"data-product-region":"Recently View"}},t))})]})]}):(0,i.BX)(h.E,{noGutter:!b,children:[(0,i.tZ)(p.O,{radius:y?"xs":"lg",width:"100%",height:"100vh"}),(0,i.tZ)("div",{style:{display:"none"},children:l.description})]})})]})};var e$=o(75713),eJ=o(5627),e0=o(19695),e1=o(50854);let e2=l()(()=>o.e(4184).then(o.bind(o,24184)).then(e=>e.ProductImageCarouselPopup),{loadableGenerated:{webpack:()=>[24184]},ssr:!1}),e8=e=>{var t,o,n,a,l,d;let{navigation:u,productDetailPage:p,isRevalidating:h}=e,{query:m,locale:g}=eZ.z.useRouter(),{state:f,globalStateDispatch:v}=eE.f.useAppContext(),{data:y}=(0,e0.P)(),b=eI.D.useTranslation(),[x,P]=(0,r.useState)([]),C=e1.r.getCanonicalUrl(m.slug),T=async e=>{try{return await eC.A.trackViewedProduct(e)}catch(e){console.log(e)}};(0,r.useEffect)(()=>{if(void 0===y)return;let e=JSON.parse(localStorage.getItem("viewedProducts")||"[]");if(P(e||[]),null==p?void 0:p.id){if(null==y?void 0:y.id)e.length>0?T(e.map(e=>e.id).concat(p.id)):T([p.id]),eC.A.getViewedProduct().then(e=>{var t,o;(null==e?void 0:null===(o=e.data)||void 0===o?void 0:null===(t=o.items)||void 0===t?void 0:t.length)&&P(e.data.items.map(eT.l.formatProduct).filter(w.$K))}),localStorage.removeItem("viewedProducts");else{let t={id:p.id,price:p.price,thumbnail:p.thumbnail,name:p.name,averageRating:p.averageRating,reviewsCount:p.reviewsCount,tag:p.tag,sku:p.sku,slug:p.slug,tags:p.tags,images:p.images,unit:p.unit,brand:p.brand,description:p.description,categories:p.categories,isInStock:p.isInStock,isAffiliateProduct:p.isAffiliateProduct,affiliates:p.affiliates};if(e.length>0){let t=e.findIndex(e=>e.id==p.id);t>-1&&e.splice(t,1)}localStorage.setItem("viewedProducts",JSON.stringify([t,...e]))}}},[p,y]);let[E,O]=(0,r.useState)(!1);(0,r.useEffect)(()=>{f.components.imageCarousel.isOpen&&O(!0)},[f.components.imageCarousel.isOpen]);let Z=!!(null==p?void 0:p.campaignBanner);return(0,i.tZ)(e$.o,{pageTitle:b({id:"product.detail.page.title",defaultMessage:"Trang sản phẩm"}),navigation:u,SEOData:{canonicalUrl:C,SEOTitle:(null==p?void 0:p.metaTitle)||b({id:"product.detail.seo.title",defaultMessage:"Mua Sản phẩm {productName} chỉ với {productPrice} - Cửa h\xe0ng {site}"},{productName:null==p?void 0:p.name,productPrice:null==p?void 0:p.name,site:(null===(t=eM.CX[g])||void 0===t?void 0:t.SITE_NAME_FORMATTED)||""}),SEODescription:(null==p?void 0:p.metaDescription)||b({id:"product.detail.seo.description",defaultMessage:"Mua h\xe0ng {productName} từ {site} - Thanh to\xe1n khi nhận h\xe0ng, Miễn ph\xed vận chuyển & Đảm bảo gi\xe1 tốt nhất!"},{productName:null==p?void 0:p.name,site:(null===(o=eM.CX[g])||void 0===o?void 0:o.SITE_NAME_FORMATTED)||""}),schemaData:(null===(a=eM.X1[g])||void 0===a?void 0:null===(n=a.PRODUCT_DETAIL)||void 0===n?void 0:n.call(a,p))||"",customMetaData:[{name:"keywords",content:(null==p?void 0:p.metaKeywords)||""}]},children:(0,i.BX)(c.Z,{children:[E&&(0,i.tZ)(e2,{isOpen:f.components.imageCarousel.isOpen&&!!(null===(l=f.components.imageCarousel.images)||void 0===l?void 0:l.length),defaultCurrentImageIndex:f.components.imageCarousel.defaultCurrentImageIndex,images:(null===(d=f.components.imageCarousel)||void 0===d?void 0:d.images)||[],onClose:()=>v({type:eO.M.SET_CAROUSEL_IMAGE_POPUP,payload:{imageCarousel:{isOpen:!1}}})}),(0,i.tZ)(eQ,{productDetailPage:p,viewedProducts:x,isRevalidating:h},p.id),Z&&(0,i.tZ)(s,{})]})})};var e3=!0,e4=e=>{let{productDetailPage:t,...o}=e,{query:a,replace:l,asPath:d}=eZ.z.useRouter(),s=(null==a?void 0:a.slug)?"string"==typeof a.slug?a.slug:Array.isArray(a.slug)?a.slug[a.slug.length-1]:"":"",[c,u]=(0,r.useState)(null);return((0,r.useEffect)(()=>{(async()=>{var e;let t=await eJ.l.getProductDetailPageData(s);if(!(null==t?void 0:null===(e=t.data)||void 0===e?void 0:e.id))return l("/404",d);u(eT.l.formatProductDetailPage(null==t?void 0:t.data))})()},[s]),null==t?void 0:t.id)?(0,i.tZ)(e8,{productDetailPage:t,...o,isRevalidating:null===c}):(0,i.tZ)(n.f,{visible:!0,zIndex:1e3,radius:"sm",overlayBlur:2})}}},function(e){e.O(0,[2551,9377,2353,2248,170,479,7266,9268,2354,2888,9774,179],function(){return e(e.s=32310)}),_N_E=e.O()}]);