1(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,32189,(e,t,r)=>{"use strict";t.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},65156,(e,t,r)=>{"use strict";var s=e.r(32189);function o(){}function a(){}a.resetWarningCache=o,t.exports=function(){function e(e,t,r,o,a,n){if(n!==s){var i=Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw i.name="Invariant Violation",i}}function t(){return e}e.isRequired=e;var r={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:a,resetWarningCache:o};return r.PropTypes=r,r}},45009,(e,t,r)=>{t.exports=e.r(65156)()},16915,(e,t,r)=>{!function(s,o){if("function"==typeof define&&define.amd){let s;void 0!==(s=o(e.r,r,t))&&e.v(s)}else t.exports=o()}(e.e,function(){var e,t,r,s={};s.version="0.2.0";var o=s.settings={minimum:.08,easing:"ease",positionUsing:"",speed:200,trickle:!0,trickleRate:.02,trickleSpeed:800,showSpinner:!0,barSelector:'[role="bar"]',spinnerSelector:'[role="spinner"]',parent:"body",template:'<div class="bar" role="bar"><div class="peg"></div></div><div class="spinner" role="spinner"><div class="spinner-icon"></div></div>'};function a(e,t,r){return e<t?t:e>r?r:e}s.configure=function(e){var t,r;for(t in e)void 0!==(r=e[t])&&e.hasOwnProperty(t)&&(o[t]=r);return this},s.status=null,s.set=function(e){var t=s.isStarted();s.status=1===(e=a(e,o.minimum,1))?null:e;var r=s.render(!t),l=r.querySelector(o.barSelector),c=o.speed,d=o.easing;return r.offsetWidth,n(function(t){var a,n,u,h;""===o.positionUsing&&(o.positionUsing=s.getPositioningCSS()),i(l,(a=e,n=c,u=d,(h="translate3d"===o.positionUsing?{transform:"translate3d("+(-1+a)*100+"%,0,0)"}:"translate"===o.positionUsing?{transform:"translate("+(-1+a)*100+"%,0)"}:{"margin-left":(-1+a)*100+"%"}).transition="all "+n+"ms "+u,h)),1===e?(i(r,{transition:"none",opacity:1}),r.offsetWidth,setTimeout(function(){i(r,{transition:"all "+c+"ms linear",opacity:0}),setTimeout(function(){s.remove(),t()},c)},c)):setTimeout(t,c)}),this},s.isStarted=function(){return"number"==typeof s.status},s.start=function(){s.status||s.set(0);var e=function(){setTimeout(function(){s.status&&(s.trickle(),e())},o.trickleSpeed)};return o.trickle&&e(),this},s.done=function(e){return e||s.status?s.inc(.3+.5*Math.random()).set(1):this},s.inc=function(e){var t=s.status;return t?("number"!=typeof e&&(e=(1-t)*a(Math.random()*t,.1,.95)),t=a(t+e,0,.994),s.set(t)):s.start()},s.trickle=function(){return s.inc(Math.random()*o.trickleRate)},e=0,t=0,s.promise=function(r){return r&&"resolved"!==r.state()&&(0===t&&s.start(),e++,t++,r.always(function(){0==--t?(e=0,s.done()):s.set((e-t)/e)})),this},s.render=function(e){if(s.isRendered())return document.getElementById("nprogress");c(document.documentElement,"nprogress-busy");var t=document.createElement("div");t.id="nprogress",t.innerHTML=o.template;var r,a=t.querySelector(o.barSelector),n=e?"-100":(-1+(s.status||0))*100,l=document.querySelector(o.parent);return i(a,{transition:"all 0 linear",transform:"translate3d("+n+"%,0,0)"}),!o.showSpinner&&(r=t.querySelector(o.spinnerSelector))&&h(r),l!=document.body&&c(l,"nprogress-custom-parent"),l.appendChild(t),t},s.remove=function(){d(document.documentElement,"nprogress-busy"),d(document.querySelector(o.parent),"nprogress-custom-parent");var e=document.getElementById("nprogress");e&&h(e)},s.isRendered=function(){return!!document.getElementById("nprogress")},s.getPositioningCSS=function(){var e=document.body.style,t="WebkitTransform"in e?"Webkit":"MozTransform"in e?"Moz":"msTransform"in e?"ms":"OTransform"in e?"O":"";return t+"Perspective"in e?"translate3d":t+"Transform"in e?"translate":"margin"};var n=(r=[],function(e){r.push(e),1==r.length&&function e(){var t=r.shift();t&&t(e)}()}),i=function(){var e=["Webkit","O","Moz","ms"],t={};function r(r,s,o){var a;s=t[a=(a=s).replace(/^-ms-/,"ms-").replace(/-([\da-z])/gi,function(e,t){return t.toUpperCase()})]||(t[a]=function(t){var r=document.body.style;if(t in r)return t;for(var s,o=e.length,a=t.charAt(0).toUpperCase()+t.slice(1);o--;)if((s=e[o]+a)in r)return s;return t}(a)),r.style[s]=o}return function(e,t){var s,o,a=arguments;if(2==a.length)for(s in t)void 0!==(o=t[s])&&t.hasOwnProperty(s)&&r(e,s,o);else r(e,a[1],a[2])}}();function l(e,t){return("string"==typeof e?e:u(e)).indexOf(" "+t+" ")>=0}function c(e,t){var r=u(e),s=r+t;l(r,t)||(e.className=s.substring(1))}function d(e,t){var r,s=u(e);l(e,t)&&(e.className=(r=s.replace(" "+t+" "," ")).substring(1,r.length-1))}function u(e){return(" "+(e.className||"")+" ").replace(/\s+/gi," ")}function h(e){e&&e.parentNode&&e.parentNode.removeChild(e)}return s})},18421,(e,t,r)=>{var s=Object.create,o=Object.defineProperty,a=Object.getOwnPropertyDescriptor,n=Object.getOwnPropertyNames,i=Object.getPrototypeOf,l=Object.prototype.hasOwnProperty,c=(e,t)=>o(e,"name",{value:t,configurable:!0}),d=(e,t,r,s)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let i of n(t))l.call(e,i)||i===r||o(e,i,{get:()=>t[i],enumerable:!(s=a(t,i))||s.enumerable});return e},u=(e,t,r)=>(r=null!=e?s(i(e)):{}
1,d(!t&&e&&e.__esModule?r:o(r,"default",{value:e,enumerable:!0}),e)),h={},p={default:()=>y,useTopLoader:()=>v};for(var m in p)o(h,m,{get:p[m],enumerable:!0});t.exports=d(o({},"__esModule",{value:!0}),h);var x=u(e.r(45009)),f=u(e.r(71645)),g=u(e.r(16915)),b=u(e.r(16915)),v=c(()=>({start:()=>b.start(),done:e=>b.done(e),remove:()=>b.remove(),setProgress:e=>b.set(e),inc:e=>b.inc(e),trickle:()=>b.trickle(),isStarted:()=>b.isStarted(),isRendered:()=>b.isRendered(),getPositioningCSS:()=>b.getPositioningCSS()}),"useTopLoader"),w=c(({color:e,height:t,showSpinner:r,crawl:s,crawlSpeed:o,initialPosition:a,easing:n,speed:i,shadow:l,template:d,zIndex:u=1600,showAtBottom:h=!1,showForHashAnchor:p=!0,nonce:m})=>{let x=null!=e?e:"#29d",b=l||void 0===l?l?`box-shadow:${l}`:`box-shadow:0 0 10px ${x},0 0 5px ${x}`:"",v=f.createElement("style",{nonce:m},`#nprogress{pointer-events:none}#nprogress .bar{background:${x};position:fixed;z-index:${u};${h?"bottom: 0;":"top: 0;"}left:0;width:100%;height:${null!=t?t:3}px}#nprogress .peg{display:block;position:absolute;right:0;width:100px;height:100%;${b};opacity:1;-webkit-transform:rotate(3deg) translate(0px,-4px);-ms-transform:rotate(3deg) translate(0px,-4px);transform:rotate(3deg) translate(0px,-4px)}#nprogress .spinner{display:block;position:fixed;z-index:${u};${h?"bottom: 15px;":"top: 15px;"}right:15px}#nprogress .spinner-icon{width:18px;height:18px;box-sizing:border-box;border:2px solid transparent;border-top-color:${x};border-left-color:${x};border-radius:50%;-webkit-animation:nprogress-spinner 400ms linear infinite;animation:nprogress-spinner 400ms linear infinite}.nprogress-custom-parent{overflow:hidden;position:relative}.nprogress-custom-parent #nprogress .bar,.nprogress-custom-parent #nprogress .spinner{position:absolute}@-webkit-keyframes nprogress-spinner{0%{-webkit-transform:rotate(0deg)}100%{-webkit-transform:rotate(360deg)}}@keyframes nprogress-spinner{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}`),w=c(e=>new URL(e,window.location.href).href,"toAbsoluteURL"),y=c((e,t)=>{let r=new URL(w(e)),s=new URL(w(t));return r.href.split("#")[0]===s.href.split("#")[0]},"isHashAnchor"),j=c((e,t)=>{let r=new URL(w(e)),s=new URL(w(t));return r.hostname.replace(/^www\./,"")===s.hostname.replace(/^www\./,"")},"isSameHostName");return f.useEffect(()=>{let e,t;function l(e,t){let r=new URL(e),s=new URL(t);if(r.hostname===s.hostname&&r.pathname===s.pathname&&r.search===s.search){let e=r.hash,t=s.hash;return e!==t&&r.href.replace(e,"")===s.href.replace(t,"")}return!1}g.configure({showSpinner:null==r||r,trickle:null==s||s,trickleSpeed:null!=o?o:200,minimum:null!=a?a:.08,easing:null!=n?n:"ease",speed:null!=i?i:200,template:null!=d?d:'<div class="bar" role="bar"><div class="peg"></div></div><div class="spinner" role="spinner"><div class="spinner-icon"></div></div>'}),c(l,"isAnchorOfCurrentUrl");var u,h,m=document.querySelectorAll("html");let x=c(()=>m.forEach(e=>e.classList.remove("nprogress-busy")),"removeNProgressClass");function f(e){for(;e&&"a"!==e.tagName.toLowerCase();)e=e.parentElement;return e}function b(e){try{let t=e.target,r=f(t),s=null==r?void 0:r.href;if(s){let t=window.location.href,o=""!==r.target,a=["tel:","mailto:","sms:","blob:","download:"].some(e=>s.startsWith(e));if(!j(window.location.href,r.href))return;let n=l(t,s)||y(window.location.href,r.href);if(!p&&n)return;s===t||o||a||n||e.ctrlKey||e.metaKey||e.shiftKey||e.altKey||!w(r.href).startsWith("http")?(g.start(),g.done(),x()):g.start()}}catch(e){g.start(),g.done()}}function v(){g.done(),x()}function N(){g.done()}return c(f,"findClosestAnchor"),c(b,"handleClick"),e=(u=window.history).pushState,u.pushState=(...t)=>(g.done(),x(),e.apply(u,t)),t=(h=window.history).replaceState,h.replaceState=(...e)=>(g.done(),x(),t.apply(h,e)),c(v,"handlePageHide"),c(N,"handleBackAndForth"),window.addEventListener("popstate",N),document.addEventListener("click",b),window.addEventListener("pagehide",v),()=>{document.removeEventListener("click",b),window.removeEventListener("pagehide",v),window.removeEventListener("popstate",N)}},[]),v},"NextTopLoader"),y=w;w.propTypes={color:x.string,height:x.number,showSpinner:x.bool,crawl:x.bool,crawlSpeed:x.number,initialPosition:x.number,easing:x.str
1ing,speed:x.number,template:x.string,shadow:x.oneOfType([x.string,x.bool]),zIndex:x.number,showAtBottom:x.bool}},58179,e=>{"use strict";var t=e.i(43476),r=e.i(932),s=e.i(57688),o=e.i(66595),a=e.i(79266),n=e.i(74544),i=e.i(47163),l=e.i(18566);e.s(["default",0,e=>{let c,d,u,h,p,m=(0,r.c)(20),{search:x,isFocused:f,history:g,results:b,isSearching:v,onTriggerSearch:w,onClearHistory:y,onProductClick:j,isMobile:N}=e,C=(0,l.useRouter)();m[0]!==j||m[1]!==C?(c=e=>{C.push(`/product-detail/${e}`),j()},m[0]=j,m[1]=C,m[2]=c):c=m[2];let k=c,S=void 0!==N&&N?"relative w-full h-full":"absolute w-full border border-gray-200 rounded-lg shadow-lg mt-2 max-h-[80vh] overflow-y-auto z-50";return m[3]!==S?(d=(0,i.cn)("bg-white flex flex-col",S),m[3]=S,m[4]=d):d=m[4],m[5]!==g||m[6]!==f||m[7]!==y||m[8]!==w||m[9]!==x?(u=!x&&f&&g.length>0&&(0,t.jsxs)("div",{className:"p-4 border-b border-gray-100",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between mb-3 px-1",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(a.History,{className:"w-4 h-4 text-gray-400"}),(0,t.jsx)("span",{className:"text-xs font-bold text-gray-500 uppercase tracking-wider",children:"Recent Searches"})]}),(0,t.jsx)("button",{onClick:y,className:"text-xs text-gray-400 hover:text-red-500 transition-colors",children:"Clear All"})]}),(0,t.jsx)("div",{className:"flex flex-col gap-0.5",children:g.map((e,r)=>(0,t.jsxs)("button",{onClick:()=>w(e),className:"flex items-center gap-3 px-3 py-2 hover:bg-gray-50 rounded-lg transition-colors text-left group",children:[(0,t.jsx)(n.Clock,{className:"w-3.5 h-3.5 text-gray-300 shrink-0"}),(0,t.jsx)("span",{className:"text-sm text-gray-600 group-hover:text-gray-900",children:e})]},r))})]}),m[5]=g,m[6]=f,m[7]=y,m[8]=w,m[9]=x,m[10]=u):u=m[10],m[11]!==k||m[12]!==v||m[13]!==b||m[14]!==x?(h=x&&(0,t.jsxs)("div",{className:"flex flex-col",children:[(b.length>0||v)&&(0,t.jsx)("div",{className:"px-4 py-2 bg-gray-50 border-b border-gray-100",children:(0,t.jsx)("span",{className:"text-[11px] font-bold text-gray-500 uppercase tracking-wider",children:"Products Match"})}),v?(0,t.jsxs)("div",{className:"p-8 text-center text-gray-500 flex flex-col items-center justify-center",children:[(0,t.jsx)("div",{className:"animate-spin rounded-full h-8 w-8 border-b-2 border-(--colour-fsP2) mb-3"}),(0,t.jsx)("p",{className:"text-sm",children:"Searching the catalog..."})]}):b.length>0?(0,t.jsx)("div",{className:"divide-y divide-gray-100",children:b.slice(0,6).map(e=>(0,t.jsxs)("div",{onClick:()=>k(e.slug),className:"flex items-center p-3 px-4 hover:bg-blue-50/50 cursor-pointer transition-colors group",children:[e.thumb&&(0,t.jsx)("div",{className:"w-12 h-12 mr-3 bg-white border border-gray-100 rounded-lg overflow-hidden shrink-0 group-hover:border-(--colour-fsP2) transition-colors",children:(0,t.jsx)(s.default,{src:e.thumb.url,alt:e.thumb.alt_text||e.name,width:48,height:48,className:"w-full h-full object-contain p-1"})}),(0,t.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,t.jsx)("p",{className:"text-sm font-medium text-gray-900 truncate group-hover:text-(--colour-fsP2) transition-colors",children:e.name}),(0,t.jsxs)("span",{className:"text-sm font-bold text-(--colour-fsP2)",children:["Rs ",e.price?.toLocaleString()]})]})]},e.id))}):x.length>2&&(0,t.jsxs)("div",{className:"p-8 text-center text-gray-500",children:[(0,t.jsx)(o.Search,{className:"h-10 w-10 mx-auto mb-3 text-gray-200"}),(0,t.jsxs)("p",{className:"text-sm",children:["No products found for ",(0,t.jsx)("br",{}),(0,t.jsxs)("span",{className:"font-semibold text-gray-700",children:['"',x,'"']})]})]})]}),m[11]=k,m[12]=v,m[13]=b,m[14]=x,m[15]=h):h=m[15],m[16]!==d||m[17]!==u||m[18]!==h?(p=(0,t.jsxs)("div",{className:d,children:[u,h]}),m[16]=d,m[17]=u,m[18]=h,m[19]=p):p=m[19],p}])},63315,e=>{"use strict";var t=e.i(43476),r=e.i(71645),s=e.i(66595),o=e.i(18566),a=e.i(89974),n=e.i(58179),i=e.i(45904);e.s(["default",0,()=>{let e=(0,o.useRouter)(),l=(0,r.useRef)(null),c=(0,r.useRef)(null),d=(0,r.useRef)(0),[u,h]=(0,r.useState)({search:"",results:[],suggestions:[],isFocused:!1,showDropdown:!1,isSearching:!1,history:(0,i.getSearchHistory)()}),p=(0,r.useCallback)(e=>h(t=>({...t,...e})),[]);(0,r.useEffect)(()=>{let e=e=>{l.current&&!l.current.contains(e.target)&&p({showDropdown:!1})};return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[p]);let m=(0,r.useCallback)(async e=>{if(e.length<=2)return void p({results:[],isSearching:!1});let t=++d.current;p({isSearching:!0});try{let r=await (0,a.searchProducts)({search:e,per_page:5});if(t!==d.current)return;p({results:r.data??[],isSearching:!1})}catch{t===d.current&&p({results:[],isSearching:!1})}},[p]),x=(0,r.useCallback)(e=>{let t=e.trim()?i.SUGGESTION_KEYWORDS.filter(t=>t.toLowerCase().includes(e.toLowerCase())).slice(0,4):[];p({search:e,showDropdown:!0,isFocused:!0,suggestions:t}),c.current&&clearTimeout(c.current),e.length>2?c.current=setTimeout(()=>m(e),350):p({results:[],isSearching:!1})},[m,p]),f=(0,r.useCallback)(()=>{let t=u.search.trim();t&&(c.current&&clearTimeout(c.current),(0,i.saveSearchTerm)(t),e.push(`/search?search=${encodeURIComponent(t)}`),p({showDropdown:!1}))},[u.search,e,p]);return(0,t.jsx)("div",{className:"hidden lg:flex items-center flex-1 max-w-2xl mx-6",ref:l,children:(0,t.jsxs)("div",{className:"relative w-full",children:[(0,t.jsxs)("div",{className:"flex rounded-full border border-gray-300 bg-gray-50 hover:bg-white hover:border-(--colour-fsP2) transition-all duration-200 overflow-hidden focu
1s-within:ring-2 focus-within:ring-(--colour-fsP2) focus-within:border-(--colour-fsP2)",children:[(0,t.jsx)("input",{type:"text",placeholder:"Search products, brands...",value:u.search,onChange:e=>x(e.target.value),onFocus:()=>p({isFocused:!0,showDropdown:!0}),onKeyDown:e=>{"Enter"===e.key&&u.search.trim()&&f()},className:"w-full px-4 py-2.5 bg-transparent border-none focus:outline-none text-sm placeholder-gray-500"}),(0,t.jsx)("button",{onClick:f,"aria-label":"Search",name:"search",className:"bg-(--colour-fsP2) text-white px-4 py-2.5 m-0.5 hover:opacity-90 transition-colors rounded-full flex items-center justify-center",children:(0,t.jsx)(s.Search,{className:"w-4 h-4"})})]}),u.showDropdown&&(0,t.jsx)(n.default,{...u,onTriggerSearch:x,onClearHistory:()=>{(0,i.clearSearchHistory)(),p({history:[]})},onProductClick:()=>p({showDropdown:!1})})]})})}])},91307,e=>{"use strict";var t=e.i(43476),r=e.i(932),s=e.i(71645),o=e.i(1279),a=e.i(99738),n=e.i(68109),i=e.i(16327),l=e.i(56420);let c=(0,l.default)("layout-dashboard",[["rect",{width:"7",height:"9",x:"3",y:"3",rx:"1",key:"10lvy0"}],["rect",{width:"7",height:"5",x:"14",y:"3",rx:"1",key:"16une8"}],["rect",{width:"7",height:"9",x:"14",y:"12",rx:"1",key:"1hutg5"}],["rect",{width:"7",height:"5",x:"3",y:"16",rx:"1",key:"ldoo1y"}]]);var d=e.i(79258),u=e.i(67784);let h=(0,l.default)("user-round",[["circle",{cx:"12",cy:"8",r:"5",key:"1hypcn"}],["path",{d:"M20 21a8 8 0 0 0-16 0",key:"rfgkzh"}]]);var p=e.i(22016),m=e.i(51884),x=e.i(60630),f=e.i(46944);function g(e){return{user:e.user,isLoggedIn:e.isLoggedIn,logout:e.logout,setLoginDialogOpen:e.setLoginDialogOpen,hasHydrated:e.hasHydrated}}function b(e){return{cartItems:e.cartItems,wishlistItems:e.wishlistItems,setIsCartOpen:e.setIsCartOpen,setIsWishlistOpen:e.setIsWishlistOpen}}e.s(["default",0,function(){let e,l,v=(0,r.c)(14),{cartItems:w,wishlistItems:y,setIsCartOpen:j,setIsWishlistOpen:N}=(0,x.useCartStore)((0,f.useShallow)(b)),{user:C,isLoggedIn:k,logout:S,setLoginDialogOpen:P,hasHydrated:O}=(0,m.useAuthStore)((0,f.useShallow)(g));(0,m.useAuthExpiredListener)();let[R,E]=(0,s.useState)(!1),T=w?.items?.length||0,_=y.length;v[0]!==S?(e=()=>{S(),E(!1)},v[0]=S,v[1]=e):e=v[1];let L=e;return v[2]!==T||v[3]!==L||v[4]!==O||v[5]!==k||v[6]!==j||v[7]!==N||v[8]!==P||v[9]!==R||v[10]!==C?.email||v[11]!==C?.name||v[12]!==_?(l=(0,t.jsx)("div",{className:"flex items-center space-x-2 sm:space-x-3 min-h-[40px]",children:O?k?(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,t.jsxs)("button",{onClick:()=>j(!0),"aria-label":"Open cart",className:"relative p-1.5 rounded-full border border-gray-300 text-slate-700 hover:text-[var(--colour-fsP2)] hover:border-[var(--colour-fsP2)] hover:bg-blue-50 transition-all",children:[(0,t.jsx)(a.ShoppingCart,{className:"h-4 w-4",strokeWidth:2.5}),T>0&&(0,t.jsx)("span",{className:"absolute -top-1 -right-1 bg-[var(--colour-fsP1)] text-white text-[10px] font-bold rounded-full h-4 w-4 flex items-center justify-center",children:T})]}),(0,t.jsxs)("button",{onClick:()=>N(!0),"aria-label":"Open wishlist",className:"relative p-1.5 rounded-full border border-gray-300 text-slate-700 hover:text-[var(--colour-fsP2)] hover:border-[var(--colour-fsP2)] hover:bg-blue-50 transition-all",children:[(0,t.jsx)(n.Heart,{className:"h-4 w-4",strokeWidth:2.5}),_>0&&(0,t.jsx)("span",{className:"absolute -top-1 -right-1 bg-red-500 text-white text-[10px] font-bold rounded-full h-4 w-4 flex items-center justify-center",children:_})]}),(0,t.jsxs)("div",{className:"relative",children:[(0,t.jsxs)("button",{onClick:()=>E(!R),"aria-label":"Account menu",className:"flex items-center space-x-1 p-1.5 rounded-full border border-gray-300 text-slate-700 hover:text-[var(--colour-fsP2)] hover:border-[var(--colour-fsP2)] hover:bg-blue-50 transition-all",children:[(0,t.jsx)(o.User,{className:"h-4 w-4",strokeWidth:2}),(0,t.jsx)(i.ChevronDown,{className:"h-3 w-3",strokeWidth:2})]}),R&&(0,t.jsxs)("div",{className:"absolute right-0 top-full mt-2 w-60 bg-white border border-gray-200 rounded-lg shadow-lg z-50 overflow-hidden animate-in fade-in slide-in-from-top-2 duration-200",children:[(0,t.jsxs)("div",{className:"px-4 py-3 border-b border-gray-100",children:[(0,t.jsx)("p",{className:"text-sm font-semibold text-gray-900 truncate tracking-tight",children:C?.name||"Account"}),(0,t.jsx)("p",{className:"text-xs text-gray-500 truncate mt-0.5",children:C?.email||"[email protected]"})]}),(0,t.jsxs)("div",{className:"py-1",children:[[{href:"/profile?tab=overview",icon:c,label:"Dashboard"},{href:"/profile?tab=orders",icon:d.Package,label:"My Orders"}].map(e=>(0,t.jsxs)(p.default,{prefetch:!1,href:e.href,onClick:()=>E(!1),className:"flex items-center gap-2 px-4 py-2 text-sm text-gray-700 hover:bg-gray-50 hover:text-gray-900 transition-colors",children:[(0,t.jsx)(e.icon,{className:"w-4 h-4 text-gray-400"}),e.label]},e.href)),(0,t.jsx)("div",{className:"h-px bg-gray-100 my-1"}),(0,t.jsxs)("button",{onClick:L,className:"w-full flex items-center gap-2 px-4 py-2 text-sm text-red-600 hover:bg-red-50 transition-colors text-left",children:[(0,t.jsx)(u.LogOut,{className:"w-4 h-4"}),"Logout"]})]})]})]})]}):(0,t.jsxs)("button",{onClick:()=>P(!0),className:"px-5 py-2 bg-[var(--colour-fsP2)] hover:opacity-90 text-white rounded-full transition-all duration-300 shadow-md hover:shadow-lg flex items-center gap-2 font-medium",children:[(0,t.jsx)("span",{className:"font-bold",children:"Sign In"}),(0,t.jsx)("div",{className:"bg-white/20 p-1 rounded-full",children:(0,t.jsx)(h,{className:"w-4 h-4 text-white"})})]}):(0,t.jsx)("div",{className:"w-24 h-9 bg-gray-100 rounded-full animate-pulse"})}),v[2]=T,v[3]=L,v[4]=O,v[5]=k,v[6]=j,v[7]=N,v[8]=P,v[9]=R,v[10]=C?.email,v[11]=C?.name,v[12]=_,v[13]=l):l=v[13],l}],91307)},7756,e=>{"use strict";var t,r=e.i(43476),s=e.i(932),o=e.i(71645),a=e.i(57688),n=e.i(22016),i=e.i(16327),l=e.i(67927),c=e.i(56420);let d=(0,c.default)("telescope",[["path",{d:"m10.065 12.493-6.18 1.318a.934.934 0 0 1-1.108-.702l-.537-2.15a1.07 1.07 0 0 1 .691-1.265l13.504-4.44",key:"k4qptu"}],["path",{d:"m13.56 11.747 4.332-.924",key:"19l80z"}],["path",{d:"m16 21-3.105-6.21",key:"7oh9d"}
1],["path",{d:"M16.485 5.94a2 2 0 0 1 1.455-2.425l1.09-.272a1 1 0 0 1 1.212.727l1.515 6.06a1 1 0 0 1-.727 1.213l-1.09.272a2 2 0 0 1-2.425-1.455z",key:"m7xp4m"}],["path",{d:"m6.158 8.633 1.114 4.456",key:"74o979"}],["path",{d:"m8 21 3.105-6.21",key:"1fvxut"}],["circle",{cx:"12",cy:"13",r:"2",key:"1c1ljs"}]]),u=(0,c.default)("calculator",[["rect",{width:"16",height:"20",x:"4",y:"2",rx:"2",key:"1nb95v"}],["line",{x1:"8",x2:"16",y1:"6",y2:"6",key:"x4nwl0"}],["line",{x1:"16",x2:"16",y1:"14",y2:"18",key:"wjye3r"}],["path",{d:"M16 10h.01",key:"1m94wz"}],["path",{d:"M12 10h.01",key:"1nrarc"}],["path",{d:"M8 10h.01",key:"19clt8"}],["path",{d:"M12 14h.01",key:"1etili"}],["path",{d:"M8 14h.01",key:"6423bh"}],["path",{d:"M12 18h.01",key:"mhygvu"}],["path",{d:"M8 18h.01",key:"lrp35t"}]]);var h=e.i(56423),p=e.i(26909),m=e.i(10818),x=e.i(47925),f=e.i(63448),g=e.i(81140),b=e.i(30030),v=e.i(69340),w=e.i(20783),y=e.i(53660),j=e.i(74606),N=e.i(96626),C=e.i(48425),k=e.i(26330),S=Object.defineProperty,P=(e,t)=>S(e,"name",{value:t,configurable:!0}),O="HoverCard",[R,E]=(0,b.createContextScope)(O,[y.createPopperScope]),T=(0,y.createPopperScope)(),[_,L]=R(O),A=P(e=>{let{__scopeHoverCard:t,children:s,open:a,defaultOpen:n,onOpenChange:i,openDelay:l=700,closeDelay:c=300}=e,d=T(t),u=o.useRef(0),h=o.useRef(0),p=o.useRef(!1),m=o.useRef(!1),[x,f]=(0,v.useControllableState)({prop:a,defaultProp:n??!1,onChange:i,caller:O}),g=o.useCallback(()=>{clearTimeout(h.current),u.current=window.setTimeout(()=>f(!0),l)},[l,f]),b=o.useCallback(()=>{clearTimeout(u.current),p.current||m.current||(h.current=window.setTimeout(()=>f(!1),c))},[c,f]),w=o.useCallback(()=>f(!1),[f]);return o.useEffect(()=>()=>{clearTimeout(u.current),clearTimeout(h.current)},[]),(0,r.jsx)(_,{scope:t,open:x,onOpenChange:f,onOpen:g,onClose:b,onDismiss:w,hasSelectionRef:p,isPointerDownOnContentRef:m,children:(0,r.jsx)(y.Root,{...d,children:s})})},"HoverCard"),I=o.forwardRef(P(function(e,t){let{__scopeHoverCard:s,...o}=e,a=L("HoverCardTrigger",s),n=T(s);return(0,r.jsx)(y.Anchor,{asChild:!0,...n,children:(0,r.jsx)(C.Primitive.a,{"data-state":a.open?"open":"closed",...o,ref:t,onPointerEnter:(0,g.composeEventHandlers)(e.onPointerEnter,F(a.onOpen)),onPointerLeave:(0,g.composeEventHandlers)(e.onPointerLeave,F(a.onClose)),onFocus:(0,g.composeEventHandlers)(e.onFocus,a.onOpen),onBlur:(0,g.composeEventHandlers)(e.onBlur,a.onClose),onTouchStart:(0,g.composeEventHandlers)(e.onTouchStart,e=>e.preventDefault())})})},"HoverCardTrigger")),D="HoverCardPortal",[M,H]=R(D,{forceMount:void 0}),U=P(e=>{let{__scopeHoverCard:t,forceMount:s,children:o,container:a}=e,n=L(D,t);return(0,r.jsx)(M,{scope:t,forceMount:s,children:(0,r.jsx)(N.Presence,{present:s||n.open,children:(0,r.jsx)(j.Portal,{asChild:!0,container:a,children:o})})})},"HoverCardPortal"),W="HoverCardContent",$=o.forwardRef(P(function(e,t){let s=H(W,e.__scopeHoverCard),{forceMount:o=s.forceMount,...a}=e,n=L(W,e.__scopeHoverCard);return(0,r.jsx)(N.Presence,{present:o||n.open,children:(0,r.jsx)(z,{"data-state":n.open?"open":"closed",...a,onPointerEnter:(0,g.composeEventHandlers)(e.onPointerEnter,F(n.onOpen)),onPointerLeave:(0,g.composeEventHandlers)(e.onPointerLeave,F(n.onClose)),ref:t})})},"HoverCardContent")),z=o.forwardRef(P(function(e,s){let{__scopeHoverCard:a,onEscapeKeyDown:n,onPointerDownOutside:i,onFocusOutside:l,onInteractOutside:c,...d}=e,u=L(W,a),h=T(a),p=o.useRef(null),m=(0,w.useComposedRefs)(s,p),[x,f]=o.useState(!1);return o.useEffect(()=>{if(x){let e=document.body;return t=e.style.userSelect||e.style.webkitUserSelect,e.style.userSelect="none",e.style.webkitUserSelect="none",()=>{e.style.userSelect=t,e.style.webkitUserSelect=t}}},[x]),o.useEffect(()=>{if(p.current){let e=P(()=>{f(!1),u.isPointerDownOnContentRef.current=!1,setTimeout(()=>{document.getSelection()?.toString()!==""&&(u.hasSelectionRef.current=!0)})},"handlePointerUp");return document.addEventListener("pointerup",e),()=>{document.removeEventListener("pointerup",e),u.hasSelectionRef.current=!1,u.isPointerDownOnContentRef.current=!1}}},[u.isPointerDownOnContentRef,u.hasSelectionRef]),o.useEffect(()=>
1{p.current&&B(p.current).forEach(e=>e.setAttribute("tabindex","-1"))}),(0,r.jsx)(k.DismissableLayer,{asChild:!0,disableOutsidePointerEvents:!1,onInteractOutside:c,onEscapeKeyDown:n,onPointerDownOutside:i,onFocusOutside:(0,g.composeEventHandlers)(l,e=>{e.preventDefault()}),onDismiss:u.onDismiss,children:(0,r.jsx)(y.Content,{...h,...d,onPointerDown:(0,g.composeEventHandlers)(d.onPointerDown,e=>{e.currentTarget.contains(e.target)&&f(!0),u.hasSelectionRef.current=!1,u.isPointerDownOnContentRef.current=!0}),ref:m,style:{...d.style,userSelect:x?"text":void 0,WebkitUserSelect:x?"text":void 0,"--radix-hover-card-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-hover-card-content-available-width":"var(--radix-popper-available-width)","--radix-hover-card-content-available-height":"var(--radix-popper-available-height)","--radix-hover-card-trigger-width":"var(--radix-popper-anchor-width)","--radix-hover-card-trigger-height":"var(--radix-popper-anchor-height)"}})})},"HoverCardContentImpl"));function F(e){return t=>"touch"===t.pointerType?void 0:e()}function B(e){let t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:P(e=>e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP,"acceptNode")});for(;r.nextNode();)t.push(r.currentNode);return t}P(F,"excludeTouch"),P(B,"getTabbableNodes");var K=e.i(47163);function V(e){let t,o,a=(0,s.c)(4);return a[0]!==e?({...t}=e,a[0]=e,a[1]=t):t=a[1],a[2]!==t?(o=(0,r.jsx)(A,{"data-slot":"hover-card",...t}),a[2]=t,a[3]=o):o=a[3],o}function q(e){let t,o,a=(0,s.c)(4);return a[0]!==e?({...t}=e,a[0]=e,a[1]=t):t=a[1],a[2]!==t?(o=(0,r.jsx)(I,{"data-slot":"hover-card-trigger",...t}),a[2]=t,a[3]=o):o=a[3],o}function Y(e){let t,o,a,n,i,l,c=(0,s.c)(12);c[0]!==e?({className:t,align:a,sideOffset:n,...o}=e,c[0]=e,c[1]=t,c[2]=o,c[3]=a,c[4]=n):(t=c[1],o=c[2],a=c[3],n=c[4]);let d=void 0===a?"center":a,u=void 0===n?4:n;return c[5]!==t?(i=(0,K.cn)("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-64 origin-(--radix-hover-card-content-transform-origin) rounded-md border p-4 shadow-md outline-hidden",t),c[5]=t,c[6]=i):i=c[6],c[7]!==d||c[8]!==o||c[9]!==u||c[10]!==i?(l=(0,r.jsx)(U,{"data-slot":"hover-card-portal",children:(0,r.jsx)($,{"data-slot":"hover-card-content",align:d,sideOffset:u,className:i,...o})}),c[7]=d,c[8]=o,c[9]=u,c[10]=i,c[11]=l):l=c[11],l}var G=e.i(47827);let X=[{path:"/emi-calculator",title:"EMI",icon:(0,r.jsx)(u,{className:"h-3.5 w-3.5"})},{path:"/blog",title:"Blogs",icon:(0,r.jsx)(h.BookOpen,{className:"h-3.5 w-3.5"})},{path:"/exchangeProducts",title:"Exchange",icon:(0,r.jsx)(p.ArrowLeftRight,{className:"h-3.5 w-3.5"})},{path:"/emi/shop",title:"Shop by EMI",icon:(0,r.jsx)(f.ShoppingBag,{className:"h-3.5 w-3.5"})},{path:"/repair",title:"Repair",icon:(0,r.jsx)(x.Wrench,{className:"h-3.5 w-3.5"})},{path:"/about-us",title:"About",icon:(0,r.jsx)(m.Info,{className:"h-3.5 w-3.5"})}],J=o.default.memo(e=>{let t,c,u,h,p,m,x,f,g,b,v,w,y,j,N,C,k=(0,s.c)(39),{initialCategories:S}=e,P=S[0];k[0]!==P?(t={isDropdownOpen:!1,activeCategory:P},k[0]=P,k[1]=t):t=k[1];let[O,R]=(0,o.useState)(t);k[2]===Symbol.for("react.memo_cache_sentinel")?(c=e=>R(t=>({...t,...e})),k[2]=c):c=k[2];let E=c;e:{let e;if(!O.activeCategory?.brands){let e;k[3]===Symbol.for("react.memo_cache_sentinel")?(e=[],k[3]=e):e=k[3],u=e;break e}k[4]!==O.activeCategory.brands?(e=Array.from(new Map(O.activeCategory.brands.map(Q)).values()),k[4]=O.activeCategory.brands,k[5]=e):e=k[5],u=e}let T=u;t:{let e,t;if(!O.activeCategory){let e;k[6]===Symbol.for("react.memo_cache_sentinel")?(e=[],k[6]=e):e=k[6],h=e;break t}k[7]===Symbol.for("react.memo_cache_sentinel")?(e=[{label:"Under 25k",min:0,max:25e3},{label:"25k - 50k",min:25001,max:5e4},{label:"50k - 75k",min:50001,max:75e3},{label:"75k - 100k",min:75001,max:1e5},{label:"Above 100k",min:100001,max:1e6}],k[7]=e):e=k[7];let r=e;k[8]!==O.activeCategory?.slug?(t=r.map(e=>({...e,url:`/category/${O.activeCategory?.slug}?min_price=${e.min}&max_price=${e.max}`})),k[8]=O.activeCategory?.slug,k[9]=t):t=k[9],h=t}let _=h;if(!S.length)return null;
1k[10]===Symbol.for("react.memo_cache_sentinel")?(p=(0,r.jsx)("div",{className:"absolute inset-0 bg-[var(--colour-fsP2)]"}),k[10]=p):p=k[10],k[11]===Symbol.for("react.memo_cache_sentinel")?(m=(0,r.jsx)("div",{className:"absolute inset-0 bg-[var(--colour-fsP1)]",style:{clipPath:"polygon(24% 0%, 100% 0%, 100% 100%, 22% 100%)"}}),k[11]=m):m=k[11];let L=O.isDropdownOpen;if(k[12]!==S[0]||k[13]!==O.activeCategory?(x=e=>{E({isDropdownOpen:e,activeCategory:e?S[0]??null:O.activeCategory})},k[12]=S[0],k[13]=O.activeCategory,k[14]=x):x=k[14],k[15]===Symbol.for("react.memo_cache_sentinel")?(f=(0,r.jsx)(q,{asChild:!0,children:(0,r.jsxs)("button",{className:"flex items-center gap-2 px-4 py-1.5 bg-white/20 hover:bg-white/30 text-[#1a1a1a] font-medium rounded-full transition-all duration-300 h-9 cursor-pointer border border-white/30 shadow-xs hover:shadow-sm active:scale-95 group",children:[(0,r.jsx)(d,{className:"h-4 w-4 opacity-90 group-hover:opacity-100 transition-all text-[#1a1a1a] group-hover:text-white"}),(0,r.jsx)("span",{className:"text-[12px] font-bold transition-colors text-[#1a1a1a] group-hover:text-white",children:"Explore"}),(0,r.jsx)(i.ChevronDown,{className:"h-4 w-4 opacity-90 group-hover:opacity-100 transition-all text-[#1a1a1a] group-hover:text-white"})]})}),k[15]=f):f=k[15],k[16]!==S||k[17]!==O.activeCategory?.id){let e;k[19]!==O.activeCategory?.id?(e=e=>(0,r.jsxs)("div",{onMouseEnter:()=>E({activeCategory:e}),className:`flex items-center justify-between px-2 py-2.5 transition-all mx-1 rounded-lg group mb-1 ${O.activeCategory?.id===e.id?"bg-blue-50 ring-1 ring-blue-100":"hover:bg-blue-50/50"}`,children:[(0,r.jsxs)(n.default,{prefetch:!1,href:`/category/${e.slug}`,onClick:()=>E({isDropdownOpen:!1}),className:"flex items-center gap-3 w-full",children:[(0,r.jsx)("div",{className:`p-1.5 rounded-md h-8 transition-colors overflow-hidden ${O.activeCategory?.id===e.id?"bg-white":"bg-gray-50 group-hover:bg-white"}`,children:(0,r.jsx)(a.default,{src:e.thumb?.url||G.placeholderimg,alt:e.title,width:20,height:20,className:"object-contain"})}),(0,r.jsx)("span",{className:`text-sm font-medium transition-colors ${O.activeCategory?.id===e.id?"text-[var(--colour-fsP2)] font-semibold":"text-slate-600 group-hover:text-[var(--colour-fsP2)]"}`,children:e.title})]}),O.activeCategory?.id===e.id&&(0,r.jsx)(l.ChevronRight,{className:"h-4 w-4 text-[var(--colour-fsP2)]"})]},e.id),k[19]=O.activeCategory?.id,k[20]=e):e=k[20],g=S.map(e),k[16]=S,k[17]=O.activeCategory?.id,k[18]=g}else g=k[18];return k[21]!==g?(b=(0,r.jsx)("div",{className:"w-[220px] shrink-0 bg-white border-r border-blue-50 overflow-y-auto py-2",children:g}),k[21]=g,k[22]=b):b=k[22],k[23]!==_||k[24]!==O.activeCategory||k[25]!==T?(v=O.activeCategory&&(0,r.jsxs)("div",{className:"flex-1 flex flex-col h-full animate-in fade-in duration-200",children:[(0,r.jsxs)("div",{className:"flex-1 flex min-h-0 border-none",children:[(0,r.jsxs)("div",{className:"flex-1 p-6 overflow-y-auto min-w-0",children:[(0,r.jsx)(n.default,{prefetch:!1,href:`/category/${O.activeCategory.slug}`,onClick:()=>E({isDropdownOpen:!1}),children:(0,r.jsxs)("h2",{className:"text-lg font-bold text-black mb-5 flex items-center gap-1.5 hover:text-[var(--colour-fsP2)] transition-colors",children:[O.activeCategory.title," ",(0,r.jsx)(l.ChevronRight,{className:"h-4 w-4 text-slate-300"})]})}),(0,r.jsx)("div",{className:"grid grid-cols-2 gap-x-3 gap-y-1",children:O.activeCategory.children?.map((e,t)=>(0,r.jsxs)(n.default,{prefetch:!1,href:`/category/${e.slug}`,onClick:()=>E({isDropdownOpen:!1}),className:"flex items-center gap-2 text-[13px] text-slate-600 hover:text-[var(--colour-fsP2)] py-1.5 transition-colors group/link overflow-hidden",children:[(0,r.jsx)("span",{className:"w-1 h-1 rounded-full bg-slate-300 group-hover/link:bg-(--colour-fsP2) shrink-0 transition-colors"}),(0,r.jsx)("span",{className:"truncate",children:e.name||e.title})]},t))??(0,r.jsx)("span",{className:"text-sm text-slate-400 italic col-span-2",children:"No sub-categories"})})]}),(0,r.jsxs)("div",{className:"w-[180px] p-6 border-l border-gray-50 bg-gray-50/30",children:[(0,r.jsx)("h3",{className:"text-[11px] font-bold text-slate-400 uppercase tracking-widest mb-4",children:"Shop By Price"}),(0,r.jsx)("div",{className:"flex flex-col gap-2",children:_.map((e,t)=>(0,r.jsx)(n.default,{prefetch:!1,href:e.url,onClick:()=>E({isDropdownOpen:!1}),className:"text-[13px] text-slate-600 hover:text-[var(--colour-fsP2)] hover:bg-white px-2 py-1.5 rounded-md transition-all font-medium",children:e.label},t))})]})]}),T.length>0&&(0,r.jsxs)("div",{className:"border-none px-2 py-2 bg-blue-50/30 overflow-hidden",children:[(0,r.jsxs)("div",{className:"flex items-center gap-2 mb-3",children:[(0,r.jsx)("div",{className:"h-px flex-1 bg-[var(--colour-fsP2)]"}),(0,r.jsx)("span",{className:"text-[12px] font-bold text-black uppercase tracking-widest shrink-0",children:"Top Brands"}),(0,r.jsx)("div",{className:"h-px flex-1 bg-[var(--colour-fsP2)]"})]}),(0,r.jsx)("div",{className:"flex gap-3 overflow-x-auto min-w-0",children:T.map((e,t)=>(0,r.jsxs)(n.default,{prefetch:!1,href:`/brand/${e.slug}`,onClick:()=>E({isDropdownOpen:!1}),className:"flex items-center gap-2 px-4 py-2 h-12 bg-white border-2 border-blue-100 hover:shadow-sm rounded-lg text-sm text-slate-700 hover:text-[var(--colour-fsP2)] shrink-0 transition-all",children:[e.thumb?.url?(0,r.jsx)(a.default,{src:e.thumb.url,alt:e.name,width:24,height:20,className:"object-contain"}):(0,r.jsx)("span",{className:"w-6 h-6 rounded bg-blue-50 flex items-center justify-center text-xs font-bold text-blue-600",children:e.name[0]}),(0,r.jsx)("span",{className:"font-bold whitespace-nowrap",children:e.name})]},t))})]})]}),k[23]=_,k[24]=O.activeCategory,k[25]=T,k[26]=v):v=k[26],k[27]!==v?(w=(0,r.jsx)("div",{className:"flex-1 bg-white flex flex-col min-w-0",children:v}),k[27]=v,k[28]=w):w=k[28],k[29]!==b||k[30]!==w?(y=(0,r.jsx)(Y,{className:"w-[950px] p-0 border-0 shadow-xl bg-white rounded-xl overflow-hidden mt-1",align:"start",sideOffset:4,children:(0,r.jsxs)("div",{className:"flex h-[520px]",children:[b,w]})}),k[29]=b,k[30]=w,k[31]=y):y=k[31],k[32]!==O.isDropdownOpen||k[33]!==y||k[34]!==x?(j=(0,r.jsxs)(V,{openDelay:0,closeDelay:100,open:L,onOpenChange:x,children:[f,y]}),k[32]=O.isDropdownOpen,k[33]=y,k[34]=x,k[35]=j):j=k[35],k[36]===Symbol.for("react.memo_cache_sentinel")?(N=(0,r.jsx)("div",{className:"flex items-center ml-6 gap-6",children:X.map(Z)}),k[36]=N):N=k[36],k[37]!==j?(C=(0,r.jsxs)("nav",{className:"relative shadow-md hidden md:block border-t border-white/10 overflow-hidden",children:[p,m,(0,r.jsx)("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 relative z-10",children:(0,r.jsxs)("div",{className:"flex items-center h-12",children:[j,N]})})]}),k[37]=j,k[38]=C):C=k[38],C});function Q(e){return[e.name,e]}function Z(e,t){return(0,r.jsxs)(n.default,{prefetch:!1,href:e.path,className:"text-sm font-bold text-[#1a1a1a] hover:text-white transition-colors flex items-center gap-1",children:[e.icon," ",e.title]},t)}e.s(["default",0,J,"navbarExtradata",0,X],7756)},38645,e=>{"use strict";var t=e.i(43476),r=e.i(71645),s=e.i(18566),o=e.i(93583),a=e.i(63676),n=e.i(66595),i=e.i(52917),l=e.i(47163),c=e.i(95187);let d=(0,c.createServerReference)("0041c2870b9a399034dc1dcdd707d348f9ef97fdbb",c.callServer,void 0,c.findSourceMapURL,"getAllCategories");var u=e.i(89974),h=e.i(54722),p=e.i(7756),m=e.i(58179),x=e.i(932),f=e.i(30030),g=e.i(75830),b=e.i(20783),v=e.i(81140),w=e.i(69340),y=e.i(48425),j=e.i(34620),N=e.i(96626),C=e.i(10772),k=Object.defineProperty,S=(e,t)=>k(e,"name",{value:t,configurable:!0}),P="Collapsible",[O,R]=(0,f.createContextScope)(P),[E,T]=O(P),_=r.forwardRef(S(function(e,s){let{__scopeCollapsible:o,open:a,defaultOpen:n,disabled:i,onOpenChange:l,...c}=e,[d,u]=(0,w.useControllableState)({prop:a,defaultProp:n??!1,onChange:l,caller:P});return(0,t.jsx)(E,{scope:o,disabled:i,contentId:(0,C.useId)(),open:d,onOpenToggle:r.useCallback(()=>u(e=>!e),[u]),children:(0,t.jsx)(y.Primitive.div,{"data-state":M(d),"data-disabled":i?"":void 0,...c,ref:s})})},"Collapsible")),L=r.forwardRef(S(function(e,r){let{__scopeCollapsible:s,...o}=e,a=T("CollapsibleTrigger",s);return(0,t.jsx)(y.Primitive.button,{type:"button","aria-controls":a.open?a.contentId:void 0,"aria-expanded":a.open||!1,"data-state":M(a.open),"data-disabled":a.disabled?"":void 0,disabled:a.disabled,...o,ref:r,onClick:(0,v.composeEventHandlers)(e.onClick,a.onOpenToggle)})},"CollapsibleTrigger")),A="CollapsibleContent",I=r.forwardRef(S(function(e,r){let{forceMount:s,...o}=e,a=T(A,e.__scopeCollapsible);return(0,t.jsx)(N.Presence,{present:s||a.open,children:({present:e})=>(0,t.jsx)(D,{...o,ref:r,present:e})})},"CollapsibleContent")),D=r.forwardRef(S(function(e,s){let{__scopeCollapsible:o,present:a,children:n,...i}=e,l=T(A,o),[c,d]=r.useState(a),u=r.useRef(null),h=(0,b.useComposedRefs)(s,u),p=r.useRef(0),m=p.current,x=r.useRef(0),f=x.current,g=l.open||c,v=r.useRef(g),w=r.useRef(void 0);return r.useEffect(()=>{let e=requestAnimationFrame(()=>v.current=!1);return()=>cancelAnimationFrame(e)},[]),(0,j.useLayoutEffect)(()=>{let e=u.current;if(e){w.current=w.current||{transitionDuration:e.style.transitionDuration,animationName:e.style.animationName},e.style.transitionDuration="0s",e.style.animationName="none";let t=e.getBoundingClientRect();p.current=t.height,x.current=t.width,v.current||(e.style.transitionDuration=w.current.transitionDuration,e.style.animationName=w.current.animationName),d(a)}},[l.open,a]),(0,t.jsx)(y.Primitive.div,{"data-state":M(l.open),"data-disabled":l.disabled?"":void 0,id:l.contentId,hidden:!g,...i,ref:h,style:{"--radix-collapsible-content-height":m?`${m}px`:void 0,"--radix-collapsible-content-width":f?`${f}px`:void 0,...e.style},children:g&&n})},"CollapsibleContentImpl"));function M(e){return e?"open":"closed"}S(M,"getState");var H=e.i(86318),U=Object.defineProperty,W=(e,t)=>U(e,"name",{value:t,configurable:!0}),$="Accordion",z=["Home","End","ArrowDown","ArrowUp","ArrowLeft","ArrowRight"],[F,B,K]=(0,g.createCollection)($),[V,q]=(0,f.createContextScope)($,[K,R]),Y=R(),G=r.forwardRef(W(function(e,r){let{type:s,...o}=e;return(0,t.jsx)(F.Provider,{scope:e.__scopeAccordion,children:"multiple"===s?(0,t.jsx)(et,{...o,ref:r}):(0,t.jsx)(ee,{...o,ref:r})})},"Accordion")),[X,J]=V($),[Q,Z]=V($,{collapsible:!1}),ee=r.forwardRef(W(function(e,s){let{value:o,defaultValue:a,onValueChange:n=W(()=>{},"onValueChange"),collapsible:i=!1,...l}=e,[c,d]=(0,w.useControllableState)({prop:o,defaultProp:a??"",onChange:n,caller:$});return(0,t.jsx)(X,{scope:e.__scopeAccordion,value:r.useMemo(()=>c?[c]:[],[c]),onItemOpen:d,onItemClose:r.useCallback(()=>i&&d(""),[i,d]),children:(0,t.jsx)(Q,{scope:e.__scopeAccordion,collapsible:i,children:(0,t.jsx)(eo,{...l,ref:s})})})},"AccordionImplSingle")),et=r.forwardRef(W(function(e,s){let{value:o,defaultValue:a,onValueChange:n=W(()=>{},"onValueChange"),...i}=e,[l,c]=(0,w.useControllableState)({prop:o,defaultProp:a??[],onChange:n,caller:$}),d=r.useCallback(e=>c((t=[])=>[...t,e]),[c]),u=r.useCallback(e=>c((t=[])=>t.filter(t=>t!==e)),[c]);return(0,t.jsx)(X,{scope:e.__scopeAccordion,value:l,onItemOpen:d,onItemClose:u,children:(0,t.jsx)(Q,{scope:e.__scopeAccordion,collapsible:!0,children:(0,t.jsx)(eo,{...i,ref:s})})})},"AccordionImplMultiple")),[er,es]=V($),eo=r.forwardRef(W(function(e,s){let{__scopeAccordion:o,disabled:a,dir:n,orientation:i="vertical",...l}=e,c=r.useRef(null),d=(0,b.useComposedRefs)(c,s),u=B(o),h="ltr"===(0,H.useDirection)(n),p=(0,v.composeEventHandlers)(e.onKeyDown,e=>
1{if(!z.includes(e.key))return;let t=e.target,r=u().filter(e=>!e.ref.current?.disabled),s=r.findIndex(e=>e.ref.current===t),o=r.length;if(-1===s)return;e.preventDefault();let a=s,n=o-1,l=W(()=>{(a=s+1)>n&&(a=0)},"moveNext"),c=W(()=>{(a=s-1)<0&&(a=n)},"movePrev");switch(e.key){case"Home":a=0;break;case"End":a=n;break;case"ArrowRight":"horizontal"===i&&(h?l():c());break;case"ArrowDown":"vertical"===i&&l();break;case"ArrowLeft":"horizontal"===i&&(h?c():l());break;case"ArrowUp":"vertical"===i&&c()}let d=a%o;r[d].ref.current?.focus()});return(0,t.jsx)(er,{scope:o,disabled:a,direction:n,orientation:i,children:(0,t.jsx)(F.Slot,{scope:o,children:(0,t.jsx)(y.Primitive.div,{...l,"data-orientation":i,ref:d,onKeyDown:a?void 0:p})})})},"AccordionImpl")),ea="AccordionItem",[en,ei]=V(ea),el=r.forwardRef(W(function(e,r){let{__scopeAccordion:s,value:o,...a}=e,n=es(ea,s),i=J(ea,s),l=Y(s),c=(0,C.useId)(),d=o&&i.value.includes(o)||!1,u=n.disabled||e.disabled;return(0,t.jsx)(en,{scope:s,open:d,disabled:u,triggerId:c,children:(0,t.jsx)(_,{"data-orientation":n.orientation,"data-state":ep(d),...l,...a,ref:r,disabled:u,open:d,onOpenChange:e=>{e?i.onItemOpen(o):i.onItemClose(o)}})})},"AccordionItem")),ec=r.forwardRef(W(function(e,r){let{__scopeAccordion:s,...o}=e,a=es($,s),n=ei("AccordionHeader",s);return(0,t.jsx)(y.Primitive.h3,{"data-orientation":a.orientation,"data-state":ep(n.open),"data-disabled":n.disabled?"":void 0,...o,ref:r})},"AccordionHeader")),ed="AccordionTrigger",eu=r.forwardRef(W(function(e,r){let{__scopeAccordion:s,...o}=e,a=es($,s),n=ei(ed,s),i=Z(ed,s),l=Y(s);return(0,t.jsx)(F.ItemSlot,{scope:s,children:(0,t.jsx)(L,{"aria-disabled":n.open&&!i.collapsible||void 0,"data-orientation":a.orientation,id:n.triggerId,...l,...o,ref:r})})},"AccordionTrigger")),eh=r.forwardRef(W(function(e,r){let{__scopeAccordion:s,...o}=e,a=es($,s),n=ei("AccordionContent",s),i=Y(s);return(0,t.jsx)(I,{role:"region","aria-labelledby":n.triggerId,"data-orientation":a.orientation,...i,...o,ref:r,style:{"--radix-accordion-content-height":"var(--radix-collapsible-content-height)","--radix-accordion-content-width":"var(--radix-collapsible-content-width)",...e.style}})},"AccordionContent"));function ep(e){return e?"open":"closed"}W(ep,"getState");var em=e.i(3636);function ex(e){let r,s,o=(0,x.c)(4);return o[0]!==e?({...r}=e,o[0]=e,o[1]=r):r=o[1],o[2]!==r?(s=(0,t.jsx)(G,{"data-slot":"accordion",...r}),o[2]=r,o[3]=s):s=o[3],s}function ef(e){let r,s,o,a,n=(0,x.c)(8);return n[0]!==e?({className:r,...s}=e,n[0]=e,n[1]=r,n[2]=s):(r=n[1],s=n[2]),n[3]!==r?(o=(0,l.cn)("border-b last:border-b-0",r),n[3]=r,n[4]=o):o=n[4],n[5]!==s||n[6]!==o?(a=(0,t.jsx)(el,{"data-slot":"accordion-item",className:o,...s}),n[5]=s,n[6]=o,n[7]=a):a=n[7],a}function eg(e){let r,s,o,a,n,i,c=(0,x.c)(11);return c[0]!==e?({className:s,children:r,...o}=e,c[0]=e,c[1]=r,c[2]=s,c[3]=o):(r=c[1],s=c[2],o=c[3]),c[4]!==s?(a=(0,l.cn)("focus-visible:border-ring focus-visible:ring-ring/50 flex flex-1 items-start justify-between gap-4 rounded-md py-4 text-left text-sm font-medium transition-all outline-none hover:underline focus-visible:ring-[3px] disabled:pointer-events-none disabled:opacity-50 [&[data-state=open]>svg]:rotate-180",s),c[4]=s,c[5]=a):a=c[5],c[6]===Symbol.for("react.memo_cache_sentinel")?(n=(0,t.jsx)(em.ChevronDownIcon,{className:"text-muted-foreground pointer-events-none size-4 shrink-0 translate-y-0.5 transition-transform duration-200"}),c[6]=n):n=c[6],c[7]!==r||c[8]!==o||c[9]!==a?(i=(0,t.jsx)(ec,{className:"flex",children:(0,t.jsxs)(eu,{"data-slot":"accordion-trigger",className:a,...o,children:[r,n]})}),c[7]=r,c[8]=o,c[9]=a,c[10]=i):i=c[10],i}function eb(e){let r,s,o,a,n,i,c=(0,x.c)(12);return c[0]!==e?({className:s,children:r,...o}=e,c[0]=e,c[1]=r,c[2]=s,c[3]=o):(r=c[1],s=c[2],o=c[3]),c[4]!==s?(a=(0,l.cn)("pt-0 pb-4",s),c[4]=s,c[5]=a):a=c[5],c[6]!==r||c[7]!==a?(n=(0,t.jsx)("div",{className:a,children:r}),c[6]=r,c[7]=a,c[8]=n):n=c[8],c[9]!==o||c[10]!==n?(i=(0,t.jsx)(eh,{"data-slot":"accordion-content",className:"data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down overflow-hidden text-sm",...o,children:n}),c[9]=o,c[10]=n,c[11]=i):i=c[11],i}var ev=e.i(1279),ew=e.i(67927),ey=e.i(67784),ej=e.i(79258);let eN=(0,e.i(56420).default)("settings",[["path",{d:"M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915",key:"1i5ecw"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);var eC=e.i(57688),ek=e.i(22016),eS=e.i(51884),eP=e.i(46944),eO=e.i(3702),eR=e.i(47827);let eE=[{label:"My Orders",path:"/profile?tab=orders",icon:ej.Package},{label:"Settings",path:"/profile?tab=profile",icon:eN}],eT=(0,r.memo)(e=>{let r,o,a,n,l,c,d,u,h,p,m,f,g=(0,x.c)(37),{open:b,toggleMobileMenu:v,initialNavItems:w,navbarExtradata:y}=e;(0,s.useRouter)();let{user:j,isLoggedIn:N,logout:C,setLoginDialogOpen:k}=(0,eS.useAuthStore)((0,eP.useShallow)(e_));g[0]!==C||g[1]!==v?(r=()=>{C(),v()},g[0]=C,g[1]=v,g[2]=r):r=g[2];let S=r;if(g[3]===Symbol.for("react.memo_cache_sentinel")?(o=(0,t.jsx)(i.SheetTitle,{hidden:!0,"aria-label":"categories","aria-hidden":"true",children:"categories"}),g[3]=o):o=g[3],g[4]===Symbol.for("react.memo_cache_sentinel")?(a=(0,t.jsx)("div",{className:"px-4 py-3 flex items-center bg-gradient-to-r from-slate-50 to-white border-b border-slate-100",children:(0,t.jsx)("div",{className:"h-7 w-28 relative",children:(0,t.jsx)(eC.default,{src:eO.CompanyLogo,alt:"Logo",className:"w-auto h-full object-contain",fill:!0,sizes:"112px"})})}),g[4]=a):a=g[4],g[5]!==N||g[6]!==k||g[7]!==v||g[8]!==j?.email||g[9]!==j?.name?(n=(0,t.jsx)("div",{className:"px-4 py-3 bg-slate-50/50",children:N?(0,t.jsxs)(ek.default,{prefetch:!1,href:"/profile",onClick:v,className:"flex items-center gap-3 p-3 bg-white rounded-xl shadow-sm border border-slate-100 group",children:[(0,t.jsx)("div",{className:"w-10 h-10 rounded-full bg-gradient-to-br from-[var(--colour-fsP2)] to-blue-600 flex items-center justify-center shadow-sm group-hover:scale-105 transition-transform",children:(0,t.jsx)(ev.User,{className:"w-5 h-5 text-white",strokeWidth:2.5})}),(0,t.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,t.jsx)("p",{className:"text-sm font-semibold text-slate-800 truncate group-hover:text-[var(--colour-fsP2)] transition-colors",children:j?.name||"My Account"}),(0,t.jsx)("p",{className:"text-xs text-slate-500 truncate",children:j?.email||"View your profile"})]}),(0,t.jsx)(ew.ChevronRight,{className:"w-4 h-4 text-slate-400 shrink-0 group-hover:text-[var(--colour-fsP2)] transition-colors",strokeWidth:2.5})]}):(0,t.jsxs)("div",{onClick:()=>{v(),k?.(!0)},className:"flex items-center gap-3 p-3 bg-gradient-to-r from-[var(--colour-fsP2)] to-blue-600 rounded-xl shadow-md cursor-pointer hover:shadow-lg transition-all text-white group",children:[(0,t.jsx)("div",{className:"w-10 h-10 rounded-full bg-white/20 flex items-center justify-center backdrop-blur-sm",children:(0,t.jsx)(ev.User,{className:"w-5 h-5 text-white",strokeWidth:2.5})}),(0,t.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,t.jsx)("p",{className:"text-sm font-semibold truncate",children:"Login / Register"}),(0,t.jsx)("p",{className:"text-xs text-white/80 truncate",children:"Access your account & orders"})]}),(0,t.jsx)(ew.ChevronRight,{className:"w-4 h-4 text-white/80 shrink-0 group-hover:translate-x-1 transition-transform",strokeWidth:2.5})]})}),g[5]=N,g[6]=k,g[7]=v,g[8]=j?.email,g[9]=j?.name,g[10]=n):n=g[10],g[11]===Symbol.for("react.memo_cache_sentinel")?(l=(0,t.jsx)("div",{className:"px-4 py-2",children:(0,t.jsx)("p",{className:"px-1 py-2 text-[10px] font-bold text-slate-500 uppercase tracking-wider",children:"Browse Categories"})}
1),g[11]=l):l=g[11],g[12]!==w||g[13]!==v){let e;g[15]!==v?(e=(e,r)=>(0,t.jsx)("div",{className:"mb-1 relative",children:e.children&&e.children.length>0?(0,t.jsx)(ex,{type:"single",collapsible:!0,children:(0,t.jsxs)(ef,{value:`item-${r}`,className:"border-none",children:[(0,t.jsx)(eg,{className:"group flex items-center justify-between px-3 py-3 w-full rounded-xl hover:bg-slate-50 text-[14px] font-semibold text-slate-800 transition-colors data-[state=open]:text-[var(--colour-fsP2)] data-[state=open]:bg-blue-50/50 hover:no-underline",children:(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[(0,t.jsx)("div",{className:"w-8 h-8 shrink-0 flex items-center justify-center bg-white rounded-lg shadow-sm border border-slate-100 group-data-[state=open]:border-blue-100 transition-all",children:(0,t.jsx)(eC.default,{src:e.thumb?.url||eR.placeholderimg,alt:e.title,width:18,height:18,className:"object-contain"})}),(0,t.jsx)("span",{className:"font-semibold",children:e.title})]})}),(0,t.jsx)(eb,{className:"pb-2 pt-1 px-4",children:(0,t.jsx)("div",{className:"flex flex-col gap-0.5 mt-1 ml-4 border-l-2 border-slate-100 pl-3",children:e.children.map((e,r)=>(0,t.jsxs)(ek.default,{prefetch:!1,href:`/category/${e.slug}`,onClick:v,className:"w-full text-left flex items-center gap-3 px-3 py-2 text-[13px] text-slate-600 hover:text-[var(--colour-fsP2)] hover:bg-blue-50/30 rounded-lg transition-colors group relative",children:[(0,t.jsx)("span",{className:"absolute -left-[14px] top-1/2 -translate-y-1/2 w-2 h-[2px] bg-slate-100 group-hover:bg-[var(--colour-fsP2)] transition-colors"}),(0,t.jsx)("span",{className:"absolute -left-[15px] top-1/2 -translate-y-1/2 w-1.5 h-1.5 rounded-full bg-slate-200 group-hover:bg-[var(--colour-fsP2)] transition-colors"}),(0,t.jsx)("span",{className:"line-clamp-2 font-medium",children:e.name||e.title})]},r))})})]})}):(0,t.jsxs)(ek.default,{prefetch:!1,href:`/category/${e.slug}`,onClick:v,className:"w-full flex items-center justify-between px-3 py-3 rounded-xl text-[14px] font-semibold text-slate-800 hover:bg-slate-50 transition-colors group",children:[(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[(0,t.jsx)("div",{className:"w-8 h-8 shrink-0 flex items-center justify-center bg-white rounded-lg shadow-sm border border-slate-100 group-hover:border-blue-100 transition-all",children:(0,t.jsx)(eC.default,{src:e.thumb?.url||eR.placeholderimg,alt:e.title,width:18,height:18,className:"object-contain"})}),(0,t.jsx)("span",{className:"group-hover:text-[var(--colour-fsP2)] transition-colors font-semibold",children:e.title})]}),(0,t.jsx)(ew.ChevronRight,{className:"w-4 h-4 text-slate-300 group-hover:text-[var(--colour-fsP2)] transition-colors",strokeWidth:2.5})]})},r),g[15]=v,g[16]=e):e=g[16],c=w.map(e),g[12]=w,g[13]=v,g[14]=c}else c=g[14];return g[17]!==c?(d=(0,t.jsx)("div",{className:"px-3",children:c}),g[17]=c,g[18]=d):d=g[18],g[19]!==y||g[20]!==v?(u=y.length>0&&(0,t.jsxs)("div",{className:"mt-2 px-3 pt-4 border-t border-slate-100",children:[(0,t.jsx)("p",{className:"px-1 py-2 text-[10px] font-bold text-slate-500 uppercase tracking-wider mb-1",children:"Explore More"}),(0,t.jsx)("div",{className:"flex flex-col gap-1",children:y.map((e,r)=>(0,t.jsxs)(ek.default,{prefetch:!1,href:e.path,onClick:v,className:"w-full flex items-center gap-3 px-3 py-3 rounded-xl text-[14px] font-medium text-slate-700 hover:bg-slate-50 hover:text-[var(--colour-fsP2)] transition-colors group",children:[(0,t.jsx)("div",{className:"w-8 h-8 shrink-0 flex items-center justify-center bg-white rounded-lg shadow-sm border border-slate-100 group-hover:border-blue-100 transition-all text-slate-400 group-hover:text-[var(--colour-fsP2)]",children:e.icon}),(0,t.jsx)("span",{children:e.title}),(0,t.jsx)(ew.ChevronRight,{className:"w-4 h-4 text-slate-300 ml-auto group-hover:text-[var(--colour-fsP2)] transition-colors",strokeWidth:2.5})]},r))})]}),g[19]=y,g[20]=v,g[21]=u):u=g[21],g[22]!==S||g[23]!==N||g[24]!==v?(h=N&&(0,t.jsxs)("div",{className:"mt-2 px-3 pt-4 pb-4 border-t border-slate-100",children:[(0,t.jsx)("p",{className:"px-1 py-2 text-[10px] font-bold text-slate-500 uppercase tracking-wider mb-1",children:"Account"}),(0,t.jsxs)("div",{className:"flex flex-col gap-1",children:[eE.map(e=>(0,t.jsxs)(ek.default,{prefetch:!1,href:e.path,onClick:v,className:"w-full flex items-center gap-3 px-3 py-3 rounded-xl text-[14px] font-medium text-slate-700 hover:bg-slate-50 hover:text-[var(--colour-fsP2)] transition-colors group",children:[(0,t.jsx)("div",{className:"w-8 h-8 shrink-0 flex items-center justify-center bg-white rounded-lg shadow-sm border border-slate-100 group-hover:border-blue-100 transition-all text-slate-400 group-hover:text-[var(--colour-fsP2)]",children:(0,t.jsx)(e.icon,{className:"w-4 h-4",strokeWidth:2.5})}),(0,t.jsx)("span",{children:e.label})]},e.label)),(0,t.jsxs)("button",{onClick:S,className:"w-full flex items-center gap-3 px-3 py-3 rounded-xl text-[14px] font-medium text-red-600 hover:bg-red-50 transition-colors group mt-2",children:[(0,t.jsx)("div",{className:"w-8 h-8 shrink-0 flex items-center justify-center bg-white rounded-lg shadow-sm border border-red-100 group-hover:border-red-200 transition-all text-red-400 group-hover:text-red-600",children:(0,t.jsx)(ey.LogOut,{className:"w-4 h-4",strokeWidth:2.5})}),(0,t.jsx)("span",{children:"Logout"})]})]})]}),g[22]=S,g[23]=N,g[24]=v,g[25]=h):h=g[25],g[26]!==d||g[27]!==u||g[28]!==h?(p=(0,t.jsxs)("nav",{className:"flex-1 overflow-y-auto",children:[l,d,u,h]}),g[26]=d,g[27]=u,g[28]=h,g[29]=p):p=g[29],g[30]!==p||g[31]!==n?(m=(0,t.jsx)(i.SheetContent,{side:"left",className:"p-0 w-[300px] max-w-[85vw] lg:hidden border-r-0 shadow-2xl [&>button]:hidden",children:(0,t.jsxs)("div",{className:"flex flex-col h-full bg-white",children:[a,n,p]})}),g[30]=p,g[31]=n,g[32]=m):m=g[32],g[33]!==b||g[34]!==m||g[35]!==v?(f=(0,t.jsxs)(i.Sheet,{open:b,onOpenChange:v,children:[o,m]}),g[33]=b,g[34]=m,g[35]=v,g[36]=f):f=g[36],f});function e_(e){return{user:e.user,isLoggedIn:e.isLoggedIn,logout:e.logout,setLoginDialogOpen:e.setLoginDialogOpen}}var eL=e.i(45904);
1e.s(["default",0,({initialCategories:e})=>{let c=(0,s.useRouter)(),[x,f]=(0,r.useState)({isMenuOpen:!1,searchVisible:!1,showNav:!0,search:"",results:[],suggestions:[],history:[],isSearching:!1,items:e}),g=(0,r.useCallback)(e=>f(t=>({...t,...e})),[]),b=(0,r.useRef)(null);(0,r.useEffect)(()=>(Promise.resolve().then(()=>{let t=(0,eL.getSearchHistory)();0===e.length?d().then(e=>g({items:e,history:t})).catch(()=>g({history:t})):g({history:t})}),()=>{b.current&&clearTimeout(b.current)}),[e,g]);let v=(0,r.useRef)(!0);(0,r.useEffect)(()=>{let e=window.scrollY,t=e=>{window.innerWidth>=768||document.body.classList.toggle("mobile-nav-visible",e)},r=()=>{let r=window.scrollY,s=r<e||r<50;v.current=s,g({showNav:s}),t(s),e=r};return t(!0),window.addEventListener("scroll",r,{passive:!0}),()=>{window.removeEventListener("scroll",r),document.body.classList.remove("mobile-nav-visible")}},[g]);let w=(0,r.useCallback)(async e=>{b.current&&clearTimeout(b.current),e.length>2?(g({isSearching:!0}),b.current=setTimeout(async()=>{try{let t=await (0,u.searchProducts)({search:e,per_page:5});g({results:t.data??[],isSearching:!1,history:(0,eL.getSearchHistory)()}),(0,h.trackSearch)(e),(0,eL.saveSearchTerm)(e)}catch{g({results:[],isSearching:!1})}},500)):g({results:[],isSearching:!1})},[g]),y=(0,r.useCallback)(()=>{let e=x.search.trim();e&&(b.current&&clearTimeout(b.current),(0,eL.saveSearchTerm)(e),(0,h.trackSearch)(e),g({searchVisible:!1}),c.push(`/search?search=${encodeURIComponent(e)}`))},[x.search,c,g]);return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("button",{onClick:()=>g({isMenuOpen:!x.isMenuOpen}),className:"sm:hidden p-1.5 rounded-full border border-gray-300 text-slate-700 hover:text-(--colour-fsP2) transition-all",children:x.isMenuOpen?(0,t.jsx)(a.X,{className:"h-4 w-4",strokeWidth:2.5}):(0,t.jsx)(o.Menu,{className:"h-4 w-4",strokeWidth:2.5})}),(0,t.jsx)(eT,{open:x.isMenuOpen,toggleMobileMenu:()=>g({isMenuOpen:!1}),initialNavItems:x.items,navbarExtradata:p.navbarExtradata}),(0,t.jsx)(i.Sheet,{open:x.searchVisible,onOpenChange:()=>g({searchVisible:!x.searchVisible,search:"",results:[],history:(0,eL.getSearchHistory)()}),children:(0,t.jsxs)(i.SheetContent,{side:"bottom",className:"h-[90vh] rounded-t-2xl p-0 flex flex-col bg-white lg:hidden [&>button]:hidden",children:[(0,t.jsx)("div",{className:"p-4 bg-white border-b border-gray-100 shrink-0",children:(0,t.jsxs)("div",{className:"flex items-center gap-2 rounded-xl border border-gray-200 bg-gray-50 px-3 focus-within:ring-2 focus-within:ring-(--colour-fsP2) transition-all",children:[(0,t.jsx)(n.Search,{className:"w-5 h-5 text-gray-400 shrink-0"}),(0,t.jsx)("input",{type:"text",placeholder:"Search...",value:x.search,onChange:e=>{let t=e.target.value,r=t.trim()?eL.SUGGESTION_KEYWORDS.filter(e=>e.toLowerCase().includes(t.toLowerCase())).slice(0,4):[];g({search:t,suggestions:r}),w(t)},onKeyDown:e=>{"Enter"===e.key&&x.search.trim()&&y()},className:"w-full py-3 bg-transparent border-none focus:outline-none text-sm text-gray-800",autoFocus:!0}),x.search?(0,t.jsx)("button",{onClick:()=>g({search:""}),className:"text-gray-400",children:(0,t.jsx)(a.X,{className:"h-4 w-4"})}):(0,t.jsx)("button",{onClick:()=>g({searchVisible:!1}),className:"text-xs font-semibold text-(--colour-fsP2)",children:"Cancel"})]})}),(0,t.jsx)("div",{className:"flex-1 overflow-y-auto bg-gray-50",children:(0,t.jsx)(m.default,{search:x.search,isFocused:!0,history:x.history,suggestions:x.suggestions,results:x.results,isSearching:x.isSearching,onTriggerSearch:e=>{g({search:e}),w(e)},onClearHistory:()=>{(0,eL.clearSearchHistory)(),g({history:[]})},onProductClick:()=>g({searchVisible:!1}),isMobile:!0})})]})}),(0,t.jsx)("div",{className:(0,l.cn)("md:hidden fixed bottom-0 left-0 right-0 z-[999] bg-(--colour-fsP1) rounded-t-2xl px-2 py-1.5 transition-transform duration-300",x.showNav?"translate-y-0":"translate-y-full"),children:(0,t.jsx)("nav",{className:"flex justify-between items-center max-w-md mx-auto px-1",children:eL.BOTTOM_NAV_ITEMS.map((e,r)=>(0,t.jsxs)("button",{onClick:()=>{"Search"===e.label?g({searchVisible:!0}):"Categories"===e.label?g({isMenuOpen:!0}):e.path&&c.push(e.path)},className:(0,l.cn)("flex flex-col items-center gap-0.5 p-2 text-[#1a1a1a]","EMI Shop"===e.label?"w-16":"w-14"),children:[(0,t.jsx)(e.icon,{className:"w-5 h-5",strokeWidth:2.5}),(0,t.jsx)("span",{className:(0,l.cn)("text-[10px] font-bold","EMI Shop"===e.label&&"whitespace-nowrap"),children:e.label})]},r))})})]})}],38645)},12828,e=>{"use strict";var t=e.i(932),r=e.i(71645),s=e.i(51884),o=e.i(60630);function a(){s.useAuthStore.setState({hasHydrated:!0}),o.useCartStore.setState({hasHydrated:!0})}e.s(["default",0,function(){let e,s=(0,t.c)(1);return s[0]===Symbol.for("react.memo_cache_sentinel")?(e=[],s[0]=e):e=s[0],(0,r.useEffect)(a,e),null}])},94164,e=>{"use strict";var t=e.i(932),r=e.i(71645);
1function s(){if("serviceWorker"in navigator)return window.addEventListener("load",o),()=>window.removeEventListener("load",o)}function o(){navigator.serviceWorker.register("/sw.js").catch(a)}function a(e){}e.s(["default",0,function(){let e,o=(0,t.c)(1);return o[0]===Symbol.for("react.memo_cache_sentinel")?(e=[],o[0]=e):e=o[0],(0,r.useEffect)(s,e),null}])}]);
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.