PageSourceSearch

https://pricelink.io/_next/static/chunks/9088.d95dd9d2bf8144ea.js

js pricelink.io collected 2026-10-01 15:43:50 UTC 6,053 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9088],{29088:function(e,t,l){l.r(t),l.d(t,{ResultsPhase:function(){return h}});var r=l(27573),n=l(7653),d=l(56967),s=l(97066),o=l(20054),i=l(53512),a=l(51733),c=l(95239),u=l(8418),x=l(8301),v=l(82924);function m(e,t){return(0,n.useMemo)(()=>{if(t)return t;if(!(null==e?void 0:e.length))return;let l=["productId",...e].join("\n");return"data:text/csv;charset=utf-8,".concat(encodeURIComponent(l))},[t,e])}let h=()=>{var e,t,l,h,p,y,f,g;let{status:j,lastUpload:w,clear:N,setIsLoading:b}=(0,u.G)();(0,n.useEffect)(()=>{((null==w?void 0:w.status)===x.D.DONE||(null==w?void 0:w.status)===x.D.ERROR||(null==w?void 0:w.status)===x.D.PARTIAL)&&b(!1)},[w,b]);let k=j===x.D.DONE,C=j===x.D.PARTIAL,P=j===x.D.ERROR,D=null!==(p=null==w?void 0:w.parsedCount)&&void 0!==p?p:0,Z=null!==(y=null==w?void 0:w.importedCount)&&void 0!==y?y:0,z=null!==(f=null==w?void 0:w.notFoundCount)&&void 0!==f?f:0,E=null!==(g=null==w?void 0:w.errorCount)&&void 0!==g?g:0,R=m(null==w?void 0:w.notFoundPreview,null==w?void 0:w.notFoundDownloadUrl),F=m(null==w?void 0:w.errorPreview,null==w?void 0:w.errorDownloadUrl),I=z>0||!!(null==w?void 0:null===(e=w.notFoundPreview)||void 0===e?void 0:e.length),A=E>0||!!(null==w?void 0:null===(t=w.errorPreview)||void 0===t?void 0:t.length),M=I||A;return(0,r.jsxs)(d.E.div,{initial:{opacity:0}
1,animate:{opacity:1},className:"space-y-5",children:[(0,r.jsxs)("div",{className:"text-center space-y-2",children:[k?(0,r.jsx)(s.Z,{className:"mx-auto text-green-500",size:48}):C?(0,r.jsx)(o.Z,{className:"mx-auto text-yellow-500",size:48}):(0,r.jsx)(i.Z,{className:"mx-auto text-destructive",size:48}),(0,r.jsx)(d.E.p,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},transition:{delay:.15},className:"text-lg font-semibold",children:k?"Scan complete":C?"Upload partially complete":"Upload failed"}),P&&(0,r.jsx)("p",{className:"text-sm text-destructive",children:(null==w?void 0:w.error)||"Something went wrong. Please try again or contact support."})]}),w&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("div",{className:"grid grid-cols-3 gap-3 text-center",children:[(0,r.jsx)(v.StatCard,{label:"Total",value:D}),(0,r.jsx)(v.StatCard,{label:"Imported",value:Z}),(0,r.jsx)(v.StatCard,{label:"Issues",value:z+E})]}),M&&(0,r.jsxs)("div",{className:"rounded-lg border border-foreground/20 dark:border-foreground/30 overflow-hidden",children:[I&&(0,r.jsxs)("div",{className:"p-3 space-y-2.5",children:[(0,r.jsxs)("div",{className:"flex items-center gap-2 rounded-md bg-yellow-100 dark:bg-yellow-900/40 px-3 py-2",children:[(0,r.jsx)(o.Z,{className:"h-4 w-4 text-yellow-600 dark:text-yellow-300 shrink-0"}),(0,r.jsxs)("div",{children:[(0,r.jsxs)("p",{className:"text-sm font-semibold text-yellow-800 dark:text-yellow-200",children:[z," products not found"]}),(0,r.jsx)("p",{className:"text-xs text-yellow-700 dark:text-yellow-300",children:"May be delisted, have incorrect IDs, or are not yet indexed."})]})]}),!!(null===(l=w.notFoundPreview)||void 0===l?void 0:l.length)&&(0,r.jsxs)("div",{className:"rounded-md border bg-background divide-y",children:[w.notFoundPreview.map(e=>(0,r.jsx)("div",{className:"px-3 py-1.5 text-xs font-mono text-muted-foreground truncate",children:e},e)),z>w.notFoundPreview.length&&(0,r.jsxs)("div",{className:"px-3 py-1.5 text-xs text-muted-foreground/50 italic",children:["+",z-w.notFoundPreview.length," more"]})]}),R&&(0,r.jsx)(c.z,{asChild:!0,variant:"outline",size:"sm",className:"w-full",children:(0,r.jsxs)("a",{href:R,download:"not-found-".concat(w.uploadId,".csv"),children:[(0,r.jsx)(a.Z,{className:"h-3.5 w-3.5 mr-2"}),"Download not-found list"]})})]}
1),I&&A&&(0,r.jsx)("div",{className:"border-t border-foreground/10"}),A&&(0,r.jsxs)("div",{className:"p-3 space-y-2",children:[(0,r.jsxs)("div",{className:"flex items-center gap-2",children:[(0,r.jsx)("span",{className:"inline-block h-2 w-2 rounded-full bg-destructive"}),(0,r.jsxs)("p",{className:"text-sm font-medium text-destructive",children:["Errors (",E,")"]})]}),(0,r.jsx)("p",{className:"text-xs text-muted-foreground",children:"These products could not be scanned due to a server error. You can retry these by uploading the error list."}),!!(null===(h=w.errorPreview)||void 0===h?void 0:h.length)&&(0,r.jsxs)("div",{className:"rounded-md border border-destructive bg-background divide-y divide-destructive/20",children:[w.errorPreview.map(e=>(0,r.jsx)("div",{className:"px-3 py-1.5 text-xs font-mono text-muted-foreground truncate",children:e},e)),E>w.errorPreview.length&&(0,r.jsxs)("div",{className:"px-3 py-1.5 text-xs text-muted-foreground/50 italic",children:["+",E-w.errorPreview.length," more"]})]}),F&&(0,r.jsx)(c.z,{asChild:!0,variant:"outline",size:"sm",className:"w-full border-destructive/30 text-destructive hover:bg-destructive/5",children:(0,r.jsxs)("a",{href:F,download:"errors-".concat(w.uploadId,".csv"),children:[(0,r.jsx)(a.Z,{className:"h-3.5 w-3.5 mr-2"}),"Download error list"]})})]})]})]}),(0,r.jsx)("div",{className:"flex justify-center",children:(0,r.jsx)(c.z,{onClick:()=>N(),children:"Upload new file"})})]})}},97066:function(e,t,l){l.d(t,{Z:function(){return r}});let r=(0,l(2389).Z)("CircleCheckBig",[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]])},53512:function(e,t,l){l.d(t,{Z:function(){return r}});let r=(0,l(2389).Z)("CircleX",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]])},51733:function(e,t,l){l.d(t,{Z:function(){return r}});let r=(0,l(2389).Z)("Download",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"7 10 12 15 17 10",key:"2ggqvy"}],["line",{x1:"12",x2:"12",y1:"15",y2:"3",key:"1vk2je"}]])},20054:function(e,t,l){l.d(t,{Z:function(){return r}});let r=(0,l(2389).Z)("TriangleAlert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]])}}]);

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.