PageSourceSearch

https://tyrrst.com/assets/DtcShop-BvFrE0dj.js

js tyrrst.com collected 2026-10-04 08:37:59 UTC 3,977 bytes, 1 lines download raw bytes

1import{y as t,b_ as h,j as e,aV as o,Z as g,E as f,F as j,H as N,I as v,K as b,T as y,L as w,C as S,c as _,B as k}from"./index-DbRCge_b.js";import{D}from"./dtcMarkets-gMsU_Z4k.js";import{u as E}from"./useDtcStorefront-T6KPDoPy.js";import{u as C}from"./dtcFeeEngine-D29SS-rJ.js";import{D as T}from"./DtcShopHeader-BBSPd-k4.js";import"./shopping-bag-D6vPaJT8.js";const d="dtc.market";function R(){const[r,i]=t.useState(()=>typeof window>"u"?"DE":window.localStorage.getItem(d)||"DE"),[c,m]=t.useState("");t.useEffect(()=>{window.localStorage.setItem(d,r)},[r]);const{items:l,loading:u}=E(r),{inputs:x}=C(),a=x.consumerShipping.get(r),n=t.useMemo(()=>l.filter(s=>h(c,s.product.name,s.brand.name,s.product.category)),[l,c]);return e.jsxs("div",{className:"min-h-screen bg-background",children:[e.jsx(T,{}),e.jsxs("header",{className:"border-b",children:[e.jsxs("div",{className:"container mx-auto px-4 py-6 flex flex-col gap-4 md:flex-row md:items-center md:justify-between",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx(o,{className:"h-7 w-7 text-primary"}),e.jsxs("div",{children:[e.jsx("h1",{className:"text-2xl font-semibold tracking-tight",children:"Tyrrst Shop"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"Craft bottles shipped to your door — direct from the brand."})]})]}),e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx(g,{placeholder:"Search brands or bottles…",value:c,onChange:s=>m(s.target.value),className:"w-full md:w-64"}),e.jsxs(f,{value:r,onValueChange:i,children:[e.jsx(j,{className:"w-44",children:e.jsx(N,{})}),e.jsx(v,{children:D.map(s=>e.jsxs(b,{value:s.code,children:["Deliver to ",s.name]},s.code))})]})]})]}),a?e.jsx("div",{className:"bg-muted/40 border-t",children:e.jsxs("div",{className:"container mx-auto px-4 py-2 flex items-center gap-2 text-xs text-muted-foreground",children:[e.jsx(y,{className:"h-3.5 w-3.5"}),"Flat shipping ",a.currency," ",a.consumer_shipping_fee.toFixed(2)," — free over"," ",a.currency," ",a.free_shipping_threshold.toFixed(2),"."]})}):null]}),e.jsx("main",{className:"container mx-auto px-4 py-8",children:u?e.jsx("div",{className:"grid grid-cols-2 md:grid-cols-3 lg:grid-cols-4 gap-4",children:Array.from({length:8}).map((s,p)=>e.jsx("div",{className:"h-72 rounded-lg bg-muted animate-pulse"},p))}):n.length===0?e.jsxs("div",{className:"text-center py-24",children:[e.jsx("p",{className:"text-lg font-medium",children:"No bottles available yet for this market."}),e.jsx("p",{className:"text-sm text-muted-foreground mt-1",children:"Try a different country, or check back soon — brands are joining all the time."})]}):e.jsx("div",{className:"grid grid-cols-2 md:grid-cols-3 lg:grid-cols-4 gap-4",children:n.map(s=>e.jsx(w,{to:`/shop/product/${s.product_id}`,className:"group",children:e.jsxs(S,{className:"overflow-hidden h-full hover:shadow-md transition-shadow",children:[e.jsx("div",{className:"aspect-square bg-muted flex items-center justify-center overflow-hidden",children:s.product.image_url?e.jsx("img",{src:s.product.image_url,alt:s.product.name,className:"object-contain w-full h-full group-hover:scale-105 transition-transform",loading:"lazy"}):e.jsx(o,{className:"h-12 w-12 text-muted-foreground"})}),e.jsxs(_,{className:"p-3 space-y-1",children:[e.jsxs("div",{className:"flex items-center gap-2 text-xs text-muted-foreground",children:[s.brand.logo_url?e.jsx("img",{src:s.brand.logo_url,alt:"",className:"h-4 w-4 object-contain"}):null,e.jsx("span",{className:"truncate",children:s.brand.name})]}),e.jsx("h3",{className:"font-medium leading-tight line-clamp-2",children:s.product.name}),e.jsxs("div",{className:"flex items-center justify-between pt-1",children:[e.jsxs("span",{className:"font-semibold",children:[s.currency," ",s.recommended_price.toFixed(2)]}),s.product.volume_ml?e.jsxs(k,{variant:"secondary",className:"text-[10px]",children:[s.product.volume_ml,"ml"]}):null]})]})]})},s.product_id))})})]})}export{R 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.