PageSourceSearch

https://folksy.com/build/routes/$section.$category.$subcategory-M7MEWSJU.js

js folksy.com collected 2026-09-24 08:47:10 UTC 12,243 bytes, 1 lines download raw bytes

1import{a as Be}from"/build/_shared/chunk-CPVQBOHN.js";import{a as Q}from"/build/_shared/chunk-W5ENSS6C.js";import"/build/_shared/chunk-ZUWY7PBC.js";import{c as ve}from"/build/_shared/chunk-2MXW7MMC.js";import{a as de}from"/build/_shared/chunk-KHULKNBB.js";import{a as ye}from"/build/_shared/chunk-RLPWOZE6.js";import{c as H}from"/build/_shared/chunk-SOFIAZ4C.js";import"/build/_shared/chunk-E5NZQDOE.js";import{a as Ae}from"/build/_shared/chunk-4UW23JMM.js";import{a as Te}from"/build/_shared/chunk-L4MNZ5YJ.js";import{a as ge}from"/build/_shared/chunk-H2GVATSB.js";import"/build/_shared/chunk-HIYFUWSU.js";import"/build/_shared/chunk-XR23IEMW.js";import"/build/_shared/chunk-HQ6LUFCG.js";import{a as xe}from"/build/_shared/chunk-IT7EHFC6.js";import{a as He,c as pe}from"/build/_shared/chunk-6ABNFZUU.js";import{a as Ee}from"/build/_shared/chunk-OWD6JVY6.js";import"/build/_shared/chunk-LCA4RE4H.js";import"/build/_shared/chunk-XQYRROZ3.js";import{b as fe,c as he,d as be}from"/build/_shared/chunk-TYIREJ6N.js";import"/build/_shared/chunk-V64CNIFJ.js";import"/build/_shared/chunk-QBYFE3YH.js";import{a as ue}from"/build/_shared/chunk-DB62VCR3.js";import{a as le,c as me,f as A}from"/build/_shared/chunk-G7JOKBZZ.js";import{a as k}from"/build/_shared/chunk-YSPQTKVX.js";import{a as ne,b as ie}from"/build/_shared/chunk-DQN2KUUN.js";import"/build/_shared/chunk-PKKAQJLY.js";import"/build/_shared/chunk-Y5JKPEEN.js";import"/build/_shared/chunk-XTD2VPF7.js";import{a as ce}from"/build/_shared/chunk-DV5U6TNA.js";import"/build/_shared/chunk-UGJWDWCX.js";import"/build/_shared/chunk-PZBT3ZQB.js";import"/build/_shared/chunk-3FVNV34P.js";import"/build/_shared/chunk-G5MRQZXM.js";import{c as ae}from"/build/_shared/chunk-QEF52LBN.js";import"/build/_shared/chunk-I5ZW66N2.js";import"/build/_shared/chunk-2NCEYMJ5.js";import{a as De}from"/build/_shared/chunk-2REPOOWC.js";import"/build/_shared/chunk-VDL4NF6T.js";import"/build/_shared/chunk-7KDV5KGY.js";import"/build/_shared/chunk-66LLQ6SZ.js";import"/build/_shared/chunk-YOHRPNK7.js";import{a as _e}from"/build/_shared/chunk-DP3MTLBU.js";import"/build/_shared/chunk-XJ4HQVTL.js";import{b as re,p as se}from"/build/_shared/chunk-6ZIO5V64.js";import{b as Ue,c as oe}from"/build/_shared/chunk-7DS4SBON.js";import{d as u,g as M,h as O,i as U,k as _,l as D}from"/build/_shared/chunk-H4UJXLRU.js";M();O();U();D();_();M();O();U();D();_();var Se=u(Ae());var g=u(Ue());var Je=u(De()),Ke=u(He()),We=u(Be());var v=u(_e());var Ve=u(Ee()),Xe=u(Te());var e=u(oe()),Ye=i=>{let{data:r}=i,p=(r==null?void 0:r.subcategoryName)||"Browse",d=(r==null?void 0:r.categoryName)||"",o=p==="All"||!d?d||p:`${p} ${d}`,c=(r==null?void 0:r.seoTitle)||`Handmade ${o} UK on Folksy`,l=(r==null?void 0:r.seoDescription)||`Discover beautiful handmade ${o.toLowerCase()} from British designers and makers on Folksy`;return{title:c,description:l,"og:title":c,"og:description":l,"og:type":"website",...r!=null&&r.sectionSlug&&(r!=null&&r.categorySlug)&&(r!=null&&r.subcategorySlug)?{"og:url":`https://folksy.com/${r.sectionSlug}/${r.categorySlug}/${r.subcategorySlug}`}:{}}};var Ze=()=>{let{items:i,totalResults:r,currentPage:p,sectionName:d,sectionSlug:o,sectionId:c,categoryName:l,categorySlug:a,categoryId:f,subcategoryName:m,subcategorySlug:y,subcategoryId:S,subcategoryDescription:P,footerDescription:w,sort:n,userFavouriteItemIdsOnPage:B,minPriceServer:N,maxPriceServer:I,aggregationsResponse:C,countries:q,countrySelectedIsoServer:$}=se(),[E,G]=(0,g.useState)(null),[T,J]=(0,g.useState)(null),[Pe,K]=(0,g.useState)(!1),[we,Ne]=(0,g.useState)(B!=null?B:[]),[Ie,W]=(0,g.useState)(!1),[V,X]=(0,g.useState)(!1),$e=ie(),F=ce(),j=48,Y=Math.min(Math.ceil(r/j),Math.floor(1e4/j)),R=re(),h=q.find(t=>$===t.iso),[z,Z]=(0,g.useState)(h!=null?h:null),ke=t=>{let s=new URL(window.location.href);s.searchParams.set("page",t),R(`${s.pathname}${s.search}`,{replace:!0})},Ce=t=>{let s=new URLSearchParams;$&&s.set("country_selected_iso",$),N&&s.set("minPrice",N),I&&s.set("maxPrice",I),n&&n!=="recently_listed"&&s.set("sort",n),t>1&&s.set("page",t.toString());let x=s.toString();return`/${o}/${a}/${y}${x?`?${x}`:""}`},Fe=t=>{let s=new URL(window.location.href);s.searchParams.delete("page"),t==="recently_listed"?s.searchParams.delete("sort"):s.searchParams.set("sort",t),R(`${s.pathname}${s.search}`,{replace:!0})},Re=()=>{let t=new URL(window.location.href);t.searchParams.delete("page"),z&&t.searchParams.set("country_selected_iso",z.value),E?t.searchParams.set("minPrice",E.toString()):t.searchParams.delete("minPrice"),T?t.searchParams.set("maxPrice",T.toString()):t.searchParams.delete("maxPrice"),R(`${t.pathname}${t.search}`,{replace:!0})},L=t=>{let s=new URL(window.location.href);t.forEach(x=>{x==="minPrice"?(G(0),s.searchParams.delete("minPrice")):x==="maxPrice"?(J(null),s.searchParams.delete("maxPrice")):x==="countrySelected"&&(s.searchParams.delete("country_selected_iso"),Z(null))}),R(`${s.pathname}${s.search}`,{replace:!0})};(0,g.useEffect)(()=>{ae("viewed subcategory page",{context:"subcategory_browse",section:o,category:a,subcategory:y})},[]);let Le=fe(C),Me=he({response:C,sectionId:c}),b=be({response:C,sectionId:c,categoryId:f}),Oe=N||I||$,ee=i.length>0?{"@context":"https://schema.org","@type":"ItemList",name:`${m} - ${l} - ${d}`,numberOfItems:r,itemListElement:i.slice(0,20).map((t,s)=>({"@type":"ListItem",position:(p-1)*j+s+1,url:t.itemUrl,name:t.title,image:t.imageUrl}))}:null,te=`/${o}/${a}/${y}`;return(0,e.jsxs)("div",{className:"min-h-screen bg-white",children:[ee&&(0,e.jsx)("script",{type:"application/ld+json",dangerouslySetInnerHTML:{__html:JSON.stringify(ee)}}),(0,e.jsx)(ne,{user:F,numberOfBasketItems:$e,showSearch:!0}),(0,e.jsx)(xe,{}),(0,e.jsx)("script",{type:"application/ld+json",dangerouslySetInnerHTML:{__html:JSON.stringify({"@context":"https://schema.org","@type":"BreadcrumbList",itemListElement:[{"@type":"ListItem",position:1,name:"Home",item:"https://folksy.com/"},{"@type":"ListItem",position:2,name:d,item:`https://folksy.com/${o}`},{"@type":"ListItem",position:3,name:l,item:`https://folksy.com/${o}/${a}`},{"@type":"ListItem",position:4,name:m,item:`https://folksy.com/${o}/${a}/${y}`}]}).replace(/</g,"\\u003c")}}),(0,e.jsx)(k,{children:(0,e.jsxs)("nav",{className:"flex items-center gap-1 py-3 text-sm text-neutral-500",children:[(0,e.jsx)("a",{href:"/",className:"hover:text-primary-600 transition-colors",children:"Home"}),(0,e.jsx)(v.ChevronRightIcon,{className:"w-3.5 h-3.5"}),(0,e.jsx)("a",{href:`/${o}
1`,className:"hover:text-primary-600 transition-colors",children:d}),(0,e.jsx)(v.ChevronRightIcon,{className:"w-3.5 h-3.5"}),(0,e.jsx)("a",{href:`/${o}/${a}`,className:"hover:text-primary-600 transition-colors",children:l}),(0,e.jsx)(v.ChevronRightIcon,{className:"w-3.5 h-3.5"}),(0,e.jsx)("span",{className:"text-neutral-800 font-medium",children:m})]})}),(0,e.jsxs)(k,{className:"pt-2 sm:pt-4 pb-4 sm:pb-6",children:[(0,e.jsx)(le,{className:"!text-3xl sm:!text-4xl !font-semibold",textColor:"text-neutral-800",children:m}),P?(0,e.jsx)("div",{className:"mt-3 max-w-2xl text-neutral-500 leading-relaxed",children:(0,e.jsx)(Q,{value:P})}):(0,e.jsxs)(A,{className:"mt-3 max-w-2xl leading-relaxed",textColor:"text-neutral-500",children:["Beautiful handmade"," ",(m==="All"?l:m).toLowerCase()," ","from British designers and makers"]}),(0,e.jsx)("div",{className:"mt-4",children:(0,e.jsxs)("span",{className:"inline-flex items-center px-3 py-1 rounded-full border border-neutral-200 text-xs font-medium text-neutral-600 tracking-wide",children:[r.toLocaleString()," ",r===1?"item":"items"]})})]}),(0,e.jsx)("div",{className:"border-b border-neutral-100"}),(0,e.jsxs)(k,{className:"relative pb-10",children:[(0,e.jsx)(ye,{isFiltersOpen:Ie,setIsFiltersOpen:W,sectionId:c,setSectionId:()=>{},categoryId:f,setCategoryId:()=>{},subCategoryId:S,setSubCategoryId:()=>{},minPrice:E,maxPrice:T,setMinPrice:G,setMaxPrice:J,handleClickShowResults:Re,sections:Le,categories:Me,subCategories:b,handleRemoveFilter:L,countryOptions:q.map(t=>({value:t.iso,label:t.name,flag:t.flag})),countrySelected:z,setSelectedCountry:Z}),(0,e.jsxs)("div",{className:"my-5 space-y-3 sm:space-y-0 sm:flex sm:items-center sm:justify-between",children:[(0,e.jsxs)("button",{onClick:()=>W(!0),className:"w-full sm:w-auto flex items-center justify-center gap-2.5 border border-neutral-200 bg-white text-neutral-700 rounded-xl px-5 py-3 sm:py-2.5 cursor-pointer hover:border-primary-300 hover:bg-primary-50 hover:text-primary-700 transition-all font-medium text-sm group",children:[(0,e.jsx)(v.AdjustmentsHorizontalIcon,{className:"h-5 w-5 text-neutral-400 group-hover:text-primary-500 transition-colors"}),"Refine results"]}),(0,e.jsx)(ve,{currentSort:n,onSortChange:Fe})]}),b&&b.length>1&&!V&&(0,e.jsx)("div",{className:"bg-white/95 backdrop-blur-sm -mx-4 px-4 py-3 border-b border-neutral-100",children:(0,e.jsxs)("div",{className:"flex flex-wrap gap-2",children:[b.map(t=>{let s=t.id===S;return(0,e.jsx)("a",{href:s?`/${o}/${a}`:`/${o}/${a}/${et(C,c,f,t.id)||""}`,className:`inline-flex items-center gap-1.5 px-4 py-2 rounded-full border text-sm font-medium transition-all whitespace-nowrap shrink-0 ${s?"border-secondary-500 bg-secondary-500 text-white shadow-sm":"border-neutral-200 bg-white text-neutral-700 hover:border-secondary-300 hover:bg-secondary-50 hover:text-secondary-700"}`,children:t.name},t.id)}),(0,e.jsx)("button",{type:"button",onClick:()=>X(!0),className:"inline-flex items-center px-4 py-2 rounded-full border border-neutral-200 bg-white text-sm font-medium text-neutral-400 hover:border-neutral-300 hover:bg-neutral-50 hover:text-neutral-600 transition-all whitespace-nowrap shrink-0",children:"Hide"})]})}),b&&b.length>1&&V&&(0,e.jsx)("div",{className:"py-3",children:(0,e.jsx)("button",{type:"button",onClick:()=>X(!1),className:"inline-flex items-center gap-1.5 px-4 py-2 rounded-full border border-neutral-200 bg-white text-sm font-medium text-neutral-500 hover:border-secondary-300 hover:bg-secondary-50 hover:text-secondary-700 transition-all",children:"Show subcategories"})}),Oe?(0,e.jsxs)("div",{className:"flex flex-wrap gap-2 mb-4",children:[N&&(0,e.jsx)(H,{label:`Min: \xA3${N}`,onRemove:()=>L(["minPrice"])}),I&&(0,e.jsx)(H,{label:`Max: \xA3${I}`,onRemove:()=>L(["maxPrice"])}),$&&h&&(0,e.jsx)(H,{label:`Delivers to: ${h.flag} ${h.name}`,onRemove:()=>L(["countrySelected"])})]}):null,i.length===0?(0,e.jsxs)("div",{className:"flex flex-col items-center justify-center text-center py-16",children:[(0,e.jsx)(me,{children:"No items found"}),(0,e.jsxs)(A,{className:"mt-2 max-w-md",children:["We couldn't find any items in ",m,". Try removing some filters or browse our other collections."]})]}):(0,e.jsx)("div",{className:"grid grid-cols-2 sm:grid-cols-3 lg:grid-cols-4 gap-4",children:i.map((t,s)=>(0,e.jsx)(de,{...t,userFavouriteItemIds:we,userId:F==null?void 0:F.id,setModalIsOpen:K,setUserFavouriteItemIds:Ne,anal
1yticsEventName:"search result click",analyticsObject:{context:"subcategory_browse",section:o,category:a,subcategory:y,sort:n}},`${t.itemUrl}-${s}`))}),(0,e.jsx)(pe,{modalIsOpen:Pe,title:"Not Signed In?",setModalIsOpen:()=>K(!1),children:(0,e.jsxs)(A,{children:[(0,e.jsx)("a",{className:"underline text-primary-600",href:`/login?back=${te}`,children:"Sign in"})," ","or"," ",(0,e.jsx)("a",{className:"underline text-primary-600",href:`/register?back=${te}`,children:"register"})," ","to save your favourite items."]})})]}),Y>1&&(0,e.jsx)("div",{className:"mt-5 mb-12",children:(0,e.jsx)(ge,{currentPage:p,totalPages:Y,handlePageNumberClick:ke,getPageUrl:Ce})}),w&&(0,e.jsx)(k,{className:"pb-10",children:(0,e.jsx)("div",{className:"prose prose-neutral max-w-3xl text-neutral-600",children:(0,e.jsx)(Q,{value:w})})}),(0,e.jsx)(ue,{})]})};function et(i,r,p,d){var a,f,m,y,S,P,w;let o=(m=(f=(a=i==null?void 0:i.aggregations)==null?void 0:a.sections)==null?void 0:f.buckets)==null?void 0:m.find(n=>n.key.split(":")[0]===r.toString());if(!o)return null;let c=(S=(y=o.categories)==null?void 0:y.buckets)==null?void 0:S.find(n=>n.key.split(":")[0]===p.toString());if(!c)return null;let l=(w=(P=c.subcategories)==null?void 0:P.buckets)==null?void 0:w.find(n=>n.key.split(":")[0]===d.toString());return l&&l.key.split(":")[1]||null}var tt=Ze;export{tt as default,Ye as meta};

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.