1!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="ad8cf733-c90c-441f-8d13-6c2f6facac91",e._sentryDebugIdIdentifier="sentry-dbid-ad8cf733-c90c-441f-8d13-6c2f6facac91")}catch(e){}}();"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6764],{34121:(e,t,r)=>{r.d(t,{JR:()=>o,Kb:()=>n,jS:()=>l});let n=(0,r(17288).yY)()||"",o=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";"function"==typeof window.fbq?e?window.fbq("track","PageView",{},{eventID:e}):window.fbq("track","PageView"):console.error("Meta Pixel PageView skipped: fbq is not loaded yet")},l=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";window.fbq&&(r?window.fbq("track",e,t,{eventID:r}):window.fbq("track",e,t))}},36764:(e,t,r)=>{r.d(t,{J:()=>u,v:()=>f});var n=r(95155),o=r(263),l=r(91193),a=r(82420),i=r(64796),c=r(42329),s=r(12115);let d=(0,s.createContext)(void 0),u=()=>{let e=(0,s.useContext)(d);if(!e)throw Error("useUser must be used within a UserProvider");return e},f=e=>{let{children:t}=e,[r,u]=(0,s.useState)(null),[f,g]=(0,s.useState)(null),[y,h]=(0,s.use
1State)({counter:0}),[p,w]=(0,s.useState)(!0),[S,b]=(0,s.useState)(0),m=(0,s.useRef)(null),v=(0,s.useCallback)(()=>{if(m.current)return m.current;let e=(async()=>{try{let e=await (0,i.G6)();if(0===e.length)return void b(0);try{let t=await fetch("/api/wishlist-count",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({productIds:e})}),r=await t.json();b("number"==typeof r.count?r.count:e.length)}catch(t){b(e.length)}}finally{m.current=null}})();return m.current=e,e},[]);(0,s.useEffect)(()=>{(()=>{try{let e=localStorage.getItem(o.SK.NEXTUSERINFODATA);e&&(0,l.zM)(e)&&u(JSON.parse(e))}catch(e){console.error("Failed to load user from localStorage",e)}})(),(()=>{try{let e=localStorage.getItem(o.SK.NEXTCARTINFODATA);e&&(0,l.zM)(e)&&g(JSON.parse(e))}catch(e){console.error("Failed to load cart from localStorage",e)}})(),v(),w(!1)},[]),(0,s.useEffect)(()=>(window.addEventListener(c.m,v),()=>window.removeEventListener(c.m,v)),[v]);let T=(0,s.useCallback)(e=>{u(e),localStorage.setItem(o.SK.NEXTUSERINFODATA,JSON.stringify(e))},[]),E=(0,s.useCallback)(e=>{T(e),(0,a.eO)(e),v()},[T,v]),N=(0,s.useCallback)(()=>{u(null),b(0),localStorage.removeItem(o.SK.NEXTUSERINFODATA),localStorage.removeItem(o.SK.NEXTCARTINFODATA),g(null),(0,a.Tf)()},[]),A=(0,s.useCallback)(e=>{g(t=>{let r=t?{...t,...e}:e;return localStorage.setItem(o.SK.NEXTCARTINFODATA,JSON.stringify(r)),r})},[]),I=(0,s.useCallback)(async e=>{try{let t=await fetch("/api/counter",{method:"POST",body:JSON.stringify({counter:e+1}),headers:{"Content-Type":"application/json"}}),r=await t.json();r.config&&h(r.config)}catch(e){console.error("Increment failed:",e)}},[]),_=(0,s.useCallback)(async e=>{try{let t=await fetch("/api/counter",{method:"POST",body:JSON.stringify({counter:e-1}),headers:{"Content-Type":"application/json"}}),r=await t.json();r.config&&h(r.config)}catch(e){console.error("Decrement failed:",e)}},[]),C=(0,s.useMemo)(()=>({user:r,isLoggedIn:!!r,login:T,completeLogin:E,logout:N,cartinfoData:f,setCartInfoData:A,config:y,setConfig:h,incCounter:I,decCounter:_,loading:p,wishlistCount:S}),[r,f,y,p,S,T,E,N,A,I,_]);return(0,n.jsx)(d.Provider,{value:C,children:t})}},39555:(e,t,r)=>{r.d(t,{S3:()=>a,oe:()=>i,zn:()=>l.z});var n=r(64796),o=r(34121),l=r(52655);let a=function(e,t){var r,l;let a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,c=null!=t?t:null;if(!e)return void console.error("FBPIXPush: Missing EVENT_ENUM or cartinfoData");let s=(null==c||null==(r=c.products)?void 0:r.map(e=>e.esin))||[],d=a?"purchase_".concat(a):(0,n.zG)(),u=null!=(l=null==c?void 0:c.total)?l:null==c?void 0:c.ordertotal,f=i||{content_ids:s,content_type:"product",...u?{value:u,currency:"INR"}:{}};(0,n.t)(e,a,d,i),(0,o.jS)(e.name,f,d)},i=e=>{let t=e||(0,n.zG)();return(0,n.t)({name:"PageView"},"",t),(0,o.JR)(t),t}},42329:(e,t,r)=>{r.d(t,{I:()=>d,m:()=>i});var n=r(22663),o=r(64796),l=r(39555),a=r(263);let i="wishlist-changed",c=()=>{window.dispatchEvent(new Event(i))},s=new Set,d=async(e,t,r,i)=>{let d=e.id.toString();if(!s.has(d)){s.add(d);try{if(t.includes(d))try{await (0,o.$L)(d);let e=t.filter(e=>e!==d);r(e),c(),n.Ay.success("Removed from wishlist!",{style:{border:"1px solid #00b852",padding:"16px",color:"#00b852"},iconTheme:{primary:"#00b852",secondary:"#FFFAEE"}})}catch(e){n.Ay.error("Failed to remove from wishlist. Please try again.",{style:{border:"1px solid #cc0000",padding:"16px",color:"#cc0000"},duration:2e3})}else try{let s=await (0,o.cD)(d,i);if(null==s?void 0:s.success){let o=[...t,d];r(o),c(),(0,l.S3)(a.ax.EVENT_ENUMS.MY_WISHLIST,null,"",{content_ids:[e.esin||d],content_name:e.name||e.eng_name||"",content_category:e.category_name||"",value:Number(e.sp||e.selling_price||0),currency:"INR"}),n.Ay.success("Added to wishlist!",{style:{border:"1px solid #00b852",padding:"16px",color:"#00b852"},iconTheme:{primary:"#00b852",secondary:"#FFFAEE"}})}}catch(e){n.Ay.error("Unauthorized: Please log in"===e.message?"Login to start saving products to your wishlist!":"Failed to add to wishlist. Please try again.",{style:{border:"1px solid #cc0000",padding:"16px",color:"#cc0000"},duration:2e3})}}
1finally{s.delete(d)}}}},52655:(e,t,r)=>{r.d(t,{z:()=>o});var n=r(64796);let o=function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;if(!e)return;let l=r?"purchase_".concat(r):(0,n.zG)(),a=e.name?e.name.toLowerCase().replace(/\s+/g,"_"):"custom_event";(0,n.B6)(a,r,l,o)}},91193:(e,t,r)=>{r.d(t,{JO:()=>a,i3:()=>n,zM:()=>l,zT:()=>o});let n=e=>null==e||""===e?"":String(e).replace(/\s/g,"").toLowerCase(),o=e=>null!=e&&""!==e,l=e=>{try{return JSON.parse(e),!0}catch(e){return!1}},a=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return null!=e&&""!==e&&!!Array.isArray(e)&&(!!Array.isArray(e)&&(0===t||!!(e.length>=t))||!1)}}}]);
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.