PageSourceSearch

https://pricelink.io/_next/static/chunks/5984.edb9ce0d9bdda366.js

js pricelink.io collected 2026-10-01 15:43:24 UTC 7,556 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5984],{75984:function(e,a,s){s.r(a),s.d(a,{SelectFilePhase:function(){return F}});var t,r,i=s(27573),l=s(7653),n=s(36120),o=s(64357),c=s(56967),d=s(44687),m=s(58154),u=s(18995),x=s(95239),p=s(31047),f=s(77992),h=s(8418),g=s(8930),b=s(40841),j=s(95961),v=s(71463),w=s(54689),C=s(29986),N=s(51733);let y=()=>{let{theme:e}=(0,w.F)();return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("p",{className:"text-sm text-muted-foreground",children:"Each newline must contain a product identifier which can be represented as UPC, ID or a direct Walmart product link and cost (optional) columns."}),(0,i.jsx)("p",{className:"text-xs mt-4",children:"If headers such as: Walmart ID, UPC, LINK, COST provided - column mapping will be automated"}),(0,i.jsxs)(v.ScrollArea,{className:(0,C.cn)("rounded-md whitespace-nowrap border p-4 mt-2",{"bg-slate-50":"light"===e}),children:[(0,i.jsx)("span",{className:"text-sm",children:"Walmart ID, Cost, Provider url"}),(0,i.jsx)("br",{}),(0,i.jsx)("span",{className:"text-sm",children:"12511100931, 39, https://www.amazon.com/Amazon-Basics-Compatible-Adaptive-Response/dp/B0CP7SV7XV"}),(0,i.jsx)("br",{}),(0,i.jsx)(v.ScrollBar,{orientation:"horizontal"})]}),(0,i.jsx)(x.z,{asChild:!0,className:"mt-2",variant:"outline",children:(0,i.jsxs)("a",{href:"/example.csv",target:"_blank",children:[(0,i.jsx)(N.Z,{className:"mr-2",size:18}),"Download CSV File Example"]})})]})},S=()=>(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("p",{className:"text-sm text-muted-foreground",children:"Each row must contain a product identifier which can be represented as Walmart ID, UPC or a direct Walmart product link and cost, providerUrl (optional) columns."}),(0,i.jsx)("p",{className:"text-xs mt-4",children:"If headers such as: Walmart ID, UPC, LINK, COST provided - column mapping will be automated"}),(0,i.jsx)(x.z,{asChild:!0,className:"mt-4",variant:"outline",children:(0,i.jsxs)("a",{href:"/example.xlsx",target:"_blank",children:[(0,i.jsx)(N.Z,{className:"mr-2",size:18}),"Download Excel File Example"]})})]});var T=s(29053);let V=()=>(0,i.jsxs)(T.Accordion,{type:"single",collapsible:!0,className:"w-full",children:[(0,i.jsxs)(T.AccordionItem,{value:"csv",children:[(0,i.jsx)(T.AccordionTrigger,{children:"CSV File Template"}),(0,i.jsx)(T.AccordionContent,{children:(0,i.jsx)(y,{})})]}),(0,i.jsxs)(T.AccordionItem,{value:"xlsx",children:[(0,i.jsx)(T.AccordionTrigger,{children:"Excel File Template"}),(0,i.jsx)(T.AccordionContent,{children:(0,i.jsx)(S,{})})]})]});var E=s(66681);(t=r||(r={})).FILE="file",t.PASTE="paste";let F=()=>{let{file:e,setFile:a,setProgress:s,setStatus:t,setErrors:r,setTotalRows:v,setPreviewRows:w,setRows:C,setIsLoading:N,previewRows:y,totalRows:S,hasValidationErrors:T,status:F}=(0,h.G)(),[k,I]=(0,l.useState)("file"),[z,A]=(0,l.useState)(""),{basicValidation:P}=(0,b.wt)(),{previewCsvFile:D,previewXlsxFile:B}=(0,b._h)(),K=(0,l.useCallback)(async e=>{let i;a(e),t(g.KF.BasicValidation),s(50),N(!0);let l=e.name,{error:n}=f.dm.safeParse(l);if(n){r([{message:n.issues[0].message}]),N(!1);return}switch(e.type){case g.hd.CSV:i=await D(e,j.AQ);break;case g.hd.EXCEL:i=await B(e,j.AQ)}if(!i){r([{message:"Could not parse file preview. Please verify your CSV format."}]),N(!1);return}C(i.rows);let o=P({file:e,total:i.total});if(o.length){r(o),N(!1);return}w(i.preview),v(i.total),t(g.KF.ColumnRows),s(0),N(!1)},[a,t,s,N,r,D,B,C,P,w,v]),_=(0,l.useCallback)(async e=>{if(0===e.length){r([{message:"File is too large or incompatible format"}]),t(g.KF.BasicValidation);return}await K(e[0])},[K,r,t]),U=(0,l.useCallback)(async()=>{if(!z.trim()){r([{message:"Paste CSV text before continuing."}]),t(g.KF.BasicValidation);return}let e=new File([z],"pasted-products-".concat(Date.now(),".csv"),{type:g.hd.CSV});await K(e)},[z,K,r,t]),{getRootProps:L,getInputProps:R,isDragActive:W}=(0,d.uI)({onDrop:_,accept:{[g.hd.CSV]:[".csv"],[g.hd.EXCEL]:[".xlsx"]},multiple:!1,maxFiles:1,maxSize:f.aW.MAX_SIZE_BYTES}),X=F===g.KF.Idle||void 0===F,Z=F===g.KF.BasicValidation&&T,Y=F===g.KF.ColumnRows;return(0,i.jsx)(p.mN,{rows:y,total:S,children:(0,i.jsxs)(o.M,{mode:"wait",children:[X&&(0,i.jsxs)(c.E.div,{initial:{opacity:0}
1,animate:{opacity:1},exit:{opacity:0},children:[(0,i.jsx)(V,{}),(0,i.jsxs)(m.Tabs,{value:k,onValueChange:e=>I(e),className:"mt-4",children:[(0,i.jsxs)(m.TabsList,{className:"w-full",children:[(0,i.jsx)(m.TabsTrigger,{className:"w-full",value:"file",children:"Upload File"}),(0,i.jsx)(m.TabsTrigger,{className:"w-full",value:"paste",children:"Paste CSV"})]}),(0,i.jsx)(m.TabsContent,{value:"file",children:(0,i.jsxs)("div",{className:"mt-3 min-h-[180px] flex flex-col justify-center border-2 border-dashed rounded-lg p-6 text-center cursor-pointer transition-colors hover:border-primary ".concat(W?"border-primary bg-primary/5":"border-muted"),...L(),children:[(0,i.jsx)("input",{...R()}),(0,i.jsx)(n.Z,{className:"mx-auto text-muted-foreground mb-3",size:40}),(0,i.jsx)("p",{className:"text-sm text-muted-foreground",children:W?"Drop the file here":"Drag 'n' drop a CSV or Excel file, or click to browse"}),e&&(0,i.jsx)("p",{className:"mt-2 text-xs text-muted-foreground",children:e.name})]})}),(0,i.jsx)(m.TabsContent,{value:"paste",children:(0,i.jsxs)("div",{className:"space-y-3 mt-3",children:[(0,i.jsx)(u.g,{value:z,onChange:e=>A(e.target.value),className:"min-h-[160px] font-mono text-sm",placeholder:"id,price,sourceUrl\n123456789012,12.99,https://example.com/item"}),(0,i.jsx)(x.z,{onClick:U,size:"sm",children:"Use pasted CSV"})]})})]})]},"dropzone"),Z&&(0,i.jsx)(c.E.div,{initial:{opacity:0}
1,animate:{opacity:1},exit:{opacity:0},children:(0,i.jsx)(E.q,{})},"basic-errors"),Y&&(0,i.jsx)(c.E.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},children:(0,i.jsx)(p.B5,{})},"header-rows")]})})}},58154:function(e,a,s){s.r(a),s.d(a,{Tabs:function(){return n},TabsContent:function(){return d},TabsList:function(){return o},TabsTrigger:function(){return c}});var t=s(27573),r=s(7653),i=s(84132),l=s(29986);let n=i.fC,o=r.forwardRef((e,a)=>{let{className:s,...r}=e;return(0,t.jsx)(i.aV,{ref:a,className:(0,l.cn)("inline-flex h-9 items-center justify-center rounded-lg bg-muted p-1 text-muted-foreground",s),...r})});o.displayName=i.aV.displayName;let c=r.forwardRef((e,a)=>{let{className:s,...r}=e;return(0,t.jsx)(i.xz,{ref:a,className:(0,l.cn)("inline-flex items-center justify-center whitespace-nowrap rounded-md px-3 py-1 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow",s),...r})});c.displayName=i.xz.displayName;let d=r.forwardRef((e,a)=>{let{className:s,...r}=e;return(0,t.jsx)(i.VY,{ref:a,className:(0,l.cn)("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",s),...r})});d.displayName=i.VY.displayName},18995:function(e,a,s){s.d(a,{g:function(){return l}});var t=s(27573),r=s(7653),i=s(29986);let l=r.forwardRef((e,a)=>{let{className:s,...r}=e;return(0,t.jsx)("textarea",{className:(0,i.cn)("flex min-h-[60px] w-full rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-sm placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",s),ref:a,...r})});l.displayName="Textarea"}}]);

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.