1import{j as s,L as p,aj as f,$ as h,ak as b,r as i,s as y}from"./index-D8Jcu-pa.js";import{u as j}from"./useQuery-DnSqAoz1.js";import{u as k}from"./useServerFn-X13INGUX.js";import{E as N}from"./EditionNav-DCV9k0Gj.js";import{b as v,M as g,B as w}from"./BottomNav-BsE82ieW.js";import{S as K}from"./SiteFooter-xMzHwp-D.js";import{K as P}from"./KidsMasthead-B1nOQOwo.js";import{M}from"./moon-B7egjiPz.js";import{P as S,K as _,L as E,a as C}from"./KidsPlayerModal-BXNWOkvR.js";import{m as B}from"./tucksy-mascot-Sg0Mlsrn.js";import"./tucksy-wordmark.png.asset-O3i2RX4a.js";import"./createLucideIcon-BliIJJzz.js";import"./x-DPCOrRmD.js";const I={note:g,book:v,moon:M};function L({categories:e}){const r=e.filter(a=>a.nav_visible);return r.length===0?null:s.jsx("section",{"aria-label":"Kids collections",className:"px-5 pt-9 sm:px-8 lg:pt-14",children:s.jsx("div",{className:"mx-auto grid w-full max-w-[1200px] gap-px bg-foreground/12 sm:grid-cols-3",children:r.map(a=>{const o=I[a.icon]??g;return s.jsxs(p,{to:"/kids/$category",params:{category:a.slug},className:"group bg-background px-5 py-6 transition-colors hover:bg-[color:var(--sand)] sm:px-6 sm:py-8",children:[s.jsx(o,{className:"h-5 w-5 text-[color:var(--tucksy)]","aria-hidden":!0}),s.jsx("h2",{className:"mt-3 font-serif text-[22px] leading-tight tracking-[-0.02em] sm:text-[25px]",children:a.label}),a.blurb?s.jsx("p",{className:"mt-2 max-w-[34ch] text-[13.5px] leading-[1.6] text-foreground/60",children:a.blurb}):null,s.jsxs("span",{className:"mt-4 inline-block text-[10px] font-semibold uppercase tracking-[0.22em] text-foreground/45 transition-colors group-hover:text-[color:var(--tucksy)]",children:["Explore ",a.name]})]},a.id)})})})}function $({item:e,category:r,onPlay:a}){const o=f(e),l=h(e.duration_seconds);return s.jsx("section",{"aria-labelledby":"kids-feature",className:"px-5 pt-10 sm:px-8 lg:pt-16",children:s.jsxs("div",{className:"mx-auto w-full max-w-[1200px]",children:[s.jsxs("div",{className:"flex items-center gap-4",children:[s.jsx("span",{className:"text-[10px] font-semibold uppercase tracking-[0.3em] text-foreground/50",children:"Now playing"}
1),s.jsx("span",{className:"h-px flex-1 bg-foreground/15"})]}),s.jsxs("div",{className:"mt-6 grid gap-6 lg:grid-cols-[1.35fr_1fr] lg:items-center lg:gap-10",children:[s.jsxs("button",{type:"button",onClick:()=>a(e),"aria-label":`Play ${e.title}`,className:"group relative block w-full overflow-hidden bg-[color:var(--sand)]",style:{aspectRatio:"16 / 9"},children:[o?s.jsx("img",{src:o,alt:e.thumbnail_alt||e.title,className:"h-full w-full object-cover transition-transform duration-700 group-hover:scale-[1.02]"}):null,s.jsx("span",{className:"absolute inset-0 bg-foreground/10 transition-colors group-hover:bg-foreground/5"}),s.jsxs("span",{className:"absolute bottom-4 left-4 inline-flex items-center gap-2 bg-background/92 px-4 py-2.5 text-[11px] font-semibold uppercase tracking-[0.18em] transition-colors group-hover:bg-[color:var(--tucksy)] group-hover:text-primary-foreground",children:[s.jsx(S,{className:"h-[14px] w-[14px]","aria-hidden":!0}),"Play"]})]}),s.jsxs("div",{children:[s.jsxs("p",{className:"text-[10px] font-semibold uppercase tracking-[0.24em] text-[color:var(--tucksy)]",children:[r?.label??"Tucksy Kids",l?s.jsxs("span",{className:"text-foreground/35",children:[" · ",l]}):null]}),s.jsx("h2",{id:"kids-feature",className:"mt-3 font-serif text-[28px] leading-[1.08] tracking-[-0.03em] sm:text-[36px] lg:text-[42px]",children:e.title}),e.description?s.jsx("p",{className:"mt-4 max-w-[52ch] text-[14.5px] leading-[1.7] text-foreground/65 lg:text-[16px]",children:e.description}):null,r?s.jsx(p,{to:"/kids/$category/$slug",params:{category:r.slug,slug:e.slug},className:"mt-5 inline-block border-b border-[color:var(--tucksy)] pb-0.5 text-[11px] font-semibold uppercase tracking-[0.2em] text-[color:var(--tucksy)] transition-opacity hover:opacity-70",children:"Open its page"}):null]})]})]})})}function F({artworkUrl:e}){const r=e||B;return s.jsx("section",{"aria-labelledby":"kids-brand",className:"mt-12 bg-[color:var(--tucksy-mint)] px-5 py-10 sm:px-8 sm:py-14 lg:mt-20",children:s.jsxs("div",{className:"mx-auto grid w-full max-w-[1200px] items-center gap-8 sm:grid-cols-[1fr_0.8fr] sm:gap-12",children:[s.jsxs("div",{children:[s.jsx("p",{className:"text-[10px] font-semibold uppercase tracking-[0.3em] text-foreground/55",children:"Tucksy Kids"}),s.jsx("h2",{id:"kids-brand",className:"mt-3 max-w-[20ch] font-serif text-[28px] leading-[1.08] tracking-[-0.03em] sm:text-[36px] lg:text-[44px]",children:"Kinder days, brighter tomorrows."}),s.jsx("p",{className:"mt-4 max-w-[50ch] text-[14.5px] leading-[1.7] text-foreground/70 lg:text-[16px]",children:"Everything here is made to be gentle company: songs to sing badly in the car, tales for the ten minutes before sleep, and sounds for the hours nobody else is awake for."})]}),s.jsx("div",{className:"flex justify-center sm:justify-end",children:s.jsx("img",{src:r,alt:"Tucksy",loading:"lazy",className:"h-auto w-[180px] max-w-full object-contain sm:w-[240px] lg:w-[280px]"})})]})})}function V(){const e=k(b),[r,a]=i.useState(!1),[o,l]=i.useState(null);i.useEffect(()=>{(async()=>{const{data:t}=await y.auth.getSession();t.session?.user?.id&&a(!0)})()},[]);const{data:c}=j({queryKey:["kids-page"],queryFn:()=>e()}),n=c?.categories??[],d=i.useMemo(()=>new Map(n.map(t=>[t.id,t])),[n]),m=c?.featured??null,x=c?.items??[],u=o?d.get(o.category_id??""):void 0;return s.jsxs("div",{className:"min-h-screen bg-background",children:[s.jsx(N,{signedIn:r}),s.jsxs("main",{className:"pb-0",children:[s.jsx(P,{category:null,sections:n.filter(t=>t.nav_visible).map(t=>({slug:t.slug,name:t.name}))}),m?s.jsx($,{item:m,category:d.get(m.category_id??""),onPlay:l}):null,s.jsx(L,{categories:n}),x.length>0?s.jsx("section",{"aria-labelledby":"kids-more",className:"px-5 pt-12 sm:px-8 lg:pt-16",children:s.jsxs("div",{className:"mx-auto w-full max-w-[1200px]",children:[s.jsxs("div",{className:"flex items-center gap-4",children:[s.jsx("span",{id:"kids-more",className:"text-[10px] font-semibold uppercase tracking-[0.3em] text-foreground/50",children:"More to explore"}
1),s.jsx("span",{className:"h-px flex-1 bg-foreground/15"})]}),s.jsx("div",{className:"mt-6 grid gap-8 sm:grid-cols-2 sm:gap-x-7 lg:grid-cols-3",children:x.map(t=>s.jsx(_,{item:t,category:d.get(t.category_id??""),onPlay:l},t.id))})]})}):null,s.jsx(F,{}),s.jsx(E,{}),s.jsx("div",{className:"h-14 lg:h-20"})]}),s.jsx(K,{}),s.jsx(w,{}),s.jsx(C,{item:o,categorySlug:u?.slug??"",onClose:()=>l(null)})]})}export{V as component};
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.