1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1787],{93357:function(e,t,r){(window.__NEXT_P=window.__NEXT_P||[]).push(["/customers/my-eauction-wishlist",function(){return r(66564)}])},66564:function(e,t,r){"use strict";r.r(t),r.d(t,{default:function(){return j}});var o=r(85893),l=r(28646),i=r(67294),s=r(88446),n=r(29552),a=r(41664),c=r.n(a),d=r(99603),u=r(59417),v=r(22632),h=r(11163),m=r(86501),x=r(48583),g=r(94543),p=r(61839),f=r(9008),y=r.n(f),b=function(){var e;let t=(0,h.useRouter)(),r=(0,x.Dv)(g.ZP),l=null==r?void 0:null===(e=r.userDetails)||void 0===e?void 0:e.status;(0,i.useRef)(null);let[a,f]=(0,i.useState)({loading:!1,success:"",error:""}),[b,j]=(0,i.useState)([]),[N,w]=(0,i.useState)(1),[_,A]=(0,i.useState)(1),[S,D]=(0,i.useState)(0),[Z,k]=(0,i.useState)("");(0,i.useEffect)(()=>{k(window.location.href)},[t]);let[C,E]=(0,i.useState)({id:-1,refer_person_1:"",refer_person_2:"",refer_person_3:"",email_v:-1,mobile_v:-1}),T=async()=>{try{var e,t;f({loading:!0,success:"",error:""});let r=await s.Z.post("/eauction-live-wishlist/get-product-1-live-wish-list",{page_enabled:"y",page:1,limit:10,sortDetails:{sortKey:"id",sortType:-1},searchDetails:[]});Array.isArray(null==r?void 0:null===(e=r.data)||void 0===e?void 0:e.data)&&j(null==r?void 0:null===(t=r.data)||void 0===t?void 0:t.data),f({loading:!1,success:"success",error:""})}catch(e){console.error(e),f({loading:!1,success:"error",error:""})}},I=async e=>{try{let t=await s.Z.post("/eauction-live-wishlist/delete-by-id-product-1-live-wish-list",{id:e},{headers:{frontendurl:Z||""}});200===t.status&&T()}catch(e){console.error(e)}},U=async()=>{try{let r=await s.Z.get("/user/viewuser");if(200===r.status){var e;if(E(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){m.ZP.error("You need to verify your email and mobile",{duration:3e3,icon:(0,o.jsx)(d.G,{icon:u.FU$})}),t.push("/customers/profile");return}}f({loading:!1,success:"success",error:""})}catch(e){console.error(e),f({loading:!1,success:"error",error:""})}};return(0,i.useEffect)(()=>{U(),T()},[]),(0,o.jsxs)("div",{className:"lg:mx-28 p-3 lg:p-0",children:[(0,o.jsx)(o.Fragment,{children:(0,o.jsx)(y(),{children:(0,o.jsx)("title",{children:"e-Auction Wishlist"})})}),l.split(",").includes("1")&&(null==l?void 0:l.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)(c(),{className:"hover:text-red-700",href:"/",children:"Home"}),"\xa0/\xa0",(0,o.jsx)(c(),{className:"hover:text-red-700",href:"/customers",children:"Dashboard"}),"\xa0/\xa0",(0,o.jsx)(c(),{className:"hover:text-red-700",href:"/customers/my-eauction-wishlist",children:"E-Auction 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-Auction Wishlist"}),(0,o.jsx)("button",{onClick:()=>{try{for(let e=0;e<b.length;e++)b[e].id&&I(b[e].id)}catch(e){console.error(e)}},className:"bg-red-500 p-1 outline-none rounded-md text-white",children:"Empty Wishlist"})]}),(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:"Start Price"}),(0,o.jsx)("th",{className:"border ",children:"Estimated Price"}),(0,o.jsx)("th",{className:"border ",children:"End Time"}),(0,o.jsx)("th",{className:"border ",children:"No of Bids"}),(0,o.jsx)("th",{className:"border ",children:"Action"})]})}),(0,o.jsx)("tbody",{className:" text-center ",children:"success"===a.success&&b.length>0?b.map((e,t)=>{var r,l,i,s,a,h,m,x,g,f,y,b,j,N;let w=null==e?void 0:e.code.toString().slice(-4),_=w.toString();parseInt(_,10),null==e||e.code.toString().slice(0,4);let A=parseInt(e.code.toString().substring(2,4)),S=(0,v.Z)({category:[null===(r=null==e?void 0:e.productArr[0])||void 0===r?void 0:r.category1Details,null===(l=null==e?void 0:e.productArr[0])||void 0===l?void 0:l.category2Details,null===(i=null==e?void 0:e.productArr[0])||void 0===i?void 0:i.category3Details,null===(s=null==e?void 0:e.productArr[0])||void 0===s?void 0:s.category4Details,null===(a=null==e?void 0:e.productArr[0])||void 0===a?void 0:a.category5Details],title:null===(h=null==e?void 0:e.productArr[0])||void 0===h?void 0:h.title,auction:A,code:e.code,auctiontype:"live-e-auction",type:1,isLive:0});return(0,o.jsxs)("tr",{className:"h-20 odd:bg-gray-100",children:[(0,o.jsx)("td",{className:"border md:w-[2%]",children:t+1}),(0,o.jsx)("td",{className:"border md:w-[10%] p-2 ",children:null===(m=null==e?void 0:e.productArr[0])||void 0===m?void 0:m.imagesArr.slice(0,1).map((e,t)=>{let r="",l=[...e],i=l.slice(0,4).join("").toString(),s=l.splice(9,1).toString();return"0"===s&&(r="t"),"1"===s&&(r="s"),"2"===s&&(r="m"),"3"===s&&(r="l"),"9"===s&&(r="o"),(0,o.jsx)("img",{className:" rounded-md",src:"".concat(n.Z.CDN_URL_PUBLIC,"/uploads/").concat(r,"/").concat(i,"/").concat(e)},t)})}),(0,o.jsxs)("td",{className:"border overflow-auto text-start px-3 md:w-[30%]",children:[(0,o.jsx)(c(),{className:"hover:text-blue-500 text-lg ",href:S,children:(0,o.jsxs)("strong",{children:["SKU #",null==e?void 0:e.code]})}),(0,o.jsx)("br",{}),(0,o.jsx)(c(),{className:"hover:text-blue-500 ",href:S,children:(null===(x=null==e?void 0:e.productArr[0])||void 0===x?void 0:x.title.length)>60?(null===(g=null==e?void 0:e.productArr[0])||void 0===g?void 0:g.title.slice(0,60))+"...":null===(f=null==e?void 0:e.productArr[0])||void 0===f?void 0:f.title})]}),(0,o.jsx)("td",{className:"border md:w-[7%] ",children:null===(y=null==e?void 0:e.productArr[0])||void 0===y?void 0:y.minimum_price}),(0,o.jsx)("td",{className:"border md:w-[9%] ",children:null===(b=null==e?void 0:e.productArr[0])||void 0===b?void 0:b.eastimated_price}),(0,o.jsxs)("td",{className:"border md:w-[10%] ",children:[(0,p.Z)(null===(j=null==e?void 0:e.productArr[0])||void 0===j?void 0:j.end_time,"MMMM dd, yyyy , hh:mm a")," "]}),(0,o.jsx)("td",{className:"border md:w-[7%] ",children:null===(N=null==e?void 0:e.productArr[0])||void 0===N?void 0:N.no_of_bids}),(0,o.jsx)("td",{className:"border md:w-[7%] xxxs:space-x-2 md:space-x-3 text-lg",children:(0,o.jsx)(d.G,{onClick:()=>{I(null==e?void 0:e.id)},className:"text-red-500 cursor-pointer hover:translate-y-[.05rem] hover:text-red-700 ",icon:u.Vui})})]},t)}):(0,o.jsx)("tr",{children:(0,o.jsx)("th",{colSpan:8,className:" bg-gray-200 p-3",children:"whishlist is empty"})})})]})})]})]}):(0,o.jsx)("h1",{className:"text-center text-xl",children:"Need to Verify your email and mobile"})]})},j=()=>{let e=(0,x.Dv)(g.ZP);return e.loading?(0,o.jsx)("p",{className:"md:mx-28 text-center p-5",children:"Loading..."}):e.isLoggedIn?(0,o.jsx)(b,{}):(0,o.jsx)(l.Z,{})}},28646:function(e,t,r){"use strict";var o=r(85893),l=r(41664),i=r.n(l),s=r(11163);r(67294),t.Z=()=>{let e=(0,s.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)(i(),{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," "),i=null===(t=null==l?void 0:l.toLowerCase())||void 0===t?void 0:t.replace(/\s+/g,"-");return null===(r=null===(o=null==i?void 0:i.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 i="",s="",n=e.code,a=e.isLive,c=null==n?void 0:n.toString().slice(-4),d=null==c?void 0:c.toString(),u=parseInt(null===(t=parseInt(d,10))||void 0===t?void 0:t.toString()),v=parseInt(null==n?void 0:n.toString().substring(0,2)),h=e.auctiontype;if("all"===h)switch(v){case 10:h=1==a?"live-e-auction":"e-auction-archive";break;case 20:h=1==a?"live-p-auction":"p-auction-archive";break;case 30:h="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);s+="".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);s+="".concat(t,"/")}}}let m=r(e.title),x=s.substring(0,(null==s?void 0:s.length)-1);switch(h){case"p-auction-archive":i="/printed-auction/auction-no-".concat(e.auction,"/lot-no-").concat(u,"/").concat(x,"/").concat(m);break;case"e-auction-archive":i="/e-auction/auction-no-".concat(e.auction,"/lot-no-").concat(u,"/").concat(x,"/").concat(m);break;case"live-p-auction":i="/live-printed-auction/auction-no-".concat(e.auction,"/lot-no-").concat(u,"/").concat(x,"/").concat(m);break;case"live-e-auction":i="/live-e-auction/auction-no-".concat(e.auction,"/lot-no-").concat(u,"/").concat(x,"/").concat(m);break;case"e-shop":i="/e-shop/pid-no-".concat(u,"/").concat(x,"/").concat(m)}return i}catch(e){console.error(e)}return""}},61839:function(e,t,r){"use strict";var o=r(30120);t.Z=(e,t)=>{try{if(!e)return"Date does not exist";let r=new Date(e),l=r.valueOf();if("number"!=typeof l||isNaN(l))return"Invalid Date";let i={year:r.getUTCFullYear(),month:r.getUTCMonth(),date:r.getUTCDate(),hours:r.getUTCHours(),minutes:r.getUTCMinutes(),seconds:r.getUTCSeconds()},s=o.ou.fromObject({year:i.year,month:i.month+1,day:i.date,hour:i.hours,minute:i.minutes,second:i.seconds});if(t.length>0)return s.setZone("Asia/Kolkata").toFormat(t).toString();return s.setZone("Asia/Kolkata").toString()}catch(e){return console.error(e),"Invalid Date"}}},9008:function(e,t,r){e.exports=r(42636)}},function(e){e.O(0,[120,9774,2888,179],function(){return e(e.s=93357)}),_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.