PageSourceSearch

https://sinkacementhai.com/_nuxt/CALib0hx.js

js sinkacementhai.com collected 2026-10-07 14:03:07 UTC 133,754 bytes, 3 lines download raw bytes

1const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./imCn584C.js","./B2zKXTBA.js","./entry.UUjPkztF.css","./qMY4fZTP.js","./CGUmEm0-.js","./dI2MIuqT.js","./DVM2JZjn.js","./EbjQvVL7.js","./DzZpQlCu.js","./CvHlSjEk.js","./CYpY1rdy.js","./Slideitem2.DqmKIOmu.css","./swiper.BiEk7v8n.css","./free-mode.BlRuW1W2.css","./style.BAByb4R1.css"])))=>i.map(i=>d[i]);
2import{c as a,d as r,e as l,k as _,a3 as Nl,_ as ql,D as Wa,b as Ot,u as Rl,C as zl,H as S,r as f,n as p,g as e,t as i,p as ke,K as U,I as Y,F as M,m as P,J as j,j as pe,L as Fl,U as Ft,z as Il,w as G,B as zr,a as Fr,s as qt,A as Or,E as Ur,W as Vr,o as Hr,P as Rt,a1 as Ua,aj as Zr,O as Dl,f as V,h as Fe,i as Oe,q as Yr,M as Qr,ak as Wr,X as Kr,Z as Va,x as Gr,y as Jr,a0 as Xr}from"./B2zKXTBA.js";import{_ as en,r as tn,a as ln,b as on,L as Ha}from"./Ch0EpK31.js";import{N as sn,F as Ka,G as Ga}from"./qMY4fZTP.js";import{a as Ut,S as Vt}from"./dI2MIuqT.js";/* empty css        *//* empty css        *//* empty css        */import{d as ue}from"./EbjQvVL7.js";import{u as Ol}from"./DzZpQlCu.js";import{u as Ul}from"./CvHlSjEk.js";import{u as Vl}from"./CYpY1rdy.js";import{P as El}from"./2P1o65v3.js";import{u as an,_ as rn}from"./D3jaoC2q.js";import{f as nn,l as un}from"./BZMgn1tg.js";import{a as cn,o as zt}from"./Bh5aEbH8.js";import{_ as Za}from"./DVIwSnz0.js";import{u as dn}from"./BcYNfpLH.js";import{u as pn,a as vn,m as Ya}from"./D1LOZJ4s.js";import{r as Qa}from"./oXBlr1P8.js";import{r as _n}from"./gTDIn4Kz.js";import"./DVM2JZjn.js";import"./CGUmEm0-.js";function fn(E,J){return a(),r("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true","data-slot":"icon"},[l("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M15.75 19.5 8.25 12l7.5-7.5"})])}function xn(E,J){return a(),r("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true","data-slot":"icon"},[l("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"m8.25 4.5 7.5 7.5-7.5 7.5"})])}const mn=""+new URL("twitter.CPWSm0NQ.png",import.meta.url).href,hn={key:0,class:"fixed inset-0 z-50 flex items-center justify-center bg-black/60 px-2"},bn={class:"bg-white shadow-xl rounded-lg relative w-80 md:w-150 max-h-[90vh] overflow-auto"},gn={__name:"DetailBundleModal",props:{visible:Boolean,canClose:{type:Boolean,default:!0}},setup(E){return(J,X)=>E.visible?(a(),r("div",hn,[l("div",bn,[E.canClose?(a(),r("button",{key:0,class:"cursor-pointer absolute top-2 right-2 text-gray-500 hover:text-black",onClick:X[0]||(X[0]=v=>J.$emit("close"))}," ✖ ")):_("",!0),Nl(J.$slots,"default")])])):_("",!0)}},yn={key:2,class:"flex gap-3 mb-4"},wn=["onClick"],kn=["onClick"],Cn={class:"relative bg-white w-full h-full",style:{"align-items":"center","justify-items":"center"}},$n={class:"w-[158px] h-[158px] md:w-[183px] md:h-[183px] lg:w-[183px] lg:h-[183px] flex items-center justify-center overflow-hidden mx-auto"},Sn=["src","alt"],jn={key:0,class:"absolute inset-0 bg-black/70 flex items-center justify-center cursor-pointer rounded-t"},Mn={class:"absolute bottom-[2px] xl:bottom-[4px] left-[2px] xl:left-[4px] flex gap-[2px]"},An={key:0,class:"cursor-pointer text-white transition-all duration-200 flex items-center justify-center overflow-hidden h-[26px] min-w-[26px]"},Tn=["src"],Ln=["src"],Bn=["src"],Pn=["onClick"],In={class:"p-4 flex-grow flex flex-col justify-between"},Dn={href:"#",class:"items-start gap-2"},En={key:0},Nn={key:1},qn={__name:"SlideBundleDeals",props:{productlist:{type:[Array,Object],required:!0},href:{type:String},title:{type:String,default:""},counter:{type:Object,required:!0},modules:{type:Array,default:()=>[]},category:{type:Boolean,default:!1},head:{type:Boolean,default:!1},underline:{type:Boolean,default:!1}},setup(E){const J=Wa(),X=Ot("auth_token"),v=Ol(),at=Ul(),A=Rl(),Ee=zl(),Ce=Vl(),O=E,ae=S(()=>!Array.isArray(O.productlist)),oe=S(()=>ae.value?Object.keys(O.productlist):[]),Te=f(oe.value[0]||null),fe=S(()=>ae.value?O.productlist[Te.value]||[]:O.productlist),Ne=N=>Ce.getButtonTypeForNormalCard(N);async function rt(N){await Ce.clearPayload(),Ee.push(N)}const $e=N=>
2Number(N).toLocaleString("en-US",{minimumFractionDigits:2,maximumFractionDigits:2});async function y(N){if(X.value)await at.setAddToCart(N);else return v.open(),null}function yt(N){let T=J.query.status_product||O.title||"";T==="สินค้ามาใหม่"?T="สินค้าใหม่":T==="พรีออเดอร์จัดส่งใน 7 - 14 วัน"&&(T="สินค้าพรีออเดอร์"),Ee.push({path:"/products/detail",query:{product_id:N.id,category_id:J.query.category_id||"",category:O.title||"",status_product:T}}).then(()=>{location.reload()})}async function qe(){if(A.canShowContactStaff)if(X.value)A.trickerContactStaff(!0);else return v.open(),null}const Ue=()=>{window.open("https://page.line.me/scghomeboon.ub","_blank")};return(N,T)=>{const b=Fl;return a(),r("div",null,[E.head?(a(),r("span",{key:0,class:"flex justify-between items-center pt-[8px] md:pt-[10px] lg:pt-[5px] xl:pt-[1px] font-bold",style:p({borderColor:e(A).divider_color})},[l("h2",{class:"!text-[16px] md:!text-[18px] xl:!text-[32px]",style:p({color:e(A).color})},i(E.title),5),E.href?(a(),ke(b,{key:0,to:E.href,onClick:T[0]||(T[0]=k=>rt(E.href)),class:"text-blue-500 underline text-[14px] pt-[5px] md:text-[16px] md:pt-[8px] lg:pt-[10px] font-bold underline-offset-6",style:p({color:e(A).color})},{default:U(()=>T[2]||(T[2]=[Y(" ดูสินค้าทั้งหมด ")])),_:1},8,["to","style"])):_("",!0)],4)):_("",!0),E.underline?(a(),r("hr",{key:1,class:"h-[1px] mt-2 w-full",style:p({borderColor:e(A).underline_color})},null,4)):_("",!0),ae.value?(a(),r("div",yn,[(a(!0),r(M,null,P(oe.value,k=>(a(),r("button",{key:k,onClick:u=>Te.value=k,class:j(["px-4 py-1 border rounded hover:bg-gray-100",{"bg-blue-100":k===Te.value}])},i(k),11,wn))),128))])):_("",!0),fe.value?(a(),ke(e(Vt),{key:3,modules:E.modules,pagination:{el:".swiper-pagination",clickable:!0},slidesPerView:"auto",spaceBetween:16,"slides-per-group":2,class:"mySwiper"},{default:U(()=>[(a(!0),r(M,null,P(fe.value.slice(0,10),k=>(a(),ke(e(Ut),{key:k.id,class:"mt-10 !w-[158px] !h-[296px] md:!w-[183px] md:!h-[321px] xl:!w-[183px] xl:!h-[321px] shadow hover:shadow-md overflow-hidden rounded-lg"},{default:U(()=>{var u,Q;return[l("div",null,[l("div",{onClick:Ve=>yt(k),class:"block relative overflow-hidden w-full bg-gray-100 cursor-pointer"},[l("div",Cn,[l("div",{class:j(["absolute top-2 left-2 text-white text-xs font-bold px-2 py-1 rounded z-10",{invisible:k.discount_percent==="0%"}]),style:p({backgroundColor:e(A).discount_bg})}," - "+i(k.discount_percent),7),l("div",$n,[l("img",{src:(u=k.original_path)!=null&&u[0]?k.original_path[0]:(Q=k.images_URL)!=null&&Q[0]?k.images_URL[0]:e(ue),alt:k.name,class:"max-w-full max-h-full object-contain",style:{"object-fit":"contain","aspect-ratio":"1 / 1"}},null,8,Sn)]),k.stock<=0?(a(),r("div",jn,T[3]||(T[3]=[l("span",{class:"text-white text-xl font-bold"},"สินค้าหมด",-1)]))):_("",!0),l("div",Mn,[(k==null?void 0:k.message_status)==="new"?(a(),r("div",An,[l("img",{src:e(sn),alt:"NewIcon",style:{width:"26px",height:"26px"}},null,8,Tn)])):_("",!0),Number(k==null?void 0:k.sold)>0?(a(),r("div",{key:1,style:p({backgroundColor:e(A).bg_fire}),class:"h-[26px] w-[28px] flex items-center justify-center rounded-sm overflow-hidden"},[l("img",{src:e(Ka),alt:"FireIcon",class:"w-full h-full object-cover"},null,8,Ln)],4)):_("",!0),(k==null?void 0:k.get_free_product)=="Y"?(a(),r("div",{key:2,style:p({backgroundColor:e(A).bg_gift}),class:"cursor-pointer text-white shadow transition-all duration-200 rounded-sm flex items-center justify-center overflow-hidden h-[26px] w-[28px]"},[l("img",{src:e(Ga),alt:"GiftIcon",class:"w-full h-full object-cover"},null,8,Bn)],4)):_("",!0)]),Ne(k)==="add_to_cart"?(a(),r("button",{key:1,onClick:pe(Ve=>y(k),["stop"]),style:p({backgroundColor:e(A).color}),class:"absolute bottom-[8px] right-[8px] cursor-pointer text-white shadow transition-all duration-200 rounded-full flex items-center justify-center overflow-hidden group h-[40px] min-w-[40px] px-[10px]"},T[4]||(T[4]=[l("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"3",stroke:"currentColor",class:"w-4 h-4 text-white"},[l("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M12 4.5v15m7.5-7.5h-15"}
2)],-1),l("span",{class:"!text-[16px] hidden md:block max-w-0 opacity-0 scale-90 group-hover:max-w-[150px] group-hover:opacity-100 group-hover:scale-100 transition-all duration-100 ease-in-out whitespace-nowrap overflow-hidden"}," เพิ่มสินค้า ",-1)]),12,Pn)):Ne(k)==="contact_staff"?(a(),r("button",{key:2,onClick:[T[1]||(T[1]=pe(Ve=>qe(),["stop"])),Ue],style:p({backgroundColor:e(A).color}),class:"absolute bottom-2 right-2 text-white shadow rounded-full flex items-center justify-center cursor-pointer overflow-hidden group transition-all duration-100 ease-in-out hover:w-[130px] w-[40px] h-[40px] md:min-w-[36px] xl:min-w-[40px] md:px-[10px]"},T[5]||(T[5]=[l("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"3",stroke:"currentColor",class:"w-4 h-4 text-white transition-opacity duration-100 group-hover:opacity-0"},[l("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M12 4.5v15m7.5-7.5h-15"})],-1),l("span",{class:"!text-[16px] absolute opacity-0 group-hover:opacity-100 transition-opacity duration-100 whitespace-nowrap"}," ติดต่อร้านค้า ",-1)]),4)):_("",!0)])],8,kn),l("div",In,[l("a",Dn,[l("p",{class:"mb-2 text-xs md:text-sm font-medium overflow-hidden text-ellipsis leading-[24px] xl:leading-[26px] line-clamp-2 min-h-[55px] max-xl:min-h-[50px] max-md:min-h-[40px]",style:p({color:e(A).black})},[(k==null?void 0:k.bundle_deal)==="Y"?(a(),r("span",{key:0,class:"md:inline-flex xl:inline-flex inline-block text-[10px] font-bold items-center justify-center w-[91px] h-[22px] rounded-full text-white align-text-bottom",style:p({background:`linear-gradient(150deg, ${e(A).bundle_color1}, ${e(A).bundle_color2})`})},T[6]||(T[6]=[l("span",{class:""},"โปรสุดคุ้ม",-1)]),4)):_("",!0),Y(" "+i(k.name),1)],4)]),k.vat_default!=="yes"?(a(),r("div",En,[l("p",{style:p({color:e(A).price_red}),class:"capitalize font-semibold text-[16px] mb-2"}," ฿"+i($e(k.real_price)),5),l("p",{style:p({color:e(A).main_gray_cl}),class:j(["capitalize line-through text-[12px] xl:text-sm",k.fake_price>k.real_price?"":"invisible"])}," ฿"+i($e(k.fake_price)),7)])):k.vat_default==="yes"?(a(),r("div",Nn,[l("p",{style:p({color:e(A).price_red}),class:"capitalize font-semibold text-[16px] xl:text-[20px] mb-2"}," ฿"+i($e(k.net_price)),5),l("p",{style:p({color:e(A).main_gray_cl}),class:j(["capitalize line-through text-[12px] xl:text-sm",k.fake_price>k.net_price?"":"invisible"])}," ฿"+i($e(k.fake_price)),7)])):_("",!0)])])]}),_:2},1024))),128)),T[7]||(T[7]=l("div",{class:"swiper-pagination best-swiper"},null,-1))]),_:1},8,["modules"])):_("",!0)])}}},Rn=ql(qn,[["__scopeId","data-v-0965da4f"]]),zn={key:1,class:"border-b border-[#D1D1D1]"},Fn={class:"flex","aria-label":"Tabs"},On=["onClick"],Un={class:"w-[180px] h-[306px] xl:w-[252px] xl:h-[386px] shadow hover:shadow-md"},Vn=["onMouseenter","onMouseleave","onClick"],Hn={key:0,class:"absolute w-full h-full max-xl:hidden flex justify-center items-center bg-[#29292980] z-2"},Zn=["onClick"],Yn={key:1,class:"absolute w-full h-full max-xl:hidden flex justify-center items-center bg-[#29292980] z-2"},Qn={class:"py-[8px] px-[24px] bg-white rounded-full cursor-pointer"},Wn={class:"relative bg-white w-full h-full px-[1px]"},Kn=["src","alt"],Gn={key:0,class:"absolute inset-0 bg-black/70 flex items-center justify-center cursor-pointer rounded-t"},Jn={class:"absolute top-2 left-2 flex gap-[2px]"},Xn={key:0,class:"text-white px-2 py-1 bg-[#2E8B57] flex items-center justify-center rounded-[4px]"},ei={class:"absolute bottom-[2px] xl:bottom-[4px] left-[2px] xl:left-[4px] flex gap-[2px]"},ti=["src"],li=["src"],oi={class:"py-4 px-3 flex-grow flex flex-col justify-between"},si=["onClick"],ai={key:0},ri={key:1},ni={__name:"Slideitem3",props:{productlist:{type:[Array,Object],required:!0},href:{type:String},title:{type:String,default:""},counter:{type:Object,required:!0},modules:{type:Array,default:()=>[]},category:{type:Boolean,default:!1},head:{type:Boolean,default:!1},underline:{type:Boolean,default:!1},gotTab:{type:Boolean,default:!1}},setup(E){const J=Wa(),X=Ot("auth_token"),v=Ol(),at=Ul(),A=Rl(),Ee=f([]),Ce=zl(),O=Vl(),ae=E,oe=f("gold"),Te=f([{name:"gold",label:"ทองคำ"},{name:"silver",label:"โลหะเงิน"}]),fe=S(()=>!Array.isArray(ae.productlist)),Ne=S(()=>fe.value?Object.keys(ae.productlist):[]),rt=f(Ne.value[0]||null),$e=S(()=>
2{if(ae.gotTab){const T=Te.value.find(k=>k.name===oe.value);if(!T)return[];const b=T.label;return ae.productlist.filter(k=>k.category_name===b).slice(0,10)}else return fe.value?ae.productlist[rt.value]||[]:ae.productlist.slice(0,10)}),y=T=>O.getButtonTypeForNormalCard(T);async function yt(T){await O.clearPayload(),Ce.push(T)}const qe=T=>Number(T).toLocaleString("en-US",{minimumFractionDigits:2,maximumFractionDigits:2});async function Ue(T){if(X.value)await at.setAddToCart(T);else return v.open(),null}function N(T){let b=J.query.status_product||ae.title||"";b==="สินค้ามาใหม่"?b="สินค้าใหม่":b==="พรีออเดอร์จัดส่งใน 7 - 14 วัน"&&(b="สินค้าพรีออเดอร์"),Ce.push({path:"/products/detail",query:{product_id:T.id,category_id:J.query.category_id||"",category:ae.title||"",status_product:b}}).then(()=>{location.reload()})}return(T,b)=>{const k=Fl;return a(),r("div",null,[E.head?(a(),r("span",{key:0,class:"flex justify-between items-center py-4 font-bold",style:p({borderColor:e(A).divider_color})},[l("h2",{class:"!text-[16px] md:!text-[24px] xl:!text-[32px]",style:p({color:e(A).color})},i(E.title),5),E.href?(a(),ke(k,{key:0,to:E.href,onClick:b[0]||(b[0]=u=>yt(E.href)),class:"text-blue-500 underline underline-offset-6 text-[14px] pt-[5px] md:text-[16px] md:pt-[8px] lg:pt-[10px] font-bold",style:p({color:e(A).color})},{default:U(()=>b[1]||(b[1]=[Y(" ดูสินค้าทั้งหมด ")])),_:1},8,["to","style"])):_("",!0)],4)):_("",!0),E.gotTab?(a(),r("div",zn,[l("nav",Fn,[(a(!0),r(M,null,P(Te.value,u=>(a(),r("button",{key:u.name,onClick:Q=>oe.value=u.name,class:j(["whitespace-nowrap px-4 py-[8px] xl:px-4 xl:py-[18px] border-b-2 font-medium text-base",oe.value===u.name?`border-[${e(A).color}] text-[${e(A).color}]`:"border-transparent text-[#343434] hover:text-gray-700 hover:border-gray-300"])},i(u.label),11,On))),128))])])):_("",!0),$e.value?(a(),ke(e(Vt),{key:2,modules:E.modules,pagination:{el:".swiper-pagination",clickable:!0},slidesPerView:"auto","slides-per-group":3,spaceBetween:12,class:"mySwiper"},{default:U(()=>[(a(!0),r(M,null,P($e.value,u=>(a(),ke(e(Ut),{key:u.id,class:"mt-10 max-w-[180px] max-h-[306px] xl:max-w-[252px] xl:max-h-[386px] shadow hover:shadow-md overflow-hidden rounded-lg"},{default:U(()=>{var Q,Ve;return[l("div",Un,[l("a",{class:"block relative overflow-hidden w-full bg-gray-100",onMouseenter:vt=>Ee.value[u.id]=!0,onMouseleave:vt=>Ee.value[u.id]=!1,onClick:vt=>N(u)},[Ee.value[u.id]&&u.stock>0&&y(u)==="add_to_cart"?(a(),r("div",Hn,[l("button",{class:"py-[8px] px-[24px] bg-white rounded-full cursor-pointer",onClick:pe(vt=>Ue(u),["stop"])},[l("p",{class:"text-[16px] font-bold leading-[24px]",style:p({color:e(A).color})},"เพิ่มสินค้า",4)],8,Zn)])):_("",!0),Ee.value[u.id]&&u.stock>0&&y(u)==="contact_staff"?(a(),r("div",Yn,[l("button",Qn,[l("p",{class:"text-[16px] font-bold leading-[24px]",style:p({color:e(A).color})},"ติดต่อร้านค้า",4)])])):_("",!0),l("div",Wn,[l("img",{class:"w-full xl:max-h-[240px] object-contain",src:(Q=u.original_path)!=null&&Q[0]?u.original_path[0]:(Ve=u.images_URL)!=null&&Ve[0]?u.images_URL[0]:e(ue),alt:u.name},null,8,Kn),u.stock<=0?(a(),r("div",Gn,b[2]||(b[2]=[l("span",{class:"text-white text-xl font-bold"},"สินค้าหมด",-1)]))):_("",!0),l("div",Jn,[(u==null?void 0:u.message_status)==="new"?(a(),r("div",Xn,b[3]||(b[3]=[l("p",{class:"text-[14px] leading-[24px] font-bold tracking-[0.5px]"},"สินค้าใหม่",-1)]))):_("",!0),l("div",{class:j(["text-white text-sm font-bold px-2 py-1 rounded z-10 leading-[24px] tracking-[0.5px]",{invisible:u.discount_percent==="0%"}]),style:p({backgroundColor:e(A).discount_bg})}," - "+i(u.discount_percent),7)]),l("div",ei,[Number(u==null?void 0:u.sold)>0?(a(),r("div",{key:0,style:p({backgroundColor:e(A).bg_fire}),class:"h-[26px] w-[28px] flex items-center justify-center rounded-sm overflow-hidden"},[l("img",{src:e(Ka),class:"w-full h-full object-cover",alt:"img"},null,8,ti)],4)):_("",!0),(u==null?void 0:u.get_free_product)=="Y"?(a(),r("div",{key:1,style:p({backgroundColor:e(A).bg_gift}),class:"cursor-pointer text-white transition-all duration-200 rounded-sm flex items-center justify-center overflow-hidden h-[26px] w-[28px]"},[l("img",{src:e(Ga),style:{width:"28px",height:"26px"},alt:"img"},null,8,li)],4)):_("",!0)])])],40,Vn),l("div",oi,[l("a",{onClick:vt=>N(u)},[l("h3",null,[l("p",{class:"mb-2 text-[12px] md:text-[14px] xl:text-[16
2px] text-left font-medium text-wrap-double min-h-[2.2rem] md:min-h-[2.7rem] xl:min-h-[3rem] cursor-pointer",style:p({color:e(A).text_color2})},i(u.name),5)])],8,si),u.vat_default!=="yes"?(a(),r("div",ai,[l("p",{style:p({color:Number(u.fake_price)>Number(u.real_price)?e(A).price_red:e(A).color}),class:"capitalize font-semibold text-[16px] xl:text-[18px] mb-2 text-left"}," ฿ "+i(qe(u.real_price)),5),l("p",{style:p({color:e(A).main_gray_cl}),class:j(["capitalize line-through text-[12px] xl:text-sm text-left",Number(u.fake_price)>Number(u.real_price)?"":"invisible"])}," ฿ "+i(qe(u.fake_price)),7)])):u.vat_default==="yes"?(a(),r("div",ri,[l("p",{style:p({color:Number(u.fake_price)>Number(u.net_price)?e(A).price_red:e(A).color}),class:"capitalize font-semibold text-[16px] xl:text-[18px] mb-2 text-left"}," ฿ "+i(qe(u.net_price)),5),l("p",{style:p({color:e(A).main_gray_cl}),class:j(["capitalize line-through text-[12px] xl:text-sm text-left",Number(u.fake_price)>Number(u.net_price)?"":"invisible"])}," ฿ "+i(qe(u.fake_price)),7)])):_("",!0)])])]}),_:2},1024))),128)),b[4]||(b[4]=l("div",{class:"swiper-pagination"},null,-1))]),_:1},8,["modules"])):_("",!0)])}}},ii=ql(ni,[["__scopeId","data-v-cd070c60"]]),ui={class:"absolute right-0 top-0 w-full sm:w-[600px] h-full bg-white shadow-xl z-50 flex flex-col"},ci={class:"flex justify-between items-center p-6 border-b"},di={class:"flex gap-1"},pi={class:"text-xl font-bold"},vi={class:"flex-1 overflow-y-auto px-6 pt-10 pb-6"},_i={class:"px-8 py-6 border-t"},fi={__name:"SidebarReview",props:{isOpen:Boolean,title:String,onClose:Function,canClose:Boolean},setup(E){return(J,X)=>(a(),ke(Ft,{name:"slide"},{default:U(()=>[E.isOpen?(a(),r("div",{key:0,class:"fixed inset-0 bg-black/60 z-40",onClick:X[1]||(X[1]=pe((...v)=>E.onClose&&E.onClose(...v),["self"]))},[l("div",ui,[l("div",ci,[l("div",di,[X[2]||(X[2]=l("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor",class:"size-6"},[l("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M6 13.5V3.75m0 9.75a1.5 1.5 0 0 1 0 3m0-3a1.5 1.5 0 0 0 0 3m0 3.75V16.5m12-3V3.75m0 9.75a1.5 1.5 0 0 1 0 3m0-3a1.5 1.5 0 0 0 0 3m0 3.75V16.5m-6-9V3.75m0 3.75a1.5 1.5 0 0 1 0 3m0-3a1.5 1.5 0 0 0 0 3m0 9.75V10.5"})],-1)),l("h2",pi,i(E.title),1)]),E.canClose?(a(),r("button",{key:0,onClick:X[0]||(X[0]=(...v)=>E.onClose&&E.onClose(...v)),class:"text-black text-xl cursor-pointer"}," × ")):_("",!0)]),l("div",vi,[Nl(J.$slots,"default")]),l("div",_i,[Nl(J.$slots,"footer")])])])):_("",!0)]),_:3}))}},xi={class:"full-width-bg bg-white"},mi={class:"mx-auto md:max-w-[820px] xl:max-w-[1440px] w-full min-h-[70vh] text-black text-left justify-center pb-2"},hi={class:"flex justify-between p-8 pb-4"},bi={class:"font-bold text-base xl:text-[18px]"},gi={class:"px-[30px] py-[20px] flex justify-center"},yi={class:"w-full max-w-[500px] border-collapse shadow rounded overflow-hidden"},wi={class:"font-light w-1/2 text-center p-4 text-[12px] md:text-[14px]"},ki={class:"font-light w-1/2 text-center p-4 text-[12px] md:text-[14px]"},Ci={class:"border-b border-[#D1D1D1]"},$i={class:"text-center p-4 font-bold text-[12px] md:text-[14px]"},Si={class:"text-center p-4 font-bold text-[12px] md:text-[14px]"},ji={class:"flex justify-between p-8 pb-4"},Mi={class:"font-bold text-base xl:text-[18px]"},Ai={class:"px-[30px] py-[20px] flex justify-center overflow-y-auto max-h-90"},Ti={class:"w-full max-w-[500px] border-collapse shadow rounded overflow-hidden"},Li={class:"font-light w-1/2 text-center p-4 text-[12px] md:text-[14px]"},Bi={class:"font-light w-1/2 text-center p-4 text-[12px] md:text-[14px]"},Pi={class:"border-b border-[#D1D1D1]"},Ii={class:"text-center p-4 font-bold text-[12px] md:text-[14px]"},Di={class:"text-center p-4 font-bold text-[12px] md:text-[14px]"},Ei={class:"flex justify-between p-8 pb-4"},Ni={class:"font-bold text-base xl:text-[18px]"},qi={class:"px-6 py-4 md:px-[32px] md:py-[24px]"},Ri={class:"flex gap-4 mb-4"},zi=["src"],Fi={class:"font-bold text-[14px] text-[#343434]"},Oi={class:"flex mt-2"}
2,Ui={key:0,xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",class:"w-4 h-4",viewBox:"0 0 16 16"},Vi={key:1,xmlns:"http://www.w3.org/2000/svg",class:"w-4 h-4 text-gray-300",viewBox:"0 0 24 24",fill:"currentColor"},Hi={class:"mt-2 text-[14px] break-all text-[#343434] mb-6"},Zi={class:"w-[279px] h-[330px] md:w-[436px] xl:w-[616px] xl:h-[338px] rounded-lg overflow-hidden mb-4 flex justify-center bg-[#D1D1D1]"},Yi=["src"],Qi=["src"],Wi={class:"flex gap-4 overflow-x-auto flex-nowrap pb-2"},Ki=["onClick"],Gi=["src"],Ji=["src"],Xi={class:"absolute bottom-0 left-0 right-0 bg-black/40 px-1 py-0.5 flex items-center justify-between"},eu={class:"text-white text-xs"},tu={class:"font-bold text-base xl:text-[18px]"},lu={class:"rounded-lg border border-[#F5F5F5] mx-8 my-10 overflow-hidden"},ou={class:""},su={class:"text-xs md:text-sm"},au={class:"font-normal w-1/2 text-center p-4 rounded-tl-lg"},ru={class:"font-normal w-1/2 text-center p-4 rounded-tr-lg"},nu={key:0},iu={class:"text-center p-4"},uu={class:"text-center p-4"},cu={class:"flex-col gap-8 w-full"},du={class:"mb-4"},pu={class:"right-0 z-10 mt-2 border border-gray-300 bg-white rounded-lg shadow-md max-h-[200px] overflow-y-auto w-full"},vu={key:0,class:"text-[14px] text-[#343434] mt-2"},_u={class:"right-0 z-10 mt-2 border border-gray-300 bg-white rounded-lg shadow-md max-h-[200px] overflow-y-auto w-full"}
vendor: 4,324 bytes, line 2
2,fu=["onClick"],xu={key:0,xmlns:"http://www.w3.org/2000/svg",class:"w-4 h-4 text-white",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"3"},mu={key:0,class:"mt-2"},hu={key:0},bu={key:0,class:"flex gap-4"},gu={key:1,class:"w-full"},yu={class:"flex flex-nowrap items-center gap-2 py-5 mx-6 xl:mx-40 overflow-hidden"},wu={class:"shrink-0"},ku={href:"/",class:"hover:underline"},Cu={class:"shrink-0 max-w-[160px]"},$u={class:"shrink-0 max-w-[160px]"},Su={class:"flex-1 min-w-0"},ju=["title"],Mu={class:"flex flex-col md:flex-row gap-8 xl:gap-20 px-6 md:px-8 xl:px-40 justify-center max-md:items-center"},Au={key:0,class:"relative flex flex-col items-center w-full md:w-[45%] xl:w-[40%]"},Tu=["src"],Lu=["src"],Bu={key:2,class:"relative w-full max-w-md"},Pu={key:0,class:"absolute inset-0 bg-black/70 flex items-center justify-center rounded-xl z-2"},Iu={class:"text-white text-xl font-bold"},Du={key:1,class:"absolute inset-0 bg-black/70 flex items-center justify-center rounded-xl"},Eu={class:"text-white text-xl font-bold"},Nu={class:"relative"},qu=["src"],Ru=["src"],zu={class:"relative flex items-center w-[350px] md:w-[327px] xl:w-[442px] mt-8"},Fu=["disabled"],Ou=["src","onClick"],Uu=["disabled"],Vu={key:1,class:"relative flex flex-col items-center"},Hu={class:"relative w-full max-w-md"},Zu=["src"],Yu={class:"w-full"},Qu={class:"flex items-center flex-wrap gap-2 md:gap-3"},Wu={key:1,class:"flex items-center justify-between gap-2 md:gap-3 my-2"},Ku={class:"text-sm font-bold"},Gu={class:"flex items-start justify-between gap-2 md:gap-3"},Ju={class:"w-full min-w-0"},Xu={class:"!text-xl md:!text-xl xl:!text-[32px] font-bold break-all whitespace-normal"},ec=["title"],tc={class:"flex justify-between items-center mb-4"},lc={class:"text-sm md:text-sm lg:text-base xl:text-base",style:{color:"#A4A4A4",wordBreak:"break-all",overflowWrap:"anywhere",whiteSpace:"normal"}},oc={class:"md:hidden"},sc={key:1},ac={key:0,class:"flex flex-wrap items-baseline gap-x-4 gap-y-1 mb-4"},rc={class:"flex flex-wrap items-baseline gap-x-4 gap-y-1"},nc={key:0,class:"line-through text-2xl md:text-2xl lg:text-2xl xl:text-[32px] font-bold text-gray-400"},ic={key:0,class:"text-sm md:text-sm lg:text-base xl:text-base font-normal text-gray-400 whitespace-nowrap"},uc={key:1,class:"flex flex-wrap items-baseline gap-x-4 gap-y-1 mb-4"},cc={class:"flex flex-wrap items-baseline gap-x-4 gap-y-1"},dc={key:0,class:"line-through text-2xl md:text-2xl lg:text-2xl xl:text-[32px] font-bold text-gray-400"},pc={key:0,class:"text-sm md:text-sm lg:text-base xl:text-base font-normal text-gray-400"},vc={key:1,class:"text-sm md:text-sm lg:text-base xl:text-base font-normal text-gray-400"},_c={key:2},fc={class:"flex justify-between"},xc={class:"text-sm md:text-sm lg:text-base xl:text-base text-gray-600 mb-2"},mc={class:"text-[#A4A4A4]"},hc={class:"hidden md:flex"},bc={class:"hidden md:block text-gray-600 mb-2 text-sm md:text-sm lg:text-base xl:text-base"},gc={class:"block md:hidden text-sm md:text-sm lg:text-base xl:text-base text-gray-600 mb-2"},yc={width:"21",height:"21",viewBox:"0 0 21 21",fill:"none",xmlns:"http://www.w3.org/2000/svg"},wc=["fill"],kc={key:4,class:"w-full border-[#D1D1D1] my-4"},Cc={key:5},$c={key:0,class:"grid grid-cols-1 md:grid-cols-2 gap-4 mt-6"},Sc={class:"w-full min-w-0 pr-8"},jc={key:0,class:"appearance-none w-full py-2 rounded-full focus:outline-none focus:ring-2 focus:ring-green-500 flex items-center justify-between"},Mc={class:"truncate block w-full text-sm text-gray-700"},Ac={class:"w-full max-h-45 overflow-y-auto border border-gray-200 bg-white rounded-lg mt-2"},Tc=["onClick"],Lc={class:"w-full min-w-0 pr-8"},Bc={key:0,class:"w-full py-2 rounded-full focus:outline-none focus:ring-2 focus:ring-green-500 flex items-center justify-between"},Pc={class:"truncate text-sm block w-full"},Ic={class:"w-full max-h-45 overflow-y-auto border border-gray-200 bg-white rounded-lg mt-2"},Dc=["onClick"],Ec={key:1,class:"gap-4 mt-6"},Nc={id:"dropdown-wrapper",class:"relative w-full"},qc={class:"flex items-center justify-between mb-1"},Rc={class:"flex w-full justify-between items-center text-base font-semibold"},zc={class:"grid grid-cols-[auto_minmax(0,1fr)_auto] w-full items-start gap-x-2 text-left text-[16px] font-semibold mb-[16px]"},Fc={class:"shrink-0 whitespace-nowrap"},Oc={key:0}
vendor: 5,026 bytes, line 2
2,Uc={class:"min-w-0 whitespace-normal break-words leading-[24px]"},Vc={class:"relative flex items-start gap-2 overflow-x-auto whitespace-nowrap touch-pan-x md:flex-wrap md:whitespace-normal md:max-h-[250px] md:overflow-y-auto"},Hc={key:0},Zc=["disabled","onClick"],Yc=["src","onClick"],Qc={key:1,class:"relative w-full"},Wc={class:"flex items-center justify-between mb-1 mt-6"},Kc={class:"flex w-full justify-between items-center text-base font-semibold"},Gc={class:"grid grid-cols-[auto_minmax(0,1fr)_auto] w-full items-start gap-x-2 text-left text-[16px] font-semibold mb-[16px]"},Jc={class:"shrink-0 whitespace-nowrap"},Xc={key:0},ed={class:"min-w-0 whitespace-normal break-words leading-[24px]"},td={key:2,class:"hide-scrollbar flex gap-2 overflow-x-auto whitespace-nowrap touch-pan-x md:flex-wrap md:overflow-visible md:whitespace-normal"},ld=["onClick","disabled"],od={class:"flex justify-between"},sd={class:"text-[14px] xl:text-base"},ad={key:6},rd={class:"flex items-center gap-4 mt-6"},nd=["disabled"],id=["min","max","value","onKeydown"],ud=["disabled"],cd=["disabled"],dd={class:"flex flex-col gap-3 mt-6"},pd=["disabled"],vd={key:0,class:"flex justify-end mt-2"},_d={key:7,class:"flex flex-col gap-3 mt-6"},fd=["disabled"],xd={class:"text-center text-base font-bold"},md={key:0,class:"absolute right-0 top-full mt-2 w-auto bg-white rounded-lg shadow-lg border border-gray-100 p-2 z-30 transition-all"},hd={class:"flex gap-2"},bd={class:"text-sm font-medium text-center leading-none translate-y-[1px]"},gd=["src"],yd=["src"],wd=["src"],kd={key:0,class:"px-6 md:px-8 xl:px-40"},Cd={class:"py-[6px] mb-2"},$d={class:"text-xs md:text-base font-bold"},Sd=["src"],jd=["data-index"],Md={class:"w-full mt-12 pb-2 xl:pb-6"},Ad={key:0,class:"px-6 xl:px-40"},Td={class:"flex justify-between"},Ld={class:"xl:mb-[64px] mb-[25px]"},Bd={key:1},Pd={class:"flex container px-6 xl:px-40"},Id={class:"mx-auto md:max-w-[820px] xl:max-w-[1440px] w-full text-black text-left justify-center pb-2"},Dd=["innerHTML"],Ed={key:0,class:"mt-2 flex justify-center"},Nd={key:2,class:"mt-[48px] px-6 xl:px-40"},qd={class:"flex flex-wrap items-center gap-2"},Rd=["onClick"],zd={class:"mr-1"},Fd={key:1,class:"pt-12 xl:pt-16 pb-8 px-6 xl:px-40"},Od={class:"w-full flex justify-between"},Ud={class:"!text-base md:!text-[18px] font-bold"},Vd={class:"hidden xl:flex gap-8"},Hd={class:"relative inline-block"},Zd={class:"absolute right-0 z-10 mt-2 border border-gray-300 bg-white rounded-lg shadow-md max-h-[200px] overflow-y-auto w-50"},Yd={class:"absolute right-0 z-10 mt-2 w-50 border border-gray-300 bg-white rounded-lg shadow-md max-h-[200px] overflow-y-auto"},Qd=["onClick"],Wd={key:0,xmlns:"http://www.w3.org/2000/svg",class:"w-4 h-4 text-white",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"3"},Kd={key:0,class:"flex flex-wrap gap-2"},Gd=["onClick"],Jd={key:1,class:"flex flex-col md:flex-row gap-6 mt-8"},Xd={class:"text-[32px] xl:text-[48px] font-bold"},ep={class:"flex mt-2 space-x-1"},tp={class:"text-base text-gray-500 mt-2"},lp={key:0,class:"flex-1 space-y-2"},op={class:"w-8 text-right text-base"},sp={class:"flex-1 h-3 bg-gray-200 rounded-full overflow-hidden"},ap={class:"w-10 text-gray-600 text-right text-base"},rp={class:"w-full"},np={class:"flex gap-4"},ip={class:"p-4 relative"},up={key:0,class:"flex items-center justify-center py-50"},cp={class:"flex space-x-3"},dp=["src"],pp={class:"font-bold text-[14px] text-[#343434]"},vp={class:"flex mt-2"},_p={key:0,xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",class:"w-4 h-4",viewBox:"0 0 16 16"},fp={key:1,xmlns:"http://www.w3.org/2000/svg",class:"w-4 h-4 text-gray-300",viewBox:"0 0 24 24",fill:"currentColor"},xp={class:"hidden md:block"},mp={class:"mt-4 text-[14px] break-all text-[#343434]"},hp={class:"flex gap-2 mt-4"},bp={key:0,class:"flex flex-wrap gap-2"},gp=["src","onClick"],yp=["onClick"],wp=["src"],kp={class:"absolute bottom-0 left-0 right-0 bg-black/40 px-1 py-0.5 flex items-center justify-between"},Cp={class:"text-white text-xs"},$p={class:"text-[12px] mt-2 text-[#a4a4a4] truncate md:w-[700px] xl:w-[1000px]"},Sp={key:0},jp={class:"block md:hidden"},Mp={class:"mt-2 text-[14px] break-all"},Ap={class:"flex flex-wrap gap-2 mt-2"},Tp=["src","onClick"],Lp=["onClick"],Bp=["src"],Pp={class:"absolute bottom-0 left-0 right-0 bg-black/40 px-1 py-0.5 flex items-center justify-between"},Ip={class:"text-white text-xs"},Dp={class:"text-[12px] mt-2 text-[#a4a4a4] truncate w-full md:w-[700px] xl:w-[1000px]"},Ep={class:"flex flex-col md:flex-row justify-between gap-4 mt-4"},Np={class:"flex gap-2 items-center"},qp=["disabled"],Rp=["onClick"],zp={key:1,class:"px-2 text-gray-400 select-none"},Fp=["disabled"],Op={key:2,class:"pt-2 xl:pt-6 px-6 xl:px-40"},Up={class:"!text-base md:!text-[18px] font-bold"},Vp={key:0,class:"xl:mb-[64px] mb-[25px]"},Hp={key:1,class:"xl:mb-[64px] mb-[25px]"},Zp={key:0,class:"fixed inset-0 z-[100] bg-white flex flex-col h-[100dvh]"},Yp={class:"flex justify-between items-center pb-4 border-b border-b-[#D1D1D1
2] shrink-0"},Qp={class:"text-lg font-bold pr-4 truncate"},Wp={class:"flex flex-col flex-1 min-h-0 gap-4 mt-6 items-center justify-between"},Kp={class:"relative w-full flex-1 min-h-0 flex items-center justify-center overflow-hidden rounded-xl"},Gp=["disabled"],Jp={class:"w-full h-full flex items-center justify-center"},Xp=["src"],ev=["disabled"],tv={class:"w-[350px] md:w-[327px] xl:w-[442px] shrink-0 pb-2"},lv=["src","onClick"],ov={key:0,class:"fixed inset-0 z-50 bg-black/40 flex items-end justify-center"},sv={class:"allow-rounded w-full bg-white rounded-t-3xl p-6 h-[90vh] overflow-y-auto overflow-x-hidden shadow-2xl flex flex-col"},av={class:"flex items-start justify-between gap-4"},rv={class:"flex items-start gap-4 min-w-0"},nv=["src"],iv={key:0,class:"min-w-0 flex flex-col"},uv={key:0,class:"flex items-center gap-x-3"},cv={key:0,class:"line-through text-[14px] md:text-xl text-gray-400"},dv={key:1,class:"flex items-center gap-x-3"},pv={key:0,class:"line-through text-lg md:text-xl text-gray-400"},vv={key:1,class:"min-w-0 flex flex-col"},_v={class:"text-[18px] md:text-2xl font-bold line-clamp-2"},fv={key:0,class:"flex items-center justify-between gap-2 md:gap-3 my-4"},xv={class:"text-sm font-bold"},mv={key:1,class:"gap-4 mt-6"},hv={class:"relative w-full"},bv={class:"grid grid-cols-[auto_1fr_auto] items-start gap-x-2 text-[16px] font-semibold mb-4"},gv={class:"shrink-0 whitespace-nowrap"},yv={key:0},wv={class:"min-w-0 whitespace-normal break-words leading-[24px]"},kv={key:0,class:"relative flex flex-wrap items-start gap-[12px]"},Cv={key:0},$v=["disabled","onClick"],Sv=["src","onClick"],jv={key:0,class:"relative w-full"},Mv={class:"grid grid-cols-[auto_1fr_auto] items-start gap-x-2 text-[16px] font-semibold mb-4 mt-6"},Av={class:"shrink-0 whitespace-nowrap"},Tv={key:0},Lv={class:"min-w-0 whitespace-normal break-words leading-[24px]"},Bv={class:"flex flex-wrap gap-3"},Pv=["onClick","disabled"],Iv={key:2,class:"mt-auto"},Dv={class:"flex items-center gap-4 mt-6"},Ev=["disabled"],Nv=["value"],qv=["disabled"],Rv=["disabled"],zv={class:"flex flex-col gap-3 mt-6"},Fv=["disabled"],Ov=2.5,Uv={__name:"[slug]",async setup(E){var Uo,Vo,Ho,Zo,Yo,Qo,Wo,Ko,Go,Jo,Xo,es,ts,ls,os,ss;let J,X;const{t:v}=Il(),at=Ol(),A=f(!1),Ee=f(!1);f(""),f("");
2const Ce=f(!1),O=f(null),ae=f([]),oe=f(null),Te=f({type:null,src:""}),fe=f(!1),Ne=f(!1),rt=f(!1),$e=cn("(max-width: 767px)"),{locale:y}=Il();G(()=>Ce.value,o=>{var t,c,d;if(o){if(Te.value){oe.value=Te.value.src;return}if(((c=(t=O.value)==null?void 0:t.image_data)==null?void 0:c.length)>0){const x=O.value.image_data[0];ae.value=Object.entries(x).filter(([m,g])=>m.startsWith("image_")&&g).map(([m,g])=>g),oe.value=ae.value[0]||"";return}(d=O.value)!=null&&d.video_data&&(oe.value=O.value.video_data)}}),G(Ce,o=>{document.body.style.overflow=o?"hidden":"auto"});const yt=o=>new Promise(t=>{const c=document.createElement("video");c.preload="metadata",c.src=o,c.addEventListener("loadedmetadata",()=>{const d=Math.floor(c.duration),x=Math.floor(d/60),m=d%60;t(`${x}:${m.toString().padStart(2,"0")}`)}),c.addEventListener("error",()=>t("0:00"))}),qe=async()=>{const o=cl.value.map(async t=>{t.video_data&&(t.video_duration=await yt(t.video_data))});await Promise.all(o)},Ue=Ot("auth_token");zr();const N=Fr(),{isLoading:T}=qt(N);Or();const b=Wr(),k=zl(),u=Rl(),{color:Q,can_contact_staff:Ve}=qt(u);function vt(o){if(!o)return null;const t=Array.isArray(o)?o[o.length-1]:o,c=String(t).match(/(\d+)$/);return c?c[1]:null}const re=S(()=>vt(b.params.slug));S(()=>re.value);const z=f({name_th:b.query.category_name||"สินค้าทั้งหมด",name_en:b.query.category_name||"All Products"}),_t=an(),nt=dn(),{product:Ja,productBundle:it,listCategory:Ht}=qt(nt),wt=Dl(),F=f(1),He=f(""),kt=f(null),Ct=f(!1),Zt=f(!1);let Yt=null;const ft=f(!1),Hl=f(null),Zl=f(null),xe=f(null),Qt=f(null),$t=f(!1),xt=f(!1),mt=f(!1),ut=Ur(),fl=f(!0),Yl=f(!1),ht=f(!1),Ql=f(null),Xa=f(null),Wl=f([]),{t:er}=Il(),Wt=f({});let Kt;const xl=f({x:50,y:50}),ml=f(!1);G(xt,o=>{document.body.style.overflow=o?"hidden":"auto"}),G($t,o=>{document.body.style.overflow=o?"hidden":"auto"}),G(mt,o=>{document.body.style.overflow=o?"hidden":"auto"});const hl=Vl();qt(hl);const tr=()=>{var x,m,g,w,$,B;const o=y.value==="en"?((m=(x=n.value)==null?void 0:x.product_detail)==null?void 0:m.product_name_en)||((w=(g=n.value)==null?void 0:g.product_detail)==null?void 0:w.product_name):(B=($=n.value)==null?void 0:$.product_detail)==null?void 0:B.product_name;if(!re.value){console.error("ไม่พบ product_id ใน URL");return}const t=window.location.origin,c=`/products/${Kl(o)}`,d=`${t}${c}-${re.value}`;navigator.clipboard.writeText(d).then(()=>{ut.trigger(er("copy_product_link_success"),"success")})},bl=()=>{var d,x,m,g,w,$;if(!re.value)return console.error("ไม่พบ product_id ใน URL"),null;const o=y.value==="en"?((x=(d=n.value)==null?void 0:d.product_detail)==null?void 0:x.product_name_en)||((g=(m=n.value)==null?void 0:m.product_detail)==null?void 0:g.product_name):($=(w=n.value)==null?void 0:w.product_detail)==null?void 0:$.product_name,t=window.location.origin,c=`/products/${Kl(o||"")}`;return`${t}${c}-${re.value}`},lr=()=>{const o=bl();if(!o)return;const t=`https://www.facebook.com/sharer/sharer.php?u=${encodeURIComponent(o)}`;window.open(t,"_blank","width=600,height=400")},or=()=>{const o=bl();if(!o)return;const t=`https://social-plugins.line.me/lineit/share?url=${encodeURIComponent(o)}`;window.open(t,"_blank","width=600,height=500")},sr=()=>{var x,m,g,w,$,B;const o=bl();if(!o)return;const t=y.value==="en"?((m=(x=n.value)==null?void 0:x.product_detail)==null?void 0:m.product_name_en)||((w=(g=n.value)==null?void 0:g.product_detail)==null?void 0:w.product_name):(B=($=n.value)==null?void 0:$.product_detail)==null?void 0:B.product_name,c=t?`${t}
3`:"",d=`https://x.com/intent/tweet?url=${encodeURIComponent(o)}&text=${encodeURIComponent(c)}`;window.open(d,"_blank","width=600,height=400")},Kl=o=>{try{if(o==null)return console.warn("[formatSpaceToHyphen]: Input is null or undefined"),"";const t=String(o).trim();return t?t.replace(/["',]/g,"").replace(/[\/\s]+/g,"-").replace(/-+/g,"-").replace(/^-+|-+$/g,""):""}catch(t){return console.error("[formatSpaceToHyphen]: Error processing string",t),""}};N.changeStateLoading(!0);const{data:St,pending:gl,error:Vv,refresh:Hv}=([J,X]=Vr(()=>Kr("product-detail",()=>$fetch(`${wt.public.API_BASE_URL}backend/api/erp/get_product_detail`,{method:"POST",headers:{"Content-Type":"application/json","api-key":wt.public.API_KEY,"api-secret":wt.public.API_SECRET,Authorization:`Bearer ${Ue.value||""}`},body:{product_id:re.value}}),{watch:[()=>b.params.slug]})),J=await J,X(),J),bt=f(String(F.value)),Gt=S(()=>{const o=Number(le.value||1),t=Number(ve.value||0),c=Math.max(0,t);return{min:o,max:c,stock:t}});function jt(){bt.value=String(F.value)}function Jt(o){const t=Number(le.value||1),c=Number(ve.value||0),d=Number(me.value||0),x=Math.max(0,d>0?Math.min(c,d):c);if(x<=0)return 0;const m=Math.min(t,x);return Math.min(Math.max(o,m),x)}function Xt(o){const t=Jt(Number(F.value||0)+o);F.value=t,jt(),Lt()}function Gl(o){ml.value=!0;const t=o.target.value;if(bt.value=String(t??""),t===""||t===null||t===void 0)return;const c=Number(t);Number.isFinite(c)&&(F.value=c)}function Jl(){if(ml.value=!1,bt.value===""){F.value=Jt(Number(le.value||1)),jt(),Lt();return}F.value=Jt(Number(bt.value)),jt(),Lt()}S(()=>{const{min:o}=Gt.value;return Number(F.value||0)<=o}),S(()=>{const{max:o}=Gt.value;return Number(F.value||0)>=o}),G(gl,async o=>{N.changeStateLoading(o),await To(ie.value)}),G(St,o=>{var t,c;o!=null&&o.data&&(n.value=o.data,te.value=(c=(t=o.data)==null?void 0:t.product_detail)==null?void 0:c.real_price_vat_exclude)});const ar=S(()=>ht.value?{transform:`scale(${Ov})`,transformOrigin:`${xl.value.x}% ${xl.value.y}%`,cursor:"zoom-out"}:{transform:"scale(1)",transformOrigin:"center center",cursor:"zoom-in"});function rr(o){ht.value=!ht.value,ht.value&&Xl(o)}function Xl(o){if(!ht.value)return;const t=Ql.value.getBoundingClientRect(),c=(o.clientX-t.left)/t.width*100,d=(o.clientY-t.top)/t.height*100;xl.value={x:c,y:d}}const{productsDetail:n}=qt(_t);n.value=St.value.data;const nr=f(""),ir=(Vo=(Uo=n.value)==null?void 0:Uo.product_detail)==null?void 0:Vo.product_description,eo=S(()=>{var t,c;let o=!1;return Ve.value?o=((c=(t=n==null?void 0:n.value)==null?void 0:t.product_detail)==null?void 0:c.contact_staff)!=="Y":o=!0,o}),ct=S(()=>{var o,t;return!!(((t=(o=n==null?void 0:n.value)==null?void 0:o.product_detail)==null?void 0:t.contact_staff)==="Y"&&Ve.value)}),yl=S(()=>{var t;return(((t=n.value.product_detail)==null?void 0:t.product_effective_stock)??0)<=0}),to=S(()=>{var o;return((o=n.value)==null?void 0:o.attribute_manage)&&Object.keys(n.value.attribute_manage).length>0}),lo=()=>{const o=kt.value;if(!o)return;const t=2;Ct.value?Zt.value=o.scrollHeight>192+t:Zt.value=o.scrollHeight>o.clientHeight+t},Mt=f({}),oo=f("");Hr(async()=>{var d,x,m,g;const o=(x=(d=n.value)==null?void 0:d.attribute_manage)==null?void 0:x.some(w=>{var $;return w.attribute_priority_2&&(($=w.attribute_priority_2[0])==null?void 0:$.product_attribute_value)});if(u.attribute2&&((g=(m=n.value)==null?void 0:m.attribute_manage)==null?void 0:g.length)>0&&o){Ne.value=!0;const w=n.value.attribute_manage.findIndex(($,B)=>Be(B)>0);pt(w!==-1?w:0)}await nt.loadCategory(),window.addEventListener("beforeunload",()=>{Object.keys(localStorage).filter(w=>
3w.startsWith("video_thumb_")).forEach(w=>localStorage.removeItem(w))}),await Rt();const t=document.createElement("textarea");if(t.innerHTML=ir,nr.value=t.value,Yl.value=!0,po(),b.query.name){z.value.name_th=b.query.name,z.value.name_en=b.query.name;const w=Number(b.query.index??0),$=b.query.id??"";He.value=`/products/flashsale?name=${encodeURIComponent(b.query.name)}&index=${w}&id=${$}`,await nt.FlashSaleProductType(),await nt.loadListSaleProduct(),await Rt();const B=document.getElementById(`flashsale-${w}`);B&&B.scrollIntoView({behavior:"smooth"})}else b.query.status_product?(b.query.status_product==="สินค้าลดราคา"?(z.value.name_th="สินค้าลดราคา",z.value.name_en="On Sale"):b.query.status_product==="สินค้าพรีออเดอร์"?(z.value.name_th="สินค้าพรีออเดอร์",z.value.name_en="Pre Order"):b.query.status_product==="สินค้าขายดี"?(z.value.name_th="สินค้าขายดี",z.value.name_en="Best Sellers"):b.query.status_product==="สินค้าแนะนำ"?(z.value.name_th="สินค้าแนะนำ",z.value.name_en="Recommended"):b.query.status_product==="สินค้าใหม่"?(z.value.name_th="สินค้าใหม่",z.value.name_en="New Arrivals"):(z.value.name_th=b.query.status_product,z.value.name_en=b.query.status_product),He.value=`/products?status_product=${b.query.status_product}`):b.query.bundle_name?(z.value.name_th="สินค้าโปรสุดคุ้ม",z.value.name_en="Exclusive Deal Products",He.value=`/products?category_id=&bundle_name=สินค้าโปรสุดคุ้ม&bundle_id=${rl.value}`):b.query.category_name?(z.value={name_th:Ro(b.query.category_name).label||"",name_en:Ro(b.query.category_name).label_en||""},He.value=`/products?category=${b.query.category}&category_name=${b.query.category_name}`):b.query.manufacturer_id?He.value=`/products?manufacturer_id=${b.query.manufacturer_id}&category_name=${b.query.category_name}`:(z.value={name_th:"สินค้าทั้งหมด",name_en:"All Products"},He.value="/products?category_id=&category_name=&keywords=");gr(),await To(ie.value),await Lt(),jt();const c=document.querySelector(".coupon-content");c&&c.scrollHeight>c.clientHeight+2&&(Zt.value=!0),kt.value&&(Yt=new ResizeObserver(()=>{lo()}),Yt.observe(kt.value),kt.value.querySelectorAll("img").forEach($=>{$.addEventListener("load",lo)})),Tt.value&&(jl(),sl=new ResizeObserver(()=>{jl()}),sl.observe(Tt.value)),Kt=new ResizeObserver(w=>{for(let $ of w){const H=$.target.dataset.index;$.contentRect.height>24?Wt.value[H]=!0:Wt.value[H]=!1}}),Wl.value.forEach(w=>{w&&Kt.observe(w)}),await qe(),N.changeStateLoading(!1)}),Ua(()=>{Yt&&Yt.disconnect(),sl&&sl.disconnect(),Kt&&Kt.disconnect()}),zt(Hl,()=>Ye.value=!1),zt(Zl,()=>Qe.value=!1);const so=Ul(),se=f(((Ho=n.value.product_detail)==null?void 0:Ho.fake_price)??0),ee=f(((Zo=n.value.product_detail)==null?void 0:Zo.real_price)??0),dt=f((Yo=n.value.product_detail)==null?void 0:Yo.discount_percent),te=f(((Qo=n.value.product_detail)==null?void 0:Qo.real_price_vat_exclude)??0),el=f(((Wo=n.value.product_detail)==null?void 0:Wo.product_sold)??0),ve=f(((Ko=n.value.product_detail)==null?void 0:Ko.product_effective_stock)??0),me=f(((Go=n.value.product_detail)==null?void 0:Go.max_min_per_order.max_per_order)??100),le=f(((Jo=n.value.product_detail)==null?void 0:Jo.max_min_per_order.min_per_order)??1),wl=f(((Xo=n.value)==null?void 0:Xo.product_attribute_id)??""),kl=f(((es=n.value)==null?void 0:es.product_attribute_value)??""),ne=f(((ls=(ts=n.value)==null?void 0:ts.product_detail)==null?void 0:ls.whole_sale)||[]),At=f(((ss=(os=n.value)==null?void 0:os.product_detail)==null?void 0:ss.shipping_cost)??[]),Ze=f("all"),ao=o=>{o=="video"?(dl.value=!0,Pe(1)):o=="all"&&(dl.value=!1,Pe(1)),Ze.value=o},Ye=f(!1),tl=f(null),I=f(0),Qe=f(!1),q=f(null),C=f(null),he=f([]),R=f([]),ur=f(0),ll=f(!1),be=f(!1),ce=f(!1),ol=f(!1),Re=f("DESC"),Le=f("DESC"),Cl=f(null),$l=f(null),ro=S(()=>{const o=_e.value,t=Le.value,c=Re.value;return Array.isArray(o)&&o.length>0&&!(o.length===1&&o[0]===0)||(t==="ASC"||c==="ASC")});zt(Cl,()=>ce.value=!1),zt($l,()=>be.value=!1);const cr=o=>{tl.value=o,ll.value=!0},no=o=>{I.value=o},io=()=>{I.value>0&&I.value--},uo=()=>{I.value<R.value.length-1&&I.value++},co=S(()=>(n.value.list_product_tag||[]).flatMap(o=>o.tag_list||[])),Tt=f(null),Sl=f(!1);let sl=null;const jl=()=>{Tt.value&&(Tt.value.scrollHeight>60?Sl.value=!0:(Sl.value=!1,ft.value=!1))};function dr(){Ye.value=!Ye.value}const al=S(()=>{var t;const o=(t=n.value)==null?void 0:t.attribute_manage;return!o||!Array.isArray(o)?!1:o.some(c=>{var d;return((d=c.attribute_priority_2)==null?void 0:d.length)>1})});S(()=>{var d,x;const o=(x=(d=n.value)==null?void 0:d.attribute_manage)==null?void 0:x[q.value];if(!o||!Array.isArray(o.attribute_priority_2))return 0;const c=o.attribute_priority_2.map(m=>m.product_effective_stock).filter(m=>typeof m=="number");return c.length>0?Math.max(...c):0});const Be=o=>{var x,m;const t=(m=(x=n.value)==null?void 0:x.attribute_manage)==null?void 0:m[o];if(!t||!Array.isArray(t.attribute_priority_2))return 0;const d=t.attribute_priority_2.map(g=>g.product_effective_stock).filter(g=>typeof g=="number");return d.length>0?Math.max(...d):0};function pt(o){const t=q.value===o;q.value=o,Ye.value=!1,C.value=null,Qt.value=null;const c=n.value.attribute_manage[o];xe.value=c,t&&ho()}const pr=()=>{Qe.value=!Qe.value},Ml=o=>{var t;if(((t=C.value)==null?void 0:t.product_attribute_id)==(o==null?void 0:o.product_attribute_id)){Qt.value=null,C.value=null;return}C.value=o,Qt.value=o,Qe.value=!1},po=()=>{var o,t,c;R.value=[],ur.value=((o=n.value.list_product_image)==null?void 0:o.length)||1,n.value.list_product_image.length<1?R.value.push(ue):(t=n.value.list_product_image)==null||t.forEach(d=>{d!=null&&d.original_media_path?R.value.push({media_path:d.original_media_path}):d!=null&&d.media_path?R.value.push(d):R.value.push(ue)}
3),(c=n.value.attribute_manage)==null||c.forEach(d=>{var x;(d==null?void 0:d.list_product_image.length)<1||(x=d==null?void 0:d.list_product_image)==null||x.forEach(m=>{m!=null&&m.original_media_path?R.value.push({media_path:m.original_media_path}):m!=null&&m.media_path&&R.value.push(m)})})};G(()=>n.value.list_product_tag,()=>{Rt(()=>{jl()})});const vr=()=>{he.value=n.value.attribute_manage[q.value].attribute_priority_2,C.value=null},_r=()=>{var o,t,c,d,x,m,g,w,$,B,H,Z,K;F.value=1,C.value&&(dt.value=((o=C.value)==null?void 0:o.manage_price[0].discount_percent)||0,(t=C.value)!=null&&t.manage_price[0].whole_sale&&(ne.value=((c=C.value)==null?void 0:c.manage_price[0].whole_sale)||[]),(d=C.value)!=null&&d.shipping_cost&&(At.value=(x=C.value)==null?void 0:x.shipping_cost),le.value=(g=(m=C.value)==null?void 0:m.max_min_per_order)==null?void 0:g.min_per_order,le.value>=1&&(F.value=le.value),me.value=($=(w=C.value)==null?void 0:w.max_min_per_order)==null?void 0:$.max_per_order,wl.value=C.value.product_attribute_id,kl.value=C.value.product_attribute_value,el.value=C.value.product_sold,ve.value=(B=C.value)==null?void 0:B.product_effective_stock,se.value=C.value.manage_price[0].fake_price,ee.value=C.value.manage_price[0].real_price,te.value=C.value.manage_price[0].real_price_vat,(H=C.value)!=null&&H.product_flash_sales[0]?(ee.value=(Z=C.value)==null?void 0:Z.product_flash_sales[0].flashsale_price,te.value=(K=C.value)==null?void 0:K.product_flash_sales[0].flashsale_price):(ee.value=C.value.manage_price[0].real_price,te.value=C.value.manage_price[0].real_price_vat),C.value.manage_price[0].vat_default==="no"?We.value=!0:We.value=!1,!rt.value&&q.value!==null&&(I.value=il(q.value),Ll.value=il(q.value),rt.value=!0))},ge=S(()=>{var m,g,w,$,B;if(((w=(g=(m=St.value)==null?void 0:m.data)==null?void 0:g.product_detail)==null?void 0:w.product_status)==="inactive")return!0;const o=Number(ve.value||0),t=Number(F.value||0),c=(le==null?void 0:le.value)!==void 0?Number(le.value):null,d=(me==null?void 0:me.value)!==void 0?Number(me.value):null;return!!(o<=0||t>o||c!==null&&c>o||c!==null&&t<c||d!==null&&t>d||to.value&&(!(q.value!==null&&q.value!==void 0)||(($=he.value)==null?void 0:$.length)>0&&((B=he.value[0])==null?void 0:B.product_attribute_value)!==null&&!(C.value!==null&&C.value!==void 0)))}),vo=S(()=>{var t,c;const o=(t=n.value)==null?void 0:t.list_category;return o&&o.length>0&&((c=o[o.length-1])==null?void 0:c.category_id)||null}),rl=S(()=>{var t,c;const o=(t=n.value)==null?void 0:t.bundle_deal;return o&&o.length>0&&((c=o[o.length-1])==null?void 0:c.bundle_id)||null}),_o=o=>o==null||o===""?"0":Number(o).toLocaleString("th-TH");G(vo,async o=>(o&&await nt.loadProduct("",o,"detail","",21),null)),S(()=>{var t;const o=(t=it.value)==null?void 0:t.query_result;return u.handleFavProductAllow&&(!Array.isArray(o)||o.length===0)});const fo=S(()=>(Tl.value||[]).some(o=>o.type==="ลด")),xo=S(()=>{const o=Tl.value||[],t=[...new Set(o.map(d=>d.unit).filter(d=>d))];if(t.length===0)return"-";const c=t.map(d=>d==="%"?v("perc"):d);return c.length===1?c[0]:c.join(" / ")});async function fr(){const o=n.value.bundle_deal[0].bundle_id;await hl.clearPayload(),k.push({path:"/products",query:{category_id:"",bundle_name:v("Exclusive_Deal_Products"),bundle_id:o}})}G(vo,async o=>{o&&await nt.loadProduct("",o,"detail","","")},{immediate:!0}),G(rl,async o=>{it.value=null,o&&await nt.loadProductBundle("","","detail","",o)},{immediate:!0});const Al=S(()=>{var c;const o=(c=Ja.value)==null?void 0:c.query_result,t=parseInt(re.value);return Array.isArray(o)?o.filter(d=>d.id!==t):[]}),mo=S(()=>{var c;const o=(c=it.value)==null?void 0:c.query_result,t=parseInt(re.value);return Array.isArray(o)?o.filter(d=>d.id!==t):[]}),nl=S(()=>{var t;return(((t=it.value)==null?void 0:t.bundle_deal)||[]).map(c=>{const d=c.includes("เหลือ"),x=c.includes("%"),m=c.replace("เหลือ","").replace(/\s+/g," ").trim();if(y.value==="en"){const g=m.match(/\d+/g);if(g&&g.length>=2)return d?`Buy ${g[0]} items ${g[1]} Baht.`:x?`Buy ${g[0]} items, Save ${g[1]}%`:`Buy ${g[0]} items, Save ${g[1]} Baht.`}return m})}),Tl=S(()=>(nl.value||[]).map(t=>
3{const c=t.match(/(?:ซื้อ|Buy)\s*(\d+)/i),d=c?Number(c[1]):0;let x="-";t.includes("ลด")||t.toLowerCase().includes("off")?x="ลด":(t.includes("เหลือ")||t.toLowerCase().includes("only")||t.toLowerCase().includes("get"))&&(x="เหลือ");const m=t.match(/(\d+)\s*%/),g=t.match(/(\d+)\s*(?:บาท|baht|thb)/i),w=m?"%":g?"บาท":"",$=m?Number(m[1]):g?Number(g[1]):0;return{quantity:d,type:x,discount:$,unit:w}})),Ll=f(0),We=f(!1),ho=()=>{var m,g,w,$,B,H,Z,K,je,we,de,Ie,Je,Xe,et,tt,lt,ot;if(F.value=1,ne.value=[],q.value===null||q.value===void 0)return;const t=(n==null?void 0:n.value.attribute_manage[q.value]).attribute_priority_2||[];t.length<=1&&((g=(m=t[0])==null?void 0:m.manage_price[0])!=null&&g.whole_sale&&(ne.value=((w=t[0])==null?void 0:w.manage_price[0].whole_sale)||[]),((B=($=t[0])==null?void 0:$.shipping_cost)==null?void 0:B.length)>=1&&(At.value=(H=t[0])==null?void 0:H.shipping_cost));let c=t[0],d=0,x=0;if(t.length>0){let st=1/0;t.forEach(Me=>{var Dt,Et;d+=Number(Me.product_sold||0),x+=Number(Me.product_effective_stock||0);let It=(Dt=Me.product_flash_sales)!=null&&Dt[0]?Number(Me.product_flash_sales[0].flashsale_price):Number((Et=Me.manage_price[0])==null?void 0:Et.real_price);It<st&&(st=It,c=Me)})}c&&(Ne.value?(ee.value=(Z=n.value.product_detail)==null?void 0:Z.real_price,te.value=(K=n.value.product_detail)==null?void 0:K.real_price_vat_exclude,se.value=(je=n.value.product_detail)==null?void 0:je.fake_price,dt.value=(we=n.value.product_detail)==null?void 0:we.discount_percent):((de=c.product_flash_sales)!=null&&de[0]?(ee.value=c.product_flash_sales[0].flashsale_price,te.value=c.product_flash_sales[0].flashsale_price):(ee.value=(Ie=c.manage_price[0])==null?void 0:Ie.real_price,te.value=(Je=c.manage_price[0])==null?void 0:Je.real_price_vat),se.value=(Xe=c.manage_price[0])==null?void 0:Xe.fake_price,dt.value=(et=c.manage_price[0])==null?void 0:et.discount_percent)),el.value=d,ve.value=al.value?x:((tt=t[0])==null?void 0:tt.product_effective_stock)??0,Ne.value?(I.value=0,Ll.value=0,Ne.value=!1):(I.value=il(q.value),Ll.value=il(q.value),rt.value=!0),((ot=(lt=t[0])==null?void 0:lt.manage_price[0])==null?void 0:ot.vat_default)==="no"?We.value=!0:We.value=!1,vr(),Lt()};G(q,ho),G(C,()=>{_r()});const il=o=>{var m,g,w,$,B,H;const t=(g=(m=n==null?void 0:n.value)==null?void 0:m.attribute_manage)==null?void 0:g[o],c=((w=n==null?void 0:n.value.list_product_image)==null?void 0:w.length)||1;if(!(($=t.list_product_image)!=null&&$.length))return 0;const x=((B=n==null?void 0:n.value)==null?void 0:B.attribute_manage.map((Z,K)=>({...Z,index:K})).filter(Z=>{var K;return((K=Z.list_product_image)==null?void 0:K.length)>0})).findIndex(Z=>Z.index===o);return x===-1?0:c+x>((H=R.value)==null?void 0:H.length)-1?1:c+x};function bo(o,t){return o?o.length>t?o.slice(0,t)+"...":o:""}const Lt=o=>{var t,c,d,x,m,g,w,$,B,H,Z,K;if((ne==null?void 0:ne.value.length)>=1){let je=!1;for(let we=0;we<(ne==null?void 0:ne.value.length);we++){const de=ne==null?void 0:ne.value[we],Ie=de.maximum!=null;if(F.value>=de.minimum&&(!Ie||F.value<=de.maximum)){te.value=de.price,ee.value=de.price,je=!0;break}}je||(te.value=(t=n.value.product_detail)==null?void 0:t.real_price_vat_exclude,ee.value=(c=n.value.product_detail)==null?void 0:c.real_price,((g=(m=(x=(d=n==null?void 0:n.value)==null?void 0:d.attribute_manage)==null?void 0:x[q.value])==null?void 0:m.attribute_priority_2)==null?void 0:g.length)<=1&&(w=n==null?void 0:n.value.attribute_manage[q.value].attribute_priority_2[0])!=null&&w.manage_price[0].whole_sale&&(te.value=($=n==null?void 0:n.value.attribute_manage[q.value].attribute_priority_2[0])==null?void 0:$.manage_price[0].real_price_vat,ee.value=(B=n==null?void 0:n.value.attribute_manage[q.value].attribute_priority_2[0])==null?void 0:B.manage_price[0].real_price),(H=C.value)!=null&&H.manage_price[0].whole_sale&&(te.value=(Z=C.value)==null?void 0:Z.manage_price[0].real_price_vat,ee.value=(K=C.value)==null?void 0:K.manage_price[0].real_price))}},ul=async o=>{if(Ue.value)if(to.value){let t={id:re.value,category_name:b.query.category,quantity:F,attribute_option_1:n.value.attribute_manage[q.value].attribute_priority_1,attribute_option_2:kl.value,product_attribute_id:wl.value};await so.setAddToCartDetail(t),o=="goCart"&&Va("/cart")}else await so.setAddToCart({id:re.value,quantity:F.value}),o=="goCart"&&Va("/cart");else return at.open(),null},go=o=>/\.(mp4|webm|ogg)$/i.test(o),xr=o=>/youtu\.?be/.test(o),yo=o=>{const t=o.match(/(?:youtube\.com\/.*v=|youtu\.be\/)([^&?/]+)/);return t?t[1]:""},mr=o=>{const t=yo(o);return t?`https://www.youtube.com/embed/${t}`:""},wo=o=>{const t=yo(o);return t?`https://img.youtube.com/vi/${t}/hqdefault.jpg`:o};function hr(o){k.push({path:"/products",query:{category_id:b.query.category_id?b.query.category_id:"",category_name:"",tag_id:o.tag_id,tag_name:o.tag_name}})}const br=Gr(()=>Jr(()=>import("./imCn584C.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14]),import.meta.url)),ze=f(!1);f(!1),S(()=>{var o,t;return(t=(o=n==null?void 0:n.value)==null?void 0:o.product_detail)==null?void 0:t.is_favorite}),S(()=>ze.value),Zr(()=>{var o,t,c,d,x,m;St.value&&(n.value=St.value.data,n.value&&(se.value=((o=n.value.product_detail)==null?void 0:o.fake_price)??0,ee.value=((t=n.value.product_detail)==null?void 0:t.real_price)??0,el.value=((c=n.value.product_detail)==null?void 0:c.product_sold)??0,ve.value=((d=n.value.product_detail)==null?void 0:d.product_effective_stock)??0,wl.value=((x=n.value)==null?void 0:x.product_attribute_id)??"",kl.value=((m=n.value)==null?void 0:m.product_attribute_value)??""),po())});async function gr(){var o,t;try{ze.value=(t=(o=n==null?void 0:n.value)==null?void 0:o.product_detail)==null?void 0:t.is_favorite}finally{ko.value=!1}}let Bt=null;
3const Pt=f(null),ko=f(!0);Ua(()=>{Pt.value&&clearTimeout(Pt.value),Bt&&clearTimeout(Bt),ut.show=!1});function Co(o,t){Bt&&clearTimeout(Bt),ut.show=!0,ut.message=o,ut.type=t,Bt=setTimeout(()=>{ut.show=!1},3e3)}function yr(){if(!ko.value){if(!Ue.value){at.open();return}ze.value=!ze.value,Pt.value&&clearTimeout(Pt.value),Pt.value=setTimeout(async()=>{try{let o={product_id:parseInt(re.value,10),action:ze.value?"favorite":"unfavorite"};if((await hl.updateFavProductData(o)).result==="SUCCESS")Co(ze.value?v("add_favorite"):v("cancle_favorite"),"success");else throw new Error}catch{ze.value=!ze.value,Co(v("fav_catch_err_message"),"error")}},700)}}G(b,()=>{ut.show=!1});function wr(o){if(!o)return"";let t=o.replace(/\u00A0/g," ").replace(/&nbsp;/g," ");return t=t.replace(/<[^>]*$/g,""),new DOMParser().parseFromString(t,"text/html").body.innerHTML}const $o=String(wt.public.SHOP_URL||"").replace(/\/$/,""),kr=S(()=>{var c,d;const o=(d=(c=n.value)==null?void 0:c.list_product_image)==null?void 0:d[0],t=(o==null?void 0:o.original_media_path)||(o==null?void 0:o.media_path)||"";return t?t.startsWith("http")?t:`${$o}${t.startsWith("/")?t:`/${t}`}`:`${$o}/logo.png`});pn("detail",{title:S(()=>{var o,t;return((t=(o=n.value)==null?void 0:o.product_detail)==null?void 0:t.product_name)||Ya.detail.title}),description:S(()=>{var o,t;return((t=(o=n.value)==null?void 0:o.product_detail)==null?void 0:t.product_short_description)||Ya.detail.description}),image:kr,ogType:"product"});const So=S(()=>`${wt.public.SHOP_URL.replace(/\/$/,"")}${b.fullPath}`);vn(S(()=>{var o,t,c,d,x,m,g,w,$,B,H;return{"@context":"https://schema.org","@type":"Product","@id":So.value,url:So.value,name:((t=(o=n.value)==null?void 0:o.product_detail)==null?void 0:t.product_name)||"",category:b.query.category_name,description:((d=(c=n.value)==null?void 0:c.product_detail)==null?void 0:d.product_short_description)||"",sku:((m=(x=n.value)==null?void 0:x.product_detail)==null?void 0:m.product_sku)||"",image:(g=R.value)==null?void 0:g.map(Z=>Z.original_media_path||Z.media_path),offers:{"@type":"Offer",price:(($=(w=n.value)==null?void 0:w.product_detail)==null?void 0:$.real_price)||0,priceCurrency:"THB",availability:((H=(B=n.value)==null?void 0:B.product_detail)==null?void 0:H.product_effective_stock)>0?"https://schema.org/InStock":"https://schema.org/OutOfStock"}}}));const Se=o=>Number(o).toLocaleString("en-US",{minimumFractionDigits:2,maximumFractionDigits:2}),ye=o=>Number(o).toLocaleString("en-US");function Bl(){$t.value=!1,xt.value=!1,mt.value=!1,A.value=!1,Ee.value=!1}const ie=f({product_id:re.value,page:1,per_page:5,stars:[]}),jo=S(()=>[...ie.value.stars].sort((o,t)=>t-o)),Mo=S(()=>[..._e.value].sort((o,t)=>t-o)),_e=f([]),Ao=f([]),L=f({}),Cr=S(()=>(L.value.current_page-1)*L.value.per_page+1),$r=S(()=>L.value.current_page*L.value.per_page),Sr=S(()=>{var c,d,x,m,g,w,$,B,H,Z,K,je,we,de,Ie,Je,Xe,et,tt,lt,ot,st;const o=((d=(c=L.value)==null?void 0:c.total_star)==null?void 0:d.all_star)||0,t=Me=>!o||o===0?0:Math.round(Me/o*100);return[{star:5,percent:t(((m=(x=L.value)==null?void 0:x.total_star)==null?void 0:m.five_star)||0),count:((w=(g=L.value)==null?void 0:g.total_star)==null?void 0:w.five_star)||0},{star:4,percent:t(((B=($=L.value)==null?void 0:$.total_star)==null?void 0:B.four_star)||0),count:((Z=(H=L.value)==null?void 0:H.total_star)==null?void 0:Z.four_star)||0},{star:3,percent:t(((je=(K=L.value)==null?void 0:K.total_star)==null?void 0:je.three_star)||0),count:((de=(we=L.value)==null?void 0:we.total_star)==null?void 0:de.three_star)||0},{star:2,percent:t(((Je=(Ie=L.value)==null?void 0:Ie.total_star)==null?void 0:Je.two_star)||0),count:((et=(Xe=L.value)==null?void 0:Xe.total_star)==null?void 0:et.two_star)||0},{star:1,percent:t(((lt=(tt=L.value)==null?void 0:tt.total_star)==null?void 0:lt.one_star)||0),count:((st=(ot=L.value)==null?void 0:ot.total_star)==null?void 0:st.one_star)||0}]}),cl=S(()=>L.value.comment_current_page||[]),To=async o=>{try{const t=Dl(),c=Ot("auth_token").value,d=await $fetch(`${t.public.API_BASE_URL}backend/api/erp/product/get_review?product_id=${Number(re.value)}&page=${Number(o.page)}&per_page=${Number(o.per_page)}
3`,{method:"GET",headers:{"api-key":t.public.API_KEY,"api-secret":t.public.API_SECRET}});L.value=d.data||{}}catch(t){console.error("detail fetch error:",t)}finally{fl.value=!1}},dl=f(!1),Lo=f(null),Pe=async(o,t)=>{const c=Dl();Ot("auth_token").value;const d=await $fetch(`${c.public.API_BASE_URL}backend/api/erp/product/get_review`,{method:"GET",headers:{"api-key":c.public.API_KEY,"api-secret":c.public.API_SECRET},query:{product_id:re.value,page:o,per_page:L.value.per_page,stars:ie.value.stars.length>=1?JSON.stringify(ie.value.stars):void 0,sort:Re.value=="ASC"?"asc":"desc",...dl.value?{img:!0}:{}}});L.value=d.data||{},t&&Rt(()=>{var x;(x=Lo.value)==null||x.scrollIntoView({behavior:"smooth",block:"center"})}),await qe()};function Bo(o){if(!o)return"";if(o.length<=2)return o;const t=o[0],c=o[o.length-1],d="*".repeat(o.length-2);return`${t}${d}${c}`}function Po(o){if(!o)return"";const t=["ม.ค.","ก.พ.","มี.ค.","เม.ย.","พ.ค.","มิ.ย.","ก.ค.","ส.ค.","ก.ย.","ต.ค.","พ.ย.","ธ.ค."],c=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],[d,x,m]=o.split("/").map(Number),g=y.value==="th"?m+543:m,w=y.value==="th"?t[x-1]||"":c[x-1]||"";return`${d} ${w} ${g}`}function Io(o){if(!o)return"";const t=o.split(":");if(t.length<2)return o;const c=t[0],d=t[1];return`${c}:${d}`}async function jr(){u.canShowContactStaff&&u.trickerContactStaff(!0)}const Do=S(()=>{var d,x;const o=Number((d=L.value)==null?void 0:d.last_page)||0,t=Number((x=L.value)==null?void 0:x.current_page)||1,c=[];if(o>4)t<3?c.push(1,2,3,"...",o):t==3&&o==5?c.push(1,2,3,4,5):t>=o-2?c.push(1,"...",o-2,o-1,o):c.push(1,"...",t-1,t,t+1,"...",o);else for(let m=1;m<=o;m++)c.push(m);return c});async function Mr(o){N.changeStateLoading(!0);const t=ie.value.stars.indexOf(o);t===-1?ie.value.stars.push(o):ie.value.stars.splice(t,1),_e.value=[...ie.value.stars],await Pe(1),N.changeStateLoading(!1)}function Ar(o){N.changeStateLoading(!0);const t=_e.value.indexOf(o);t===-1?_e.value.push(o):_e.value.splice(t,1),N.changeStateLoading(!1)}async function Tr(){N.changeStateLoading(!0),ie.value.stars=[],Re.value="DESC",Le.value="DESC",_e.value=[],await Pe(1),N.changeStateLoading(!1)}function Lr(){_e.value=[...Ao.value],ol.value=!1}async function Eo(o){N.changeStateLoading(!0),o=="DESC"?(Re.value="DESC",Le.value="DESC"):o=="ASC"&&(Re.value="ASC",Le.value="ASC"),await Pe(1),ce.value=!1,N.changeStateLoading(!1)}function No(o){o=="DESC"?Le.value="DESC":o=="ASC"&&(Le.value="ASC"),ce.value=!1}async function Br(){N.changeStateLoading(!0),ie.value.stars=[..._e.value],Re.value=Le.value,await Pe(1),ol.value=!1,N.changeStateLoading(!1)}function Pr(o){const t=ie.value.stars.indexOf(o);t!==-1&&ie.value.stars.splice(t,1),t!==-1&&_e.value.splice(t,1),Pe(1)}async function Ir(){var o,t;Ue.value?(_t.quotitionPayload.product_id=re.value,_t.quotitionPayload.attribute_priority_1=(o=xe.value)==null?void 0:o.attribute_priority_1,_t.quotitionPayload.attribute_priority_2=(t=Qt.value)==null?void 0:t.product_attribute_value,_t.quotitionPayload.quantity=F.value,await _t.fetchQuotationProduct()):at.open()}async function pl(o,t){N.changeStateLoading(!0),O.value=o,Te.value=t,o.video_data&&(oo.value=await qo(o.video_data)),Ce.value=!0,N.changeStateLoading(!1)}const qo=(o,t=1)=>new Promise(c=>{const d=document.createElement("video");d.src=o,d.crossOrigin="anonymous",d.muted=!0,d.playsInline=!0,d.addEventListener("loadeddata",()=>{d.currentTime=t}),d.addEventListener("seeked",()=>{const x=document.createElement("canvas");x.width=d.videoWidth,x.height=d.videoHeight,x.getContext("2d").drawImage(d,0,0),c(x.toDataURL("image/jpeg"))})});G(cl,async o=>{for(const t of o)if(t.video_data&&!Mt.value[t.id]){const c=localStorage.getItem(`video_thumb_${t.id}`);if(c)Mt.value[t.id]=c;else{const d=await qo(t.video_data);Mt.value[t.id]=d,localStorage.setItem(`video_thumb_${t.id}`,d)}}},{immediate:!0}),G([le,me,ve,C],()=>{ml.value||(F.value=Jt(Number(F.value||0)||Number(le.value||1)),jt())},{immediate:!0}),G(fe,o=>{o?(document.body.style.overflow="hidden",document.body.style.touchAction="none"):(document.body.style.overflow="",document.body.style.touchAction="")});const vl=f(!1),Ke=f(null),Ge=f(null),Dr=()=>{vl.value=!0},Er=()=>{vl.value=!1},Nr=o=>{I.value=o.activeIndex};G(vl,async o=>{document.body.style.overflow=o?"hidden":"auto",o&&(await Rt(),Ge.value&&!Ge.value.destroyed&&Ge.value.slideTo(I.value,0),Ke.value&&!Ke.value.destroyed&&Ke.value.slideTo(I.value,0))}),G(I,o=>{tl.value&&!tl.value.destroyed&&tl.value.slideTo(o),Ge.value&&!Ge.value.destroyed&&Ge.value.activeIndex!==o&&Ge.value.slideTo(o),Ke.value&&!Ke.value.destroyed&&Ke.value.activeIndex!==o&&Ke.value.slideTo(o)});const Ro=o=>{const t=c=>{for(const d of c){if(d.label===o||d.label_en===o)return d;if(d.children&&d.children.length>0){const x=t(d.children);if(x)return x}}};return t(Ht.value)},zo=(o,t)=>{for(const c of o){const d={name_th:c.label||"",name_en:c.label_en||c.label||"",category_id:c.id||c.value||""};if(c.label===t||c.label_en===t)return[d];if(c.children&&c.children.length>0){const x=zo(c.children,t);
3if(x)return[d,...x]}}return null},Fo=S(()=>{const o=[],t=b.query.category_name;if(b.query.name||b.query.status_product||b.query.bundle_name||b.query.manufacturer_id)return z.value&&z.value.name_th!=="Default Category"&&o.push({name_th:z.value.name_th,name_en:z.value.name_en||z.value.name_th,path:He.value}),o;if(t&&Ht.value&&Ht.value.length>0){const c=zo(Ht.value,t);if(c&&c.length>0)return c.forEach(d=>{d.name_th!=="Default Category"&&d.name_th!=="สินค้าทั้งหมด"&&o.push({name_th:d.name_th,name_en:d.name_en,path:`/products?category=${d.category_id}&category_name=${encodeURIComponent(d.name_th)}`})}),o}return z.value&&z.value.name_th!=="Default Category"&&z.value.name_th!=="สินค้าทั้งหมด"&&o.push({name_th:z.value.name_th,name_en:z.value.name_en||z.value.name_th,path:He.value||"/products"}),o}),Oo=f(null),_l=f(!1),qr=()=>{_l.value=!_l.value};return zt(Oo,()=>{_l.value=!1}),(o,t)=>{var w,$,B,H,Z,K,je,we,de,Ie,Je,Xe,et,tt,lt,ot,st,Me,It,Dt,Et,as,rs,ns,is,us,cs,ds,ps,vs,_s,fs,xs,ms,hs,bs,gs,ys,ws,ks,Cs,$s,Ss,js,Ms,As,Ts,Ls,Bs,Ps,Is,Ds,Es,Ns,qs,Rs,zs,Fs,Os,Us,Vs,Hs,Zs,Ys,Qs,Ws,Ks,Gs,Js,Xs,ea,ta,la,oa,sa,aa,ra,na,ia,ua,ca,da,pa,va,_a,fa,xa,ma,ha,ba,ga,ya,wa,ka,Ca,$a,Sa,ja,Ma,Aa,Ta,La,Ba,Pa,Ia,Da,Ea;const c=en,d=gn,x=Fl,m=Rn,g=ii;return a(),r(M,null,[l("div",xi,[l("div",mi,[V(Za,{visible:$t.value,onClose:Bl,canClose:!1},{default:U(()=>[l("div",hi,[l("p",bi,i(e(v)("wholesale_price")),1),l("button",{class:"cursor-pointer text-gray-500 hover:text-black",onClick:t[0]||(t[0]=s=>$t.value=!1)}," ✖ ")]),t[49]||(t[49]=l("hr",{class:"border-[#D1D1D1]"},null,-1)),l("div",gi,[l("table",yi,[l("thead",null,[l("tr",{class:"border-b border-[#D1D1D1]",style:p({backgroundColor:e(u).color_nav})},[l("th",wi,i(e(v)("pcs")),1),l("th",ki,i(e(v)("price_per_pics")),1)],4)]),(a(!0),r(M,null,P(ne.value,(s,h)=>(a(),r("tbody",{key:h},[l("tr",Ci,[l("td",$i,[l("p",null,[Y(i(e(v)("add"))+" "+i(ye(s.minimum)),1),l("span",null,i(s.maximum?" - "+ye(s.maximum)+" "+e(v)("pices"):e(v)("range_more")),1)])]),l("td",Si," ฿"+i(Se(s.price)),1)])]))),128))])])]),_:1},8,["visible"]),V(Za,{visible:xt.value,onClose:Bl,canClose:!1},{default:U(()=>[l("div",ji,[l("p",Mi,i(e(v)("shipping_fee")),1),l("button",{class:"cursor-pointer text-gray-500 hover:text-black",onClick:t[1]||(t[1]=s=>xt.value=!1)}," ✖ ")]),t[50]||(t[50]=l("hr",{class:"border-[#D1D1D1]"},null,-1)),l("div",Ai,[l("table",Ti,[l("thead",null,[l("tr",{class:"border-b border-[#D1D1D1]",style:p({backgroundColor:e(u).color_nav})},[l("th",Li,i(e(v)("pcs")),1),l("th",Bi,i(e(v)("shipping_price")),1)],4)]),(a(!0),r(M,null,P(At.value,(s,h)=>(a(),r("tbody",{key:h},[l("tr",Pi,[l("td",Ii,[l("p",null,[Y(i(ye(s.minimum_unit)),1),l("span",null,i(s.maximum_unit?" - "+ye(s.maximum_unit)+" ":e(v)("range_more")),1)])]),l("td",Di," ฿"+i(Se(s.shipping_price)),1)])]))),128))])])]),_:1},8,["visible"]),V(c,{visible:Ce.value,onClose:t[4]||(t[4]=s=>o.modalShippingClose()),canClose:!1},{default:U(()=>[l("div",Ei,[l("p",Ni,i(e(v)("img_review")),1),l("button",{class:"cursor-pointer text-gray-500 hover:text-black",onClick:t[2]||(t[2]=s=>Ce.value=!1)}," ✖ ")]),t[55]||(t[55]=l("hr",{class:"border-[#D1D1D1]"},null,-1)),l("div",qi,[l("div",Ri,[O.value.user_image?(a(),r("img",{key:0,src:O.value.user_image,alt:"user avatar",class:"w-12 h-12 rounded-full object-cover shrink-0 allow-rounded"},null,8,zi)):(a(),r("svg",{key:1,xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor",class:"w-12 h-12 rounded-full p-1 shrink-0",style:p({color:e(u).color})},t[51]||(t[51]=[l("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M17.982 18.725A7.488 7.488 0 0 0 12 15.75a7.488 7.488 0 0 0-5.982 2.975m11.963 0a9 9 0 1 0-11.963 0m11.963 0A8.966 8.966 0 0 1 12 21a8.966 8.966 0 0 1-5.982-2.275M15 9.75a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z"},null,-1)]),4)),l("div",null,[l("p",Fi,i(O.value.hide_username==="no"?O.value.created_by:Bo(O.value.created_by)),1),l("div",Oi,[(a(),r(M,null,P(5,s=>l("span",{key:s,style:p({color:e(u).color})},[s<=O.value.stars?(a(),r("svg",Ui,t[52]||(t[52]=[l("path",{d:"M3.612 15.443c-.396.198-.86-.106-.746-.555l.83-4.73-3.523-3.356c-.33-.315-.158-.888.283-.95l4.898-.696 2.186-4.437c.197-.4.73-.4.927 0l2.186 4.437 4.898.696c.441.062.613.635.283.95l-3.523 3.356.83 4.73c.114.449-.35.753-.746.555L8 13.187l-4.389 2.256z"},null,-1)]))):(a(),r("svg",Vi,t[53]||(t[53]=[l("path",{d:"M12 .587l3.668 7.431L24 9.753l-6 5.847 1.417 8.27L12 19.771l-7.417 4.099L6 15.6 0 9.753l8.332-1.735z"},null,-1)])))],4)),64))])])]),l("p",Hi,i(O.value.comment),1),l("div",Zi,[go(oe.value)?(a(),r("video",{key:0,controls:"",src:oe.value,class:"w-full h-full rounded"},null,8,Yi)):(a(),r("img",{key:1,src:oe.value,class:"w-full h-full object-contain"},null,8,Qi))]),l("div",Wi,[(a(!0),r(M,null,P(O.value.image_data,(s,h)=>(a(),r("div",{key:h,onClick:W=>oe.value=s.image_path,class:j(["flex-shrink-0 w-[52px] h-[52px] md:w-20 md:h-20 rounded-lg overflow-hidden cursor-pointer",{"border-[var(--border-color)] border-2":oe.value===s.image_path}]),style:p({"--border-color":e(u).color})},[l("img",{src:s.image_path,class:"w-full h-full object-cover",alt:"img"},null,8,Gi)],14,Ki))),128)),O.value.video_data?(a(),r("div",{key:0,class:"flex-shrink-0 w-[52px] h-[52px] md:w-20 md:h-20 rounded-lg overflow-hidden relative cursor-pointer",onClick:t[3]||(t[3]=s=>oe.value=O.value.video_data)},[l("img",{src:oo.value,class:"w-full h-full object-cover"},null,8,Ji),l("div",Xi,[t[54]||(t[54]=l("span",{class:"text-white text-xs"},[l("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"white",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor",class:"size-3 md:size-6"},[l("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"m15.75 10.5 4.72-4.72a.75.75 0 0 1 1.28.53v11.38a.75.75 0 0 1-1.28.53l-4.72-4.72M4.5 18.75h9a2.25 2.25 0 0 0 2.25-2.25v-9a2.25 2.25 0 0 0-2.25-2.25h-9A2.25 2.25 0 0 0 2.25 7.5v9a2.25 2.25 0 0 0 2.25 2.25Z"})])],-1)),l("span",eu,i(O.value.video_duration||"0:00"),1)])])):_("",!0)])])]),_:1},8,["visible"]),V(d,{visible:mt.value,onClose:Bl,canClose:!1},{default:U(()=>[l("div",{style:p({color:e(u).text_color2}),class:"flex justify-between p-8 pb-4"},[l("p",tu,i(e(v)("Exclusive_Deal")),1),l("button",{class:"cursor-pointer text-gray-500 hover:text-black",onClick:t[5]||(t[5]=s=>mt.value=!1)}
3," ✖ ")],4),t[56]||(t[56]=l("hr",{class:"border-[#D1D1D1]"},null,-1)),l("div",lu,[l("div",ou,[l("table",{style:p({color:e(u).text_color2}),class:"w-full border-collapse"},[l("thead",{class:"sticky top-0 z-10",style:p({backgroundColor:e(u).color_nav})},[l("tr",su,[l("th",au,i(e(v)("pcs")),1),l("th",ru,[Y(i(fo.value?e(v)("disc"):e(v)("price"))+" ",1),fo.value?(a(),r("span",nu," ("+i(xo.value==="บาท"?e(y)==="th"?"บาท":"Baht":xo.value)+")",1)):_("",!0)])])],4),l("tbody",null,[(a(!0),r(M,null,P(Tl.value,(s,h)=>(a(),r("tr",{key:h,class:"border-b border-[#F5F5F5] font-bold text-xs md:text-sm"},[l("td",iu,i(s.quantity)+" "+i(e(v)("xx_products")),1),l("td",uu,[s.type==="ลด"?(a(),r(M,{key:0},[Y(i(e(v)("disco"))+" "+i(_o(s.discount))+i(s.unit==="%"?"%":` ${s.unit==="บาท"?e(y)==="th"?"บาท":"Baht":s.unit}`),1)],64)):(a(),r(M,{key:1},[Y(i(_o(s.discount))+" "+i(s.unit==="%"?"%":` ${s.unit==="บาท"?e(y)==="th"?"บาท":"Baht":s.unit}`),1)],64))])]))),128))])],4)])])]),_:1},8,["visible"]),V(fi,{isOpen:ol.value,title:e(v)("all_filters"),onClose:Lr,canClose:!0},{footer:U(()=>[ro.value?(a(),r("div",bu,[l("button",{onClick:Tr,class:"cursor-pointer flex-1 py-3 border border-red-600 text-red-600 rounded-full text-center font-medium hover:[background-color:var(--hover-color)] transition text-[14px] md:text-base",style:p({borderColor:e(Q),color:e(Q),"--hover-color":e(u).bg_hover_button})},i(e(v)("clear")),5),l("button",{onClick:Br,class:j(["flex-1 py-3 rounded-full text-center font-medium transition text-[14px] md:text-base",["hover:bg-sky-700 cursor-pointer text-white"]]),style:p(`background-color: ${e(Q)};`)},i(e(v)("confirm")),5)])):_("",!0),ro.value?_("",!0):(a(),r("div",gu,[l("button",{disable:"",class:j(["flex-1 py-3 rounded-full text-center transition w-full font-bold",[" text-[#A4A4A4]"]]),style:"background-color: #E7E7E7;"},i(e(v)("confirm")),1)]))]),default:U(()=>[l("div",cu,[l("div",du,[l("button",{onClick:t[6]||(t[6]=s=>ce.value=!ce.value),class:"flex justify-between items-center w-full text-base font-bold cursor-pointer",ref_key:"sortReviewRef",ref:Cl},[l("p",{class:"text-base",style:p({color:ce.value?e(u).color:"black"})},i(e(v)("sort")),5),(a(),r("svg",{class:j(["w-4 h-4 font-bold transform transition-transform",{"rotate-180":ce.value}]),fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},t[57]||(t[57]=[l("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M19 9l-7 7-7-7"},null,-1)]),2))],512),Fe(l("ul",pu,[l("li",{onClick:t[7]||(t[7]=s=>No("DESC")),class:j(["flex items-center justify-between px-4 py-2 cursor-pointer hover:bg-gray-100",Le.value==="DESC"?"bg-[var(--selection-bg)] text-[var(--selection-text)] font-semibold":""]),style:p({"--selection-text":e(u).color,"--selection-bg":e(u).bg_color2})},[l("span",null,i(e(v)("sort_newest_to_oldest")),1)],6),l("li",{onClick:t[8]||(t[8]=s=>No("ASC")),class:j(["flex items-center justify-between px-4 py-2 cursor-pointer hover:bg-gray-100",Le.value==="ASC"?"bg-[var(--selection-bg)] text-[var(--selection-text)] font-semibold":""]),style:p({"--selection-text":e(u).color,"--selection-bg":e(u).bg_color2})},[l("span",null,i(e(v)("sort_oldest_to_newest")),1)],6)],512),[[Oe,ce.value]]),ce.value?_("",!0):(a(),r("p",vu,i(Le.value==="DESC"?e(v)("sort_newest_to_oldest"):e(v)("sort_oldest_to_newest")),1))]),l("div",{ref_key:"sortStarRef",ref:$l},[l("button",{onClick:t[9]||(t[9]=s=>be.value=!be.value),class:"flex justify-between gap-4 text-base font-bold items-center cursor-pointer w-full"},[l("span",{class:"text-base",style:p({color:be.value?e(u).color:"black"})},i(e(v)("score_rate")),5),(a(),r("svg",{class:j(["w-4 h-4 font-bold pointer-events-none transform transition-transform",{"rotate-180":be.value}]),fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},t[58]||(t[58]=[l("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M19 9l-7 7-7-7"},null,-1)]),2))]),Fe(l("ul",_u,[(a(),r(M,null,P([5,4,3,2,1],s=>l("li",{key:s,onClick:h=>Ar(s),class:"flex items-center justify-between px-4 py-2 cursor-pointer hover:bg-gray-100 text-[14px]"},[l("span",null,i(s)+" "+i(e(v)("star")),1),l("div",{class:"w-5 h-5 border rounded-sm flex items-center justify-center",style:p({backgroundColor:_e.value.includes(s)?e(u).color:"white",borderColor:e(u).color})},[_e.value.includes(s)?(a(),r("svg",xu,t[59]||(t[59]=[l("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M5 13l4 4L19 7"},null,-1)]))):_("",!0)],4)],8,fu)),64))],512),[[Oe,be.value]]),be.value?_("",!0):(a(),r("p",mu,[(a(!0),r(M,null,P(Mo.value,(s,h)=>(a(),r("span",{key:s,class:"mr-2 text-[14px]"},[Y(i(s)+" "+i(e(v)("star")),1),h<Mo.value.length-1?(a(),r("span",hu,",")):_("",!0)]))),128))]))],512)])]),_:1},8,["isOpen","title"]),l("div",null,[l("ul",yu,[l("li",wu,[l("a",ku,i(e(v)("home")),1)]),Fo.value.length>0?(a(!0),r(M,{key:0},P(Fo.value,(s,h)=>(a(),r(M,{key:h},[t[60]||(t[60]=l("li",{class:"shrink-0"},"/",-1)),l("li",Cu,[V(x,{to:s.path,class:"block truncate hover:underline"},{default:U(()=>[Y(i(bo(e(y)==="th"?s.name_th:s.name_en||s.name_th,20)),1)]),_:2},1032,["to"])])],64))),128)):(a(),r(M,{key:1},[t[61]||(t[61]=l("li",{class:"shrink-0"},"/",-1)),l("li",$u,[V(x,{to:"/products",class:"block truncate hover:underline"},{default:U(()=>[Y(i(e(v)("all_products")),1)]),_:1})])],64)),t[62]||(t[62]=l("li",{class:"shrink-0"},"/",-1)),l("li",Su,[l("span",{title:e(y)==="th"?($=(w=e(n))==null?void 0:w.product_detail)==null?void 0:$.product_name:((H=(B=e(n))==null?void 0:B.product_detail)==null?void 0:H.product_name_en)||((K=(Z=e(n))==null?void 0:Z.product_detail)==null?void 0:K.product_name),class:"block truncate",style:p({color:e(u).color})}
3,i(bo(e(y)==="th"?(we=(je=e(n))==null?void 0:je.product_detail)==null?void 0:we.product_name:((Ie=(de=e(n))==null?void 0:de.product_detail)==null?void 0:Ie.product_name_en)||((Xe=(Je=e(n))==null?void 0:Je.product_detail)==null?void 0:Xe.product_name),50)),13,ju)])])]),l("div",Mu,[R.value.length>0?(a(),r("div",Au,[xr(R.value[I.value].media_path)?(a(),r("iframe",{key:0,src:mr(R.value[I.value].media_path),frameborder:"0",allow:"autoplay; encrypted-media",allowfullscreen:"",style:{width:"100%","aspect-ratio":"1/1"},class:"w-full max-w-md rounded-xl shadow-md"},null,8,Tu)):go(R.value[I.value].media_path)?(a(),r("video",{key:1,src:R.value[I.value].media_path,controls:"",style:{width:"100%","border-radius":"8px","object-fit":"contain"},class:"w-full max-w-md rounded-xl shadow-md"},null,8,Lu)):(a(),r("div",Bu,[ve.value<=0?(a(),r("div",Pu,[l("span",Iu,i(e(v)("out_of_stock")),1)])):_("",!0),((tt=(et=e(n))==null?void 0:et.product_detail)==null?void 0:tt.product_status)==="inactive"?(a(),r("div",Du,[l("span",Eu,i(e(v)("unavailable_for_sale")),1)])):_("",!0),l("div",Nu,[e(u).clickToZoom?(a(),r("div",{key:0,ref_key:"zoomBox",ref:Ql,class:"relative overflow-hidden rounded-xl shadow-md",style:{"aspect-ratio":"1/1"},onClick:rr,onMousemove:Xl,onMouseleave:t[10]||(t[10]=s=>ht.value=!1)},[l("img",{ref_key:"zoomImg",ref:Xa,src:R.value[I.value].original_media_path||R.value[I.value].media_path||e(ue),alt:"Main Product Image",class:"w-full h-full object-contain transition-transform duration-200",style:p(ar.value)},null,12,qu)],544)):e(u).clickToZoom?_("",!0):(a(),r("div",{key:1,class:"relative overflow-hidden rounded-xl shadow-md",style:{"aspect-ratio":"1/1"},onClick:t[11]||(t[11]=s=>Dr())},[l("img",{src:R.value[I.value].original_media_path||R.value[I.value].media_path||e(ue),alt:"Main Product Image",class:"w-full h-full object-contain transition-transform duration-200 cursor-pointer"},null,8,Ru)]))]),t[63]||(t[63]=l("div",{class:"absolute bottom-2 left-2 flex gap-[2px]"},null,-1))])),l("div",zu,[l("button",{class:j([{invisible:!(ll.value&&R.value.length>4)},"relative text-[#343434] flex items-center justify-center disabled:cursor-not-allowed cursor-pointer disabled:opacity-50 pr-1"]),onMouseover:t[12]||(t[12]=s=>o.hover1=!0),onMouseleave:t[13]||(t[13]=s=>o.hover1=!1),disabled:I.value===0,onClick:io},t[64]||(t[64]=[l("svg",{xmlns:"http://www.w3.org/2000/svg",class:"w-6 h-6 cursor-pointer",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[l("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M15 19l-7-7 7-7"})],-1)]),42,Fu),Fe(V(e(Vt),{slidesPerView:4,spaceBetween:12,observer:!0,observeParents:!0,onSwiper:cr,class:"mySwiper mySwiper--orange max-w-full"},{default:U(()=>[(a(!0),r(M,null,P(R.value,(s,h)=>(a(),ke(e(Ut),{key:h},{default:U(()=>[l("img",{src:wo(s.media_path||e(ue)),alt:"Thumbnail",onClick:W=>no(h),style:p([`border: ${I.value==h?"2px solid "+e(Q):"1px solid #ccc"}`,{"aspect-ratio":"1 / 1","object-fit":"contain"}]),class:"!w-13 !h-13 xl:!w-20 xl:!h-20 border cursor-pointer object-cover rounded-lg"},null,12,Ou)]),_:2},1024))),128))]),_:1},512),[[Oe,ll.value]]),l("button",{class:j([{invisible:!(ll.value&&R.value.length>4)},"relative text-[#343434] flex items-center justify-center disabled:cursor-not-allowed cursor-pointer disabled:opacity-50 pl-1"]),onMouseover:t[14]||(t[14]=s=>o.hover2=!0),onMouseleave:t[15]||(t[15]=s=>o.hover2=!1),disabled:I.value===R.value.length-1,onClick:uo},t[65]||(t[65]=[l("svg",{xmlns:"http://www.w3.org/2000/svg",class:"w-6 h-6 cursor-pointer",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[l("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M9 5l7 7-7 7"})],-1)]),42,Uu)])])):(a(),r("div",Vu,[l("div",Hu,[Fe(l("div",{style:p({backgroundColor:e(u).price_red}),class:"absolute xl:top-5 xl:left-15 top-4 left-4 text-white text-xs font-bold px-2 py-1 rounded z-5"}," -"+i(Math.round(parseFloat(dt.value)))+"% ",5),[[Oe,dt.value!==0&&dt.value!=="0%"&&dt.value!="0.00%"]]),l("img",{src:e(ue),alt:"Main Product Image",class:"w-full max-w-md rounded-xl shadow-md",style:{"aspect-ratio":"1 / 1","object-fit":"contain"}},null,8,Zu)])])),l("div",Yu,[l("div",Qu,[e(n).product_detail.message_status==="pre-order"?(a(),r("div",{key:0,class:"text-[14px] rounded-full w-fit px-3 flex items-center justify-center h-[32px] font-bold",style:p({border:`1px solid ${e(u).color}`,color:e(u).color})},i(e(v)("message_status")),5)):_("",!0),((ot=(lt=e(it))==null?void 0:lt.query_result)==null?void 0:ot.length)>0&&rl.value?(a(),r("div",Wu,[l("div",{onClick:t[16]||(t[16]=s=>mt.value=!0),class:"flex items-center gap-4 px-4 justify-center max-w-[300px] min-h-[32px] rounded-full text-white cursor-pointer",style:p({background:`linear-gradient(150deg, ${e(u).bundle_color1}, ${e(u).bundle_color2})`})},[l("p",Ku,i(nl.value[0]),1),t[66]||(t[66]=l("svg",{xmlns:"http://www.w3.org/2000/svg",class:"w-4 h-4 cursor-pointer shrink-0",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[l("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M9 5l7 7-7 7"})],-1))],4)])):_("",!0)]),l("div",Gu,[l("div",Ju,[l("h1",Xu,i(e(y)==="th"?(Me=(st=e(n))==null?void 0:st.product_detail)==null?void 0:Me.product_name:((Dt=(It=e(n))==null?void 0:It.product_detail)==null?void 0:Dt.product_name_en)||((as=(Et=e(n))==null?void 0:Et.product_detail)==null?void 0:as.product_name)),1)]),Fe(l("div",{class:"ml-auto cursor-pointer flex items-center justify-center flex-shrink-0 rounded-full border-2 h-[32px] w-[32px] md:h-[36px] md:w-[36px] xl:h-[40px] xl:w-[40px]",onClick:t[17]||(t[17]=s=>yr()),style:p({borderColor:e(u).color,backgroundColor:"transparent"})},[(a(),ke(Yr(ze.value?e(tn):e(ln)),{class:"h-[20px] w-[20px] md:h-[24px] md:w-[24px] transition-all duration-300",style:p({color:e(u).color})},null,8,["style"]))],4),[[Oe,e(u).handleFavProductAllow]])]),e(n).product_detail.product_short_description?(a(),r("p",{key:0,class:"text-sm md:text-sm lg:text-base xl:text-base mb-4 line-clamp-1 break-words whitespace-normal",title:e(y)==="th"?e(n).product_detail.product_short_description:e(n).product_detail.product_short_description_en||e(n).product_detail.product_short_description},i(e(y)==="th"?e(n).product_detail.product_short_description:e(n).product_detail.product_short_description_en||e(n).product_detail.product_short_description),9,ec)):_("",!0),l("div",tc,[l("p",lc," SKU : "+i(e(n).product_detail.product_sku),1),l("div",oc,[((ns=(rs=e(n))==null?void 0:rs.product_detail)==null?void 0:ns.product_use_shipping_cost)=="yes"&&At.value.some(s=>Number(s.shipping_price)>0)?(a(),r("button",{key:0,class:"flex items-center gap-1 text-sm md:text-sm lg:text-base xl:text-base text-gray-600 mb-2 cursor-pointer",onClick:t[18]||(t[18]=s=>xt.value=!0)},[V(e(Qa),{class:"w-5 h-5 object-cover",style:p({color:e(u).color})},null,8,["style"]),l("span",{class:"text-[14px] font-bold relative top-[2px]",style:p({color:e(u).color})},i(e(v)("shipping_fee")),5),t[67]||(t[67]=l("svg",{xmlns:"http://www.w3.org/2000/svg",class:"w-5 h-5 cursor-pointer",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[l("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M9 5l7 7-7 7"})],-1))])):_("",!0)])]),ct.value?_("",!0):(a(),r("div",sc,[e(n).product_detail.vat_default!=="yes"?(a(),r("div",ac,[l("div",rc,[l("span",{class:"text-2xl md:text-2xl lg:text-2xl xl:text-[32px] font-bold",style:p({color:Number(ee.value)!==Number(se.value)?e(u).price_red:e(u).black})}," ฿"+i(Se(ee.value)),5),Number(ee.value)!==Number(se.value)?(a(),r("span",nc," ฿"+i(Se(se.value)),1)):_("",!0)]),We.value||e(n).product_detail.vat_default==="no"&&e(n).product_detail.vat!==0&&!We.value&&q.value===null?(a(),r("span",ic," ("+i(e(v)("price_excludes_vat"))+") ",1)):_("",!0)])):e(n).product_detail.vat_default==="yes"?(a(),r("div",uc,[l("div",cc,[l("span",{class:"text-2xl md:text-2xl lg:text-2xl xl:text-[32px] font-bold",style:p({color:Number(te.value)!==Number(se.value)?e(u).price_red:e(u).black})}," ฿"+i(Se(te.value)),5),Number(te.value)!==Number(se.value)?(a(),r("span",dc,"฿"+i(Se(se.value)),1)):_("",!0)]),((us=(is=e(n))==null?void 0:is.product_detail)==null?void 0:us.vat_default)==="no"&&((ds=(cs=e(n))==null?void 0:cs.product_detail)==null?void 0:ds.vat)!==0&&!We.value?(a(),r("span",pc,"("+i(e(v)("price_excludes_vat"))+")",1)):_("",!0),We.value?(a(),r("span",vc,"("+i(e(v)("price_excludes_vat"))+")",1)):_("",!0)])):_("",!0)])),ct.value?_("",!0):(a(),r("div",_c,[l("div",fc,[l("p",xc,[Y(i(e(v)("item_sold"))+" "+i(ye(el.value))+" "+i(e(y)==="th"?(vs=(ps=e(n))==null?void 0:ps.product_detail)==null?void 0:vs.product_unit_type:((fs=(_s=e(n))==null?void 0:_s.product_detail)==null?void 0:fs.product_unit_type_en)||((ms=(xs=e(n))==null?void 0:xs.product_detail)==null?void 0:ms.product_unit_type))+" | ",1),l("span",mc,i(e(v)("item_in_stock"))+" "+i(ye(ve.value))+" "+i(e(y)==="th"?(bs=(hs=e(n))==null?void 0:hs.product_detail)==null?void 0:bs.product_unit_type:((ys=(gs=e(n))==null?void 0:gs.product_detail)==null?void 0:ys.product_unit_type_en)||((ks=(ws=e(n))==null?void 0:ws.product_detail)==null?void 0:ks.product_unit_type)),1)]),l("div",hc,[(($s=(Cs=e(n))==null?void 0:Cs.product_detail)==null?void 0:$s.product_use_shipping_cost)=="yes"&&At.value.some(s=>Number(s.shipping_price)>0)?(a(),r("button",{key:0,class:"flex items-center gap-1 text-sm md:text-sm lg:text-base xl:text-base text-gray-600 mb-2 cursor-pointer",onClick:t[19]||(t[19]=s=>xt.value=!0)},[V(e(Qa),{class:"w-5 h-5 object-cover",style:p({color:e(u).color})},null,8,["style"]),l("span",{class:"text-[14px] font-bold relative top-[2px] text-nowrap",style:p({color:e(u).color})},i(e(v)("shipping_fee")),5),t[68]||(t[68]=l("svg",{xmlns:"http://www.w3.org/2000/svg",class:"w-5 h-5 cursor-pointer",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[l("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M9 5l7 7-7 7"})],-1))])):_("",!0)])]),l("p",bc,[t[69]||(t[69]=l("span",{class:"text-red-500 font-bold"},"* ",-1)),Y(i(e(v)("minimum"))+" "+i(ye(le.value))+" "+i(e(y)==="th"?(js=(Ss=e(n))==null?void 0:Ss.product_detail)==null?void 0:js.product_unit_type:((As=(Ms=e(n))==null?void 0:Ms.product_detail)==null?void 0:As.product_unit_type_en)||((Ls=(Ts=e(n))==null?void 0:Ts.product_detail)==null?void 0:Ls.product_unit_type))+" "+i(e(v)("maximum"))+" "+i(ye(me.value))+" "+i(e(y)==="th"?(Ps=(Bs=e(n))==null?void 0:Bs.product_detail)==null?void 0:Ps.product_unit_type:((Ds=(Is=e(n))==null?void 0:Is.product_detail)==null?void 0:Ds.product_unit_type_en)||((Ns=(Es=e(n))==null?void 0:Es.product_detail)==null?void 0:Ns.product_unit_type))+" "+i(e(v)("item_per_order")),1)]),l("div",gc,[l("p",null,[t[70]||(t[70]=l("span",{class:"text-red-500 font-bold"},"* ",-1)),Y(i(e(v)("minimum"))+" "+i(ye(le.value))+" "+i(e(y)==="th"?(Rs=(qs=e(n))==null?void 0:qs.product_detail)==null?void 0:Rs.product_unit_type:((Fs=(zs=e(n))==null?void 0:zs.product_detail)==null?void 0:Fs.product_unit_type_en)||((Us=(Os=e(n))==null?void 0:Os.product_detail)==null?void 0:Us.product_unit_type)),1)]),l("p",null,i(e(v)("maximum"))+" "+i(ye(me.value))+" "+i(e(y)==="th"?(Hs=(Vs=e(n))==null?void 0:Vs.product_detail)==null?void 0:Hs.product_unit_type:((Ys=(Zs=e(n))==null?void 0:Zs.product_detail)==null?void 0:Ys.product_unit_type_en)||((Ws=(Qs=e(n))==null?void 0:Qs.product_detail)==null?void 0:Ws.product_unit_type))+" "+i(e(v)("item_per_order")),1)])])),e(n).product_detail.message_status==="pre-order"&&(e(n).product_detail.product_delivery_time||e(n).product_detail.product_delivery_time_en)?(a(),r("div",{key:3,class:"flex items-center justify-start gap-1 md:gap-[18px] py-2 px-4 roun
3ded-lg mt-4 md:mt-2",style:p({backgroundColor:e(u).color_nav})},[(a(),r("svg",yc,[l("path",{d:"M3 12.75C3 12.5511 3.07902 12.3603 3.21967 12.2197C3.36032 12.079 3.55109 12 3.75 12H6C6.19891 12 6.38968 12.079 6.53033 12.2197C6.67098 12.3603 6.75 12.5511 6.75 12.75C6.75 12.9489 6.67098 13.1397 6.53033 13.2803C6.38968 13.421 6.19891 13.5 6 13.5H3.75C3.55109 13.5 3.36032 13.421 3.21967 13.2803C3.07902 13.1397 3 12.9489 3 12.75ZM7.5 15H3.75C3.55109 15 3.36032 15.079 3.21967 15.2197C3.07902 15.3603 3 15.5511 3 15.75C3 15.9489 3.07902 16.1397 3.21967 16.2803C3.36032 16.421 3.55109 16.5 3.75 16.5H7.5C7.69891 16.5 7.88968 16.421 8.03033 16.2803C8.17098 16.1397 8.25 15.9489 8.25 15.75C8.25 15.5511 8.17098 15.3603 8.03033 15.2197C7.88968 15.079 7.69891 15 7.5 15ZM21 15.375C21.0008 16.4681 20.6826 17.5377 20.0845 18.4526C19.4864 19.3676 18.6344 20.0881 17.6328 20.526C16.6313 20.9639 15.5237 21.1001 14.4459 20.9178C13.3681 20.7356 12.3669 20.2428 11.565 19.5H2.25C1.65326 19.5 1.08097 19.2629 0.65901 18.841C0.237053 18.419 0 17.8467 0 17.25V2.25C0 1.65326 0.237053 1.08097 0.65901 0.65901C1.08097 0.237053 1.65326 0 2.25 0H17.25C17.8467 0 18.419 0.237053 18.841 0.65901C19.2629 1.08097 19.5 1.65326 19.5 2.25V11.565C20.4641 12.5994 21.0001 13.9609 21 15.375ZM6.75 1.5V6H12.75V1.5H6.75ZM2.25 18H10.4025C9.84331 16.9376 9.63874 15.7241 9.8187 14.537C9.99866 13.35 10.5537 12.2516 11.4027 11.4027C12.2516 10.5537 13.35 9.99866 14.537 9.8187C15.7241 9.63874 16.9376 9.84331 18 10.4025V2.25C18 2.05109 17.921 1.86032 17.7803 1.71967C17.6397 1.57902 17.4489 1.5 17.25 1.5H14.25V6C14.25 6.39782 14.092 6.77935 13.8107 7.06066C13.5294 7.34196 13.1478 7.5 12.75 7.5H6.75C6.35218 7.5 5.97064 7.34196 5.68934 7.06066C5.40804 6.77935 5.25 6.39782 5.25 6V1.5H2.25C2.05109 1.5 1.86032 1.57902 1.71967 1.71967C1.57902 1.86032 1.5 2.05109 1.5 2.25V17.25C1.5 17.4489 1.57902 17.6397 1.71967 17.7803C1.86032 17.921 2.05109 18 2.25 18ZM19.5 15.375C19.5 14.5591 19.2581 13.7616 18.8048 13.0833C18.3516 12.4049 17.7073 11.8762 16.9536 11.564C16.1998 11.2518 15.3704 11.1701 14.5703 11.3293C13.7701 11.4884 13.0351 11.8813 12.4582 12.4582C11.8813 13.0351 11.4884 13.7701 11.3293 14.5702C11.1701 15.3704 11.2518 16.1998 11.564 16.9536C11.8762 17.7073 12.4049 18.3515 13.0833 18.8048C13.7616 19.2581 14.5592 19.5 15.375 19.5C16.4684 19.498 17.5165 19.0628 18.2896 18.2896C19.0628 17.5165 19.498 16.4684 19.5 15.375ZM16.125 15.0675V13.125C16.125 12.9261 16.046 12.7353 15.9053 12.5947C15.7647 12.454 15.5739 12.375 15.375 12.375C15.1761 12.375 14.9853 12.454 14.8447 12.5947C14.704 12.7353 14.625 12.9261 14.625 13.125V15.0675C14.6267 15.4647 14.7858 15.845 15.0675 16.125L16.3425 17.4075C16.4126 17.477 16.4957 17.532 16.5871 17.5693C16.6784 17.6066 16.7763 17.6256 16.875 17.625C16.9737 17.6256 17.0716 17.6066 17.1629 17.5693C17.2543 17.532 17.3374 17.477 17.4075 17.4075C17.4778 17.3378 17.5336 17.2548 17.5717 17.1634C17.6097 17.072 17.6293 16.974 17.6293 16.875C17.6293 16.776 17.6097 16.678 17.5717 16.5866C17.5336 16.4952 17.4778 16.4122 17.4075 16.3425L16.125 15.0675Z",fill:e(u).color},null,8,wc)])),l("p",{class:"text-sm",style:p({color:e(u).text_color2})},i(e(y)==="th"?e(n).product_detail.product_delivery_time:e(n).product_detail.product_delivery_time_en||e(n).product_detail.product_delivery_time),5)],4)):_("",!0),ct.value?_("",!0):(a(),r("hr",kc)),e(n).attribute_manage.length>0?(a(),r("div",Cc,[e(u).attribute2?(a(),r("div",Ec,[l("div",Nc,[l("div",qc,[l("label",Rc,[l("div",zc,[l("span",Fc,[Y(i(e(y)==="th"?e(n).product_detail.key_1_value:e(n).product_detail.key_1_value_en||e(n).product_detail.key_1_value)+" ",1),xe.value?(a(),r("span",Oc," - ")):_("",!0)]),l("span",Uc,i(xe.value?e(y)==="th"?(pa=xe.value)==null?void 0:pa.attribute_priority_1:((va=xe.value)==null?void 0:va.attribute_priority_1_en)||((_a=xe.value)==null?void 0:_a.attribute_priority_1):""),1),l("button",{type:"button",class:"md:hidden justify-self-end self-start mt-[2px] flex items-center justify-center shrink-0",onClick:t[21]||(t[21]=pe(s=>e($e)&&(fe.value=!0),["stop","prevent"]))},[(a(),r("svg",{xmlns:"http://www.w3.org/2000/svg",class:"w-5 h-5 cursor-pointer",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",onClick:t[20]||(t[20]=pe(s=>e($e)&&(fe.value=!0),["stop","prevent"]))},t[73]||(t[73]=[l("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M9 5l7 7-7 7"},null,-1)])))])])])]),l("div",Vc,[(a(!0),r(M,null,P(e(n).attribute_manage,(s,h)=>{var W;return a(),r("div",{key:h,class:"flex flex-col items-center flex-shrink-0 md:flex-shrink"},[e(n).product_detail.have_attribute_icon==="no"?(a(),r("div",Hc,[l("button",{disabled:Be(h)===0,onClick:pe(Ae=>Be(h)>0&&pt(h),["prevent"]),class:j(["disabled:cursor-not-allowed rounded-full px-4 py-2 border border-[var(--bg-color)] flex-shrink-0 md:flex-shrink cursor-pointer",[Be(h)===0?"bg-gray-50 text-[#A4A4A4] border-gray-300":q.value===h?"bg-[var(--bg-color)] text-white font-semibold":"bg-white hover:bg-gray-100 text-black"]]),style:p({"--bg-color":e(u).color})},i(e(y)==="th"?s==null?void 0:s.attribute_priority_1:(s==null?void 0:s.attribute_priority_1_en)||
3(s==null?void 0:s.attribute_priority_1)),15,Zc)])):(a(),r("div",{key:1,class:j(["flex flex-col items-center rounded-lg overflow-hidden",[Be(h)===0?"out-of-stock":"cursor-pointer"]]),style:p({border:q.value===h?`1px solid ${e(u).color}`:""})},[l("img",{src:((W=s.attribute_icon)==null?void 0:W.image_data)||e(ue),class:j(["size-[52px] md:size-[52px] xl:size-[80px] object-contain",Be(h)===0?"is-disabled":""]),onClick:pe(Ae=>Be(h)!=0&&pt(h),["prevent"]),loading:"lazy",decoding:"async"},null,10,Yc)],6))])}),128))])]),(fa=he.value[0])!=null&&fa.product_attribute_value?(a(),r("hr",{key:0,class:"h-[1px] mt-6 w-full",style:p({borderColor:e(u).underline_color||"#E5E5E5"})},null,4)):_("",!0),(xa=he.value[0])!=null&&xa.product_attribute_value?(a(),r("div",Qc,[l("div",Wc,[l("label",Kc,[l("div",Gc,[l("span",Jc,[Y(i(e(y)==="th"?e(n).product_detail.key_2_value:e(n).product_detail.key_2_value_en||e(n).product_detail.key_2_value)+" ",1),C.value?(a(),r("span",Xc," - ")):_("",!0)]),l("span",ed,i(C.value?e(y)==="th"?C.value.product_attribute_value:C.value.product_attribute_value_en||C.value.product_attribute_value:""),1),l("button",{type:"button",class:"md:hidden justify-self-end self-start mt-[2px] flex items-center justify-center shrink-0",onClick:t[22]||(t[22]=pe(s=>e($e)&&(fe.value=!0),["stop","prevent"]))},t[74]||(t[74]=[l("svg",{xmlns:"http://www.w3.org/2000/svg",class:"w-5 h-5 cursor-pointer",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[l("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M9 5l7 7-7 7"})],-1)]))])])])])):_("",!0),he.value.length>0&&((ma=he.value[0])!=null&&ma.product_attribute_value)?(a(),r("div",td,[(a(!0),r(M,null,P(he.value,(s,h)=>{var W;return a(),r("button",{key:h,onClick:Ae=>Ml(s),disabled:s.product_effective_stock===0,class:j(["disabled:cursor-not-allowed rounded-full px-4 py-[6px] border border-[var(--bg-color)] cursor-pointer flex-shrink-0 md:flex-shrink",s.product_effective_stock===0?"bg-white text-[#A4A4A4] cursor-not-allowed":((W=C.value)==null?void 0:W.product_attribute_value)===s.product_attribute_value?"bg-[var(--bg-color)] text-white font-semibold":"bg-white hover:bg-gray-100"]),style:p({"--bg-color":e(u).color})},i(e(y)==="th"?s.product_attribute_value:s.product_attribute_value_en||s.product_attribute_value),15,ld)}),128))])):_("",!0)])):(a(),r("div",$c,[l("div",{id:"dropdown-wrapper",class:"w-full h-max border-b border-b-[#F5F5F5] pb-2",ref_key:"attribute1",ref:Hl},[l("div",{class:"w-full flex justify-between items-center cursor-pointer",onClick:dr},[l("div",Sc,[l("label",{style:p({color:Ye.value?e(u).color:e(u).black}),class:"block text-base font-semibold mb-1"},i(e(y)==="th"?e(n).product_detail.key_1_value:e(n).product_detail.key_1_value_en||e(n).product_detail.key_1_value),5),Ye.value?_("",!0):(a(),r("div",jc,[l("span",Mc,i(q.value!==null?e(y)==="th"?(Ks=e(n).attribute_manage[q.value])==null?void 0:Ks.attribute_priority_1:((Gs=e(n).attribute_manage[q.value])==null?void 0:Gs.attribute_priority_1_en)||((Js=e(n).attribute_manage[q.value])==null?void 0:Js.attribute_priority_1):e(v)("please_select",{artibute:e(y)==="th"?(ea=(Xs=e(n))==null?void 0:Xs.product_detail)==null?void 0:ea.key_1_value:((la=(ta=e(n))==null?void 0:ta.product_detail)==null?void 0:la.key_1_value_en)||((sa=(oa=e(n))==null?void 0:oa.product_detail)==null?void 0:sa.key_1_value)})),1)]))]),(a(),r("svg",{class:j(["w-4 h-4 text-gray-400 transition-transform duration-200",{"rotate-180":Ye.value}]),fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},t[71]||(t[71]=[l("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M19 9l-7 7-7-7"},null,-1)]),2))]),V(Ft,{"enter-active-class":"transition-all duration-300 ease-in-out overflow-hidden","enter-from-class":"max-h-0 opacity-0","enter-to-class":"max-h-60 opacity-100","leave-active-class":"transition-all duration-300 ease-in-out overflow-hidden","leave-from-class":"max-h-60 opacity-100","leave-to-class":"max-h-0 opacity-0"},{default:U(()=>[Fe(l("ul",Ac,[(a(!0),r(M,null,P(e(n).attribute_manage,(s,h)=>(a(),r("li",{key:h,onClick:pe(W=>pt(h),["stop","prevent"]),class:j(["px-4 py-2 text-sm cursor-pointer hover:bg-gray-300 break-all",q.value===h?"bg-gray-200 font-semibold":""]),style:p(q.value===h?{color:e(u).color}:{})},i(e(y)==="th"?s.attribute_priority_1:s.attribute_priority_1_en||s.attribute_priority_1),15,Tc))),128))],512),[[Oe,Ye.value]])]),_:1})],512),(aa=he.value[0])!=null&&aa.product_attribute_value?(a(),r("div",{key:0,class:"w-full border-b h-max border-b-[#F5F5F5] pb-2",ref_key:"attribute2",ref:Zl},[l("div",{class:"w-full flex justify-between items-center cursor-pointer",onClick:pr},[l("div",Lc,[l("label",{style:p({color:Qe.value?e(u).color:e(u).black}),class:"block text-base font-semibold mb-1"}
3,i(e(y)==="th"?e(n).product_detail.key_2_value:e(n).product_detail.key_2_value_en||e(n).product_detail.key_2_value),5),Qe.value?_("",!0):(a(),r("div",Bc,[l("span",Pc,i(C.value?e(y)==="th"?C.value.product_attribute_value:C.value.product_attribute_value_en||C.value.product_attribute_value:e(v)("please_select",{artibute:e(y)==="th"?(na=(ra=e(n))==null?void 0:ra.product_detail)==null?void 0:na.key_2_value:((ua=(ia=e(n))==null?void 0:ia.product_detail)==null?void 0:ua.key_2_value_en)||((da=(ca=e(n))==null?void 0:ca.product_detail)==null?void 0:da.key_2_value)})),1)]))]),(a(),r("svg",{class:j(["w-4 h-4 text-gray-400 transition-transform duration-200",{"rotate-180":Qe.value}]),fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},t[72]||(t[72]=[l("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M19 9l-7 7-7-7"},null,-1)]),2))]),V(Ft,{"enter-active-class":"transition-all duration-300 ease-in-out overflow-hidden","enter-from-class":"max-h-0 opacity-0","enter-to-class":"max-h-60 opacity-100","leave-active-class":"transition-all duration-300 ease-in-out overflow-hidden","leave-from-class":"max-h-60 opacity-100","leave-to-class":"max-h-0 opacity-0"},{default:U(()=>[Fe(l("ul",Ic,[(a(!0),r(M,null,P(he.value,(s,h)=>{var W,Ae;return a(),r("li",{key:h,onClick:pe(gt=>Ml(s),["stop","prevent"]),class:j(["px-4 py-2 cursor-pointer hover:bg-gray-300 flex justify-between items-center",((W=C.value)==null?void 0:W.product_attribute_value)===s.product_attribute_value?"bg-gray-200 font-semibold":""]),style:p(((Ae=C.value)==null?void 0:Ae.product_attribute_value)===s.product_attribute_value?{color:e(u).color}:{})},[l("span",null,i(e(y)==="th"?s.product_attribute_value:s.product_attribute_value_en||s.product_attribute_value),1)],14,Dc)}),128))],512),[[Oe,Qe.value]])]),_:1})],512)):_("",!0)]))])):_("",!0),l("div",{class:"mt-4 rounded-lg",style:p({backgroundColor:e(u).color_nav})},[(a(!0),r(M,null,P((ha=ne.value)==null?void 0:ha.slice(0,1),(s,h)=>(a(),r("div",{class:"p-2",key:h},[l("div",od,[l("p",sd,[Y(i(e(v)("add"))+" "+i(ye(s.minimum)),1),l("span",null,i(s.maximum?" - "+ye(s.maximum)+e(v)("xx_products"):e(v)("range_more")),1),Y(" "+i(e(v)("price"))+" "+i(Se(s.price))+" "+i(e(v)("bath")),1)]),ne.value.length>1?(a(),r("p",{key:0,class:"font-bold underline cursor-pointer text-[12px] xl:text-[14px]",style:p({color:e(u).color}),onClick:t[23]||(t[23]=W=>$t.value=!0)},i(e(v)("load_more")),5)):_("",!0)])]))),128))],4),eo.value?(a(),r("div",ad,[l("div",rd,[l("div",{style:p(`border-color: ${e(Q)}; color: ${e(Q)};`),class:"flex items-center justify-between w-[30%] h-10 border rounded-full px-4 flex-shrink-0"},[l("button",{disabled:F.value<=le.value,class:j(["text-xl",[F.value<=le.value?"text-gray-400 cursor-not-allowed":"cursor-pointer"]]),onClick:t[24]||(t[24]=s=>Xt(-1))}," − ",10,nd),l("input",{type:"number",inputmode:"numeric",class:"w-full h-full text-center font-semibold text-black outline-none",min:Gt.value.min,max:Gt.value.max,value:bt.value,onInput:Gl,onBlur:Jl,onKeydown:Qr(pe(Jl,["prevent"]),["enter"])},null,40,id),l("button",{disabled:F.value>=ve.value||F.value>=me.value,class:j(["text-xl",[F.value>=ve.value||F.value>=me.value?"text-gray-400 cursor-not-allowed":"cursor-pointer"]]),onClick:t[25]||(t[25]=s=>Xt(1))}," + ",10,ud)],4),l("button",{disabled:ge.value,onClick:ul,class:"cursor-pointer py-2 px-4 w-[70%] rounded-full border transition-all duration-200 font-bold flex-grow text-sm md:text-sm lg:text-base xl:text-base",style:p(ge.value?"border-color: #ccc; color: #ccc; background-color: #f5f5f5; cursor: not-allowed;":`border-color: ${e(Q)}; color: ${e(Q)};`)},i(e(v)("add_to_cart")),13,cd)]),l("div",dd,[l("button",{disabled:ge.value,onClick:t[26]||(t[26]=s=>ul("goCart")),class:"cursor-pointer py-2 px-4 rounded-full border transition-all duration-200 font-bold flex-grow text-sm md:text-sm lg:text-base xl:text-base",style:p(ge.value?"border-color: #ccc; color: #ccc; background-color: #f5f5f5; cursor: not-allowed;":`background-color: ${e(Q)}; color: white;`)},i(e(v)("buy_now")),13,pd)]),e(u).newPDF?(a(),r("div",vd,[l("div",{onClick:t[27]||
3(t[27]=s=>ge.value?"":Ir()),class:"px-[16px] py-[8px] flex gap-2 items-center",style:p({cursor:ge.value?"not-allowed":"pointer"})},[V(e(on),{class:"w-4 h-4 md:w-5 md:h-5",style:p({color:ge.value?"#cccccc":"#1E4394"})},null,8,["style"]),l("p",{class:"text-[12px] leading-[18px] md:text-[14px] xl:text-[16px] md:leading-[24px] font-bold",style:p({color:ge.value?"#cccccc":"#1E4394"})},i(e(v)("create_quotation")),5)],4)])):_("",!0)])):_("",!0),ct.value?(a(),r("div",_d,[t[75]||(t[75]=l("div",{class:"h-[1px] mt-2 w-full bg-[#D1D1D1]"},null,-1)),l("button",{disabled:yl.value,onClick:jr,class:"py-2 px-4 rounded-full transition-all duration-200 flex-grow text-[14px] md:text-[14px] xl:text-[16px] font-extrabold text-center",style:p({backgroundColor:yl.value?"#C7C7C7":e(u).color,color:e(u).text_color,cursor:yl.value?"not-allowed":"pointer"})},i(e(v)("contact_shop")),13,fd)])):_("",!0),e(u).isShareContent?(a(),r("div",{key:8,ref_key:"shareMenuRef",ref:Oo,class:"relative mt-4 w-full flex justify-end"},[l("button",{type:"button",onClick:qr,class:"flex justify-end items-center gap-2 cursor-pointer"},[t[76]||(t[76]=l("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor",class:"size-6"},[l("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M7.217 10.9
307a2.25 2.25 0 1 0 0 2.186m0-2.186c.18.324.283.696.283 1.093s-.103.77-.283 1.093m0-2.186 9.566-5.314m-9.566 7.5 9.566 5.314m0 0a2.25 2.25 0 1 0 3.935 2.186 2.25 2.25 0 0 0-3.935-2.186Zm0-12.814a2.25 2.25 0 1 0 3.933-2.185 2.25 2.25 0 0 0-3.933 2.185Z"})],-1)),l("p",xd,i(e(v)("sharelink")),1)]),_l.value?(a(),r("div",md,[l("div",hd,[l("button",{onClick:tr,class:"flex items-center text-center justify-center px-1.5 gap-2 text-[#343434] rounded-md transition-colors cursor-pointer",title:"Copy Short URL"},[t[77]||(t[77]=l("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor",class:"size-6"},[l("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M13.19 8.688a4.5 4.5 0 0 1 1.242 7.244l-4.5 4.5a4.5 4.5 0 0 1-6.364-6.364l1.757-1.757m13.35-.622 1.757-1.757a4.5 4.5 0 0 0-6.364-6.364l-4.5 4.5a4.5 4.5 0 0 0 1.242 7.244"})],-1)),l("p",bd,i(e(v)("copylink")),1)]),l("button",{onClick:lr,class:"flex items-center justify-center transition-colors cursor-pointer",title:"Share to Facebook"},[l("img",{src:e(nn),alt:"Facebook",class:"w-6 h-6"},null,8,gd)]),l("button",{onClick:or,class:"flex items-center justify-center transition-colors cursor-pointer",title:"Share to LINE"},[l("img",{src:e(un),alt:"Line",class:"w-6 h-6"},null,8,yd)]),l("button",{onClick:sr,class:"flex items-center justify-center transition-colors cursor-pointer",title:"Share to X"},[l("img",{src:e(mn),alt:"X",class:"w-6 h-6"},null,8,wd)])])])):_("",!0)],512)):_("",!0)])]),(ga=(ba=e(n).product_detail)==null?void 0:ba.free_product)!=null&&ga.length&&!ct.value?(a(),r("div",kd,[l("div",{class:"mt-8 pt-2 pb-4 px-4 bg-[#F6F6F6] rounded-lg",style:p({color:e(u).black})},[l("div",Cd,[l("span",$d,i(e(v)("free_item")),1)]),(a(!0),r(M,null,P(e(n).product_detail.free_product,(s,h)=>{var W,Ae;return a(),r("div",{key:h,class:j(["text-xs md:text-sm justify-between flex",Wt.value[h]?"items-start":"items-center"])},[l("div",{class:j(["flex gap-4 mr-4",Wt.value[h]?"items-start":"items-center"])},[l("img",{class:"w-7 h-7 md:w-10 md:h-10 rounded-sm object-contain",src:((W=s==null?void 0:s.list_product_image)==null?void 0:W.original_media_path)||((Ae=s==null?void 0:s.list_product_image)==null?void 0:Ae.media_path),alt:"freeIcon"},null,8,Sd),l("span",{ref_for:!0,ref:gt=>{gt&&(Wl.value[h]=gt)},"data-index":h,class:"break-all"},i(e(y)==="th"?s.free_product_name:s.free_product_name_en||s.free_product_name),9,jd)],2),l("span",null,"X"+i(s.totalFree),1)],2)}),128))],4)])):_("",!0),l("div",Md,[rl.value&&((wa=(ya=e(it))==null?void 0:ya.query_result)==null?void 0:wa.length)>0&&mo.value.length>=1?(a(),r("div",Ad,[l("div",Td,[l("h2",{style:p({color:e(u).text_color2}),class:"!text-base xl:!text-lg font-bold max-w-[200px] md:max-w-[600px] xl:max-w-[850px]"},i(e(v)("bundle"))+" : "+i(nl.value[0]),5),V(x,{onClick:t[28]||(t[28]=s=>fr()),class:"underline-offset-6 underline !text-[14px] xl:!text-[16px] font-bold cursor-pointer",style:p({color:e(u).color})},{default:U(()=>[Y(i(e(v)("view_all_products")),1)]),_:1},8,["style"])]),l("div",Ld,[V(m,{productlist:mo.value.slice(0,10),modules:[e(El)],counter:e(u)},null,8,["productlist","modules","counter"])])])):_("",!0),(($a=(Ca=(ka=e(n))==null?void 0:ka.product_detail)==null?void 0:Ca.product_description)==null?void 0:$a.length)>0?(a(),r("div",Bd,[l("ul",Pd,[l("li",{onClick:t[29]||(t[29]=s=>o.openTab=1),class:"-mb-px mr-1"},[l("h2",{style:p(`border-color:${e(Q)}`),class:"py-2 font-bold !text-base xl:!text-lg"},i(e(v)("view_details")),5)])]),t[78]||(t[78]=l("br",null,null,-1)),l("div",{class:"py-4 full-width-bg",style:p(`background-color:${e(u).bg_hover_button}`)},[l("div",Id,[l("div",{ref_key:"contentRef",ref:kt,style:{"word-break":"keep-all","overflow-wrap":"break-word"},class:j(["prose max-w-none coupon-content transition-all duration-300 overflow-hidden text-base px-6 xl:px-40",{"max-h-48":!Ct.value}]),innerHTML:wr(e(y)==="th"?(ja=(Sa=e(n))==null?void 0:Sa.product_detail)==null?void 0:ja.product_description:((Aa=(Ma=e(n))==null?void 0:Ma.product_detail)==null?void 0:Aa.product_description_en)||((La=(Ta=e(n))==null?void 0:Ta.product_detail)==null?void 0:La.product_description))},null,10,Dd),Zt.value?(a(),r("div",Ed,[l("button",{onClick:t[30]||(t[30]=s=>Ct.value=!Ct.value),class:"hover:underline cursor-pointer text-sm",style:p({color:e(u).black})},i(Ct.value?e(v)("show_less"):e(v)("show_more")),5)])):_("",!0)])],4)])):_("",!0),co.value.length>0?(a(),r("div",Nd,[l("h2",null,[l("p",{class:"text-lg font-bold",style:p({color:e(u).black})},i(e(v)("related_tags")),5)]),t[79]||(t[79]=l("hr",{class:"border-t border-gray-300 my-4",role:"separator","aria-orientation":"horizontal"},null,-1)),l("div",{ref_key:"tagsContainer",ref:Tt,class:j(["relative overflow-hidden",ft.value?"max-h-[1000px]":"max-h-[46px] md:max-h-[48px] pr-[80px]"])},[l("div",qd,[(a(!0),r(M,null,P(co.value,(s,h)=>(a(),r("div",{key:h,class:"flex items-center font-normal text-[14px] md:text-[16
3px] px-3 py-2 rounded-full border cursor-pointer whitespace-nowrap",style:p({borderColor:e(u).color,color:e(u).color}),onClick:W=>hr(s)},[l("span",zd,i(e(y)==="th"?s.tag_name:s.tag_name_en||s.tag_name),1)],12,Rd))),128)),Sl.value?(a(),r("button",{key:0,onClick:t[31]||(t[31]=s=>ft.value=!ft.value),class:j(["cursor-pointer text-[14px] md:text-[16px] underline underline-offset-6 bg-white font-bold",ft.value?"relative ml-2 py-2":"absolute right-0 top-0 h-[42px] flex items-center pl-4"]),style:p({color:e(u).color})},i(ft.value?e(v)("load_less"):e(v)("load_more")),7)):_("",!0)])],2)])):_("",!0)]),((Ba=L.value)==null?void 0:Ba.product_rating_avg)>0&&e(u).hasReview?(a(),r("div",Fd,[l("div",Od,[l("h2",null,[l("p",Ud,i(e(v)("review_product")),1)]),l("div",Vd,[l("div",Hd,[l("button",{onClick:t[32]||(t[32]=s=>ce.value=!ce.value),class:"flex gap-4 text-base font-bold items-center cursor-pointer",style:p({color:ce.value?e(u).color:"black"}),ref_key:"sortReviewRef",ref:Cl},[l("span",null,i(Re.value==="DESC"?e(v)("newest_to"):e(v)("oldest_to")),1),(a(),r("svg",{class:j(["w-4 h-4 font-bold pointer-events-none transform transition-transform",{"rotate-180":ce.value}]),fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},t[80]||(t[80]=[l("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M19 9l-7 7-7-7"},null,-1)]),2))],4),Fe(l("ul",Zd,[l("li",{onClick:t[33]||(t[33]=s=>Eo("DESC")),class:j(["flex items-center justify-between px-4 py-2 cursor-pointer hover:bg-gray-100",Re.value==="DESC"?"bg-[var(--selection-bg)] text-[var(--selection-text)] font-semibold":""]),style:p({"--selection-text":e(u).color,"--selection-bg":e(u).bg_color2})},[l("span",null,i(e(v)("newest_to")),1)],6),l("li",{onClick:t[34]||(t[34]=s=>Eo("ASC")),class:j(["flex items-center justify-between px-4 py-2 cursor-pointer hover:bg-gray-100",Re.value==="ASC"?"bg-[var(--selection-bg)] text-[var(--selection-text)] font-semibold":""]),style:p({"--selection-text":e(u).color,"--selection-bg":e(u).bg_color2})},[l("span",null,i(e(v)("oldest_to")),1)],6)],512),[[Oe,ce.value]])]),l("div",{class:"relative inline-block",ref_key:"sortStarRef",ref:$l},[l("button",{onClick:t[35]||(t[35]=s=>be.value=!be.value),class:"flex gap-4 text-base font-bold items-center cursor-pointer",style:p({color:be.value?e(u).color:"black"})},[l("span",null,i(e(v)("score_rate")),1),(a(),r("svg",{class:j(["w-4 h-4 font-bold pointer-events-none transform transition-transform",{"rotate-180":be.value}]),fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},t[81]||(t[81]=[l("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M19 9l-7 7-7-7"},null,-1)]),2))],4),Fe(l("ul",Yd,[(a(),r(M,null,P([5,4,3,2,1],s=>l("li",{key:s,onClick:h=>Mr(s),class:"flex items-center justify-between px-4 py-2 cursor-pointer hover:bg-gray-100"},[l("span",null,i(s)+" "+i(e(v)("star")),1),l("div",{class:"w-5 h-5 border rounded-sm flex items-center justify-center",style:p({backgroundColor:ie.value.stars.includes(s)?e(u).color:"white",borderColor:e(u).color})},[ie.value.stars.includes(s)?(a(),r("svg",Wd,t[82]||(t[82]=[l("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M5 13l4 4L19 7"},null,-1)]))):_("",!0)],4)],8,Qd)),64))],512),[[Oe,be.value]])],512)]),l("button",{onClick:t[36]||(t[36]=s=>(Ao.value=[..._e.value],ol.value=!0)),class:"flex xl:hidden border rounded-full px-2 py-1 cursor-pointer text-[12px] md:text-base text-center items-center",style:p({borderColor:e(u).color,color:e(u).color})},[t[83]||(t[83]=l("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor",class:"size-3 md:size-6"},[l("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M6 13.5V3.75m0 9.75a1.5 1.5 0 0 1 0 3m0-3a1.5 1.5 0 0 0 0 3m0 3.75V16.5m12-3V3.75m0 9.75a1.5 1.5 0 0 1 0 3m0-3a1.5 1.5 0 0 0 0 3m0 3.75V16.5m-6-9V3.75m0 3.75a1.5 1.5 0 0 1 0 3m0-3a1.5 1.5 0 0 0 0 3m0 9.75V10.5"})],-1)),t[84]||(t[84]=Y("  ")),l("p",null,i(e(v)("all_filters")),1)],4)]),t[96]||(t[96]=l("hr",{class:"my-4 border-[#D1D1D1]"},null,-1)),jo.value.length>=1?(a(),r("div",Kd,[(a(!0),r(M,null,P(jo.value,s=>(a(),r("div",{key:s,class:"flex items-center border rounded-full py-1.5 pl-4 md:pl-6 gap-2 font-bold w-[90px] md:w-[110px] text-14px md:text-base",style:p({color:e(u).color,borderColor:e(u).color})},[Y(i(s)+" "+i(e(v)("star"))+" ",1),l("button",{onClick:h=>Pr(s),class:"flex items-center justify-center cursor-pointer rounded-full p-1 transition"},t[85]||(t[85]=[l("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"3",stroke:"currentColor",class:"h-4 w-4 md:h-5 md:w-5"},[l("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M6 18 
318 6M6 6l12 12"})],-1)]),8,Gd)],4))),128))])):_("",!0),fl.value?_("",!0):(a(),r("div",Jd,[l("div",{class:"flex flex-col items-center w-full py-4 md:py-6 md:w-1/3 rounded-lg",style:p({backgroundColor:e(u).color_nav,border:"1px solid "+e(u).color})},[l("p",Xd,i(L.value.product_rating_avg.toFixed(1)),1),l("div",ep,[(a(),r(M,null,P(5,s=>l("div",{key:s,class:"relative w-6 h-6"},[l("div",{class:"absolute top-0 left-0 h-full overflow-hidden",style:p({width:s<=Math.floor(L.value.product_rating_avg)?"100%":s-.5<=L.value.product_rating_avg?"50%":"0%",color:e(u).color})},t[86]||(t[86]=[l("svg",{xmlns:"http://www.w3.org/2000/svg",class:"w-6 h-6",viewBox:"0 0 24 24",fill:"currentColor"},[l("path",{d:"M12 .587l3.668 7.431L24 9.753l-6 5.847 1.417 8.27L12 19.771l-7.417 4.099L6 15.6 0 9.753l8.332-1.735z"})],-1)]),4),t[87]||(t[87]=l("svg",{xmlns:"http://www.w3.org/2000/svg",class:"w-6 h-6 text-gray-300",viewBox:"0 0 24 24",fill:"currentColor"},[l("path",{d:"M12 .587l3.668 7.431L24 9.753l-6 5.847 1.417 8.27L12 19.771l-7.417 4.099L6 15.6 0 9.753l8.332-1.735z"})],-1))])),64))]),l("p",tp,"("+i((Ia=(Pa=L.value)==null?void 0:Pa.total_star)==null?void 0:Ia.all_star)+" "+i(e(v)("re"))+")",1)],4),fl.value?_("",!0):(a(),r("div",lp,[(a(!0),r(M,null,P(Sr.value,(s,h)=>(a(),r("div",{key:h,class:"flex items-center gap-2 text-sm"},[l("span",op,i(s.star),1),(a(),r("svg",{xmlns:"http://www.w3.org/2000/svg",class:"w-4 h-4",style:p({color:e(u).color}),viewBox:"0 0 24 24",fill:"currentColor"},t[88]||(t[88]=[l("path",{d:"M12 .587l3.668 7.431L24 9.753l-6 5.847 1.417 8.27L12 19.771l-7.417 4.099L6 15.6 0 9.753l8.332-1.735z"},null,-1)]),4)),l("div",sp,[l("div",{class:"h-full rounded-full",style:p({width:s.percent+"%",backgroundColor:e(u).color})},null,4)]),l("span",ap,i(s.count),1)]))),128))]))])),l("div",null,[l("div",rp,[l("div",np,[l("div",{ref_key:"reviewHeader",ref:Lo,class:"p-4 relative"},[l("button",{onClick:t[37]||(t[37]=s=>ao("all")),class:j(["cursor-pointer text-base",{"font-bold":Ze.value==="all"}]),style:p({color:Ze.value==="all"?e(u).color:"black"})},i(e(v)("all"))+" ("+i((Da=L.value)==null?void 0:Da.total_comment)+") ",7),Ze.value==="all"?(a(),r("div",{key:0,class:"absolute left-0 bottom-0 w-full h-[2px]",style:p({backgroundColor:e(u).color})},null,4)):_("",!0)],512),l("div",ip,[l("button",{onClick:t[38]||(t[38]=s=>ao("video")),class:j(["cursor-pointer text-base",{"font-bold":Ze.value==="video"}]),style:p({color:Ze.value==="video"?e(u).color:"black"})},i(e(v)("img_video"))+" ("+i((Ea=L.value)==null?void 0:Ea.total_comment_media)+") ",7),Ze.value==="video"?(a(),r("div",{key:0,class:"absolute left-0 bottom-0 w-full h-[2px]",style:p({backgroundColor:e(u).color})},null,4)):_("",!0)])]),t[89]||(t[89]=l("hr",{class:"border-[#D1D1D1] mb-[18px]"},null,-1))]),cl.value.length<1?(a(),r("div",up,[l("p",null,i(Ze.value=="video"?e(v)("no_pic_review"):e(v)("no_review")),1)])):_("",!0),(a(!0),r(M,null,P(cl.value,s=>(a(),r("div",{key:s.id,class:"review-card mb-[32px] xl:mb-[64px]"},[l("div",cp,[s.user_image?(a(),r("img",{key:0,src:s.user_image,alt:"user avatar",class:"w-12 h-12 rounded-full object-cover shrink-0 allow-rounded"},null,8,dp)):(a(),r("svg",{key:1,xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor",class:"w-12 h-12 rounded-full p-1 shrink-0",style:p({color:e(u).color})},t[90]||(t[90]=[l("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M17.982 18.725A7.488 7.488 0 0 0 12 15.75a7.488 7.488 0 0 0-5.982 2.975m11.963 0a9 9 0 1 0-11.963 0m11.963 0A8.966 8.966 0 0 1 12 21a8.966 8.966 0 0 1-5.982-2.275M15 9.75a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z"},null,-1)]),4)),l("div",null,[l("p",pp,i(s.hide_username==="no"?s.created_by:Bo(s.created_by)),1),l("div",vp,[(a(),r(M,null,P(5,h=>l("span",{key:h,style:p({color:e(u).color})},[h<=s.stars?(a(),r("svg",_p,t[91]||(t[91]=[l("path",{d:"M3.612 15.443c-.396.198-.86-.106-.746-.555l.83-4.73-3.523-3.356c-.33-.315-.158-.888.283-.95l4.898-.696 2.186-4.437c.197-.4.73-.4.927 0l2.186 4.437 4.898.696c.441.062.613.635.283.95l-3.523 3.356.83 4.73c.114.449-.35.753-.746.555L8 13.187l-4.389 2.256z"},null,-1)]))):(a(),r("svg",fp,t[92]||(t[92]=[l("path",{d:"M12 .587l3.668 7.431L24 9.753l-6 5.847 1.417 8.27L12 19.771l-7.417 4.099L6 15.6 0 9.753l8.332-1.735z"},null,-1)])))],4)),64))]),l("div",xp,[l("p",mp,i(s.comment),1),l("div",hp,[s.image_data.length>0?(a(),r("div",bp,[(a(!0),r(M,null,P(s.image_data,h=>(a(),r("img",{key:h.id,src:h.image_path||e(ue),class:"w-20 h-20 object-cover rounded cursor-pointer",onClick:W=>pl(s,{type:"image",src:h.image_path})},null,8,gp))),128))])):_("",!0),s.video_data?(a(),r("div",{key:1,class:"w-20 h-20 rounded overflow-hidden relative cursor-pointer",onClick:h=>pl(s,{type:"video",src:s.video_data})},[l("img",{src:Mt.value[s.id]||e(Ha),class:"w-full h-full object-cover"},null,8,wp),l("div",kp,[t[93]||(t[93]=l("span",{class:"text-white text-xs"},[l("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"white",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor",class:"size-6"},[l("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"m15.75 10.5 4.72-4.72a.75.75 0 0 1 1.28.53v11.38a.75.75 0 0 1-1.28.53l-4.72-4.72M4.5 18.75h9a2.25 2.25 0 0 0 2.25-2.25v-9a2.25 2.25 0 0 0-2.25-2.25h-9A2.25 2.25 0 0 0 2.25 7.5v9a2.25 2.25 0 0 0 2.25 2.25Z"})])],-1)),l("span",Cp,i(s.video_duration||"0:00"),1)])],8,yp)):_("",!0)]),l("div",$p,[Y(i(Po(s.date))+", "+i(Io(s.time))+" | ",1),s!=null&&s.id?(a(),r("span",Sp,i(e(y)==="th"?s==null?void 0:s.product_attribute:s==null?void 0:s.product_attribute_en),1)):_("",!0)])])])]),l("div",jp,[l("p",Mp,i(s.comment),1),l("div",Ap,[(a(!0),r(M,null,P(s.image_data,h=>(a(),r("img",{key:h.id,src:h.image_path||e(ue),class:"w-20 h-20 object-cover rounded cursor-pointer",onClick:W=>pl(s,{type:"image",src:h.image_path})},null,8,Tp))),128)),s.video_data?(a(),r("div",{key:0,class:"w-20 h-20 rounded overflow-hidden relative cursor-pointer",onClick:h=>pl(s,{type:"video",src:s.video_data})},[l("img",{src:Mt.value[s.id]||e(Ha),class:"w-full h-full object-cover"},null,8,Bp),l("div",Pp,[t[94]||(t[94]=l("span",{class:"text-white text-xs"},[l("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"white",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor",class:"size-6"},[l("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"m15.75 10.5 4.72-4.72a.75.75 0 0 1 1.28.53v11.38a.75.75 0 0 1-1.28.53l-4.72-4.72M4.5 18.75h9a2.25 2.25 0 0 0 2.25-2.25v-9a2.25 2.25 0 0 0-2.25-2.25h-9A2.25 2.25 0 0 0 2.25 7.5v9a2.25 2.25 0 0 0 2.25 2.25Z"})])],-1)),l("span",Ip,i(s.video_duration||"0:00"),1)])],8,Lp)):_("",!0)]),l("div",Dp,i(Po(s.date))+", "+i(Io(s.time))+" | "+i(e(y)==="th"?s.product_attribute:s.product_attribute_en||s.product_attribute),1)]),t[95]||(t[95]=l("hr",{class:"my-6 border-t-1 border-[#F5F5F5]"},null,-1))]))),128)),l("div",Ep,[l("p",null,i(e(v)("show_"))+" "+i(Cr.value)+" - "+i($r.value)+" "+i(e(v)("show_1"))+" "+i(dl.value?L.value.total_comment_media:L.value.total_comment)+" "+i(e(v)("show_2")),1),l("div",Np,[l("button",{disabled:L.value.current_page===1,onClick:t[39]||(t[39]=s=>Pe(L.value.current_page-1,!0)),class:"w-8 h-8 text-2xl rounded-full disabled:opacity-50 disabled:cursor-default cursor-pointer flex justify-center items-center"}," ‹ ",8,qp),(a(!0),r(M,null,P(Do.value,s=>(a(),r(M,{key:s},[s!=="..."?(a(),r("button",{key:0,class:"w-8 h-8 rounded-full text-base flex justify-center items-center cursor-pointer disabled:cursor-default",style:p(s===L.value.current_page?{backgroundColor:e(u).color,color:"white"}:{}),onClick:h=>Pe(s,!0)},i(s),13,Rp)):(a(),r("span",zp,"..."))],64))),128)),Do.value.length<1?(a(),r("button",{key:0,class:"w-8 h-8 rounded-full text-base flex justify-center items-center",style:p({backgroundColor:e(u).color,color:"white"})}," 1 ",4)):_("",!0),l("button",{disabled:L.value.current_page===L.value.last_page||L.value.last_page==0,onClick:t[40]||(t[40]=s=>Pe(L.value.current_page+1,!0)),class:"w-8 h-8 text-2xl rounded-full disabled:opacity-50 cursor-pointer disabled:cursor-default flex justify-center items-center"}," › ",8,Fp)])])])])):_("",!0),Al.value.length>0?(a(),r("div",Op,[l("h2",null,[l("p",Up,i(e(v)("related_products")),1)]),!e(u).isType2&&!e(gl)?(a(),r("div",Vp,[V(e(br),{productlist:Al.value.slice(0,20),modules:[e(El)],counter:e(u)},null,8,["productlist","modules","counter"])])):_("",!0),e(u).isType2&&!e(gl)?(a(),r("div",Hp,[V(g,{productlist:Al.value.slice(0,20),modules:[e(El)],counter:e(u)},null,8,["productlist","modules","counter"])])):_("",!0)])):_("",!0)])]),e(N).isLoadingPayment?(a(),ke(Xr,{key:0})):_("",!0),V(rn),V(Ft,{name:"fade"},{default:U(()=>[vl.value?(a(),r("div",Zp,[l("div",{class:"flex flex-col h-full w-full bg-white p-4 md:p-8",style:p({color:e(u).black})},[l("div",Yp,[l("span",Qp,i(e(y)==="th"?e(n).product_detail.product_name:e(n).product_detail.product_name_en||e(n).product_detail.product_name),1),V(e(_n),{class:"w-5 h-5 cursor-pointer shrink-0",onClick:t[41]||(t[41]=s=>Er())})]),l("div",Wp,[l("div",Kp,[l("button",{class:j(["absolute z-20 justify-center items-center left-0 w-10 h-10 rounded-full hidden md:flex",[I.value===0?"bg-[#E7E7E7]":"shadow-xl border border-[#10182814] bg-white"]]),onClick:io,disabled:I.value===0}
3,[V(e(fn),{class:"w-5 h-5",style:p({color:I.value===0?"#A4A4A4":""})},null,8,["style"])],10,Gp),V(e(Vt),{slidesPerView:1,spaceBetween:10,observer:!0,observeParents:!0,onSwiper:t[42]||(t[42]=s=>Ge.value=s),onSlideChange:Nr,class:"w-full h-full z-10"},{default:U(()=>[(a(!0),r(M,null,P(R.value,(s,h)=>(a(),ke(e(Ut),{key:"main-"+h,class:"w-full h-full"},{default:U(()=>[l("div",Jp,[l("img",{src:s.original_media_path||s.media_path||e(ue),alt:"Main Product Image",class:"w-full h-full !object-contain"},null,8,Xp)])]),_:2},1024))),128))]),_:1}),l("button",{class:j(["absolute z-20 justify-center items-center right-0 w-10 h-10 rounded-full hidden md:flex",[I.value===R.value.length-1?"bg-[#E7E7E7]":"shadow-xl border border-[#10182814] bg-white"]]),onClick:uo,disabled:I.value===R.value.length-1},[V(e(xn),{class:"w-5 h-5",style:p({color:I.value===R.value.length-1?"#A4A4A4":""})},null,8,["style"])],10,ev)]),l("div",tv,[V(e(Vt),{slidesPerView:4,spaceBetween:12,observer:!0,observeParents:!0,onSwiper:t[43]||(t[43]=s=>Ke.value=s),class:"mySwiper mySwiper--orange max-w-full"},{default:U(()=>[(a(!0),r(M,null,P(R.value,(s,h)=>(a(),ke(e(Ut),{key:"thumb-"+h},{default:U(()=>[l("img",{src:wo(s.media_path||e(ue)),alt:"Thumbnail",onClick:W=>no(h),style:p([`border: ${I.value==h?"2px solid "+e(Q):"1px solid #ccc"}`,{"aspect-ratio":"1 / 1","object-fit":"contain"}]),class:"!w-13 !h-13 md:!w-20 md:!h-20 border cursor-pointer object-cover rounded-lg"},null,12,lv)]),_:2},1024))),128))]),_:1})])])],4)])):_("",!0)]),_:1}),V(Ft,{"enter-active-class":"transition duration-300 ease-out","enter-from-class":"translate-y-full opacity-0","enter-to-class":"translate-y-0 opacity-100","leave-active-class":"transition duration-200 ease-in","leave-from-class":"translate-y-0 opacity-100","leave-to-class":"translate-y-full opacity-0"},{default:U(()=>{var s,h,W,Ae,gt,Na;return[fe.value?(a(),r("div",ov,[l("div",sv,[l("div",av,[l("div",rv,[l("img",{src:R.value[I.value].original_media_path||R.value[I.value].media_path||e(ue),alt:"Product",class:"allow-rounded w-[52px] h-[52px] object-cover border border-gray-200 flex-shrink-0"},null,8,nv),ct.value?ct.value?(a(),r("div",vv,[l("span",_v,i(e(y)==="th"?e(n).product_detail.product_name:e(n).product_detail.product_name_en||e(n).product_detail.product_name),1)])):_("",!0):(a(),r("div",iv,[e(n).product_detail.vat_default==="yes"?(a(),r("div",uv,[l("span",{class:"text-[18px] md:text-2xl font-bold",style:p({color:te.value!==se.value?e(u).price_red:e(u).black})}," ฿"+i(Se(te.value)),5),te.value!==se.value?(a(),r("span",cv," ฿"+i(Se(se.value)),1)):_("",!0)])):(a(),r("div",dv,[l("span",{class:"text-xl md:text-2xl font-bold",style:p({color:ee.value!==se.value?e(u).price_red:e(u).black})}," ฿"+i(Se(ee.value)),5),ee.value!==se.value?(a(),r("span",pv," ฿"+i(Se(se.value)),1)):_("",!0)])),l("p",{class:"text-sm mt-1",style:p({color:e(u).text_color2})}," ("+i(e(v)("item_in_stock"))+" "+i(Number(ve.value).toLocaleString(e(y)))+" "+i(e(v)("xx_products"))+") ",5)]))]),l("button",{onClick:t[44]||(t[44]=D=>fe.value=!1),class:"flex-shrink-0"},t[97]||(t[97]=[l("svg",{xmlns:"http://www.w3.org/2000/svg",class:"w-7 h-7 cursor-pointer",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[l("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M6 18L18 6M6 6l12 12"})],-1)]))]),l("div",{class:"w-full h-[1px] my-4",style:p({backgroundColor:e(u).underline_color||"#E5E5E5"})},null,4),((h=(s=e(it))==null?void 0:s.query_result)==null?void 0:h.length)>0?(a(),r("div",fv,[l("div",{onClick:t[45]||(t[45]=D=>mt.value=!0),class:"flex items-center gap-4 px-4 justify-center max-w-[270px] h-[32px] rounded-full text-white cursor-pointer",style:p({background:`linear-gradient(150deg, ${e(u).bundle_color1}, ${e(u).bundle_color2})`})},[l("p",xv,i(nl.value[0]),1),t[98]||(t[98]=l("svg",{xmlns:"http://www.w3.org/2000/svg",class:"w-4 h-4 cursor-pointer",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[l("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M9 5l7 7-7 7"})],-1))],4)])):_("",!0),e(n).attribute_manage.length>0?(a(),r("div",mv,[l("div",hv,[l("label",bv,[l("span",gv,[Y(i(e(y)==="th"?e(n).product_detail.ke
3y_1_value:e(n).product_detail.key_1_value_en||e(n).product_detail.key_1_value),1),xe.value?(a(),r("span",yv," - ")):_("",!0)]),l("span",wv,i(xe.value?e(y)==="th"?(W=xe.value)==null?void 0:W.attribute_priority_1:((Ae=xe.value)==null?void 0:Ae.attribute_priority_1_en)||((gt=xe.value)==null?void 0:gt.attribute_priority_1):""),1)]),Yl.value?(a(),r("div",kv,[(a(!0),r(M,null,P(e(n).attribute_manage,(D,De)=>{var Nt,Pl,qa,Ra,za;return a(),r("div",{key:De,class:"flex flex-col items-center"},[e(n).product_detail.have_attribute_icon==="no"?(a(),r("div",Cv,[l("button",{disabled:!al.value&&((Pl=(Nt=D==null?void 0:D.attribute_priority_2)==null?void 0:Nt[0])==null?void 0:Pl.product_effective_stock)===0,onClick:pe(Rr=>{var Fa,Oa;return(al.value||((Oa=(Fa=D==null?void 0:D.attribute_priority_2)==null?void 0:Fa[0])==null?void 0:Oa.product_effective_stock)!==0)&&pt(De)},["prevent"]),class:j(["disabled:cursor-not-allowed rounded-full px-4 py-2 border border-[var(--bg-color)] flex-shrink-0 md:flex-shrink cursor-pointer",[!al.value&&((Ra=(qa=D==null?void 0:D.attribute_priority_2)==null?void 0:qa[0])==null?void 0:Ra.product_effective_stock)===0?"bg-gray-50 text-[#A4A4A4] border-gray-300":q.value===De?"bg-[var(--bg-color)] text-white font-semibold":"bg-white hover:bg-gray-100 text-black"]]),style:p({"--bg-color":e(u).color})},i(e(y)==="th"?D==null?void 0:D.attribute_priority_1:(D==null?void 0:D.attribute_priority_1_en)||(D==null?void 0:D.attribute_priority_1)),15,$v)])):(a(),r("div",{key:1,class:j(["flex flex-col items-center rounded-lg overflow-hidden",[Be(De)===0?"out-of-stock":"cursor-pointer"]]),style:p({border:q.value===De?`1px solid ${e(u).color}`:""})},[l("img",{src:((za=D.attribute_icon)==null?void 0:za.image_data)||e(ue),class:j(["size-[52px] md:size-[52px] xl:size-[80px] object-contain",Be(De)===0?"is-disabled":""]),onClick:pe(Rr=>Be(De)!=0&&pt(De),["prevent"]),loading:"lazy",decoding:"async",style:p({"--bg-color":e(u).color})},null,14,Sv)],6))])}),128))])):_("",!0)]),l("hr",{class:"h-[1px] mt-6 w-full",style:p({borderColor:e(u).underline_color})},null,4),(Na=he.value[0])!=null&&Na.product_attribute_value?(a(),r("div",jv,[l("label",Mv,[l("span",Av,[Y(i(e(y)==="th"?e(n).product_detail.key_2_value:e(n).product_detail.key_2_value_en||e(n).product_detail.key_2_value)+" ",1),C.value?(a(),r("span",Tv," - ")):_("",!0)]),l("span",Lv,i(C.value?e(y)==="th"?C.value.product_attribute_value:C.value.product_attribute_value_en||C.value.product_attribute_value:""),1)]),l("div",Bv,[(a(!0),r(M,null,P(he.value,(D,De)=>{var Nt;return a(),r("button",{key:De,onClick:Pl=>Ml(D),disabled:D.product_effective_stock===0,class:j(["rounded-full disabled:cursor-not-allowed px-4 py-[8px] border border-[var(--bg-color)]",D.product_effective_stock===0?"bg-white text-[#A4A4A4]":((Nt=C.value)==null?void 0:Nt.product_attribute_value)===D.product_attribute_value?"bg-[var(--bg-color)] text-white font-semibold":"bg-white hover:bg-gray-100"]),style:p({"--bg-color":e(u).color})},i(e(y)==="th"?D.product_attribute_value:D.product_attribute_value_en||D.product_attribute_value),15,Pv)}),128))])])):_("",!0)])):_("",!0),eo.value?(a(),r("div",Iv,[l("div",Dv,[l("div",{style:p(`border-color: ${e(Q)}; color: ${e(Q)};`),class:"flex items-center justify-between w-32 h-10 border px-4 flex-shrink-0 rounded-full"},[l("button",{disabled:F.value<=le.value,class:"text-xl",onClick:t[46]||(t[46]=D=>Xt(-1))}," − ",8,Ev),l("input",{type:"number",inputmode:"numeric",class:"w-full h-full text-center font-semibold text-black outline-none",value:bt.value,onInput:Gl},null,40,Nv),l("button",{disabled:F.value>=ve.value||F.value>=me.value,class:"text-xl",onClick:t[47]||(t[47]=D=>Xt(1))}," + ",8,qv)],4),l("button",{disabled:ge.value,onClick:ul,class:"cursor-pointer py-2 px-4 border transition-all duration-200 flex-grow text-sm md:text-sm lg:text-base xl:text-base rounded-full",style:p(ge.value?"border-color: #ccc; color: #ccc; background-color: #f5f5f5; cursor: not-allowed;":`border-color: ${e(Q)}; color: ${e(Q)};`)},i(e(v)("add_to_cart")),13,Rv)]),l("div",zv,[l("button",{disabled:ge.value,onClick:t[48]||(t[48]=D=>ul("goCart")),class:"cursor-pointer py-2 px-4 border transition-all duration-200 flex-grow text-sm md:text-sm lg:text-base xl:text-base rounded-full",style:p(ge.value?"border-color: #ccc; color: #ccc; background-color: #f5f5f5;
3 cursor: not-allowed;":`background-color: ${e(Q)}; color: white;`)},i(e(v)("buy_now")),13,Fv)])])):_("",!0)])])):_("",!0)]}),_:1})],64)}}},__=ql(Uv,[["__scopeId","data-v-dd0260f7"]]);export{__ as default};

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.