PageSourceSearch

https://overluxe-news.lovable.app/assets/PensieroDelGiornoComplete-DNqk4vJm.js

js overluxe-news.lovable.app collected 2026-10-03 03:36:05 UTC 5,597 bytes, 2 lines download raw bytes

1import{u as _,r as l,j as e}from"./react-vendor-e8ufXtXh.js";import{D,a as B,b as M,c as R,S as T}from"./ArticleLikeButton-DJzE25Yq.js";import{f as G,s as I}from"./index-DsyDDnOV.js";import{toast as f}from"./sonner-DUSrAnlX.js";import{P as L,l as $,t as O}from"./icons-449MeiT9.js";import"./editor-D2jNx_9Z.js";import"./ui-97X-Jgd3.js";import"./query-dFEHUs04.js";import"./supabase-Dca6nhWe.js";import"./seo-B7Nk5WLt.js";import"./i18n-CYER3Avd.js";G();const U="https://www.overluxe.it/pensiero-del-giorno",A="https://www.overluxe.it/share-pensiero-del-giorno.jpg?v=pdg-20260525banner",F=d=>U,ee=({className:d=""})=>{const h=_(),[u,n]=l.useState(!1),[m,x]=l.useState(0),[i,g]=l.useState(0),[a,b]=l.useState(null),[j,w]=l.useState(!0),[y,v]=l.useState(!1),o=l.useRef(null);l.useEffect(()=>{(async()=>{try{const{data:r,error:t}=await I.from("pensieri").select("*").eq("status","published").order("published_at",{ascending:!1}).limit(1).maybeSingle();if(t)throw t;r&&b(r)}catch(r){console.error("Error fetching pensiero del giorno:",r)}finally{w(!1)}})()},[]);const N=s=>{s.stopPropagation(),s.preventDefault();const r=o.current;if(!r||!(a!=null&&a.audio_url))return;if(u){r.pause(),n(!1);return}try{r.muted=!1,r.volume=1,(!r.src||r.src!==a.audio_url)&&(r.src=a.audio_url,r.load())}catch(c){}const t=r.play();n(!0),t&&typeof t.then=="function"&&t.catch(c=>{console.error("Errore audio:",c);try{r.muted=!0,r.play().then(()=>{setTimeout(()=>{try{r.muted=!1,r.volume=1}catch(p){}},50)}).catch(p=>{console.error("Fallback audio fallito:",p),f.error("Errore riproduzione audio"),n(!1)})}catch(p){f.error("Errore riproduzione audio"),n(!1)}})},P=()=>{o.current&&x(o.current.currentTime)},S=()=>{o.current&&g(o.current.duration)},k=s=>{if(s.stopPropagation(),!o.current||i===0)return;const r=s.currentTarget.getBoundingClientRect(),c=(s.clientX-r.left)/r.width;o.current.currentTime=c*i},E=s=>{const r=Math.floor(s/60),t=Math.floor(s%60);return"".concat(r,":").concat(t.toString().padStart(2,"0"))};if(j)return e.jsx("div",{className:"".concat(d),children:e.jsx("div",{className:"h-11 rounded-lg animate-pulse bg-gradient-to-r from-amber-100/40 to-amber-50/20 border border-amber-300/30"})});if(!a)return null;const C=()=>h("/pensiero-del-giorno");return e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"".concat(d),children:e.jsxs("div",{onClick:C,className:"flex items-center gap-2.5 pl-1.5 pr-3 py-1.5 rounded-xl cursor-pointer transition-all duration-300 hover:shadow-lg active:scale-[0.99]",style:{background:"linear-gradient(135deg, #722F37 0%, #5C252B 50%, #6B2D35 100%)",border:"1.5px solid rgba(212, 184, 150, 0.4)",boxShadow:"0 3px 14px rgba(92, 37, 43, 0.4), inset 0 1px 0 rgba(255,255,255,0.08)"},children:[e.jsx("div",{className:"w-9 h-9 rounded-full p-[2px] flex-shrink-0",style:{background:"linear-gradient(135deg, #d4b896 0%, #c4a882 100%)",boxShadow:"0 2px 8px rgba(0,0,0,0.25)"},children:e.jsx("img",{src:a.cover_image_url||"/lovable-uploads/9ebd3939-8a59-42bf-ab88-3e257bc8af65.webp",alt:"Pensiero",className:"w-full h-full rounded-full object-cover"})}),e.jsxs("div",{className:"flex flex-col leading-none",children:[e.jsx("span",{className:"text-[7px] font-serif tracking-[2px] uppercase",style:{color:"#d4b896"},children:"✦ Oggi ✦"}),e.jsx("span",{className:"text-[13px] font-serif font-bold tracking-wide whitespace-nowrap",style:{color:"#f5efe6"},children:"Pensiero del Giorno"})]}),e.jsxs("div",{className:"flex items-center gap-1.5 ml-auto",children:[e.jsx("button",{onClick:N,className:"w-7 h-7 rounded-full flex items-center justify-center transition-all duration-200 hover:scale-110",style:{background:"linear-gradient(145deg, #d4b896 0%, #c4a882 100%)",boxShadow:"0 2px 8px rgba(0,0,0,0.25), inset 0 1px 0 rgba(255,255,255,0.3)"},"aria-label":u?"Pausa":"Riproduci",children:u?e.jsx(L,{className:"w-3 h-3",style:{color:"#5C252B"}}):e.jsx($,{className:"w-3 h-3 ml-0.5",style:{color:"#5C252B"}})}),e.jsx("div",{className:"w-14 h-[4px] rounded-full cursor-pointer overflow-hidden",style:{background:"rgba(212, 184, 150, 0.2)"},onClick:k,children:e.jsx("div",{className:"h-full rounded-full transition-all duration-100",style:{width:i>0?"".concat(m/i*100,"%"):"0%",background:"linear-gradient(90deg, #d4b896, #f5efe6)"}})}),e.jsx("span",{className:"text-[9px] font-mono w-7 text-center",style:{color:"#d4b896"},children:E(i-m)})]})]})}),a.audio_url&&e.jsx("audio",{ref:o,src:a.audio_url,onTimeUpdate:P,onLoadedMetadata:S,onPlay:()=>n(!0),onPause:()=>n(!1),onEnded:()=>
1n(!1),preload:"auto",playsInline:!0,"webkit-playsinline":"true"}),e.jsx(D,{open:y,onOpenChange:v,children:e.jsxs(B,{className:"sm:max-w-md",children:[e.jsx(M,{children:e.jsxs(R,{className:"flex items-center space-x-2",children:[e.jsx(O,{className:"w-5 h-5",style:{color:"#8B4513"}}),e.jsx("span",{children:"Condividi il Pensiero del Giorno"})]})}),e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"text-center",children:[e.jsx("div",{className:"w-16 h-16 rounded-full p-0.5 shadow-lg mx-auto mb-3",style:{background:"linear-gradient(135deg, #8B4513 0%, #c9a227 50%, #6B4423 100%)"},children:e.jsx("img",{src:A,alt:"Pensiero del Giorno",className:"w-full h-full rounded-full object-cover"})}),e.jsx("h4",{className:"font-bold text-[hsl(var(--bordeaux))]",children:a.title}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"Pensiero del Giorno di Max Valente"})]}),e.jsx(T,{url:F(a.id),title:"".concat(a.title," - Pensiero del Giorno di Max Valente"),className:"light-mode"})]})]})})]})};export{ee as default};
2//# sourceMappingURL=PensieroDelGiornoComplete-DNqk4vJm.js.map

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.