oraculo-ui 0.1.50 → 0.1.52
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 +6 -6
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.css +1 -1
- package/dist/index.es.js +1208 -1170
- package/dist/index.es.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs.js
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("react/jsx-runtime"),T=require("@mui/material"),C=require("react"),fe=require("@splidejs/react-splide"),Ge=require("@mui/material/Box"),Ae=require("@mui/material/Typography"),De=require("@mui/material/Stack"),q=require("@mui/icons-material"),He=require("@mui/icons-material/ChevronLeftRounded"),Ve=require("@mui/icons-material/ChevronRightRounded"),qe=require("@mui/material/useMediaQuery"),de=require("firebase/firestore"),H=t=>t&&t.__esModule?t:{default:t},Je=H(C),S=H(Ge),W=H(Ae),F=H(De),ge=H(He),he=H(Ve),Ke=H(qe);function B({children:t,onClick:n,href:a,target:r,rel:l,type:o="button",disabled:s=!1,variant:x="primary",size:m,fullWidth:v=!1,fullHeight:b=!1,className:j="",ariaLabel:c,leftIcon:d,rightIcon:i,iconOnly:f}){const y=!!t&&t!==!0,R=(!!d?1:0)+(!!i?1:0)==1,$=f!=null?f:R&&!y,E=["orc-btn",x==="secondary"?"orc-btn--secondary":x==="tertiary"?"orc-btn--tertiary":"orc-btn--primary",m?`orc-btn--${m}`:"",v?"orc-btn--full":"",b?"orc-btn--fullHeight":"",$?"orc-btn--iconOnly":"",j].filter(Boolean).join(" "),I=e.jsxs(e.Fragment,{children:[d&&e.jsx("span",{className:"orc-btn__icon",children:d}),!$&&e.jsx("span",{className:"orc-btn__label",children:t}),i&&e.jsx("span",{className:"orc-btn__icon",children:i})]}),p=s?!0:void 0;return a?e.jsx(T.Link,{href:a,target:r,rel:l,"aria-label":c,"aria-disabled":p,tabIndex:p?-1:void 0,className:E,onClick:p?u=>u.preventDefault():n,children:I}):e.jsx("button",{type:o,onClick:n,disabled:!!p,"aria-label":c,className:E,children:I})}function G({title:t,iconUrl:n,size:a="md",className:r=""}){const o=["orc-section-title",a?`orc-section-title--${a}`:"",r].filter(Boolean).join(" ");return e.jsxs("div",{className:o,children:[n&&e.jsx("img",{src:n,alt:"",className:"orc-section-title__icon"}),e.jsx("h2",{className:"orc-section-title__title",children:t})]})}const se=({total:t,active:n,onSelect:a,className:r=""})=>{if(t<=1)return null;const l=["orc-dots",r].filter(Boolean).join(" ");return e.jsx("div",{className:l,role:"tablist",children:Array.from({length:t}).map((o,s)=>e.jsx("span",{className:"orc-dots__cell",children:e.jsx("button",{type:"button",role:"tab","aria-selected":s===n,"aria-label":`Ir al slide ${s+1}`,className:"orc-dots__dot"+(s===n?" orc-dots__dot--active":""),onClick:()=>a==null?void 0:a(s)})},s))})};function U({children:t,minWidth:n=32,spacing:a=2,justify:r="stretch",columns:l=null}){const o=l||`repeat(auto-fit, minmax(${n}px, 1fr))`,s=typeof a=="number"?`${a*8}px`:a;return e.jsx("div",{style:{display:"grid",gridTemplateColumns:o,justifyItems:r,gap:s,height:"inherit"},children:t})}function oe({src:t,alt:n}){return e.jsx(T.Box,{sx:{position:"relative",width:{xs:80,md:160},height:{xs:48,md:96},display:"inline-block"},children:e.jsx(T.Box,{component:"img",src:t,alt:n,sx:{position:"absolute",top:0,left:0,width:"100%",height:"100%",objectFit:"contain"}})})}const Xe="oraculo__OraculoEventTitle-module__contenedor___rg1vw",Qe="oraculo__OraculoEventTitle-module__flexGroup___jMLFO",Ye="oraculo__OraculoEventTitle-module__subtitle___TmHna",Q={contenedor:Xe,flexGroup:Qe,subtitle:Ye};function Ze({title:t,subtitle:n}){return e.jsxs("div",{className:Q.contenedor,children:[e.jsx("span",{style:{fontWeight:700,fontSize:"12px",lineHeight:"16px"},children:t}),n&&e.jsxs("div",{className:Q.flexGroup,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",{className:Q.subtitle,children:n}),e.jsx("div",{})]})]})}function _e({text:t,color:n="#ff3b3b",textColor:a="#fff"}){return e.jsx("span",{className:"oli-font",style:{backgroundColor:n,color:a,borderRadius:"8px",padding:"4px 8px",fontSize:"12px",lineHeight:"16px",fontWeight:700,width:"41px",height:"16px",textAlign:"center"},children:t})}function be({live:t,time:n}){return e.jsxs("div",{className:"oli-font",style:{display:"flex",alignItems:"center",gap:"8px"},children:[t&&e.jsx(_e,{text:"En vivo"}),n&&e.jsx("span",{style:{fontSize:"14px",fontWeight:400,lineHeight:"18px",paddingTop:"4px"},children:n})]})}function ve({title:t,subtitle:n,live:a=!1,time:r=""}){return e.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",color:"#FFFFFF"},children:[e.jsx(Ze,{title:t,subtitle:n}),e.jsx(be,{live:a,time:r})]})}const et="oraculo__OraculoEventLabel-module__label___c64Xw",tt={label:et};function ae({text:t}){return e.jsx("span",{className:tt.label,children:t})}const ot="oraculo__OraculoEventLeague-module__container___rdk4F",nt={container:ot};function je({title:t}){return e.jsx("div",{className:nt.container,children:t.toUpperCase()})}const st="oraculo__OraculoEventScore-module__scoreWrapper___fWwEr",at="oraculo__OraculoEventScore-module__name___r4uL6",rt="oraculo__OraculoEventScore-module__score___Xl03M",it="oraculo__OraculoEventScore-module__normal___cCNFz",ct="oraculo__OraculoEventScore-module__small___fVt8E",V={scoreWrapper:st,name:at,score:rt,normal:it,small:ct};function re({text:t,name:n,size:a="normal"}){return e.jsxs("div",{className:`${V.scoreWrapper} ${V[a]}`,children:[e.jsx("div",{className:`${V.score} ${V[a]}`,children:t}),n&&e.jsx("span",{className:`${V.name} ${V[a]}`,children:n})]})}const lt="oraculo__OraculoEventTeamInfo-module__team___UfpUs",dt="oraculo__OraculoEventTeamInfo-module__regular___ag826",ut="oraculo__OraculoEventTeamInfo-module__logo___fKCl3",pt="oraculo__OraculoEventTeamInfo-module__name___4ikm-",mt="oraculo__OraculoEventTeamInfo-module__compact___RCNOs",X={team:lt,regular:dt,logo:ut,name:pt,compact:mt};function K({name:t,logo:n,size:a="regular"}){return e.jsxs("div",{className:`oli-font ${X.team} ${X[a]}`,children:[e.jsx("img",{src:n,alt:t,className:X.logo}),e.jsx("span",{className:X.name,children:t})]})}const xt=fe.Splide,ft=fe.SplideSlide,A=C.forwardRef(({items:t=[],renderItem:n,perPage:a=1,gap:r="0px",breakpoints:l,options:o={},className:s="",onMove:x,useIndexAsKey:m=!1},v)=>{const b=C.useRef(null);C.useImperativeHandle(v,()=>({next:()=>{var i;return(i=b.current)==null?void 0:i.go(">")},prev:()=>{var i;return(i=b.current)==null?void 0:i.go("<")},go:i=>{var f;return(f=b.current)==null?void 0:f.go(i)}}));const j=C.useCallback(i=>{const f=i.Components.Controller,y=f.getIndex(),k=f.getEnd(),O=y===0,R=y>=k,$=i.Components.Slides.getLength();x==null||x({index:y,isStart:O,isEnd:R,total:$})},[x]),c=C.useCallback(i=>{j(i)},[j]),d={type:"slide",trimSpace:!1,drag:!0,pagination:!1,arrows:!1,rewind:!1,focus:"start",autoWidth:!1,perPage:a,gap:r,breakpoints:l,...o};return e.jsx("div",{className:s,style:{width:"100%"},children:e.jsx(xt,{ref:b,options:d,onMove:j,onMounted:c,children:t.map((i,f)=>{var y;return e.jsx(ft,{children:n(i,f)},m?f:(y=i.id)!=null?y:f)})})})}),J=({imageUrl:t,onClick:n,size:a="sm",fillParent:r=!1})=>{const l=a==="lg"?{w:280,h:352}:{w:152,h:168},o=x=>{x.stopPropagation(),n==null||n()},s=r?{width:"100%",height:"100%"}:{width:`${l.w}px`,height:`${l.h}px`};return e.jsxs(S.default,{onClick:n,role:"button",sx:{position:"relative",borderRadius:"12px",overflow:"hidden",boxSizing:"border-box",transition:"transform .15s ease, box-shadow .15s ease",...s,"&: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(S.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(S.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(B,{variant:"primary",size:"md",onClick:o,children:"JUGAR"})})]})};function ye({imageUrl:t,orden:n=1,onClick:a,sizes:r={xs:{w:104,h:112,r:18,font:48},md:{w:186,h:264,r:22.6,font:64}}}){var b,j,c,d;const l=(i,f)=>{var y,k,O,R;return{xs:(k=(y=r.xs)==null?void 0:y[i])!=null?k:f,md:(R=(O=r.md)==null?void 0:O[i])!=null?R:f}},o=l("w",186),s=l("h",264),x=l("r",22.6),m=l("font",64),v={xs:Math.round(((j=(b=r.xs)==null?void 0:b.font)!=null?j:64)*.28),md:Math.round(((d=(c=r.md)==null?void 0:c.font)!=null?d:64)*.28)};return e.jsxs(S.default,{sx:{position:"relative",width:"100%",maxWidth:{xs:`${o.xs}px`,md:`${o.md}px`},aspectRatio:{xs:`${o.xs}/${s.xs}`,md:`${o.md}/${s.md}`},borderRadius:{xs:`${x.xs}px`,md:`${x.md}px`},boxSizing:"border-box",overflow:"visible",pb:{xs:`${v.xs}px`,md:`${v.md}px`}},children:[e.jsx(S.default,{sx:{position:"absolute",inset:0,borderRadius:"inherit",overflow:"hidden"},children:e.jsx(J,{imageUrl:t,onClick:a,size:"lg",fillParent:!0})}),e.jsx(S.default,{component:"span",sx:{position:"absolute",left:8,bottom:{xs:`-${v.xs}px`,md:`-${v.md}px`},fontFamily:"secondary",fontSize:{xs:`${m.xs}px`,md:`${m.md}px`},lineHeight:1,color:"#3CC666",WebkitTextStroke:"1px #9ee86e",zIndex:3,userSelect:"none"},children:n})]})}const we=({logo:t,provider:n,providerName:a,machine:r,onClick:l})=>{var o;return e.jsxs(S.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(S.default,{component:"img",src:t,alt:`Juego ${r!=null?r:""}`,sx:{position:"absolute",inset:0,width:"100%",height:"100%",objectFit:"cover",display:"block"}}),e.jsx(S.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(W.default,{sx:{color:"#fff",fontWeight:700,fontSize:{xs:11,md:14},textTransform:"capitalize"},children:(o=n!=null?n:a)!=null?o:""})})]})},Y=12,ie=({items:t,layout:n="grid",onClick:a})=>{var r;if(n==="mosaic"){const l=t[0],o=t.slice(1,5);return e.jsxs(S.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:`${Y}px`,rowGap:`${Y}px`,alignItems:"stretch",justifyItems:"stretch"},children:[l&&e.jsx(S.default,{sx:{width:{xs:184,md:280},height:{xs:234,md:352},gridRow:"1 / span 2",overflow:"hidden",borderRadius:2},children:e.jsx(J,{imageUrl:`https://olimpo.bet${(r=l.imageUrl)!=null?r:""}`,size:"lg",fillParent:!0,onClick:()=>a==null?void 0:a(l,0)})}),o.map((s,x)=>{var m;return e.jsx(S.default,{sx:{width:{xs:104,md:152},height:{xs:112,md:168},overflow:"hidden",borderRadius:2},children:e.jsx(J,{imageUrl:`https://olimpo.bet${(m=s.imageUrl)!=null?m:""}`,size:"sm",fillParent:!0,onClick:()=>a==null?void 0:a(s,x+1)})},s.id)})]})}return e.jsx(S.default,{sx:{display:"grid",gridTemplateColumns:{xs:"repeat(2, 104px)",md:"repeat(2, 152px)"},gridTemplateRows:{xs:"repeat(2, 112px)",md:"repeat(2, 168px)"},gap:`${Y}px`,gridAutoFlow:"column"},children:t.map((l,o)=>{var s,x;return e.jsx(S.default,{sx:{overflow:"hidden",borderRadius:2},children:e.jsx(J,{imageUrl:`https://olimpo.bet${(s=l.imageUrl)!=null?s:""}`,size:"sm",fillParent:!0,onClick:()=>a==null?void 0:a(l,o)})},(x=l.id)!=null?x:o)})})},ne=({title:t,amount:n,subtitle:a,buttonText:r,onButtonClick:l,backgroundImage:o,alt:s,className:x="",variant:m="small"})=>{const v=n?n.slice(0,2):"",b=n?n.slice(2):"",j=m==="large";return e.jsxs(S.default,{className:x,sx:{position:"relative",width:"100%",maxWidth:{xs:328,lg:j?618:456},mx:"auto"},children:[o&&e.jsx(S.default,{sx:{position:"relative",width:"100%",aspectRatio:{xs:"328 / 188",lg:j?"618 / 346":"456 / 272"},borderRadius:"14px",overflow:"hidden"},children:e.jsx(S.default,{component:"img",src:o,alt:s!=null?s:"Fondo promocional",sx:{width:"100%",height:"100%",objectFit:"cover",objectPosition:{xs:"50% 0%",lg:"45% 0%"},display:"block"}})}),e.jsx(S.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(S.default,{sx:{maxWidth:"60%",display:"flex",flexDirection:"column",alignItems:"center"},children:[t&&e.jsx(W.default,{sx:{fontSize:{xs:12,lg:20},fontWeight:400,color:"#e7f8ff"},children:t}),n&&e.jsxs(S.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(S.default,{component:"span",sx:{fontSize:{xs:35,lg:48},mr:.5},children:v}),e.jsx(S.default,{component:"span",sx:{fontSize:{xs:52,lg:77}},children:b})]}),a&&e.jsx(W.default,{sx:{pb:"20px",fontSize:14,fontWeight:600,color:"#e7f8ff"},children:a}),r&&e.jsx(B,{onClick:l,children:r})]})})]})},Se=({text:t,buttonLabel:n="Conoce más",onClick:a,imgAlt:r="Club Olimpo",imgSrcMobile:l,imgSrcDesktopBg:o,imgSrcDesktopLogo:s})=>e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"orc-co-bgMobile",children:e.jsx("img",{src:l,alt:r,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:`${r} fondo`,className:"orc-co-bgDesktopImg"})}),s&&e.jsx("div",{className:"orc-co-logo",children:e.jsx("img",{src:s,alt:`${r} logo`,className:"orc-co-logoImg"})}),e.jsxs("div",{className:"orc-co-desktopContent",children:[e.jsx("p",{className:"orc-co-captionDesktop",children:t}),e.jsx(B,{onClick:a,variant:"primary",size:"md",children:n})]})]}),e.jsxs("div",{className:"orc-co-bottom",children:[e.jsx("p",{className:"orc-co-caption",children:t}),e.jsx(B,{onClick:a,variant:"primary",size:"md",children:n})]})]}),gt="oraculo__OraculoEventCombinadasCard-module__card___ulQeY",ht="oraculo__OraculoEventCombinadasCard-module__combinadas___Gxrld",_t="oraculo__OraculoEventCombinadasCard-module__apuestaItem___YnYMy",bt="oraculo__OraculoEventCombinadasCard-module__lineContainer___G5rbU",vt="oraculo__OraculoEventCombinadasCard-module__circle___eehm-",jt="oraculo__OraculoEventCombinadasCard-module__line___Eb2pK",yt="oraculo__OraculoEventCombinadasCard-module__apuestaText___b5s7S",wt="oraculo__OraculoEventCombinadasCard-module__cuotaTotal___Lohvu",D={card:gt,combinadas:ht,apuestaItem:_t,lineContainer:bt,circle:vt,line:jt,apuestaText:yt,cuotaTotal:wt};function ce(t){const n=Array.isArray(t)?t:[t];sessionStorage.setItem("landingOutcomes",JSON.stringify(n)),window.location.href="/#home"}function Ce({event:t}){var r;function n(l){var b;const o=(b=l.betoffers)!=null?b:[],s=l.homeName,x=l.awayName,m=o.map(j=>{var f,y,k,O;let c=j.outcomes[0],d="",i=c!=null&&c.line?c.line/1e3:"";return["Más de","Mas de","Over"].includes(c==null?void 0:c.label)?(d=`Más de ${i}`,c!=null&&c.participant&&(d=`${c.participant} - ${d}`)):["Menos de","Menos"].includes(c==null?void 0:c.label)?(d=`Menos de ${i}`,c!=null&&c.participant&&(d=`${c.participant} - ${d}`)):["Sí","No"].includes(c==null?void 0:c.label)?(d=c==null?void 0:c.label,c!=null&&c.participant&&(d=`${c.participant} - ${d}`)):["1X","12","X2"].includes(c==null?void 0:c.label)?c.label==="1X"?d=`${s} o Empate`:c.label==="12"?d=`${s} o ${x}`:c.label==="X2"&&(d=`${x} o Empate`):(c!=null&&c.participant?d=c.participant:d=(f=c==null?void 0:c.label)!=null?f:"",i!==""&&d===c.label&&(d=`${c.label} ${i}`)),{id:(y=c==null?void 0:c.id)!=null?y:0,value:d,label:j.criterion.label,odds:(k=c==null?void 0:c.odds)!=null?k:0,bl:(O=c==null?void 0:c.label)!=null?O:0}}),v=m.reduce((j,c)=>j+c.odds,0)/1e3;return{outcomes:m,total:v.toFixed(2)}}const a=n(t);return e.jsxs("div",{className:D.card,children:[e.jsx("div",{className:D.combinadas,children:e.jsxs(F.default,{direction:"column",spacing:.5,useFlexGap:!0,children:[e.jsx(G,{title:t.name,iconUrl:"/assets/img/home/Combinadas/pelota.png",size:"xs"}),e.jsx("img",{src:"/assets/img/home/Combinadas/line.png"}),e.jsx(F.default,{direction:"column",spacing:.5,useFlexGap:!0,children:a.outcomes.map((l,o)=>e.jsxs("div",{className:D.apuestaItem,children:[e.jsxs("div",{className:D.lineContainer,children:[e.jsx("div",{className:D.circle}),o<a.outcomes.length-1&&e.jsx("div",{className:D.line})]}),e.jsxs("div",{className:D.apuestaText,children:[e.jsx("strong",{children:l.value})," ","| ",l.label]})]},o))})]})}),e.jsxs("button",{onClick:()=>{var l,o;return ce((o=(l=a==null?void 0:a.outcomes)==null?void 0:l.map(s=>s==null?void 0:s.id))!=null?o:[])},className:D.cuotaTotal,children:[e.jsxs("span",{children:["Cuota total: ",e.jsx("strong",{children:(((r=t.combinadoTotal)!=null?r:0)/1e3).toFixed(2)})]}),e.jsx("img",{src:"/assets/img/home/Combinadas/cuotaTotal.svg",alt:"cuota total"})]})]})}const z={"orc-btn":"oraculo__OraculoButtonBet-module__orc-btn___jakza","orc-btn__label":"oraculo__OraculoButtonBet-module__orc-btn__label___zNFEH","orc-btn__icon":"oraculo__OraculoButtonBet-module__orc-btn__icon___5Rhyd","orc-btn--primary":"oraculo__OraculoButtonBet-module__orc-btn--primary___7TlJB","orc-btn--secondary":"oraculo__OraculoButtonBet-module__orc-btn--secondary___X4kJt","orc-btn--tertiary":"oraculo__OraculoButtonBet-module__orc-btn--tertiary___iS6eD","orc-btn--sm":"oraculo__OraculoButtonBet-module__orc-btn--sm___lIF2e","orc-btn--md":"oraculo__OraculoButtonBet-module__orc-btn--md___x4SI7","orc-btn--lg":"oraculo__OraculoButtonBet-module__orc-btn--lg___0BQNI","orc-btn--iconOnly":"oraculo__OraculoButtonBet-module__orc-btn--iconOnly___hQGwI","orc-btn--full":"oraculo__OraculoButtonBet-module__orc-btn--full___z-Myo","orc-btn--fullHeight":"oraculo__OraculoButtonBet-module__orc-btn--fullHeight___pCxq1"};function St({children:t,onClick:n,href:a,target:r,rel:l,type:o="button",disabled:s=!1,variant:x="primary",size:m,fullWidth:v=!1,fullHeight:b=!1,className:j="",ariaLabel:c,leftIcon:d,rightIcon:i,iconOnly:f}){const y=!!t&&t!==!0,R=(!!d?1:0)+(!!i?1:0)==1,$=f!=null?f:R&&!y,E=[z["orc-btn"],z[`orc-btn--${x}`],m?z[`orc-btn--${m}`]:"",v?z["orc-btn--full"]:"",b?z["orc-btn--fullHeight"]:"",$?z["orc-btn--iconOnly"]:"",j].filter(Boolean).join(" "),I=e.jsxs(e.Fragment,{children:[d&&e.jsx("span",{className:z["orc-btn__icon"],children:d}),!$&&e.jsx("span",{className:z["orc-btn__label"],children:t}),i&&e.jsx("span",{className:z["orc-btn__icon"],children:i})]}),p=s?!0:void 0;return a?e.jsx(T.Link,{href:a,target:r,rel:l,"aria-label":c,"aria-disabled":p,tabIndex:p?-1:void 0,className:E,onClick:p?u=>u.preventDefault():n,children:I}):e.jsx("button",{type:o,onClick:n,disabled:!!p,"aria-label":c,className:E,children:I})}function Ee({event:t,liveData:n,betOffers:a,fondo:r="/assets/img/home/EnVivo/fondo.png"}){var o,s,x,m,v,b,j,c;const l=a==null?void 0:a.find(d=>{var i;return((i=d.betOfferType)==null?void 0:i.id)===2});return e.jsx("div",{style:{backgroundImage:`url(${r})`,backgroundSize:"cover",minHeight:"160px",width:"296px",padding:"12px 16px",borderRadius:"16px"},children:e.jsxs(F.default,{direction:"column",spacing:1,useFlexGap:!0,children:[e.jsxs(F.default,{direction:"column",spacing:1.5,useFlexGap:!0,children:[e.jsx(ve,{title:(o=t.path[0].name)!=null?o:"",subtitle:t.group,live:!0,time:((s=n==null?void 0:n.matchClock)==null?void 0:s.minute)!=null?`${n.matchClock.minute}'`:""}),e.jsx("div",{style:{padding:"0 4px"},children:e.jsxs(U,{spacing:1.5,columns:"1fr auto 1fr",children:[e.jsx(K,{name:t.homeName,logo:"/assets/img/home/EnVivo/Juventus.png"}),e.jsx(re,{text:((m=(x=n==null?void 0:n.score)==null?void 0:x.home)!=null?m:0)+":"+((b=(v=n==null?void 0:n.score)==null?void 0:v.away)!=null?b:0),name:"En vivo"}),e.jsx(K,{name:t.awayName,logo:"/assets/img/home/EnVivo/Racing.png"})]})})]}),e.jsxs(F.default,{direction:"column",spacing:1,useFlexGap:!0,children:[e.jsx(U,{spacing:1,children:((j=l==null?void 0:l.outcomes)!=null?j:[]).map((d,i)=>e.jsx(ae,{text:d.label.toUpperCase()},i))}),e.jsx(U,{spacing:2,children:((c=l==null?void 0:l.outcomes)!=null?c:[]).map((d,i)=>e.jsx(St,{variant:"primary",disabled:d.odds==null||(l==null?void 0:l.cashOutStatus)=="SUSPENDED",onClick:()=>{ce(d.id)},children:d.odds===void 0?"":(d.odds/1e3).toFixed(2)},i))})]})]})})}const Ct="oraculo__OraculoEventDate-module__date___xhIlh",Et={date:Ct};function Ot({text:t}){return e.jsx("div",{className:`oli-font ${Et.date}`,children:t})}const It="oraculo__OraculoEventSemanaCard-module__cardContainer___4JuDe",$t="oraculo__OraculoEventSemanaCard-module__cardBackground___vfalD",Nt="oraculo__OraculoEventSemanaCard-module__jugadas___W8b7H",Z={cardContainer:It,cardBackground:$t,jugadas:Nt};function Oe({event:t}){var a,r,l,o,s,x,m;function n(v){const b=new Date(v),j=b.toLocaleDateString("es-ES",{weekday:"short"}).toUpperCase(),c=b.getDate().toString().padStart(2,"0"),d=(b.getMonth()+1).toString().padStart(2,"0");let i=b.toLocaleTimeString("es-PE",{hour:"numeric",minute:"2-digit",hour12:!0}).toUpperCase();return i=i.replace(/\./g,"").replace(/A\s*M/i,"AM").replace(/P\s*M/i,"PM"),`${j} ${c}/${d} | ${i}`}return e.jsxs("div",{className:Z.cardContainer,children:[e.jsx(je,{title:(a=t.group)!=null?a:""}),e.jsx("div",{className:Z.cardBackground,children:e.jsxs(F.default,{direction:"column",spacing:{xs:.5,md:1},useFlexGap:!0,children:[e.jsxs(F.default,{direction:"column",spacing:1,useFlexGap:!0,children:[e.jsxs(U,{spacing:1,columns:"1fr auto 1fr",children:[e.jsx(K,{name:t.awayName,logo:"/assets/img/home/EventoSemana/Flamengo.png",size:"compact"}),e.jsx(re,{text:"vs.",name:"",size:"small"}),e.jsx(K,{name:t.homeName,logo:"/assets/img/home/EventoSemana/RealMadrid.png",size:"compact"})]}),e.jsx(Ot,{text:n(t.start)})]}),e.jsxs(F.default,{direction:"column",spacing:{xs:.5,md:1},useFlexGap:!0,children:[e.jsx(U,{spacing:1,children:((o=(l=(r=t==null?void 0:t.outcome)==null?void 0:r[0])==null?void 0:l.outcomes)!=null?o:[]).map((v,b)=>e.jsx(ae,{text:v.label.toUpperCase()},b))}),e.jsx("div",{className:Z.jugadas,children:e.jsx(U,{spacing:1,children:((m=(x=(s=t==null?void 0:t.outcome)==null?void 0:s[0])==null?void 0:x.outcomes)!=null?m:[]).map((v,b)=>e.jsx(B,{variant:"primary",fullHeight:!0,onClick:()=>{ce(v.id)},children:(v.odds/1e3).toFixed(2)},b))})})]})]})})]})}function Ie({items:t,title:n="Destacados",iconUrl:a,onViewMore:r,className:l=""}){const o=C.useRef(null),[s,x]=C.useState({isStart:!0,isEnd:!1}),m=()=>{var d;(d=o.current)==null||d.prev()},v=()=>{var d;(d=o.current)==null||d.next(),console.log("items: ",t)},b=()=>{window.location.href="https://www.olimpo.bet/promociones"},j=d=>{if(!d||typeof window=="undefined")return;const f=`https://www.olimpo.bet/promociones/${encodeURIComponent(d)}`;window.location.href=f},c=l||void 0;return e.jsxs("section",{className:c,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(G,{title:n,iconUrl:a,size:"md"}),e.jsxs("div",{style:{display:"flex",gap:8},children:[e.jsx(B,{ariaLabel:"Anterior",variant:"secondary",iconOnly:!0,leftIcon:e.jsx(q.ChevronLeftRounded,{}),onClick:m,disabled:s.isStart}),e.jsx(B,{ariaLabel:"Siguiente",variant:"secondary",iconOnly:!0,rightIcon:e.jsx(q.ChevronRightRounded,{}),onClick:v,disabled:s.isEnd})]}),e.jsx(B,{variant:"secondary",onClick:b,children:"Ver más"})]}),e.jsx(A,{ref:o,items:t,perPage:3,gap:"16px",options:{autoWidth:!1},breakpoints:{768:{perPage:1.15,focus:"start"},1024:{perPage:2.5,focus:"start"}},renderItem:d=>e.jsx("div",{style:{textAlign:"center",marginTop:16,cursor:"pointer"},onClick:()=>j(d.promotion),children:e.jsx("img",{src:`https://olimpo.bet${d.image!==""?d.image:d.summary_image}`,alt:d.title,style:{width:"100%",height:"150px",borderRadius:8,display:"block"}})},`${d.title}-${d.image}`),onMove:({isStart:d,isEnd:i})=>x({isStart:d,isEnd:i})})]})}const kt=t=>{var c,d,i,f,y,k;if(typeof window=="undefined")return;const n=(d=(c=t.name)!=null?c:t.web_name)!=null?d:"",a=(i=t.provider)!=null?i:"",r=(f=t.machine)!=null?f:"",l=(y=t.external_id)!=null?y:"",o=(k=t.type)!=null?k:"",s=encodeURIComponent(String(a)),x=encodeURIComponent(String(r)),m=encodeURIComponent(String(n)),v=encodeURIComponent(String(l)),b=encodeURIComponent(String(o)),j=`https://www.olimpo.bet/casino?${x}?provider=${s}&name=${m}&external_id=${v}&type=${b}`;window.location.href=j};function le({items:t,title:n="Top Juegos",iconUrl:a,onCardClick:r}){const l=C.useMemo(()=>t.map((o,s)=>{var x;return{...o,orden:(x=o.orden)!=null?x:s+1,_originalIndex:s}}).sort((o,s)=>o.orden!=null&&s.orden!=null?o.orden-s.orden:o._originalIndex-s._originalIndex),[t]);return e.jsx("section",{style:{width:"100%"},children:e.jsxs(F.default,{direction:"column",spacing:2,useFlexGap:!0,children:[e.jsx(G,{title:n,iconUrl:a,size:"md"}),e.jsx(S.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 s;return e.jsx(ye,{imageUrl:`https://olimpo.bet${(s=o.logo)!=null?s:""}`,orden:o.orden,onClick:()=>{r?r(o):kt(o)}},o.machine)})})]})})}const Rt=(t,n)=>{var a,r;return(r=(a=t.orden)!=null?a:t.machine)!=null?r:n},Bt=t=>{var c,d,i,f,y,k;if(typeof window=="undefined")return;const n=(d=(c=t.name)!=null?c:t.web_name)!=null?d:"",a=(i=t.provider)!=null?i:"",r=(f=t.machine)!=null?f:"",l=(y=t.external_id)!=null?y:"",o=(k=t.type)!=null?k:"Live",s=encodeURIComponent(String(a)),x=encodeURIComponent(String(r)),m=encodeURIComponent(String(n)),v=encodeURIComponent(String(l)),b=encodeURIComponent(String(o)),j=`https://www.olimpo.bet/casino-en-vivo?${x}?provider=${s}&name=${m}&external_id=${v}&type=${b}`;window.location.href=j},$e=({items:t,title:n="Casino en vivo",subtitle:a="Disfruta la emoción en tus juegos favoritos y gana en tiempo real.",backgroundMobileUrl:r="",backgroundDesktopUrl:l="",onCardClick:o,onViewMore:s,className:x})=>e.jsxs(S.default,{className:x,sx:{position:"relative",color:"white",overflow:"hidden"},children:[e.jsx(S.default,{sx:{position:"absolute",inset:0,backgroundImage:{xs:`
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("react/jsx-runtime"),T=require("@mui/material"),I=require("react"),he=require("@splidejs/react-splide"),qe=require("@mui/material/Box"),Ve=require("@mui/material/Typography"),Ke=require("@mui/material/Stack"),V=require("@mui/icons-material"),Je=require("@mui/icons-material/ChevronLeftRounded"),Xe=require("@mui/icons-material/ChevronRightRounded"),Qe=require("@mui/material/useMediaQuery"),me=require("firebase/firestore"),H=t=>t&&t.__esModule?t:{default:t},Ye=H(I),C=H(qe),z=H(Ve),L=H(Ke),_e=H(Je),be=H(Xe),Ze=H(Qe);function B({children:t,onClick:n,href:r,target:s,rel:c,type:o="button",disabled:a=!1,variant:p="primary",size:m,fullWidth:v=!1,fullHeight:h=!1,className:S="",ariaLabel:i,leftIcon:u,rightIcon:d,iconOnly:b}){const y=!!t&&t!==!0,w=(!!u?1:0)+(!!d?1:0)==1,N=b!=null?b:w&&!y,R=["orc-btn",p==="secondary"?"orc-btn--secondary":p==="tertiary"?"orc-btn--tertiary":"orc-btn--primary",m?`orc-btn--${m}`:"",v?"orc-btn--full":"",h?"orc-btn--fullHeight":"",N?"orc-btn--iconOnly":"",S].filter(Boolean).join(" "),$=e.jsxs(e.Fragment,{children:[u&&e.jsx("span",{className:"orc-btn__icon",children:u}),!N&&e.jsx("span",{className:"orc-btn__label",children:t}),d&&e.jsx("span",{className:"orc-btn__icon",children:d})]}),l=a?!0:void 0;return r?e.jsx(T.Link,{href:r,target:s,rel:c,"aria-label":i,"aria-disabled":l,tabIndex:l?-1:void 0,className:R,onClick:l?x=>x.preventDefault():n,children:$}):e.jsx("button",{type:o,onClick:n,disabled:!!l,"aria-label":i,className:R,children:$})}function G({title:t,iconUrl:n,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:[n&&e.jsx("img",{src:n,alt:"",className:"orc-section-title__icon"}),e.jsx("h2",{className:"orc-section-title__title",children:t})]})}const se=({total:t,active:n,onSelect:r,className:s=""})=>{if(t<=1)return null;const c=["orc-dots",s].filter(Boolean).join(" ");return e.jsx("div",{className:c,role:"tablist",children:Array.from({length:t}).map((o,a)=>e.jsx("span",{className:"orc-dots__cell",children:e.jsx("button",{type:"button",role:"tab","aria-selected":a===n,"aria-label":`Ir al slide ${a+1}`,className:"orc-dots__dot"+(a===n?" orc-dots__dot--active":""),onClick:()=>r==null?void 0:r(a)})},a))})};function U({children:t,minWidth:n=32,spacing:r=2,justify:s="stretch",columns:c=null}){const o=c||`repeat(auto-fit, minmax(${n}px, 1fr))`,a=typeof r=="number"?`${r*8}px`:r;return e.jsx("div",{style:{display:"grid",gridTemplateColumns:o,justifyItems:s,gap:a,height:"inherit"},children:t})}function ne({src:t,alt:n}){return e.jsx(T.Box,{sx:{position:"relative",width:{xs:80,md:160},height:{xs:48,md:96},display:"inline-block"},children:e.jsx(T.Box,{component:"img",src:t,alt:n,sx:{position:"absolute",top:0,left:0,width:"100%",height:"100%",objectFit:"contain"}})})}const et="oraculo__OraculoEventTitle-module__contenedor___rg1vw",tt="oraculo__OraculoEventTitle-module__flexGroup___jMLFO",ot="oraculo__OraculoEventTitle-module__subtitle___TmHna",Z={contenedor:et,flexGroup:tt,subtitle:ot};function nt({title:t,subtitle:n}){return e.jsxs("div",{className:Z.contenedor,children:[e.jsx("span",{style:{fontWeight:700,fontSize:"12px",lineHeight:"16px"},children:t}),n&&e.jsxs("div",{className:Z.flexGroup,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",{className:Z.subtitle,children:n}),e.jsx("div",{})]})]})}function ve({text:t,color:n="#ff3b3b",textColor:r="#fff"}){return e.jsx("span",{className:"oli-font",style:{backgroundColor:n,color:r,borderRadius:"8px",padding:"4px 8px",fontSize:"12px",lineHeight:"16px",fontWeight:700,width:"41px",height:"16px",textAlign:"center"},children:t})}function je({live:t,time:n}){return e.jsxs("div",{className:"oli-font",style:{display:"flex",alignItems:"center",gap:"8px"},children:[t&&e.jsx(ve,{text:"En vivo"}),n&&e.jsx("span",{style:{fontSize:"14px",fontWeight:400,lineHeight:"18px",paddingTop:"4px"},children:n})]})}function ye({title:t,subtitle:n,live:r=!1,time:s=""}){return e.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",color:"#FFFFFF"},children:[e.jsx(nt,{title:t,subtitle:n}),e.jsx(je,{live:r,time:s})]})}const st="oraculo__OraculoEventLabel-module__label___c64Xw",at={label:st};function ae({text:t}){return e.jsx("span",{className:at.label,children:t})}const rt="oraculo__OraculoEventLeague-module__container___rdk4F",it={container:rt};function we({title:t}){return e.jsx("div",{className:it.container,children:t.toUpperCase()})}const ct="oraculo__OraculoEventScore-module__scoreWrapper___fWwEr",lt="oraculo__OraculoEventScore-module__name___r4uL6",dt="oraculo__OraculoEventScore-module__score___Xl03M",ut="oraculo__OraculoEventScore-module__normal___cCNFz",mt="oraculo__OraculoEventScore-module__small___fVt8E",q={scoreWrapper:ct,name:lt,score:dt,normal:ut,small:mt};function re({text:t,name:n,size:r="normal"}){return e.jsxs("div",{className:`${q.scoreWrapper} ${q[r]}`,children:[e.jsx("div",{className:`${q.score} ${q[r]}`,children:t}),n&&e.jsx("span",{className:`${q.name} ${q[r]}`,children:n})]})}const pt="oraculo__OraculoEventTeamInfo-module__team___UfpUs",xt="oraculo__OraculoEventTeamInfo-module__regular___ag826",ft="oraculo__OraculoEventTeamInfo-module__compact___RCNOs",gt="oraculo__OraculoEventTeamInfo-module__logo___fKCl3",ht="oraculo__OraculoEventTeamInfo-module__name___4ikm-",Q={team:pt,regular:xt,compact:ft,logo:gt,name:ht};function X({name:t,logo:n,size:r="regular"}){return e.jsxs("div",{className:`oli-font ${Q.team} ${Q[r]}`,children:[e.jsx("img",{src:n,alt:t,className:Q.logo}),e.jsx("span",{className:Q.name,children:t})]})}const _t=he.Splide,bt=he.SplideSlide,A=I.forwardRef(({items:t=[],renderItem:n,perPage:r=1,gap:s="0px",breakpoints:c,options:o={},className:a="",onMove:p,useIndexAsKey:m=!1},v)=>{const h=I.useRef(null);I.useImperativeHandle(v,()=>({next:()=>{var d;return(d=h.current)==null?void 0:d.go(">")},prev:()=>{var d;return(d=h.current)==null?void 0:d.go("<")},go:d=>{var b;return(b=h.current)==null?void 0:b.go(d)}}));const S=I.useCallback(d=>{const b=d.Components.Controller,y=b.getIndex(),j=b.getEnd(),E=y===0,w=y>=j,N=d.Components.Slides.getLength();p==null||p({index:y,isStart:E,isEnd:w,total:N})},[p]),i=I.useCallback(d=>{S(d)},[S]),u={type:"slide",trimSpace:!1,drag:!0,pagination:!1,arrows:!1,rewind:!1,focus:"start",autoWidth:!1,perPage:r,gap:s,breakpoints:c,...o};return e.jsx("div",{className:a,style:{width:"100%"},children:e.jsx(_t,{ref:h,options:u,onMove:S,onMounted:i,children:t.map((d,b)=>{var y;return e.jsx(bt,{children:n(d,b)},m?b:(y=d.id)!=null?y:b)})})})}),J=({imageUrl:t,onClick:n,size:r="sm",fillParent:s=!1})=>{const c=r==="lg"?{w:280,h:352}:{w:152,h:168},o=p=>{p.stopPropagation(),n==null||n()},a=s?{width:"100%",height:"100%"}:{width:`${c.w}px`,height:`${c.h}px`};return e.jsxs(C.default,{onClick:n,role:"button",sx:{position:"relative",borderRadius:"12px",overflow:"hidden",boxSizing:"border-box",transition:"transform .15s ease, box-shadow .15s ease",...a,"&: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(C.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(C.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(B,{variant:"primary",size:"md",onClick:o,children:"JUGAR"})})]})};function Se({imageUrl:t,orden:n=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 h,S,i,u;const c=(d,b)=>{var y,j,E,w;return{xs:(j=(y=s.xs)==null?void 0:y[d])!=null?j:b,md:(w=(E=s.md)==null?void 0:E[d])!=null?w:b}},o=c("w",186),a=c("h",264),p=c("r",22.6),m=c("font",64),v={xs:Math.round(((S=(h=s.xs)==null?void 0:h.font)!=null?S:64)*.28),md:Math.round(((u=(i=s.md)==null?void 0:i.font)!=null?u:64)*.28)};return e.jsxs(C.default,{sx:{position:"relative",width:"100%",maxWidth:{xs:`${o.xs}px`,md:`${o.md}px`},aspectRatio:{xs:`${o.xs}/${a.xs}`,md:`${o.md}/${a.md}`},borderRadius:{xs:`${p.xs}px`,md:`${p.md}px`},boxSizing:"border-box",overflow:"visible",pb:{xs:`${v.xs}px`,md:`${v.md}px`}},children:[e.jsx(C.default,{sx:{position:"absolute",inset:0,borderRadius:"inherit",overflow:"hidden"},children:e.jsx(J,{imageUrl:t,onClick:r,size:"lg",fillParent:!0})}),e.jsx(C.default,{component:"span",sx:{position:"absolute",left:8,bottom:{xs:`-${v.xs}px`,md:`-${v.md}px`},fontFamily:"secondary",fontSize:{xs:`${m.xs}px`,md:`${m.md}px`},lineHeight:1,color:"#3CC666",WebkitTextStroke:"1px #9ee86e",zIndex:3,userSelect:"none"},children:n})]})}const Ce=({logo:t,provider:n,providerName:r,machine:s,onClick:c})=>{var o;return e.jsxs(C.default,{onClick:c,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(C.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(C.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(z.default,{sx:{color:"#fff",fontWeight:700,fontSize:{xs:11,md:14},textTransform:"capitalize"},children:(o=n!=null?n:r)!=null?o:""})})]})},ee=12,ie=({items:t,layout:n="grid",onClick:r})=>{var s;if(n==="mosaic"){const c=t[0],o=t.slice(1,5);return e.jsxs(C.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:`${ee}px`,rowGap:`${ee}px`,alignItems:"stretch",justifyItems:"stretch"},children:[c&&e.jsx(C.default,{sx:{width:{xs:184,md:280},height:{xs:234,md:352},gridRow:"1 / span 2",overflow:"hidden",borderRadius:2},children:e.jsx(J,{imageUrl:`https://olimpo.bet${(s=c.imageUrl)!=null?s:""}`,size:"lg",fillParent:!0,onClick:()=>r==null?void 0:r(c,0)})}),o.map((a,p)=>{var m;return e.jsx(C.default,{sx:{width:{xs:104,md:152},height:{xs:112,md:168},overflow:"hidden",borderRadius:2},children:e.jsx(J,{imageUrl:`https://olimpo.bet${(m=a.imageUrl)!=null?m:""}`,size:"sm",fillParent:!0,onClick:()=>r==null?void 0:r(a,p+1)})},a.id)})]})}return e.jsx(C.default,{sx:{display:"grid",gridTemplateColumns:{xs:"repeat(2, 104px)",md:"repeat(2, 152px)"},gridTemplateRows:{xs:"repeat(2, 112px)",md:"repeat(2, 168px)"},gap:`${ee}px`,gridAutoFlow:"column"},children:t.map((c,o)=>{var a,p;return e.jsx(C.default,{sx:{overflow:"hidden",borderRadius:2},children:e.jsx(J,{imageUrl:`https://olimpo.bet${(a=c.imageUrl)!=null?a:""}`,size:"sm",fillParent:!0,onClick:()=>r==null?void 0:r(c,o)})},(p=c.id)!=null?p:o)})})},Ee=({title:t,amount:n,subtitle:r,buttonText:s,onButtonClick:c,backgroundImage:o,alt:a,className:p="",variant:m="small"})=>{const v=n?n.slice(0,2):"",h=n?n.slice(2):"",S=m==="large";return e.jsxs(C.default,{className:p,sx:{position:"relative",width:"100%",maxWidth:{xs:328,md:S?618:456},mx:"auto"},children:[o&&e.jsx(C.default,{sx:{position:"relative",width:"100%",aspectRatio:{xs:"328 / 188",md:S?"618 / 346":"456 / 272"},borderRadius:"14px",overflow:"hidden"},children:e.jsx(C.default,{component:"img",src:o,alt:a!=null?a:"Fondo promocional",sx:{width:"100%",height:"100%",objectFit:"cover",objectPosition:{xs:"50% 0%",md:"45% 0%"},display:"block"}})}),e.jsx(C.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(C.default,{sx:{maxWidth:"60%",display:"flex",flexDirection:"column",alignItems:"center"},children:[t&&e.jsx(z.default,{sx:{fontSize:{xs:12,md:20},fontWeight:400,color:"#e7f8ff"},children:t}),n&&e.jsxs(C.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(C.default,{component:"span",sx:{fontSize:{xs:35,md:48},mr:.5},children:v}),e.jsx(C.default,{component:"span",sx:{fontSize:{xs:52,md:77}},children:h})]}),r&&e.jsx(z.default,{sx:{pb:"20px",fontSize:14,fontWeight:600,color:"#e7f8ff"},children:r}),s&&e.jsx(B,{onClick:c,children:s})]})})]})},Oe=({text:t,buttonLabel:n="Conoce más",onClick:r,imgAlt:s="Club Olimpo",imgSrcMobile:c,imgSrcDesktopBg:o,imgSrcDesktopLogo:a})=>e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"orc-co-bgMobile",children:e.jsx("img",{src:c,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"})}),e.jsxs("div",{className:"orc-co-desktopContent",children:[a&&e.jsx("img",{src:a,alt:`${s} logo`,className:"orc-co-logoImg"}),e.jsx("p",{className:"orc-co-captionDesktop",children:t}),e.jsx(B,{onClick:r,variant:"primary",size:"md",children:n})]})]}),e.jsxs("div",{className:"orc-co-bottom",children:[e.jsx("p",{className:"orc-co-caption",children:t}),e.jsx(B,{onClick:r,variant:"primary",size:"md",children:n})]})]}),vt="oraculo__OraculoEventCombinadasCard-module__card___ulQeY",jt="oraculo__OraculoEventCombinadasCard-module__combinadas___Gxrld",yt="oraculo__OraculoEventCombinadasCard-module__apuestaItem___YnYMy",wt="oraculo__OraculoEventCombinadasCard-module__lineContainer___G5rbU",St="oraculo__OraculoEventCombinadasCard-module__circle___eehm-",Ct="oraculo__OraculoEventCombinadasCard-module__line___Eb2pK",Et="oraculo__OraculoEventCombinadasCard-module__apuestaText___b5s7S",Ot="oraculo__OraculoEventCombinadasCard-module__cuotaTotal___Lohvu",D={card:vt,combinadas:jt,apuestaItem:yt,lineContainer:wt,circle:St,line:Ct,apuestaText:Et,cuotaTotal:Ot};function ce(t){const n=Array.isArray(t)?t:[t];sessionStorage.setItem("landingOutcomes",JSON.stringify(n)),window.location.href="/#home"}function Ie({event:t}){var s;function n(c){var h;const o=(h=c.betoffers)!=null?h:[],a=c.homeName,p=c.awayName,m=o.map(S=>{var b,y,j,E,w;let i=S.outcomes[0],u="",d=i!=null&&i.line?i.line/1e3:"";return["Más de","Mas de","Over"].includes(i==null?void 0:i.label)?(u=`Más de ${d}`,i!=null&&i.participant&&(u=`${i.participant} - ${u}`)):["Menos de","Menos"].includes(i==null?void 0:i.label)?(u=`Menos de ${d}`,i!=null&&i.participant&&(u=`${i.participant} - ${u}`)):["Sí","No"].includes(i==null?void 0:i.label)?(u=i==null?void 0:i.label,i!=null&&i.participant&&(u=`${i.participant} - ${u}`)):["1X","12","X2"].includes(i==null?void 0:i.label)?i.label==="1X"?u=`${a} o Empate`:i.label==="12"?u=`${a} o ${p}`:i.label==="X2"&&(u=`${p} o Empate`):(i!=null&&i.participant?u=i.participant:u=(b=i==null?void 0:i.label)!=null?b:"",d!==""&&u===i.label&&(u=`${i.label} ${d}`)),{id:(y=i==null?void 0:i.id)!=null?y:0,value:u,label:S.criterion.label,odds:(j=i==null?void 0:i.odds)!=null?j:0,bl:(E=i==null?void 0:i.label)!=null?E:0,position:(w=i==null?void 0:i.position)!=null?w:0}}),v=m.reduce((S,i)=>S+i.odds,0)/1e3;return{outcomes:m,total:v.toFixed(2)}}const r=n(t);return e.jsxs("div",{className:D.card,children:[e.jsx("div",{className:D.combinadas,children:e.jsxs(L.default,{direction:"column",spacing:.5,useFlexGap:!0,children:[e.jsx(G,{title:t.name,iconUrl:"/assets/img/home/Combinadas/pelota.png",size:"xs"}),e.jsx("img",{src:"/assets/img/home/Combinadas/line.png"}),e.jsx(L.default,{direction:"column",spacing:.5,useFlexGap:!0,children:r.outcomes.sort((c,o)=>c.position-o.position).map((c,o)=>e.jsxs("div",{className:D.apuestaItem,children:[e.jsxs("div",{className:D.lineContainer,children:[e.jsx("div",{className:D.circle}),o<r.outcomes.length-1&&e.jsx("div",{className:D.line})]}),e.jsxs("div",{className:D.apuestaText,children:[e.jsx("strong",{children:c.value})," ","| ",c.label]})]},o))})]})}),e.jsxs("button",{onClick:()=>{var c,o;return ce((o=(c=r==null?void 0:r.outcomes)==null?void 0:c.map(a=>a==null?void 0:a.id))!=null?o:[])},className:D.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"})]})]})}const W={"orc-btn":"oraculo__OraculoButtonBet-module__orc-btn___jakza","orc-btn__label":"oraculo__OraculoButtonBet-module__orc-btn__label___zNFEH","orc-btn__icon":"oraculo__OraculoButtonBet-module__orc-btn__icon___5Rhyd","orc-btn--primary":"oraculo__OraculoButtonBet-module__orc-btn--primary___7TlJB","orc-btn--secondary":"oraculo__OraculoButtonBet-module__orc-btn--secondary___X4kJt","orc-btn--tertiary":"oraculo__OraculoButtonBet-module__orc-btn--tertiary___iS6eD","orc-btn--sm":"oraculo__OraculoButtonBet-module__orc-btn--sm___lIF2e","orc-btn--md":"oraculo__OraculoButtonBet-module__orc-btn--md___x4SI7","orc-btn--lg":"oraculo__OraculoButtonBet-module__orc-btn--lg___0BQNI","orc-btn--iconOnly":"oraculo__OraculoButtonBet-module__orc-btn--iconOnly___hQGwI","orc-btn--full":"oraculo__OraculoButtonBet-module__orc-btn--full___z-Myo","orc-btn--fullHeight":"oraculo__OraculoButtonBet-module__orc-btn--fullHeight___pCxq1"};function It({children:t,onClick:n,href:r,target:s,rel:c,type:o="button",disabled:a=!1,variant:p="primary",size:m,fullWidth:v=!1,fullHeight:h=!1,className:S="",ariaLabel:i,leftIcon:u,rightIcon:d,iconOnly:b}){const y=!!t&&t!==!0,w=(!!u?1:0)+(!!d?1:0)==1,N=b!=null?b:w&&!y,R=[W["orc-btn"],W[`orc-btn--${p}`],m?W[`orc-btn--${m}`]:"",v?W["orc-btn--full"]:"",h?W["orc-btn--fullHeight"]:"",N?W["orc-btn--iconOnly"]:"",S].filter(Boolean).join(" "),$=e.jsxs(e.Fragment,{children:[u&&e.jsx("span",{className:W["orc-btn__icon"],children:u}),!N&&e.jsx("span",{className:W["orc-btn__label"],children:t}),d&&e.jsx("span",{className:W["orc-btn__icon"],children:d})]}),l=a?!0:void 0;return r?e.jsx(T.Link,{href:r,target:s,rel:c,"aria-label":i,"aria-disabled":l,tabIndex:l?-1:void 0,className:R,onClick:l?x=>x.preventDefault():n,children:$}):e.jsx("button",{type:o,onClick:n,disabled:!!l,"aria-label":i,className:R,children:$})}function $e({event:t,liveData:n,betOffers:r,fondo:s="/assets/img/home/EnVivo/fondo.png"}){var o,a,p,m,v,h,S,i;const c=r==null?void 0:r.find(u=>{var d;return((d=u.betOfferType)==null?void 0:d.id)===2});return e.jsx("div",{style:{backgroundImage:`url(${s})`,backgroundSize:"cover",minHeight:"160px",width:"296px",padding:"12px 16px",borderRadius:"16px"},children:e.jsxs(L.default,{direction:"column",spacing:1,useFlexGap:!0,children:[e.jsxs(L.default,{direction:"column",spacing:1.5,useFlexGap:!0,children:[e.jsx(ye,{title:(o=t.path[0].name)!=null?o:"",subtitle:t.group,live:!0,time:((a=n==null?void 0:n.matchClock)==null?void 0:a.minute)!=null?`${n.matchClock.minute}'`:""}),e.jsx("div",{style:{padding:"0 4px"},children:e.jsxs(U,{spacing:1.5,columns:"1fr auto 1fr",children:[e.jsx(X,{name:t.homeName,logo:"/assets/img/home/EnVivo/Juventus.png"}),e.jsx(re,{text:((m=(p=n==null?void 0:n.score)==null?void 0:p.home)!=null?m:0)+":"+((h=(v=n==null?void 0:n.score)==null?void 0:v.away)!=null?h:0),name:"En vivo"}),e.jsx(X,{name:t.awayName,logo:"/assets/img/home/EnVivo/Racing.png"})]})})]}),e.jsxs(L.default,{direction:"column",spacing:1,useFlexGap:!0,children:[e.jsx(U,{spacing:1,children:((S=c==null?void 0:c.outcomes)!=null?S:[]).map((u,d)=>e.jsx(ae,{text:u.label.toUpperCase()},d))}),e.jsx(U,{spacing:2,children:((i=c==null?void 0:c.outcomes)!=null?i:[]).map((u,d)=>e.jsx(It,{variant:"primary",disabled:u.odds==null||(c==null?void 0:c.cashOutStatus)=="SUSPENDED",onClick:()=>{ce(u.id)},children:u.odds===void 0?"":(u.odds/1e3).toFixed(2)},d))})]})]})})}const $t="oraculo__OraculoEventDate-module__date___xhIlh",Nt={date:$t};function kt({text:t}){return e.jsx("div",{className:`oli-font ${Nt.date}`,children:t})}const Rt="oraculo__OraculoEventSemanaCard-module__cardContainer___4JuDe",Bt="oraculo__OraculoEventSemanaCard-module__cardBackground___vfalD",Tt="oraculo__OraculoEventSemanaCard-module__jugadas___W8b7H",Pt="oraculo__OraculoEventSemanaCard-module__equipos___G5hLn",Y={cardContainer:Rt,cardBackground:Bt,jugadas:Tt,equipos:Pt};function Ne({event:t}){var r,s,c,o,a,p,m;function n(v){const h=new Date(v),S=h.toLocaleDateString("es-ES",{weekday:"short"}).toUpperCase(),i=h.getDate().toString().padStart(2,"0"),u=(h.getMonth()+1).toString().padStart(2,"0");let d=h.toLocaleTimeString("es-PE",{hour:"numeric",minute:"2-digit",hour12:!0}).toUpperCase();return d=d.replace(/\./g,"").replace(/A\s*M/i,"AM").replace(/P\s*M/i,"PM"),`${S} ${i}/${u} | ${d}`}return e.jsxs("div",{className:Y.cardContainer,children:[e.jsx(we,{title:(r=t.group)!=null?r:""}),e.jsx("div",{className:Y.cardBackground,children:e.jsxs(L.default,{direction:"column",spacing:{xs:.5,md:1},useFlexGap:!0,children:[e.jsxs(L.default,{direction:"column",spacing:1,useFlexGap:!0,children:[e.jsxs("div",{className:Y.equipos,children:[e.jsx(X,{name:t.awayName,logo:"/assets/img/home/EventoSemana/Flamengo.png",size:"compact"}),e.jsx(re,{text:"vs.",name:"",size:"small"}),e.jsx(X,{name:t.homeName,logo:"/assets/img/home/EventoSemana/RealMadrid.png",size:"compact"})]}),e.jsx(kt,{text:n(t.start)})]}),e.jsxs(L.default,{direction:"column",spacing:{xs:.5,md:1},useFlexGap:!0,children:[e.jsx(U,{spacing:1,children:((o=(c=(s=t==null?void 0:t.outcome)==null?void 0:s[0])==null?void 0:c.outcomes)!=null?o:[]).map((v,h)=>e.jsx(ae,{text:v.label.toUpperCase()},h))}),e.jsx("div",{className:Y.jugadas,children:e.jsx(U,{spacing:1,children:((m=(p=(a=t==null?void 0:t.outcome)==null?void 0:a[0])==null?void 0:p.outcomes)!=null?m:[]).map((v,h)=>e.jsx(B,{variant:"primary",fullHeight:!0,onClick:()=>{ce(v.id)},children:(v.odds/1e3).toFixed(2)},h))})})]})]})})]})}function ke({items:t,title:n="Destacados",iconUrl:r,onViewMore:s,className:c=""}){const o=I.useRef(null),[a,p]=I.useState({isStart:!0,isEnd:!1}),m=()=>{var u;(u=o.current)==null||u.prev()},v=()=>{var u;(u=o.current)==null||u.next(),console.log("items: ",t)},h=()=>{window.location.href="https://www.olimpo.bet/promociones"},S=u=>{if(!u||typeof window=="undefined")return;const b=`https://www.olimpo.bet/promociones/${encodeURIComponent(u)}`;window.location.href=b},i=c||void 0;return e.jsxs("section",{className:i,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(G,{title:n,iconUrl:r,size:"md"}),e.jsxs("div",{style:{display:"flex",gap:8},children:[e.jsx(B,{ariaLabel:"Anterior",variant:"secondary",iconOnly:!0,leftIcon:e.jsx(V.ChevronLeftRounded,{}),onClick:m,disabled:a.isStart}),e.jsx(B,{ariaLabel:"Siguiente",variant:"secondary",iconOnly:!0,rightIcon:e.jsx(V.ChevronRightRounded,{}),onClick:v,disabled:a.isEnd})]}),e.jsx(B,{variant:"secondary",onClick:h,children:"Ver más"})]}),e.jsx(A,{ref:o,items:t,perPage:3,gap:"16px",options:{autoWidth:!1},breakpoints:{768:{perPage:1.15,focus:"start"},1024:{perPage:2.5,focus:"start"}},renderItem:u=>e.jsx("div",{style:{textAlign:"center",marginTop:16,cursor:"pointer"},onClick:()=>S(u.promotion),children:e.jsx("img",{src:`https://olimpo.bet${u.image!==""?u.image:u.summary_image}`,alt:u.title,style:{width:"100%",height:"150px",borderRadius:8,display:"block"}})},`${u.title}-${u.image}`),onMove:({isStart:u,isEnd:d})=>p({isStart:u,isEnd:d})})]})}const Ft=t=>{var i,u,d,b,y,j;if(typeof window=="undefined")return;const n=(u=(i=t.name)!=null?i:t.web_name)!=null?u:"",r=(d=t.provider)!=null?d:"",s=(b=t.machine)!=null?b:"",c=(y=t.external_id)!=null?y:"",o=(j=t.type)!=null?j:"",a=encodeURIComponent(String(r)),p=encodeURIComponent(String(s)),m=encodeURIComponent(String(n)),v=encodeURIComponent(String(c)),h=encodeURIComponent(String(o)),S=`https://www.olimpo.bet/casino?${p}?provider=${a}&name=${m}&external_id=${v}&type=${h}`;window.location.href=S};function le({items:t,title:n="Top Juegos",iconUrl:r,onCardClick:s}){const c=I.useMemo(()=>t.map((o,a)=>{var p;return{...o,orden:(p=o.orden)!=null?p:a+1,_originalIndex:a}}).sort((o,a)=>o.orden!=null&&a.orden!=null?o.orden-a.orden:o._originalIndex-a._originalIndex),[t]);return e.jsx("section",{style:{width:"100%"},children:e.jsxs(L.default,{direction:"column",spacing:2,useFlexGap:!0,children:[e.jsx(G,{title:n,iconUrl:r,size:"md"}),e.jsx(C.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:c.slice(0,6).map(o=>{var a;return e.jsx(Se,{imageUrl:`https://olimpo.bet${(a=o.logo)!=null?a:""}`,orden:o.orden,onClick:()=>{s?s(o):Ft(o)}},o.machine)})})]})})}const Lt=(t,n)=>{var r,s;return(s=(r=t.orden)!=null?r:t.machine)!=null?s:n},Mt=t=>{var i,u,d,b,y,j;if(typeof window=="undefined")return;const n=(u=(i=t.name)!=null?i:t.web_name)!=null?u:"",r=(d=t.provider)!=null?d:"",s=(b=t.machine)!=null?b:"",c=(y=t.external_id)!=null?y:"",o=(j=t.type)!=null?j:"Live",a=encodeURIComponent(String(r)),p=encodeURIComponent(String(s)),m=encodeURIComponent(String(n)),v=encodeURIComponent(String(c)),h=encodeURIComponent(String(o)),S=`https://www.olimpo.bet/casino-en-vivo?${p}?provider=${a}&name=${m}&external_id=${v}&type=${h}`;window.location.href=S},Re=({items:t,title:n="Casino en vivo",subtitle:r="Disfruta la emoción en tus juegos favoritos y gana en tiempo real.",backgroundMobileUrl:s="",backgroundDesktopUrl:c="",onCardClick:o,onViewMore:a,className:p})=>e.jsxs(C.default,{className:p,sx:{position:"relative",color:"white",overflow:"hidden"},children:[e.jsx(C.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
|
-
url('${
|
|
4
|
+
url('${s}')
|
|
5
5
|
`,md:`
|
|
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
|
-
url('${
|
|
9
|
-
`},backgroundSize:"cover",backgroundPosition:"center",backgroundRepeat:"no-repeat",zIndex:0}}),e.jsxs(
|
|
8
|
+
url('${c}')
|
|
9
|
+
`},backgroundSize:"cover",backgroundPosition:"center",backgroundRepeat:"no-repeat",zIndex:0}}),e.jsxs(C.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(L.default,{spacing:3,sx:{maxWidth:{md:280}},children:[e.jsx(z.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:n}),e.jsx(z.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(C.default,{sx:{display:{xs:"none",md:"block"}},children:e.jsx(B,{variant:"primary",size:"md",onClick:()=>a==null?void 0:a(),children:"Ver más"})})]}),e.jsx(C.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((m,v)=>{var h;return e.jsx(Ce,{logo:`https://olimpo.bet${(h=m.logo)!=null?h:""}`,provider:m.provider,providerName:m.web_name,machine:m.machine,onClick:()=>{o?o(m,v):Mt(m)}},Lt(m,v))})}),e.jsx(C.default,{sx:{display:{xs:"block",md:"none"}},children:e.jsx(B,{variant:"primary",size:"lg",onClick:()=>a==null?void 0:a(),children:"Ver más"})})]})]}),Be=(t,n)=>{var r,s;return(s=(r=t.orden)!=null?r:t.machine)!=null?s:n},Ut=t=>{var i,u,d,b,y;if(typeof window=="undefined")return;const n=(i=t.name)!=null?i:"",r=(u=t.provider)!=null?u:"",s=(d=t.machine)!=null?d:"",c=(b=t.external_id)!=null?b:"",o=(y=t.type)!=null?y:"Casino",a=encodeURIComponent(String(r)),p=encodeURIComponent(String(s)),m=encodeURIComponent(String(n)),v=encodeURIComponent(String(c)),h=encodeURIComponent(String(o)),S=`https://www.olimpo.bet/casino?${p}?provider=${a}&name=${m}&external_id=${v}&type=${h}`;window.location.href=S},Wt=(t,n=!0,r=4)=>{const s=t.map((a,p)=>{var m;return{id:Be(a,p),imageUrl:(m=a.logo)!=null?m:""}});if(!s.length)return[];const c=[];let o=0;if(n){const a=Math.min(s.length,5);c.push({id:"mosaic-0",kind:"mosaic",items:s.slice(0,a)}),o=a}for(;o<s.length;){const a=Math.min(o+r,s.length);c.push({id:`grid-${o}`,kind:"grid",items:s.slice(o,a)}),o=a}return c},Te=({items:t,title:n="Casino",iconUrl:r="/assets/img/home/Casino/diamante.svg",onItemClick:s,onViewMore:c,mosaicFirst:o=!0,gridSize:a=4})=>{const p=I.useRef(null),[m,v]=I.useState({isStart:!0,isEnd:!1}),h=Wt(t,o,a),S=()=>{var d;(d=p.current)==null||d.prev()},i=()=>{var d;(d=p.current)==null||d.next()},u=()=>{window.location.href="https://www.olimpo.bet/casino"};return e.jsx("section",{children:e.jsxs(L.default,{direction:"column",spacing:2,useFlexGap:!0,children:[e.jsxs(C.default,{sx:{display:"grid",gridTemplateColumns:"1fr auto auto",alignItems:"center",columnGap:1.5,rowGap:1},children:[e.jsx(G,{title:n,iconUrl:r,size:"md"}),e.jsxs(C.default,{sx:{display:"flex",gap:1,justifyContent:"flex-end"},children:[e.jsx(B,{ariaLabel:"Anterior",variant:"secondary",iconOnly:!0,leftIcon:e.jsx(_e.default,{}),onClick:S,disabled:m.isStart}),e.jsx(B,{ariaLabel:"Siguiente",variant:"secondary",iconOnly:!0,rightIcon:e.jsx(be.default,{}),onClick:i,disabled:m.isEnd})]}),e.jsx(C.default,{sx:{justifySelf:"end"},children:e.jsx(B,{variant:"secondary",onClick:u,children:"Ver más"})})]}),e.jsx(A,{ref:p,items:h,perPage:1,gap:"0px",options:{autoWidth:!0,gap:"12px",trimSpace:!1,pagination:!1,arrows:!1,drag:!0,focus:"start"},renderItem:d=>e.jsx("div",{style:{alignSelf:"start"},children:e.jsx(ie,{items:d.items,layout:d.kind==="mosaic"?"mosaic":"grid",onClick:b=>{const y=t.find((j,E)=>Be(j,E)===b.id);y&&(s?s(y):Ut(y))}})}),onMove:({isStart:d,isEnd:b})=>v({isStart:d,isEnd:b})})]})})},Pe=(t,n)=>{var r,s;return(s=(r=t.orden)!=null?r:t.machine)!=null?s:n},zt=t=>{var i,u,d,b,y;if(typeof window=="undefined")return;const n=(i=t.name)!=null?i:"",r=(u=t.provider)!=null?u:"",s=(d=t.machine)!=null?d:"",c=(b=t.external_id)!=null?b:"",o=(y=t.type)!=null?y:"Virtuales",a=encodeURIComponent(String(r)),p=encodeURIComponent(String(s)),m=encodeURIComponent(String(n)),v=encodeURIComponent(String(c)),h=encodeURIComponent(String(o)),S=`https://www.olimpo.bet/juegos-virtuales?${p}?provider=${a}&name=${m}&external_id=${v}&type=${h}`;window.location.href=S},Gt=(t,n=!0,r=4)=>{const s=t.map((a,p)=>{var m;return{id:Pe(a,p),imageUrl:(m=a.logo)!=null?m:""}});if(!s.length)return[];const c=[];let o=0;if(n){const a=Math.min(s.length,5);c.push({id:"mosaic-0",kind:"mosaic",items:s.slice(0,a)}),o=a}for(;o<s.length;){const a=Math.min(o+r,s.length);c.push({id:`grid-${o}`,kind:"grid",items:s.slice(o,a)}),o=a}return c},Fe=({items:t,title:n="Virtuales",iconUrl:r="/assets/img/home/Virtuales/virtuales.svg",onItemClick:s,onViewMore:c,mosaicFirst:o=!0,gridSize:a=4})=>{const p=I.useRef(null),[m,v]=I.useState({isStart:!0,isEnd:!1}),h=Gt(t,o,a),S=()=>{var d;(d=p.current)==null||d.prev()},i=()=>{var d;(d=p.current)==null||d.next()},u=()=>{window.location.href="https://www.olimpo.bet/virtuales"};return e.jsx("section",{children:e.jsxs(L.default,{direction:"column",spacing:2,useFlexGap:!0,children:[e.jsxs(C.default,{sx:{display:"grid",gridTemplateColumns:"1fr auto auto",alignItems:"center",columnGap:1.5,rowGap:1},children:[e.jsx(G,{title:n,iconUrl:r,size:"md"}),e.jsxs(C.default,{sx:{display:"flex",gap:1,justifyContent:"flex-end"},children:[e.jsx(B,{ariaLabel:"Anterior",variant:"secondary",iconOnly:!0,leftIcon:e.jsx(_e.default,{}),onClick:S,disabled:m.isStart}),e.jsx(B,{ariaLabel:"Siguiente",variant:"secondary",iconOnly:!0,rightIcon:e.jsx(be.default,{}),onClick:i,disabled:m.isEnd})]}),e.jsx(C.default,{sx:{justifySelf:"end"},children:e.jsx(B,{variant:"secondary",onClick:u,children:"Ver más"})})]}),e.jsx(A,{ref:p,items:h,perPage:1,gap:"0",options:{autoWidth:!0,gap:"12px",trimSpace:!1,pagination:!1,arrows:!1,drag:!0,focus:"start",perMove:1},renderItem:d=>e.jsx("div",{style:{alignSelf:"start"},children:e.jsx(ie,{items:d.items,layout:d.kind==="mosaic"?"mosaic":"grid",onClick:b=>{const y=t.find((j,E)=>Pe(j,E)===b.id);y&&(s?s(y):zt(y))}})}),onMove:({isStart:d,isEnd:b})=>v({isStart:d,isEnd:b})})]})})},At=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%),
|
|
13
13
|
linear-gradient(to right, #121212 0%, rgba(18,18,18,0) 10%),
|
|
14
14
|
url("${t}")
|
|
15
|
-
`,backgroundRepeat:"no-repeat",backgroundPosition:"center",backgroundSize:"cover"}),
|
|
15
|
+
`,backgroundRepeat:"no-repeat",backgroundPosition:"center",backgroundSize:"cover"}),pe={textAlign:"center",lineHeight:1.1,mb:1.5},xe={display:"inline-block",fontWeight:600,fontSize:24},fe={display:"inline-block",fontSize:24,lineHeight:1.1,WebkitTextStroke:"0.3px rgba(255, 255, 255, .5)",textShadow:`
|
|
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
|
-
`},Te=({headline:t,headline2:n,items:a,backgroundImageUrl:r})=>{const l=t,o=n,s=Ke.default("(max-width: 767px)"),x=a.length>1,m=r!=null?r:"",v=Mt(m),b=C.useRef(null),[j,c]=C.useState({isStart:!0,isEnd:!1}),[d,i]=C.useState(0);return s?e.jsxs(S.default,{component:"section",sx:{...v,textAlign:"center"},children:[(l||o)&&e.jsxs(S.default,{sx:ue,children:[l&&e.jsx(W.default,{component:"span",sx:pe,children:l}),o&&e.jsxs(e.Fragment,{children:[e.jsx("br",{}),e.jsx(W.default,{component:"span",sx:me,children:o})]})]}),e.jsxs(S.default,{children:[e.jsx(A,{ref:b,items:a,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:f=>e.jsx(ne,{...f,onButtonClick:a[0].onButtonClick}),onMove:({index:f,isStart:y,isEnd:k})=>{c({isStart:y,isEnd:k}),i(f)}}),x&&e.jsx(se,{total:a.length,active:d,onSelect:f=>{var y;i(f),(y=b.current)==null||y.go(f)}})]})]}):e.jsx(S.default,{component:"section",sx:v,children:e.jsxs(S.default,{sx:{maxWidth:1200,mx:5,px:2,display:"grid",gridTemplateColumns:"200px auto",alignItems:"center"},children:[(l||o)&&e.jsx(S.default,{sx:{display:"flex",alignItems:"center",justifyContent:"flex-start",minHeight:"100%"},children:e.jsxs(S.default,{sx:{...ue,textAlign:"left",mb:0},children:[l&&e.jsx(W.default,{component:"span",sx:pe,children:l}),o&&e.jsxs(e.Fragment,{children:[e.jsx("br",{}),e.jsx(W.default,{component:"span",sx:me,children:o})]})]})}),e.jsx(S.default,{sx:{display:"flex",justifyContent:"center",alignItems:"center",flexWrap:"nowrap",gap:4},children:a.map((f,y)=>e.jsx(ne,{onButtonClick:f.onButtonClick,...f},y))})]})})},Pe=({className:t="",fullBleed:n=!0,items:a,selectedIndex:r=0,ariaLabel:l})=>{const o=C.useRef(null),s=C.useRef(null);if(!a)return null;const x=()=>{window.location.href="https://www.olimpo.bet/conoce-club-olimpo"},m=Array.isArray(a)?a[r]:a;C.useLayoutEffect(()=>{if(!o.current||!s.current||typeof ResizeObserver=="undefined")return;const b=o.current,j=s.current,c=()=>{b.style.setProperty("--orc-co-bottomH",`${j.offsetHeight+16}px`)},d=new ResizeObserver(c);return d.observe(j),c(),()=>d.disconnect()},[]);const v=["orc-co-wrap",n?"orc-co-fullBleed":"",t].filter(Boolean).join(" ");return e.jsx("section",{ref:o,className:v,"aria-label":l||m.imgAlt||"Club Olimpo",children:e.jsx("div",{ref:s,children:e.jsx(Se,{text:m.text,onClick:x,imgAlt:m.imgAlt,imgSrcMobile:m.imgMobile,imgSrcDesktopBg:m.imgDesktopBg,imgSrcDesktopLogo:m.imgDesktopLogo})})})},Ut="oraculo__OraculoSeccionEventoCombinadas-module__controls___Zsta4",zt={controls:Ut};function Fe({items:t,title:n="Combinadas del Olimpo",iconUrl:a="https://stg-www.contodobet.com/static/img/landing/EventoCombinada/rayoIcon.svg",onViewMore:r,className:l=""}){const o=C.useRef(null),[s,x]=C.useState({isStart:!0,isEnd:!1}),[m,v]=C.useState([]),b=()=>{var O;(O=o.current)==null||O.prev()},j=()=>{var O;(O=o.current)==null||O.next(),console.log("items: ",t)},c=()=>{r==null||r()};function d(O,R,$){const E=[];for(const I of $){const p=f([I]),u=R.reduce((g,_)=>{g[_.eventId]||(g[_.eventId]=[]);const w=_.outcomes.filter(N=>p.has(N.id));return w.length>0&&g[_.eventId].push({..._,outcomes:w}),g},{}),h=i(I);O.forEach(g=>{if(g.id!==I.prePackCouponRows[0].eventId)return;const _=p;let w=null;for(const N of h)if([...N.requiredOutcomeIds].every(L=>_.has(L))){w=N.decimal;break}E.push({...g,combinadoTotal:w,betoffers:u[g.id]||[],couponId:I.id})})}return E}function i(O){var $;const R=[];for(const E of O.prePackCouponRows)if(E.type==="BET_BUILDER"&&(($=E.group)!=null&&$.groups)){const I=new Set;E.group.groups.forEach(p=>{var u;(u=p.outcomes)==null||u.forEach(h=>I.add(h.id))}),R.push({requiredOutcomeIds:I,decimal:E.odds.decimal})}return R}function f(O){var $;const R=new Set;for(const E of O)for(const I of E.prePackCouponRows)I.type==="BET_BUILDER"&&(($=I.group)!=null&&$.groups)&&I.group.groups.forEach(p=>{var u;(u=p.outcomes)==null||u.forEach(h=>R.add(h.id))}),I.type==="SIMPLE"&&I.outcome&&R.add(I.outcome.id);return R}async function y(){var O,R,$;try{const E=($=(R=(O=t==null?void 0:t.group)==null?void 0:O.groups)==null?void 0:R[0])==null?void 0:$.id;if(!E){console.log("Could not extract group ID");return}const I=`https://us1.offering-api.kambicdn.com/offering/v2018/nexuspe/prepackcoupon/eventgroup/${E}.json?lang=es_PE&market=PE&client_id=200&channel_id=1&ncid=1764283566783&prePackCouponTags=CUSTOM`,u=await(await fetch(I)).json();v(d(u.events,u.betOffers,u.prePackCoupons))}catch(E){console.error("loadDataEventSpecial error:",E)}}C.useEffect(()=>{t&&y()},[t]);const k=l||void 0;return!m||m.length===0?null:e.jsx("section",{className:k,style:{width:"100%"},children:e.jsxs(F.default,{direction:"column",spacing:1.5,useFlexGap:!0,children:[e.jsxs(U,{spacing:1.5,columns:"1fr auto ",justify:"start",children:[e.jsx(G,{title:n,iconUrl:a,size:"md"}),e.jsxs("div",{className:zt.controls,children:[e.jsxs(U,{spacing:1,columns:"auto auto",children:[e.jsx(B,{ariaLabel:"Anterior",variant:"secondary",iconOnly:!0,leftIcon:e.jsx(q.ChevronLeftRounded,{}),onClick:b,disabled:s.isStart}),e.jsx(B,{ariaLabel:"Siguiente",variant:"secondary",iconOnly:!0,rightIcon:e.jsx(q.ChevronRightRounded,{}),onClick:j,disabled:s.isEnd})]}),e.jsx(B,{variant:"secondary",onClick:c,children:"Ver más"})]})]}),e.jsx(A,{ref:o,items:m,perPage:3.72,gap:"16px",options:{autoWidth:!0,trimSpace:!0},useIndexAsKey:!0,breakpoints:{768:{perPage:1.2,gap:"12px",padding:{left:"0px",right:"0px"}}},renderItem:O=>e.jsx(Ce,{event:O}),onMove:({isStart:O,isEnd:R})=>x({isStart:O,isEnd:R})})]})})}function Le({items:t,title:n="En vivo",iconUrl:a="https://stg-www.contodobet.com/static/img/landing/EventoEnVivo/icon.svg",onViewMore:r,className:l=""}){var c,d;const o=C.useRef(null),[s,x]=C.useState({isStart:!0,isEnd:!1}),m=()=>{var i;(i=o.current)==null||i.prev()},v=()=>{var i;(i=o.current)==null||i.next(),console.log("items: ",t)},b=()=>{r==null||r()},j=l||void 0;return e.jsx("section",{className:j,style:{width:"100%"},children:e.jsxs(F.default,{direction:"column",spacing:1.5,useFlexGap:!0,children:[e.jsxs(U,{spacing:1.5,columns:"1fr auto ",justify:"start",children:[e.jsx(G,{title:n,iconUrl:a,size:"md"}),e.jsxs("div",{style:{display:"flex",gap:8,alignItems:"center"},children:[e.jsxs(U,{spacing:1,columns:"auto auto",children:[e.jsx(B,{ariaLabel:"Anterior",variant:"secondary",iconOnly:!0,leftIcon:e.jsx(q.ChevronLeftRounded,{}),onClick:m,disabled:s.isStart}),e.jsx(B,{ariaLabel:"Siguiente",variant:"secondary",iconOnly:!0,rightIcon:e.jsx(q.ChevronRightRounded,{}),onClick:v,disabled:s.isEnd})]}),e.jsx(B,{variant:"secondary",onClick:b,children:"Ver más"})]})]}),e.jsx(A,{ref:o,items:(d=(c=t==null?void 0:t.events)==null?void 0:c.filter(i=>i.event.sport==="FOOTBALL").sort((i,f)=>new Date(f.event.start).getTime()-new Date(i.event.start).getTime()))!=null?d:[],perPage:void 0,gap:"16px",options:{autoWidth:!0,trimSpace:"move"},breakpoints:{768:{gap:"8px",focus:"center"},1024:{gap:"10px",focus:"center"}},renderItem:i=>e.jsx(Ee,{...i}),onMove:({isStart:i,isEnd:f})=>x({isStart:i,isEnd:f})})]})})}const Wt="oraculo__OraculoSeccionEventoSemana-module__wrapper___eqVq-",Gt="oraculo__OraculoSeccionEventoSemana-module__container___5yFQs",At="oraculo__OraculoSeccionEventoSemana-module__buttonWrapper___-6IDT",ee={wrapper:Wt,container:Gt,buttonWrapper:At};function Me({items:t,title:n="En vivo",iconUrl:a,onViewMore:r,className:l=""}){const o=new Date;o.toISOString();const s=new Date(o);s.setDate(s.getDate()+7),s.toISOString();const x="https://us1.offering-api.kambicdn.com/offering/v2018/nexuspe/group.json?channel_id=1&client_id=200&lang=es_PE&market=PE",m=C.useRef(null),[v,b]=C.useState({isStart:!0,isEnd:!1}),[j,c]=C.useState([]);function d($){return[...$].sort((E,I)=>new Date(E.start).getTime()-new Date(I.start).getTime())}function i($){const E=new Date,I=new Date(E.getTime()+10080*60*1e3);return $.filter(p=>{if(!p.start)return!1;const u=new Date(p.start);return u>=E&&u<=I})}const f=()=>{r==null||r()};async function y(){try{const I=(await(await fetch(x)).json()).group.groups.find(_=>_.englishName==="Football");if(!I||!Array.isArray(I.groups)){console.error("Football groups not found");return}const u=I.groups.slice(0,4);console.log("First Football groups:",u);const h=_=>{const w="https://us1.offering-api.kambicdn.com/offering/v2018/nexuspe/listView/football";if(_.groups&&_.groups.length>0){const N=_.groups[0];return[`${w}/${_.termKey}/${N.termKey}/all/matches.json?channel_id=1&channel_id=1&client_id=200&client_id=200&competitionId=undefined&lang=es_PE&lang=es_PE&market=PE&market=PE&useCombined=true&useCombinedLive=true`]}return[`${w}/${_.termKey}/all/all/matches.json?channel_id=1&channel_id=1&client_id=200&client_id=200&competitionId=undefined&lang=es_PE&lang=es_PE&market=PE&market=PE&useCombined=true&useCombinedLive=true`]},g=u.flatMap(h);k(g)}catch($){console.error($)}}async function k($){try{const E=await Promise.all($.map(h=>fetch(h).then(g=>g.json())));let I=[],p=[];E.forEach(h=>{h.events&&(I.push(...h.events.map(g=>g.event)),p.push(...h.events.flatMap(g=>g.betOffers||[])))});const u=O(I,p);c(d(i(u)))}catch(E){console.error("Error loading events:",E)}}function O($,E){const p=E.filter(u=>{var h;return((h=u.betOfferType)==null?void 0:h.id)===2}).reduce((u,h)=>(u[h.eventId]||(u[h.eventId]=[]),u[h.eventId].push(h),u),{});return $.filter(u=>p[u.id]).map(u=>({...u,outcome:p[u.id]}))}C.useEffect(()=>{t&&t.events.length>0&&y()},[t]);const R=l||void 0;return e.jsx("section",{className:R,style:{width:"100%"},children:e.jsxs("div",{className:ee.wrapper,children:[e.jsx("div",{className:ee.container,children:e.jsxs(F.default,{direction:"column",spacing:1.5,useFlexGap:!0,children:[e.jsx(G,{title:"Eventos de la semana"}),e.jsx("div",{className:ee.buttonWrapper,children:e.jsx(B,{variant:"secondary",size:"lg",fullWidth:!0,onClick:()=>{f()},children:"Ver más"})})]})}),e.jsx("div",{style:{minWidth:0},children:e.jsx(A,{ref:m,items:j,perPage:3.5,gap:"16px",options:{autoWidth:!0,trimSpace:!0},breakpoints:{1024:{perPage:1.4,gap:"8px",focus:"center",padding:{left:"8px",right:"8px"}}},renderItem:$=>e.jsx(Oe,{event:$}),onMove:({isStart:$,isEnd:E})=>b({isStart:$,isEnd:E})})})]})})}const Dt=[{desktopSrc:"https://stg-www.contodobet.com/static/img/landing/Banner/FondoDesktop.png",mobileSrc:"https://stg-www.contodobet.com/static/img/landing/Banner/FondoMisiones.png",fallbackSrc:"https://stg-www.contodobet.com/static/img/landing/Banner/FondoMisiones.jpg"},{desktopSrc:"https://stg-www.contodobet.com/static/img/landing/Banner/FondoDesktop.png",mobileSrc:"https://stg-www.contodobet.com/static/img/landing/Banner/FondoMisiones.png",fallbackSrc:"https://stg-www.contodobet.com/static/img/landing/Banner/FondoMisiones.jpg"}],te=t=>`${window.location.origin}${t}`,Ht=[{id:1,label:"APUESTAS",icon:"https://stg-www.contodobet.com/static/img/landing/Banner/icon1.svg",onclick:()=>te("https://www.olimpo.bet/#home")},{id:2,label:"EXPLORAR",icon:"https://stg-www.contodobet.com/static/img/landing/Banner/icon2.svg",onclick:()=>console.log("EXPLORAR")},{id:3,label:"TOP JUEGOS",icon:"https://stg-www.contodobet.com/static/img/landing/Banner/icon3.svg",onclick:()=>te("https://www.olimpo.bet/casino")},{id:4,label:"MISIONES",icon:"https://stg-www.contodobet.com/static/img/landing/Banner/icon4.svg",onclick:()=>te("https://www.olimpo.bet/misiones")}];function Ue({backgrounds:t=Dt,items:n=Ht}){const[a,r]=C.useState(0),l=(t==null?void 0:t.length)||1;return e.jsxs(T.Box,{component:"section",sx:{position:"relative",overflow:"visible"},children:[e.jsxs(T.Box,{sx:{position:"relative",height:{xs:300,sm:360,md:420},borderRadius:0,overflow:"hidden"},children:[e.jsx(A,{items:t,perPage:1,gap:"0px",options:{type:"loop",pagination:!1,arrows:!1,drag:!0,focus:"center"},onMove:({index:o})=>r(o),renderItem:o=>{var s;return e.jsxs(T.Box,{sx:{position:"relative",height:{xs:300,sm:360,md:420}},children:[e.jsxs(T.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(T.Box,{component:"img",src:(s=o.fallbackSrc)!=null?s:o.desktopSrc,alt:"","aria-hidden":!0,loading:"lazy",sx:{width:"100%",height:"100%",objectFit:"cover",display:"block"}})]}),e.jsx(T.Box,{sx:{position:"absolute",inset:0,pointerEvents:"none","&::before":{content:'""',position:"absolute",left:0,right:0,bottom:0,top:"40%",background:"linear-gradient(to bottom, rgba(0,0,0,0) 0%, rgba(18,18,18,0.85) 80%, #121212 100%)"}}})]})}}),e.jsx(T.Box,{sx:{position:"absolute",left:0,right:0,bottom:72,display:"flex",justifyContent:"center",zIndex:2},children:e.jsx(se,{total:l,active:a})})]}),e.jsx(T.Box,{sx:{position:"absolute",bottom:{xs:10,sm:10},left:"50%",transform:"translateX(-50%)",width:{xs:"92%",sm:"88%",md:"80%"},maxWidth:900,backgroundColor:"#363636",borderRadius:2,py:{xs:.8,md:1.2},px:{xs:1.5,md:2},display:"flex",justifyContent:"space-around",alignItems:"center",boxShadow:"0 10px 24px rgba(0,0,0,.35)",zIndex:3},children:n==null?void 0:n.map(o=>e.jsxs(T.Box,{sx:{display:"flex",flexDirection:{xs:"column",md:"row"},alignItems:"center",justifyContent:"center",gap:{xs:.5,md:1},color:"#FFFFFF",minWidth:0,cursor:o.onclick?"pointer":"default",whiteSpace:"nowrap"},onClick:()=>{var s;return(s=o.onclick)==null?void 0:s.call(o)},children:[o.icon&&e.jsx(T.Box,{component:"img",src:o.icon,alt:o.label||`icon-${o.id}`,sx:{width:{xs:20,sm:22,md:24},height:{xs:20,sm:22,md:24},objectFit:"contain"}}),e.jsx(T.Typography,{sx:{fontSize:{xs:10,sm:11,md:12},fontWeight:600,color:"#E0E0E0",textAlign:"center"},children:o.label})]},o.id))})]})}const Vt=[[{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 ze({title:t="Medios de pago",rows:n=Vt}){const a=n.flat();return e.jsxs(T.Box,{component:"section","aria-labelledby":"mp-title",sx:{color:"#fff"},children:[e.jsx(T.Typography,{id:"mp-title",variant:"h6",sx:{fontWeight:800,fontSize:{xs:20,md:32},textAlign:"center",mb:1.5},children:t}),e.jsx(T.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(T.Box,{sx:{display:{xs:"block",md:"none"}},children:n.map((r,l)=>e.jsx(T.Stack,{direction:"row",justifyContent:"center",alignItems:"center",gap:2.5,flexWrap:"wrap",children:r.map(o=>e.jsx(oe,{...o},`${o.src}-${o.alt}`))},l))}),e.jsx(T.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:a.map(r=>e.jsx(oe,{...r},`${r.src}-${r.alt}`))})]})}const qt={OraculoSeccionDestacados:Ie,OraculoSeccionTopJuegos:le,OraculoSeccionCasinoEnVivo:$e,OraculoSeccionCasino:ke,OraculoSeccionVirtuales:Be,OraculoSeccionClubOlimpo:Pe,OraculoSeccionBonoBienvenida:Te,OraculoSeccionBanners:Ue,OraculoSeccionMediosPago:ze,OraculoSeccionEventoEnVivo:Le,OraculoSeccionEventoSemana:Me,OraculoSeccionEventoCombinadas:Fe},Jt=t=>typeof t=="function"||t&&typeof t=="object"&&"$$typeof"in t,Kt=t=>/^OraculoSeccion[A-Z]/.test(t),Xt=Object.fromEntries(Object.entries(qt).filter(([t,n])=>Kt(t)&&Jt(n)));class xe extends Error{constructor(n,a,r){super(`HTTP ${n} ${r}`),this.status=n,this.url=a,this.statusText=r,this.name="HttpError"}}const We=({sectionsOverride:t,docId:n="home",db:a})=>{const[r,l]=C.useState([]),[o,s]=C.useState(!1),[x,m]=C.useState({}),[v,b]=C.useState({}),[j,c]=C.useState({});C.useEffect(()=>{if(t||!a)return;s(!0);const p=de.onSnapshot(de.doc(a,"landings",n),u=>{var h;try{let g=u.exists()?((h=u.data())==null?void 0:h.sections)||[]:[];g=g.slice().sort((_,w)=>{var N,P;return((N=_.order)!=null?N:0)-((P=w.order)!=null?P:0)}).map((_,w)=>({..._,order:w+1})),l(g),console.log("fetched: ",g)}catch(g){console.error("Error procesando landings/"+n,g)}finally{s(!1)}},u=>{console.error("Error escuchando landings/"+n,u),s(!1)});return()=>p()},[t,n,a]),C.useEffect(()=>{(t?t.slice():r.slice()).map(h=>h.componentKey).filter(h=>!!h).length},[t,r]);const d=async p=>{const u=(p.apiUrl||"").trim();if(!u)return;const h=p.apiMethod||"GET",g=p.apiParams||[];let _=u,w,N;if(h==="GET"){const L=new URL(u,typeof window=="undefined"?"http://localhost":window.location.origin);for(const M of g)M.key&&L.searchParams.append(M.key,M.value);_=L.toString()}else{const L=new URLSearchParams;for(const M of g)M.key&&L.append(M.key,M.value);w=L.toString(),N={"Content-Type":"application/x-www-form-urlencoded; charset=UTF-8"}}const P=await fetch(_,{method:h,headers:N,body:w});if(!P.ok)throw new xe(P.status,_,P.statusText);return P.json()},i=C.useMemo(()=>t?t.slice():r.slice(),[t,r]),f=Je.default.useRef(new Set);C.useEffect(()=>{const p=i.map(u=>({s:u,url:(u.apiUrl||"").trim()})).filter(({url:u})=>!!u);if(p.length)for(const{s:u,url:h}of p){const g=`${u.id}|${h}`;f.current.has(g)||(f.current.add(g),b(_=>({..._,[u.id]:!0})),c(_=>({..._,[u.id]:""})),(async()=>{try{const _=await d(u);m(w=>({...w,[u.id]:_}))}catch(_){let w="Error desconocido";_ instanceof xe?w=`Error HTTP ${_.status} (${_.statusText}) en ${_.url}`:_ instanceof SyntaxError?w="Respuesta no es JSON válido":_ instanceof TypeError?w="Fallo de red / CORS / conexión":typeof _=="string"&&(w=_.toString()),c(N=>({...N,[u.id]:w}))}finally{b(_=>({..._,[u.id]:!1}))}})())}},[i]);const y=C.useMemo(()=>i.filter(p=>p.visible).sort((p,u)=>p.order-u.order),[i]),k=p=>Array.isArray(p)?p.map(u=>{const h={};for(const g of u.fields||[]){const _=(g.type||"string").toLowerCase();if(_==="number"){const w=String(g.value||"").trim();if(w!==""){const N=Number(w);Number.isNaN(N)||(h[g.name]=N)}}else if(_==="boolean")h[g.name]=String(g.value).toLowerCase()==="true";else if(_==="function"){const w=String(g.value||"").trim();if(w)try{const N=new Function(w);h[g.name]=N}catch(N){console.error(`❌ Error creando función en item '${g.name}':`,N)}}else h[g.name]=g.value}return h}):[],O=p=>{const u={};if(!Array.isArray(p))return u;for(const h of p){if(!h.name)continue;const g=(h.type||"string").toLowerCase();if(g==="number"){const _=String(h.value||"").trim();if(_!==""){const w=Number(_);Number.isNaN(w)||(u[h.name]=w)}}else if(g==="boolean")u[h.name]=String(h.value).toLowerCase()==="true";else if(g==="function"){const _=String(h.value||"").trim();if(_)try{const w=new Function(_);u[h.name]=w}catch(w){console.error(`❌ Error creando función en item '${h.name}':`,w)}}else u[h.name]=h.value}return u},R=(p,u,h)=>{const g=h?{...h}:{};if(u){const M=(u.variableName||"items").trim()||"items";return g[M]=u.arr||[],g}const _=p,w=Array.isArray(_),N=!w&&typeof _=="object"&&_!==null?_:void 0,P=N&&Array.isArray(N.lobby||N.items)?N.lobby||N.items:void 0,L=M=>w?_:P||M;return g.items=L(P||[]),g},$=p=>{var w;const u=!!((w=p.apiUrl)!=null&&w.trim()),h=u?x[p.id]:void 0;let g=p.props?{...p.props}:{};const _=O(p.manualScalarFields);if(["OraculoSeccionEventoEnVivo","OraculoSeccionEventoSemana","OraculoSeccionEventoCombinadas"].includes(p.componentKey))return console.log(h),{items:h,...g,..._};if(g={...g,..._},u)g=R(h,null,g);else if(p.dataMode==="manual"){const N=k(p.manualItems);if(g=R(null,{arr:N,variableName:p.variableName},g),p.variableName2&&p.manualItems2){const P=k(p.manualItems2),L=(p.variableName2||"items2").trim()||"items2";g[L]=P}}return g},E=(p,u,h)=>{const g={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 ${g[u]}`,children:h},p)},I=p=>{var L;const u=p.componentKey,h=Xt[u];if(!h)return console.warn(`No hay componente registrado para "${u}"`),E(p.id,"component",`Componente "${u}" no encontrado`);const g=!!((L=p.apiUrl)!=null&&L.trim()),_=g?x[p.id]:void 0,w=g?!!v[p.id]:!1,N=g?j[p.id]:"";if(g){if(w&&!_)return E(p.id,"loading",`Cargando datos desde ${p.apiUrl}...`);if(N&&!_)return E(p.id,"error",`Error cargando ${p.apiUrl}: ${N}`)}const P=$(p);return e.jsx("div",{style:{paddingLeft:16,paddingRight:16,width:"100%",boxSizing:"border-box"},children:e.jsx(h,{...P})},p.id)};return o&&!t?e.jsx("div",{className:"text-xs text-gray-400",children:"Cargando preview..."}):!o&&!t&&r.length===0?e.jsx("div",{className:"text-xs text-gray-500",children:"Sin secciones (Firestore)"}):e.jsx(T.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(T.Stack,{direction:"column",spacing:8,useFlexGap:!0,children:y.map(I)})})};exports.OraculoButton=B;exports.OraculoCarousel=A;exports.OraculoCarouselDots=se;exports.OraculoClubOlimpoVisual=Se;exports.OraculoEventCombinadasCard=Ce;exports.OraculoEventEnVivoCard=Ee;exports.OraculoEventHeader=ve;exports.OraculoEventLabel=ae;exports.OraculoEventLeague=je;exports.OraculoEventScore=re;exports.OraculoEventSemanaCard=Oe;exports.OraculoEventStatus=be;exports.OraculoEventStatusBadge=_e;exports.OraculoEventTeamInfo=K;exports.OraculoGameCard=J;exports.OraculoGameRankCard=ye;exports.OraculoGameSlide=ie;exports.OraculoGridGroup=U;exports.OraculoLiveCasinoCard=we;exports.OraculoLogoMediosPago=oe;exports.OraculoPageLandingPreview=We;exports.OraculoSeccionBanners=Ue;exports.OraculoSeccionBonoBienvenida=Te;exports.OraculoSeccionCasino=ke;exports.OraculoSeccionCasinoEnVivo=$e;exports.OraculoSeccionClubOlimpo=Pe;exports.OraculoSeccionDestacados=Ie;exports.OraculoSeccionEventoCombinadas=Fe;exports.OraculoSeccionEventoEnVivo=Le;exports.OraculoSeccionEventoSemana=Me;exports.OraculoSeccionMediosPago=ze;exports.OraculoSeccionTopJuegos=le;exports.OraculoSeccionVirtuales=Be;exports.OraculoSectionTitle=G;exports.OraculoTopJuegoItem=le;exports.OraculoWelcomeBanner=ne;exports.default=We;
|
|
19
|
+
`},Le=({headline:t,headline2:n,items:r,backgroundImageUrl:s})=>{const c=t,o=n,a=Ze.default("(max-width: 767px)"),p=r.length>1,m=s!=null?s:"",v=At(m),h=I.useRef(null),[S,i]=I.useState({isStart:!0,isEnd:!1}),[u,d]=I.useState(0),b=y=>e.jsxs(C.default,{sx:{width:"100%",maxWidth:y?600:"100%",mx:y?"auto":0},children:[e.jsx(A,{ref:h,items:r,perPage:1,gap:y?"24px":"12px",breakpoints:y?void 0:{480:{perPage:1,gap:"8px",padding:{left:"8px",right:"8px"}},768:{perPage:1,gap:"12px",padding:{left:"8px",right:"8px"}}},options:{autoWidth:!1},renderItem:j=>e.jsx(Ee,{...j,onButtonClick:j.onButtonClick,isDesktop:y}),onMove:({index:j,isStart:E,isEnd:w})=>{i({isStart:E,isEnd:w}),d(j)}}),p&&e.jsx(C.default,{sx:{mt:2,display:"flex",justifyContent:"center"},children:e.jsx(se,{total:r.length,active:u,onSelect:j=>{var E;d(j),(E=h.current)==null||E.go(j)}})})]});return a?e.jsxs(C.default,{component:"section",sx:{...v,textAlign:"center"},children:[(c||o)&&e.jsxs(C.default,{sx:pe,children:[c&&e.jsx(z.default,{component:"span",sx:xe,children:c}),o&&e.jsxs(e.Fragment,{children:[e.jsx("br",{}),e.jsx(z.default,{component:"span",sx:fe,children:o})]})]}),b(!1)]}):e.jsx(C.default,{component:"section",sx:v,children:e.jsxs(C.default,{sx:{maxWidth:1200,mx:"auto",px:15,display:"grid",gridTemplateColumns:"260px minmax(0, 1fr)",alignItems:"center",columnGap:6},children:[(c||o)&&e.jsx(C.default,{sx:{display:"flex",alignItems:"center",justifyContent:"flex-start",minHeight:"100%"},children:e.jsxs(C.default,{sx:{...pe,textAlign:"left",mb:0},children:[c&&e.jsx(z.default,{component:"span",sx:xe,children:c}),o&&e.jsxs(e.Fragment,{children:[e.jsx("br",{}),e.jsx(z.default,{component:"span",sx:fe,children:o})]})]})}),e.jsx(C.default,{sx:{display:"flex",justifyContent:"center",alignItems:"center"},children:b(!0)})]})})},Me=({className:t="",fullBleed:n=!0,items:r,selectedIndex:s=0,ariaLabel:c})=>{const o=I.useRef(null),a=I.useRef(null);if(!r)return null;const p=()=>{window.location.href="https://www.olimpo.bet/conoce-club-olimpo"},m=Array.isArray(r)?r[s]:r;I.useLayoutEffect(()=>{if(!o.current||!a.current||typeof ResizeObserver=="undefined")return;const h=o.current,S=a.current,i=()=>{h.style.setProperty("--orc-co-bottomH",`${S.offsetHeight+16}px`)},u=new ResizeObserver(i);return u.observe(S),i(),()=>u.disconnect()},[]);const v=["orc-co-wrap",n?"orc-co-fullBleed":"",t].filter(Boolean).join(" ");return e.jsx("section",{ref:o,className:v,"aria-label":c||m.imgAlt||"Club Olimpo",children:e.jsx("div",{ref:a,children:e.jsx(Oe,{text:m.text,onClick:p,imgAlt:m.imgAlt,imgSrcMobile:m.imgMobile,imgSrcDesktopBg:m.imgDesktopBg,imgSrcDesktopLogo:m.imgDesktopLogo})})})},Dt="oraculo__OraculoSeccionEventoCombinadas-module__controls___Zsta4",Ht={controls:Dt};function Ue({items:t,title:n="Combinadas del Olimpo",iconUrl:r="https://stg-www.contodobet.com/static/img/landing/EventoCombinada/rayoIcon.svg",onViewMore:s,className:c=""}){const o=I.useRef(null),[a,p]=I.useState({isStart:!0,isEnd:!1}),[m,v]=I.useState([]),h="https://us1.offering-api.kambicdn.com/offering/v2018/nexuspe/group/prepackcoupon.json?lang=es_PE&market=PE&client_id=200&channel_id=1&ncid=1764284658793&prePackCouponTags=CUSTOM",S=()=>{var w;(w=o.current)==null||w.prev()},i=()=>{var w;(w=o.current)==null||w.next()},u=()=>{s==null||s()};async function d(){var w,N,R;try{const l=await(await fetch(h)).json(),x=(R=(N=(w=l==null?void 0:l.group)==null?void 0:w.groups)==null?void 0:N[0])==null?void 0:R.id;if(!x){console.error("Could not extract group ID");return}const f=`https://us1.offering-api.kambicdn.com/offering/v2018/nexuspe/prepackcoupon/eventgroup/${x}.json?lang=es_PE&market=PE&client_id=200&channel_id=1&ncid=1764283566783&prePackCouponTags=CUSTOM`,g=await(await fetch(f)).json();v(b(g.events,g.betOffers,g.prePackCoupons))}catch($){console.error("loadDataEventSpecial error:",$)}}function b(w,N,R){const $=[];for(const l of R){const x=j([l]),f=y(l),_=N.reduce((g,O)=>{var P,M;g[O.eventId]||(g[O.eventId]=[]);const k=O.outcomes.filter(F=>x.has(F.id));if(k.length>0){const F=Array.from((M=(P=f==null?void 0:f[0])==null?void 0:P.requiredOutcomeIds)!=null?M:[]),de=k.map(K=>({...K,position:F.indexOf(K.id)}));g[O.eventId].push({...O,outcomes:de})}return g},{});w.forEach(g=>{if(g.id!==l.prePackCouponRows[0].eventId)return;const O=x;let k=null;for(const P of f)if([...P.requiredOutcomeIds].every(F=>O.has(F))){k=P.decimal;break}$.push({...g,combinadoTotal:k,betoffers:_[g.id]||[],couponId:l.id})})}return $}function y(w){var R;const N=[];for(const $ of w.prePackCouponRows)if($.type==="BET_BUILDER"&&((R=$.group)!=null&&R.groups)){const l=new Set;$.group.groups.forEach(x=>{var f;(f=x.outcomes)==null||f.forEach(_=>l.add(_.id))}),N.push({requiredOutcomeIds:l,decimal:$.odds.decimal})}return N}function j(w){var R;const N=new Set;for(const $ of w)for(const l of $.prePackCouponRows)l.type==="BET_BUILDER"&&((R=l.group)!=null&&R.groups)&&l.group.groups.forEach(x=>{var f;(f=x.outcomes)==null||f.forEach(_=>N.add(_.id))}),l.type==="SIMPLE"&&l.outcome&&N.add(l.outcome.id);return N}I.useEffect(()=>{d()},[]);const E=c||void 0;return!m||m.length===0?null:e.jsx("section",{className:E,style:{width:"100%"},children:e.jsxs(L.default,{direction:"column",spacing:1.5,useFlexGap:!0,children:[e.jsxs(U,{spacing:1.5,columns:"1fr auto ",justify:"start",children:[e.jsx(G,{title:n,iconUrl:r,size:"md"}),e.jsxs("div",{className:Ht.controls,children:[e.jsxs(U,{spacing:1,columns:"auto auto",children:[e.jsx(B,{ariaLabel:"Anterior",variant:"secondary",iconOnly:!0,leftIcon:e.jsx(V.ChevronLeftRounded,{}),onClick:S,disabled:a.isStart}),e.jsx(B,{ariaLabel:"Siguiente",variant:"secondary",iconOnly:!0,rightIcon:e.jsx(V.ChevronRightRounded,{}),onClick:i,disabled:a.isEnd})]}),e.jsx(B,{variant:"secondary",onClick:u,children:"Ver más"})]})]}),e.jsx(A,{ref:o,items:m.filter(w=>w.combinadoTotal!==null),perPage:void 0,gap:"16px",options:{autoWidth:!0,trimSpace:"move"},useIndexAsKey:!0,breakpoints:{768:{perPage:1.2,gap:"12px",padding:{left:"0px",right:"0px"}}},renderItem:w=>e.jsx(Ie,{event:w}),onMove:({isStart:w,isEnd:N})=>p({isStart:w,isEnd:N})})]})})}function We({items:t,title:n="En vivo",iconUrl:r="https://stg-www.contodobet.com/static/img/landing/EventoEnVivo/icon.svg",onViewMore:s,className:c=""}){var y;const o="https://us1.offering-api.kambicdn.com/offering/v2018/nexuspe/listView/football/all/all/all/in-play.json?channel_id=3&channel_id=3&client_id=200&client_id=200&competitionId=undefined&lang=es_PE&lang=es_PE&market=PE&market=PE&useCombined=true&useCombinedLive=true",a=I.useRef(null),[p,m]=I.useState({isStart:!0,isEnd:!1}),[v,h]=I.useState([]),S=()=>{var j;(j=a.current)==null||j.prev()},i=()=>{var j;(j=a.current)==null||j.next()},u=()=>{s==null||s()};async function d(){try{const E=await(await fetch(o)).json();h(E.events)}catch(j){console.error(j)}}I.useEffect(()=>{d();const j=setInterval(()=>{d()},2e4);return()=>clearInterval(j)},[]);const b=c||void 0;return e.jsx("section",{className:b,style:{width:"100%"},children:e.jsxs(L.default,{direction:"column",spacing:1.5,useFlexGap:!0,children:[e.jsxs(U,{spacing:1.5,columns:"1fr auto ",justify:"start",children:[e.jsx(G,{title:n,iconUrl:r,size:"md"}),e.jsxs("div",{style:{display:"flex",gap:8,alignItems:"center"},children:[e.jsxs(U,{spacing:1,columns:"auto auto",children:[e.jsx(B,{ariaLabel:"Anterior",variant:"secondary",iconOnly:!0,leftIcon:e.jsx(V.ChevronLeftRounded,{}),onClick:S,disabled:p.isStart}),e.jsx(B,{ariaLabel:"Siguiente",variant:"secondary",iconOnly:!0,rightIcon:e.jsx(V.ChevronRightRounded,{}),onClick:i,disabled:p.isEnd})]}),e.jsx(B,{variant:"secondary",onClick:u,children:"Ver más"})]})]}),e.jsx(A,{ref:a,items:(y=v==null?void 0:v.filter(j=>j.event.sport==="FOOTBALL").sort((j,E)=>new Date(E.event.start).getTime()-new Date(j.event.start).getTime()))!=null?y:[],perPage:void 0,gap:"16px",options:{autoWidth:!0,trimSpace:"move"},breakpoints:{768:{gap:"8px",focus:"center"},1024:{gap:"10px",focus:"center"}},renderItem:j=>e.jsx($e,{...j}),onMove:({isStart:j,isEnd:E})=>m({isStart:j,isEnd:E})})]})})}const qt="oraculo__OraculoSeccionEventoSemana-module__wrapper___eqVq-",Vt="oraculo__OraculoSeccionEventoSemana-module__container___5yFQs",Kt="oraculo__OraculoSeccionEventoSemana-module__buttonWrapper___-6IDT",te={wrapper:qt,container:Vt,buttonWrapper:Kt};function ze({items:t,title:n="En vivo",iconUrl:r,onViewMore:s,className:c=""}){const o="https://us1.offering-api.kambicdn.com/offering/v2018/nexuspe/group.json?channel_id=1&client_id=200&lang=es_PE&market=PE",a=I.useRef(null),[p,m]=I.useState({isStart:!0,isEnd:!1}),[v,h]=I.useState([]);function S(E){return[...E].sort((w,N)=>new Date(w.start).getTime()-new Date(N.start).getTime())}function i(E){const w=new Date,N=new Date(w.getTime()+10080*60*1e3);return E.filter(R=>{if(!R.start)return!1;const $=new Date(R.start);return $>=w&&$<=N})}const u=()=>{s==null||s()};async function d(){try{const N=(await(await fetch(o)).json()).group.groups.find(f=>f.englishName==="Football");if(!N||!Array.isArray(N.groups)){console.error("Football groups not found");return}const $=N.groups.slice(0,4),l=f=>{const _="https://us1.offering-api.kambicdn.com/offering/v2018/nexuspe/listView/football";if(f.groups&&f.groups.length>0){const g=f.groups[0];return[`${_}/${f.termKey}/${g.termKey}/all/matches.json?channel_id=1&channel_id=1&client_id=200&client_id=200&competitionId=undefined&lang=es_PE&lang=es_PE&market=PE&market=PE&useCombined=true&useCombinedLive=true`]}return[`${_}/${f.termKey}/all/all/matches.json?channel_id=1&channel_id=1&client_id=200&client_id=200&competitionId=undefined&lang=es_PE&lang=es_PE&market=PE&market=PE&useCombined=true&useCombinedLive=true`]},x=$.flatMap(l);b(x)}catch(E){console.error(E)}}async function b(E){try{const w=await Promise.all(E.map(l=>fetch(l).then(x=>x.json())));let N=[],R=[];w.forEach(l=>{l.events&&(N.push(...l.events.map(x=>x.event)),R.push(...l.events.flatMap(x=>x.betOffers||[])))});const $=y(N,R);h(S(i($)))}catch(w){console.error("Error loading events:",w)}}function y(E,w){const R=w.filter($=>{var l;return((l=$.betOfferType)==null?void 0:l.id)===2}).reduce(($,l)=>($[l.eventId]||($[l.eventId]=[]),$[l.eventId].push(l),$),{});return E.filter($=>R[$.id]).map($=>({...$,outcome:R[$.id]}))}I.useEffect(()=>{t&&t.events.length>0&&d()},[t]);const j=c||void 0;return e.jsx("section",{className:j,style:{width:"100%"},children:e.jsxs("div",{className:te.wrapper,children:[e.jsx("div",{className:te.container,children:e.jsxs(L.default,{direction:"column",spacing:1.5,useFlexGap:!0,children:[e.jsx(G,{title:"Eventos de la semana"}),e.jsx("div",{className:te.buttonWrapper,children:e.jsx(B,{variant:"secondary",size:"lg",fullWidth:!0,onClick:()=>{u()},children:"Ver más"})})]})}),e.jsx("div",{style:{minWidth:0},children:e.jsx(A,{ref:a,items:v,perPage:3.5,gap:"16px",options:{autoWidth:!0,trimSpace:!0},breakpoints:{1024:{perPage:1.4,gap:"8px",focus:"center",padding:{left:"8px",right:"8px"}}},renderItem:E=>e.jsx(Ne,{event:E}),onMove:({isStart:E,isEnd:w})=>m({isStart:E,isEnd:w})})})]})})}const Jt=[{desktopSrc:"https://stg-www.contodobet.com/static/img/landing/Banner/FondoDesktop.png",mobileSrc:"https://stg-www.contodobet.com/static/img/landing/Banner/FondoMisiones.png",fallbackSrc:"https://stg-www.contodobet.com/static/img/landing/Banner/FondoMisiones.jpg"},{desktopSrc:"https://stg-www.contodobet.com/static/img/landing/Banner/FondoDesktop.png",mobileSrc:"https://stg-www.contodobet.com/static/img/landing/Banner/FondoMisiones.png",fallbackSrc:"https://stg-www.contodobet.com/static/img/landing/Banner/FondoMisiones.jpg"}],oe=t=>`${window.location.origin}${t}`,Xt=[{id:1,label:"APUESTAS",icon:"https://stg-www.contodobet.com/static/img/landing/Banner/icon1.svg",onclick:()=>oe("https://www.olimpo.bet/#home")},{id:2,label:"EXPLORAR",icon:"https://stg-www.contodobet.com/static/img/landing/Banner/icon2.svg",onclick:()=>console.log("EXPLORAR")},{id:3,label:"TOP JUEGOS",icon:"https://stg-www.contodobet.com/static/img/landing/Banner/icon3.svg",onclick:()=>oe("https://www.olimpo.bet/casino")},{id:4,label:"MISIONES",icon:"https://stg-www.contodobet.com/static/img/landing/Banner/icon4.svg",onclick:()=>oe("https://www.olimpo.bet/misiones")}];function Ge({backgrounds:t=Jt,items:n=Xt}){const[r,s]=I.useState(0),c=(t==null?void 0:t.length)||1;return e.jsxs(T.Box,{component:"section",sx:{position:"relative",overflow:"visible"},children:[e.jsxs(T.Box,{sx:{position:"relative",height:{xs:300,sm:360,md:420},borderRadius:0,overflow:"hidden"},children:[e.jsx(A,{items:t,perPage:0,gap:"0px",options:{type:"loop",pagination:!1,arrows:!1,drag:!0,focus:"center"},onMove:({index:o})=>s(o),renderItem:o=>{var a;return e.jsxs(T.Box,{sx:{position:"relative",height:{xs:300,sm:360,md:420}},children:[e.jsxs(T.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(T.Box,{component:"img",src:(a=o.fallbackSrc)!=null?a:o.desktopSrc,alt:"","aria-hidden":!0,loading:"lazy",sx:{width:"100%",height:"100%",objectFit:"cover",display:"block"}})]}),e.jsx(T.Box,{sx:{position:"absolute",inset:0,pointerEvents:"none","&::before":{content:'""',position:"absolute",left:0,right:0,bottom:0,top:"40%",background:"linear-gradient(to bottom, rgba(0,0,0,0) 0%, rgba(18,18,18,0.85) 80%, #121212 100%)"}}})]})}}),e.jsx(T.Box,{sx:{position:"absolute",left:0,right:0,bottom:72,display:"flex",justifyContent:"center",zIndex:2},children:e.jsx(se,{total:c,active:r})})]}),e.jsx(T.Box,{sx:{position:"absolute",bottom:{xs:10,sm:10},left:"50%",transform:"translateX(-50%)",width:{xs:"92%",sm:"88%",md:"80%"},maxWidth:900,backgroundColor:"#363636",borderRadius:2,py:{xs:.8,md:1.2},px:{xs:1.5,md:2},display:"flex",justifyContent:"space-around",alignItems:"center",boxShadow:"0 10px 24px rgba(0,0,0,.35)",zIndex:3},children:n==null?void 0:n.map(o=>e.jsxs(T.Box,{sx:{display:"flex",flexDirection:{xs:"column",md:"row"},alignItems:"center",justifyContent:"center",gap:{xs:.5,md:1},color:"#FFFFFF",minWidth:0,cursor:o.onclick?"pointer":"default",whiteSpace:"nowrap"},onClick:()=>{var a;return(a=o.onclick)==null?void 0:a.call(o)},children:[o.icon&&e.jsx(T.Box,{component:"img",src:o.icon,alt:o.label||`icon-${o.id}`,sx:{width:{xs:20,sm:22,md:24},height:{xs:20,sm:22,md:24},objectFit:"contain"}}),e.jsx(T.Typography,{sx:{fontSize:{xs:10,sm:11,md:12},fontWeight:600,color:"#E0E0E0",textAlign:"center"},children:o.label})]},o.id))})]})}const Qt=[[{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 Ae({title:t="Medios de pago",rows:n=Qt}){const r=n.flat();return e.jsxs(T.Box,{component:"section","aria-labelledby":"mp-title",sx:{color:"#fff"},children:[e.jsx(T.Typography,{id:"mp-title",variant:"h6",sx:{fontWeight:800,fontSize:{xs:20,md:32},textAlign:"center",mb:1.5},children:t}),e.jsx(T.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(T.Box,{sx:{display:{xs:"block",md:"none"}},children:n.map((s,c)=>e.jsx(T.Stack,{direction:"row",justifyContent:"center",alignItems:"center",gap:2.5,flexWrap:"wrap",children:s.map(o=>e.jsx(ne,{...o},`${o.src}-${o.alt}`))},c))}),e.jsx(T.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(ne,{...s},`${s.src}-${s.alt}`))})]})}const Yt={OraculoSeccionDestacados:ke,OraculoSeccionTopJuegos:le,OraculoSeccionCasinoEnVivo:Re,OraculoSeccionCasino:Te,OraculoSeccionVirtuales:Fe,OraculoSeccionClubOlimpo:Me,OraculoSeccionBonoBienvenida:Le,OraculoSeccionBanners:Ge,OraculoSeccionMediosPago:Ae,OraculoSeccionEventoEnVivo:We,OraculoSeccionEventoSemana:ze,OraculoSeccionEventoCombinadas:Ue},Zt=t=>typeof t=="function"||t&&typeof t=="object"&&"$$typeof"in t,eo=t=>/^OraculoSeccion[A-Z]/.test(t),to=Object.fromEntries(Object.entries(Yt).filter(([t,n])=>eo(t)&&Zt(n)));class ge extends Error{constructor(n,r,s){super(`HTTP ${n} ${s}`),this.status=n,this.url=r,this.statusText=s,this.name="HttpError"}}const De=({sectionsOverride:t,docId:n="home",db:r})=>{const[s,c]=I.useState([]),[o,a]=I.useState(!1),[p,m]=I.useState({}),[v,h]=I.useState({}),[S,i]=I.useState({});I.useEffect(()=>{if(t||!r)return;a(!0);const l=me.onSnapshot(me.doc(r,"landings",n),x=>{var f;try{let _=x.exists()?((f=x.data())==null?void 0:f.sections)||[]:[];_=_.slice().sort((g,O)=>{var k,P;return((k=g.order)!=null?k:0)-((P=O.order)!=null?P:0)}).map((g,O)=>({...g,order:O+1})),c(_),console.log("fetched: ",_)}catch(_){console.error("Error procesando landings/"+n,_)}finally{a(!1)}},x=>{console.error("Error escuchando landings/"+n,x),a(!1)});return()=>l()},[t,n,r]),I.useEffect(()=>{(t?t.slice():s.slice()).map(f=>f.componentKey).filter(f=>!!f).length},[t,s]);const u=async l=>{const x=(l.apiUrl||"").trim();if(!x)return;const f=l.apiMethod||"GET",_=l.apiParams||[];let g=x,O,k;if(f==="GET"){const M=new URL(x,typeof window=="undefined"?"http://localhost":window.location.origin);for(const F of _)F.key&&M.searchParams.append(F.key,F.value);g=M.toString()}else{const M=new URLSearchParams;for(const F of _)F.key&&M.append(F.key,F.value);O=M.toString(),k={"Content-Type":"application/x-www-form-urlencoded; charset=UTF-8"}}const P=await fetch(g,{method:f,headers:k,body:O});if(!P.ok)throw new ge(P.status,g,P.statusText);return P.json()},d=I.useMemo(()=>t?t.slice():s.slice(),[t,s]),b=Ye.default.useRef(new Set);I.useEffect(()=>{const l=d.map(x=>({s:x,url:(x.apiUrl||"").trim()})).filter(({url:x})=>!!x);if(l.length)for(const{s:x,url:f}of l){const _=`${x.id}|${f}`;b.current.has(_)||(b.current.add(_),h(g=>({...g,[x.id]:!0})),i(g=>({...g,[x.id]:""})),(async()=>{try{const g=await u(x);m(O=>({...O,[x.id]:g}))}catch(g){let O="Error desconocido";g instanceof ge?O=`Error HTTP ${g.status} (${g.statusText}) en ${g.url}`:g instanceof SyntaxError?O="Respuesta no es JSON válido":g instanceof TypeError?O="Fallo de red / CORS / conexión":typeof g=="string"&&(O=g.toString()),i(k=>({...k,[x.id]:O}))}finally{h(g=>({...g,[x.id]:!1}))}})())}},[d]);const y=I.useMemo(()=>d.filter(l=>l.visible).sort((l,x)=>l.order-x.order),[d]),j=l=>Array.isArray(l)?l.map(x=>{const f={};for(const _ of x.fields||[]){const g=(_.type||"string").toLowerCase();if(g==="number"){const O=String(_.value||"").trim();if(O!==""){const k=Number(O);Number.isNaN(k)||(f[_.name]=k)}}else if(g==="boolean")f[_.name]=String(_.value).toLowerCase()==="true";else if(g==="function"){const O=String(_.value||"").trim();if(O)try{const k=new Function(O);f[_.name]=k}catch(k){console.error(`❌ Error creando función en item '${_.name}':`,k)}}else f[_.name]=_.value}return f}):[],E=l=>{const x={};if(!Array.isArray(l))return x;for(const f of l){if(!f.name)continue;const _=(f.type||"string").toLowerCase();if(_==="number"){const g=String(f.value||"").trim();if(g!==""){const O=Number(g);Number.isNaN(O)||(x[f.name]=O)}}else if(_==="boolean")x[f.name]=String(f.value).toLowerCase()==="true";else if(_==="function"){const g=String(f.value||"").trim();if(g)try{const O=new Function(g);x[f.name]=O}catch(O){console.error(`❌ Error creando función en item '${f.name}':`,O)}}else x[f.name]=f.value}return x},w=(l,x,f)=>{const _=f?{...f}:{};if(x){const F=(x.variableName||"items").trim()||"items";return _[F]=x.arr||[],_}const g=l,O=Array.isArray(g),k=!O&&typeof g=="object"&&g!==null?g:void 0,P=k&&Array.isArray(k.lobby||k.items)?k.lobby||k.items:void 0,M=F=>O?g:P||F;return _.items=M(P||[]),_},N=l=>{var O;const x=!!((O=l.apiUrl)!=null&&O.trim()),f=x?p[l.id]:void 0;let _=l.props?{...l.props}:{};const g=E(l.manualScalarFields);if(["OraculoSeccionEventoEnVivo","OraculoSeccionEventoSemana","OraculoSeccionEventoCombinadas"].includes(l.componentKey))return console.log(f),{items:f,..._,...g};if(_={..._,...g},x)_=w(f,null,_);else if(l.dataMode==="manual"){const k=j(l.manualItems);if(_=w(null,{arr:k,variableName:l.variableName},_),l.variableName2&&l.manualItems2){const P=j(l.manualItems2),M=(l.variableName2||"items2").trim()||"items2";_[M]=P}}return _},R=(l,x,f)=>{const _={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 ${_[x]}`,children:f},l)},$=l=>{var ue;const x=l.componentKey,f=to[x];if(!f)return console.warn(`No hay componente registrado para "${x}"`),R(l.id,"component",`Componente "${x}" no encontrado`);const _=!!((ue=l.apiUrl)!=null&&ue.trim()),g=_?p[l.id]:void 0,O=_?!!v[l.id]:!1,k=_?S[l.id]:"";if(_){if(O&&!g)return R(l.id,"loading",`Cargando datos desde ${l.apiUrl}...`);if(k&&!g)return R(l.id,"error",`Error cargando ${l.apiUrl}: ${k}`)}const P=N(l),F=new Set(["OraculoSeccionBanners","OraculoSeccionBonoBienvenida"]).has(l.componentKey),K=typeof window=="undefined"?24:window.innerWidth>=1024?120:24,He=F?{width:"100%",boxSizing:"border-box"}:{paddingLeft:K,paddingRight:K,width:"100%",boxSizing:"border-box"};return e.jsx("div",{style:He,children:e.jsx(f,{...P})},l.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(T.Container,{className:"oli-font",maxWidth:!1,disableGutters:!0,sx:{backgroundColor:"#121212",position:"relative",width:"100%",maxWidth:"100%",overflowX:"hidden"},children:e.jsx(T.Stack,{direction:"column",spacing:8,useFlexGap:!0,children:y.map($)})})};exports.OraculoButton=B;exports.OraculoCarousel=A;exports.OraculoCarouselDots=se;exports.OraculoClubOlimpoVisual=Oe;exports.OraculoEventCombinadasCard=Ie;exports.OraculoEventEnVivoCard=$e;exports.OraculoEventHeader=ye;exports.OraculoEventLabel=ae;exports.OraculoEventLeague=we;exports.OraculoEventScore=re;exports.OraculoEventSemanaCard=Ne;exports.OraculoEventStatus=je;exports.OraculoEventStatusBadge=ve;exports.OraculoEventTeamInfo=X;exports.OraculoGameCard=J;exports.OraculoGameRankCard=Se;exports.OraculoGameSlide=ie;exports.OraculoGridGroup=U;exports.OraculoLiveCasinoCard=Ce;exports.OraculoLogoMediosPago=ne;exports.OraculoPageLandingPreview=De;exports.OraculoSeccionBanners=Ge;exports.OraculoSeccionBonoBienvenida=Le;exports.OraculoSeccionCasino=Te;exports.OraculoSeccionCasinoEnVivo=Re;exports.OraculoSeccionClubOlimpo=Me;exports.OraculoSeccionDestacados=ke;exports.OraculoSeccionEventoCombinadas=Ue;exports.OraculoSeccionEventoEnVivo=We;exports.OraculoSeccionEventoSemana=ze;exports.OraculoSeccionMediosPago=Ae;exports.OraculoSeccionTopJuegos=le;exports.OraculoSeccionVirtuales=Fe;exports.OraculoSectionTitle=G;exports.OraculoTopJuegoItem=le;exports.OraculoWelcomeBanner=Ee;exports.default=De;
|
|
20
20
|
//# sourceMappingURL=index.cjs.js.map
|