1import{U as I,d as L,r as m,n as F,V as v,W as R,p as M,j as e,X as B,L as O}from"./index-X4zOIsZb.js";import{P as Y}from"./page-layout-89Jw-r7B.js";import{b as w,c as S,d as $}from"./index-17Xp9pNV.js";import{u as G,C as N}from"./cta-card-oOyiY2sr.js";import{M as J}from"./mic-pGey1q9F.js";import"./footer-kdz1Kfem.js";import"./createLucideIcon-BG8JlC3m.js";import"./loader-circle-D6RRSbbz.js";import"./x-CD7Vw_t5.js";import"./arrow-up-right-C-UZQ8qL.js";const f={uusin:"Uusin",yrityskulttuuri:"Yrityskulttuuri",johtajuus:"Johtajuus",luovuus:"Luovuus",tulevaisuuskyvykkyys:"Tulevaisuuskyvykkyys",ajankohtainen:"Ajankohtainen"},X=new Set(["uusin","ajankohtainen"]),V=["yrityskulttuuri","johtajuus","luovuus","tulevaisuuskyvykkyys"],b=5;function W(s){return s==null?null:`${Math.round(s/60)} min`}function ce(){const{sarja:s}=I.useSearch(),r=s??v,o=L({from:"/podcast"}),[a,t]=m.useState(null),{data:l,isLoading:g,error:i}=F(r),{data:p}=G(),{data:x}=R(),h=m.useMemo(()=>x?.find(n=>n.slug===r)??x?.[0],[x,r]),y=m.useMemo(()=>{const n=l??[];return a?n.filter(c=>c.tags.includes(a)):n},[l,a]),j=m.useMemo(()=>{if(!p||p.length===0)return[];const c=a&&["yrityskulttuuri","johtajuus","luovuus","tulevaisuuskyvykkyys"].includes(a)?a:"yleiset";let d=p.filter(u=>u.active&&u.category===c);return d.length===0&&(d=p.filter(u=>u.active&&u.category==="yleiset")),d.length===0&&(d=p.filter(u=>u.active)),[...d].sort(()=>Math.random()-.5)},[p,a]),_=m.useMemo(()=>{if(!l)return new Set;const n=new Set;for(const c of l)for(const d of c.tags)n.add(d);return n},[l]),k=r==="arkisto",A=(h?.name??"Kulttuurikuiskaaja-podcast").toUpperCase(),T=k?"YRITYSKULTTUURI ON KUNINGAS -PODCAST.":"TOTUUKSIA JA TOTUUDENKALTAISIA KUISKAUKSIA KULTTUURISTA.",K=k?"Tästä löydät vanhemman podcast-sarjani kaksi tuontantokautta. Kaikki teemat ja jaksot ovat äärimmäisen ajankohtaisia, edelleen. ":`Kulttuurikuiskaajaâ¢-podcast on podi yrityskulttuurista, johtamisesta ja tulevaisuuskyvykkyydestä. Tässä podcastissa haluan olla läsnä johtajan ja esihenkilön arjessa, juuri silloin kun tämä tarvitsee konkreettista apua. En valmenna, enkä kysy âmitä sinä tekisitâ, vaan kerron oman näkemykseni kulloiseenkin aiheeseen. 2 3Sinun vastuullesi jää A) päättää toimiiko idea ja jos kyllä, niin B) viedä idea käytäntöön. 4 5Podcastin jaksot pyrin pitämään aiheeseen tarkasti rajattuina ja lyhyinä, helposti kulutettavina nuggetteina. Podcastin löydät mm. Spotifystä, Apple Podcasteista ja YouTubesta.`,P=h?.logo_url||M.url,U=h?.spotify_url||"https://open.spotify.com/show/4hrPl0RsXQa5gykOZWNpIX?si=d1dea7ec87dc4220",E=h?.apple_url||"https://podcasts.apple.com/fi/podcast/kulttuurikuiskaaja/id1779730870",C=h?.youtube_url||"https://www.youtube.com/@the_Kulttuurikuiskaaja",D=n=>{t(null),o({search:n===v?{}:{sarja:n}})};return e.jsxs(Y,{children:[e.jsx("section",{className:"border-b border-border",children:e.jsxs("div",{className:"mx-auto max-w-7xl px-4 pt-20 pb-16 sm:px-6 sm:pt-24 lg:px-8",children:[x&&x.length>1&&e.jsx(q,{seriesList:x,active:r,onSelect:D}),e.jsxs("div",{className:"grid gap-8 md:grid-cols-[1fr_auto] md:items-end md:gap-12",children:[e.jsxs("div",{className:"min-w-0",children:[e.jsx("div",{className:"eyebrow text-accent mb-6",children:A}),e.jsx("h1",{className:"font-display text-5xl sm:text-7xl lg:text-8xl text-primary text-balance leading-[1.02]",children:T}),e.jsx("p",{className:"mt-8 max-w-3xl text-lg leading-relaxed text-foreground/80 whitespace-pre-line",children:K}),l&&e.jsxs("p",{className:"mt-6 text-base text-foreground/60",children:[l.length," jaksoa · uusimmat ensin"]})]}),e.jsxs("div",{className:"shrink-0 w-40 sm:w-48 md:w-52 lg:w-64",children:[e.jsx("img",{src:P,alt:`${h?.name??"Podcast"} â logo`,width:512,height:512,className:"aspect-square w-full object-cover rounded-2xl shadow-[0_12px_40px_-12px_rgba(17,17,17,0.15)] ring-1 ring-border",loading:"eager"}),e.jsxs("div",{className:"mt-5 flex items-center justify-center gap-4",children:[e.jsx("a",{href:U,target:"_blank",rel:"noopener noreferrer","aria-label":"Kuuntele Spotifyssa",className:"text-foreground
5/70 hover:text-[#1DB954] transition",children:e.jsx(w,{className:"h-6 w-6"})}),e.jsx("a",{href:E,target:"_blank",rel:"noopener noreferrer","aria-label":"Kuuntele Apple Podcasteissa",className:"text-foreground/70 hover:text-[#A020F0] transition",children:e.jsx(S,{className:"h-6 w-6"})}),e.jsx("a",{href:C,target:"_blank",rel:"noopener noreferrer","aria-label":"Katso YouTubessa",className:"text-foreground/70 hover:text-[#FF0000] transition",children:e.jsx($,{className:"h-6 w-6"})})]})]})]})]})}),e.jsxs("section",{className:"mx-auto max-w-7xl px-4 py-12 sm:px-6 lg:px-8",children:[e.jsx(H,{tag:a,setTag:t,availableTags:_}),i&&e.jsxs("div",{className:"mt-10 border border-destructive/40 bg-destructive/10 p-4 text-sm text-destructive",children:["Jaksojen lataus epäonnistui: ",i.message]}),g?e.jsx("ul",{className:"mt-10 divide-y divide-border border-y border-border",children:Array.from({length:6}).map((n,c)=>e.jsx("li",{className:"h-24 animate-pulse bg-card/40"},c))}):y.length===0?e.jsx("div",{className:"mt-16 border border-border bg-card p-10 text-center text-foreground/70",children:a?e.jsxs(e.Fragment,{children:[e.jsxs("p",{children:['Ei jaksoja tägillä "',f[a],'".']}),e.jsx("button",{onClick:()=>t(null),className:"mt-4 text-sm text-primary underline",children:"Näytä kaikki jaksot"})]}):e.jsx("p",{children:"Ei vielä jaksoja. Palaa hetken kuluttua."})}):e.jsxs("ul",{className:"mt-10 divide-y divide-border border-y border-border",children:[y.map((n,c)=>{const u=(c+1)%b===0&&c<y.length-1&&j.length>0?j[Math.floor(c/b)%j.length]:null;return e.jsxs(m.Fragment,{children:[e.jsx(Z,{episode:n}),u&&e.jsx("li",{className:"bg-secondary/60",children:e.jsx(N,{card:u,className:"!bg-transparent !text-primary"})})]},n.id)}),j.length>0&&y.length<b&&e.jsx("li",{className:"bg-secondary/60",children:e.jsx(N,{card:j[0],className:"!bg-transparent !text-primary"})})]})]})]})}function q({seriesList:s,active:r,onSelect:o}){return e.jsxs("div",{className:"mb-10 flex flex-wrap items-center gap-2 border-b border-border pb-4",children:[e.jsx("span",{className:"eyebrow text-accent mr-3",children:"Sarja"}),s.map(a=>{const t=a.slug===r;return e.jsx("button",{onClick:()=>o(a.slug),className:`px-4 py-2 text-sm font-medium transition border ${t?"border-primary bg-primary text-primary-foreground":"border-border text-foreground/70 hover:border-primary hover:text-primary"}`,children:a.short_label},a.slug)})]})}function H({tag:s,setTag:r,availableTags:o}){const a=[{key:"all",label:"Kaikki",active:!s,disabled:!1,onClick:()=>r(null)},...V.filter(t=>B.includes(t)).map(t=>({key:t,label:f[t],active:s===t,disabled:!o.has(t),onClick:()=>r(s===t?null:t)}))];return e.jsxs("div",{className:"flex flex-wrap items-center gap-x-1 gap-y-2 pb-2 text-sm",children:[e.jsx("span",{className:"eyebrow text-accent mr-3",children:"Suodata"}),a.map((t,l)=>e.jsxs(m.Fragment,{children:[l>0&&e.jsx("span",{className:"text-muted-foreground/40","aria-hidden":!0,children:"|"}),e.jsx("button",{onClick:t.onClick,disabled:t.disabled,className:`px-2 py-1 transition ${t.active?"text-primary underline underline-offset-4 decoration-2":"text-muted-foreground hover:text-primary"} ${t.disabled?"opacity-40 cursor-not-allowed hover:text-muted-foreground":""}`,children:t.label})]},t.key))]})}function Q(s,r){const o=s.match(/^\s*(\d+)\s*[.:)-]\s*(.+)$/);return o?{number:parseInt(o[1],10),title:o[2].trim()}:{number:r,title:s}}function Z({episode:s}){const r=new Date(s.published_at).toLocaleDateString("fi-FI",{year:"numeric",month:"short",day:"numeric"}),o=W(s.duration_seconds),a=s.tags.filter(i=>!X.has(i)),{number:t,title:l}=Q(s.title,s.episode_number),g=e.jsxs("article",{className:"group grid grid-cols-[minmax(0,1fr)_auto] items-start gap-4 px-4 py-6 transition-colors hover:bg-secondary/40 sm:grid-cols-[6rem_minmax(0,1fr)_auto] sm:items-center sm:gap-6 sm:px-6 sm:py-7",children:[e.jsx("div",{className:"col-span-2 flex items-center gap-3 sm:col-span-1 sm:block",children:t!=null?e.jsxs("span",{className:"font-display text-4xl leading-none text-primary/25 transition-colors group-hover:text-accent sm:text-5xl",children:[e.jsx("span",{className:"text-primary/40 group-hover:text-accent/70",children:"â"})," ",t]}):e.jsx(J,{className:"h-6 w-6 text-primary/30 transition-colors group-hover:text-accent sm:h-8 sm:w-8"})}),e.jsxs("div",{className:"min-w-0",children:[e.jsx("h2",{className:"font-display text-xl leading-snug text-primary transition-all group-hover:italic
5sm:text-2xl",children:l}),e.jsxs("p",{className:"mt-2 text-sm text-muted-foreground",children:[r,o&&e.jsxs(e.Fragment,{children:[" · ",o]})]})]}),e.jsxs("div",{className:"flex flex-col items-end gap-3",children:[a.length>0&&e.jsx("div",{className:"flex flex-wrap justify-end gap-1.5",children:a.map(i=>e.jsx("span",{className:"text-[10px] uppercase tracking-wider px-2 py-0.5 border border-border text-muted-foreground",children:f[i]},i))}),(s.spotify_url||s.apple_url)&&e.jsxs("div",{className:"flex items-center gap-1.5",children:[s.spotify_url&&e.jsx("button",{type:"button",onClick:i=>{i.preventDefault(),i.stopPropagation(),window.open(s.spotify_url,"_blank","noopener,noreferrer")},"aria-label":"Kuuntele Spotifyssä",title:"Kuuntele Spotifyssä",className:"inline-flex h-8 w-8 items-center justify-center rounded-full border border-border bg-card text-foreground/70 transition hover:text-[#1DB954] hover:border-[#1DB954]",children:e.jsx(w,{className:"h-4 w-4"})}),s.apple_url&&e.jsx("button",{type:"button",onClick:i=>{i.preventDefault(),i.stopPropagation(),window.open(s.apple_url,"_blank","noopener,noreferrer")},"aria-label":"Kuuntele Apple Podcastissa",title:"Kuuntele Apple Podcastissa",className:"inline-flex h-8 w-8 items-center justify-center rounded-full border border-border bg-card text-foreground/70 transition hover:text-[#A020F0] hover:border-[#A020F0]",children:e.jsx(S,{className:"h-4 w-4"})})]})]})]});return e.jsx("li",{children:s.slug?e.jsx(O,{to:"/podcast/$slug",params:{slug:s.slug},className:"block",children:g}):s.link?e.jsx("a",{href:s.link,target:"_blank",rel:"noopener noreferrer",className:"block",children:g}):e.jsx("div",{children:g})})}export{ce 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.