PageSourceSearch

https://app.datapinter.com/_next/static/chunks/pages/app/alibaba/category-da825ad373ae9d55.js

js datapinter.com collected 2026-10-02 00:02:56 UTC 24,768 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4663],{57186:(e,s,t)=>{"use strict";let l;t.d(s,{A:()=>i});let a={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)},r=new Uint8Array(16),n=[];for(let e=0;e<256;++e)n.push((e+256).toString(16).slice(1));let i=function(e,s,t){if(a.randomUUID&&!s&&!e)return a.randomUUID();let i=(e=e||{}).random||(e.rng||function(){if(!l&&!(l="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)))throw Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return l(r)})();if(i[6]=15&i[6]|64,i[8]=63&i[8]|128,s){t=t||0;for(let e=0;e<16;++e)s[t+e]=i[e];return s}return function(e,s=0){return n[e[s+0]]+n[e[s+1]]+n[e[s+2]]+n[e[s+3]]+"-"+n[e[s+4]]+n[e[s+5]]+"-"+n[e[s+6]]+n[e[s+7]]+"-"+n[e[s+8]]+n[e[s+9]]+"-"+n[e[s+10]]+n[e[s+11]]+n[e[s+12]]+n[e[s+13]]+n[e[s+14]]+n[e[s+15]]}(i)}},65412:(e,s,t)=>{"use strict";t.d(s,{A:()=>n});var l=t(37876),a=t(55102),r=t(32057);let n=e=>{let{show:s,message:t,marketplace:n}=e,i=(0,r.GV)(e=>e.tokopedia),o=(0,r.GV)(e=>e.shopee),c=(0,r.GV)(e=>e.lazada),d=(0,r.GV)(e=>e.tiktok),m=(0,r.GV)(e=>e.toco),p=(0,r.GV)(e=>e.blibli),u=(0,r.GV)(e=>e.amazon),x=(0,r.GV)(e=>e.temu),h=(0,r.GV)(e=>e.alibaba),b=(0,r.GV)(e=>e.radar),g=(0,r.GV)(e=>e.storeResearch),f=(0,r.GV)(e=>e.productResearch),j=(0,r.GV)(e=>e.categoryResearch),y=(0,r.GV)(e=>e.sentimentAnalysis);return!s||(()=>{if(!n)return!1;switch(n){case"tokopedia":return i.products.length>0||i.storeProducts.products.length>0||i.stores.length>0;case"shopee":return o.items.length>0||o.stores.length>0||o.keywordSuggestions.length>0;case"lazada":return c.items.length>0||c.stores.length>0;case"tiktok":return d.items.length>0||d.stores.length>0;case"toco":return m.items.length>0||m.stores.length>0;case"blibli":return p.items.length>0||p.stores.length>0;case"storeResearch":return g.stores.length>0;case"productResearch":return f.items.length>0;case"categoryResearch":return j.items.length>0;case"sentimentAnalysis":return y.stores.length>0;case"amazon":return u.products.length>0||u.storeProducts.products.length>0||u.stores.length>0;case"temu":return x.items.length>0||x.stores.length>0;case"alibaba":return h.items.length>0;case"radar":return b.products.length>0;default:return!1}})()?null:(0,l.jsxs)("div",{className:"absolute right-0 top-full z-10 mt-4 w-[calc(100vw-2rem)] max-w-[350px] animate-in fade-in slide-in-from-top-1 duration-200 md:bottom-full md:top-auto md:mb-4 md:mt-0 md:w-auto md:slide-in-from-bottom-1",children:[(0,l.jsxs)("div",{className:"inline-flex w-full items-start gap-2 rounded-lg bg-orange-500 px-4 py-2 text-white shadow-lg md:w-[350px]",children:[(0,l.jsx)("div",{className:"flex-shrink-0 py-2",children:(0,l.jsx)(a.uJ3,{className:"md:w-7 md:h-7 w-6 h-6"})}),(0,l.jsx)("p",{className:"md:text-sm text-xs leading-relaxed",children:t})]}),(0,l.jsx)("div",{className:"absolute -top-2 right-8 h-0 w-0 border-x-8 border-b-8 border-x-transparent border-b-orange-500 md:-bottom-2 md:top-auto md:border-b-0 md:border-t-8 md:border-t-orange-500"})]})}},65798:(e,s,t)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/app/alibaba/category",function(){return t(83039)}])},83039:(e,s,t)=>{"use strict";t.r(s),t.d(s,{default:()=>es});var l=t(37876),a=t(69241),r=t(14232),n=t(94085),i=t(34846),o=t(80807),c=t(55102),d=t(57186);let m=JSON.parse('[{"sortIds":"","label":"All categories"},{"sortIds":"13","label":"Construction & Real Estate"},{"sortIds":"1420","label":"Tools & Hardware"},{"sortIds":"15","label":"Home & Garden"},{"sortIds":"1503","label":"Furniture"},{"sortIds":"1524","label":"Luggage, Bags & Cases"},{"sortIds":"16","label":"Health & Medical"},{"sortIds":"17","label":"Gifts & Crafts"},{"sortIds":"18","label":"Sports & Entertainment"},{"sortIds":"23","label":"Packaging & Printing"},{"sortIds":"26","label":"Toys & Hobbies"},{"sortIds":"2829","label":"Service Equipment"},{"sortIds":"3","label":"Apparel"},{"sortIds":"30","label":"Security & Protection"},{"sortIds":"322","label":"Shoes & Accessories"},{"sortIds":"34","label":"Vehicles & Accessories"},{"sortIds":"202014504","label":"Vehicle Accessories, Electronics, & Tools"},{"sortIds":"36","label":"Timepieces, Jewelry, Eyewear"},{"sortIds":"39","label":"Lights & Lighting"},{"sortIds":"43","label":"Machinery"},{"sortIds":"44","label":"Consumer Electronics"},{"sortIds":"5","label":"Electrical Equipment & Supplies"},{"sortIds":"502","label":"Electronic Components, Accessories & Telecommunications"},{"sortIds":"6","label":"Home Appliances"},{"sortIds":"66","label":"Beauty & Personal Care"},{"sortIds":"80","label":"Rubber & Plastics"},{"sortIds":"9","label":"Minerals & Metallurgy"},{"sortIds":"201725504","label":"Material Handling"},{"sortIds":"2","label":"Food & Beverage"},{"sortIds":"201946504","label":"Pet Supplies"},{"sortIds":"21","label":"Office & School Supplies"},{"sortIds":"4","label":"Fabric & Textile Raw Material"},{"sortIds":"41","label":"Fabrication Services"},{"sortIds":"8","label":"Chemicals"}]'),p=JSON.parse('[{"sortIds":"","label":"All"},{"sortIds":"26","label":"Mother, Kids & Toys"},{"sortIds":"100002908","label":"Health Care"},{"sortIds":"17","label":"Gifts & Crafts"},{"sortIds":"1524","label":"Luggage, Bags & Cases"},{"sortIds":"3","label":"Apparel & Accessories"},{"sortIds":"44","label":"Consumer Electronics"},{"sortIds":"8","label":"Chemicals"},{"sortIds":"34","label":"Vehicle Parts & Accessories"},{"sortIds":"23","label":"Packaging & Printing"},{"sortIds":"39","label":"Lights & Lighting"},{"sortIds":"15","label":"Home & Garden"},{"sortIds":"66","label":"Beauty"},{"sortIds":"201951502","label":"Personal Care & Household Cleaning"},{"sortIds":"18","label":"Sports & Entertainment"},{"sortIds":"36","label":"Jewelry, Eyewear, Watches & Accessories"},{"sortIds":"322","label":"Shoes & Accessories"},{"sortIds":"6","label":"Home Appliances"},{"sortIds":"201946504","label":"Pet Supplies"},{"sortIds":"1503","label":"Furniture"},{"sortIds":"1420","label":"Tools & Hardware"},{"sortIds":"16","label":"Medical devices & Supplies"},{"sortIds":"1","label":"Agriculture"},{"sortIds":"28","label":"Business Services"},{"sortIds":"2829","label":"Commercial Equipment & Machinery"},{"sortIds":"201943703","label":"Construction & Building Machinery"},{"sortIds":"13","label":"Construction & Real Estate"},{"sortIds":"5","label":"Electrical Equipment & Supplies"},{"sortIds":"502","label":"Electronic Components, Accessories & Telecommunications"},{"sortIds":"11","label":"Environment"},{"sortIds":"4","label":"Fabric & Textile Raw Material"},{"sortIds":"41","label":"Fabrication Services"},{"sortIds":"2","label":"Food & Beverage"},{"sortIds":"43","label":"Industrial Machinery"},{"sortIds":"201725504","label":"Material Handling"},{"sortIds":"9","label":"Metals & Alloys"},{"sortIds":"201723202","label":"Power Transmission"},{"sortIds":"201726502","label":"Renewable Energy"},{"sortIds":"80","label":"Rubber & Plastics"},{"sortIds":"201727804","label":"Safety"},{"sortIds":"21","label":"School & Office Supplies"},{"sortIds":"30","label":"Security"},{"sortIds":"201734802","label":"Testing Instrument & Equipment"},{"sortIds":"201275273","label":"Vehicles & Transportation"}]');var u=t(36315),x=t(28509),h=t(10596),b=t(68264),g=t(45632),f=t(99253),j=t(10352),y=t(49038),w=t(1412),v=t(24146),I=t(96356),N=t(66
1588),_=t(21365),A=t(35180),k=t(64876),z=t(71309),C=t(29868),S=t(65412),R=t(94978),E=t(14883),P=t(78575);let V=[{value:"launches",labelKey:"alibaba_tab_launches",tooltipKey:"alibaba_tab_launches_tooltip"}],F=e=>{var s;let{tab:t,onTabChange:n,onFetch:c,fetching:d,categories:m,selectedCategory:p,onCategoryChange:u,onRefreshCategories:x}=e,{t:h}=(0,i.Bd)("market_research"),[b,g]=(0,r.useState)(!1),[f,j]=(0,r.useState)(!1),[F,G]=(0,r.useState)(""),[T,H]=(0,r.useState)(p||null),[L,M]=(0,r.useState)(!!p),D=(0,r.useRef)(null),B=(0,r.useRef)(null),U=(0,r.useRef)(null);(0,R.A)(D,()=>g(!1)),(0,R.A)(B,()=>{j(!1),G(""),H(p||null)});let J=p?m.find(e=>e.sortIds===p):null;J?J.label:h("choose_category");let K=m.find(e=>""===e.sortIds),O=F.trim()?m.filter(e=>""!==e.sortIds&&e.label.toLowerCase().includes(F.toLowerCase())):m.filter(e=>""!==e.sortIds),q=()=>{u(null!=T?T:""),M(!0),j(!1),G("")},X=()=>{H(null),M(!1),u("")};return(0,l.jsxs)(k.A,{children:[(0,l.jsx)(z.A,{items:[{label:h("market_research"),path:"/app"},{label:h("category_research"),path:"/app/alibaba/category"}]}),(0,l.jsx)(C.A,{image:"/icons/category.png",title:h("category_research"),token:"1",description:h("find_niche_product_ideas")}),(0,l.jsxs)("div",{className:"grid sm:flex w-full gap-2",children:[(0,l.jsx)(E.A,{platform:"alibaba",paths:[{platform:"shopee",path:"/app/shopee/category"},{platform:"tiktok",path:"/app/tiktok/category"},{platform:"tokopedia",path:"/app/tokopedia/category"},{platform:"lazada",path:"/app/lazada/category"},{platform:"blibli",path:"/app/blibli/category"},{platform:"amazon",path:"/app/amazon/category"},{platform:"temu",path:"/app/temu/category"},{platform:"alibaba",path:"/app/alibaba/category"}]}),(0,l.jsx)(P.A,{}),(0,l.jsxs)("div",{className:"relative flex flex-col gap-2 md:gap-2 md:flex-row w-full order-1 md:order-none min-w-0",children:[(0,l.jsxs)("div",{className:"flex flex-1 min-w-0 gap-2",ref:B,children:[(0,l.jsxs)("div",{className:"relative flex min-w-0 flex-1 items-center rounded-lg border border-zinc-200 bg-white shadow-sm focus-within:border-orange-500",children:[(0,l.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,l.jsxs)("div",{onClick:()=>{if(!d&&m.length>0){let e=!f;j(e),e&&(H(p||null),G(""),setTimeout(()=>{var e;return null==(e=U.current)?void 0:e.focus()},100))}},className:(0,a.A)("rounded-l-lg border-0 p-2 flex items-center w-full md:h-[41px] cursor-pointer select-none bg-white transition-colors",f?"border-orange-500 ring-orange-500 z-10 relative":"border-zinc-200",m.length>0&&!d?"cursor-pointer":"cursor-not-allowed opacity-50"),children:[J?(0,l.jsx)("div",{className:"flex-1 flex items-center gap-1 overflow-hidden",children:(0,l.jsx)("span",{className:"inline-block max-w-[200px] md:max-w-xs px-2 py-0.5 rounded-md text-xs font-medium bg-orange-50 text-orange-500 border border-orange-500 truncate",children:J.label})}):(0,l.jsx)("span",{className:"text-zinc-500 text-sm flex-1 min-w-0 truncate",children:h("choose_category")}),(0,l.jsx)("div",{className:"ml-auto",children:(0,l.jsx)(I.zrT,{className:(0,a.A)("text-zinc-500 h-5 w-5 transition-transform",f&&"rotate-180")})})]}),f&&(0,l.jsxs)("div",{className:"absolute left-0 right-0 top-full mt-2 z-50 hidden bg-white border border-zinc-200 rounded-md shadow-lg text-sm md:block",children:[(0,l.jsx)("div",{className:"px-4 py-2 sticky top-0 bg-white z-10",children:(0,l.jsxs)("div",{className:"relative",children:[(0,l.jsx)(I.qbB,{className:"absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-zinc-400"}),(0,l.jsx)("input",{ref:U,type:"text",placeholder:h("search_category"),className:"text-sm w-full pl-10 pr-4 py-2 border focus:ring-zinc-200 focus:border-zinc-200 border-zinc-200 rounded-md",value:F,onChange:e=>G(e.target.value),onClick:e=>e.stopPropagation()}),F&&(0,l.jsx)("button",{type:"button",className:"absolute right-3 top-1/2 -translate-y-1/2",onClick:()=>G(""),children:(0,l.jsx)(I.SXS,{className:"h-4 w-4 text-zinc-400"})})]})}),0===m.length?(0,l.jsx)("p",{className:"text-sm text-zinc-400 text-center py-6 px-4",children:h("no_categories_for_tab")}):(0,l.jsxs)("div",{className:"max-h-[280px] overflow-y-auto py-1 scrollbar-thin",children:[!F.trim()&&K&&(0,l.jsxs)("div",{onClick:()=>H(""),className:(0,a.A)("px-4 py-2.5 cursor-pointer flex items-center gap-3 text-sm transition-colors",""===T?"bg-orange-50 text-orange-600 font-medium":"text-zinc-700 hover:bg-zinc-50"),children:[(0,l.jsx)("div",{className:(0,a.A)("w-3.5 h-3.5 rounded-full border-2 flex-shrink-0 flex items-center justify-center",""===T?"border-orange-500 bg-orange-500":"border-zinc-300"),children:""===T&&(0,l.jsx)("div",{className:"w-1.5 h-1.5 rounded-full bg-white"})}),K.label]}),O.length>0?O.map(e=>(0,l.jsxs)("div",{onClick:()=>H(e.sortIds),className:(0,a.A)("px-4 py-2.5 cursor-pointer flex items-center gap-3 text-sm transition-colors",T===e.sortIds?"bg-orange-50 text-orange-600 font-medium":"text-zinc-700 hover:bg-zinc-50"),children:[(0,l.jsx)("div",{className:(0,a.A)("w-3.5 h-3.5 rounded-full border-2 flex-shrink-0 flex items-center justify-center",T===e.sortIds?"border-orange-500 bg-orange-500":"border-zinc-300"),children:T===e.sortIds&&(0,l.jsx)("div",{className:"w-1.5 h-1.5 rounded-full bg-white"})}),e.label]},e.sortIds)):(0,l.jsx)("p",{className:"text-sm text-zinc-400 text-center py-6 px-4",children:h("no_categories_for_tab")})]}),(0,l.jsxs)("div",{className:"sticky bottom-0 bg-white border-t border-zinc-200 px-4 py-3 flex items-center justify-between z-20",children:[(0,l.jsxs)("button",{type:"button",onClick:()=>{j(!1),G(""),x()},disabled:d,className:"flex items-center gap-1.5 text-sm font-medium text-zinc-500 hover:text-zinc-700 disabled:opacity-50 disabled:cursor-not-allowed",children:[d?(0,l.jsx)(o.PSR,{className:"animate-spin"}):(0,l.jsx)(v.UF6,{}),h("refresh_categories")]}),(0,l.jsxs)("div",{className:"flex items-center gap-2",children:[(0,l.jsx)("button",{type:"button",className:"px-4 py-2 md:text-sm text-xs font-medium text-zinc-700 bg-white border border-zinc-300 rounded-md hover:bg-zinc-50",onClick:X,children:h("reset")}),(0,l.jsx)("button",{type:"button",className:"px-4 py-2 md:text-sm text-xs font-medium text-white bg-orange-500 rounded-md hover:bg-orange-600 disabled:opacity-50 disabled:cursor-not-allowed",onClick:q,disabled:null===T,children:h("apply")})]})]})]})]}),(0,l.jsx)("div",{className:"shrink-0 border-l border-zinc-200",children:(0,l.jsx)(N.b,{scope:"alibaba:category",disabled:d,className:"w-28 rounded-none border-0 bg-transparent py-0 px-2 text-sm text-zinc-700 focus:ring-0 disabled:opacity-60 cursor-pointer"})})]}),(0,l.jsx)(_.A,{open:f,nodes:m.map(e=>({id:e.sortIds,label:e.label,parentId:null})),selectedIds:null===T?[]:[T],onSelect:e=>H(e.id),onClose:()=>{j(!1),H(p||null)},onReset:X,onApply:q,canApply:null!==T,heading:h("choose_category"),searchPlaceholder:h("search_category"),resetLabel:h("reset"),applyLabel:h("apply"),noResultsLabel:h("no_categories_for_tab")}),(0,l.jsxs)("div",{className:"relative flex-shrink-0",children:[(0,l.jsx)(A.A,{className:"flex items-center justify-center rounded-lg h-full whitespace-nowrap",disabled:d||!L,onClick:c,children:d?(0,l.jsx)(o.PSR,{className:"animate-spin"}):(0,l.jsxs)("div",{className:"flex items-center gap-2",children:[(0,l.jsx)("span",{children:h("search")}),(0,l.jsx)(y.KSO,{})]})}
1),(0,l.jsx)(S.A,{show:L&&!d,message:h("search_tooltip"),marketplace:"alibaba"})]})]}),(0,l.jsxs)("div",{className:"relative flex-shrink-0 md:min-w-[160px] min-w-0",ref:D,children:[(0,l.jsxs)("div",{onClick:()=>!d&&g(!b),className:(0,a.A)("text-sm font-medium flex gap-2 items-center justify-between border border-zinc-200 rounded-lg p-2.5 cursor-pointer hover:bg-zinc-50 select-none bg-white",d&&"opacity-50 cursor-not-allowed"),children:[(0,l.jsxs)("div",{className:"flex items-center gap-2",children:[(0,l.jsx)(I.y_E,{className:"text-zinc-800 w-4 h-4"}),(0,l.jsx)("span",{className:"whitespace-nowrap",children:h((null==(s=V.find(e=>e.value===t))?void 0:s.labelKey)||"alibaba_tab_launches")})]}),(0,l.jsx)("svg",{className:(0,a.A)("w-4 h-4 text-zinc-400 transition-transform duration-200",b&&"rotate-180"),fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,l.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})]}),b&&(0,l.jsxs)("div",{className:"absolute left-0 top-full mt-1 shadow-lg w-full min-w-[160px] bg-white border border-zinc-200 rounded-lg z-20 overflow-hidden",children:[(0,l.jsxs)("div",{className:"px-4 py-3 bg-zinc-50",children:[(0,l.jsx)("h3",{className:"text-sm font-semibold text-zinc-700",children:h("alibaba_tab_label")}),(0,l.jsx)("p",{className:"text-xs text-zinc-500 mt-0.5",children:h("alibaba_tab_label_desc")})]}),(0,l.jsx)("div",{className:"py-2 px-2",children:V.map(e=>(0,l.jsxs)("div",{onClick:()=>{n(e.value),g(!1)},"data-tooltip-id":"global-tooltip","data-tooltip-content":h(e.tooltipKey),"data-tooltip-place":"left",className:(0,a.A)("px-3 py-2.5 mb-1 text-sm flex items-center justify-between transition-colors rounded-md cursor-pointer group",e.value===t?"bg-orange-50 text-orange-600 font-medium":"text-zinc-700 hover:bg-orange-50/55"),children:[(0,l.jsx)("span",{children:h(e.labelKey)}),(0,l.jsx)(w.NiB,{className:"w-4 h-4 text-zinc-400 hover:text-zinc-500 transition-colors flex-shrink-0"})]},e.value))})]})]})]})]}),(0,l.jsx)(N.A,{scope:"alibaba:category"})]})};var G=t(12584),T=t(89686),H=t(76994),L=t(89390),M=t(962),D=t(39296),B=t(96867),U=t(76237),J=t(31449),K=t(32420),O=t(71391),q=t(4766),X=t(80879),Q=t(98748),W=t(59212),Y=t(32057),$=t(49138);let Z={trends:"https://sale.alibaba.com/p/db971rh77/index.html",launches:"https://sale.alibaba.com/p/new_launches/index.html"},ee={trends:p,launches:m},es=()=>{let{t:e}=(0,i.Bd)("market_research"),s=(0,Y.jL)(),{newArrivalTab:t,newArrivalFetching:m,newArrivalCategories:p,selectedNewArrivalCategory:y,showPaywall:w,fnError:v,cardSort:I,blacklist:N,deliveryId:_,pageDeduplicateId:z,newArrivalCategoryPage:S,newArrivalCategoryIsEnd:R,newArrivalCategoryNextCursor:E,newArrivalCategoryFetching:P}=(0,Y.GV)(e=>e.alibaba),V=(0,Y.GV)(Q.JQ),{premium:es}=(0,Y.GV)(e=>e.user),[et]=X.R.useLazyCategoryProductQuery(),[el]=X.R.useLazyNewArrivalQuery(),[ea,er]=(0,r.useState)(n.Fr?"card":"table"),[en,ei]=(0,r.useState)([]),[eo,ec]=(0,r.useState)([]),[ed,em]=(0,r.useState)(""),ep=(0,r.useRef)(!1),eu=(0,r.useRef)(!1),ex=(0,r.useRef)(!1),[eh,eb]=(0,r.useState)(!1),eg=(0,r.useRef)(!1);(0,r.useEffect)(()=>{let e=window.matchMedia("(max-width: 767px)").matches;(n.Fr||e)&&er("card")},[]);let ef=(0,r.useMemo)(()=>V.filter(e=>(""===ed||[e.name,e.storeName,e.location].some(e=>String(null!=e?e:"").toLowerCase().includes(ed.toLowerCase())))&&en.every(s=>{let t=(0,U.T0)(e,s.id);return t>=s.min&&t<=s.max})),[V,en,ed]),ej=ef.filter(e=>!N.includes(e.id)).length,ey=m||P,ew=async e=>{if(!ep.current){s((0,Q.__)(!0));try{var t,l,a;let r=await el({url:Z[e],uuid:(0,d.A)()}).unwrap();if(r.categories.length>0&&s((0,Q.Yp)(r.categories)),(r.deliveryId||r.pageDeduplicateId)&&s((0,Q.ey)({deliveryId:null!=(t=r.deliveryId)?t:"",pageDeduplicateId:null!=(l=r.pageDeduplicateId)?l:""})),!ex.current){let e=(null!=(a=r.result)?a:[]).map(Q.rE);s((0,Q.al)(e)),s((0,Q._C)(!r.isPremium))}ex.current=!1,s((0,$.Jt)())}catch(e){s((0,Q.Nh)(!0))}finally{s((0,Q.__)(!1))}}},ev=async function(e,t,l){let a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:(0,W._$)("alibaba:category"),r=arguments.length>4?arguments[4]:void 0;if(!eu.current){s((0,Q.ie)(!0));try{let n=await et({tab:e,categoryIds:t,pageNo:l,deliveryId:_||void 0,pageDeduplicateId:z||void 0,amount:a,cursor:r}).unwrap();s((0,Q.al)(n.items.map(Q.rE))),s((0,Q.X5)(n.isEnd)),s((0,Q.DM)(n.nextCursor)),s((0,Q.FR)(n.nextPage)),s((0,Q._C)(!(null==es?void 0:es.categoryResearchSupport))),s((0,$.Jt)())}catch(e){s((0,Q.Nh)(!0))}finally{s((0,Q.ie)(!1))}}},eI=e=>{s((0,Q.Yp)(ee[e]))};(0,r.useEffect)(()=>{ep.current=m},[m]),(0,r.useEffect)(()=>{eu.current=P},[P]);let eN=V.length>0&&!v&&!w&&!R;return(0,r.useEffect)(()=>(eI(t),()=>{s((0,Q.x7)())}),[]),(0,l.jsx)(O.A,{children:(0,l.jsxs)("div",{className:"grid gap-4",children:[(0,l.jsx)(F,{tab:t,onTabChange:e=>{e!==t&&(ep.current=!1,eu.current=!1,ex.current=!1,eg.current=!1,eb(!1),s((0,Q.x7)()),s((0,Q.SH)()),s((0,Q.Zd)(e)),s((0,Q.x8)("")),eI(e))},onFetch:()=>{eg.current=!0,eb(!0),""!==y?(ep.current=!1,eu.current=!1,s((0,Q.x7)()),s((0,Q.SH)()),s((0,Q.FR)(1)),s((0,Q.X5)(!1)),ev(t,y,1)):V.length>0||(ep.current=!1,eu.current=!1,s((0,Q.x7)()),s((0,Q.SH)()),ew(t))},fetching:ey,categories:p,selectedCategory:y,onCategoryChange:e=>{s((0,Q.x8)(e)),eg.current&&(ep.current=!1,eu.current=!1,s((0,Q.x7)()),s((0,Q.SH)()),""===e&&"launches"===t?ew(t):(s((0,Q.FR)(1)),s((0,Q.X5)(!1)),ev(t,e,1)))},onRefreshCategories:()=>{ep.current=!1,ex.current=!0,s((0,Q.SH)()),ew(t)}}),eh&&w&&(0,l.jsx)(J.A,{}),eh&&V.length>0&&(0,l.jsxs)(l.Fragment,{children:[ef.length>0&&(0,l.jsxs)(k.A,{children:[(0,l.jsx)(C.A,{title:e("summary",{count:ef.length}),image:"/icons/graph-line.png"}),(0,l.jsx)(K.A,{children:(0,l.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[(0,l.jsx)(T.A,{items:ef}),(0,l.jsx)(B.A,{filteredItems:ef})]})})]}),(0,l.jsxs)(k.A,{children:[(0,l.jsx)(C.A,{title:e("search_result",{count:ej}),image:"/icons/search.png"}),(0,l.jsxs)("div",{className:"flex flex-row items-center justify-between gap-2",children:[(0,l.jsx)("div",{className:"flex items-center gap-2",children:(0,l.jsxs)("div",{className:"flex text-sm border rounded-lg divide-x-[1px] flex-shrink-0",children:[(0,l.jsxs)("p",{onClick:()=>er("table"),className:(0,a.A)("p-1.5 px-2 xl:p-2 gap-1 xl:gap-2 cursor-pointer flex items-center rounded-l-lg font-medium text-xs xl:text-sm","table"===ea?"bg-zinc-100":"hover:bg-zinc-50"),children:[(0,l.jsx)(c.v$p,{className:"text-sm xl:text-base"}),(0,l.jsx)("span",{className:"hidden lg:inline",children:e("table")})]}),(0,l.jsxs)("p",{onClick:()=>er("card"),className:(0,a.A)("p-1.5 px-2 xl:p-2 gap-1 xl:gap-2 cursor-pointer flex items-center rounded-r-lg font-medium text-xs xl:text-sm","card"===ea?"bg-zinc-100":"hover:bg-zinc-50"),children:[(0,l.jsx)(c.D_P,{className:"text-sm xl:text-base"}),(0,l.jsx)("span",{className:"hidden lg:inline",children:e("card")})]})]})}),(0,l.jsxs)("div",{className:"flex flex-row items-center gap-1 xl:gap-2 flex-shrink-0",children:[(0,l.jsx)(g.A,{}),(0,l.jsx)(f.A,{fileName:e("download_product",{keyword:t}),disabled:!es.downloadSupport,filteredData:eo.length?eo:ef})]})]}),(0,l.jsxs)("div",{className:"flex w-full items-center justify-between gap-2",children:[(0,l.jsx)(L.A,{value:ed,onChange:em,placeholder:e("product_results_search_placeholder")}),(0,l.jsxs)("div",{className:"flex flex-row items-center gap-1 xl:gap-2 flex-shrink-0 empty:hidden",children:["table"===ea&&n.xl&&(0,l.jsx)(b.A,{}),n.xl&&(0,l.jsx)(j.A,{data:V,activeFilters:en,onApplyFilters:ei,onResetFilters:()=>ei([])}),"card"===ea&&n.xl&&(0,l.jsx)(h.A,{value:I,onChange:e=>s((0,Q.fT)(e))})]})]}),!n.xl&&(0,l.jsx)(j.A,{data:V,activeFilters:en,onApplyFilters:ei,onResetFilters:()=>ei([])}),"table"===ea&&!n.xl&&(0,l.jsx)(b.A,{}),"card"===ea&&!n.xl&&(0,l.jsx)(h.A,{value:I,onChange:e=>s((0,Q.fT)(e))}),0===ef.length?(0,l.jsx)(D.A,{image:"/images/sonar/result-empty-state.png",title:e("no_matching_results"),description:e("no_matching_results_description")}):(0,l.jsx)(l.Fragment,{children:"card"===ea?(0,l.jsx)(K.A,{className:"grid grid-cols-1 md:grid-cols-2 xl:grid-cols-4 gap-2",children:ef.map((e,s)=>(0,l.jsx)(G.A,{item:e},s))}):(0,l.jsx)(K.A,{className:"overflow-x-auto max-w-full max-h-full",children:(0,l.jsx)(M.A,{filteredData:ef,hiddenColumns:["storeName"],onSortedDataChange:ec})})}),(0,l.jsxs)("div",{className:"flex justify-center py-2",children:[eN&&(0,l.jsx)(H.e,{children:(0,l.jsxs)(A.A,{center:!0,outline:!0,onClick:()=>{ev(t,y,S,q.o7,E)},disabled:ey,hasIcon:!0,children:[ey?(0,l.jsx)(o.PSR,{className:"animate-spin"}):(0,l.jsx)(c.s00,{className:"w-5 h-5"}),(0,l.jsx)(H.t,{})]})}),R&&V.length>0&&!ey&&(0,l.jsx)("p",{className:"text-xs text-zinc-400",children:e("all_products_loaded")})]})]})]}),eh&&w&&0===V.length&&!v&&!ey&&(0,l.jsxs)("div",{className:"flex flex-col items-center text-center p-4 gap-4 justify-center h-[300px] md:h-[500px] text-gray-500",children:[(0,l.jsx)("p",{children:e("token_exhausted")}),(0,l.jsx)("img",{src:"/images/paywall.png",className:"h-[150px]"})]}),eh&&0===V.length&&ey&&(0,l.jsx)("div",{className:"text-center items-center justify-center flex h-[500px] text-gray-500",children:(0,l.jsx)(x.A,{})}
1),eh&&0===V.length&&v&&!ey&&(0,l.jsx)(u.A,{onRetry:()=>{s((0,Q.SH)()),y?ev(t,y,1):"trends"===t?ev("trends","",1):ew(t)},marketplace:"alibaba"}),!eh&&(0,l.jsxs)("div",{className:"flex flex-col items-center text-center p-4 gap-4 justify-center h-[500px] text-gray-500",children:[(0,l.jsx)("img",{src:"/images/search-mascot.png",className:"h-[150px]",alt:""}),(0,l.jsx)("p",{children:e("alibaba_new_arrival_initial_state")})]}),eh&&0===V.length&&!ey&&!v&&!w&&(0,l.jsxs)("div",{className:"flex flex-col items-center text-center p-4 gap-4 justify-center h-[500px] text-gray-500",children:[(0,l.jsx)("img",{src:"/images/search-mascot.png",className:"h-[150px]",alt:""}),(0,l.jsx)("p",{children:e("no_products_found")})]})]})})}}},e=>{e.O(0,[4938,9897,5711,713,2517,8585,5015,8433,2768,3302,7141,8511,8230,8992,8553,5994,9893,916,2826,7459,2740,4298,5061,4696,7263,298,7419,636,6593,8792],()=>e(e.s=65798)),_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.