1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[10443],{10443:(e,t,l)=>{function r(e){return'"'.concat(e.replace(/"/g,'\\"'),'"')}async function i(e,t,l){try{let{data:i}=await t.from("product_categories").select("image_url").eq("id",e).maybeSingle();if(null==i?void 0:i.image_url)return i.image_url;let n=null;if(l){let e=r(l),i=r("".concat(l," > *")),{data:a,error:u}=await t.from("products").select("image_urls, review_count, rating, product_categories!inner(full_path)").eq("status","published").not("image_urls","is",null).or("full_path.eq.".concat(e,",full_path.like.").concat(i),{foreignTable:"product_categories"}).order("review_count",{ascending:!1,nullsFirst:!1}).order("rating",{ascending:!1,nullsFirst:!1}).limit(3);u||(n=a)}if(!(null==n?void 0:n.length)){let{data:l,error:r}=await t.from("products").select("image_urls, rating, review_count").eq("google_product_category_id",e).eq("status","published").not("image_urls","is",null).order("review_count",{ascending:!1,nullsFirst:!1}).order("rating",{ascending:!1,nullsFirst:!1}).limit(3);if(r||!(null==l?void 0:l.length))return null;n=l}for(let e of n){let t=e.image_urls;if(t&&t.length>0&&t[0])return t[0]}return null}catch(t){return console.error("Failed to get category image for ".concat(e,":"),t),null}}async function n(e,t){let l=new Map;return await Promise.all(e.map(async e=>{let r=await i(e.id,t,e.full_path);r&&l.set(e.id,r)})),l}l.d(t,{getCategoryImages:()=>n})}}]);
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.