1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7438],{13558:function(e,l,i){(window.__NEXT_P=window.__NEXT_P||[]).push(["/advance-search-result",function(){return i(9994)}])},9994:function(e,l,i){"use strict";i.r(l),i.d(l,{__N_SSP:function(){return p},default:function(){return g}});var n=i(85893),t=i(67294);i(85231);var o=i(22632),s=i(29552),c=i(99603),r=i(59417),a=i(41664),d=i.n(a),u=i(99034),v=i(11163),h=i(88754),p=!0,g=e=>{var l,i,a,p,g,x,m,j,y,f,N,b,_,A,w,S,L,P,k,C;let{searchDetailByProduct:D,searchDetailAll:E,count:F,searchDataType:Z}=e,q=(0,v.useRouter)(),G=(0,t.useRef)(null),[I,R]=(0,t.useState)(1),[U,z]=(0,t.useState)(1),V=[],K=0,O=[],B=0,T=[],M=0,X=[],H=0,$=[],J=0,Q=[];Array.isArray(E)&&E.length>0&&(Q=E),"string"==typeof Z&&Z.length,"object"==typeof D&&(Array.isArray(null==D?void 0:null===(l=D.pAuction)||void 0===l?void 0:l.details)&&(null==D?void 0:null===(i=D.pAuction)||void 0===i?void 0:i.details.length)>0&&(V=null==D?void 0:null===(N=D.pAuction)||void 0===N?void 0:N.details,K=null==D?void 0:null===(b=D.pAuction)||void 0===b?void 0:b.count),Array.isArray(null==D?void 0:null===(a=D.eAuction)||void 0===a?void 0:a.details)&&(null==D?void 0:null===(p=D.eAuction)||void 0===p?void 0:p.details.length)>0&&(O=null==D?void 0:null===(_=D.eAuction)||void 0===_?void 0:_.details,B=null==D?void 0:null===(A=D.eAuction)||void 0===A?void 0:A.count),Array.isArray(null==D?void 0:null===(g=D.pAuctionLive)||void 0===g?void 0:g.details)&&(null==D?void 0:null===(x=D.pAuctionLive)||void 0===x?void 0:x.details.length)>0&&(T=null==D?void 0:null===(w=D.pAuctionLive)||void 0===w?void 0:w.details,M=null==D?void 0:null===(S=D.pAuctionLive)||void 0===S?void 0:S.count),Array.isArray(null==D?void 0:null===(m=D.eAuctionLive)||void 0===m?void 0:m.details)&&(null==D?void 0:null===(j=D.eAuctionLive)||void 0===j?void 0:j.details.length)>0&&(X=null==D?void 0:null===(L=D.eAuctionLive)||void 0===L?void 0:L.details,H=null==D?void 0:null===(P=D.eAuctionLive)||void 0===P?void 0:P.count),Array.isArray(null==D?void 0:null===(y=D.eShop)||void 0===y?void 0:y.details)&&(null==D?void 0:null===(f=D.eShop)||void 0===f?void 0:f.details.length)>0&&($=null==D?void 0:null===(k=D.eShop)||void 0===k?void 0:k.details,J=null==D?void 0:null===(C=D.eShop)||void 0===C?void 0:C.count));let W=(e,l)=>(0,n.jsx)(n.Fragment,{children:(0,n.jsxs)("span",{className:"",children:["(",Math.abs((e-l)/e*100).toFixed(2),"% Off)"]})}),Y=()=>{let e=(0,u.Z)({query:q.query,type:""}),l={...e,pg:U};q.push({pathname:"/advance-search-result",query:l})},ee=e=>{let l=(0,u.Z)({query:q.query,type:""}),i={...l};"string"==typeof e&&e.length>0&&("All Site"===e?i={...i,type:"all"}:"e Auction"===e?i={...i,type:"e_auction"}:"Printed Auction"===e?i={...i,type:"p_auction"}:"e Shop"===e?i={...i,type:"e_store"}:"e Auction Live"===e?i={...i,type:"e_auction_live"}:"Printed Auction Live"===e&&(i={...i,type:"p_auction_live"})),q.push({pathname:"/advance-search-result",query:i})},el=(e,l,i)=>(0,n.jsxs)("div",{className:"border border-black rounded-md container",children:[(0,n.jsxs)("div",{className:"border-b rounded-t-md p-3 flex justify-between ".concat("Printed Auction"===l?"bg-blue-200":"e Auction"===l?"bg-violet-200":"Printed Auction Live"===l?"bg-green-200":"e Auction Live"===l?"bg-lime-200":"e Shop"===l?"bg-red-200":""),children:[(0,n.jsx)("h1",{children:l}),(0,n.jsxs)("div",{className:"flex flex-row font-sans",children:[(0,n.jsx)("h1",{className:"cursor-pointer hover:translate-y-0.5 text-bold",onClick:()=>ee(l),children:"View all \xa0"})," ","(",i,")"]})]}),e.length>0?(0,n.jsx)("div",{className:"grid grid-col-1 md:grid-cols-2 lg:grid-cols-4 justify-between ",children:e.map(e=>{let i=null==e?void 0:e.code.toString().slice(-4),t=i.toString();parseInt(t,10),null==e||e.code.toString().slice(0,4);let a=parseInt(e.code.toString().substring(2,4)),u="";"Printed Auction"===l&&(u="p-auction-archive"),"e Auction"===l&&(u="e-auction-archive"),"e Auction Live"===l&&(u="live-e-auction"),"Printed Auction Live"===l&&(u="live-p-auction"),"e Shop"===l&&(u="e-shop");let v=(0,o.Z)({category:[null==e?void 0:e.category1Details,null==e?void 0:e.category2Details,null==e?void 0:e.category3Details,null==e?void 0:e.category4Details,null==e?void 0:e.category5Details],title:null==e?void 0:e.title,auction:a,code:e.code,auctiontype:u,type:1,isLive:0});return(0,n.jsxs)("div",{className:" flex flex-col w-full p-2 ",children:[(0,n.jsxs)("div",{className:"border flex flex-col justify-center items-center",children:[(0,n.jsx)("div",{className:"text-start p-2 w-full",children:(0,n.jsxs)("h1",{children:["SKU # ",null==e?void 0:e.code]})}),(0,n.jsxs)("div",{className:" flex flex-row p-2 max-h-1/6 ",children:[" ",null==e?void 0:e.imagesArr.slice(0,2).map((e,l)=>{let i="",t=[...e],o=t.slice(0,4).join("").toString(),c=t.splice(9,1).toString();return"0"===c&&(i="t"),"1"===c&&(i="s"),"2"===c&&(i="m"),"3"===c&&(i="l"),"9"===c&&(i="o"),(0,n.jsx)("div",{className:"",children:(0,n.jsx)("img",{className:"object-contain lg:h-36 md:h-full xxxs:h-36 w-full",src:"".concat(s.Z.CDN_URL_PUBLIC,"/uploads/").concat(i,"/").concat(o,"/").concat(e)},l)})})]})]}),(0,n.jsxs)("div",{className:" bg-gray-200",children:[(0,n.jsx)("div",{className:"p-2",children:(0,n.jsx)("h1",{children:(null==e?void 0:e.title.length)>50?(null==e?void 0:e.title.slice(0,50))+"...":null==e?void 0:e.title})}),(0,n.jsxs)("div",{className:"flex flex-col justify-center items-center lg:flex-row lg:justify-between ",children:[(0,n.jsx)("div",{className:"p-2",children:(0,n.jsx)(d(),{className:"hover:text-blue-500 font-sans border bg-gray-400 rounded-md text-sm p-2 ",href:v,children:"View SKU"})}),(0,n.jsx)("div",{className:"p-2",children:"e Shop"!==l?(0,n.jsxs)("h1",{children:["Price ",(0,n.jsx)(c.G,{icon:r.H0g}),(0,h.b)(null==e?void 0:e.minimum_price)]}):(null==e?void 0:e.discount_price)>0&&(null==e?void 0:e.quantity)>0?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)("div",{className:"",children:[(0,n.jsx)("span",{className:"text-base",children:"Price :"}),(0,n.jsx)(c.G,{icon:r.sph,size:"lg",className:"h-4 w-4 "}),(0,n.jsx)("span",{className:"lining-nums text-lg",children:(0,n.jsx)("span",{className:"text-red-700",children:(0,h.b)(null==e?void 0:e.discount_price)})})]}),(0,n.jsxs)("div",{className:"pt-1",children:[(0,n.jsxs)("span",{className:"text-gray-500",children:[(0,n.jsx)(c.G,{icon:r.sph,size:"sm",className:"h-3 w-3 "}),(0,n.jsx)("span",{className:"lining-nums line-through ",children:(0,h.b)(null==e?void 0:e.eshop_price)})]}),(0,n.jsx)("span",{className:"lining-nums px-2",children:(0,h.b)(W(null==e?void 0:e.discount_price,null==e?void 0:e.eshop_price))})]})]}):(0,n.jsx)(n.Fragment,{children:(null==e?void 0:e.eshop_price)>0&&(0,n.jsxs)("div",{className:"",children:[" ","Price :",(0,n.jsx)(c.G,{icon:r.sph,size:"lg",className:"h-4 w-4 "}),(0,n.jsx)("span",{className:"lining-nums text-lg",children:(0,n.jsx)("span",{className:"text-red-700",children:(0,h.b)(null==e?void 0:e.eshop_price)})})]})})})]})]})]})})}):(0,n.jsx)("div",{className:"w-full",children:(0,n.jsx)("h1",{className:"text-red-500 p-2 ",children:"no search record found..."})})]});return(0,t.useEffect)(()=>{Y()},[U]),(0,n.jsx)("div",{className:"md:mx-28",children:"all"!==Z?(0,n.jsx)(n.Fragment,{children:Q.length>0?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("div",{className:"flex flex-row space-x-5 justify-end",children:(0,n.jsx)("div",{className:"flex justify-center items-end mt-5 ",children:(0,n.jsx)(e=>{let l=e.total_count,i=e.per_page,t=e.page,o=Math.ceil(l/i),s=[],a=t-2<1?1:t-2,d=t+2<=o?t+2:o;s.push({pageNo:1});for(let e=a;
1e<=d;e++)e>1&&e<o&&s.push({pageNo:e});let u=e=>{e>0&&(R(e),z(e))};return(0,n.jsx)(n.Fragment,{children:o>1&&(0,n.jsx)("div",{className:"flex xxxs:pb-5",children:(0,n.jsx)("nav",{children:(0,n.jsxs)("ul",{className:"flex -space-x-px h-4 text-sm lining-nums",children:[t>1&&(0,n.jsx)(n.Fragment,{children:(0,n.jsx)("li",{onClick:()=>{u(t-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,n.jsx)(c.G,{icon:r.EyR,className:"w-2.5 h-2.5"})})}),s.map((e,l)=>(0,n.jsx)(n.Fragment,{children:e.pageNo<=o&&(0,n.jsx)("li",{onClick:()=>{var l;u(e.pageNo),null===(l=G.current)||void 0===l||l.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===t?"bg-gray-100 hover:text-gray-700 ":" text-gray-500 bg-white hover:bg-gray-100 hover:text-gray-700 "),children:e.pageNo},l)})),(0,n.jsx)("li",{onClick:e=>{u(e.target.value)},value:o,className:"flex items-center justify-center px-3 h-7 leading-tight cursor-pointer border-gray-300 border ".concat(t==o?"bg-gray-100 hover:text-gray-700 ":" text-gray-500 bg-white hover:bg-gray-100 hover:text-gray-700 "),children:o}),t<o&&(0,n.jsx)(n.Fragment,{children:(0,n.jsx)("li",{onClick:()=>{u(t+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,n.jsx)(c.G,{icon:r.yOZ,className:"w-2.5 h-2.5"})})})]})})})})},{total_count:F,per_page:10,page:U})})}),(0,n.jsx)("div",{className:"grid grid-cols-3",children:Q.map(e=>{var l,i,t,a,u,v,p,g,x,m,j,y,f,N,b,_,A;let w=parseInt(e.code.toString().substring(2,4)),S="";"p_auction"===Z&&(S="p-auction-archive"),"e_auction"===Z&&(S="e-auction-archive"),"e_auction_live"===Z&&(S="live-e-auction"),"p_auction_live"===Z&&(S="live-p-auction"),"e_store"===Z&&(S="e-shop");let L=(0,o.Z)({category:[null==e?void 0:e.category1Details[0],null==e?void 0:e.category2Details[0],null==e?void 0:e.category3Details[0],null==e?void 0:e.category4Details[0],null==e?void 0:e.category5Details[0]],title:null==e?void 0:e.title,auction:w,code:e.code,auctiontype:S,type:1,isLive:0});return(0,n.jsx)("div",{className:"p-2",children:(0,n.jsxs)("div",{className:"border shadow-lg",children:[(0,n.jsxs)("div",{className:" p-2 h-1/6 ",children:[(null===(l=null==e?void 0:null===(i=e.code)||void 0===i?void 0:i.toString())||void 0===l?void 0:l.slice(0,1))==="3"?(0,n.jsx)("div",{className:"p-3",children:(0,n.jsxs)("h1",{className:"font-bold",children:["SKU # ",null==e?void 0:e.code]})}):null,null==e?void 0:e.imagesArr.slice(0,1).map((e,l)=>{let i="",t=[...e],o=t.slice(0,4).join("").toString(),c=t.splice(9,1).toString();return"0"===c&&(i="t"),"1"===c&&(i="s"),"2"===c&&(i="m"),"3"===c&&(i="l"),"9"===c&&(i="o"),(0,n.jsx)("div",{className:"",children:(0,n.jsx)("img",{className:"object-contain lg:h-36 md:h-full xxxs:h-36 w-full",src:"".concat(s.Z.CDN_URL_PUBLIC,"/uploads/").concat(i,"/").concat(o,"/").concat(e)},l)})})]}),(0,n.jsxs)("div",{className:"border-t bg-gray-200 p-5",children:[(0,n.jsx)("div",{className:"p-2 ",children:(0,n.jsx)("h1",{children:(null==e?void 0:e.title.length)>80?(null==e?void 0:null===(t=e.title)||void 0===t?void 0:t.slice(0,80))+"...":null==e?void 0:e.title})}),(0,n.jsxs)("div",{className:"p-2 bg-white",children:[(0,n.jsxs)("div",{className:"flex justify-between ",children:[(null===(a=null==e?void 0:null===(u=e.code)||void 0===u?void 0:u.toString())||void 0===a?void 0:a.slice(0,1))==="3"?null:(0,n.jsxs)("h1",{children:["Lot #",null==e?void 0:e.code.toString().slice(-4)]}),(0,n.jsx)("h1",{children:(null===(v=null==e?void 0:null===(p=e.code)||void 0===p?void 0:p.toString())||void 0===v?void 0:v.slice(0,1))==="1"?"e-Auction # ".concat(null===(g=null==e?void 0:null===(x=e.code)||void 0===x?void 0:x.toString())||void 0===g?void 0:g.slice(1,4)):(null===(m=null==e?void 0:null===(j=e.code)||void 0===j?void 0:j.toString())||void 0===m?void 0:m.slice(0,1))==="2"?"P-Auction # ".concat(null===(y=null==e?void 0:null===(f=e.code)||void 0===f?void 0:f.toString())||void 0===y?void 0:y.slice(1,4)):null})]}),(0,n.jsxs)("div",{className:"border-t flex p-2 items-center ".concat((null===(N=null==e?void 0:null===(b=e.code)||void 0===b?void 0:b.toString())||void 0===N?void 0:N.slice(0,1))==="3"?"justify-between":"justify-center"),children:[(0,n.jsx)(d(),{href:L,className:"bg-gray-200 p-2 mt-2 rounded-md ",children:"View Lot"}),(null===(_=null==e?void 0:null===(A=e.code)||void 0===A?void 0:A.toString())||void 0===_?void 0:_.slice(0,1))==="3"?(null==e?void 0:e.discount_price)>0&&(null==e?void 0:e.quantity)>0?(0,n.jsxs)("div",{className:"flex flex-col",children:[(0,n.jsxs)("div",{className:"",children:[(0,n.jsx)("span",{className:"text-base",children:"Price :"}),(0,n.jsx)(c.G,{icon:r.sph,size:"lg",className:"h-4 w-4 "}),(0,n.jsx)("span",{className:"lining-nums text-lg",children:(0,n.jsx)("span",{className:"text-red-700",children:(0,h.b)(null==e?void 0:e.discount_price)})})]}),(0,n.jsxs)("div",{className:"pt-1",children:[(0,n.jsxs)("span",{className:"text-gray-500",children:[(0,n.jsx)(c.G,{icon:r.sph,size:"sm",className:"h-3 w-3 "}),(0,n.jsx)("span",{className:"lining-nums line-through ",children:(0,h.b)(null==e?void 0:e.eshop_price)})]}),(0,n.jsx)("span",{className:"lining-nums px-2",children:(0,h.b)(W(null==e?void 0:e.discount_price,null==e?void 0:e.eshop_price))})]})]}):(0,n.jsx)(n.Fragment,{children:(null==e?void 0:e.eshop_price)>0&&(0,n.jsxs)("div",{className:"",children:[" ","Price :",(0,n.jsx)(c.G,{icon:r.sph,size:"lg",className:"h-4 w-4 "}),(0,n.jsx)("span",{className:"lining-nums text-lg",children:(0,n.jsx)("span",{className:"text-red-700",children:(0,h.b)(null==e?void 0:e.eshop_price)})})]})}):null]})]})]})]})})})})]}):(0,n.jsxs)("div",{className:"text-center",children:[(0,n.jsx)("h1",{className:"text-xl text-bold",children:"Search Details"}),(0,n.jsxs)("h1",{className:"font-sans text-red-500",children:[Z," ",F," Search results..."]})]})}):(0,n.jsxs)("div",{className:"container mt-5 space-y-5 mx-auto",children:[T.length>0?el(T,"Printed Auction Live",M):null,X.length>0?el(X,"e Auction Live",H):null,el($,"e Shop",J),el(V,"Printed Auction",K),el(O,"e Auction",B)]})})}},22632:function(e,l){"use strict";let i=e=>{var l,i,n;let t=null==e?void 0:e.replace(/[^\w\s]/g," "),o=null===(l=null==t?void 0:t.toLowerCase())||void 0===l?void 0:l.replace(/\s+/g,"-");return null===(i=null===(n=null==o?void 0:o.replace(/[^a-zA-Z0-9-]/g,""))||void 0===n?void 0:n.replace(/-{2,}/g,"-"))||void 0===i?void 0:i.replace(/^-+|-+$/g,"")};l.Z=e=>{try{var l,n,t;let o="",s="",c=e.code,r=e.isLive,a=null==c?void 0:c.toString().slice(-4),d=null==a?void 0:a.toString(),u=parseInt(null===(l=parseInt(d,10))||void 0===l?void 0:l.toString()),v=parseInt(null==c?void 0:c.toString().substring(0,2)),h=e.auctiontype;if("all"===h)switch(v){case 10:h=1==r?"live-e-auction":"e-auction-archive";break;case 20:h=1==r?"live-p-auction":"p-auction-archive";break;case 30:h="e-shop"}if(1===e.type){for(let l of e.category)if(Array.isArray(l)&&(null==l?void 0:l.length)>0){let e=l[0];if("number"==typeof(null==e?void 0:e.id)&&"string"==typeof(null==e?void 0:e.category)&&(null===(n=e.cat_url)||void 0===n?void 0:n.length)>0){let l=i(null==e?void 0:e.cat_url);s+="".concat(l,"/")}}}else if(2===e.type){for(let l of e.category)if(Array.isArray(l)&&(null==l?void 0:l.length)>0){let e=l[0];if("number"==typeof(null==e?void 0:e.id)&&"string"==typeof(null==e?void 0:e.category)&&(null===(t=e.cat_url)||void 0===t?void 0:t.length)>0){let l=i(null==e?void 0:e.cat_url);s+="".concat(l,"/")}}}let p=i(e.title),g=s.substring(0,(null==s?void 0:s.length)-1);switch(h){case"p-auction-archive":o="/printed-auction/auction-no-".concat(e.auction,"/lot-no-").concat(u,"/").concat(g,"/").concat(p);break;case"e-auction-archive":o="/e-auction/auction-no-".concat(e.auction,"/lot-no-").concat(u,"/").concat(g,"/").concat(p);break;
1case"live-p-auction":o="/live-printed-auction/auction-no-".concat(e.auction,"/lot-no-").concat(u,"/").concat(g,"/").concat(p);break;case"live-e-auction":o="/live-e-auction/auction-no-".concat(e.auction,"/lot-no-").concat(u,"/").concat(g,"/").concat(p);break;case"e-shop":o="/e-shop/pid-no-".concat(u,"/").concat(g,"/").concat(p)}return o}catch(e){console.error(e)}return""}},85231:function(e,l,i){"use strict";var n=i(6154),t=i(29552);n.default.create({baseURL:"".concat(t.Z.BACKEND_URL_SERVER,"/api/main"),headers:{"Content-Type":"application/json"},withCredentials:!0})},88754:function(e,l,i){"use strict";i.d(l,{b:function(){return n}});let n=e=>{try{let l="";if("number"==typeof e?l=e.toString():"string"==typeof e&&(l=e),l.includes("-")){let[e,i]=l.split("-");return t(e)+"-"+t(i)}return t(l)}catch(e){return console.error("Error formatting number:",e),"-"}},t=e=>{try{let l="",i=0,[n,t]=e.split(".");for(let e=n.length-1;e>=0;e--)l=n[e]+l,i++,3===i&&e>0?l=","+l:i>3&&(i-3)%2==0&&e>0&&(l=","+l);return t&&(l+="."+t),l}catch(e){return console.error("Error formatting part of the number:",e),"-"}}},99034:function(e,l){"use strict";l.Z=e=>{let l=e.query;for(let e in l)null==l||delete l.aid,null==l||delete l.pid;return l}}},function(e){e.O(0,[9774,2888,179],function(){return e(e.s=13558)}),_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.