1import{r as c,j as e,M as j}from"./index-grvql_R-.js";import{u as v}from"./useSponsors-BuDCp-kt.js";import{A as b}from"./AdjustableImg-FaM7naSa.js";import{m as N}from"./PageLayout-ED16nBY6.js";const f=40;function $({className:t,cardClassName:m,variant:i="scroll"}){const{sponsors:d,loading:g}=v(),a=d.filter(s=>s.is_main_partner&&s.kind!=="collaborator"),o=c.useRef(null),[w,u]=c.useState(30);if(c.useLayoutEffect(()=>{const s=o.current;if(!s)return;const r=()=>{const n=s.scrollWidth/2;n>0&&u(n/f)};r();const l=new ResizeObserver(r);return l.observe(s),()=>l.disconnect()},[d,i]),c.useEffect(()=>{(o.current?.querySelectorAll("img")??[]).forEach(r=>r.addEventListener("load",()=>{const l=o.current;if(!l)return;const n=l.scrollWidth/2;n>0&&u(n/f)},{once:!0}))},[d]),g||a.length===0)return null;const p=a.length===1,h=a.length?Array.from({length:Math.max(1,Math.ceil(5/a.length))}).flatMap(()=>a):[];return e.jsx(N.div,{initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{duration:.6,ease:[.22,1,.36,1]},className:t??"max-w-4xl mx-auto px-6 mb-10",children:e.jsxs("div",{className:`relative bg-hero rounded-2xl p-6 sm:p-8 md:p-10 text-primary-foreground overflow-hidden shadow-elegant ${m??""}`,children:[e.jsxs("div",{className:"absolute inset-0 opacity-20 pointer-events-none",children:[e.jsx("div",{className:"absolute top-4 right-4 w-40 h-40 rounded-full bg-[var(--granate-glow)] blur-3xl"}),e.jsx("div",{className:"absolute -bottom-4 -left-4 w-48 h-48 rounded-full bg-[var(--azul)] blur-3xl"})]}),e.jsxs("div",{className:"relative flex flex-col items-center gap-6 md:gap-8 text-center",children:[e.jsx("p",{className:"text-[10px] uppercase tracking-[0.35em] text-white/70",children:p?"Main Partner":"Main Partners"}),p?e.jsx(x,{partner:a[0],size:"large"}):i==="grid"?e.jsx("div",{className:`w-full grid justify-items-center gap-4 sm:gap-6 ${a.length===2?"grid-cols-1 sm:grid-cols-2 max-w-2xl mx-auto":"grid-cols-2 sm:grid-cols-3"}`,children:a.map(s=>e.jsx(x,{partner:s},s.id))}):e.jsx("div",{className:"w-full -mx-6 sm:-mx-8 md:-mx-10 overflow-hidden [width:calc(100%+3rem)] sm:[width:calc(100%+4rem)] md:[width:calc(100%+5rem)]",children:e.jsx("div",{ref:o,className:"flex w-max gap-4 md:gap-6 px-3 animate-marquee",style:{animationDuration:`${w}s`},children:[...h,...h].map((s,r)=>e.jsx(x,{partner:s},`${s.id}-${r}`))})})]})]})})}function x({partner:t,size:m="normal"}){const i=m==="large"?"h-32 sm:h-40 md:h-48 w-[240px] sm:w-[320px] md:w-[400px] px-8 py-6":"h-24 sm:h-28 md:h-32 w-full min-w-[150px] sm:min-w-[180px] md:min-w-[210px] p-4 md:p-5";return e.jsx(j,{to:"/patrocinadores/$slug",params:{slug:t.slug},waveLabel:t.name,className:"shrink-0",children:e.jsxs("div",{className:"flex flex-col items-center gap-2 w-full",children:[e.jsx("div",{className:`bg-white rounded-xl shadow-glow hover:scale-105 active:scale-95 transition-transform cursor-pointer flex items-center justify-center ${i}`,children:t.logo_url?e.jsx("span",{className:"relative block h-full aspect-square max-w-full overflow-hidden",children:e.jsx(b,{src:t.logo_url,alt:t.name,className:"absolute inset-0 h-full w-full object-contain"})}):e.jsx("span",{className:"text-granate font-bold text-sm text-center",children:t.name})}),e.jsx("p",{className:"text-[11px] md:text-xs uppercase tracking-[0.14em] text-white/85 text-center font-semibold line-clamp-2",children:t.name})]})})}export{$ as M};
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.