1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8450],{4853:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),!function(e,t){for(var s in t)Object.defineProperty(e,s,{enumerable:!0,get:t[s]})}(t,{cancelIdleCallback:function(){return l},requestIdleCallback:function(){return s}});let s="undefined"!=typeof self&&self.requestIdleCallback&&self.requestIdleCallback.bind(window)||function(e){let t=Date.now();return self.setTimeout(function(){e({didTimeout:!1,timeRemaining:function(){return Math.max(0,50-(Date.now()-t))}})},1)},l="undefined"!=typeof self&&self.cancelIdleCallback&&self.cancelIdleCallback.bind(window)||function(e){return clearTimeout(e)};("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},7639:(e,t,s)=>{Promise.resolve().then(s.bind(s,91251)),Promise.resolve().then(s.bind(s,23637)),Promise.resolve().then(s.bind(s,49730)),Promise.resolve().then(s.bind(s,40045)),Promise.resolve().then(s.bind(s,41448)),Promise.resolve().then(s.bind(s,65770)),Promise.resolve().then(s.bind(s,16193)),Promise.resolve().then(s.bind(s,30293)),Promise.resolve().then(s.bind(s,98645)),Promise.resolve().then(s.bind(s,54989)),Promise.resolve().then(s.bind(s,98828)),Promise.resolve().then(s.bind(s,67649)),Promise.resolve().then(s.bind(s,51349)),Promise.resolve().then(s.bind(s,93691)),Promise.resolve().then(s.bind(s,58558)),Promise.resolve().then(s.bind(s,28713)),Promise.resolve().then(s.t.bind(s,52619,23)),Promise.resolve().then(s.t.bind(s,41402,23)),Promise.resolve().then(s.bind(s,24437)),Promise.resolve().then(s.bind(s,36552)),Promise.resolve().then(s.t.bind(s,44346,23)),Promise.resolve().then(s.bind(s,86122)),Promise.resolve().then(s.t.bind(s,2878,23))},16193:(e,t,s)=>{"use strict";s.d(t,{default:()=>o});var l=s(95155),r=s(12115),a=s(20063),n=s(40045);function i(){let e=(0,a.useSearchParams)(),t=(0,a.useRouter)(),s=(0,a.usePathname)(),{openAuthModal:l}=(0,n.X)();return(0,r.useEffect)(()=>{let r=e.get("reset_token");if(!r)return;l("set-new-password",r);let a=new URLSearchParams(e.toString());a.delete("reset_token");let n=a.toString();t.replace(n?"".concat(s,"?").concat(n):s,{scroll:!1})},[e]),null}function o(){return(0,l.jsx)(r.Suspense,{fallback:null,children:(0,l.jsx)(i,{})})}},21866:e=>{"use strict";e.exports=JSON.parse('{"_P":{"DD":"VinaSources - Comprehensive Sourcing Solution for Cross-Border E-Commerce","Ay":"/","wm":"/icons/wws/logo-vinasources.svg","ZW":"200","kz":"40","Ep":"Leadsgen"},"z6":{"s":true,"n":"https://supplier.vinasources.com"},"qr":{"w":"/images/logo-vinasources-footer.svg"}}')},23637:(e,t,s)=>{"use strict";s.d(t,{FloatingChatWrapper:()=>o});var l=s(95155),r=s(67909),a=s(15239);let n=(0,r.default)(()=>Promise.all([s.e(9386),s.e(2076),s.e(7823)]).then(s.bind(s,37823)),{loadableGenerated:{webpack:()=>[37823]},ssr:!1,loading:()=>null});function i(){return(0,l.jsx)("a",{href:"https://wa.me/84989229150?text=Chat%20with%20us%20on%20WhatsApp",target:"_blank",rel:"noopener noreferrer","aria-label":"Chat with us on WhatsApp",style:{position:"fixed",bottom:"88px",right:"24px",width:"52px",height:"52px",zIndex:9998,borderRadius:"50%",boxShadow:"0 4px 16px rgba(37,211,102,0.45)",display:"block"},children:(0,l.jsx)(a.default,{src:"/icons/whatsapp.png",alt:"WhatsApp",width:52,height:52,style:{width:"100%",height:"100%",display:"block"}})})}function o(){return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(i,{}),(0,l.jsx)(n,{})]})}},30293:(e,t,s)=>{"use strict";s.d(t,{default:()=>c});var l=s(95155),r=s(12115),a=s(36489),n=s(49730),i=s(27515),o=s(42262);function c(){let{isAuthenticated:e}=(0,n.A)(),[t,s]=(0,r.useState)(!1),[c,d]=(0,r.useState)(""),[u,x]=(0,r.useState)("success"),p=(e,t)=>{"clickaway"!==t&&s(!1)},h=(0,r.useCallback)((e,t)=>{d(e),x(t),s(!0)},[]);return(0,r.useEffect)(()=>{if(e)return;let t=setInterval(()=>{if(window.google){let e=window.google;e&&(e.accounts.id.initialize({client_id:"631846091749-3qkpuim11mmm5rb87kq7j1r132fc16ir.apps.googleusercontent.com",callback:async e=>{try{let t=await (0,a.signIn)("google-gsi",{id_token:e.credential,redirect:!1});(null==t?void 0:t.ok)?h("Google login successful!","success"):h("Google login failed. Please try again.","error")}catch(e){console.error("Google login error:",e),h("An error occurred during Google login.","error")}},use_fedcm_for_prompt:!0}),e.accounts.id.prompt(e=>{e.isNotDisplayed()})),clearInterval(t)}},1e3);return()=>clearInterval(t)},[e,h]),(0,l.jsx)(o.A,{open:t,autoHideDuration:4e3,onClose:p,anchorOrigin:{vertical:"top",horizontal:"right"},children:(0,l.jsx)(i.A,{onClose:p,severity:u,variant:"filled",sx:{width:"100%"},children:c})})}},41402:(e,t,s)=>{"use strict";
1Object.defineProperty(t,"__esModule",{value:!0}),!function(e,t){for(var s in t)Object.defineProperty(e,s,{enumerable:!0,get:t[s]})}(t,{default:function(){return g},handleClientScriptLoad:function(){return h},initScriptLoader:function(){return m}});let l=s(28140),r=s(49417),a=s(95155),n=l._(s(47650)),i=r._(s(12115)),o=s(82073),c=s(94681),d=s(4853),u=new Map,x=new Set,p=e=>{let{src:t,id:s,onLoad:l=()=>{},onReady:r=null,dangerouslySetInnerHTML:a,children:i="",strategy:o="afterInteractive",onError:d,stylesheets:p}=e,h=s||t;if(h&&x.has(h))return;if(u.has(t)){x.add(h),u.get(t).then(l,d);return}let m=()=>{r&&r(),x.add(h)},f=document.createElement("script"),g=new Promise((e,t)=>{f.addEventListener("load",function(t){e(),l&&l.call(this,t),m()}),f.addEventListener("error",function(e){t(e)})}).catch(function(e){d&&d(e)});a?(f.innerHTML=a.__html||"",m()):i?(f.textContent="string"==typeof i?i:Array.isArray(i)?i.join(""):"",m()):t&&(f.src=t,u.set(t,g)),(0,c.setAttributesFromProps)(f,e),"worker"===o&&f.setAttribute("type","text/partytown"),f.setAttribute("data-nscript",o),p&&(e=>{if(n.default.preinit)return e.forEach(e=>{n.default.preinit(e,{as:"style"})});{let t=document.head;e.forEach(e=>{let s=document.createElement("link");s.type="text/css",s.rel="stylesheet",s.href=e,t.appendChild(s)})}})(p),document.body.appendChild(f)};function h(e){let{strategy:t="afterInteractive"}=e;"lazyOnload"===t?window.addEventListener("load",()=>{(0,d.requestIdleCallback)(()=>p(e))}):p(e)}function m(e){e.forEach(h),[...document.querySelectorAll('[data-nscript="beforeInteractive"]'),...document.querySelectorAll('[data-nscript="beforePageRender"]')].forEach(e=>{let t=e.id||e.getAttribute("src");x.add(t)})}function f(e){let{id:t,src:s="",onLoad:l=()=>{},onReady:r=null,strategy:c="afterInteractive",onError:u,stylesheets:h,...m}=e,{updateScripts:f,scripts:g,getIsSsr:b,appDir:v,nonce:w}=(0,i.useContext)(o.HeadManagerContext);w=m.nonce||w;let j=(0,i.useRef)(!1);(0,i.useEffect)(()=>{let e=t||s;j.current||(r&&e&&x.has(e)&&r(),j.current=!0)},[r,t,s]);let C=(0,i.useRef)(!1);if((0,i.useEffect)(()=>{if(!C.current){if("afterInteractive"===c)p(e);else"lazyOnload"===c&&("complete"===document.readyState?(0,d.requestIdleCallback)(()=>p(e)):window.addEventListener("load",()=>{(0,d.requestIdleCallback)(()=>p(e))}));C.current=!0}},[e,c]),("beforeInteractive"===c||"worker"===c)&&(f?(g[c]=(g[c]||[]).concat([{id:t,src:s,onLoad:l,onReady:r,onError:u,...m,nonce:w}]),f(g)):b&&b()?x.add(t||s):b&&!b()&&p({...e,nonce:w})),v){if(h&&h.forEach(e=>{n.default.preinit(e,{as:"style"})}),"beforeInteractive"===c)if(!s)return m.dangerouslySetInnerHTML&&(m.children=m.dangerouslySetInnerHTML.__html,delete m.dangerouslySetInnerHTML),(0,a.jsx)("script",{nonce:w,dangerouslySetInnerHTML:{__html:"(self.__next_s=self.__next_s||[]).push("+JSON.stringify([0,{...m,id:t}])+")"}});else return n.default.preload(s,m.integrity?{as:"script",integrity:m.integrity,nonce:w,crossOrigin:m.crossOrigin}:{as:"script",nonce:w,crossOrigin:m.crossOrigin}),(0,a.jsx)("script",{nonce:w,dangerouslySetInnerHTML:{__html:"(self.__next_s=self.__next_s||[]).push("+JSON.stringify([s,{...m,id:t}])+")"}});"afterInteractive"===c&&s&&n.default.preload(s,m.integrity?{as:"script",integrity:m.integrity,nonce:w,crossOrigin:m.crossOrigin}:{as:"script",nonce:w,crossOrigin:m.crossOrigin})}return null}Object.defineProperty(f,"__nextScript",{value:!0});let g=f;("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},44346:e=>{e.exports={style:{fontFamily:"'Manrope', 'Manrope Fallback'",fontStyle:"normal"},className:"__className_73ee6c"}},54989:(e,t,s)=>{"use strict";s.d(t,{default:()=>n});var l=s(12115),r=s(95604),a=s(28550);function n(){let e=(0,r.useLocale)();return(0,l.useEffect)(()=>{let t="country_".concat(e),s="country";(async()=>{try{let l=localStorage.getItem(t);if(l)return void localStorage.setItem(s,l);let r=await fetch((0,a.nn)("".concat("https://api.vinasources.com/psp-buyer/api/v1/vns","/country"),e),{method:"GET",headers:{"Content-Type":"application/json","X-Store-Domain":"vinasources.com"}});if(!r.ok)throw Error("Failed to fetch country");let n=await r.json(),i=JSON.stringify(n.data);localStorage.setItem(t,i),localStorage.setItem(s,i)}catch(e){console.error("Error fetching country:",e)}})()},[e]),null}},67649:(e,t,s)=>{"use strict";s.d(t,{default:()=>eN});var l=s(95155),r=s(21866),a=s(98645),n=s(778);let i=e=>{let{src:t}=e,{Ay:s,wm:i,ZW:o,kz:c,Ep:d,DD:u}=r._P;return(0,l.jsx)(n.N_,{href:s,className:"navbar-brand flex py-1 ms-auto",style:{height:c.replace("px","")+"px",width:o.replace("px","")+"px"},children:t||i?(0,l.jsx)(a.default,{width:2*o.replace("px",""),height:2*c.replace("px",""),src:t||i,alt:u,priority:!0}):d||u})};var o=s(67909),c=s(52619),d=s.n(c),u=s(12115),x=s(95604),p=s(86651),h=s(24033),m=s(27937);
1let f=(0,s(71847).A)("store",[["path",{d:"m2 7 4.41-4.41A2 2 0 0 1 7.83 2h8.34a2 2 0 0 1 1.42.59L22 7",key:"ztvudi"}],["path",{d:"M4 12v8a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-8",key:"1b2hhj"}],["path",{d:"M15 22v-4a2 2 0 0 0-2-2h-2a2 2 0 0 0-2 2v4",key:"2ebpfo"}],["path",{d:"M2 7h20",key:"1fcdvo"}],["path",{d:"M22 7v3a2 2 0 0 1-2 2a2.7 2.7 0 0 1-1.59-.63.7.7 0 0 0-.82 0A2.7 2.7 0 0 1 16 12a2.7 2.7 0 0 1-1.59-.63.7.7 0 0 0-.82 0A2.7 2.7 0 0 1 12 12a2.7 2.7 0 0 1-1.59-.63.7.7 0 0 0-.82 0A2.7 2.7 0 0 1 8 12a2.7 2.7 0 0 1-1.59-.63.7.7 0 0 0-.82 0A2.7 2.7 0 0 1 4 12a2 2 0 0 1-2-2V7",key:"6c3vgh"}]]);var g=s(90368),b=s(2795);let v={src:"/_next/static/media/icon-menu.1a003b20.svg",height:24,width:24,blurWidth:0,blurHeight:0},w={src:"/_next/static/media/icon-vina-mobile.f30ac40f.svg",height:28,width:132,blurWidth:0,blurHeight:0},j={src:"/_next/static/media/icon_category.61c5feb3.svg",height:20,width:20,blurWidth:0,blurHeight:0},C={src:"/_next/static/media/icon_today.978d7e2f.svg",height:20,width:20,blurWidth:0,blurHeight:0},N={src:"/_next/static/media/icon_most.6c9e5743.svg",height:20,width:20,blurWidth:0,blurHeight:0},y={src:"/_next/static/media/icon_new_arrivals.91230392.svg",height:20,width:20,blurWidth:0,blurHeight:0},k={src:"/_next/static/media/icon_low.807c10f9.svg",height:20,width:20,blurWidth:0,blurHeight:0},_={src:"/_next/static/media/icon_oem.2a687a5c.svg",height:20,width:20,blurWidth:0,blurHeight:0},S={src:"/_next/static/media/icon_analyst.bff2e2e7.svg",height:20,width:20,blurWidth:0,blurHeight:0};var A=s(51349),L=s(36489),P=s(27515),T=s(42262),M=s(27855),E=s(41942),H=s(60193),F=s(29999),I=s(92265),q=s(29310),R=s(96823);function O(e){let{open:t,onSuccess:s,onError:r,redirectUrl:a="/"}=e,n=(0,u.useRef)(null),i=(0,u.useRef)(!1),o=(0,u.useCallback)(e=>{s(e)},[s]),c=(0,u.useCallback)(e=>{null==r||r(e)},[r]);return(0,u.useEffect)(()=>{let e;return window.google,t&&window.google&&!i.current&&(e=setTimeout(()=>{let e=window.google;e.accounts.id.initialize({client_id:"631846091749-3qkpuim11mmm5rb87kq7j1r132fc16ir.apps.googleusercontent.com",use_fedcm_for_prompt:!1,callback:async e=>{try{let t=await (0,L.signIn)("google-gsi",{id_token:e.credential,redirect:!1});(null==t?void 0:t.ok)?o("Google login successful!"):c("Google login failed. Please try again.")}catch(e){console.error("Google login error:",e),c("An error occurred during Google login.")}}}),n.current&&e.accounts.id.renderButton(n.current,{theme:"outline",size:"large",width:n.current.offsetWidth||532,text:"signin_with",shape:"rectangular",logo_alignment:"left"}),i.current=!0},500)),()=>clearTimeout(e)},[t,o,c]),(0,u.useEffect)(()=>{t||(i.current=!1)},[t]),(0,l.jsx)("div",{ref:n,className:"w-full flex justify-center",id:"google-login-button"})}function z(e){let{onTokenChange:t,onError:s,theme:r="light",resetTrigger:a=0}=e,n=(0,u.useRef)(null),[i,o]=(0,u.useState)(!0);return(0,u.useEffect)(()=>{if(window.turnstile)window.turnstile&&o(!1);else{let e=document.createElement("script");e.src="https://challenges.cloudflare.com/turnstile/v0/api.js",e.async=!0,e.defer=!0,e.onload=()=>o(!1),document.body.appendChild(e)}},[]),(0,u.useEffect)(()=>(!i&&n.current&&window.turnstile&&window.turnstile.render("#".concat(n.current.id),{sitekey:"0x4AAAAAACI0_v7ilwZWqkex",theme:r,callback:e=>{t(e)},"error-callback":()=>{t(null),null==s||s("CAPTCHA verification failed. Please try again.")},"expired-callback":()=>{t(null)}}),()=>{if(n.current&&window.turnstile)try{window.turnstile.remove("#".concat(n.current.id))}catch(e){console.error("Error removing Turnstile:",e)}}),[i,t,s,r]),(0,u.useEffect)(()=>{a>0&&n.current&&window.turnstile&&(window.turnstile.reset("#".concat(n.current.id)),t(null))},[a,t]),(0,l.jsx)("div",{ref:n,id:"cloudflare-turnstile",className:"flex justify-center my-4"})}let D=(0,o.default)(()=>s.e(177).then(s.bind(s,91409)),{loadableGenerated:{webpack:()=>[null]},ssr:!1}),G=(0,o.default)(()=>s.e(177).then(s.bind(s,41907)),{loadableGenerated:{webpack:()=>[null]},ssr:!1}),Z=(0,o.default)(()=>s.e(177).then(s.bind(s,50236)),{loadableGenerated:{webpack:()=>[null]},ssr:!1}),B=(0,o.default)(()=>s.e(177).then(s.bind(s,60590)),{loadableGenerated:{webpack:()=>[null]},ssr:!1}),W=(0,o.default)(()=>s.e(177).then(s.bind(s,72699)),{loadableGenerated:{webpack:()=>[null]},ssr:!1});function V(e){let{open:t,onClose:s,switchToSignup:r,switchToForgot:a}=e,n=(0,x.useTranslations)("Auth.login"),[i,o]=(0,u.useState)(""),[c,d]=(0,u.useState)(""),[p,h]=(0,u.useState)(!1),[m,f]=(0,u.useState)(""),[g,b]=(0,u.useState)(""),[v,w]=(0,u.useState)(!1),[j,C]=(0,u.useState)(""),[N,y]=(0,u.useState)("success"),[k,_]=(0,u.useState)(null),[S,A]=(0,u.useState)(""),[V,U]=(0,u.useState)(0);(0,u.useCallback)(e=>{_(e)},[]);let J=async e=>{if(e.preventDefault(),!k)return void A("Please complete CAPTCHA");let t=await (0,L.signIn)("credentials",{redirect:!1,email:i,password:c,
1captchaToken:k});(null==t?void 0:t.ok)?(s(),C(n("success")),y("success")):(U(e=>e+1),C(n("failed")),y("error")),w(!0)},X=(e,t)=>{"clickaway"!==t&&w(!1)};return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(D,{open:t,onClose:s,PaperProps:{sx:{maxWidth:"612px !important",width:"100%",borderRadius:"16px"}},children:[(0,l.jsx)(H.A,{"aria-label":"close",onClick:s,sx:{position:"absolute",right:20,top:20,padding:0,width:32,height:32},children:(0,l.jsx)(F.A,{className:"w-[15px] h-[15px]"})}),(0,l.jsxs)("div",{className:"bg-white rounded-[16px] shadow-lg w-full md:p-10 pb-4 font-primary p-6",children:[(0,l.jsx)(G,{className:"text-center text-32px font-semibold text-primary p-0",children:n("title")}),(0,l.jsx)(W,{className:"text-center mb-10 mt-4 text-14px font-primary text-[#667085]",children:n("subtitle")}),(0,l.jsx)(Z,{className:"p-0 overflow-hidden",children:(0,l.jsx)("form",{onSubmit:J,children:(0,l.jsxs)(E.A,{spacing:2,children:[(0,l.jsxs)("div",{className:"relative",children:[(0,l.jsx)("label",{htmlFor:"email",className:"absolute text-[#101828] text-14px left-0 top-0",children:n("emailLabel")}),(0,l.jsx)("input",{id:"email",type:"email",placeholder:n("emailPlaceholder"),value:i,onChange:e=>{o(e.target.value),m&&f("")},required:!0,className:"w-full p-3 pl-3 mt-6 border rounded-lg focus:outline-none focus:ring-0 ".concat(m?"border-red-500 focus:ring-red-500":"border-gray-300 focus:ring-blue-500")}),m&&(0,l.jsx)("p",{className:"text-red-500 text-14px mt-1",children:m})]}),(0,l.jsxs)("div",{className:"relative",children:[(0,l.jsx)("label",{htmlFor:"password",className:"absolute font-primary text-[#101828] text-14px left-0 top-0",children:n("passwordLabel")}),(0,l.jsx)("input",{id:"password",type:p?"text":"password",placeholder:n("passwordPlaceholder"),value:c,onChange:e=>{d(e.target.value),g&&b("")},required:!0,className:"w-full p-3 pl-3 mt-6 border font-primary rounded-lg focus:outline-none focus:ring-0 ".concat(g?"border-red-500 focus:ring-red-500":"border-gray-300 focus:ring-blue-500")}),(0,l.jsx)(H.A,{onClick:()=>h(e=>!e),edge:"end",className:"absolute right-3 bottom-[5px]",children:p?(0,l.jsx)(I.A,{}):(0,l.jsx)(q.A,{})}),g&&(0,l.jsx)("p",{className:"text-red-500 text-14px mt-1",children:g})]}),(0,l.jsx)("button",{type:"button",className:"text-14px text-right text-[#667085]",onClick:a,children:n("forgotPassword")}),(0,l.jsx)(z,{onTokenChange:_,onError:A,resetTrigger:V}),(0,l.jsx)(M.A,{variant:"contained",type:"submit",className:"bg-primary font-primary text-white text-14px w-full py-3 rounded-lg hover:bg-blue-700",children:n("submit")}),(0,l.jsxs)("div",{className:"flex items-center !mt-8 !mb-4",children:[(0,l.jsx)("div",{className:"flex-1 h-px bg-gray-200"}),(0,l.jsx)("span",{className:"px-3 text-gray-400 text-sm",children:n("or")}),(0,l.jsx)("div",{className:"flex-1 h-px bg-gray-200"})]}),(0,l.jsx)(O,{open:t,onSuccess:e=>{s(),C(e),y("success"),w(!0)},onError:C})]})})}),(0,l.jsxs)(B,{className:"justify-center text-[#101828] font-primary",children:[n("noAccount"),(0,l.jsx)(M.A,{type:"button",onClick:r,className:"text-14px normal-case leading-1 font-primary text-blue-600 hover:text-blue-700",children:n("signUpLink")})]})]})]}),(0,l.jsx)(R.A,{children:(0,l.jsx)(T.A,{open:v,autoHideDuration:4e3,onClose:X,anch
1orOrigin:{vertical:"top",horizontal:"right"},sx:{zIndex:9999},children:(0,l.jsx)(P.A,{onClose:X,severity:N,variant:"filled",sx:{width:"100%"},children:j})})})]})}var U=s(40045);let J=(0,o.default)(()=>s.e(177).then(s.bind(s,91409)),{loadableGenerated:{webpack:()=>[null]},ssr:!1}),X=(0,o.default)(()=>s.e(177).then(s.bind(s,41907)),{loadableGenerated:{webpack:()=>[null]},ssr:!1}),K=(0,o.default)(()=>s.e(177).then(s.bind(s,50236)),{loadableGenerated:{webpack:()=>[null]},ssr:!1}),Y=(0,o.default)(()=>s.e(177).then(s.bind(s,60590)),{loadableGenerated:{webpack:()=>[null]},ssr:!1}),$=(0,o.default)(()=>s.e(177).then(s.bind(s,72699)),{loadableGenerated:{webpack:()=>[null]},ssr:!1});function Q(e){let{open:t,onClose:s,switchToLogin:r}=e,a=(0,x.useTranslations)("Auth.signup"),i=(0,x.useTranslations)("Auth.profile"),o=(0,x.useTranslations)("Validation"),[c,d]=(0,u.useState)(""),[p,h]=(0,u.useState)(""),[m,f]=(0,u.useState)(""),[g,b]=(0,u.useState)(""),[v,w]=(0,u.useState)(!1),[j,C]=(0,u.useState)(!1),[N,y]=(0,u.useState)(""),[k,_]=(0,u.useState)(""),[S,A]=(0,u.useState)(""),[L,D]=(0,u.useState)(""),[G,Z]=(0,u.useState)(!1),[B,W]=(0,u.useState)(""),[V,Q]=(0,u.useState)("success"),[ee,et]=(0,u.useState)(null),[es,el]=(0,u.useState)(""),[er,ea]=(0,u.useState)(0),{openAuthModal:en}=(0,U.X)(),ei=(e,t)=>{"clickaway"!==t&&Z(!1)},eo=async e=>{if(e.preventDefault(),!g.trim())return void y(o("nameRequired"));y("");let t=/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(c)?"":"invalidEmail";if(t)return void _(o(t));_("");let s=(e=>{let t=/[a-zA-Z]/.test(e),s=/\d/.test(e);return e.length<8?"passwordTooShort":t&&s?"":"passwordRequirements"})(p);if(s)return void A(o(s));if(A(""),p!==m)return void D(o("passwordMismatch"));if(D(""),!ee)return void el(o("captchaRequired"));try{if(!(await fetch("".concat("https://api.vinasources.com/psp-buyer/api/v1/vns","/register"),{method:"POST",headers:{"Content-Type":"application/json","cf-turnstile-response":ee},body:JSON.stringify({social_source:"gennerate",email:c,password:p,confirm_password:m,name:g,domain_id:"vinasources.com"})})).ok){W(a("emailTaken")),Q("error"),Z(!0),ea(e=>e+1),et(null);return}W(a("success")),Q("success"),Z(!0),setTimeout(()=>{en("login")},1500)}catch(e){console.error(e),alert(i("errorGeneric"))}};return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(J,{open:t,onClose:s,PaperProps:{sx:{maxWidth:"612px !important",width:"100%",borderRadius:"16px"}},children:[(0,l.jsx)(H.A,{"aria-label":"close",onClick:s,sx:{position:"absolute",right:20,top:20,padding:0,width:32,height:32},children:(0,l.jsx)(F.A,{className:"w-[15px] h-[15px]"})}),(0,l.jsxs)("div",{className:"bg-white rounded-[16px] shadow-lg w-full md:p-10 font-primary p-6",children:[(0,l.jsx)(X,{className:"text-center text-32px font-semibold text-primary p-0",children:a("title")}),(0,l.jsx)($,{className:"text-center mt-6 mb-10",children:a("subtitle")}),(0,l.jsxs)(K,{className:"p-0 overflow-hidden",children:[(0,l.jsxs)("form",{onSubmit:eo,children:[(0,l.jsxs)(E.A,{spacing:2,children:[(0,l.jsxs)("div",{className:"relative",children:[(0,l.jsx)("label",{htmlFor:"name",className:"absolute text-[#101828] text-14px left-0 top-0",children:a("nameLabel")}),(0,l.jsx)("input",{id:"name",type:"text",placeholder:a("namePlaceholder"),value:g,onChange:e=>{b(e.target.value),N&&y("")},required:!0,className:"w-full p-3 pl-3 mt-6 border rounded-lg focus:outline-none focus:ring-0 ".concat(N?"border-red-500 focus:ring-red-500":"border-gray-300 focus:ring-blue-500")}),N&&(0,l.jsx)("p",{className:"text-red-500 text-14px mt-1",children:N})]}),(0,l.jsxs)("div",{className:"relative",children:[(0,l.jsx)("label",{htmlFor:"email",className:"absolute text-[#101828] text-14px left-0 top-0",children:a("emailLabel")}),(0,l.jsx)("input",{id:"email",type:"email",placeholder:a("emailPlaceholder"),value:c,onChange:e=>{d(e.target.value),k&&_("")},required:!0,className:"w-full p-3 pl-3 mt-6 border rounded-lg focus:outline-none focus:ring-0 ".concat(k?"border-red-500 focus:ring-red-500":"border-gray-300 focus:ring-blue-500")}),k&&(0,l.jsx)("p",{className:"text-red-500 text-14px mt-1",children:k})]}),(0,l.jsxs)("div",{className:"relative",children:[(0,l.jsx)("label",{htmlFor:"password",className:"absolute text-[#101828] text-14px left-0 top-0",children:a("passwordLabel")}),(0,l.jsx)("input",{id:"password",type:v?"text":"password",placeholder:a("passwordPlaceholder"),value:p,onChange:e=>{h(e.target.value),S&&A("")},required:!0,className:"w-full p-3 pl-3 mt-6 border rounded-lg focus:outline-none focus:ring-0 ".concat(S?"border-red-500 focus:ring-red-500":"border-gray-300 focus:ring-blue-500")}),(0,l.jsx)(H.A,{onClick:()=>w(e=>!e),edge:"end",className:"absolute right-3 bottom-[5px] ".concat(S?"top-0":""),children:v?(0,l.jsx)(I.A,{}):(0,l.jsx)(q.A,{})}),S&&(0,l.jsx)("p",{className:"text-red-500 text-14px mt-1",children:S})]}),(0,l.jsxs)("div",{className:"relative",children:[(0,l.jsx)("label",{htmlFor:"confirmPassword",className:"absolute text-[#101828] text-14px left-0 top-0",children:a("confirmPasswordLabel")}),(0,l.jsx)("input",{id:"confirmPassword",type:j?"text":"password",placeholder:a("confirmPasswordPlaceholder"),value:m,onChange:e=>{f(e.target.value),L&&D("")},required:!0,className:"w-full p-3 pl-3 mt-6 border rounded-lg focus:outline-none focus:ring-0 ".concat(L?"border-red-500 focus:ring-red-500":"border-gray-300 focus:ring-blue-500")}),(0,l.jsx)(H.A,{onClick:()=>C(e=>!e),edge:"end",className:"absolute right-3 bottom-[5px] ".concat(L?"top-0":""),children:j?(0,l.jsx)(I.A,{}):(0,l.jsx)(q.A,{})}),L&&(0,l.jsx)("p",{className:"text-red-500 text-14px mt-1",children:L})]}),(0,l.jsx)("p",{children:a("passwordHint")}),(0,l.jsx)(z,{onTokenChange:et,onError:el,resetTrigger:er}),(0,l.jsx)(M.A,{variant:"contained",type:"submit",className:"bg-primary text-white w-full py-3 rounded-lg mt-4 hover:bg-blue-700",children:a("submit")})]}),(0,l.jsxs)("div",{className:"text-center text-14px text-gray-500 mt-2",children:[a("termsPrefix")," ",(0,l.jsx)(n.N_,{href:"/",className:"text-blue-600",children:a("termsOfUse")})," ",a("and"),(0,l.jsxs)(n.N_,{href:"/",className:"text-blue-600",children:[" ",a("privacyPolicy")," "]}),"."]})]}),(0,l.jsxs)("div",{className:"flex items-center !mt-8 !mb-4",children:[(0,l.jsx)("div",{className:"flex-1 h-px bg-gray-200"}),(0,l.jsx)("span",{className:"px-3 text-gray-400 text-sm",children:a("or")}),(0,l.jsx)("div",{className:"flex-1 h-px bg-gray-200"})]}),(0,l.jsx)(O,{open:t,onSuccess:e=>{s(),W(e),Q("success"),Z(!0)},onError:W})]}),(0,l.jsxs)(Y,{className:"justify-center",children:[a("haveAccount"),(0,l.jsx)(M.A,{onClick:r,className:"text-14px text-[#0051C6] normal-case hover:text-blue-700",children:a("sign
1InLink")})]})]})]}),(0,l.jsx)(R.A,{children:(0,l.jsx)(T.A,{open:G,autoHideDuration:4e3,onClose:ei,anchorOrigin:{vertical:"top",horizontal:"right"},sx:{zIndex:99999},children:(0,l.jsx)(P.A,{onClose:ei,severity:V,variant:"filled",sx:{width:"100%"},children:B})})})]})}let ee=(0,o.default)(()=>s.e(177).then(s.bind(s,91409)),{loadableGenerated:{webpack:()=>[null]},ssr:!1}),et=(0,o.default)(()=>s.e(177).then(s.bind(s,41907)),{loadableGenerated:{webpack:()=>[null]},ssr:!1}),es=(0,o.default)(()=>s.e(177).then(s.bind(s,50236)),{loadableGenerated:{webpack:()=>[null]},ssr:!1}),el=(0,o.default)(()=>s.e(177).then(s.bind(s,60590)),{loadableGenerated:{webpack:()=>[null]},ssr:!1}),er=(0,o.default)(()=>s.e(177).then(s.bind(s,72699)),{loadableGenerated:{webpack:()=>[null]},ssr:!1}),ea=e=>(0,l.jsx)(P.A,{elevation:6,variant:"filled",...e});function en(e){let{open:t,onClose:s,switchToLogin:r}=e,a=(0,x.useTranslations)("Auth.resetPassword"),[n,i]=(0,u.useState)(""),[o,c]=(0,u.useState)(""),[d,p]=(0,u.useState)(!1),[h,m]=(0,u.useState)(""),[f,g]=(0,u.useState)("success"),[b,v]=(0,u.useState)(null),[,w]=(0,u.useState)(""),[j,C]=(0,u.useState)(0),N=(e,t)=>{m(e),g(t),p(!0)},y=(e,t)=>{"clickaway"!==t&&p(!1)},k=async e=>{if(e.preventDefault(),!b)return void N(a("captchaRequired"),"error");try{(await fetch("".concat("https://api.vinasources.com/psp-buyer/api/v1/vns","/forgot"),{method:"POST",headers:{"Content-Type":"application/json","X-Store-Domain":"vinasources.com","cf-turnstile-response":b},body:JSON.stringify({email:n})})).ok?(N(a("successSent"),"success"),s(),i("")):(N(a("failedRetry"),"error"),v(null),C(e=>e+1))}catch(e){console.error(e),N(a("errorOccurred"),"error")}};return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(ee,{open:t,onClose:s,PaperProps:{sx:{maxWidth:"612px !important",width:"100%",borderRadius:"16px"}},children:[(0,l.jsx)(H.A,{"aria-label":"close",onClick:s,sx:{position:"absolute",right:20,top:20,padding:0,width:32,height:32},children:(0,l.jsx)(F.A,{className:"w-[15px] h-[15px]"})}),(0,l.jsxs)("div",{className:"bg-white rounded-[16px] shadow-lg w-full md:p-10 font-primary p-6",children:[(0,l.jsx)(et,{className:"text-center text-32px font-semibold text-primary p-0",children:a("title")}),(0,l.jsx)(er,{className:"text-center mb-10 mt-4 text-14px font-primary text-[#667085]",children:a("description")}),(0,l.jsx)(es,{className:"p-0 overflow-hidden",children:(0,l.jsx)("form",{onSubmit:k,children:(0,l.jsxs)(E.A,{spacing:2,children:[(0,l.jsxs)("div",{className:"relative",children:[(0,l.jsx)("label",{htmlFor:"email",className:"absolute text-[#101828] text-14px left-0 top-0",children:a("emailLabel")}),(0,l.jsx)("input",{id:"email",type:"email",placeholder:a("emailPlaceholder"),value:n,onChange:e=>{i(e.target.value),o&&c("")},required:!0,className:"w-full p-3 pl-3 mt-6 border rounded-lg focus:outline-none focus:ring-0 ".concat(o?"border-red-500 focus:ring-red-500":"border-gray-300 focus:ring-blue-500")}),o&&(0,l.jsx)("p",{className:"text-red-500 text-14px mt-1",children:o})]}),(0,l.jsx)("div",{className:"flex justify-center",children:(0,l.jsx)(z,{onTokenChange:v,onError:w,resetTrigger:j})}),(0,l.jsx)(M.A,{variant:"contained",type:"submit",disabled:!b,className:"bg-primary text-white w-full normal-case py-3 rounded-lg mt-4 hover:bg-blue-700",children:a("submit")})]})})}),(0,l.jsx)(el,{className:"justify-center p-0",children:(0,l.jsx)(M.A,{onClick:r,variant:"outlined",className:"text-14px normal-case rounded-lg mt-4 py-3 text-[#101828] border-[#044685] w-full hover:text-blue-700",children:a("backToLogin")})})]})]}),(0,l.jsx)(R.A,{children:(0,l.jsx)(T.A,{open:d,autoHideDuration:6e3,onClose:y,anchorOrigin:{vertical:"top",horizontal:"right"},sx:{zIndex:9999},children:(0,l.jsx)(ea,{onClose:y,severity:f,sx:{width:"100%"},children:h})})})]})}let ei=(0,o.default)(()=>s.e(177).then(s.bind(s,91409)),{loadableGenerated:{webpack:()=>[null]},ssr:!1}),eo=(0,o.default)(()=>s.e(177).then(s.bind(s,41907)),{loadableGenerated:{webpack:()=>[null]},ssr:!1}),ec=(0,o.default)(()=>s.e(177).then(s.bind(s,50236)),{loadableGenerated:{webpack:()=>[null]},ssr:!1}),ed=(0,o.default)(()=>s.e(177).then(s.bind(s,72699)),{loadableGenerated:{webpack:()=>[null]},ssr:!1}),eu=e=>(0,l.jsx)(P.A,{elevation:6,variant:"filled",...e});function ex(e){let{open:t,token:s,onClose:r,switchToLogin:a}=e,n=(0,x.useTranslations)("Auth.setNewPassword"),i=(0,x.useTranslations)("Errors"),[o,c]=(0,u.useState)({new_password:"",confirm_password:""}),[d,p]=(0,u.useState)({new:!1,confirm:!1}),[h,m]=(0,u.useState)(!1),[f,g]=(0,u.useState)(!1),[b,v]=(0,u.useState)(""),[w,j]=(0,u.useState)("success"),[C,N]=(0,u.useState)(null),[,y]=(0,u.useState)(""),[k,_]=(0,u.useState)(0),S=(e,t)=>{v(e),j(t),g(!0)},A=(e,t)=>
1{"clickaway"!==t&&g(!1)},L=e=>{c({...o,[e.target.name]:e.target.value})},P=async e=>{if(e.preventDefault(),!h){if(!s)return void S(n("invalidToken"),"error");if(o.new_password.length<8)return void S(n("passwordMinLength"),"error");if(o.new_password!==o.confirm_password)return void S(n("passwordsMismatch"),"error");if(!C)return void S(n("captchaRequired"),"error");m(!0);try{let e=await fetch("".concat("https://api.vinasources.com/psp-buyer/api/v1/vns","/password-reset"),{method:"POST",headers:{"Content-Type":"application/json","X-Store-Domain":"vinasources.com","cf-turnstile-response":C},body:JSON.stringify({token:s,new_password:o.new_password,confirm_password:o.confirm_password})});if(!e.ok){let t=await e.text().catch(()=>"");S(t||n("linkExpired"),"error"),N(null),_(e=>e+1);return}S(n("successLogin"),"success"),c({new_password:"",confirm_password:""}),setTimeout(()=>{a()},1500)}catch(e){console.error("Reset password error:",e),S(i("genericRetry"),"error")}finally{m(!1)}}};return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(ei,{open:t,onClose:r,PaperProps:{sx:{maxWidth:"612px !important",width:"100%",borderRadius:"16px"}},children:[(0,l.jsx)(H.A,{"aria-label":"close",onClick:r,sx:{position:"absolute",right:20,top:20,padding:0,width:32,height:32},children:(0,l.jsx)(F.A,{className:"w-[15px] h-[15px]"})}),(0,l.jsxs)("div",{className:"bg-white rounded-[16px] shadow-lg w-full md:p-10 font-primary p-6",children:[(0,l.jsx)(eo,{className:"text-center text-32px font-semibold text-primary p-0",children:n("title")}),(0,l.jsx)(ed,{className:"text-center mb-10 mt-4 text-14px font-primary text-[#667085]",children:n("description")}),(0,l.jsx)(ec,{className:"p-0 overflow-hidden",children:(0,l.jsx)("form",{onSubmit:P,children:(0,l.jsxs)(E.A,{spacing:3,children:[(0,l.jsxs)("div",{className:"relative",children:[(0,l.jsx)("label",{htmlFor:"new_password",className:"absolute text-[#101828] text-14px left-0 top-0",children:n("passwordLabel")}),(0,l.jsx)("input",{id:"new_password",name:"new_password",type:d.new?"text":"password",placeholder:n("passwordPlaceholder"),value:o.new_password,onChange:L,required:!0,minLength:8,className:"w-full p-3 pl-3 pr-10 mt-6 border border-gray-300 rounded-lg focus:outline-none focus:ring-0 focus:ring-blue-500"}),(0,l.jsx)(H.A,{type:"button",onClick:()=>p(e=>({...e,new:!e.new})),sx:{position:"absolute",right:8,top:28},"aria-label":"Toggle new password visibility",children:d.new?(0,l.jsx)(I.A,{}):(0,l.jsx)(q.A,{})})]}),(0,l.jsxs)("div",{className:"relative",children:[(0,l.jsx)("label",{htmlFor:"confirm_password",className:"absolute text-[#101828] text-14px left-0 top-0",children:n("confirmPasswordLabel")}),(0,l.jsx)("input",{id:"confirm_password",name:"confirm_password",type:d.confirm?"text":"password",placeholder:n("confirmPasswordPlaceholder"),value:o.confirm_password,onChange:L,required:!0,minLength:8,className:"w-full p-3 pl-3 pr-10 mt-6 border border-gray-300 rounded-lg focus:outline-none focus:ring-0 focus:ring-blue-500"}),(0,l.jsx)(H.A,{type:"button",onClick:()=>p(e=>({...e,confirm:!e.confirm})),sx:{position:"absolute",right:8,top:28},"aria-label":"Toggle confirm password visibility",children:d.confirm?(0,l.jsx)(I.A,{}):(0,l.jsx)(q.A,{})})]}),(0,l.jsx)("div",{className:"flex justify-center",children:(0,l.jsx)(z,{onTokenChange:N,onError:y,resetTrigger:k})}),(0,l.jsx)(M.A,{variant:"contained",type:"submit",disabled:h||!C,className:"bg-primary text-white w-full normal-case py-3 rounded-lg mt-4 hover:bg-blue-700",children:h?"Resetting...":"Reset password"}),(0,l.jsx)(M.A,{type:"button",onClick:a,variant:"outlined",className:"text-14px normal-case rounded-lg py-3 text-[#101828] border-[#044685] w-full hover:text-blue-700",children:n("backToLogin")})]})})})]})]}),(0,l.jsx)(R.A,{children:(0,l.jsx)(T.A,{open:f,autoHideDuration:6e3,onClose:A,anchorOrigin:{vertical:"top",horizontal:"right"},sx:{zIndex:9999},children:(0,l.jsx)(eu,{onClose:A,severity:w,sx:{width:"100%"},children:b})})})]})}function ep(e){let{open:t,mode:s,resetToken:r="",onClose:a,switchMode:n}=e;return(0,l.jsxs)(l.Fragment,{children:["login"===s&&(0,l.jsx)(V,{open:t,onClose:a,switchToSignup:()=>n("signup"),switchToForgot:()=>n("reset")}),"signup"===s&&(0,l.jsx)(Q,{open:t,onClose:a,switchToLogin:()=>n("login")}),"reset"===s&&(0,l.jsx)(en,{open:t,onClose:a,switchToLogin:()=>n("login")}),"set-new-password"===s&&(0,l.jsx)(ex,{open:t,token:r,onClose:a,switchToLogin:()=>n("login")})]})}var eh=s(20063);let em={src:"/_next/static/media/us-flag.bd5c950f.svg",height:26,width:26,blurWidth:0,blurHeight:0},ef={src:"/_next/static/media/vietnam-flag.8bc4565b.svg",height:26,width:26,blurWidth:0,blurHeight:0};function eg(){let e=(0,x.useLocale)(),t=(0,n.rd)(),s=(0,n.a8)(),r=(0,eh.useParams)(),[i,o]=(0,u.useTransition)(),[c,d]=(0,u.useState)(e);(0,u.useEffect)(()=>{d(e)},[e]);let p="vi"===c,h=()=>{let l="vi"===e?"en":"vi";try{t.prefetch({pathname:s,params:r},{locale:l})}catch(e){}};return(0,l.jsxs)("button",{type:"button",role:"switch","aria-checked":p,"aria-label":"Switch language. Current: ".concat(p?"Vietnamese":"English"),disabled:i,onClick:()=>(e=>{if(e===c)return;d(e);let l="".concat(s).concat(window.location.search);o(()=>{t.replace(l,{locale:e,scroll:!1})})})(p?"en":"vi"),onMouseEnter:h,onFocus:h,className:"relative inline-flex shrink-0 items-center select-none rounded-full border border-[#D0D5DD] bg-[#F2F4F7] transition-colors hover:border-[#0051C6]\n h-[28px] w-[60px] md:h-[32px] md:w-[60px]\n ".concat(i?"cursor-progress":""),children:[(0,l.jsx)("span",{className:"absolute left-2.5 md:left-3 text-[10px] md:text-[11px] font-bold tracking-wide pointer-events-none transition-opacity duration-500 ".concat(p?"o
1pacity-100 text-[#667085]":"opacity-0"),children:"EN"}),(0,l.jsx)("span",{className:"absolute right-2.5 md:right-3 text-[10px] md:text-[11px] font-bold tracking-wide pointer-events-none transition-opacity duration-500 ".concat(p?"opacity-0":"opacity-100 text-[#667085]"),children:"VI"}),(0,l.jsx)("span",{className:"absolute top-1/2 -translate-y-1/2 flex items-center justify-center rounded-full bg-white shadow-[0_1px_3px_rgba(16,24,40,0.18)] transition-all duration-500 ease-out\n h-[22px] w-[22px] md:h-[26px] md:w-[26px]\n ".concat(p?"right-[3px]":"left-[3px]"),children:(0,l.jsx)(a.default,{src:p?ef:em,alt:p?"Vietnam":"United States",width:18,height:18,className:"rounded-full object-cover"})})]})}var eb=s(49730),ev=s(41448),ew=s(65770),ej=s(23227);let eC=(0,o.default)(()=>Promise.all([s.e(177),s.e(2076)]).then(s.bind(s,19243)),{loadableGenerated:{webpack:()=>[19243]},ssr:!1});function eN(e){var t,s;let{main:o}=e,c=(0,u.useRef)(null),L=(0,x.useLocale)(),P=(0,x.useTranslations)("Header"),T=(0,x.useTranslations)("Common"),M=o.childrens,E=o.nav_button.label,H=(0,n.a8)(),F=(0,n.rd)(),I=H.startsWith("/buyer-center/"),q="/"===H||I,{startChat:R}=(0,ev.Y_)(),[O,z]=(0,u.useState)(!1),{menuData:D}=(0,A.b)(),[G,Z]=(0,u.useState)(null),[B,W]=(0,u.useState)("main"),[V,J]=(0,u.useState)(null),[X,K]=(0,u.useState)(null),[Y,$]=(0,u.useState)(!1),[Q,ee]=(0,u.useState)(!1),et=(0,u.useRef)(null),[es,el]=(0,u.useState)(!1),[er,ea]=(0,u.useState)(null),[en,ei]=(0,u.useState)({}),[eo,ec]=(0,u.useState)(!1),{user:ed,isAuthenticated:eu,logout:ex}=(0,eb.A)(),{currentOrder:eh}=(0,ew.S)(),{authOpen:em,authMode:ef,resetToken:eN,closeAuthModal:ey,switchAuthMode:ek,openAuthModal:e_}=(0,U.X)(),eS=()=>{ee(e=>!e)};(0,u.useEffect)(()=>{let e=e=>{et.current&&!et.current.contains(e.target)&&ee(!1)};return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[]),(0,u.useEffect)(()=>{H.includes("/checkout")||(document.cookie="checkoutSessionId=; path=/; expires=Thu, 01 Jan 1970 00:00:00 GMT;",document.cookie="current_viewing_order_id=; path=/; expires=Thu, 01 Jan 1970 00:00:00 GMT;")},[H]);let eA=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;J(e),K(t),W("submenu")},{wm:eL}=r._P,{s:eP,n:eT}=r.z6;(0,u.useEffect)(()=>{let e=history.pushState;history.pushState=function(){for(var t=arguments.length,s=Array(t),l=0;l<t;l++)s[l]=arguments[l];let r=e.apply(this,s),a=new Event("pushstate");return window.dispatchEvent(a),r};let t=()=>{eE()};return window.location.hash&&t(),window.addEventListener("pushstate",t),()=>{window.removeEventListener("pushstate",t)}},[]);let eM=async(e,t)=>{if(!t.startsWith("http")){e.preventDefault();let[s,l]=t.split("#");await F.push(s,{scroll:!1}),l&&await new Promise(e=>{let t=setInterval(()=>{let r=window.location.pathname.replace("/".concat(L),"");(r===s||r===s+"/")&&(history.pushState(null,"","#".concat(l)),clearInterval(t),e())},50)})}},eE=()=>{let{hash:e}=window.location,t=document.getElementById(e.substring(1));t&&t.scrollIntoView({behavior:"smooth"})},[eH,eF]=(0,u.useState)(""),[eI,eq]=(0,u.useState)("product"),[eR,eO]=(0,u.useState)(!1),ez=(0,u.useRef)(null),eD=(0,u.useRef)(null);(0,u.useEffect)(()=>{let e=e=>{var t,s;let l=null==(t=ez.current)?void 0:t.contains(e.target),r=null==(s=eD.current)?void 0:s.contains(e.target);l||r||eO(!1)};return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[]);let eG=e=>{e.preventDefault(),eH.trim()&&("supplier"===eI?F.push("/suppliers?page=1&pageSize=10&search=".concat(encodeURIComponent(eH.trim()))):F.push("/search?q=".concat(encodeURIComponent(eH.trim()))))};(0,u.useEffect)(()=>{function e(e){c.current&&!c.current.contains(e.target)&&z(!1)}return O&&document.addEventListener("mousedown",e),()=>{document.removeEventListener("mousedown",e)}},[O]);let[eZ,eB]=(0,u.useState)((null==ed?void 0:ed.avatar)||"/icons/wws/user.svg");return(0,u.useEffect)(()=>{(null==ed?void 0:ed.avatar)&&eB(ed.avatar)},[null==ed?void 0:ed.avatar]),(0,l.jsxs)("header",{className:"bg-[#fff] sticky top-0 z-[20] border-b shadow-sm overflow-hidden md:overflow-visible h-full",children:[eu&&(0,l.jsx)("button",{id:"chat-button",onClick:()=>void R({id:ej.cn,name:ej.KA,photoUrl:"".concat(window.location.origin,"/images/Logo-Vinasources-Notext.png"),welcomeMessage:ej.nT,email:ej.LX},"",{kind:"user_admin"}),"aria-label":P("chat.ariaLabel"),className:"fixed bottom-5 right-5 text-white rounded-full border-0 flex items-center justify-center text-[24px] curs
1or-pointer shadow-[0 4px 8px rgba(0,0,0,0.2)]",children:(0,l.jsx)("svg",{width:"22",height:"22",viewBox:"0 0 24 24",fill:"white",children:(0,l.jsx)("path",{d:"M20 2H4C2.9 2 2 2.9 2 4v18l4-4h14c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2z"})})}),(0,l.jsx)(eC,{open:es,onClose:()=>el(!1)}),(0,l.jsxs)("nav",{className:"flex flex-nowrap md:max-w-[1472px] md:m-auto gap-[8px] md:gap-[12px] lg:gap-[16px] py-[8px] px-[12px] md:px-[20px] items-center",children:[(0,l.jsx)("button",{id:"show-button","aria-label":P("nav.menuAria"),className:"order-0 flex shrink-0 cursor-pointer items-center lg:order-1 lg:hidden",onClick:()=>z(!0),children:(0,l.jsx)(a.default,{src:v,alt:P("nav.menuAria"),width:24,height:24})}),(0,l.jsx)("h1",{className:"hidden md:block order-0 mr-[12px] lg:mr-[24px] shrink-0",children:(0,l.jsx)(i,{src:eL})}),(0,l.jsx)("h1",{className:"h-full shrink-0 md:hidden block order-0",children:(0,l.jsx)(n.N_,{href:"/",children:(0,l.jsx)(a.default,{src:w,alt:"Logo",width:120,height:28})})}),(0,l.jsx)("div",{onClick:()=>$(!0),className:"xl:hidden flex-1 order-0 flex items-center relative cursor-pointer",children:(0,l.jsxs)("div",{className:"flex items-center w-full rounded-[30px] border border-[#044685] py-[6px] px-3",children:[(0,l.jsx)("span",{className:"flex-1 text-sm text-gray-400",children:P("search.trigger")}),(0,l.jsx)("div",{className:"p-1.5 rounded-full text-white bg-[#044685]",children:(0,l.jsx)(p.A,{className:"w-3.5 h-3.5"})})]})}),(0,l.jsxs)("form",{onSubmit:eG,className:"hidden xl:flex relative items-center flex-1 min-w-0 order-0 xl:order-1",children:[(0,l.jsxs)("div",{className:"flex items-center w-full rounded-[30px] border border-[#044685] overflow-visible",children:[(0,l.jsxs)("div",{className:"relative p-[5px]",ref:ez,children:[(0,l.jsxs)("button",{type:"button",onClick:()=>eO(e=>!e),className:"flex rounded-[20px] font-semibold items-center gap-1 px-[10px] py-[5px] text-sm text-[#6B7280] whitespace-nowrap bg-[#F0F3FA] cursor-pointer",children:["product"===eI?P("search.productType"):P("search.supplierType"),(0,l.jsx)(h.A,{className:"w-3.5 h-3.5 text-black"})]}),eR&&(0,l.jsxs)("ul",{className:"absolute top-full left-0 mt-1 bg-white border border-gray-200 rounded-md shadow-lg z-50",children:[(0,l.jsx)("li",{children:(0,l.jsx)("button",{type:"button",onClick:()=>{eq("product"),eO(!1)},className:"block w-full text-left px-4 py-2 text-sm hover:bg-gray-100 ".concat("product"===eI?"font-medium text-[#044685]":""),children:P("search.productType")})}),(0,l.jsx)("li",{children:(0,l.jsx)("button",{type:"button",onClick:()=>{eq("supplier"),eO(!1)},className:"block w-full text-left px-4 py-2 text-sm hover:bg-gray-100 ".concat("supplier"===eI?"font-medium text-[#044685]":""),children:P("search.supplierType")})})]})]}),(0,l.jsx)("input",{value:eH,onChange:e=>eF(e.target.value),className:"flex-1 px-3 py-3 border-0 focus:border-0 focus:outline-0 focus:shadow-none !ring-0 bg-transparent",placeholder:"product"===eI?P("search.productPlaceholder"):P("search.supplierPlaceholder")})]}),(0,l.jsx)("button",{type:"submit","aria-label":P("search.submitAria"),className:"absolute right-2 p-2 rounded-full text-white bg-[#044685] hover:bg-[#033a6b] transition flex gap-2 items-center",children:(0,l.jsx)(p.A,{className:"w-4 h-4"})})]}),(0,l.jsx)("div",{className:"hidden lg:block order-3 lg:order-2 shrink-0",children:(0,l.jsxs)("ul",{className:"navbar-nav flex w-auto items-center",children:[M.map((e,t)=>(0,l.jsx)(u.Fragment,{children:e.hasChildren?(0,l.jsxs)("li",{className:"nav-item nav-dropdown group relative",children:[(0,l.jsxs)("span",{className:"nav-link inline-flex items-center",children:[e.name,(0,l.jsx)("svg",{className:"h-4 w-4 fill-current",viewBox:"0 0 20 20",children:(0,l.jsx)("path",{d:"M9.293 12.95l.707.707L15.657 8l-1.414-1.414L10 10.828 5.757 6.586 4.343 8z"})})]}),(0,l.jsx)("ul",{className:"nav-dropdown-list absolute left-0 w-full z-[100] origin-top-left bg-white divide-y divide-gray-100 rounded-md shadow-lg hidden group-hover:block",children:e.children.map((e,t)=>(0,l.jsx)("li",{className:"nav-dropdown-item",children:(0,l.jsx)(n.N_,{onClick:()=>z(!1),href:e.url,className:"block px-4 py-2 text-gray-700 hover:bg-gray-100",children:e.name})},"children-".concat(t)))})]}):(0,l.jsx)("li",{className:"nav-item hidden lg:block",children:(0,l.jsxs)(n.N_,{scroll:!1,href:e.url||"/",onClick:t=>{eM(t,e.url),z(!1)},className:"nav-link flex items-center gap-2 ".concat(H===e.url?"nav-link-active":""),children:[(0,l.jsx)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,l.jsx)("path",{d:"M12 2C10.
16868 2 9.38642 2.25866 8.17317 2.7612C6.95991 3.26375 5.85752 4.00035 4.92893 4.92893C3.05357 6.8043 2 9.34784 2 12C2 14.6522 3.05357 17.1957 4.92893 19.0711C5.85752 19.9997 6.95991 20.7362 8.17317 21.2388C9.38642 21.7413 10.6868 22 12 22C14.6522 22 17.1957 20.9464 19.0711 19.0711C20.9464 17.1957 22 14.6522 22 12C22 10.84 21.79 9.69 21.39 8.61L19.79 10.21C19.93 10.8 20 11.4 20 12C20 14.1217 19.1571 16.1566 17.6569 17.6569C16.1566 19.1571 14.1217 20 12 20C9.87827 20 7.84344 19.1571 6.34315 17.6569C4.84285 16.1566 4 14.1217 4 12C4 9.87827 4.84285 7.84344 6.34315 6.34315C7.84344 4.84285 9.87827 4 12 4C12.6 4 13.2 4.07 13.79 4.21L15.4 2.6C14.31 2.21 13.16 2 12 2ZM19 2L15 6V7.5L12.45 10.05C12.3 10 12.15 10 12 10C11.4696 10 10.9609 10.2107 10.5858 10.5858C10.2107 10.9609 10 11.4696 10 12C10 12.5304 10.2107 13.0391 10.5858 13.4142C10.9609 13.7893 11.4696 14 12 14C12.5304 14 13.0391 13.7893 13.4142 13.4142C13.7893 13.0391 14 12.5304 14 12C14 11.85 14 11.7 13.95 11.55L16.5 9H18L22 5H19V2ZM12 6C10.4087 6 8.88258 6.63214 7.75736 7.75736C6.63214 8.88258 6 10.4087 6 12C6 13.5913 6.63214 15.1174 7.75736 16.2426C8.88258 17.3679 10.4087 18 12 18C13.5913 18 15.1174 17.3679 16.2426 16.2426C17.3679 15.1174 18 13.5913 18 12H16C16 13.0609 15.5786 14.0783 14.8284 14.8284C14.0783 15.5786 13.0609 16 12 16C10.9391 16 9.92172 15.5786 9.17157 14.8284C8.42143 14.0783 8 13.0609 8 12C8 10.9391 8.42143 9.92172 9.17157 9.17157C9.92172 8.42143 10.9391 8 12 8V6Z",fill:"currentColor"})}),(0,l.jsx)("span",{className:"max-w-[174px] whitespace-nowrap",children:e.name})]})})},"menu-".concat(t))),(0,l.jsx)("li",{className:"nav-item hidden lg:flex items-center ml-[20px]",children:(0,l.jsx)(eg,{})}),(0,l.jsxs)("li",{className:"nav-item hidden lg:block relative ml-[12px]",ref:et,children:[(0,l.jsxs)("button",{onClick:e=>{e.preventDefault(),eu?eS():e_("login")},className:"nav-link flex items-center gap-2 hover:bg-[#0446851A] hover:text-black rounded-lg",children:[(0,l.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"23",height:"22",viewBox:"0 0 23 22",fill:"none",children:[(0,l.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M15.6045 8C15.6045 9.06087 15.1831 10.0783 14.4329 10.8284C13.6828 11.5786 12.6654 12 11.6045 12C10.5436 12 9.52621 11.5786 8.77606 10.8284C8.02592 10.0783 7.60449 9.06087 7.60449 8C7.60449 6.93913 8.02592 5.92172 8.77606 5.17157C9.52621 4.42143 10.5436 4 11.6045 4C12.6654 4 13.6828 4.42143 14.4329 5.17157C15.1831 5.92172 15.6045 6.93913 15.6045 8ZM13.6045 8C13.6045 8.53043 13.3938 9.03914 13.0187 9.41421C12.6436 9.78929 12.1349 10 11.6045 10C11.0741 10 10.5654 9.78929 10.1903 9.41421C9.81521 9.03914 9.60449 8.53043 9.60449 8C9.60449 7.46957 9.81521 6.96086 10.1903 6.58579C10.5654 6.21071 11.0741 6 11.6045 6C12.1349 6 12.6436 6.21071 13.0187 6.58579C13.3938 6.96086 13.6045 7.46957 13.6045 8Z",fill:"black"}),(0,l.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M11.6045 0C5.52949 0 0.604492 4.925 0.604492 11C0.604492 17.075 5.52949 22 11.6045 22C17.6795 22 22.6045 17.075 22.6045 11C22.6045 4.925 17.6795 0 11.6045 0ZM2.60449 11C2.60449 13.09 3.31749 15.014 4.51249 16.542C5.35193 15.4401 6.43465 14.5471 7.67613 13.9327C8.91762 13.3183 10.2843 12.9991 11.6695 13C13.0369 12.9984 14.3866 13.3091 15.6156 13.9084C16.8447 14.5077 17.9207 15.3797 18.7615 16.458C19.6279 15.3216 20.2113 13.9952 20.4634 12.5886C20.7154 11.182 20.6289 9.73553 20.211 8.36898C19.7931 7.00243 19.0557 5.75505 18.06 4.73004C17.0642 3.70503 15.8387 2.93186 14.4849 2.47451C13.131 2.01716 11.6877 1.88877 10.2744 2.09997C8.86101 2.31117 7.51828 2.85589 6.35726 3.68905C5.19624 4.52222 4.2503 5.61987 3.59772 6.8912C2.94514 8.16252 2.60467 9.57097 2.60449 11ZM11.6045 20C9.5384 20.0033 7.53464 19.2926 5.93249 17.988C6.5773 17.0646 7.43569 16.3107 8.43457 15.7905C9.43345 15.2702 10.5432 14.999 11.6695 15C12.7817 14.999 13.878 15.2635 14.8675 15.7713C15.8569 16.2792 16.7109 17.0158 17.3585 17.92C15.744 19.267 13.7071 20.0033 11.6045 20Z",fill:"black"})]}),(0,l.jsxs)("span",{className:"max-w-[174px] font-normal whitespace-nowrap",children:[" ",P("account.buyerCenter")]})]}),Q&&(0,l.jsxs)("ul",{className:"absolute right-0 mt-2 bg-white rounded-lg shadow-lg border group-hover:block z-[200] p-[10px]",children:[(0,l.jsxs)("li",{className:"px-1 pb-3 flex items-center gap-2 w-[140px] border-b border-b-[#808080]",children:[(0,l.jsx)(a.default,{src:eZ,alt:"avatar",width:32,height:32,className:"w-[24px] h-[24px] rounded-full border",onError:()=>eB("/icons/wws/user.svg")}),(0,l.jsx)("span",{className:"font-medium truncate max-w-[140px]",children:(null==ed?void 0:ed.name)||P("account.guest")})]}),(0,l.jsx)("li",{children:(0,l.jsx)(n.N_,{href:"/buyer-center/home",onClick:()=>{ee(!1),z(!1)}
1,className:"block px-1 py-[10px] hover:bg-gray-100",children:P("account.home")})}),(0,l.jsx)("li",{children:(0,l.jsx)("a",{onClick:()=>{el(!0),ee(!1)},className:"block px-1 py-[10px] hover:bg-gray-100",children:P("account.myAccount")})}),(0,l.jsx)("li",{children:(0,l.jsx)(n.N_,{href:"/buyer-center/message",onClick:()=>{ee(!1),z(!1)},className:"block px-1 py-[10px] hover:bg-gray-100",children:P("account.message")})}),(0,l.jsx)("li",{children:(0,l.jsx)(n.N_,{href:"/buyer-center/rfq",onClick:()=>{ee(!1),z(!1)},className:"block px-1 py-[10px] hover:bg-gray-100",children:P("account.rfqLink")})}),(0,l.jsx)("li",{children:(0,l.jsx)(n.N_,{href:"/buyer-center/orders",onClick:()=>{ee(!1),z(!1)},className:"block px-1 py-[10px] hover:bg-gray-100",children:P("account.order")})}),(0,l.jsx)("li",{children:(0,l.jsxs)(n.N_,{href:"/cart",onClick:()=>{ee(!1),z(!1)},className:"block px-1 py-[10px] hover:bg-gray-100",children:[P("account.cart")," ",(0,l.jsxs)("span",{className:"text-[#0051C6]",children:[(null==eh?void 0:eh.data.total_item)>0?"(".concat(null==eh?void 0:eh.data.total_item,")"):""," "]})]})}),(0,l.jsx)("li",{children:(0,l.jsx)("button",{onClick:()=>ex({callbackUrl:"/"}),className:"w-full text-left block px-1 py-[10px] hover:bg-gray-100 border-t border-t-[#808080]",children:P("account.signOut")})})]})]}),(0,l.jsx)("li",{className:"nav-item hidden lg:block",children:(0,l.jsxs)("button",{"aria-label":P("nav.minicartAria"),onClick:()=>{eu?F.push("/cart"):e_("login")},className:"flex gap-[8px] p-[10px] items-center rounded-[4px] cursor-pointer relative",children:[(0,l.jsx)("svg",{width:"24",height:"25",viewBox:"0 0 24 25",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,l.jsx)("path",{d:"M17 18.5C17.5304 18.5 18.0391 18.7107 18.4142 19.0858C18.7893 19.4609 19 19.9696 19 20.5C19 21.0304 18.7893 21.5391 18.4142 21.9142C18.0391 22.2893 17.5304 22.5 17 22.5C16.4696 22.5 15.9609 22.2893 15.5858 21.9142C15.2107 21.5391 15 21.0304 15 20.5C15 19.39 15.89 18.5 17 18.5ZM1 2.5H4.27L5.21 4.5H20C20.2652 4.5 20.5196 4.60536 20.7071 4.79289C20.8946 4.98043 21 5.23478 21 5.5C21 5.67 20.95 5.84 20.88 6L17.3 12.47C16.96 13.08 16.3 13.5 15.55 13.5H8.1L7.2 15.13L7.17 15.25C7.17 15.3163 7.19634 15.3799 7.24322 15.4268C7.29011 15.4737 7.3537 15.5 7.42 15.5H19V17.5H7C6.46957 17.5 5.96086 17.2893 5.58579 16.9142C5.21071 16.5391 5 16.0304 5 15.5C5 15.15 5.09 14.82 5.24 14.54L6.6 12.09L3 4.5H1V2.5ZM7 18.5C7.53043 18.5 8.03914 18.7107 8.41421 19.0858C8.78929 19.4609 9 19.9696 9 20.5C9 21.0304 8.78929 21.5391 8.41421 21.9142C8.03914 22.2893 7.53043 22.5 7 22.5C6.46957 22.5 5.96086 22.2893 5.58579 21.9142C5.21071 21.5391 5 21.0304 5 20.5C5 19.39 5.89 18.5 7 18.5ZM16 11.5L18.78 6.5H6.14L8.5 11.5H16Z",fill:"#000"})}),(null==eh?void 0:eh.data.total_item)>0&&(0,l.jsx)("span",{className:"total-item-cart p-1 bg-red-600 text-white rounded-full absolute top-1 right-0 text-[10px] w-[16px] h-[16px] flex items-center justify-center",children:null==eh?void 0:eh.data.total_item})]})})]})}),(0,l.jsxs)("div",{className:"flex lg:hidden items-center gap-[8px] order-2 shrink-0",children:[(0,l.jsx)(eg,{}),(0,l.jsx)("button",{"aria-label":P("nav.buyerCenterAria"),onClick:e=>{e.preventDefault(),eu?F.push("/buyer-center/home"):e_("login")},className:"hidden md:flex items-center p-1 cursor-pointer",children:(0,l.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"22",height:"22",viewBox:"0 0 23 22",fill:"none",children:[(0,l.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M15.6045 8C15.6045 9.06087 15.1831 10.0783 14.4329 10.8284C13.6828 11.5786 12.6654 12 11.6045 12C10.5436 12 9.52621 11.5786 8.77606 10.8284C8.02592 10.0783 7.60449 9.06087 7.60449 8C7.60449 6.93913 8.02592 5.92172 8.77606 5.17157C9.52621 4.42143 10.5436 4 11.6045 4C12.6654 4 13.6828 4.42143 14.4329 5.17157C15.1831 5.92172 15.6045 6.93913 15.6045 8ZM13.6045 8C13.6045 8.53043 13.3938 9.03914 13.0187 9.41421C12.6436 9.78929 12.1349 10 11.6045 10C11.0741 10 10.5654 9.78929 10.1903 9.41421C9.81521 9.03914 9.60449 8.53043 9.60449 8C9.60449 7.46957 9.81521 6.96086 10.1903 6.58579C10.5654 6.21071 11.0741 6 11.6045 6C12.1349 6 12.6436 6.21071 13.0187 6.58579C13.3938 6.96086 13.6045 7.46957 13.6045 8Z",fill:"black"}),(0,l.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M11.6045 0C5.52949 0 0.604492 4.925 0.604492 11C0.604492 17.075 5.52949 22 11.6045 22C17.6795 22 22.6045 17.075 22.6045 11C22.6045 4.925 17.6795 0 11.6045 0ZM2.60449 11C2.60449 13.09 3.31749 15.014 4.51249 16.542C5.35193 15.4401 6.43465 14.5471 7.67613 13.9327C8.91762 13.3183 10.2843 12.9991 11.6695 13C13.0369 12.9984 14.3866 13.3091 15.6156 13.9084C16.8447 14.5077 17.9207 15.3797 18.7615 16.458C19.6279 15.3216 20.2113 13.9952 20.4634 12.5886C20.7154 11.182 20.6289 9.73553 20.211 8.36898C19.7931 7.00243 19.0557 5.75505 18.06 4.73004C17.0642 3.70503 15.8387 2.93186 14.4849 2.47451C13.131 2.01716 11.6877 1.88877 10.2744 2.09997C8.86101 2.31117 7.51828 2.85589 6.35726 3.68905C5.19624 4.52222 4.2503 5.61987 3.59772 6.8912C2.94514 8.16252 2.60467 9.57097 2.60449 11ZM11.6045 20C9.5384 20.0033 7.53464 19.2926 5.93249 17.988C6.5773 17.0646 7.43569 16.3107 8.43457 15.7905C9.43345 15.2702 10.5432 14.999 11.6695 15C12.7817 14.999 13.878 15.2635 14.8675 15.7713C15.8569 16.2792 16.7109 17.0158 17.3585 17.92C15.744 19.267 13.7071 20.0033 11.6045 20Z",fill:"black"})]})}),(0,l.jsxs)("button",{"aria-label":P("nav.minicartAria"),onClick:()=>{eu?F.push("/cart"):e_("login")},className:"flex items-center cursor-pointer relative",children:[(0,l.jsx)("svg",{width:"22",height:"22",viewBox:"0 0 24 25",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,l.jsx)("path",{d:"M17 18.5C17.5304 18.5 18.0391 18.7107 18.4142 19.0858C18.7893 19.4609
119 19.9696 19 20.5C19 21.0304 18.7893 21.5391 18.4142 21.9142C18.0391 22.2893 17.5304 22.5 17 22.5C16.4696 22.5 15.9609 22.2893 15.5858 21.9142C15.2107 21.5391 15 21.0304 15 20.5C15 19.39 15.89 18.5 17 18.5ZM1 2.5H4.27L5.21 4.5H20C20.2652 4.5 20.5196 4.60536 20.7071 4.79289C20.8946 4.98043 21 5.23478 21 5.5C21 5.67 20.95 5.84 20.88 6L17.3 12.47C16.96 13.08 16.3 13.5 15.55 13.5H8.1L7.2 15.13L7.17 15.25C7.17 15.3163 7.19634 15.3799 7.24322 15.4268C7.29011 15.4737 7.3537 15.5 7.42 15.5H19V17.5H7C6.46957 17.5 5.96086 17.2893 5.58579 16.9142C5.21071 16.5391 5 16.0304 5 15.5C5 15.15 5.09 14.82 5.24 14.54L6.6 12.09L3 4.5H1V2.5ZM7 18.5C7.53043 18.5 8.03914 18.7107 8.41421 19.0858C8.78929 19.4609 9 19.9696 9 20.5C9 21.0304 8.78929 21.5391 8.41421 21.9142C8.03914 22.2893 7.53043 22.5 7 22.5C6.46957 22.5 5.96086 22.2893 5.58579 21.9142C5.21071 21.5391 5 21.0304 5 20.5C5 19.39 5.89 18.5 7 18.5ZM16 11.5L18.78 6.5H6.14L8.5 11.5H16Z",fill:"#000"})}),(null==eh?void 0:eh.data.total_item)>0&&(0,l.jsx)("span",{className:"total-item-cart p-1 bg-red-600 text-white rounded-full absolute top-[-5px] right-[-5px] text-[10px] w-[16px] h-[16px] flex items-center justify-center",children:null==eh?void 0:eh.data.total_item})]})]}),eP&&(0,l.jsx)("div",{className:"hidden lg:flex order-2 shrink-0 items-center",children:(0,l.jsx)(d(),{className:"btn rounded-3xl px-10 text-white bg-[#044685] z-0 hover:bg-[#033a6b] btn-glow whitespace-nowrap",href:"".concat(eT),rel:"noopener noreferrer",target:"_blank",children:E})})]}),Y&&(0,l.jsx)("div",{className:"fixed inset-0 z-50 bg-black/50 xl:hidden",onClick:()=>$(!1),children:(0,l.jsx)("div",{className:"bg-white w-full shadow-lg",style:{animation:"slideDown 0.2s ease-out"},onClick:e=>e.stopPropagation(),children:(0,l.jsxs)("div",{className:"flex items-center gap-3 px-4 py-3",children:[(0,l.jsx)("button",{type:"button","aria-label":P("search.closeAria"),onClick:()=>$(!1),className:"p-1",children:(0,l.jsx)("svg",{className:"h-5 w-5 text-black",viewBox:"0 0 20 20",children:(0,l.jsx)("path",{d:"M10 8.586l4.95-4.95 1.414 1.414L11.414 10l4.95 4.95-1.414 1.414L10 11.414l-4.95 4.95-1.414-1.414L8.586 10 3.636 5.05 5.05 3.636z"})})}),(0,l.jsxs)("form",{onSubmit:e=>{eG(e),$(!1)},className:"flex-1 flex items-center relative",children:[(0,l.jsxs)("div",{className:"flex items-center w-full rounded-[30px] border border-[#044685]",children:[(0,l.jsxs)("div",{className:"relative p-[5px]",ref:eD,children:[(0,l.jsxs)("button",{type:"button",onClick:()=>eO(e=>!e),className:"rounded-[20px] font-semibold flex items-center gap-1 px-[10px] py-[5px] text-sm text-[#6B7280] whitespace-nowrap bg-[#F0F3FA] cursor-pointer",children:["product"===eI?P("search.productType"):P("search.supplierType"),(0,l.jsx)(h.A,{className:"w-3.5 h-3.5 text-black"})]}),eR&&(0,l.jsxs)("ul",{className:"absolute top-full left-0 mt-1 bg-white border border-gray-200 rounded-lg shadow-lg z-50 ml-[5px] ",children:[(0,l.jsx)("li",{children:(0,l.jsx)("button",{type:"button",onClick:()=>{eq("product"),eO(!1)},className:"block w-full text-left px-4 py-2 text-sm hover:bg-gray-100 ".concat("product"===eI?"font-medium text-[#044685]":""),children:P("search.productType")})}),(0,l.jsx)("li",{children:(0,l.jsx)("button",{type:"button",onClick:()=>{eq("supplier"),eO(!1)},className:"block w-full text-left px-4 py-2 text-sm hover:bg-gray-100 ".concat("supplier"===eI?"font-medium text-[#044685]":""),children:P("search.supplierType")})})]})]}),(0,l.jsx)("input",{autoFocus:!0,value:eH,onChange:e=>eF(e.target.value),className:"flex-1 px-3 py-2.5 border-0 focus:border-0 focus:outline-0 !ring-0 focus:shadow-none bg-transparent text-sm",placeholder:"product"===eI?P("search.productPlaceholder"):P("search.supplierPlaceholder")})]}),(0,l.jsx)("button",{type:"submit","aria-label":P("search.submitAria"),className:"absolute right-2 p-1.5 rounded-full text-white bg-[#044685] hover:bg-[#033a6b] transition",children:(0,l.jsx)(p.A,{className:"w-4 h-4"})})]})]})})}),O&&(0,l.jsx)("div",{className:"fixed inset-0 z-50 bg-black/50 flex lg:hidden h-[100vh]",children:(0,l.jsxs)("div",{ref:c,className:"bg-white w-full md:w-[90vw] h-auto
1shadow-lg mt-[50px] max-h-[calc(100%-50px)] overflow-auto ",children:[(0,l.jsxs)("div",{className:"flex justify-between items-center mb-4 border-b p-4",children:[(0,l.jsxs)("div",{className:"flex gap-2",children:[(0,l.jsx)(a.default,{src:b.A,alt:"iconAll"}),(0,l.jsx)("span",{className:"font-bold cursor-default",children:P("categories.all")})]}),(0,l.jsx)("button",{onClick:()=>z(!1),children:(0,l.jsx)("svg",{className:"h-5 w-5 text-black",viewBox:"0 0 20 20",children:(0,l.jsx)("path",{d:"M10 8.586l4.95-4.95 1.414 1.414L11.414 10l4.95 4.95-1.414 1.414L10 11.414l-4.95 4.95-1.414-1.414L8.586 10 3.636 5.05 5.05 3.636z"})})})]}),"main"===B&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("ul",{className:"flex flex-col gap-4 overflow-y-auto max-h-[350px]",children:D.map((e,t)=>{var s,r;return(0,l.jsxs)("li",{children:[(0,l.jsxs)("div",{className:"w-full flex items-center justify-between transition-colors ".concat(G===t?"bg-gray-100 font-bold":""),children:[(0,l.jsx)(n.N_,{href:(null==e?void 0:e.uri)?"/collection/".concat(e.uri):"#",prefetch:!1,onClick:()=>z(!1),className:"flex-1 text-left px-4 py-[14px]",children:(0,l.jsx)("span",{children:e.title})}),(null==(s=e.children)?void 0:s.length)>0&&(0,l.jsx)("button",{type:"button",onClick:()=>{Z(e=>e===t?null:t)},className:"px-4 py-[14px]","aria-label":G===t?P("nav.collapseAria"):P("nav.expandAria"),children:G===t?(0,l.jsx)(m.A,{className:"w-5 h-5 transition-transform duration-300 rotate-90"}):(0,l.jsx)(m.A,{className:"w-5 h-5 transition-transform duration-300"})})]}),G===t&&(0,l.jsx)("ul",{className:"ml-4 transition-all duration-300 overflow-hidden flex flex-col gap-2 ".concat(G===t?"max-h-96 mt-2 opacity-100":"max-h-0 mt-0 opacity-0"),children:null==(r=e.children)?void 0:r.map((t,s)=>{var r;return(0,l.jsxs)("li",{className:"flex items-center justify-between gap-2",children:[(0,l.jsx)(n.N_,{href:(null==e?void 0:e.uri)&&(null==t?void 0:t.uri)?"/collection/".concat(e.uri,"/").concat(t.uri):"#",prefetch:!1,onClick:()=>{W("main"),J(null),Z(null),z(!1)},className:"w-full text-left px-3 py-3 hover:bg-gray-100",children:(0,l.jsx)("div",{className:"flex items-center gap-2",children:t.title})}),(null==(r=t.children)?void 0:r.length)>0&&(0,l.jsx)("div",{className:"px-4 py-2",children:(0,l.jsx)(m.A,{onClick:()=>eA(t,null==e?void 0:e.uri),className:"w-5 h-5 transition-transform duration-300"})})]},s)})})]},t)})}),M.map((e,t)=>(0,l.jsx)("div",{className:"border-y py-2",children:(0,l.jsxs)(n.N_,{scroll:!1,href:e.url||"/",onClick:t=>eM(t,e.url),className:"nav-link flex items-center gap-2 ".concat(H===e.url?"nav-link-active":""),children:[(0,l.jsx)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,l.jsx)("path",{d:"M12 2C10.6868 2 9.38642 2.25866 8.17317 2.7612C6.95991 3.26375 5.85752 4.00035 4.92893 4.92893C3.05357 6.8043 2 9.34784 2 12C2 14.6522 3.05357 17.1957 4.92893 19.0711C5.85752 19.9997 6.95991 20.7362 8.17317 21.2388C9.38642 21.7413 10.6868 22 12 22C14.6522 22 17.1957 20.9464 19.0711 19.0711C20.9464 17.1957 22 14.6522 22 12C22 10.84 21.79 9.69 21.39 8.61L19.79 10.21C19.93 10.8 20 11.4 20 12C20 14.1217 19.1571 16.1566 17.6569
117.6569C16.1566 19.1571 14.1217 20 12 20C9.87827 20 7.84344 19.1571 6.34315 17.6569C4.84285 16.1566 4 14.1217 4 12C4 9.87827 4.84285 7.84344 6.34315 6.34315C7.84344 4.84285 9.87827 4 12 4C12.6 4 13.2 4.07 13.79 4.21L15.4 2.6C14.31 2.21 13.16 2 12 2ZM19 2L15 6V7.5L12.45 10.05C12.3 10 12.15 10 12 10C11.4696 10 10.9609 10.2107 10.5858 10.5858C10.2107 10.9609 10 11.4696 10 12C10 12.5304 10.2107 13.0391 10.5858 13.4142C10.9609 13.7893 11.4696 14 12 14C12.5304 14 13.0391 13.7893 13.4142 13.4142C13.7893 13.0391 14 12.5304 14 12C14 11.85 14 11.7 13.95 11.55L16.5 9H18L22 5H19V2ZM12 6C10.4087 6 8.88258 6.63214 7.75736 7.75736C6.63214 8.88258 6 10.4087 6 12C6 13.5913 6.63214 15.1174 7.75736 16.2426C8.88258 17.3679 10.4087 18 12 18C13.5913 18 15.1174 17.3679 16.2426 16.2426C17.3679 15.1174 18 13.5913 18 12H16C16 13.0609 15.5786 14.0783 14.8284 14.8284C14.0783 15.5786 13.0609 16 12 16C10.9391 16 9.92172 15.5786 9.17157 14.8284C8.42143 14.0783 8 13.0609 8 12C8 10.9391 8.42143 9.92172 9.17157 9.17157C9.92172 8.42143 10.9391 8 12 8V6Z",fill:"currentColor"})}),(0,l.jsx)("span",{children:e.name})]})},t)),(0,l.jsx)("div",{className:"border-y py-2",children:(0,l.jsxs)(n.N_,{href:"/rfq-marketplace",prefetch:!1,onClick:()=>z(!1),className:"nav-link flex items-center gap-2 font-semibold text-[#0052CC]",children:[(0,l.jsx)(f,{className:"w-5 h-5 text-[#10B981]"}),(0,l.jsx)("span",{children:P("categories.rfqMarketplace")})]})}),(0,l.jsxs)("li",{className:"nav-item lg:hidden relative border-b border-[#e5e7eb]",ref:et,children:[(0,l.jsxs)("button",{onClick:e=>{e.preventDefault(),eu?eS():e_("login")},className:"nav-link flex items-center gap-2",children:[(0,l.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"23",height:"22",viewBox:"0 0 23 22",fill:"none",children:[(0,l.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M15.6045 8C15.6045 9.06087 15.1831 10.0783 14.4329 10.8284C13.6828 11.5786 12.6654 12 11.6045 12C10.5436 12 9.52621 11.5786 8.77606 10.8284C8.02592 10.0783 7.60449 9.06087 7.60449 8C7.60449 6.93913 8.02592 5.92172 8.77606 5.17157C9.52621 4.42143 10.5436 4 11.6045 4C12.6654 4 13.6828 4.42143 14.4329 5.17157C15.1831 5.92172 15.6045 6.93913 15.6045 8ZM13.6045 8C13.6045 8.53043 13.3938 9.03914 13.0187 9.41421C12.6436 9.78929 12.1349 10 11.6045 10C11.0741 10 10.5654 9.78929 10.1903 9.41421C9.81521 9.03914 9.60449 8.53043 9.60449 8C9.60449 7.46957 9.81521 6.96086 10.1903 6.58579C10.5654 6.21071 11.0741 6 11.6045 6C12.1349 6 12.6436 6.21071 13.0187 6.58579C13.3938 6.96086 13.6045 7.46957 13.6045 8Z",fill:"currentColor"}),(0,l.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M11.6045 0C5.52949 0 0.604492 4.925 0.604492 11C0.604492 17.075 5.52949 22 11.6045 22C17.6795 22 22.6045 17.075 22.6045 11C22.6045 4.925 17.6795 0 11.6045 0ZM2.60449 11C2.60449 13.09 3.31749 15.014 4.51249 16.542C5.35193 15.4401 6.43465 14.5471 7.67613 13.9327C8.91762 13.3183 10.2843 12.9991 11.6695 13C13.0369 12.9984 14.3866 13.3091 15.6156 13.9084C16.8447 14.5077 17.9207 15.3797 18.7615 16.458C19.6279 15.3216 20.2113 13.9952 20.4634 12.5886C20.7154 11.182 20.6289 9.73553 20.211 8.36898C19.7931 7.00243 19.0557 5.75505 18.06 4.73004C17.0642 3.70503 15.8387 2.93186 14.4849 2.47451C13.131 2.01716 11.6877 1.88877 10.2744 2.09997C8.86101 2.31117 7.51828 2.85589 6.35726 3.68905C5.19624 4.52222 4.2503 5.61987 3.59772 6.8912C2.94514 8.16252 2.60467 9.57097 2.60449 11ZM11.6045 20C9.5384 20.0033 7.53464 19.2926 5.93249 17.988C6.5773 17.0646 7.43569 16.3107 8.43457 15.7905C9.43345 15.2702 10.5432 14.999 11.6695 15C12.7817 14.999 13.878 15.2635 14.8675 15.7713C15.8569 16.2792 16.7109 17.0158 17.3585 17.92C15.744 19.267 13.7071 20.0033 11.6045 20Z",fill:"currentColor"})]}),(0,l.jsxs)("span",{className:"max-w-[174px]",children:[" ",P("account.buyerCenter")]})]}),Q&&(0,l.jsxs)("ul",{className:"right-0 border-t border-[#e5e7eb] mt-0 bg-white group-hover:block z-[200] w-full",children:[(0,l.jsxs)("li",{className:"px-4 py-3 flex items-center gap-2",children:[(0,l.jsx)(a.default,{src:eZ,alt:"avatar",width:32,height:32,className:"w-8 h-8 rounded-full",onError:()=>eB("/icons/wws/user.svg")}),(0,l.jsx)("span",{className:"font-medium truncate max-w-[140px]",children:(null==ed?void 0:ed.name)||P("account.guest")})]}),(0,l.jsx)("li",{children:(0,l.jsx)(n.N_,{href:"/buyer-center/home",onClick:()=>{ee(!1),z(!1)},prefetch:!0,className:"block px-4 py-2 hover:bg-gray-100",children:P("account.home")})}),(0,l.jsx)("li",{children:(0,l.jsx)("a",{onClick:()=>{el(!0),ee(!1)},className:"block px-4 py-2 hover:bg-gray-100",children:P("account.myAccount")}
1)}),(0,l.jsx)("li",{children:(0,l.jsx)(n.N_,{href:"/buyer-center/message",onClick:()=>{ee(!1),z(!1)},className:"block px-4 py-2 hover:bg-gray-100",children:P("account.message")})}),(0,l.jsx)("li",{children:(0,l.jsx)(n.N_,{href:"/buyer-center/rfq",onClick:()=>{ee(!1),z(!1)},className:"block px-4 py-2 hover:bg-gray-100",children:P("account.rfqLink")})}),(0,l.jsx)("li",{children:(0,l.jsx)(n.N_,{href:"/buyer-center/orders",onClick:()=>{ee(!1),z(!1)},className:"block px-4 py-2 hover:bg-gray-100",children:P("account.order")})}),(0,l.jsx)("li",{children:(0,l.jsx)(n.N_,{href:"/cart",onClick:()=>{ee(!1),z(!1)},className:"block px-4 py-2 hover:bg-gray-100",children:P("account.cart")})}),(0,l.jsx)("li",{children:(0,l.jsx)("button",{onClick:()=>ex({callbackUrl:"/"}),className:"w-full text-left block px-4 py-2 hover:bg-gray-100",children:P("account.signOut")})})]})]}),eP&&(0,l.jsx)("div",{className:"p-6",children:(0,l.jsx)(d(),{className:"btn rounded-3xl px-10 text-white bg-[#044685] z-0 hover:bg-[#033a6b]",href:"".concat(eT),rel:"noopener noreferrer",target:"_blank",children:E})})]}),"submenu"===B&&V&&(0,l.jsx)("div",{className:"bg-white flex py-2",children:(0,l.jsxs)("div",{className:"flex-1 flex-col gap-8 mb-80",children:[(0,l.jsxs)("div",{className:"font-bold mb-2 flex items-center gap-2",children:[(0,l.jsx)("button",{onClick:()=>{W("main"),J(null),K(null)},className:"text-sm font-medium",children:(0,l.jsx)(g.A,{})}),V.title]}),(0,l.jsx)("ul",{className:"flex flex-col gap-1",children:null==(t=V.children)?void 0:t.map((e,t)=>(0,l.jsxs)(n.N_,{prefetch:!1,href:(()=>{let t=[X,null==V?void 0:V.uri,null==e?void 0:e.uri].filter(Boolean);return t.length>0?"/collection/".concat(t.join("/")):"#"})(),onClick:()=>{W("main"),J(null),Z(null),z(!1)},className:"flex items-center gap-3 cursor-pointer hover:bg-gray-50 rounded-lg px-4 py-3 transition",children:[e.imgUrl&&(0,l.jsx)(a.default,{src:e.imgUrl,alt:"",width:36,height:36,className:"border rounded-full flex-shrink-0"}),(0,l.jsx)("span",{className:"text-sm font-medium",children:e.title})]},t))})]})})]})}),(0,l.jsx)(ep,{open:em,mode:ef,resetToken:eN,onClose:ey,switchMode:ek}),(0,l.jsxs)("div",{className:"hidden lg:flex gap-[8px] 2xl:gap-[13px] items-center py-[10px] m-auto max-w-[1472px] px-[20px]",children:[!q&&(0,l.jsxs)("div",{className:"relative group",onMouseLeave:()=>{ec(!1),ea(null)},children:[(0,l.jsxs)("button",{className:"flex gap-[8px] border-r items-center shrink-0 pr-[8px] 2xl:pr-[20px]",children:[(0,l.jsx)(a.default,{src:j,alt:"icon_category",className:"hidden min-[1180px]:block shrink-0"}),(0,l.jsx)("span",{className:"text-[12px] min-[1180px]:text-[13px] min-[1366px]:text-[14px] whitespace-nowrap",children:P("categories.all")}),(0,l.jsx)(h.A,{className:"shrink-0 transition-transform group-hover:rotate-180",width:14,height:14})]}),(0,l.jsxs)("div",{className:"absolute left-0 top-full w-[236px] z-50 hidden ".concat(eo?"":"group-hover:block"),children:[(0,l.jsx)("div",{className:"h-8"}),(0,l.jsxs)("div",{className:"bg-white border shadow-lg",children:[D.map((e,t)=>(0,l.jsxs)(n.N_,{href:(null==e?void 0:e.uri)?"/collection/".concat(e.uri):"#",prefetch:!1,className:"flex justify-between items-center px-[16px] py-[14px] hover:bg-gray-100 cursor-pointer text-[14px]",onMouseEnter:()=>{ea(t)},onClick:()=>ec(!0),children:[e.title,(0,l.jsx)(m.A,{size:14})]},t)),(0,l.jsx)("div",{className:"absolute top-0 left-full w-[900px] h-full"}),null!==er&&(null==(s=D[er])?void 0:s.children)&&(0,l.jsx)("div",{className:"absolute top-8 left-full ml-2 w-max bg-white z-20 flex rounded-2xl border p-[20px] max-w-[900px] overflow-y-auto max-h-[700px]",children:(0,l.jsx)("ul",{className:"grid grid-cols-4 gap-[40px]",children:D[er].children.map((e,t)=>{var s,r;let a=null==(s=D[er])?void 0:s.uri;return(0,l.jsx)("li",{className:"rounded-lg transition duration-200",children:(0,l.jsxs)("div",{children:[(0,l.jsx)(n.N_,{href:a&&(null==e?void 0:e.uri)?"/collection/".concat(a,"/").concat(e.uri):"#",prefetch:!1,onClick:()=>ec(!0),onMouseDown:e=>{e.preventDefault(),e.stopPropagation()},className:"flex flex-col hover:bg-gray-100 rounded-lg p-2 transition",children:(0,l.jsx)("span",{className:"font-bold text-base",children:e.title})}),(null==(r=e.children)?void 0:r.length)>0&&(0,l.jsxs)("div",{className:"flex flex-col gap-1 items-start",children:[(en["".concat(er,"-").concat(t)]?e.children:e.children.slice(0,5)).map((t,s)=>
1(0,l.jsx)(n.N_,{href:a&&(null==e?void 0:e.uri)&&(null==t?void 0:t.uri)?"/collection/".concat(a,"/").concat(e.uri,"/").concat(t.uri):"#",prefetch:!1,onClick:()=>ec(!0),onMouseDown:e=>{e.preventDefault(),e.stopPropagation()},className:"flex flex-col hover:bg-gray-100 rounded-lg p-2 transition",children:(0,l.jsx)("span",{className:"text-sm font-medium",children:t.title})},s)),e.children.length>5&&(0,l.jsx)("button",{onMouseDown:e=>{e.preventDefault(),e.stopPropagation(),ei(e=>({...e,["".concat(er,"-").concat(t)]:!e["".concat(er,"-").concat(t)]}))},className:"text-[#044685] font-bold p-2 hover:bg-gray-100 rounded-lg",children:en["".concat(er,"-").concat(t)]?T("actions.seeLess"):T("actions.seeMore")})]})]})},"".concat(er,"-").concat(t))})})})]})]})]}),(0,l.jsxs)(n.N_,{href:"/collection/todays-featured-products",prefetch:!1,className:"flex gap-[8px] border-r items-center shrink-0 pr-[8px] 2xl:pr-[20px]",children:[(0,l.jsx)(a.default,{src:C,alt:"icon_today",className:"hidden min-[1180px]:block shrink-0"}),(0,l.jsx)("div",{className:"text-[12px] min-[1180px]:text-[13px] min-[1366px]:text-[14px] whitespace-nowrap",children:P("categories.todaysBigDeals")})]}),(0,l.jsxs)(n.N_,{href:"/collection/most-searched-products",prefetch:!1,className:"flex gap-[8px] border-r items-center shrink-0 pr-[8px] 2xl:pr-[20px]",children:[(0,l.jsx)(a.default,{src:N,alt:"icon_most",className:"hidden min-[1180px]:block shrink-0"}),(0,l.jsx)("div",{className:"text-[12px] min-[1180px]:text-[13px] min-[1366px]:text-[14px] whitespace-nowrap",children:P("categories.mostSearched")})]}),(0,l.jsxs)(n.N_,{href:"/collection/new-arrivals",prefetch:!1,className:"flex gap-[8px] border-r items-center shrink-0 pr-[8px] 2xl:pr-[20px]",children:[(0,l.jsx)(a.default,{src:y,alt:"icon_new",className:"hidden min-[1180px]:block shrink-0"}),(0,l.jsx)("div",{className:"text-[12px] min-[1180px]:text-[13px] min-[1366px]:text-[14px] whitespace-nowrap",children:P("categories.newArrivals")})]}),(0,l.jsxs)(n.N_,{href:"/collection/low-moq",prefetch:!1,className:"flex gap-[8px] border-r items-center shrink-0 pr-[8px] 2xl:pr-[20px]",children:[(0,l.jsx)(a.default,{src:k,alt:"icon_low",className:"hidden min-[1180px]:block shrink-0"}),(0,l.jsx)("div",{className:"text-[12px] min-[1180px]:text-[13px] min-[1366px]:text-[14px] whitespace-nowrap",children:P("categories.lowMoq")})]}),(0,l.jsxs)(n.N_,{href:"/collection/oem-products",prefetch:!1,className:"flex gap-[8px] border-r items-center shrink-0 pr-[8px] 2xl:pr-[20px]",children:[(0,l.jsx)(a.default,{src:_,alt:"icon_oem",className:"hidden min-[1180px]:block shrink-0"}),(0,l.jsx)("div",{className:"text-[12px] min-[1180px]:text-[13px] min-[1366px]:text-[14px] whitespace-nowrap",children:P("categories.oemProducts")})]}),(0,l.jsxs)(n.N_,{href:"/collection/analysts-choice",prefetch:!1,className:"flex gap-[8px] items-center shrink-0 pr-[8px] 2xl:pr-[20px]",children:[(0,l.jsx)(a.default,{src:S,alt:"icon_analyst",className:"hidden min-[1180px]:block shrink-0"}),(0,l.jsx)("div",{className:"text-[12px] min-[1180px]:text-[13px] min-[1366px]:text-[14px] whitespace-nowrap",children:P("categories.analystsChoice")})]}),(0,l.jsxs)(n.N_,{href:"/rfq-marketplace",prefetch:!1,className:"ml-auto shrink-0 flex gap-[8px] items-center rounded-full border border-[#BFDBFE] bg-[#EFF6FF] px-[12px] 2xl:px-[16px] py-[7px] text-[#0052CC] hover:bg-[#DBEAFE] whitespace-nowrap",children:[(0,l.jsx)(f,{className:"w-[18px] h-[18px] shrink-0 text-[#10B981]",strokeWidth:2}),(0,l.jsx)("div",{className:"text-[12px] min-[1180px]:text-[13px] min-[1366px]:text-[14px] font-bold",children:P("categories.rfqMarketplace")})]})]})]})}},86122:(e,t,s)=>{"use strict";s.d(t,{default:()=>a});var l=s(95155),r=s(36489);function a(e){let{children:t}=e;return(0,l.jsx)(r.SessionProvider,{children:t})}s(12115)},91251:(e,t,s)=>{"use strict";s.d(t,{default:()=>o});var l=s(95155),r=s(22390),a=s(75226),n=s(12115);let i=(0,a.A)({key:"mui",prepend:!0});function o(e){let{children:t}=e,s=(0,n.useMemo)(()=>i,[]);return(0,l.jsx)(r.C,{value:s,children:t})}},98828:(e,t,s)=>{"use strict";s.d(t,{default:()=>x});var l=s(95155);s(12115);var r=s(21866),a=s(98645),n=s(52619),i=s.n(n),o=s(778),c=s(95604),d=s(40045),u=s(49730);let x=()=>{let e=(0,o.rd)(),{w:t}=r.qr,s=(0,c.useTranslations)("Menu.footer"),{isAuthenticated:n}=(0,u.A)(),{openAuthModal:x}=(0,d.X)();return(0,l.jsx)("div",{className:"max-w-[1474px] mx-auto py-[40px] px-[8px] md:px-[20px] overflow-x-hidden",children:(0,l.jsxs)("div",{className:"flex flex-col gap-[30px]",children:[(0,l.jsx)(a.default,{src:t,alt:"",width:262,height:55}),(0,l.jsxs)("div",{className:"grid grid-cols-2 lg:grid-cols-9 gap-[16px] md:gap-[30px]",children:[(0,l.jsx)("div",{className:"col-span-2 md:col-span-3",children:(0,l.jsxs)("div",{className:"flex flex-col gap-[20px]",children:[(0,l.jsxs)("div",{children:[(0,l.jsx)("div",{className:"font-bold text-[16px] mb-[15px] pb-2.5 w-max border-b border-[#5F5F5F]",children:s("headingSourcing")}),(0,l.jsx)("div",{className:"font-medium text-[15px] italic pb-2.5 w-max border-b border-[#5F5F5F]",children:s("tagline")})]}),(0,l.jsxs)("div",{children:[(0,l.jsxs)("div",{className:"font-bold text-[15px] mb-[4px] flex gap-1 items-center",children:[(0,l.jsxs)("span",{children:[" ",s("vietnamHeadquartersTitle")]})," ",(0,l.jsx)("img",{src:"/icons/wws/vietnam-flag.svg",alt:"Vietnam Flag",className:"w-[26px] h-[26px] inline-block ml-1 relative mt-[-16px]"})]}),(0,l.jsx)("div",{className:"text-[15px] text-gray-300 leading-[2.5]",dangerouslySetInnerHTML:{__html:s.raw("vietnamHeadquartersAddress")}})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)("div",{className:"font-bold mb-[8px] text-[15px]",children:s("globalOfficesTitle")}),(0,l.jsxs)("div",{className:"flex flex-col gap-[6px] text-gray-300 text-[15px]",children:[(0,l.jsxs)("div",{className:"flex gap-1 ",children:[(0,l.jsx)("span",{dangerouslySetInnerHTML:{__html:s.raw("officeEU")}})," ",(0,l.jsx)("img",{src:"/icons/wws/europe-flag.svg",alt:"Europe Flag",className:"w-[26px] h-[26px] inline-block ml-1 relative mt-[-10px]"})]}),(0,l.jsxs)("div",{className:"flex gap-1 ",children:[(0,l.jsx)("span",{dangerouslySetInnerHTML:{__html:s.raw("officeUSA")}})," ",(0,l.jsx)("img",{src:"/icons/wws/us-flag.svg",alt:"USA Flag",className:"w-[26px] h-[26px] inline-block ml-1 relative mt-[-10px]"})]}),(0,l.jsxs)("div",{className:"flex gap-1 ",children:[(0,l.jsx)("span",{dangerouslySetInnerHTML:{__html:s.raw("officeSingapore")}})," ",(0,l.jsx)("img",{src:"/icons/wws/singapore-flag.svg",alt:"Singapore Flag",className:"relative mt-[-10px] w-[26px] h-[26px] inline-block ml-1"})]})]})]})]})}),(0,l.jsx)("div",{className:"col-span-2 md:col-span-6",children:(0,l.jsxs)("div",{className:"grid grid-cols-4 gap-[16px]",children:[(0,l.jsxs)("div",{className:"col-span-4 sm:col-span-2 lg:col-span-1",children:[(0,l.jsx)("div",{className:"font-bold text-[18px] mb-[16px]",children:s("aboutUsTitle")}),(0,l.jsxs)("div",{className:"flex flex-col gap-[8px]",children:[(0,l.jsx)(o.N_,{href:"/our-story",target:"_blank",className:"font-medium text-[15px]",children:s("linkOurStory")}),(0,l.jsx)(o.N_,{href:"",target:"_blank",className:"font-medium text-[15px]",onClick:t=>{t.preventDefault(),n?e.push("/buyer-center/home"):x("login")},children:s("linkBuyerPortal")}),(0,l.jsx)("div",{className:"font-medium text-[15px]",children:(0,l.jsx)(i(),{href:"https://supplier.vinasources.com",target:"_blank",children:s("linkSupplierPortal")})}),(0,l.jsx)(o.N_,{href:"/operating-regulations",target:"_blank",className:"font-medium text-[15px]",children:s("linkOperatingRegulations")})]})]}),(0,l.jsxs)("div",{className:"col-span-4 sm:col-span-2 lg:col-span-1",children:[(0,l.jsx)("div",{className:"font-bold text-[18px] mb-[16px]",children:s("resourcesTitle")}),(0,l.jsxs)("div",{className:"flex flex-col gap-[8px]",children:[(0,l.jsx)(i(),{href:"https://help.vinasources.com/",target:"_blank",className:"font-medium text-[15px]",children:s("linkHelpCenter")}),(0,l.jsx)(o.N_,{href:"/request-for-quotations",target:"_blank",className:"font-medium text-[15px]",children:s("linkRfq")}),(0,l.jsx)("a",{href:"https://vinasources.com/blog",target:"_blank",rel:"noopener noreferrer",className:"font-medium text-[15px]",children:s("linkBlog")}),(0,l.jsx)(o.N_,{href:"/dispute-resolution",target:"_blank",className:"font-medium text-[15px]",children:s("linkDisputeResolution")}),(0,l.jsx)(o.N_,{href:"/privacy-policy",target:"_blank",className:"font-medium text-[15px]",children:s("linkPrivacyPolicy")})]})]}),(0,l.jsxs)("div",{className:"col-span-4 sm:col-span-2 lg:col-span-1",children:[(0,l.jsx)("div",{className:"font-bold text-[18px] mb-[16px]",children:s("mediaPartnersTitle")}),(0,l.jsxs)("div",{className:"flex flex-col gap-[8px]",children:[(0,l.jsx)(i(),{href:"https://cafef.vn/vinasources-but-pha-ket-noi-n
1ha-mua-hang-quoc-te-nha-san-xuat-viet-188250820152057915.chn",target:"_blank",className:"font-medium text-[15px]",prefetch:!1,children:"CafeF"}),(0,l.jsx)(i(),{href:"https://vietnamnet.vn/vinasources-but-pha-ket-noi-nha-mua-quoc-te-nha-san-xuat-viet-2435820.html",target:"_blank",className:"font-medium text-[15px]",prefetch:!1,children:"Vietnamnet"}),(0,l.jsx)(i(),{href:"https://vnexpress.net/nen-tang-ket-noi-chuoi-cung-ung-truy-xuat-nguon-goc-tu-vinasources-4929694.html",target:"_blank",className:"font-medium text-[15px]",prefetch:!1,children:"VnExpress"})]})]}),(0,l.jsxs)("div",{className:"col-span-4 sm:col-span-2 lg:col-span-1",children:[(0,l.jsx)("div",{className:"font-bold text-[18px] mb-[16px]",children:s("bizTitle")}),(0,l.jsxs)("div",{className:"flex flex-col gap-[10px] text-[15px]",children:[(0,l.jsxs)("div",{className:"flex flex-wrap gap-x-[6px]",children:[(0,l.jsxs)("span",{className:"font-bold",children:[s("bizNameLabel"),":"]}),(0,l.jsx)("span",{children:s("bizName")})]}),(0,l.jsxs)("div",{className:"flex flex-wrap gap-x-[6px]",children:[(0,l.jsxs)("span",{className:"font-bold",children:[s("switchboardLabel"),":"]}),(0,l.jsx)(i(),{href:"tel:19004356",children:"19004356"})]}),(0,l.jsxs)("div",{className:"flex flex-wrap gap-x-[6px]",children:[(0,l.jsxs)("span",{className:"font-bold",children:[s("hotlineLabel"),":"]}),(0,l.jsx)(i(),{href:"tel:0329725268",children:"0329725268"})]}),(0,l.jsxs)("div",{className:"flex flex-wrap gap-x-[6px]",children:[(0,l.jsxs)("span",{className:"font-bold",children:[s("emailLabel"),":"]}),(0,l.jsx)(i(),{href:"mailto:[email protected]",className:"break-all",children:"[email protected]"})]}),(0,l.jsxs)("div",{children:[(0,l.jsxs)("div",{className:"flex flex-wrap gap-x-[6px]",children:[(0,l.jsxs)("span",{className:"font-bold",children:[s("taxLabel"),":"]}),(0,l.jsxs)("span",{children:[s("taxValue"),","]})]}),(0,l.jsx)("div",{children:s("taxIssuedBy")})]})]})]})]})})]})]})})}}},e=>{e.O(0,[2772,759,177,6061,2076,4623,7358],()=>e(e.s=7639)),_N_E=e.O()}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.