oraculo-ui 0.1.43 → 0.1.44

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs.js CHANGED
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("react/jsx-runtime"),P=require("@mui/material"),C=require("react"),xe=require("@splidejs/react-splide"),ze=require("@mui/material/Box"),Le=require("@mui/material/Typography"),We=require("@mui/material/Stack"),J=require("@mui/icons-material"),Me=require("@mui/icons-material/ChevronLeftRounded"),Ae=require("@mui/icons-material/ChevronRightRounded"),Ge=require("@mui/material/useMediaQuery"),le=require("firebase/firestore"),q=t=>t&&t.__esModule?t:{default:t},Ue=q(C),y=q(ze),G=q(Le),z=q(We),me=q(Me),fe=q(Ae),De=q(Ge);function I({children:t,onClick:a,href:r,target:s,rel:l,type:o="button",disabled:n=!1,variant:d="primary",size:x,fullWidth:g=!1,fullHeight:m=!1,className:_="",ariaLabel:i,leftIcon:j,rightIcon:c,iconOnly:u}){const E=!!t&&t!==!0,$=(!!j?1:0)+(!!c?1:0)==1,T=u!=null?u:$&&!E,w=["orc-btn",d==="secondary"?"orc-btn--secondary":d==="tertiary"?"orc-btn--tertiary":"orc-btn--primary",x?`orc-btn--${x}`:"",g?"orc-btn--full":"",m?"orc-btn--fullHeight":"",T?"orc-btn--iconOnly":"",_].filter(Boolean).join(" "),O=e.jsxs(e.Fragment,{children:[j&&e.jsx("span",{className:"orc-btn__icon",children:j}),!T&&e.jsx("span",{className:"orc-btn__label",children:t}),c&&e.jsx("span",{className:"orc-btn__icon",children:c})]}),F=n?!0:void 0;return r?e.jsx(P.Link,{href:r,target:s,rel:l,"aria-label":i,"aria-disabled":F,tabIndex:F?-1:void 0,className:w,onClick:F?B=>B.preventDefault():a,children:O}):e.jsx("button",{type:o,onClick:a,disabled:!!F,"aria-label":i,className:w,children:O})}function U({title:t,iconUrl:a,size:r="md",className:s=""}){const o=["orc-section-title",r?`orc-section-title--${r}`:"",s].filter(Boolean).join(" ");return e.jsxs("div",{className:o,children:[a&&e.jsx("img",{src:a,alt:"",className:"orc-section-title__icon"}),e.jsx("h2",{className:"orc-section-title__title",children:t})]})}const ne=({total:t,active:a,onSelect:r,className:s=""})=>{if(t<=1)return null;const l=["orc-dots",s].filter(Boolean).join(" ");return e.jsx("div",{className:l,role:"tablist",children:Array.from({length:t}).map((o,n)=>e.jsx("span",{className:"orc-dots__cell",children:e.jsx("button",{type:"button",role:"tab","aria-selected":n===a,"aria-label":`Ir al slide ${n+1}`,className:"orc-dots__dot"+(n===a?" orc-dots__dot--active":""),onClick:()=>r==null?void 0:r(n)})},n))})};function A({children:t,minWidth:a=32,spacing:r=2,justify:s="stretch",columns:l=null}){const o=l||`repeat(auto-fit, minmax(${a}px, 1fr))`,n=typeof r=="number"?`${r*8}px`:r;return e.jsx("div",{style:{display:"grid",gridTemplateColumns:o,justifyItems:s,gap:n,height:"inherit"},children:t})}function te({src:t,alt:a}){return e.jsx(P.Box,{sx:{position:"relative",width:{xs:80,md:160},height:{xs:48,md:96},display:"inline-block"},children:e.jsx(P.Box,{component:"img",src:t,alt:a,sx:{position:"absolute",top:0,left:0,width:"100%",height:"100%",objectFit:"contain"}})})}function He({title:t,subtitle:a}){return e.jsxs("div",{className:"oli-font",style:{display:"flex",alignItems:"center",gap:"6px",color:"#fff"},children:[e.jsx("span",{style:{fontWeight:700,fontSize:"12px",lineHeight:"16px"},children:t}),a&&e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"6px"},children:[e.jsxs("svg",{width:"4",height:"4",viewBox:"0 0 5 5",xmlns:"http://www.w3.org/2000/svg",style:{flexShrink:0},children:[" ",e.jsx("circle",{cx:"2.5",cy:"2.5",r:"2.5",fill:"white"})," "]}),e.jsx("span",{style:{fontWeight:400,fontSize:"12px",lineHeight:"16px"},children:a})]})]})}function ge({text:t,color:a="#ff3b3b",textColor:r="#fff"}){return e.jsx("span",{className:"oli-font",style:{backgroundColor:a,color:r,borderRadius:"8px",padding:"4px 8px",fontSize:"12px",lineHeight:"16px",fontWeight:700,width:"41px",height:"16px",textAlign:"center"},children:t})}function he({live:t,time:a}){return e.jsxs("div",{className:"oli-font",style:{display:"flex",alignItems:"center",gap:"8px"},children:[t&&e.jsx(ge,{text:"En vivo"}),a&&e.jsx("span",{style:{fontSize:"14px",fontWeight:400,lineHeight:"18px",paddingTop:"4px"},children:a})]})}function je({title:t,subtitle:a,live:r=!1,time:s=""}){return e.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",color:"#FFFFFF"},children:[e.jsx(He,{title:t,subtitle:a}),e.jsx(he,{live:r,time:s})]})}const qe="oraculo__OraculoEventLabel-module__label___c64Xw",Xe={label:qe};function se({text:t}){return e.jsx("span",{className:Xe.label,children:t})}const Je="oraculo__OraculoEventLeague-module__container___rdk4F",Ke={container:Je};function ve({title:t}){return e.jsx("div",{className:Ke.container,children:t.toUpperCase()})}const Ye="oraculo__OraculoEventScore-module__scoreWrapper___fWwEr",Qe="oraculo__OraculoEventScore-module__name___r4uL6",Ve="oraculo__OraculoEventScore-module__score___Xl03M",Ze="oraculo__OraculoEventScore-module__normal___cCNFz",et="oraculo__OraculoEventScore-module__small___fVt8E",X={scoreWrapper:Ye,name:Qe,score:Ve,normal:Ze,small:et};function ae({text:t,name:a,size:r="normal"}){return e.jsxs("div",{className:`${X.scoreWrapper} ${X[r]}`,children:[e.jsx("div",{className:`${X.score} ${X[r]}`,children:t}),a&&e.jsx("span",{className:`${X.name} ${X[r]}`,children:a})]})}const tt="oraculo__OraculoEventTeamInfo-module__team___UfpUs",ot="oraculo__OraculoEventTeamInfo-module__logo___fKCl3",nt="oraculo__OraculoEventTeamInfo-module__name___4ikm-",st="oraculo__OraculoEventTeamInfo-module__regular___ag826",at="oraculo__OraculoEventTeamInfo-module__compact___RCNOs",Q={team:tt,logo:ot,name:nt,regular:st,compact:at};function Y({name:t,logo:a,size:r="regular"}){return e.jsxs("div",{className:`oli-font ${Q.team} ${Q[r]}`,children:[e.jsx("img",{src:a,alt:t,className:Q.logo}),e.jsx("span",{className:Q.name,children:t})]})}const rt=xe.Splide,it=xe.SplideSlide,D=C.forwardRef(({items:t=[],renderItem:a,perPage:r=1,gap:s="0px",breakpoints:l,options:o={},className:n="",onMove:d,useIndexAsKey:x=!1},g)=>{const m=C.useRef(null);C.useImperativeHandle(g,()=>({next:()=>{var c;return(c=m.current)==null?void 0:c.go(">")},prev:()=>{var c;return(c=m.current)==null?void 0:c.go("<")},go:c=>{var u;return(u=m.current)==null?void 0:u.go(c)}}));const _=C.useCallback(c=>{const u=c.index,E=c.length,N=c.options.perPage||1,S=u===0,$=u>=E-N;d==null||d({index:u,isStart:S,isEnd:$,total:E})},[d]),i=C.useCallback(c=>{_(c)},[_]),j={type:"slide",trimSpace:!1,drag:!0,pagination:!1,arrows:!1,rewind:!1,focus:"start",autoWidth:!1,perPage:r,gap:s,breakpoints:l,...o};return e.jsx("div",{className:n,style:{width:"100%"},children:e.jsx(rt,{ref:m,options:j,onMove:_,onMounted:i,children:t.map((c,u)=>{var E;return e.jsx(it,{children:a(c,u)},x?u:(E=c.id)!=null?E:u)})})})}),K=({imageUrl:t,onClick:a,size:r="sm",fillParent:s=!1})=>{const l=r==="lg"?{w:280,h:352}:{w:152,h:168},o=d=>{d.stopPropagation(),a==null||a()},n=s?{width:"100%",height:"100%"}:{width:`${l.w}px`,height:`${l.h}px`};return e.jsxs(y.default,{onClick:a,role:"button",sx:{position:"relative",borderRadius:"12px",overflow:"hidden",boxSizing:"border-box",transition:"transform .15s ease, box-shadow .15s ease",...n,"&:hover":{transform:"translateY(-2px)",boxShadow:8,cursor:"pointer"},"&:hover .oraculo-game-card-overlay":{opacity:1},"&:hover .oraculo-game-card-btn":{opacity:1,transform:"translate(-50%, -50%) scale(1)",pointerEvents:"auto"}},children:[e.jsx("img",{src:t,alt:"Juego de casino",loading:"lazy",style:{width:"100%",height:"100%",objectFit:"cover",display:"block",borderRadius:"inherit"}}),e.jsx(y.default,{className:"oraculo-game-card-overlay",sx:{position:"absolute",inset:0,backgroundColor:"rgba(0, 0, 0, 0.45)",opacity:0,transition:"opacity .15s ease",pointerEvents:"none",zIndex:1}}),e.jsx(y.default,{className:"oraculo-game-card-btn",sx:{position:"absolute",top:"50%",left:"50%",zIndex:2,transform:"translate(-50%, -50%) scale(0.95)",opacity:0,transition:"opacity .15s ease, transform .15s ease",pointerEvents:"none"},children:e.jsx(I,{variant:"primary",size:"md",onClick:o,children:"JUGAR"})})]})};function be({imageUrl:t,orden:a=1,onClick:r,sizes:s={xs:{w:104,h:112,r:18,font:48},md:{w:186,h:264,r:22.6,font:64}}}){var m,_,i,j;const l=(c,u)=>{var E,N,S,$;return{xs:(N=(E=s.xs)==null?void 0:E[c])!=null?N:u,md:($=(S=s.md)==null?void 0:S[c])!=null?$:u}},o=l("w",186),n=l("h",264),d=l("r",22.6),x=l("font",64),g={xs:Math.round(((_=(m=s.xs)==null?void 0:m.font)!=null?_:64)*.28),md:Math.round(((j=(i=s.md)==null?void 0:i.font)!=null?j:64)*.28)};return e.jsxs(y.default,{sx:{position:"relative",width:"100%",maxWidth:{xs:`${o.xs}px`,md:`${o.md}px`},aspectRatio:{xs:`${o.xs}/${n.xs}`,md:`${o.md}/${n.md}`},borderRadius:{xs:`${d.xs}px`,md:`${d.md}px`},boxSizing:"border-box",overflow:"visible",pb:{xs:`${g.xs}px`,md:`${g.md}px`}},children:[e.jsx(y.default,{sx:{position:"absolute",inset:0,borderRadius:"inherit",overflow:"hidden"},children:e.jsx(K,{imageUrl:t,onClick:r,size:"lg",fillParent:!0})}),e.jsx(y.default,{component:"span",sx:{position:"absolute",left:8,bottom:{xs:`-${g.xs}px`,md:`-${g.md}px`},fontFamily:"secondary",fontSize:{xs:`${x.xs}px`,md:`${x.md}px`},lineHeight:1,color:"#3CC666",WebkitTextStroke:"1px #9ee86e",zIndex:3,userSelect:"none"},children:a})]})}const ye=({logo:t,provider:a,providerName:r,machine:s,onClick:l})=>{var o;return e.jsxs(y.default,{onClick:l,sx:{flex:"0 0 auto",position:"relative",borderRadius:"20px",overflow:"hidden",width:{xs:100,md:180},height:{xs:200,md:380},transition:"width .50s ease, transform .28s ease",willChange:"width, transform",cursor:"pointer",zIndex:0,"&:hover":{zIndex:2,width:{md:260,xs:110}},"&:hover .orc-live-provider-label":{opacity:1}},children:[e.jsx(y.default,{component:"img",src:t,alt:`Juego ${s!=null?s:""}`,sx:{position:"absolute",inset:0,width:"100%",height:"100%",objectFit:"cover",display:"block"}}),e.jsx(y.default,{className:"orc-live-provider-label",sx:{position:"absolute",left:"50%",top:{xs:"75%",md:"80%"},transform:"translate(-50%, -50%)",zIndex:3,opacity:0,transition:"opacity .25s ease",pointerEvents:"none"},children:e.jsx(G.default,{sx:{color:"#fff",fontWeight:700,fontSize:{xs:11,md:14},textTransform:"capitalize"},children:(o=a!=null?a:r)!=null?o:""})})]})},V=12,re=({items:t,layout:a="grid",onClick:r})=>{var s;if(a==="mosaic"){const l=t[0],o=t.slice(1,5);return e.jsxs(y.default,{sx:{display:"grid",gridTemplateRows:{xs:"repeat(2, 112px)",md:"repeat(2, 168px)"},gridTemplateColumns:{xs:"184px",md:"280px"},gridAutoFlow:"column",gridAutoColumns:{xs:"104px",md:"152px"},columnGap:`${V}px`,rowGap:`${V}px`,alignItems:"stretch",justifyItems:"stretch"},children:[l&&e.jsx(y.default,{sx:{width:{xs:184,md:280},height:{xs:234,md:352},gridRow:"1 / span 2",overflow:"hidden",borderRadius:2},children:e.jsx(K,{imageUrl:`https://olimpo.bet${(s=l.imageUrl)!=null?s:""}`,size:"lg",fillParent:!0,onClick:()=>r==null?void 0:r(l,0)})}),o.map((n,d)=>{var x;return e.jsx(y.default,{sx:{width:{xs:104,md:152},height:{xs:112,md:168},overflow:"hidden",borderRadius:2},children:e.jsx(K,{imageUrl:`https://olimpo.bet${(x=n.imageUrl)!=null?x:""}`,size:"sm",fillParent:!0,onClick:()=>r==null?void 0:r(n,d+1)})},n.id)})]})}return e.jsx(y.default,{sx:{display:"grid",gridTemplateColumns:{xs:"repeat(2, 104px)",md:"repeat(2, 152px)"},gridTemplateRows:{xs:"repeat(2, 112px)",md:"repeat(2, 168px)"},gap:`${V}px`,gridAutoFlow:"column"},children:t.map((l,o)=>{var n,d;return e.jsx(y.default,{sx:{overflow:"hidden",borderRadius:2},children:e.jsx(K,{imageUrl:`https://olimpo.bet${(n=l.imageUrl)!=null?n:""}`,size:"sm",fillParent:!0,onClick:()=>r==null?void 0:r(l,o)})},(d=l.id)!=null?d:o)})})},oe=({title:t,amount:a,subtitle:r,buttonText:s,onButtonClick:l,backgroundImage:o,alt:n,className:d="",variant:x="small"})=>{const g=a?a.slice(0,2):"",m=a?a.slice(2):"",_=x==="large";return e.jsxs(y.default,{className:d,sx:{position:"relative",width:"100%",maxWidth:{xs:328,lg:_?618:456},mx:"auto"},children:[o&&e.jsx(y.default,{sx:{position:"relative",width:"100%",aspectRatio:{xs:"328 / 188",lg:_?"618 / 346":"456 / 272"},borderRadius:"14px",overflow:"hidden"},children:e.jsx(y.default,{component:"img",src:o,alt:n!=null?n:"Fondo promocional",sx:{width:"100%",height:"100%",objectFit:"cover",objectPosition:{xs:"50% 0%",lg:"45% 0%"},display:"block"}})}),e.jsx(y.default,{sx:{position:"absolute",inset:0,display:"flex",alignItems:"center",justifyContent:"flex-end",color:"#e7f8ff",textAlign:"center",pl:"14%",pr:{xs:"14%",lg:"15%"}},children:e.jsxs(y.default,{sx:{maxWidth:"60%",display:"flex",flexDirection:"column",alignItems:"center"},children:[t&&e.jsx(G.default,{sx:{fontSize:{xs:12,lg:20},fontWeight:400,color:"#e7f8ff"},children:t}),a&&e.jsxs(y.default,{component:"p",sx:{fontFamily:'"secondary", sans-serif',lineHeight:{xs:.9,lg:.87},m:"4px 0",background:"linear-gradient(175deg, #EDC421 -12.56%, #FFFABF 17.99%, #EDC421 49.74%)",WebkitBackgroundClip:"text",WebkitTextFillColor:"transparent",WebkitTextStroke:"0.5px #fff8c1",filter:"drop-shadow(0px 4px 0px #8D4406) drop-shadow(0px 4px 4px rgba(28, 28, 28, 0.4))",display:"flex",alignItems:"baseline",justifyContent:"center"},children:[e.jsx(y.default,{component:"span",sx:{fontSize:{xs:35,lg:48},mr:.5},children:g}),e.jsx(y.default,{component:"span",sx:{fontSize:{xs:52,lg:77}},children:m})]}),r&&e.jsx(G.default,{sx:{pb:"20px",fontSize:14,fontWeight:600,color:"#e7f8ff"},children:r}),s&&e.jsx(I,{onClick:l,children:s})]})})]})},_e=({text:t,buttonLabel:a="Conoce más",onClick:r,imgAlt:s="Club Olimpo",imgSrcMobile:l,imgSrcDesktopBg:o,imgSrcDesktopLogo:n})=>e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"orc-co-bgMobile",children:e.jsx("img",{src:l,alt:s,className:"orc-co-bgMobileImg"})}),e.jsxs("div",{className:"orc-co-bgDesktop",children:[o&&e.jsx("div",{className:"orc-co-fillHost",children:e.jsx("img",{src:o,alt:`${s} fondo`,className:"orc-co-bgDesktopImg"})}),n&&e.jsx("div",{className:"orc-co-logo",children:e.jsx("img",{src:n,alt:`${s} logo`,className:"orc-co-logoImg"})}),e.jsxs("div",{className:"orc-co-desktopContent",children:[e.jsx("p",{className:"orc-co-captionDesktop",children:t}),e.jsx(I,{onClick:r,variant:"primary",size:"md",children:a})]})]}),e.jsxs("div",{className:"orc-co-bottom",children:[e.jsx("p",{className:"orc-co-caption",children:t}),e.jsx(I,{onClick:r,variant:"primary",size:"md",children:a})]})]}),lt="oraculo__OraculoEventCombinadasCard-module__card___ulQeY",ct="oraculo__OraculoEventCombinadasCard-module__combinadas___Gxrld",dt="oraculo__OraculoEventCombinadasCard-module__apuestaItem___YnYMy",ut="oraculo__OraculoEventCombinadasCard-module__lineContainer___G5rbU",pt="oraculo__OraculoEventCombinadasCard-module__circle___eehm-",xt="oraculo__OraculoEventCombinadasCard-module__line___Eb2pK",mt="oraculo__OraculoEventCombinadasCard-module__apuestaText___b5s7S",ft="oraculo__OraculoEventCombinadasCard-module__cuotaTotal___Lohvu",H={card:lt,combinadas:ct,apuestaItem:dt,lineContainer:ut,circle:pt,line:xt,apuestaText:mt,cuotaTotal:ft};function Se({event:t}){var s;function a(l){var m;const o=(m=l.betoffers)!=null?m:[],n=l.homeName,d=l.awayName,x=o.map(_=>{var u,E,N,S;let i=_.outcomes[0],j="",c=i!=null&&i.line?i.line/1e3:"";return["Más de","Mas de","Over"].includes(i==null?void 0:i.label)?(j=`Más de ${c}`,i!=null&&i.participant&&(j=`${i.participant} - ${j}`)):["Menos de","Menos"].includes(i==null?void 0:i.label)?(j=`Menos de ${c}`,i!=null&&i.participant&&(j=`${i.participant} - ${j}`)):["Sí","No"].includes(i==null?void 0:i.label)?(j=i==null?void 0:i.label,i!=null&&i.participant&&(j=`${i.participant} - ${j}`)):["1X","12","X2"].includes(i==null?void 0:i.label)?i.label==="1X"?j=`${n} o Empate`:i.label==="12"?j=`${n} o ${d}`:i.label==="X2"&&(j=`${d} o Empate`):(i!=null&&i.participant?j=i.participant:j=(u=i==null?void 0:i.label)!=null?u:"",c!==""&&j===i.label&&(j=`${i.label} ${c}`)),{id:(E=i==null?void 0:i.id)!=null?E:0,value:j,label:_.criterion.label,odds:(N=i==null?void 0:i.odds)!=null?N:0,bl:(S=i==null?void 0:i.label)!=null?S:0}}),g=x.reduce((_,i)=>_+i.odds,0)/1e3;return{outcomes:x,total:g.toFixed(2)}}const r=a(t);return e.jsxs("div",{className:H.card,children:[e.jsx("div",{className:H.combinadas,children:e.jsxs(z.default,{direction:"column",spacing:.5,useFlexGap:!0,children:[e.jsx(U,{title:t.name,iconUrl:"/assets/img/home/Combinadas/pelota.png",size:"xs"}),e.jsx("img",{src:"/assets/img/home/Combinadas/line.png"}),e.jsx(z.default,{direction:"column",spacing:.5,useFlexGap:!0,children:r.outcomes.map((l,o)=>e.jsxs("div",{className:H.apuestaItem,children:[e.jsxs("div",{className:H.lineContainer,children:[e.jsx("div",{className:H.circle}),o<r.outcomes.length-1&&e.jsx("div",{className:H.line})]}),e.jsxs("div",{className:H.apuestaText,children:[e.jsx("strong",{children:l.value})," ","| ",l.label]})]},o))})]})}),e.jsxs("button",{onClick:()=>{var l,o;return console.log((o=(l=r==null?void 0:r.outcomes)==null?void 0:l.map(n=>n==null?void 0:n.id))!=null?o:[])},className:H.cuotaTotal,children:[e.jsxs("span",{children:["Cuota total: ",e.jsx("strong",{children:(((s=t.combinadoTotal)!=null?s:0)/1e3).toFixed(2)})]}),e.jsx("img",{src:"/assets/img/home/Combinadas/cuotaTotal.svg",alt:"cuota total"})]})]})}function Ce({event:t,liveData:a,betOffers:r,fondo:s="/assets/img/home/EnVivo/fondo.png"}){var l,o,n,d,x,g,m,_,i,j,c;return e.jsx("div",{style:{backgroundImage:`url(${s})`,backgroundSize:"cover",height:"160px",width:"296px",padding:"12px 16px",borderRadius:"16px"},children:e.jsxs(z.default,{direction:"column",spacing:1,useFlexGap:!0,children:[e.jsxs(z.default,{direction:"column",spacing:1.5,useFlexGap:!0,children:[e.jsx(je,{title:(l=t.path[0].name)!=null?l:"",subtitle:t.group,live:!0,time:(n=(o=a==null?void 0:a.matchClock)==null?void 0:o.minute)!=null?n:""}),e.jsx("div",{style:{padding:"0 4px"},children:e.jsxs(A,{spacing:1.5,columns:"1fr auto 1fr",children:[e.jsx(Y,{name:t.homeName,logo:"/assets/img/home/EnVivo/Juventus.png"}),e.jsx(ae,{text:((x=(d=a==null?void 0:a.score)==null?void 0:d.home)!=null?x:0)+":"+((m=(g=a==null?void 0:a.score)==null?void 0:g.away)!=null?m:0),name:"En vivo"}),e.jsx(Y,{name:t.awayName,logo:"/assets/img/home/EnVivo/Racing.png"})]})})]}),e.jsxs(z.default,{direction:"column",spacing:1,useFlexGap:!0,children:[e.jsx(A,{spacing:1,children:((i=(_=r==null?void 0:r[0])==null?void 0:_.outcomes)!=null?i:[]).map((u,E)=>e.jsx(se,{text:u.label.toUpperCase()},E))}),e.jsx(A,{spacing:2,children:((c=(j=r==null?void 0:r[0])==null?void 0:j.outcomes)!=null?c:[]).map((u,E)=>e.jsx(I,{variant:"primary",disabled:u.odds==null,onClick:()=>{console.log(u.id)},children:u.odds===void 0?"X":(u.odds/1e3).toFixed(2)},E))})]})]})})}const gt="oraculo__OraculoEventDate-module__date___xhIlh",ht={date:gt};function jt({text:t}){return e.jsx("div",{className:`oli-font ${ht.date}`,children:t})}const vt="oraculo__OraculoEventSemanaCard-module__cardContainer___4JuDe",bt="oraculo__OraculoEventSemanaCard-module__cardBackground___vfalD",yt="oraculo__OraculoEventSemanaCard-module__jugadas___W8b7H",Z={cardContainer:vt,cardBackground:bt,jugadas:yt};function Ee({event:t}){var r,s,l,o,n,d,x;function a(g){const m=new Date(g),_=m.toLocaleDateString("es-ES",{weekday:"short"}).toUpperCase(),i=m.getDate().toString().padStart(2,"0"),j=(m.getMonth()+1).toString().padStart(2,"0");let c=m.toLocaleTimeString("es-PE",{hour:"numeric",minute:"2-digit",hour12:!0}).toUpperCase();return c=c.replace(/\./g,"").replace(/A\s*M/i,"AM").replace(/P\s*M/i,"PM"),`${_} ${i}/${j} | ${c}`}return e.jsxs("div",{className:Z.cardContainer,children:[e.jsx(ve,{title:(r=t.group)!=null?r:""}),e.jsx("div",{className:Z.cardBackground,children:e.jsxs(z.default,{direction:"column",spacing:{xs:.5,md:1},useFlexGap:!0,children:[e.jsxs(z.default,{direction:"column",spacing:1,useFlexGap:!0,children:[e.jsxs(A,{spacing:1,columns:"1fr auto 1fr",children:[e.jsx(Y,{name:t.awayName,logo:"/assets/img/home/EventoSemana/Flamengo.png",size:"compact"}),e.jsx(ae,{text:"vs.",name:"",size:"small"}),e.jsx(Y,{name:t.homeName,logo:"/assets/img/home/EventoSemana/RealMadrid.png",size:"compact"})]}),e.jsx(jt,{text:a(t.start)})]}),e.jsxs(z.default,{direction:"column",spacing:{xs:.5,md:1},useFlexGap:!0,children:[e.jsx(A,{spacing:1,children:((o=(l=(s=t==null?void 0:t.outcome)==null?void 0:s[0])==null?void 0:l.outcomes)!=null?o:[]).map((g,m)=>e.jsx(se,{text:g.label.toUpperCase()},m))}),e.jsx("div",{className:Z.jugadas,children:e.jsx(A,{spacing:1,children:((x=(d=(n=t==null?void 0:t.outcome)==null?void 0:n[0])==null?void 0:d.outcomes)!=null?x:[]).map((g,m)=>e.jsx(I,{variant:"primary",fullHeight:!0,onClick:()=>{console.log(g.id)},children:(g.odds/1e3).toFixed(2)},m))})})]})]})})]})}function we({items:t,title:a="Destacados",iconUrl:r,onViewMore:s,className:l=""}){const o=C.useRef(null),[n,d]=C.useState({isStart:!0,isEnd:!1}),x=()=>{var i;(i=o.current)==null||i.prev()},g=()=>{var i;(i=o.current)==null||i.next(),console.log("items: ",t)},m=()=>{s==null||s()},_=l||void 0;return e.jsxs("section",{className:_,style:{width:"100%"},children:[e.jsxs("header",{style:{display:"grid",gridTemplateColumns:"1fr auto auto",alignItems:"center",columnGap:12,rowGap:8,marginBottom:16},children:[e.jsx(U,{title:a,iconUrl:r,size:"md"}),e.jsxs("div",{style:{display:"flex",gap:8},children:[e.jsx(I,{ariaLabel:"Anterior",variant:"secondary",iconOnly:!0,leftIcon:e.jsx(J.ChevronLeftRounded,{}),onClick:x,disabled:n.isStart}),e.jsx(I,{ariaLabel:"Siguiente",variant:"secondary",iconOnly:!0,rightIcon:e.jsx(J.ChevronRightRounded,{}),onClick:g,disabled:n.isEnd})]}),e.jsx(I,{variant:"secondary",onClick:m,children:"Ver más"})]}),e.jsx(D,{ref:o,items:t,perPage:3.395,gap:"16px",options:{autoWidth:!1},breakpoints:{768:{perPage:1.15,focus:"start"},1024:{perPage:2.5,focus:"start"}},renderItem:i=>e.jsx("div",{style:{textAlign:"center",marginTop:16},children:e.jsx("img",{src:`https://olimpo.bet${i.image!==""?i.image:i.summary_image}`,alt:i.title,style:{width:"100%",height:"150px",borderRadius:8,display:"block"}})},`${i.title}-${i.image}`),onMove:({isStart:i,isEnd:j})=>d({isStart:i,isEnd:j})})]})}function ie({items:t,title:a="Top Juegos",iconUrl:r,onCardClick:s}){const l=C.useMemo(()=>t.map((o,n)=>{var d;return{...o,orden:(d=o.orden)!=null?d:n+1,_originalIndex:n}}).sort((o,n)=>o.orden!=null&&n.orden!=null?o.orden-n.orden:o._originalIndex-n._originalIndex),[t]);return e.jsx("section",{style:{width:"100%"},children:e.jsxs(z.default,{direction:"column",spacing:2,useFlexGap:!0,children:[e.jsx(U,{title:a,iconUrl:r,size:"md"}),e.jsx(y.default,{sx:{display:"grid",gridTemplateColumns:{xs:"repeat(3, minmax(0, 1fr))",md:"repeat(6, minmax(0, 1fr))"},gap:{xs:1.5,md:2},justifyItems:"center",width:"100%"},children:l.slice(0,6).map(o=>{var n;return e.jsx(be,{imageUrl:`https://olimpo.bet${(n=o.logo)!=null?n:""}`,orden:o.orden,onClick:()=>s==null?void 0:s(o)},o.machine)})})]})})}const Oe=({items:t,title:a="Casino en vivo",subtitle:r="Disfruta la emoción en tus juegos favoritos y gana en tiempo real.",backgroundMobileUrl:s="",backgroundDesktopUrl:l="",onCardClick:o,onViewMore:n,className:d})=>e.jsxs(y.default,{className:d,sx:{position:"relative",color:"white",overflow:"hidden"},children:[e.jsx(y.default,{sx:{position:"absolute",inset:0,backgroundImage:{xs:`
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),P=require("@mui/material"),C=require("react"),xe=require("@splidejs/react-splide"),Be=require("@mui/material/Box"),ze=require("@mui/material/Typography"),Le=require("@mui/material/Stack"),J=require("@mui/icons-material"),We=require("@mui/icons-material/ChevronLeftRounded"),Me=require("@mui/icons-material/ChevronRightRounded"),Ae=require("@mui/material/useMediaQuery"),le=require("firebase/firestore"),q=t=>t&&t.__esModule?t:{default:t},Ge=q(C),y=q(Be),G=q(ze),z=q(Le),me=q(We),fe=q(Me),Ue=q(Ae);function I({children:t,onClick:a,href:r,target:s,rel:l,type:o="button",disabled:n=!1,variant:d="primary",size:x,fullWidth:g=!1,fullHeight:m=!1,className:_="",ariaLabel:i,leftIcon:j,rightIcon:c,iconOnly:u}){const E=!!t&&t!==!0,$=(!!j?1:0)+(!!c?1:0)==1,T=u!=null?u:$&&!E,w=["orc-btn",d==="secondary"?"orc-btn--secondary":d==="tertiary"?"orc-btn--tertiary":"orc-btn--primary",x?`orc-btn--${x}`:"",g?"orc-btn--full":"",m?"orc-btn--fullHeight":"",T?"orc-btn--iconOnly":"",_].filter(Boolean).join(" "),O=e.jsxs(e.Fragment,{children:[j&&e.jsx("span",{className:"orc-btn__icon",children:j}),!T&&e.jsx("span",{className:"orc-btn__label",children:t}),c&&e.jsx("span",{className:"orc-btn__icon",children:c})]}),F=n?!0:void 0;return r?e.jsx(P.Link,{href:r,target:s,rel:l,"aria-label":i,"aria-disabled":F,tabIndex:F?-1:void 0,className:w,onClick:F?B=>B.preventDefault():a,children:O}):e.jsx("button",{type:o,onClick:a,disabled:!!F,"aria-label":i,className:w,children:O})}function U({title:t,iconUrl:a,size:r="md",className:s=""}){const o=["orc-section-title",r?`orc-section-title--${r}`:"",s].filter(Boolean).join(" ");return e.jsxs("div",{className:o,children:[a&&e.jsx("img",{src:a,alt:"",className:"orc-section-title__icon"}),e.jsx("h2",{className:"orc-section-title__title",children:t})]})}const ne=({total:t,active:a,onSelect:r,className:s=""})=>{if(t<=1)return null;const l=["orc-dots",s].filter(Boolean).join(" ");return e.jsx("div",{className:l,role:"tablist",children:Array.from({length:t}).map((o,n)=>e.jsx("span",{className:"orc-dots__cell",children:e.jsx("button",{type:"button",role:"tab","aria-selected":n===a,"aria-label":`Ir al slide ${n+1}`,className:"orc-dots__dot"+(n===a?" orc-dots__dot--active":""),onClick:()=>r==null?void 0:r(n)})},n))})};function A({children:t,minWidth:a=32,spacing:r=2,justify:s="stretch",columns:l=null}){const o=l||`repeat(auto-fit, minmax(${a}px, 1fr))`,n=typeof r=="number"?`${r*8}px`:r;return e.jsx("div",{style:{display:"grid",gridTemplateColumns:o,justifyItems:s,gap:n,height:"inherit"},children:t})}function te({src:t,alt:a}){return e.jsx(P.Box,{sx:{position:"relative",width:{xs:80,md:160},height:{xs:48,md:96},display:"inline-block"},children:e.jsx(P.Box,{component:"img",src:t,alt:a,sx:{position:"absolute",top:0,left:0,width:"100%",height:"100%",objectFit:"contain"}})})}function De({title:t,subtitle:a}){return e.jsxs("div",{className:"oli-font",style:{display:"flex",alignItems:"center",gap:"6px",color:"#fff"},children:[e.jsx("span",{style:{fontWeight:700,fontSize:"12px",lineHeight:"16px"},children:t}),a&&e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"6px"},children:[e.jsxs("svg",{width:"4",height:"4",viewBox:"0 0 5 5",xmlns:"http://www.w3.org/2000/svg",style:{flexShrink:0},children:[" ",e.jsx("circle",{cx:"2.5",cy:"2.5",r:"2.5",fill:"white"})," "]}),e.jsx("span",{style:{fontWeight:400,fontSize:"12px",lineHeight:"16px"},children:a})]})]})}function ge({text:t,color:a="#ff3b3b",textColor:r="#fff"}){return e.jsx("span",{className:"oli-font",style:{backgroundColor:a,color:r,borderRadius:"8px",padding:"4px 8px",fontSize:"12px",lineHeight:"16px",fontWeight:700,width:"41px",height:"16px",textAlign:"center"},children:t})}function he({live:t,time:a}){return e.jsxs("div",{className:"oli-font",style:{display:"flex",alignItems:"center",gap:"8px"},children:[t&&e.jsx(ge,{text:"En vivo"}),a&&e.jsx("span",{style:{fontSize:"14px",fontWeight:400,lineHeight:"18px",paddingTop:"4px"},children:a})]})}function je({title:t,subtitle:a,live:r=!1,time:s=""}){return e.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",color:"#FFFFFF"},children:[e.jsx(De,{title:t,subtitle:a}),e.jsx(he,{live:r,time:s})]})}const He="oraculo__OraculoEventLabel-module__label___c64Xw",qe={label:He};function se({text:t}){return e.jsx("span",{className:qe.label,children:t})}const Xe="oraculo__OraculoEventLeague-module__container___rdk4F",Je={container:Xe};function ve({title:t}){return e.jsx("div",{className:Je.container,children:t.toUpperCase()})}const Ke="oraculo__OraculoEventScore-module__scoreWrapper___fWwEr",Ye="oraculo__OraculoEventScore-module__name___r4uL6",Qe="oraculo__OraculoEventScore-module__score___Xl03M",Ve="oraculo__OraculoEventScore-module__normal___cCNFz",Ze="oraculo__OraculoEventScore-module__small___fVt8E",X={scoreWrapper:Ke,name:Ye,score:Qe,normal:Ve,small:Ze};function ae({text:t,name:a,size:r="normal"}){return e.jsxs("div",{className:`${X.scoreWrapper} ${X[r]}`,children:[e.jsx("div",{className:`${X.score} ${X[r]}`,children:t}),a&&e.jsx("span",{className:`${X.name} ${X[r]}`,children:a})]})}const et="oraculo__OraculoEventTeamInfo-module__team___UfpUs",tt="oraculo__OraculoEventTeamInfo-module__logo___fKCl3",ot="oraculo__OraculoEventTeamInfo-module__name___4ikm-",nt="oraculo__OraculoEventTeamInfo-module__regular___ag826",st="oraculo__OraculoEventTeamInfo-module__compact___RCNOs",Q={team:et,logo:tt,name:ot,regular:nt,compact:st};function Y({name:t,logo:a,size:r="regular"}){return e.jsxs("div",{className:`oli-font ${Q.team} ${Q[r]}`,children:[e.jsx("img",{src:a,alt:t,className:Q.logo}),e.jsx("span",{className:Q.name,children:t})]})}const at=xe.Splide,rt=xe.SplideSlide,D=C.forwardRef(({items:t=[],renderItem:a,perPage:r=1,gap:s="0px",breakpoints:l,options:o={},className:n="",onMove:d,useIndexAsKey:x=!1},g)=>{const m=C.useRef(null);C.useImperativeHandle(g,()=>({next:()=>{var c;return(c=m.current)==null?void 0:c.go(">")},prev:()=>{var c;return(c=m.current)==null?void 0:c.go("<")},go:c=>{var u;return(u=m.current)==null?void 0:u.go(c)}}));const _=C.useCallback(c=>{const u=c.index,E=c.length,N=c.options.perPage||1,S=u===0,$=u>=E-N;d==null||d({index:u,isStart:S,isEnd:$,total:E})},[d]),i=C.useCallback(c=>{_(c)},[_]),j={type:"slide",trimSpace:!1,drag:!0,pagination:!1,arrows:!1,rewind:!1,focus:"start",autoWidth:!1,perPage:r,gap:s,breakpoints:l,...o};return e.jsx("div",{className:n,style:{width:"100%"},children:e.jsx(at,{ref:m,options:j,onMove:_,onMounted:i,children:t.map((c,u)=>{var E;return e.jsx(rt,{children:a(c,u)},x?u:(E=c.id)!=null?E:u)})})})}),K=({imageUrl:t,onClick:a,size:r="sm",fillParent:s=!1})=>{const l=r==="lg"?{w:280,h:352}:{w:152,h:168},o=d=>{d.stopPropagation(),a==null||a()},n=s?{width:"100%",height:"100%"}:{width:`${l.w}px`,height:`${l.h}px`};return e.jsxs(y.default,{onClick:a,role:"button",sx:{position:"relative",borderRadius:"12px",overflow:"hidden",boxSizing:"border-box",transition:"transform .15s ease, box-shadow .15s ease",...n,"&:hover":{transform:"translateY(-2px)",boxShadow:8,cursor:"pointer"},"&:hover .oraculo-game-card-overlay":{opacity:1},"&:hover .oraculo-game-card-btn":{opacity:1,transform:"translate(-50%, -50%) scale(1)",pointerEvents:"auto"}},children:[e.jsx("img",{src:t,alt:"Juego de casino",loading:"lazy",style:{width:"100%",height:"100%",objectFit:"cover",display:"block",borderRadius:"inherit"}}),e.jsx(y.default,{className:"oraculo-game-card-overlay",sx:{position:"absolute",inset:0,backgroundColor:"rgba(0, 0, 0, 0.45)",opacity:0,transition:"opacity .15s ease",pointerEvents:"none",zIndex:1}}),e.jsx(y.default,{className:"oraculo-game-card-btn",sx:{position:"absolute",top:"50%",left:"50%",zIndex:2,transform:"translate(-50%, -50%) scale(0.95)",opacity:0,transition:"opacity .15s ease, transform .15s ease",pointerEvents:"none"},children:e.jsx(I,{variant:"primary",size:"md",onClick:o,children:"JUGAR"})})]})};function be({imageUrl:t,orden:a=1,onClick:r,sizes:s={xs:{w:104,h:112,r:18,font:48},md:{w:186,h:264,r:22.6,font:64}}}){var m,_,i,j;const l=(c,u)=>{var E,N,S,$;return{xs:(N=(E=s.xs)==null?void 0:E[c])!=null?N:u,md:($=(S=s.md)==null?void 0:S[c])!=null?$:u}},o=l("w",186),n=l("h",264),d=l("r",22.6),x=l("font",64),g={xs:Math.round(((_=(m=s.xs)==null?void 0:m.font)!=null?_:64)*.28),md:Math.round(((j=(i=s.md)==null?void 0:i.font)!=null?j:64)*.28)};return e.jsxs(y.default,{sx:{position:"relative",width:"100%",maxWidth:{xs:`${o.xs}px`,md:`${o.md}px`},aspectRatio:{xs:`${o.xs}/${n.xs}`,md:`${o.md}/${n.md}`},borderRadius:{xs:`${d.xs}px`,md:`${d.md}px`},boxSizing:"border-box",overflow:"visible",pb:{xs:`${g.xs}px`,md:`${g.md}px`}},children:[e.jsx(y.default,{sx:{position:"absolute",inset:0,borderRadius:"inherit",overflow:"hidden"},children:e.jsx(K,{imageUrl:t,onClick:r,size:"lg",fillParent:!0})}),e.jsx(y.default,{component:"span",sx:{position:"absolute",left:8,bottom:{xs:`-${g.xs}px`,md:`-${g.md}px`},fontFamily:"secondary",fontSize:{xs:`${x.xs}px`,md:`${x.md}px`},lineHeight:1,color:"#3CC666",WebkitTextStroke:"1px #9ee86e",zIndex:3,userSelect:"none"},children:a})]})}const ye=({logo:t,provider:a,providerName:r,machine:s,onClick:l})=>{var o;return e.jsxs(y.default,{onClick:l,sx:{flex:"0 0 auto",position:"relative",borderRadius:"20px",overflow:"hidden",width:{xs:100,md:180},height:{xs:200,md:380},transition:"width .50s ease, transform .28s ease",willChange:"width, transform",cursor:"pointer",zIndex:0,"&:hover":{zIndex:2,width:{md:260,xs:110}},"&:hover .orc-live-provider-label":{opacity:1}},children:[e.jsx(y.default,{component:"img",src:t,alt:`Juego ${s!=null?s:""}`,sx:{position:"absolute",inset:0,width:"100%",height:"100%",objectFit:"cover",display:"block"}}),e.jsx(y.default,{className:"orc-live-provider-label",sx:{position:"absolute",left:"50%",top:{xs:"75%",md:"80%"},transform:"translate(-50%, -50%)",zIndex:3,opacity:0,transition:"opacity .25s ease",pointerEvents:"none"},children:e.jsx(G.default,{sx:{color:"#fff",fontWeight:700,fontSize:{xs:11,md:14},textTransform:"capitalize"},children:(o=a!=null?a:r)!=null?o:""})})]})},V=12,re=({items:t,layout:a="grid",onClick:r})=>{var s;if(a==="mosaic"){const l=t[0],o=t.slice(1,5);return e.jsxs(y.default,{sx:{display:"grid",gridTemplateRows:{xs:"repeat(2, 112px)",md:"repeat(2, 168px)"},gridTemplateColumns:{xs:"184px",md:"280px"},gridAutoFlow:"column",gridAutoColumns:{xs:"104px",md:"152px"},columnGap:`${V}px`,rowGap:`${V}px`,alignItems:"stretch",justifyItems:"stretch"},children:[l&&e.jsx(y.default,{sx:{width:{xs:184,md:280},height:{xs:234,md:352},gridRow:"1 / span 2",overflow:"hidden",borderRadius:2},children:e.jsx(K,{imageUrl:`https://olimpo.bet${(s=l.imageUrl)!=null?s:""}`,size:"lg",fillParent:!0,onClick:()=>r==null?void 0:r(l,0)})}),o.map((n,d)=>{var x;return e.jsx(y.default,{sx:{width:{xs:104,md:152},height:{xs:112,md:168},overflow:"hidden",borderRadius:2},children:e.jsx(K,{imageUrl:`https://olimpo.bet${(x=n.imageUrl)!=null?x:""}`,size:"sm",fillParent:!0,onClick:()=>r==null?void 0:r(n,d+1)})},n.id)})]})}return e.jsx(y.default,{sx:{display:"grid",gridTemplateColumns:{xs:"repeat(2, 104px)",md:"repeat(2, 152px)"},gridTemplateRows:{xs:"repeat(2, 112px)",md:"repeat(2, 168px)"},gap:`${V}px`,gridAutoFlow:"column"},children:t.map((l,o)=>{var n,d;return e.jsx(y.default,{sx:{overflow:"hidden",borderRadius:2},children:e.jsx(K,{imageUrl:`https://olimpo.bet${(n=l.imageUrl)!=null?n:""}`,size:"sm",fillParent:!0,onClick:()=>r==null?void 0:r(l,o)})},(d=l.id)!=null?d:o)})})},oe=({title:t,amount:a,subtitle:r,buttonText:s,onButtonClick:l,backgroundImage:o,alt:n,className:d="",variant:x="small"})=>{const g=a?a.slice(0,2):"",m=a?a.slice(2):"",_=x==="large";return e.jsxs(y.default,{className:d,sx:{position:"relative",width:"100%",maxWidth:{xs:328,lg:_?618:456},mx:"auto"},children:[o&&e.jsx(y.default,{sx:{position:"relative",width:"100%",aspectRatio:{xs:"328 / 188",lg:_?"618 / 346":"456 / 272"},borderRadius:"14px",overflow:"hidden"},children:e.jsx(y.default,{component:"img",src:o,alt:n!=null?n:"Fondo promocional",sx:{width:"100%",height:"100%",objectFit:"cover",objectPosition:{xs:"50% 0%",lg:"45% 0%"},display:"block"}})}),e.jsx(y.default,{sx:{position:"absolute",inset:0,display:"flex",alignItems:"center",justifyContent:"flex-end",color:"#e7f8ff",textAlign:"center",pl:"14%",pr:{xs:"14%",lg:"15%"}},children:e.jsxs(y.default,{sx:{maxWidth:"60%",display:"flex",flexDirection:"column",alignItems:"center"},children:[t&&e.jsx(G.default,{sx:{fontSize:{xs:12,lg:20},fontWeight:400,color:"#e7f8ff"},children:t}),a&&e.jsxs(y.default,{component:"p",sx:{fontFamily:'"secondary", sans-serif',lineHeight:{xs:.9,lg:.87},m:"4px 0",background:"linear-gradient(175deg, #EDC421 -12.56%, #FFFABF 17.99%, #EDC421 49.74%)",WebkitBackgroundClip:"text",WebkitTextFillColor:"transparent",WebkitTextStroke:"0.5px #fff8c1",filter:"drop-shadow(0px 4px 0px #8D4406) drop-shadow(0px 4px 4px rgba(28, 28, 28, 0.4))",display:"flex",alignItems:"baseline",justifyContent:"center"},children:[e.jsx(y.default,{component:"span",sx:{fontSize:{xs:35,lg:48},mr:.5},children:g}),e.jsx(y.default,{component:"span",sx:{fontSize:{xs:52,lg:77}},children:m})]}),r&&e.jsx(G.default,{sx:{pb:"20px",fontSize:14,fontWeight:600,color:"#e7f8ff"},children:r}),s&&e.jsx(I,{onClick:l,children:s})]})})]})},_e=({text:t,buttonLabel:a="Conoce más",onClick:r,imgAlt:s="Club Olimpo",imgSrcMobile:l,imgSrcDesktopBg:o,imgSrcDesktopLogo:n})=>e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"orc-co-bgMobile",children:e.jsx("img",{src:l,alt:s,className:"orc-co-bgMobileImg"})}),e.jsxs("div",{className:"orc-co-bgDesktop",children:[o&&e.jsx("div",{className:"orc-co-fillHost",children:e.jsx("img",{src:o,alt:`${s} fondo`,className:"orc-co-bgDesktopImg"})}),n&&e.jsx("div",{className:"orc-co-logo",children:e.jsx("img",{src:n,alt:`${s} logo`,className:"orc-co-logoImg"})}),e.jsxs("div",{className:"orc-co-desktopContent",children:[e.jsx("p",{className:"orc-co-captionDesktop",children:t}),e.jsx(I,{onClick:r,variant:"primary",size:"md",children:a})]})]}),e.jsxs("div",{className:"orc-co-bottom",children:[e.jsx("p",{className:"orc-co-caption",children:t}),e.jsx(I,{onClick:r,variant:"primary",size:"md",children:a})]})]}),it="oraculo__OraculoEventCombinadasCard-module__card___ulQeY",lt="oraculo__OraculoEventCombinadasCard-module__combinadas___Gxrld",ct="oraculo__OraculoEventCombinadasCard-module__apuestaItem___YnYMy",dt="oraculo__OraculoEventCombinadasCard-module__lineContainer___G5rbU",ut="oraculo__OraculoEventCombinadasCard-module__circle___eehm-",pt="oraculo__OraculoEventCombinadasCard-module__line___Eb2pK",xt="oraculo__OraculoEventCombinadasCard-module__apuestaText___b5s7S",mt="oraculo__OraculoEventCombinadasCard-module__cuotaTotal___Lohvu",H={card:it,combinadas:lt,apuestaItem:ct,lineContainer:dt,circle:ut,line:pt,apuestaText:xt,cuotaTotal:mt};function Se({event:t}){var s;function a(l){var m;const o=(m=l.betoffers)!=null?m:[],n=l.homeName,d=l.awayName,x=o.map(_=>{var u,E,N,S;let i=_.outcomes[0],j="",c=i!=null&&i.line?i.line/1e3:"";return["Más de","Mas de","Over"].includes(i==null?void 0:i.label)?(j=`Más de ${c}`,i!=null&&i.participant&&(j=`${i.participant} - ${j}`)):["Menos de","Menos"].includes(i==null?void 0:i.label)?(j=`Menos de ${c}`,i!=null&&i.participant&&(j=`${i.participant} - ${j}`)):["Sí","No"].includes(i==null?void 0:i.label)?(j=i==null?void 0:i.label,i!=null&&i.participant&&(j=`${i.participant} - ${j}`)):["1X","12","X2"].includes(i==null?void 0:i.label)?i.label==="1X"?j=`${n} o Empate`:i.label==="12"?j=`${n} o ${d}`:i.label==="X2"&&(j=`${d} o Empate`):(i!=null&&i.participant?j=i.participant:j=(u=i==null?void 0:i.label)!=null?u:"",c!==""&&j===i.label&&(j=`${i.label} ${c}`)),{id:(E=i==null?void 0:i.id)!=null?E:0,value:j,label:_.criterion.label,odds:(N=i==null?void 0:i.odds)!=null?N:0,bl:(S=i==null?void 0:i.label)!=null?S:0}}),g=x.reduce((_,i)=>_+i.odds,0)/1e3;return{outcomes:x,total:g.toFixed(2)}}const r=a(t);return e.jsxs("div",{className:H.card,children:[e.jsx("div",{className:H.combinadas,children:e.jsxs(z.default,{direction:"column",spacing:.5,useFlexGap:!0,children:[e.jsx(U,{title:t.name,iconUrl:"/assets/img/home/Combinadas/pelota.png",size:"xs"}),e.jsx("img",{src:"/assets/img/home/Combinadas/line.png"}),e.jsx(z.default,{direction:"column",spacing:.5,useFlexGap:!0,children:r.outcomes.map((l,o)=>e.jsxs("div",{className:H.apuestaItem,children:[e.jsxs("div",{className:H.lineContainer,children:[e.jsx("div",{className:H.circle}),o<r.outcomes.length-1&&e.jsx("div",{className:H.line})]}),e.jsxs("div",{className:H.apuestaText,children:[e.jsx("strong",{children:l.value})," ","| ",l.label]})]},o))})]})}),e.jsxs("button",{onClick:()=>{var l,o;return console.log((o=(l=r==null?void 0:r.outcomes)==null?void 0:l.map(n=>n==null?void 0:n.id))!=null?o:[])},className:H.cuotaTotal,children:[e.jsxs("span",{children:["Cuota total: ",e.jsx("strong",{children:(((s=t.combinadoTotal)!=null?s:0)/1e3).toFixed(2)})]}),e.jsx("img",{src:"/assets/img/home/Combinadas/cuotaTotal.svg",alt:"cuota total"})]})]})}function Ce({event:t,liveData:a,betOffers:r,fondo:s="/assets/img/home/EnVivo/fondo.png"}){var l,o,n,d,x,g,m,_,i,j,c;return e.jsx("div",{style:{backgroundImage:`url(${s})`,backgroundSize:"cover",height:"160px",width:"296px",padding:"12px 16px",borderRadius:"16px"},children:e.jsxs(z.default,{direction:"column",spacing:1,useFlexGap:!0,children:[e.jsxs(z.default,{direction:"column",spacing:1.5,useFlexGap:!0,children:[e.jsx(je,{title:(l=t.path[0].name)!=null?l:"",subtitle:t.group,live:!0,time:(n=(o=a==null?void 0:a.matchClock)==null?void 0:o.minute)!=null?n:""}),e.jsx("div",{style:{padding:"0 4px"},children:e.jsxs(A,{spacing:1.5,columns:"1fr auto 1fr",children:[e.jsx(Y,{name:t.homeName,logo:"/assets/img/home/EnVivo/Juventus.png"}),e.jsx(ae,{text:((x=(d=a==null?void 0:a.score)==null?void 0:d.home)!=null?x:0)+":"+((m=(g=a==null?void 0:a.score)==null?void 0:g.away)!=null?m:0),name:"En vivo"}),e.jsx(Y,{name:t.awayName,logo:"/assets/img/home/EnVivo/Racing.png"})]})})]}),e.jsxs(z.default,{direction:"column",spacing:1,useFlexGap:!0,children:[e.jsx(A,{spacing:1,children:((i=(_=r==null?void 0:r[0])==null?void 0:_.outcomes)!=null?i:[]).map((u,E)=>e.jsx(se,{text:u.label.toUpperCase()},E))}),e.jsx(A,{spacing:2,children:((c=(j=r==null?void 0:r[0])==null?void 0:j.outcomes)!=null?c:[]).map((u,E)=>e.jsx(I,{variant:"primary",disabled:u.odds==null,onClick:()=>{console.log(u.id)},children:u.odds===void 0?"X":(u.odds/1e3).toFixed(2)},E))})]})]})})}const ft="oraculo__OraculoEventDate-module__date___xhIlh",gt={date:ft};function ht({text:t}){return e.jsx("div",{className:`oli-font ${gt.date}`,children:t})}const jt="oraculo__OraculoEventSemanaCard-module__cardContainer___4JuDe",vt="oraculo__OraculoEventSemanaCard-module__cardBackground___vfalD",bt="oraculo__OraculoEventSemanaCard-module__jugadas___W8b7H",Z={cardContainer:jt,cardBackground:vt,jugadas:bt};function Ee({event:t}){var r,s,l,o,n,d,x;function a(g){const m=new Date(g),_=m.toLocaleDateString("es-ES",{weekday:"short"}).toUpperCase(),i=m.getDate().toString().padStart(2,"0"),j=(m.getMonth()+1).toString().padStart(2,"0");let c=m.toLocaleTimeString("es-PE",{hour:"numeric",minute:"2-digit",hour12:!0}).toUpperCase();return c=c.replace(/\./g,"").replace(/A\s*M/i,"AM").replace(/P\s*M/i,"PM"),`${_} ${i}/${j} | ${c}`}return e.jsxs("div",{className:Z.cardContainer,children:[e.jsx(ve,{title:(r=t.group)!=null?r:""}),e.jsx("div",{className:Z.cardBackground,children:e.jsxs(z.default,{direction:"column",spacing:{xs:.5,md:1},useFlexGap:!0,children:[e.jsxs(z.default,{direction:"column",spacing:1,useFlexGap:!0,children:[e.jsxs(A,{spacing:1,columns:"1fr auto 1fr",children:[e.jsx(Y,{name:t.awayName,logo:"/assets/img/home/EventoSemana/Flamengo.png",size:"compact"}),e.jsx(ae,{text:"vs.",name:"",size:"small"}),e.jsx(Y,{name:t.homeName,logo:"/assets/img/home/EventoSemana/RealMadrid.png",size:"compact"})]}),e.jsx(ht,{text:a(t.start)})]}),e.jsxs(z.default,{direction:"column",spacing:{xs:.5,md:1},useFlexGap:!0,children:[e.jsx(A,{spacing:1,children:((o=(l=(s=t==null?void 0:t.outcome)==null?void 0:s[0])==null?void 0:l.outcomes)!=null?o:[]).map((g,m)=>e.jsx(se,{text:g.label.toUpperCase()},m))}),e.jsx("div",{className:Z.jugadas,children:e.jsx(A,{spacing:1,children:((x=(d=(n=t==null?void 0:t.outcome)==null?void 0:n[0])==null?void 0:d.outcomes)!=null?x:[]).map((g,m)=>e.jsx(I,{variant:"primary",fullHeight:!0,onClick:()=>{console.log(g.id)},children:(g.odds/1e3).toFixed(2)},m))})})]})]})})]})}function we({items:t,title:a="Destacados",iconUrl:r,onViewMore:s,className:l=""}){const o=C.useRef(null),[n,d]=C.useState({isStart:!0,isEnd:!1}),x=()=>{var i;(i=o.current)==null||i.prev()},g=()=>{var i;(i=o.current)==null||i.next(),console.log("items: ",t)},m=()=>{s==null||s()},_=l||void 0;return e.jsxs("section",{className:_,style:{width:"100%"},children:[e.jsxs("header",{style:{display:"grid",gridTemplateColumns:"1fr auto auto",alignItems:"center",columnGap:12,rowGap:8,marginBottom:16},children:[e.jsx(U,{title:a,iconUrl:r,size:"md"}),e.jsxs("div",{style:{display:"flex",gap:8},children:[e.jsx(I,{ariaLabel:"Anterior",variant:"secondary",iconOnly:!0,leftIcon:e.jsx(J.ChevronLeftRounded,{}),onClick:x,disabled:n.isStart}),e.jsx(I,{ariaLabel:"Siguiente",variant:"secondary",iconOnly:!0,rightIcon:e.jsx(J.ChevronRightRounded,{}),onClick:g,disabled:n.isEnd})]}),e.jsx(I,{variant:"secondary",onClick:m,children:"Ver más"})]}),e.jsx(D,{ref:o,items:t,perPage:3.395,gap:"16px",options:{autoWidth:!1},breakpoints:{768:{perPage:1.15,focus:"start"},1024:{perPage:2.5,focus:"start"}},renderItem:i=>e.jsx("div",{style:{textAlign:"center",marginTop:16},children:e.jsx("img",{src:`https://olimpo.bet${i.image!==""?i.image:i.summary_image}`,alt:i.title,style:{width:"100%",height:"150px",borderRadius:8,display:"block"}})},`${i.title}-${i.image}`),onMove:({isStart:i,isEnd:j})=>d({isStart:i,isEnd:j})})]})}function ie({items:t,title:a="Top Juegos",iconUrl:r,onCardClick:s}){const l=C.useMemo(()=>t.map((o,n)=>{var d;return{...o,orden:(d=o.orden)!=null?d:n+1,_originalIndex:n}}).sort((o,n)=>o.orden!=null&&n.orden!=null?o.orden-n.orden:o._originalIndex-n._originalIndex),[t]);return e.jsx("section",{style:{width:"100%"},children:e.jsxs(z.default,{direction:"column",spacing:2,useFlexGap:!0,children:[e.jsx(U,{title:a,iconUrl:r,size:"md"}),e.jsx(y.default,{sx:{display:"grid",gridTemplateColumns:{xs:"repeat(3, minmax(0, 1fr))",md:"repeat(6, minmax(0, 1fr))"},gap:{xs:1.5,md:2},justifyItems:"center",width:"100%"},children:l.slice(0,6).map(o=>{var n;return e.jsx(be,{imageUrl:`https://olimpo.bet${(n=o.logo)!=null?n:""}`,orden:o.orden,onClick:()=>s==null?void 0:s(o)},o.machine)})})]})})}const Oe=({items:t,title:a="Casino en vivo",subtitle:r="Disfruta la emoción en tus juegos favoritos y gana en tiempo real.",backgroundMobileUrl:s="",backgroundDesktopUrl:l="",onCardClick:o,onViewMore:n,className:d})=>e.jsxs(y.default,{className:d,sx:{position:"relative",color:"white",overflow:"hidden"},children:[e.jsx(y.default,{sx:{position:"absolute",inset:0,backgroundImage:{xs:`
2
2
  linear-gradient(to bottom, #121212 0%, rgba(18,18,18,0) 10%),
3
3
  linear-gradient(to top, #121212 0%, rgba(18,18,18,0) 10%),
4
4
  url('${s}')
@@ -6,7 +6,7 @@
6
6
  linear-gradient(to bottom, #121212 0%, rgba(18,18,18,0) 10%),
7
7
  linear-gradient(to top, #121212 0%, rgba(18,18,18,0) 10%),
8
8
  url('${l}')
9
- `},backgroundSize:"cover",backgroundPosition:"center",backgroundRepeat:"no-repeat",zIndex:0}}),e.jsxs(y.default,{sx:{position:"relative",zIndex:1,maxWidth:1200,height:{xs:"450px",md:"550px"},mx:"auto",px:{xs:2.5,md:6},display:"flex",flexDirection:{xs:"column",md:"row"},alignItems:{xs:"center",md:"center"},justifyContent:"center",gap:{xs:0,md:15},textAlign:{xs:"center",md:"left"}},children:[e.jsxs(z.default,{spacing:3,sx:{maxWidth:{md:280}},children:[e.jsx(G.default,{variant:"h4",sx:{fontWeight:800,fontSize:{xs:24,md:40},WebkitTextStroke:"0.5px rgba(255, 255, 255, .5)",textShadow:"0 0 2px rgba(255, 255, 255, .95),0 0 4px rgba(255, 255, 255, .6),0 1px 0 #898989"},children:a}),e.jsx(G.default,{sx:{fontSize:{xs:14,md:18},color:"rgba(255,255,255,0.9)",marginX:{xs:4,md:0},lineHeight:1.5},children:r}),e.jsx(y.default,{sx:{display:{xs:"none",md:"block"}},children:e.jsx(I,{variant:"primary",size:"md",onClick:()=>n==null?void 0:n(),children:"Ver más"})})]}),e.jsx(y.default,{sx:{display:"flex",gap:{xs:2,md:3},justifyContent:"center",overflowX:{xs:"auto",md:"visible"},py:{xs:3,md:0},alignItems:"center"},children:(t!=null?t:[]).slice(0,3).map((x,g)=>{var m,_;return e.jsx(ye,{logo:`https://olimpo.bet${(m=x.logo)!=null?m:""}`,provider:x.provider,providerName:x.web_name,machine:x.machine,onClick:()=>o==null?void 0:o(x,g)},(_=x.orden)!=null?_:g)})}),e.jsx(y.default,{sx:{display:{xs:"block",md:"none"}},children:e.jsx(I,{variant:"primary",size:"lg",onClick:()=>n==null?void 0:n(),children:"Ver más"})})]})]}),_t=(t,a=!0,r=4)=>{const s=t.map((n,d)=>{var x,g,m;return{id:(g=(x=n.orden)!=null?x:n.machine)!=null?g:d,imageUrl:(m=n.logo)!=null?m:""}});if(!s.length)return[];const l=[];let o=0;if(a){const n=Math.min(s.length,5);l.push({id:"mosaic-0",kind:"mosaic",items:s.slice(0,n)}),o=n}for(;o<s.length;){const n=Math.min(o+r,s.length);l.push({id:`grid-${o}`,kind:"grid",items:s.slice(o,n)}),o=n}return l},$e=({items:t,title:a="Casino",iconUrl:r="/assets/img/home/Casino/diamante.svg",onItemClick:s,onViewMore:l,mosaicFirst:o=!0,gridSize:n=4})=>{const d=C.useRef(null),[x,g]=C.useState({isStart:!0,isEnd:!1}),m=_t(t,o,n),_=()=>{var c;(c=d.current)==null||c.prev()},i=()=>{var c;(c=d.current)==null||c.next()},j=()=>{l==null||l()};return e.jsx("section",{children:e.jsxs(z.default,{direction:"column",spacing:2,useFlexGap:!0,children:[e.jsxs(y.default,{sx:{display:"grid",gridTemplateColumns:"1fr auto auto",alignItems:"center",columnGap:1.5,rowGap:1},children:[e.jsx(U,{title:a,iconUrl:r,size:"md"}),e.jsxs(y.default,{sx:{display:"flex",gap:1,justifyContent:"flex-end"},children:[e.jsx(I,{ariaLabel:"Anterior",variant:"secondary",iconOnly:!0,leftIcon:e.jsx(me.default,{}),onClick:_,disabled:x.isStart}),e.jsx(I,{ariaLabel:"Siguiente",variant:"secondary",iconOnly:!0,rightIcon:e.jsx(fe.default,{}),onClick:i,disabled:x.isEnd})]}),e.jsx(y.default,{sx:{justifySelf:"end"},children:e.jsx(I,{variant:"secondary",onClick:j,children:"Ver más"})})]}),e.jsx(D,{ref:d,items:m,perPage:1,gap:"0px",options:{autoWidth:!0,gap:"12px",trimSpace:!1,pagination:!1,arrows:!1,drag:!0,focus:"start"},renderItem:c=>e.jsx("div",{style:{alignSelf:"start"},children:e.jsx(re,{items:c.items,layout:c.kind==="mosaic"?"mosaic":"grid",onClick:u=>{const E=t.find((N,S)=>{var $;return(($=N.orden)!=null?$:S)===u.id});E&&(s==null||s(E))}})}),onMove:({isStart:c,isEnd:u})=>g({isStart:c,isEnd:u})})]})})},St=(t,a=!0,r=4)=>{const s=t.map((n,d)=>{var x,g;return{id:(x=n.orden)!=null?x:d,imageUrl:(g=n.logo)!=null?g:""}});if(!s.length)return[];const l=[];let o=0;if(a){const n=Math.min(s.length,5);l.push({id:"mosaic-0",kind:"mosaic",items:s.slice(0,n)}),o=n}for(;o<s.length;){const n=Math.min(o+r,s.length);l.push({id:`grid-${o}`,kind:"grid",items:s.slice(o,n)}),o=n}return l},Ne=({items:t,title:a="Virtuales",iconUrl:r="/assets/img/home/Virtuales/virtuales.svg",onItemClick:s,onViewMore:l,mosaicFirst:o=!0,gridSize:n=4})=>{const d=C.useRef(null),[x,g]=C.useState({isStart:!0,isEnd:!1}),m=St(t,o,n),_=()=>{var c;(c=d.current)==null||c.prev()},i=()=>{var c;(c=d.current)==null||c.next()},j=()=>{l==null||l()};return e.jsx("section",{children:e.jsxs(z.default,{direction:"column",spacing:2,useFlexGap:!0,children:[e.jsxs(y.default,{sx:{display:"grid",gridTemplateColumns:"1fr auto auto",alignItems:"center",columnGap:1.5,rowGap:1},children:[e.jsx(U,{title:a,iconUrl:r,size:"md"}),e.jsxs(y.default,{sx:{display:"flex",gap:1,justifyContent:"flex-end"},children:[e.jsx(I,{ariaLabel:"Anterior",variant:"secondary",iconOnly:!0,leftIcon:e.jsx(me.default,{}),onClick:_,disabled:x.isStart}),e.jsx(I,{ariaLabel:"Siguiente",variant:"secondary",iconOnly:!0,rightIcon:e.jsx(fe.default,{}),onClick:i,disabled:x.isEnd})]}),e.jsx(y.default,{sx:{justifySelf:"end"},children:e.jsx(I,{variant:"secondary",onClick:j,children:"Ver más"})})]}),e.jsx(D,{ref:d,items:m,perPage:1,gap:"0",options:{autoWidth:!0,gap:"12px",trimSpace:!1,pagination:!1,arrows:!1,drag:!0,focus:"start",perMove:1},renderItem:c=>e.jsx("div",{style:{alignSelf:"start"},children:e.jsx(re,{items:c.items,layout:c.kind==="mosaic"?"mosaic":"grid",onClick:u=>{const E=t.find((N,S)=>{var $;return(($=N.orden)!=null?$:S)===u.id});E&&(s==null||s(E))}})}),onMove:({isStart:c,isEnd:u})=>g({isStart:c,isEnd:u})})]})})},Ct=t=>({position:"relative",py:8,color:"#fff",backgroundImage:`
9
+ `},backgroundSize:"cover",backgroundPosition:"center",backgroundRepeat:"no-repeat",zIndex:0}}),e.jsxs(y.default,{sx:{position:"relative",zIndex:1,maxWidth:1200,height:{xs:"450px",md:"550px"},mx:"auto",px:{xs:2.5,md:6},display:"flex",flexDirection:{xs:"column",md:"row"},alignItems:{xs:"center",md:"center"},justifyContent:"center",gap:{xs:0,md:15},textAlign:{xs:"center",md:"left"}},children:[e.jsxs(z.default,{spacing:3,sx:{maxWidth:{md:280}},children:[e.jsx(G.default,{variant:"h4",sx:{fontWeight:800,fontSize:{xs:24,md:40},WebkitTextStroke:"0.5px rgba(255, 255, 255, .5)",textShadow:"0 0 2px rgba(255, 255, 255, .95),0 0 4px rgba(255, 255, 255, .6),0 1px 0 #898989"},children:a}),e.jsx(G.default,{sx:{fontSize:{xs:14,md:18},color:"rgba(255,255,255,0.9)",marginX:{xs:4,md:0},lineHeight:1.5},children:r}),e.jsx(y.default,{sx:{display:{xs:"none",md:"block"}},children:e.jsx(I,{variant:"primary",size:"md",onClick:()=>n==null?void 0:n(),children:"Ver más"})})]}),e.jsx(y.default,{sx:{display:"flex",gap:{xs:2,md:3},justifyContent:"center",overflowX:{xs:"auto",md:"visible"},py:{xs:3,md:0},alignItems:"center"},children:(t!=null?t:[]).slice(0,3).map((x,g)=>{var m,_;return e.jsx(ye,{logo:`https://olimpo.bet${(m=x.logo)!=null?m:""}`,provider:x.provider,providerName:x.web_name,machine:x.machine,onClick:()=>o==null?void 0:o(x,g)},(_=x.orden)!=null?_:g)})}),e.jsx(y.default,{sx:{display:{xs:"block",md:"none"}},children:e.jsx(I,{variant:"primary",size:"lg",onClick:()=>n==null?void 0:n(),children:"Ver más"})})]})]}),yt=(t,a=!0,r=4)=>{const s=t.map((n,d)=>{var x,g,m;return{id:(g=(x=n.orden)!=null?x:n.machine)!=null?g:d,imageUrl:(m=n.logo)!=null?m:""}});if(!s.length)return[];const l=[];let o=0;if(a){const n=Math.min(s.length,5);l.push({id:"mosaic-0",kind:"mosaic",items:s.slice(0,n)}),o=n}for(;o<s.length;){const n=Math.min(o+r,s.length);l.push({id:`grid-${o}`,kind:"grid",items:s.slice(o,n)}),o=n}return l},$e=({items:t,title:a="Casino",iconUrl:r="/assets/img/home/Casino/diamante.svg",onItemClick:s,onViewMore:l,mosaicFirst:o=!0,gridSize:n=4})=>{const d=C.useRef(null),[x,g]=C.useState({isStart:!0,isEnd:!1}),m=yt(t,o,n),_=()=>{var c;(c=d.current)==null||c.prev()},i=()=>{var c;(c=d.current)==null||c.next()},j=()=>{l==null||l()};return e.jsx("section",{children:e.jsxs(z.default,{direction:"column",spacing:2,useFlexGap:!0,children:[e.jsxs(y.default,{sx:{display:"grid",gridTemplateColumns:"1fr auto auto",alignItems:"center",columnGap:1.5,rowGap:1},children:[e.jsx(U,{title:a,iconUrl:r,size:"md"}),e.jsxs(y.default,{sx:{display:"flex",gap:1,justifyContent:"flex-end"},children:[e.jsx(I,{ariaLabel:"Anterior",variant:"secondary",iconOnly:!0,leftIcon:e.jsx(me.default,{}),onClick:_,disabled:x.isStart}),e.jsx(I,{ariaLabel:"Siguiente",variant:"secondary",iconOnly:!0,rightIcon:e.jsx(fe.default,{}),onClick:i,disabled:x.isEnd})]}),e.jsx(y.default,{sx:{justifySelf:"end"},children:e.jsx(I,{variant:"secondary",onClick:j,children:"Ver más"})})]}),e.jsx(D,{ref:d,items:m,perPage:1,gap:"0px",options:{autoWidth:!0,gap:"12px",trimSpace:!1,pagination:!1,arrows:!1,drag:!0,focus:"start"},renderItem:c=>e.jsx("div",{style:{alignSelf:"start"},children:e.jsx(re,{items:c.items,layout:c.kind==="mosaic"?"mosaic":"grid",onClick:u=>{const E=t.find((N,S)=>{var $;return(($=N.orden)!=null?$:S)===u.id});E&&(s==null||s(E))}})}),onMove:({isStart:c,isEnd:u})=>g({isStart:c,isEnd:u})})]})})},_t=(t,a=!0,r=4)=>{const s=t.map((n,d)=>{var x,g;return{id:(x=n.orden)!=null?x:d,imageUrl:(g=n.logo)!=null?g:""}});if(!s.length)return[];const l=[];let o=0;if(a){const n=Math.min(s.length,5);l.push({id:"mosaic-0",kind:"mosaic",items:s.slice(0,n)}),o=n}for(;o<s.length;){const n=Math.min(o+r,s.length);l.push({id:`grid-${o}`,kind:"grid",items:s.slice(o,n)}),o=n}return l},Ne=({items:t,title:a="Virtuales",iconUrl:r="/assets/img/home/Virtuales/virtuales.svg",onItemClick:s,onViewMore:l,mosaicFirst:o=!0,gridSize:n=4})=>{const d=C.useRef(null),[x,g]=C.useState({isStart:!0,isEnd:!1}),m=_t(t,o,n),_=()=>{var c;(c=d.current)==null||c.prev()},i=()=>{var c;(c=d.current)==null||c.next()},j=()=>{l==null||l()};return e.jsx("section",{children:e.jsxs(z.default,{direction:"column",spacing:2,useFlexGap:!0,children:[e.jsxs(y.default,{sx:{display:"grid",gridTemplateColumns:"1fr auto auto",alignItems:"center",columnGap:1.5,rowGap:1},children:[e.jsx(U,{title:a,iconUrl:r,size:"md"}),e.jsxs(y.default,{sx:{display:"flex",gap:1,justifyContent:"flex-end"},children:[e.jsx(I,{ariaLabel:"Anterior",variant:"secondary",iconOnly:!0,leftIcon:e.jsx(me.default,{}),onClick:_,disabled:x.isStart}),e.jsx(I,{ariaLabel:"Siguiente",variant:"secondary",iconOnly:!0,rightIcon:e.jsx(fe.default,{}),onClick:i,disabled:x.isEnd})]}),e.jsx(y.default,{sx:{justifySelf:"end"},children:e.jsx(I,{variant:"secondary",onClick:j,children:"Ver más"})})]}),e.jsx(D,{ref:d,items:m,perPage:1,gap:"0",options:{autoWidth:!0,gap:"12px",trimSpace:!1,pagination:!1,arrows:!1,drag:!0,focus:"start",perMove:1},renderItem:c=>e.jsx("div",{style:{alignSelf:"start"},children:e.jsx(re,{items:c.items,layout:c.kind==="mosaic"?"mosaic":"grid",onClick:u=>{const E=t.find((N,S)=>{var $;return(($=N.orden)!=null?$:S)===u.id});E&&(s==null||s(E))}})}),onMove:({isStart:c,isEnd:u})=>g({isStart:c,isEnd:u})})]})})},St=t=>({position:"relative",py:8,color:"#fff",backgroundImage:`
10
10
  linear-gradient(to bottom,#121212 0%, rgba(18,18,18,0) 10%),
11
11
  linear-gradient(to top, #121212 0%, rgba(18,18,18,0) 10%),
12
12
  linear-gradient(to left, #121212 0%, rgba(18,18,18,0) 10%),
@@ -16,5 +16,5 @@
16
16
  0 0 2px rgba(255, 255, 255, .95),
17
17
  0 0 6px rgba(255, 255, 255, .6),
18
18
  0 1px 0 rgba(137, 137, 137, .85)
19
- `},ke=({headline:t,headline2:a,items:r,backgroundImageUrl:s})=>{const l=t,o=a,n=De.default("(max-width: 767px)"),d=r.length>1,x=s!=null?s:"",g=Ct(x),m=C.useRef(null),[_,i]=C.useState({isStart:!0,isEnd:!1}),[j,c]=C.useState(0);return n?e.jsxs(y.default,{component:"section",sx:{...g,textAlign:"center"},children:[(l||o)&&e.jsxs(y.default,{sx:ce,children:[l&&e.jsx(G.default,{component:"span",sx:de,children:l}),o&&e.jsxs(e.Fragment,{children:[e.jsx("br",{}),e.jsx(G.default,{component:"span",sx:ue,children:o})]})]}),e.jsxs(y.default,{children:[e.jsx(D,{ref:m,items:r,perPage:1,gap:"12px",breakpoints:{480:{perPage:1,gap:"8px",padding:{left:"8px",right:"8px"}},768:{perPage:1,gap:"12px",padding:{left:"8px",right:"8px"}}},options:{autoWidth:!1},renderItem:u=>e.jsx(oe,{...u,onButtonClick:r[0].onButtonClick}),onMove:({index:u,isStart:E,isEnd:N})=>{i({isStart:E,isEnd:N}),c(u)}}),d&&e.jsx(ne,{total:r.length,active:j,onSelect:u=>{var E;c(u),(E=m.current)==null||E.go(u)}})]})]}):e.jsx(y.default,{component:"section",sx:g,children:e.jsxs(y.default,{sx:{maxWidth:1200,mx:5,px:2,display:"grid",gridTemplateColumns:"200px auto",alignItems:"center"},children:[(l||o)&&e.jsx(y.default,{sx:{display:"flex",alignItems:"center",justifyContent:"flex-start",minHeight:"100%"},children:e.jsxs(y.default,{sx:{...ce,textAlign:"left",mb:0},children:[l&&e.jsx(G.default,{component:"span",sx:de,children:l}),o&&e.jsxs(e.Fragment,{children:[e.jsx("br",{}),e.jsx(G.default,{component:"span",sx:ue,children:o})]})]})}),e.jsx(y.default,{sx:{display:"flex",justifyContent:"center",alignItems:"center",flexWrap:"nowrap",gap:4},children:r.map((u,E)=>e.jsx(oe,{onButtonClick:u.onButtonClick,...u},E))})]})})},Ie=({className:t="",fullBleed:a=!0,items:r,selectedIndex:s=0,ariaLabel:l})=>{const o=C.useRef(null),n=C.useRef(null);if(!r)return null;const d=r;C.useLayoutEffect(()=>{if(!o.current||!n.current||typeof ResizeObserver=="undefined")return;const g=o.current,m=n.current,_=()=>{g.style.setProperty("--orc-co-bottomH",`${m.offsetHeight+16}px`)},i=new ResizeObserver(_);return i.observe(m),_(),()=>i.disconnect()},[]);const x=["orc-co-wrap",a?"orc-co-fullBleed":"",t].filter(Boolean).join(" ");return e.jsx("section",{ref:o,className:x,"aria-label":l||d.imgAlt||"Club Olimpo",children:e.jsx("div",{ref:n,children:e.jsx(_e,{text:d.text,onClick:d.onClick,imgAlt:d.imgAlt,imgSrcMobile:d.images.mobile,imgSrcDesktopBg:d.images.desktopBg,imgSrcDesktopLogo:d.images.desktopLogo})})})},Et="oraculo__OraculoSeccionEventoCombinadas-module__controls___Zsta4",wt={controls:Et};function Re({items:t,title:a="Combinadas del Olimpo",iconUrl:r,onViewMore:s,className:l=""}){const o=C.useRef(null),[n,d]=C.useState({isStart:!0,isEnd:!1}),[x,g]=C.useState([]),m=()=>{var S;(S=o.current)==null||S.prev()},_=()=>{var S;(S=o.current)==null||S.next(),console.log("items: ",t)},i=()=>{s==null||s()};function j(S,$,T){const w=[];for(const O of T){const F=u([O]),B=$.reduce((p,b)=>{p[b.eventId]||(p[b.eventId]=[]);const f=b.outcomes.filter(v=>F.has(v.id));return f.length>0&&p[b.eventId].push({...b,outcomes:f}),p},{}),h=c(O);S.forEach(p=>{if(p.id!==O.prePackCouponRows[0].eventId)return;const b=F;let f=null;for(const v of h)if([...v.requiredOutcomeIds].every(R=>b.has(R))){f=v.decimal;break}w.push({...p,combinadoTotal:f,betoffers:B[p.id]||[],couponId:O.id})})}return w}function c(S){var T;const $=[];for(const w of S.prePackCouponRows)if(w.type==="BET_BUILDER"&&((T=w.group)!=null&&T.groups)){const O=new Set;w.group.groups.forEach(F=>{var B;(B=F.outcomes)==null||B.forEach(h=>O.add(h.id))}),$.push({requiredOutcomeIds:O,decimal:w.odds.decimal})}return $}function u(S){var T;const $=new Set;for(const w of S)for(const O of w.prePackCouponRows)O.type==="BET_BUILDER"&&((T=O.group)!=null&&T.groups)&&O.group.groups.forEach(F=>{var B;(B=F.outcomes)==null||B.forEach(h=>$.add(h.id))}),O.type==="SIMPLE"&&O.outcome&&$.add(O.outcome.id);return $}async function E(){var S,$,T;try{const w=(T=($=(S=t==null?void 0:t.group)==null?void 0:S.groups)==null?void 0:$[0])==null?void 0:T.id;if(!w){console.error("Could not extract group ID");return}const O=`https://us1.offering-api.kambicdn.com/offering/v2018/nexuspe/prepackcoupon/eventgroup/${w}.json?lang=es_PE&market=PE&client_id=200&channel_id=1&ncid=1764283566783&prePackCouponTags=CUSTOM`,B=await(await fetch(O)).json();g(j(B.events,B.betOffers,B.prePackCoupons))}catch(w){console.error("loadDataEventSpecial error:",w)}}C.useEffect(()=>{t&&E()},[t]);const N=l||void 0;return e.jsx("section",{className:N,style:{width:"100%"},children:e.jsxs(z.default,{direction:"column",spacing:1.5,useFlexGap:!0,children:[e.jsxs(A,{spacing:1.5,columns:"1fr auto auto",justify:"start",children:[e.jsx(U,{title:a,iconUrl:r,size:"md"}),e.jsxs("div",{className:wt.controls,children:[e.jsxs(A,{spacing:1,columns:"auto auto",children:[e.jsx(I,{ariaLabel:"Anterior",variant:"secondary",iconOnly:!0,leftIcon:e.jsx(J.ChevronLeftRounded,{}),onClick:m,disabled:n.isStart}),e.jsx(I,{ariaLabel:"Siguiente",variant:"secondary",iconOnly:!0,rightIcon:e.jsx(J.ChevronRightRounded,{}),onClick:_,disabled:n.isEnd})]}),e.jsx(I,{variant:"secondary",onClick:i,children:"Ver más"})]})]}),e.jsx(D,{ref:o,items:x,perPage:3.72,gap:"16px",options:{autoWidth:!0},useIndexAsKey:!0,breakpoints:{768:{perPage:1.2,gap:"12px",padding:{left:"0px",right:"0px"}}},renderItem:S=>e.jsx(Se,{event:S}),onMove:({isStart:S,isEnd:$})=>d({isStart:S,isEnd:$})})]})})}function Te({items:t,title:a="En vivo",iconUrl:r,onViewMore:s,className:l=""}){var i,j;console.log("wefwef",t);const o=C.useRef(null),[n,d]=C.useState({isStart:!0,isEnd:!1}),x=()=>{var c;(c=o.current)==null||c.prev()},g=()=>{var c;(c=o.current)==null||c.next(),console.log("items: ",t)},m=()=>{s==null||s()},_=l||void 0;return e.jsxs("section",{className:_,style:{width:"100%"},children:[e.jsxs(A,{spacing:1.5,columns:"1fr auto auto",justify:"start",children:[e.jsx(U,{title:a,iconUrl:r,size:"md"}),e.jsxs("div",{style:{display:"flex",gap:8},children:[e.jsx(I,{ariaLabel:"Anterior",variant:"secondary",iconOnly:!0,leftIcon:e.jsx(J.ChevronLeftRounded,{}),onClick:x,disabled:n.isStart}),e.jsx(I,{ariaLabel:"Siguiente",variant:"secondary",iconOnly:!0,rightIcon:e.jsx(J.ChevronRightRounded,{}),onClick:g,disabled:n.isEnd})]}),e.jsx(I,{variant:"secondary",onClick:m,children:"Ver más"})]}),e.jsx(D,{ref:o,items:(j=(i=t==null?void 0:t.events)==null?void 0:i.filter(c=>c.event.sport==="FOOTBALL").sort((c,u)=>new Date(u.event.start).getTime()-new Date(c.event.start).getTime()))!=null?j:[],perPage:3.395,gap:"16px",options:{autoWidth:!0},breakpoints:{768:{perPage:1,gap:"8px",focus:"center",padding:{left:"16px",right:"16px"}},1024:{perPage:2.5,gap:"10px",padding:{right:"16px"}}},renderItem:c=>e.jsx(Ce,{...c}),onMove:({isStart:c,isEnd:u})=>d({isStart:c,isEnd:u})})]})}const Ot="oraculo__OraculoSeccionEventoSemana-module__wrapper___eqVq-",$t="oraculo__OraculoSeccionEventoSemana-module__container___5yFQs",Nt="oraculo__OraculoSeccionEventoSemana-module__buttonWrapper___-6IDT",ee={wrapper:Ot,container:$t,buttonWrapper:Nt};function Pe({items:t,title:a="En vivo",iconUrl:r,onViewMore:s,className:l=""}){const o=new Date;o.toISOString();const n=new Date(o);n.setDate(n.getDate()+7),n.toISOString();const d=C.useRef(null),[x,g]=C.useState({isStart:!0,isEnd:!1}),[m,_]=C.useState([]),i=()=>{s==null||s()};async function j(){try{const N=t.events.map(w=>{var O;return(O=w.event)==null?void 0:O.id}),S=N.map(w=>`id=${w}`).join("&"),T=`https://us1.offering-api.kambicdn.com/offering/v2018/nexuspe/betoffer/selected/combined_layout/event/${N[0]}?${S}&lang=es_PE&market=PE`;c(T)}catch(N){console.error(N)}}async function c(N){try{const $=await(await fetch(N)).json(),T=$.events.map(O=>O.event),w=$.events.flatMap(O=>O.betOffers||[]);_(u(T,w))}catch(S){console.error(S)}}function u(N,S){const T=S.filter(w=>{var O;return((O=w.betOfferType)==null?void 0:O.id)===2}).reduce((w,O)=>(w[O.eventId]||(w[O.eventId]=[]),w[O.eventId].push(O),w),{});return N.filter(w=>T[w.id]).map(w=>({...w,outcome:T[w.id]}))}C.useEffect(()=>{t&&t.events.length>0&&j()},[t]);const E=l||void 0;return e.jsx("section",{className:E,style:{width:"100%"},children:e.jsxs("div",{className:ee.wrapper,children:[e.jsx("div",{className:ee.container,children:e.jsxs(z.default,{direction:"column",spacing:1.5,useFlexGap:!0,children:[e.jsx(U,{title:"Eventos de la semana"}),e.jsx("div",{className:ee.buttonWrapper,children:e.jsx(I,{variant:"secondary",size:"lg",fullWidth:!0,onClick:()=>{i()},children:"Ver más"})})]})}),e.jsx("div",{style:{minWidth:0},children:e.jsx(D,{ref:d,items:m,perPage:3.5,gap:"16px",options:{autoWidth:!0},breakpoints:{1024:{perPage:1.4,gap:"8px",focus:"center",padding:{left:"8px",right:"8px"}}},renderItem:N=>e.jsx(Ee,{event:N}),onMove:({isStart:N,isEnd:S})=>g({isStart:N,isEnd:S})})})]})})}function Fe({backgrounds:t,items:a}){const[r,s]=C.useState(0),l=t.length||1;return e.jsxs(P.Box,{component:"section",sx:{position:"relative",overflow:"visible",pb:{xs:7,sm:8}},children:[e.jsxs(P.Box,{sx:{position:"relative",height:{xs:300,sm:360,md:420},borderRadius:0,overflow:"hidden"},children:[e.jsx(D,{items:t,perPage:1,gap:"0px",options:{type:"loop",pagination:!1,arrows:!1,drag:!0,focus:"center"},onMove:({index:o})=>s(o),renderItem:o=>{var n;return e.jsxs(P.Box,{sx:{position:"relative",height:{xs:300,sm:360,md:420}},children:[e.jsxs(P.Box,{component:"picture",sx:{position:"absolute",inset:0,lineHeight:0},children:[e.jsx("source",{srcSet:o.desktopSrc,media:"(min-width:800px)"}),e.jsx("source",{srcSet:o.mobileSrc,media:"(max-width:799px)"}),e.jsx(P.Box,{component:"img",src:(n=o.fallbackSrc)!=null?n:o.desktopSrc,alt:"","aria-hidden":!0,loading:"lazy",sx:{width:"100%",height:"100%",objectFit:"cover",display:"block"}})]}),e.jsx(P.Box,{sx:{position:"absolute",inset:0,pointerEvents:"none","&::before":{content:'""',position:"absolute",inset:0,background:"linear-gradient(180deg, rgba(0,0,0,0) 60%, rgba(0,0,0,.75) 100%)"}}})]})}}),e.jsx(P.Box,{sx:{position:"absolute",left:0,right:0,bottom:72,display:"flex",justifyContent:"center",zIndex:2},children:e.jsx(ne,{total:l,active:r})})]}),e.jsx(P.Box,{sx:{position:"absolute",bottom:{xs:36,sm:38},left:"50%",transform:"translateX(-50%)",width:"90%",backgroundColor:"#363636",borderRadius:2,py:1.5,px:1,display:"flex",justifyContent:"space-around",alignItems:"center",boxShadow:"0 10px 24px rgba(0,0,0,.35)",zIndex:3},children:a.map(o=>e.jsxs(P.Box,{sx:{display:"flex",flexDirection:{xs:"column",md:"row"},alignItems:"center",color:"#FFFFFF",minWidth:68,cursor:o.onclick?"pointer":"default"},onClick:()=>{var n;return(n=o.onclick)==null?void 0:n.call(o)},children:[o.icon&&e.jsx(P.Box,{component:"img",src:o.icon,alt:o.label||`icon-${o.id}`,sx:{width:{xs:28,md:32},height:{xs:28,md:32},mb:{xs:.5,md:0},mr:{xs:0,md:4},objectFit:"contain"}}),e.jsx(P.Typography,{sx:{fontSize:12,fontWeight:600,color:"#E0E0E0",textAlign:{xs:"center",md:"left"}},children:o.label})]},o.id))})]})}const kt=[[{src:"https://stg-www.contodobet.com/static/img/landing/MediosPago/IBK.svg",alt:"Interbank"},{src:"https://stg-www.contodobet.com/static/img/landing/MediosPago/Yape.svg",alt:"Yape"}],[{src:"https://stg-www.contodobet.com/static/img/landing/MediosPago/tupay.svg",alt:"Tupay"},{src:"https://stg-www.contodobet.com/static/img/landing/MediosPago/monnet.svg",alt:"Monnet"},{src:"https://stg-www.contodobet.com/static/img/landing/MediosPago/niubiz.svg",alt:"Niubiz"}]];function It({title:t="Medios de pago",rows:a=kt}){const r=a.flat();return e.jsxs(P.Box,{component:"section","aria-labelledby":"mp-title",sx:{color:"#fff"},children:[e.jsx(P.Typography,{id:"mp-title",variant:"h6",sx:{fontWeight:800,fontSize:{xs:20,md:32},textAlign:"center",mb:1.5},children:t}),e.jsx(P.Box,{sx:{width:"288px",height:"2px",mx:"auto",mb:3,opacity:.95,filter:"blur(0.2px)",background:"linear-gradient(90deg, rgba(0,0,0,0) 0%, #1dd75b 18%, #23d46b 50%, #1dd75b 82%, rgba(0,0,0,0) 100%)"}}),e.jsx(P.Box,{sx:{display:{xs:"block",md:"none"}},children:a.map((s,l)=>e.jsx(P.Stack,{direction:"row",justifyContent:"center",alignItems:"center",gap:2.5,flexWrap:"wrap",children:s.map(o=>e.jsx(te,{...o},`${o.src}-${o.alt}`))},l))}),e.jsx(P.Box,{sx:{mt:3,display:{xs:"none",md:"grid"},gap:{xs:2.5,md:2.75},justifyItems:"center",alignItems:"center",gridTemplateColumns:{md:"repeat(auto-fit, 160px)"},justifyContent:{md:"center"}},children:r.map(s=>e.jsx(te,{...s},`${s.src}-${s.alt}`))})]})}const Rt={OraculoSeccionDestacados:we,OraculoSeccionTopJuegos:ie,OraculoSeccionCasinoEnVivo:Oe,OraculoSeccionCasino:$e,OraculoSeccionVirtuales:Ne,OraculoSeccionClubOlimpo:Ie,OraculoSeccionBonoBienvenida:ke,OraculoSeccionBanners:Fe,OraculoSeccionMediosPago:It,OraculoSeccionEventoEnVivo:Te,OraculoSeccionEventoSemana:Pe,OraculoSeccionEventoCombinadas:Re},Tt=t=>typeof t=="function"||t&&typeof t=="object"&&"$$typeof"in t,Pt=t=>/^OraculoSeccion[A-Z]/.test(t),Ft=Object.fromEntries(Object.entries(Rt).filter(([t,a])=>Pt(t)&&Tt(a)));class pe extends Error{constructor(a,r,s){super(`HTTP ${a} ${s}`),this.status=a,this.url=r,this.statusText=s,this.name="HttpError"}}const Be=({sectionsOverride:t,docId:a="home",db:r})=>{const[s,l]=C.useState([]),[o,n]=C.useState(!1),[d,x]=C.useState({}),[g,m]=C.useState({}),[_,i]=C.useState({}),[j,c]=C.useState({});C.useEffect(()=>{if(t||!r)return;n(!0);const h=le.onSnapshot(le.doc(r,"landings",a),p=>{var b;try{let f=p.exists()?((b=p.data())==null?void 0:b.sections)||[]:[];f=f.slice().sort((v,k)=>{var R,L;return((R=v.order)!=null?R:0)-((L=k.order)!=null?L:0)}).map((v,k)=>({...v,order:k+1})),l(f),console.log("fetched: ",f)}catch(f){console.error("Error procesando landings/"+a,f)}finally{n(!1)}},p=>{console.error("Error escuchando landings/"+a,p),n(!1)});return()=>h()},[t,a,r]);const u=async h=>{const p=(h.apiUrl||"").trim();if(!p)return;const b=h.apiMethod||"GET",f=h.apiParams||[];let v=p,k,R;if(b==="GET"){const M=new URL(p,typeof window=="undefined"?"http://localhost":window.location.origin);for(const W of f)W.key&&M.searchParams.append(W.key,W.value);v=M.toString()}else{const M=new URLSearchParams;for(const W of f)W.key&&M.append(W.key,W.value);k=M.toString(),R={"Content-Type":"application/x-www-form-urlencoded; charset=UTF-8"}}const L=await fetch(v,{method:b,headers:R,body:k});if(!L.ok)throw new pe(L.status,v,L.statusText);return L.json()},E=C.useMemo(()=>t?t.slice():s.slice(),[t,s]),N=Ue.default.useRef(new Set);C.useEffect(()=>{const h=E.map(p=>({s:p,url:(p.apiUrl||"").trim()})).filter(({url:p})=>!!p);if(h.length)for(const{s:p,url:b}of h){const f=`${p.id}|${b}`;N.current.has(f)||(N.current.add(f),i(v=>({...v,[p.id]:!0})),c(v=>({...v,[p.id]:""})),(async()=>{try{const v=await u(p);m(k=>({...k,[p.id]:v}))}catch(v){let k="Error desconocido";v instanceof pe?k=`Error HTTP ${v.status} (${v.statusText}) en ${v.url}`:v instanceof SyntaxError?k="Respuesta no es JSON válido":v instanceof TypeError?k="Fallo de red / CORS / conexión":typeof v=="string"&&(k=v.toString()),c(R=>({...R,[p.id]:k}))}finally{i(v=>({...v,[p.id]:!1}))}})())}},[E]);const S=C.useMemo(()=>E.filter(h=>h.visible).sort((h,p)=>h.order-p.order),[E]),$=h=>Array.isArray(h)?h.map(p=>{const b={};for(const f of p.fields||[]){const v=(f.type||"string").toLowerCase();if(v==="number")b[f.name]=Number(f.value);else if(v==="boolean")b[f.name]=String(f.value).toLowerCase()==="true";else if(v==="function"){const k=String(f.value||"").trim();b[f.name]=()=>{if(k)try{return new Function(k)()}catch(R){console.error("Error función manual",R)}}}else b[f.name]=f.value}return b}):[],T=h=>{const p={};if(!Array.isArray(h))return p;for(const b of h){if(!b.name)continue;const f=(b.type||"string").toLowerCase();if(f==="number")p[b.name]=Number(b.value);else if(f==="boolean")p[b.name]=String(b.value).toLowerCase()==="true";else if(f==="function"){const v=String(b.value||"").trim();p[b.name]=()=>{if(v)try{return new Function(v)()}catch(k){console.error("Error función escalar manual",k)}}}else p[b.name]=b.value}return p},w=(h,p,b)=>{const f=b?{...b}:{};if(p){const W=(p.variableName||"items").trim()||"items";return f[W]=p.arr||[],f}const v=h,k=Array.isArray(v),R=!k&&typeof v=="object"&&v!==null?v:void 0,L=R&&Array.isArray(R.lobby||R.items)?R.lobby||R.items:void 0,M=W=>k?v:L||W;return f.items=M(L||[]),f},O=h=>{var v;const p=!!((v=h.apiUrl)!=null&&v.trim()),b=p?g[h.id]:void 0;if(["OraculoSeccionEventoEnVivo","OraculoSeccionEventoSemana","OraculoSeccionEventoCombinadas"].includes(h.componentKey))return console.log(b),{items:b};let f=h.props?{...h.props}:{};if(p)f=w(b,null,f);else if(h.dataMode==="manual"){const k=$(h.manualItems);f=w(null,{arr:k,variableName:h.variableName},f);const R=T(h.manualScalarFields);f={...f,...R}}return f},F=(h,p,b)=>{const f={loading:"bg-blue-100 text-blue-800",error:"bg-red-100 text-red-800",component:"bg-yellow-100 text-yellow-800"};return e.jsx("div",{className:`mx-4 p-4 rounded ${f[p]}`,children:b},h)},B=h=>{var M;const p=h.componentKey,b=Ft[p]||d[p];if(!b)return console.warn(`No hay componente registrado para "${p}"`),F(h.id,"component",`Componente "${p}" no encontrado`);const f=!!((M=h.apiUrl)!=null&&M.trim()),v=f?g[h.id]:void 0,k=f?!!_[h.id]:!1,R=f?j[h.id]:"";if(f){if(k&&!v)return F(h.id,"loading",`Cargando datos desde ${h.apiUrl}...`);if(R&&!v)return F(h.id,"error",`Error cargando ${h.apiUrl}: ${R}`)}const L=O(h);return e.jsx("div",{style:{paddingLeft:16,paddingRight:16,width:"100%",boxSizing:"border-box"},children:e.jsx(b,{...L})},h.id)};return o&&!t?e.jsx("div",{className:"text-xs text-gray-400",children:"Cargando preview..."}):!o&&!t&&s.length===0?e.jsx("div",{className:"text-xs text-gray-500",children:"Sin secciones (Firestore)"}):e.jsx(P.Container,{className:"oli-font",maxWidth:!1,disableGutters:!0,sx:{backgroundColor:"#121212",position:"relative",pb:5,pt:5,width:"100%",maxWidth:"100%",overflowX:"hidden"},children:e.jsx(P.Stack,{direction:"column",spacing:8,useFlexGap:!0,children:S.map(B)})})};exports.OraculoButton=I;exports.OraculoCarousel=D;exports.OraculoCarouselDots=ne;exports.OraculoClubOlimpoVisual=_e;exports.OraculoEventCombinadasCard=Se;exports.OraculoEventEnVivoCard=Ce;exports.OraculoEventHeader=je;exports.OraculoEventLabel=se;exports.OraculoEventLeague=ve;exports.OraculoEventScore=ae;exports.OraculoEventSemanaCard=Ee;exports.OraculoEventStatus=he;exports.OraculoEventStatusBadge=ge;exports.OraculoEventTeamInfo=Y;exports.OraculoGameCard=K;exports.OraculoGameRankCard=be;exports.OraculoGameSlide=re;exports.OraculoGridGroup=A;exports.OraculoLiveCasinoCard=ye;exports.OraculoLogoMediosPago=te;exports.OraculoPageLandingPreview=Be;exports.OraculoSeccionBanners=Fe;exports.OraculoSeccionBonoBienvenida=ke;exports.OraculoSeccionCasino=$e;exports.OraculoSeccionCasinoEnVivo=Oe;exports.OraculoSeccionClubOlimpo=Ie;exports.OraculoSeccionDestacados=we;exports.OraculoSeccionEventoCombinadas=Re;exports.OraculoSeccionEventoEnVivo=Te;exports.OraculoSeccionEventoSemana=Pe;exports.OraculoSeccionTopJuegos=ie;exports.OraculoSeccionVirtuales=Ne;exports.OraculoSectionTitle=U;exports.OraculoTopJuegoItem=ie;exports.OraculoWelcomeBanner=oe;exports.default=Be;
19
+ `},ke=({headline:t,headline2:a,items:r,backgroundImageUrl:s})=>{const l=t,o=a,n=Ue.default("(max-width: 767px)"),d=r.length>1,x=s!=null?s:"",g=St(x),m=C.useRef(null),[_,i]=C.useState({isStart:!0,isEnd:!1}),[j,c]=C.useState(0);return n?e.jsxs(y.default,{component:"section",sx:{...g,textAlign:"center"},children:[(l||o)&&e.jsxs(y.default,{sx:ce,children:[l&&e.jsx(G.default,{component:"span",sx:de,children:l}),o&&e.jsxs(e.Fragment,{children:[e.jsx("br",{}),e.jsx(G.default,{component:"span",sx:ue,children:o})]})]}),e.jsxs(y.default,{children:[e.jsx(D,{ref:m,items:r,perPage:1,gap:"12px",breakpoints:{480:{perPage:1,gap:"8px",padding:{left:"8px",right:"8px"}},768:{perPage:1,gap:"12px",padding:{left:"8px",right:"8px"}}},options:{autoWidth:!1},renderItem:u=>e.jsx(oe,{...u,onButtonClick:r[0].onButtonClick}),onMove:({index:u,isStart:E,isEnd:N})=>{i({isStart:E,isEnd:N}),c(u)}}),d&&e.jsx(ne,{total:r.length,active:j,onSelect:u=>{var E;c(u),(E=m.current)==null||E.go(u)}})]})]}):e.jsx(y.default,{component:"section",sx:g,children:e.jsxs(y.default,{sx:{maxWidth:1200,mx:5,px:2,display:"grid",gridTemplateColumns:"200px auto",alignItems:"center"},children:[(l||o)&&e.jsx(y.default,{sx:{display:"flex",alignItems:"center",justifyContent:"flex-start",minHeight:"100%"},children:e.jsxs(y.default,{sx:{...ce,textAlign:"left",mb:0},children:[l&&e.jsx(G.default,{component:"span",sx:de,children:l}),o&&e.jsxs(e.Fragment,{children:[e.jsx("br",{}),e.jsx(G.default,{component:"span",sx:ue,children:o})]})]})}),e.jsx(y.default,{sx:{display:"flex",justifyContent:"center",alignItems:"center",flexWrap:"nowrap",gap:4},children:r.map((u,E)=>e.jsx(oe,{onButtonClick:u.onButtonClick,...u},E))})]})})},Ie=({className:t="",fullBleed:a=!0,items:r,selectedIndex:s=0,ariaLabel:l})=>{const o=C.useRef(null),n=C.useRef(null);if(!r)return null;const d=r;C.useLayoutEffect(()=>{if(!o.current||!n.current||typeof ResizeObserver=="undefined")return;const g=o.current,m=n.current,_=()=>{g.style.setProperty("--orc-co-bottomH",`${m.offsetHeight+16}px`)},i=new ResizeObserver(_);return i.observe(m),_(),()=>i.disconnect()},[]);const x=["orc-co-wrap",a?"orc-co-fullBleed":"",t].filter(Boolean).join(" ");return e.jsx("section",{ref:o,className:x,"aria-label":l||d.imgAlt||"Club Olimpo",children:e.jsx("div",{ref:n,children:e.jsx(_e,{text:d.text,onClick:d.onClick,imgAlt:d.imgAlt,imgSrcMobile:d.images.mobile,imgSrcDesktopBg:d.images.desktopBg,imgSrcDesktopLogo:d.images.desktopLogo})})})},Ct="oraculo__OraculoSeccionEventoCombinadas-module__controls___Zsta4",Et={controls:Ct};function Re({items:t,title:a="Combinadas del Olimpo",iconUrl:r,onViewMore:s,className:l=""}){const o=C.useRef(null),[n,d]=C.useState({isStart:!0,isEnd:!1}),[x,g]=C.useState([]),m=()=>{var S;(S=o.current)==null||S.prev()},_=()=>{var S;(S=o.current)==null||S.next(),console.log("items: ",t)},i=()=>{s==null||s()};function j(S,$,T){const w=[];for(const O of T){const F=u([O]),B=$.reduce((p,b)=>{p[b.eventId]||(p[b.eventId]=[]);const f=b.outcomes.filter(v=>F.has(v.id));return f.length>0&&p[b.eventId].push({...b,outcomes:f}),p},{}),h=c(O);S.forEach(p=>{if(p.id!==O.prePackCouponRows[0].eventId)return;const b=F;let f=null;for(const v of h)if([...v.requiredOutcomeIds].every(R=>b.has(R))){f=v.decimal;break}w.push({...p,combinadoTotal:f,betoffers:B[p.id]||[],couponId:O.id})})}return w}function c(S){var T;const $=[];for(const w of S.prePackCouponRows)if(w.type==="BET_BUILDER"&&((T=w.group)!=null&&T.groups)){const O=new Set;w.group.groups.forEach(F=>{var B;(B=F.outcomes)==null||B.forEach(h=>O.add(h.id))}),$.push({requiredOutcomeIds:O,decimal:w.odds.decimal})}return $}function u(S){var T;const $=new Set;for(const w of S)for(const O of w.prePackCouponRows)O.type==="BET_BUILDER"&&((T=O.group)!=null&&T.groups)&&O.group.groups.forEach(F=>{var B;(B=F.outcomes)==null||B.forEach(h=>$.add(h.id))}),O.type==="SIMPLE"&&O.outcome&&$.add(O.outcome.id);return $}async function E(){var S,$,T;try{const w=(T=($=(S=t==null?void 0:t.group)==null?void 0:S.groups)==null?void 0:$[0])==null?void 0:T.id;if(!w){console.error("Could not extract group ID");return}const O=`https://us1.offering-api.kambicdn.com/offering/v2018/nexuspe/prepackcoupon/eventgroup/${w}.json?lang=es_PE&market=PE&client_id=200&channel_id=1&ncid=1764283566783&prePackCouponTags=CUSTOM`,B=await(await fetch(O)).json();g(j(B.events,B.betOffers,B.prePackCoupons))}catch(w){console.error("loadDataEventSpecial error:",w)}}C.useEffect(()=>{t&&E()},[t]);const N=l||void 0;return e.jsx("section",{className:N,style:{width:"100%"},children:e.jsxs(z.default,{direction:"column",spacing:1.5,useFlexGap:!0,children:[e.jsxs(A,{spacing:1.5,columns:"1fr auto auto",justify:"start",children:[e.jsx(U,{title:a,iconUrl:r,size:"md"}),e.jsxs("div",{className:Et.controls,children:[e.jsxs(A,{spacing:1,columns:"auto auto",children:[e.jsx(I,{ariaLabel:"Anterior",variant:"secondary",iconOnly:!0,leftIcon:e.jsx(J.ChevronLeftRounded,{}),onClick:m,disabled:n.isStart}),e.jsx(I,{ariaLabel:"Siguiente",variant:"secondary",iconOnly:!0,rightIcon:e.jsx(J.ChevronRightRounded,{}),onClick:_,disabled:n.isEnd})]}),e.jsx(I,{variant:"secondary",onClick:i,children:"Ver más"})]})]}),e.jsx(D,{ref:o,items:x,perPage:3.72,gap:"16px",options:{autoWidth:!0},useIndexAsKey:!0,breakpoints:{768:{perPage:1.2,gap:"12px",padding:{left:"0px",right:"0px"}}},renderItem:S=>e.jsx(Se,{event:S}),onMove:({isStart:S,isEnd:$})=>d({isStart:S,isEnd:$})})]})})}function Te({items:t,title:a="En vivo",iconUrl:r,onViewMore:s,className:l=""}){var i,j;console.log("wefwef",t);const o=C.useRef(null),[n,d]=C.useState({isStart:!0,isEnd:!1}),x=()=>{var c;(c=o.current)==null||c.prev()},g=()=>{var c;(c=o.current)==null||c.next(),console.log("items: ",t)},m=()=>{s==null||s()},_=l||void 0;return e.jsxs("section",{className:_,style:{width:"100%"},children:[e.jsxs(A,{spacing:1.5,columns:"1fr auto auto",justify:"start",children:[e.jsx(U,{title:a,iconUrl:r,size:"md"}),e.jsxs("div",{style:{display:"flex",gap:8},children:[e.jsx(I,{ariaLabel:"Anterior",variant:"secondary",iconOnly:!0,leftIcon:e.jsx(J.ChevronLeftRounded,{}),onClick:x,disabled:n.isStart}),e.jsx(I,{ariaLabel:"Siguiente",variant:"secondary",iconOnly:!0,rightIcon:e.jsx(J.ChevronRightRounded,{}),onClick:g,disabled:n.isEnd})]}),e.jsx(I,{variant:"secondary",onClick:m,children:"Ver más"})]}),e.jsx(D,{ref:o,items:(j=(i=t==null?void 0:t.events)==null?void 0:i.filter(c=>c.event.sport==="FOOTBALL").sort((c,u)=>new Date(u.event.start).getTime()-new Date(c.event.start).getTime()))!=null?j:[],perPage:3.395,gap:"16px",options:{autoWidth:!0},breakpoints:{768:{perPage:1,gap:"8px",focus:"center",padding:{left:"16px",right:"16px"}},1024:{perPage:2.5,gap:"10px",padding:{right:"16px"}}},renderItem:c=>e.jsx(Ce,{...c}),onMove:({isStart:c,isEnd:u})=>d({isStart:c,isEnd:u})})]})}const wt="oraculo__OraculoSeccionEventoSemana-module__wrapper___eqVq-",Ot="oraculo__OraculoSeccionEventoSemana-module__container___5yFQs",$t="oraculo__OraculoSeccionEventoSemana-module__buttonWrapper___-6IDT",ee={wrapper:wt,container:Ot,buttonWrapper:$t};function Pe({items:t,title:a="En vivo",iconUrl:r,onViewMore:s,className:l=""}){const o=new Date;o.toISOString();const n=new Date(o);n.setDate(n.getDate()+7),n.toISOString();const d=C.useRef(null),[x,g]=C.useState({isStart:!0,isEnd:!1}),[m,_]=C.useState([]),i=()=>{s==null||s()};async function j(){try{const N=t.events.map(w=>{var O;return(O=w.event)==null?void 0:O.id}),S=N.map(w=>`id=${w}`).join("&"),T=`https://us1.offering-api.kambicdn.com/offering/v2018/nexuspe/betoffer/selected/combined_layout/event/${N[0]}?${S}&lang=es_PE&market=PE`;c(T)}catch(N){console.error(N)}}async function c(N){try{const $=await(await fetch(N)).json(),T=$.events.map(O=>O.event),w=$.events.flatMap(O=>O.betOffers||[]);_(u(T,w))}catch(S){console.error(S)}}function u(N,S){const T=S.filter(w=>{var O;return((O=w.betOfferType)==null?void 0:O.id)===2}).reduce((w,O)=>(w[O.eventId]||(w[O.eventId]=[]),w[O.eventId].push(O),w),{});return N.filter(w=>T[w.id]).map(w=>({...w,outcome:T[w.id]}))}C.useEffect(()=>{t&&t.events.length>0&&j()},[t]);const E=l||void 0;return e.jsx("section",{className:E,style:{width:"100%"},children:e.jsxs("div",{className:ee.wrapper,children:[e.jsx("div",{className:ee.container,children:e.jsxs(z.default,{direction:"column",spacing:1.5,useFlexGap:!0,children:[e.jsx(U,{title:"Eventos de la semana"}),e.jsx("div",{className:ee.buttonWrapper,children:e.jsx(I,{variant:"secondary",size:"lg",fullWidth:!0,onClick:()=>{i()},children:"Ver más"})})]})}),e.jsx("div",{style:{minWidth:0},children:e.jsx(D,{ref:d,items:m,perPage:3.5,gap:"16px",options:{autoWidth:!0},breakpoints:{1024:{perPage:1.4,gap:"8px",focus:"center",padding:{left:"8px",right:"8px"}}},renderItem:N=>e.jsx(Ee,{event:N}),onMove:({isStart:N,isEnd:S})=>g({isStart:N,isEnd:S})})})]})})}function Fe({backgrounds:t,items:a}){const[r,s]=C.useState(0),l=t.length||1;return e.jsxs(P.Box,{component:"section",sx:{position:"relative",overflow:"visible",pb:{xs:7,sm:8}},children:[e.jsxs(P.Box,{sx:{position:"relative",height:{xs:300,sm:360,md:420},borderRadius:0,overflow:"hidden"},children:[e.jsx(D,{items:t,perPage:1,gap:"0px",options:{type:"loop",pagination:!1,arrows:!1,drag:!0,focus:"center"},onMove:({index:o})=>s(o),renderItem:o=>{var n;return e.jsxs(P.Box,{sx:{position:"relative",height:{xs:300,sm:360,md:420}},children:[e.jsxs(P.Box,{component:"picture",sx:{position:"absolute",inset:0,lineHeight:0},children:[e.jsx("source",{srcSet:o.desktopSrc,media:"(min-width:800px)"}),e.jsx("source",{srcSet:o.mobileSrc,media:"(max-width:799px)"}),e.jsx(P.Box,{component:"img",src:(n=o.fallbackSrc)!=null?n:o.desktopSrc,alt:"","aria-hidden":!0,loading:"lazy",sx:{width:"100%",height:"100%",objectFit:"cover",display:"block"}})]}),e.jsx(P.Box,{sx:{position:"absolute",inset:0,pointerEvents:"none","&::before":{content:'""',position:"absolute",inset:0,background:"linear-gradient(180deg, rgba(0,0,0,0) 60%, rgba(0,0,0,.75) 100%)"}}})]})}}),e.jsx(P.Box,{sx:{position:"absolute",left:0,right:0,bottom:72,display:"flex",justifyContent:"center",zIndex:2},children:e.jsx(ne,{total:l,active:r})})]}),e.jsx(P.Box,{sx:{position:"absolute",bottom:{xs:36,sm:38},left:"50%",transform:"translateX(-50%)",width:"90%",backgroundColor:"#363636",borderRadius:2,py:1.5,px:1,display:"flex",justifyContent:"space-around",alignItems:"center",boxShadow:"0 10px 24px rgba(0,0,0,.35)",zIndex:3},children:a.map(o=>e.jsxs(P.Box,{sx:{display:"flex",flexDirection:{xs:"column",md:"row"},alignItems:"center",color:"#FFFFFF",minWidth:68,cursor:o.onclick?"pointer":"default"},onClick:()=>{var n;return(n=o.onclick)==null?void 0:n.call(o)},children:[o.icon&&e.jsx(P.Box,{component:"img",src:o.icon,alt:o.label||`icon-${o.id}`,sx:{width:{xs:28,md:32},height:{xs:28,md:32},mb:{xs:.5,md:0},mr:{xs:0,md:4},objectFit:"contain"}}),e.jsx(P.Typography,{sx:{fontSize:12,fontWeight:600,color:"#E0E0E0",textAlign:{xs:"center",md:"left"}},children:o.label})]},o.id))})]})}const Nt=[[{src:"https://stg-www.contodobet.com/static/img/landing/MediosPago/IBK.svg",alt:"Interbank"},{src:"https://stg-www.contodobet.com/static/img/landing/MediosPago/Yape.svg",alt:"Yape"}],[{src:"https://stg-www.contodobet.com/static/img/landing/MediosPago/tupay.svg",alt:"Tupay"},{src:"https://stg-www.contodobet.com/static/img/landing/MediosPago/monnet.svg",alt:"Monnet"},{src:"https://stg-www.contodobet.com/static/img/landing/MediosPago/niubiz.svg",alt:"Niubiz"}]];function kt({title:t="Medios de pago",rows:a=Nt}){const r=a.flat();return e.jsxs(P.Box,{component:"section","aria-labelledby":"mp-title",sx:{color:"#fff"},children:[e.jsx(P.Typography,{id:"mp-title",variant:"h6",sx:{fontWeight:800,fontSize:{xs:20,md:32},textAlign:"center",mb:1.5},children:t}),e.jsx(P.Box,{sx:{width:"288px",height:"2px",mx:"auto",mb:3,opacity:.95,filter:"blur(0.2px)",background:"linear-gradient(90deg, rgba(0,0,0,0) 0%, #1dd75b 18%, #23d46b 50%, #1dd75b 82%, rgba(0,0,0,0) 100%)"}}),e.jsx(P.Box,{sx:{display:{xs:"block",md:"none"}},children:a.map((s,l)=>e.jsx(P.Stack,{direction:"row",justifyContent:"center",alignItems:"center",gap:2.5,flexWrap:"wrap",children:s.map(o=>e.jsx(te,{...o},`${o.src}-${o.alt}`))},l))}),e.jsx(P.Box,{sx:{mt:3,display:{xs:"none",md:"grid"},gap:{xs:2.5,md:2.75},justifyItems:"center",alignItems:"center",gridTemplateColumns:{md:"repeat(auto-fit, 160px)"},justifyContent:{md:"center"}},children:r.map(s=>e.jsx(te,{...s},`${s.src}-${s.alt}`))})]})}const It={OraculoSeccionDestacados:we,OraculoSeccionTopJuegos:ie,OraculoSeccionCasinoEnVivo:Oe,OraculoSeccionCasino:$e,OraculoSeccionVirtuales:Ne,OraculoSeccionClubOlimpo:Ie,OraculoSeccionBonoBienvenida:ke,OraculoSeccionBanners:Fe,OraculoSeccionMediosPago:kt,OraculoSeccionEventoEnVivo:Te,OraculoSeccionEventoSemana:Pe,OraculoSeccionEventoCombinadas:Re},Rt=t=>typeof t=="function"||t&&typeof t=="object"&&"$$typeof"in t,Tt=t=>/^OraculoSeccion[A-Z]/.test(t),Pt=Object.fromEntries(Object.entries(It).filter(([t,a])=>Tt(t)&&Rt(a)));class pe extends Error{constructor(a,r,s){super(`HTTP ${a} ${s}`),this.status=a,this.url=r,this.statusText=s,this.name="HttpError"}}const Ft=({sectionsOverride:t,docId:a="home",db:r})=>{const[s,l]=C.useState([]),[o,n]=C.useState(!1),[d,x]=C.useState({}),[g,m]=C.useState({}),[_,i]=C.useState({}),[j,c]=C.useState({});C.useEffect(()=>{if(t||!r)return;n(!0);const h=le.onSnapshot(le.doc(r,"landings",a),p=>{var b;try{let f=p.exists()?((b=p.data())==null?void 0:b.sections)||[]:[];f=f.slice().sort((v,k)=>{var R,L;return((R=v.order)!=null?R:0)-((L=k.order)!=null?L:0)}).map((v,k)=>({...v,order:k+1})),l(f),console.log("fetched: ",f)}catch(f){console.error("Error procesando landings/"+a,f)}finally{n(!1)}},p=>{console.error("Error escuchando landings/"+a,p),n(!1)});return()=>h()},[t,a,r]);const u=async h=>{const p=(h.apiUrl||"").trim();if(!p)return;const b=h.apiMethod||"GET",f=h.apiParams||[];let v=p,k,R;if(b==="GET"){const M=new URL(p,typeof window=="undefined"?"http://localhost":window.location.origin);for(const W of f)W.key&&M.searchParams.append(W.key,W.value);v=M.toString()}else{const M=new URLSearchParams;for(const W of f)W.key&&M.append(W.key,W.value);k=M.toString(),R={"Content-Type":"application/x-www-form-urlencoded; charset=UTF-8"}}const L=await fetch(v,{method:b,headers:R,body:k});if(!L.ok)throw new pe(L.status,v,L.statusText);return L.json()},E=C.useMemo(()=>t?t.slice():s.slice(),[t,s]),N=Ge.default.useRef(new Set);C.useEffect(()=>{const h=E.map(p=>({s:p,url:(p.apiUrl||"").trim()})).filter(({url:p})=>!!p);if(h.length)for(const{s:p,url:b}of h){const f=`${p.id}|${b}`;N.current.has(f)||(N.current.add(f),i(v=>({...v,[p.id]:!0})),c(v=>({...v,[p.id]:""})),(async()=>{try{const v=await u(p);m(k=>({...k,[p.id]:v}))}catch(v){let k="Error desconocido";v instanceof pe?k=`Error HTTP ${v.status} (${v.statusText}) en ${v.url}`:v instanceof SyntaxError?k="Respuesta no es JSON válido":v instanceof TypeError?k="Fallo de red / CORS / conexión":typeof v=="string"&&(k=v.toString()),c(R=>({...R,[p.id]:k}))}finally{i(v=>({...v,[p.id]:!1}))}})())}},[E]);const S=C.useMemo(()=>E.filter(h=>h.visible).sort((h,p)=>h.order-p.order),[E]),$=h=>Array.isArray(h)?h.map(p=>{const b={};for(const f of p.fields||[]){const v=(f.type||"string").toLowerCase();if(v==="number")b[f.name]=Number(f.value);else if(v==="boolean")b[f.name]=String(f.value).toLowerCase()==="true";else if(v==="function"){const k=String(f.value||"").trim();b[f.name]=()=>{if(k)try{return new Function(k)()}catch(R){console.error("Error función manual",R)}}}else b[f.name]=f.value}return b}):[],T=h=>{const p={};if(!Array.isArray(h))return p;for(const b of h){if(!b.name)continue;const f=(b.type||"string").toLowerCase();if(f==="number")p[b.name]=Number(b.value);else if(f==="boolean")p[b.name]=String(b.value).toLowerCase()==="true";else if(f==="function"){const v=String(b.value||"").trim();p[b.name]=()=>{if(v)try{return new Function(v)()}catch(k){console.error("Error función escalar manual",k)}}}else p[b.name]=b.value}return p},w=(h,p,b)=>{const f=b?{...b}:{};if(p){const W=(p.variableName||"items").trim()||"items";return f[W]=p.arr||[],f}const v=h,k=Array.isArray(v),R=!k&&typeof v=="object"&&v!==null?v:void 0,L=R&&Array.isArray(R.lobby||R.items)?R.lobby||R.items:void 0,M=W=>k?v:L||W;return f.items=M(L||[]),f},O=h=>{var v;const p=!!((v=h.apiUrl)!=null&&v.trim()),b=p?g[h.id]:void 0;if(["OraculoSeccionEventoEnVivo","OraculoSeccionEventoSemana","OraculoSeccionEventoCombinadas"].includes(h.componentKey))return console.log(b),{items:b};let f=h.props?{...h.props}:{};if(p)f=w(b,null,f);else if(h.dataMode==="manual"){const k=$(h.manualItems);f=w(null,{arr:k,variableName:h.variableName},f);const R=T(h.manualScalarFields);f={...f,...R}}return f},F=(h,p,b)=>{const f={loading:"bg-blue-100 text-blue-800",error:"bg-red-100 text-red-800",component:"bg-yellow-100 text-yellow-800"};return e.jsx("div",{className:`mx-4 p-4 rounded ${f[p]}`,children:b},h)},B=h=>{var M;const p=h.componentKey,b=Pt[p]||d[p];if(!b)return console.warn(`No hay componente registrado para "${p}"`),F(h.id,"component",`Componente "${p}" no encontrado`);const f=!!((M=h.apiUrl)!=null&&M.trim()),v=f?g[h.id]:void 0,k=f?!!_[h.id]:!1,R=f?j[h.id]:"";if(f){if(k&&!v)return F(h.id,"loading",`Cargando datos desde ${h.apiUrl}...`);if(R&&!v)return F(h.id,"error",`Error cargando ${h.apiUrl}: ${R}`)}const L=O(h);return e.jsx("div",{style:{paddingLeft:16,paddingRight:16,width:"100%",boxSizing:"border-box"},children:e.jsx(b,{...L})},h.id)};return o&&!t?e.jsx("div",{className:"text-xs text-gray-400",children:"Cargando preview..."}):!o&&!t&&s.length===0?e.jsx("div",{className:"text-xs text-gray-500",children:"Sin secciones (Firestore)"}):e.jsx(P.Container,{className:"oli-font",maxWidth:!1,disableGutters:!0,sx:{backgroundColor:"#121212",position:"relative",pb:5,pt:5,width:"100%",maxWidth:"100%",overflowX:"hidden"},children:e.jsx(P.Stack,{direction:"column",spacing:8,useFlexGap:!0,children:S.map(B)})})};exports.OraculoButton=I;exports.OraculoCarousel=D;exports.OraculoCarouselDots=ne;exports.OraculoClubOlimpoVisual=_e;exports.OraculoEventCombinadasCard=Se;exports.OraculoEventEnVivoCard=Ce;exports.OraculoEventHeader=je;exports.OraculoEventLabel=se;exports.OraculoEventLeague=ve;exports.OraculoEventScore=ae;exports.OraculoEventSemanaCard=Ee;exports.OraculoEventStatus=he;exports.OraculoEventStatusBadge=ge;exports.OraculoEventTeamInfo=Y;exports.OraculoGameCard=K;exports.OraculoGameRankCard=be;exports.OraculoGameSlide=re;exports.OraculoGridGroup=A;exports.OraculoLiveCasinoCard=ye;exports.OraculoLogoMediosPago=te;exports.OraculoPageLandingPreview=Ft;exports.OraculoSeccionBanners=Fe;exports.OraculoSeccionBonoBienvenida=ke;exports.OraculoSeccionCasino=$e;exports.OraculoSeccionCasinoEnVivo=Oe;exports.OraculoSeccionClubOlimpo=Ie;exports.OraculoSeccionDestacados=we;exports.OraculoSeccionEventoCombinadas=Re;exports.OraculoSeccionEventoEnVivo=Te;exports.OraculoSeccionEventoSemana=Pe;exports.OraculoSeccionTopJuegos=ie;exports.OraculoSeccionVirtuales=Ne;exports.OraculoSectionTitle=U;exports.OraculoTopJuegoItem=ie;exports.OraculoWelcomeBanner=oe;
20
20
  //# sourceMappingURL=index.cjs.js.map