PageSourceSearch

https://insights.trendscopes.ai/assets/index.default-2774561f.js

js trendscopes.ai collected 2026-10-05 14:03:12 UTC 3,227 bytes, 1 lines download raw bytes

1import{bT as P,j as e,b_ as v,c0 as w,c1 as E,b$ as L,c2 as _,eQ as O,bx as N,r as h,f as R,fT as k,D as M,F as j,T as A,o as D,S as G,K as g,J as z}from"./main-29867b87.js";import{u as V}from"./index-e247c779.js";import"./date-22f3f265.js";import"./hover-card-b3dd6b39.js";import{P as q}from"./product-card-27e3cd1a.js";import{u as f,b as y,c as F}from"./store-d9f39368.js";import{G as Z,b as u,d as B}from"./enum-8f04640d.js";import"./index-9e7aff73.js";import"./range-3d4c9cb5.js";import"./_isIterateeCall-a9d535cf.js";import"./parse-ff393092.js";import"./use-url-state-ef13820d.js";import"./goods-851b33da.js";import"./multi-d1724548.js";import"./data-convert-efd6f964.js";import"./more-filter-c0c51d46.js";import"./month-combobox-015b8b25.js";function H({onCountChange:r}){var x;const[a]=f(),[o]=y(),{data:i,loading:b,error:p,pagination:m}=V(async({current:n,pageSize:c})=>{const l=await P({...a,...F(a),search:a.text,text:void 0,goodsZoneType:Z.all,pageNo:n,pageSize:c});return r==null||r(l.resultCountMax??0),{list:(l==null?void 0:l.resultList)??[],total:(l==null?void 0:l.resultCount)??0}},{ready:!!a.industry,defaultPageSize:100,refreshDeps:[o],debounceWait:300,onError:()=>r==null?void 0:r(0)});return e.jsxs(v,{loading:b,error:p,empty:!((x=i==null?void 0:i.list)!=null&&x.length),children:[e.jsx(w,{}),e.jsx(E,{}),e.jsx(L,{}),e.jsx(_,{columnWidth:270,children:i==null?void 0:i.list.map((n,c)=>e.jsx(q,{data:n},c))}),e.jsx(O,{className:"mt-3",children:e.jsx(N,{total:m.total,current:m.current,onChange:(n,c)=>{m.onChange(n,c),window.scrollTo(0,0)},size:m.pageSize})})]})}const S=r=>[u.newArrivals,r.sale?u.maximumMonthlySales:null,r.comment?u.comment30Days:null,r.sale?u.mostSalesVolume:null,r.comment?u.mostReviews:null,u.priceHighToLow,u.priceLowToHigh].filter(a=>a!==null).map(a=>({label:B[a],value:a}));function ie(){var c,l;const[r,a]=h.useState(0),[o,i]=f(),[,b]=y(),[p,m]=h.useState({sale:!0,comment:!0}),{run:x}=R(k,{ready:!!((c=o.retailers)!=null&&c.length),manual:!0,onSuccess:s=>{m({sale:!!s.supportStorage,comment:!!s.supportComment})}});h.useEffect(()=>{var s,d;((s=o.retailers)==null?void 0:s.length)===1?x({platformTypeList:(d=o.retailers)==null?void 0:d.map(T=>T.at(-1))}):m({sale:!0,comment:!0})},[o.retailers]);const n=s=>{i({...o,...s}),b(d=>!d)};return e.jsxs(h.Suspense,{fallback:e.jsx(M,{}),children:[e.jsxs("div",{className:"mb-4 mt-8",children:[e.jsxs("div",{className:"pb-3 text-xl font-semibold uppercase",children:[t("text.search_result")," ",r?`(${r.toLocaleString()})`:""]}),e.jsxs(j,{align:"center",justify:"between",children:[e.jsx(A,{onValueChange:s=>{n({text:s})},value:o.text||"",className:"h-10 w-80  bg-background",placeholder:"Search products by name",children:e.jsx(D,{children:e.jsx(G,{size:20})})}),e.jsx(j,{children:e.jsxs(g,{value:o.sortType?o.sortType:void 0,onValueChange:s=>{s!=null&&n({sortType:s})},allowClear:!1,className:"h-10  bg-background",placeholder:t("placeholder.sort_by"),children:[e.jsx(z,{}),e.jsx(g.Display,{children:t("placeholder.sort_by")+" - "+((l=S(p).find(s=>s.value==o.sortType))==null?void 0:l.label)||""}),S(p).map(s=>e.jsx(g.Option,{value:s.value,children:s.label},s.value))]})})]})]}),e.jsx(H,{onCountChange:s=>{a(s)}})]})}export{ie as default};

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.