1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8948],{67394:function(e,t,r){(window.__NEXT_P=window.__NEXT_P||[]).push(["/customers/my-estore-wishlist",function(){return r(50405)}])},50405:function(e,t,r){"use strict";r.r(t),r.d(t,{default:function(){return _}});var o=r(85893),l=r(28646),s=r(34288),i=r(59417),a=r(99603),c=r(88446),n=r(67294),d=r(29552),u=r(41664),h=r.n(u),v=r(22632),g=r(86501),p=r(11163),x=r(48583),m=r(70372),y=r(93729),f=r(94543),b=r(9008),j=r.n(b),N=r(88754),w=function(){var e;let t=(0,p.useRouter)(),r=(0,n.useRef)(null),l=(0,x.Dv)(f.ZP),u=null==l?void 0:null===(e=l.userDetails)||void 0===e?void 0:e.status,[b,w]=(0,n.useState)({loading:!1,success:"",error:""}),[_,S]=(0,n.useState)({loading:!1,success:"",error:""});(0,x.Dv)(m.Z);let A=(0,x.b9)(m.Z),[Z,k]=(0,n.useState)([]),[C,D]=(0,n.useState)({loading:!1,success:"",error:""}),[E,P]=(0,n.useState)({id:-1,refer_person_1:"",refer_person_2:"",refer_person_3:"",email_v:-1,mobile_v:-1}),[I,L]=(0,n.useState)(1),[T,F]=(0,n.useState)(1),[G,R]=(0,n.useState)(0),[K,M]=(0,n.useState)("");(0,n.useEffect)(()=>{M(window.location.href)},[t]);let U=async()=>{try{var e,r,o;t.pathname,w({loading:!0,success:"",error:""});let l=await c.Z.post("estore-wishlist/get-product-3-wish-list",{page_enabled:"y",page:I,limit:10,sortDetails:{sortKey:"id",sortType:-1},searchDetails:[]});Array.isArray(null==l?void 0:null===(e=l.data)||void 0===e?void 0:e.data)&&(k(null==l?void 0:null===(r=l.data)||void 0===r?void 0:r.data),R(null==l?void 0:null===(o=l.data)||void 0===o?void 0:o.count)),w({loading:!1,success:"success",error:""})}catch(e){console.error(e),w({loading:!1,success:"error",error:""})}},V=async(e,r)=>{try{if(l.isLoggedIn){let t=async e=>{try{let t=await c.Z.post("/product-cart/getCartDetails",e),r=t.data.data;A(r)}catch(e){console.error(e)}},o=await c.Z.post("/product-cart/addToCart",{code:e},{headers:{frontendurl:K||""}});if((0,y.Z)({msg:"Product is Successfully added to the cart",type:"success"}),200===o.status){let e=await c.Z.post("estore-wishlist/delete-by-id-product-3-wish-list",{id:r},{headers:{frontendurl:K||""}});200===e.status&&(U(),t({page_enabled:"y",page:1,limit:100,sortDetails:{sortKey:"id",sortType:1},searchDetails:[],searchDetailsAnd:[{basicSearchKey:"status",basicSearchValue:0,basicSearchType:"number"}],searchQuery:""}))}S({loading:!1,success:"success",error:""})}else localStorage.setItem("pendingProductCode",e.toString()),t.push("/login")}catch(e){S({loading:!1,success:"error",error:""})}},W=async e=>{try{var r,o,l;w({loading:!0,success:"",error:""});let t=await c.Z.post("/e-Shop-product/addToNotify",{code:e});(null==t?void 0:t.status)===200&&(null==t?void 0:null===(r=t.data)||void 0===r?void 0:r.status)?(0,y.Z)({msg:null==t?void 0:null===(o=t.data)||void 0===o?void 0:o.data,type:"success"}):(0,y.Z)({msg:null==t?void 0:null===(l=t.data)||void 0===l?void 0:l.data,type:"error"}),w({loading:!1,success:"success",error:""})}catch(e){console.error(e),g.ZP.error("you need to login to continue..."),t.push("/login"),w({loading:!1,success:"error",error:""})}},O=async e=>{try{let t=await c.Z.post("estore-wishlist/delete-by-id-product-3-wish-list",{id:e},{headers:{frontendurl:K||""}});200===t.status&&U()}catch(e){console.error(e)}},Y=async()=>{try{let r=await c.Z.get("/user/viewuser");if(200===r.status){var e;if(P(null==r?void 0:r.data),1!==r.data.email_v&&(null==r?void 0:null===(e=r.data)||void 0===e?void 0:e.mobile_v)!==2){g.ZP.error("You need to verify your email and mobile",{duration:3e3,icon:(0,o.jsx)(a.G,{icon:i.FU$})}),t.push("/customers/profile");return}}w({loading:!1,success:"success",error:""})}catch(e){console.error(e),w({loading:!1,success:"error",error:""})}};return(0,n.useEffect)(()=>{Y()},[]),(0,n.useEffect)(()=>{U()},[I]),(0,o.jsxs)("div",{className:"lg:mx-28 p-3 lg:p-0",children:[(0,o.jsx)(o.Fragment,{children:(0,o.jsx)(j(),{children:(0,o.jsx)("title",{children:"e-Store Wishlist"})})}),u.split(",").includes("1")&&u.split(",").includes("2")?(0,o.jsxs)("div",{className:"container mx-auto",children:[(0,o.jsxs)("div",{className:"container mx-auto bg-gray-200 h-10 lg:my-3 rounded-md p-2 text-gray-500",children:[(0,o.jsx)(h(),{className:"hover:text-red-700",href:"/",children:"Home"}),"\xa0/\xa0",(0,o.jsx)(h(),{className:"hover:text-red-700",href:"/customers",children:"Dashboard"}),"\xa0/\xa0",(0,o.jsx)(h(),{className:"hover:text-red-700",href:"/customers/my-estore-wishlist",children:"E-Store Wishlist"})]}),(0,o.jsxs)(o.Fragment,{children:[(0,o.jsxs)("div",{className:"py-3 flex flex-row justify-between",children:[(0,o.jsx)("h1",{className:"text-2xl ",children:"My e-Store Wishlist "}),(0,o.jsxs)("div",{className:"flex space-x-5 ",children:[(0,o.jsx)("button",{onClick:()=>{try{for(let e=0;e<Z.length;e++)Z[e].id&&O(Z[e].id)}catch(e){console.error(e)}},className:"bg-red-500 px-1 outline-none rounded-md text-white",children:"Empty Wishlist"}),(0,o.jsx)("div",{ref:r,className:"flex md:space-x-3",children:(0,o.jsx)(e=>{let t=e.total_count,l=e.per_page,s=e.page,c=Math.ceil(t/l),n=[],d=s-2<1?1:s-2,u=s+2<=c?s+2:c;n.push({pageNo:1});for(let e=d;e<=u;e++)e>1&&e<c&&n.push({pageNo:e});let h=e=>{e>0&&(F(e),L(e))};return(0,o.jsx)(o.Fragment,{children:c>1&&(0,o.jsx)("div",{className:"flex xxxs:pb-5",children:(0,o.jsx)("nav",{children:(0,o.jsxs)("ul",{className:"flex -sp
1ace-x-px h-4 text-sm lining-nums",children:[s>1&&(0,o.jsx)(o.Fragment,{children:(0,o.jsx)("li",{onClick:()=>{h(s-1)},className:"flex items-center justify-center px-3 h-7 ml-0 leading-tight text-gray-500 bg-white border cursor-pointer border-gray-300 rounded-l-lg hover:bg-gray-100 hover:text-gray-700",children:(0,o.jsx)(a.G,{icon:i.EyR,className:"w-2.5 h-2.5"})})}),n.map((e,t)=>(0,o.jsx)(o.Fragment,{children:e.pageNo<=c&&(0,o.jsx)("li",{onClick:()=>{var t;h(e.pageNo),null===(t=r.current)||void 0===t||t.scrollIntoView()},value:e.pageNo,className:"flex items-center justify-center px-3 h-7 leading-tight cursor-pointer border-gray-300 border ".concat(e.pageNo===s?"bg-gray-100 hover:text-gray-700 ":" text-gray-500 bg-white hover:bg-gray-100 hover:text-gray-700 "),children:e.pageNo},t)})),(0,o.jsx)("li",{onClick:e=>{h(e.target.value)},value:c,className:"flex items-center justify-center px-3 h-7 leading-tight cursor-pointer border-gray-300 border ".concat(s==c?"bg-gray-100 hover:text-gray-700 ":" text-gray-500 bg-white hover:bg-gray-100 hover:text-gray-700 "),children:c}),s<c&&(0,o.jsx)(o.Fragment,{children:(0,o.jsx)("li",{onClick:()=>{h(s+1)},className:"flex items-center justify-center px-3 h-7 leading-tight text-gray-500 bg-white border border-gray-300 rounded-r-lg cursor-pointer hover:bg-gray-100 hover:text-gray-700 ",children:(0,o.jsx)(a.G,{icon:i.yOZ,className:"w-2.5 h-2.5"})})})]})})})})},{total_count:G,per_page:10,page:I})})]})]}),(0,o.jsx)("div",{className:"overflow-x-auto",children:(0,o.jsxs)("table",{className:" w-full table-auto overflow-scroll border",children:[(0,o.jsx)("thead",{className:"h-14",children:(0,o.jsxs)("tr",{children:[(0,o.jsx)("th",{className:"border",children:"S.No"}),(0,o.jsx)("th",{className:"border",children:"Images"}),(0,o.jsx)("th",{className:"border",children:"Title"}),(0,o.jsx)("th",{className:"border",children:"Price"}),(0,o.jsx)("th",{className:"border",children:"Action"})]})}),(0,o.jsx)("tbody",{className:" text-center ",children:"success"===b.success&&Z.length>0?Z.map((e,t)=>{var r,l,c,n,u,g,p,x,m,f,b,j,w,_,S,A,Z,k;let C=e.code.toString().slice(-4),D=C.toString();parseInt(D,10),e.code.toString().slice(0,4);let E=parseInt(e.code.toString().substring(2,4)),P=(0,v.Z)({category:[null===(r=null==e?void 0:e.productArr[0])||void 0===r?void 0:r.category2Details,null===(l=null==e?void 0:e.productArr[0])||void 0===l?void 0:l.category1Details,null===(c=null==e?void 0:e.productArr[0])||void 0===c?void 0:c.category3Details,null===(n=null==e?void 0:e.productArr[0])||void 0===n?void 0:n.category4Details,null===(u=null==e?void 0:e.productArr[0])||void 0===u?void 0:u.category5Details],title:null===(g=null==e?void 0:e.productArr[0])||void 0===g?void 0:g.title,auction:E,code:e.code,auctiontype:"e-shop",type:1,isLive:0});return(0,o.jsxs)("tr",{className:" odd:bg-gray-100",children:[(0,o.jsx)("td",{className:"border md:w-[5%]",children:t+(I-1)*10+1}),(0,o.jsx)("td",{className:"border md:w-[15%] p-2 ",children:null===(p=null==e?void 0:e.productArr[0])||void 0===p?void 0:p.imagesArr.slice(0,1).map((e,t)=>{let r="",l=[...e],s=l.slice(0,4).join("").toString(),i=l.splice(9,1).toString();return"0"===i&&(r="t"),"1"===i&&(r="s"),"2"===i&&(r="m"),"3"===i&&(r="l"),"9"===i&&(r="o"),(0,o.jsx)("img",{className:"",src:"".concat(d.Z.CDN_URL_PUBLIC,"/uploads/").concat(r,"/").concat(s,"/").concat(e)},t)})}),(0,o.jsxs)("td",{className:"border overflow-auto text-start px-3 w-[50%]",children:[(0,o.jsxs)(h(),{className:"hover:text-blue-500 text-lg ",href:P,children:["SKU #",null==e?void 0:e.code]}),(0,o.jsx)("br",{}),(0,o.jsx)(h(),{className:"hover:text-blue-500 ",href:P,children:(null===(x=null==e?void 0:e.productArr[0])||void 0===x?void 0:x.title.length)>60?(null===(m=null==e?void 0:e.productArr[0])||void 0===m?void 0:m.title.slice(0,60))+"...":null===(f=null==e?void 0:e.productArr[0])||void 0===f?void 0:f.title})]}),(0,o.jsxs)("td",{className:"border w-[10%] ",children:[(0,o.jsx)(a.G,{className:"mt-1",icon:i.H0g}),(0,N.b)((null===(b=null==e?void 0:e.productArr[0])||void 0===b?void 0:b.eshop_price)?(null===(j=null==e?void 0:e.productArr[0])||void 0===j?void 0:j.discount_price)===0?null===(w=null==e?void 0:e.productArr[0])||void 0===w?void 0:w.eshop_price:(null===(_=null==e?void 0:e.productArr[0])||void 0===_?void 0:_.eshop_price)-(null===(S=null==e?void 0:e.productArr[0])||void 0===S?void 0:S.discount_price):null)," ",(0,o.jsx)("br",{}),(0,o.jsx)("h1",{className:" line-through",children:(null===(A=null==e?void 0:e.productArr[0])||void 0===A?void 0:A.discount_price)!==0?null===(Z=null==e?void 0:e.productArr[0])||void 0===Z?void 0:Z.eshop_price:null}),(0,o.jsx)("br",{}),(null===(k=null==e?void 0:e.productArr[0])||void 0===k?void 0:k.quantity)===0?(0,o.jsxs)("button",{onClick:t=>{t.preventDefault(),W(null==e?void 0:e.code)},className:"border md:mt-2 bg-blue-500 text-white p-2 hover:bg-blue-600 rounded-md",children:[(0,o.jsx)(a.G,{className:"",icon:s.RrC})," ","Notify Me"]}):null]}),(0,o.jsxs)("td",{className:"border md:w-[10%] xxxs:space-x-2 md:space-x-3 text-lg",children:[(0,o.jsx)(a.G,{onClick:()=>{var t;(null===(t=null==e?void 0:e.productArr[0])||void 0===t?void 0:t.quantity)>0?V(null==e?void 0:e.code,null==e?void 0:e.id):(0,y.Z)({msg:"Product is not available in the store",type:"error"})},className:"text-blue-500 cursor-pointer hover:translate-y-[.05rem] hover:text-blue-700",icon:i.bMA}),(0,o.jsx)(a.G,{onClick:()=>{O(e.id)},className:"text-red-500 cursor-pointer hover:translate-y-[.05rem] hover:text-red-700 ",icon:s.Vui})]})]},e.id)}):(0,o.jsx)("tr",{children:(0,o.jsx)("th",{colSpan:5,className:" bg-gray-200 p-3",children:"whishlist is empty"})})})]})})]})]}):(0,o.jsx)("h1",{className:"text-center text-xl",children:"You need to Verify your email and mobile"})]})},_=()=>{let e=(0,x.Dv)(f.ZP);return e.loading?(0,o.jsx)("p",{className:"md:mx-28 text-center p-5",children:"Loading..."}):e.isLoggedIn?(0,o.jsx)(w,{}):(0,o.jsx)(l.Z,{})}},28646:function(e,t,r){"use strict";var o=r(85893),l=r(41664),s=r.n(l),i=r(11163);r(67294),t.Z=()=>{let e=(0,i.useRouter)(),t=e.asPath;return(0,o.jsxs)("div",{className:"md:mx-28 text-center text-red-500 p-10 bg-gray-100 text-xl",children:["Your are not Logged in to use this functionality .......! ",(0,o.jsx)("br",{}),(0,o.jsx)(s(),{className:"text-blue-500",href:"/login?re_url=".concat(t),children:"Click here to Login"})]})}},22632:function(e,t){"use strict";let r=e=>{var t,r,o;let l=null==e?void 0:e.replace(/[^\w\s]/g," "),s=null===(t=null==l?void 0:l.toLowerCase())||void 0===t?void 0:t.replace(/\s+/g,"-");return null===(r=null===(o=null==s?void 0:s.replace(/[^a-zA-Z0-9-]/g,""))||void 0===o?void 0:o.replace(/-{2,}/g,"-"))||void 0===r?void 0:r.replace(/^-+|-+$/g,"")};t.Z=e=>{try{var t,o,l;let s="",i="",a=e.code,c=e.isLive,n=null==a?void 0:a.toString().slice(-4),d=null==n?void 0:n.toString(),u=parseInt(null===(t=parseInt(d,10))||void 0===t?void 0:t.toString()),h=parseInt(null==a?void 0:a.toString().substring(0,2)),v=e.auctiontype;if("all"===v)switch(h){case 10:v=1==c?"live-e-auction":"e-auction-archive";break;case 20:v=1==c?"live-p-auction":"p-auction-archive";break;case 30:v="e-shop"}if(1===e.type){for(let t of e.category)if(Array.isArray(t)&&(null==t?void 0:t.length)>0){let e=t[0];if("number"==typeof(null==e?void 0:e.id)&&"string"==typeof(null==e?void 0:e.category)&&(null===(o=e.cat_url)||void 0===o?void 0:o.length)>0){let t=r(null==e?void 0:e.cat_url);i+="".concat(t,"/")}}}else if(2===e.type){for(let t of e.category)if(Array.isArray(t)&&(null==t?void 0:t.length)>0){let e=t[0];if("number"==typeof(null==e?void 0:e.id)&&"string"==typeof(null==e?void 0:e.category)&&(null===(l=e.cat_url)||void 0===l?void 0:l.length)>0){let t=r(null==e?void 0:e.cat_url);i+="".concat(t,"/")}}}let g=r(e.title),p=i.substring(0,(null==i?void 0:i.length)-1);switch(v){case"p-auction-archive":s="/printed-auction/auction-no-".concat(e.auction,"/lot-no-").concat(u,"/").concat(p,"/").concat(g);break;case"e-auction-archive":s="/e-auction/auction-no-".concat(e.auction,"/lot-no-").concat(u,"/").concat(p,"/").concat(g);break;case"live-p-auction":s="/live-printed-auction/auction-no-".concat(e.auction,"/lot-no-").concat(u,"/").concat(p,"/").concat(g);break;case"live-e-auction":s="/live-e-auction/auction-no-".concat(e.auction,"/lot-no-").concat(u,"/").concat(p,"/").concat(g);break;case"e-shop":s="/e-shop/pid-no-".concat(u,"/").concat(p,"/").concat(g)}return s}catch(e){console.error(e)}return""}},88754:function(e,t,r){"use strict";r.d(t,{b:function(){return o}});let o=e=>{try{let t="";if("number"==typeof e?t=e.toString():"string"==typeof e&&(t=e),t.includes("-")){let[e,r]=t.split("-");return l(e)+"-"+l(r)}return l(t)}catch(e){return console.error("Error formatting number:",e),"-"}},l=e=>{try{let t="",r=0,[o,l]=e.split(".");for(let e=o.length-1;e>=0;e--)t=o[e]+t,r++,3===r&&e>0?t=","+t:r>3&&(r-3)%2==0&&e>0&&(t=","+t);return l&&(t+="."+l),t}catch(e){return console.error("Error formatting part of the number:",e),"-"}}},9008:function(e,t,r){e.exports=r(42636)}},function(e){e.O(0,[4288,9774,2888,179],function(){return e(e.s=67394)}),_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.