oraculo-ui 0.1.107 → 0.1.108
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 +1 -1
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.js +2 -4
- package/dist/index.es.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs.js
CHANGED
|
@@ -16,5 +16,5 @@
|
|
|
16
16
|
0 0 2px rgba(255, 255, 255, .95),
|
|
17
17
|
0 0 6px rgba(255, 255, 255, .6),
|
|
18
18
|
0 1px 0 rgba(137, 137, 137, .85)
|
|
19
|
-
`},gt=({headline:t,headline2:a,items:n,backgroundImageUrl:o})=>{const s=H.useCaptureInteraction(),r=K(),d=$t.default("(max-width: 767px)"),f=n.length>1,b=h.useRef(null),x=h.useRef(null),i=h.useRef(!1),m=h.useRef(!1),[u,_]=h.useState(0),[v,I]=h.useState({isStart:!0,isEnd:!1});h.useEffect(()=>{const S=setTimeout(()=>{i.current=!0},500);return()=>clearTimeout(S)},[]);const O=h.useRef(v);h.useEffect(()=>{O.current=v},[v]);const B=h.useRef(!1),j=h.useRef(null),C=n==null?void 0:n[u],N=h.useMemo(()=>{var S,T;return(T=(S=C==null?void 0:C.backgroundImageUrl)!=null?S:o)!=null?T:""},[C,o]),E=Pa(N),M=!n||n.length===0,w=(S,T)=>{s({element:"welcome_banner_button",label:`OraculoSeccionBonoBienvenida - Banner button click: ${S.title||"OraculoSeccionBonoBienvenida - Banner "+(T+1)}`,target:"action",event_type:"click",module_id:301,metadata:{location:typeof globalThis!="undefined"&&globalThis.location?globalThis.location.pathname:"",banner_position:T+1,banner_total:(n==null?void 0:n.length)||0},tags:{banner_title:S.title||"no_title",button_text:S.buttonText||"no_text"}}),S.onButtonClick&&S.onButtonClick()},L=S=>{if(!i.current)return;if(m.current){m.current=!1;return}const T=n==null?void 0:n[S];s({element:"welcome_banner_carousel",label:`Landing: ${r} - OraculoSeccionBonoBienvenida - Banner view: ${(T==null?void 0:T.title)||"OraculoSeccionBonoBienvenida - Banner "+(S+1)}`,target:"no_url",event_type:"view",module_id:301,metadata:{location:typeof globalThis!="undefined"&&globalThis.location?globalThis.location.pathname:"",slide_index:S+1,total_slides:(n==null?void 0:n.length)||0,interaction_type:"manual_slide"},tags:{banner_position:String(S+1),banner_title:(T==null?void 0:T.title)||"no_title"}})};h.useEffect(()=>{const S=x.current;if(!S)return;const T=6,F=380,g=l=>{var k,$;if(M||l.ctrlKey||B.current)return;const c=l.deltaX,p=l.deltaY;if(Math.abs(c)<=Math.abs(p)||Math.abs(c)<T)return;const y=c>0;y&&O.current.isEnd||!y&&O.current.isStart||(l.preventDefault(),B.current=!0,y?(k=b.current)==null||k.next():($=b.current)==null||$.prev(),j.current&&window.clearTimeout(j.current),j.current=window.setTimeout(()=>{B.current=!1},F))};return S.addEventListener("wheel",g,{passive:!1}),()=>{S.removeEventListener("wheel",g),j.current&&window.clearTimeout(j.current)}},[M]);const P=(S,T,F)=>{var c,p;const g=(c=S.headline)!=null?c:t,l=(p=S.headline2)!=null?p:a;return T?e.jsxs(R.default,{sx:{maxWidth:1200,mx:"auto",px:15,display:"grid",gridTemplateColumns:"260px minmax(0, 1fr)",alignItems:"center",columnGap:6},children:[(g||l)&&e.jsx(R.default,{sx:{display:"flex",alignItems:"center",justifyContent:"flex-start",minHeight:"100%"},children:e.jsxs(R.default,{sx:{...qe,textAlign:"left",mb:0},children:[g&&e.jsx(Q.default,{component:"span",sx:ze,children:g}),l&&e.jsxs(e.Fragment,{children:[e.jsx("br",{}),e.jsx(Q.default,{component:"span",sx:Ue,children:l})]})]})}),e.jsx(R.default,{sx:{display:"flex",justifyContent:"center",alignItems:"center"},children:e.jsx(R.default,{sx:{width:"100%",maxWidth:600,mx:"auto"},children:e.jsx(Te,{...S,onButtonClick:()=>w(S,F),variant:"large"})})})]}):e.jsxs(R.default,{sx:{textAlign:"center"},children:[(g||l)&&e.jsxs(R.default,{sx:qe,children:[g&&e.jsx(Q.default,{component:"span",sx:ze,children:g}),l&&e.jsxs(e.Fragment,{children:[e.jsx("br",{}),e.jsx(Q.default,{component:"span",sx:Ue,children:l})]})]}),e.jsx(R.default,{sx:{display:"flex",justifyContent:"center"},children:e.jsx(Te,{...S,onButtonClick:()=>w(S,F),variant:"small"})})]})};return e.jsxs(R.default,{component:"section",sx:E,children:[e.jsx("div",{ref:x,style:{width:"100%"},children:e.jsx(ae,{ref:b,items:n,perPage:1,gap:"0px",options:{autoWidth:!1},renderItem:(S,T)=>e.jsx(R.default,{sx:{width:"100%"},children:P(S,!d,T)}),onMove:({index:S,isStart:T,isEnd:F})=>{_(S),typeof T=="boolean"&&typeof F=="boolean"&&I({isStart:T,isEnd:F}),L(S)}})}),f&&e.jsx(R.default,{sx:{mt:2,display:"flex",justifyContent:"center"},children:e.jsx(ke,{total:n.length,active:u,onSelect:S=>{var T;s({element:"welcome_banner_dots",label:`Landing: ${r} - OraculoSeccionBonoBienvenida - Dot navigation: Banner ${S+1}`,target:"no_url",event_type:"click",module_id:301,metadata:{location:typeof globalThis!="undefined"&&globalThis.location?globalThis.location.pathname:"",dot_index:S+1,total_dots:n.length},tags:{navigation_type:"dot_click"}}),_(S),(T=b.current)==null||T.go(S)}})})]})},ht=({className:t="",fullBleed:a=!0,items:n,selectedIndex:o=0,ariaLabel:s})=>{const r=h.useRef(null),d=h.useRef(null),f=H.useCaptureInteraction(),b=K();if(!n)return null;const x=()=>{f({element:"club_olimpo_button",label:`Landing: ${b} - OraculoSeccionClubOlimpo - Click: Club Olimpo`,target:"https://www.olimpo.bet/conoce-club-olimpo",event_type:"click",module_id:301,metadata:{location:typeof globalThis!="undefined"&&globalThis.location?globalThis.location.pathname:""},tags:{section:"OraculoSeccionClubOlimpo"}}),typeof globalThis!="undefined"&&globalThis.location&&globalThis.location.assign("https://www.olimpo.bet/conoce-club-olimpo")},i=Array.isArray(n)?n[o]:n;h.useLayoutEffect(()=>{if(!r.current||!d.current||typeof ResizeObserver=="undefined")return;const u=r.current,_=d.current,v=()=>{u.style.setProperty("--orc-co-bottomH",`${_.offsetHeight+16}px`)},I=new ResizeObserver(v);return I.observe(_),v(),()=>I.disconnect()},[]);const m=["orc-co-wrap",a?"orc-co-fullBleed":"",t].filter(Boolean).join(" ");return e.jsx("section",{ref:r,className:m,"aria-label":s||i.imgAlt||"Club Olimpo",children:e.jsx("div",{ref:d,children:e.jsx(tt,{text:i.text,onClick:x,imgAlt:i.imgAlt,buttonLabel:i.buttonLabel,imgSrcMobile:i.imgMobile,imgSrcDesktopBg:i.imgDesktopBg,imgSrcDesktopLogo:i.imgDesktopLogo})})})},qa="oraculo__OraculoSeccionEventoCombinadas-module__controls___Zsta4",za="oraculo__OraculoSeccionEventoCombinadas-module__padding___vf-yF",Ve={controls:qa,padding:za},Ua=t=>{var a,n;return(a=t.outcome)!=null&&a.id?[t.outcome.id]:t.type==="BET_BUILDER"&&((n=t.group)!=null&&n.groups)?t.group.groups.flatMap(o=>{var s,r;return(r=(s=o.outcomes)==null?void 0:s.map(d=>d.id))!=null?r:[]}):[]};function Va(t,a,n){return n?n.map(o=>{var i,m;const s=o.prePackCouponRows.flatMap(u=>Ua(u).map(_=>({eventId:u.eventId,outcomeId:_}))),r=new Set(s.map(u=>u.eventId)),d=new Set(s.map(u=>u.outcomeId)),f=new Map(s.map((u,_)=>[u.outcomeId,_])),b={};for(const u of a){if(!r.has(u.eventId))continue;const _=u.outcomes.filter(v=>d.has(v.id)).map(v=>({...v,position:f.get(v.id)}));_.length&&((m=b[i=u.eventId])!=null||(b[i]=[]),b[u.eventId].push({...u,outcomes:_}))}const x=t.filter(u=>r.has(u.id)).map(u=>{var _;return{...u,betoffers:(_=b[u.id])!=null?_:[]}});return{couponId:o.id,status:o.status,combinadoTotal:Da(o.prePackCouponRows),events:x}}):[]}function Da(t){if(!Array.isArray(t)||t.length===0)return 0;let a=1;for(const n of t){const o=n.odds.decimal/1e3,s=Math.round(o*100)/100;a*=s}return Math.floor(a*100)/100}const Wa=re.default.memo(it);function bt({items:t,title:a="Combinadas del Olimpo",iconUrl:n="https://stg-www.contodobet.com/static/img/landing/EventoCombinada/rayoIcon.svg",onViewMore:o,className:s=""}){const r=H.useCaptureInteraction(),d=K(),f=h.useRef(null),[b,x]=h.useState({isStart:!0,isEnd:!1}),[i,m]=h.useState([]),u="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",_=()=>{var C;r({element:"evento_combinadas_prev",label:`Landing: ${d} - OraculoSeccionEventoCombinadas - Click: Anterior`,event_type:"click",module_id:301,metadata:{location:typeof globalThis!="undefined"&&globalThis.location?globalThis.location.pathname:""},tags:{section:"OraculoSeccionEventoCombinadas"}}),(C=f.current)==null||C.prev()},v=()=>{var C;r({element:"evento_combinadas_next",label:`Landing: ${d} - OraculoSeccionEventoCombinadas - Click: Siguiente`,event_type:"click",module_id:301,metadata:{location:typeof globalThis!="undefined"&&globalThis.location?globalThis.location.pathname:""},tags:{section:"OraculoSeccionEventoCombinadas"}}),(C=f.current)==null||C.next()},I=()=>{r({element:"evento_combinadas_ver_mas",label:`Landing: ${d} - OraculoSeccionEventoCombinadas - Click: Ver más`,event_type:"click",module_id:301,metadata:{location:typeof globalThis!="undefined"&&globalThis.location?globalThis.location.pathname:""},tags:{section:"OraculoSeccionEventoCombinadas"}}),ya()},O=h.useMemo(()=>i.filter(C=>C.combinadoTotal!==null),[i]);async function B(){var C,N,E;try{const w=await(await fetch(u)).json(),L=(E=(N=(C=w==null?void 0:w.group)==null?void 0:C.groups)==null?void 0:N[0])==null?void 0:E.id;if(!L){console.error("Could not extract group ID");return}const P=`https://us1.offering-api.kambicdn.com/offering/v2018/nexuspe/prepackcoupon/eventgroup/${L}.json?lang=es_PE&market=PE&client_id=200&channel_id=1&ncid=1764283566783&prePackCouponTags=CUSTOM`,T=await(await fetch(P)).json();m(Va(T.events,T.betOffers,T.prePackCoupons))}catch(M){console.error("loadDataEventSpecial error:",M)}}h.useEffect(()=>{B()},[]);const j=s||void 0;return O.length===0?null:e.jsx("section",{className:j,style:{width:"100%",boxSizing:"border-box"},children:e.jsxs(z.default,{direction:"column",spacing:1.5,useFlexGap:!0,children:[e.jsx("div",{className:Ve.padding,children:e.jsxs(J,{spacing:1.5,columns:"1fr auto ",justify:"start",children:[e.jsx(te,{title:a,iconUrl:n,size:"md"}),e.jsxs("div",{className:Ve.controls,children:[e.jsxs(J,{spacing:1,columns:"auto auto",children:[e.jsx(D,{ariaLabel:"Anterior",variant:"secondary",iconOnly:!0,leftIcon:e.jsx(oe.ChevronLeftRounded,{}),onClick:_,disabled:b.isStart}),e.jsx(D,{ariaLabel:"Siguiente",variant:"secondary",iconOnly:!0,rightIcon:e.jsx(oe.ChevronRightRounded,{}),onClick:v,disabled:b.isEnd})]}),e.jsx(D,{variant:"secondary",onClick:I,children:"Ver más"})]})]})}),e.jsx(ae,{ref:f,items:O,perPage:void 0,gap:"16px",options:{autoWidth:!0,trimSpace:"move"},useIndexAsKey:!0,enableHorizontalWheel:!0,showRightGradient:!0,breakpoints:{768:{perPage:1.2,gap:"12px",padding:{left:"24px",right:"24px"}}},renderItem:C=>e.jsx(Wa,{coupon:C}),onMove:({isStart:C,isEnd:N})=>x({isStart:C,isEnd:N})})]})})}function Ga({}){return e.jsx("div",{className:be.cardWrapper,children:e.jsxs(z.default,{direction:"column",spacing:1,children:[e.jsxs(z.default,{spacing:1,direction:"row",children:[e.jsx(q.default,{variant:"text",width:"60%",height:24}),e.jsx(q.default,{variant:"text",width:"39%",height:24})]}),e.jsxs(z.default,{spacing:8,direction:"row",justifyContent:"center",alignItems:"center",children:[e.jsx(q.default,{variant:"circular",width:32,height:40}),e.jsx(q.default,{variant:"text",width:40,height:40}),e.jsx(q.default,{variant:"circular",width:32,height:40})]}),e.jsxs(z.default,{spacing:8,direction:"row",justifyContent:"center",alignItems:"center",children:[e.jsx(q.default,{variant:"text",width:32,height:16}),e.jsx(q.default,{variant:"text",width:40,height:16}),e.jsx(q.default,{variant:"text",width:32,height:16})]}),e.jsxs(z.default,{spacing:2,direction:"row",children:[e.jsx(q.default,{variant:"rounded",width:88,height:16}),e.jsx(q.default,{variant:"rounded",width:88,height:16}),e.jsx(q.default,{variant:"rounded",width:88,height:16})]}),e.jsxs(z.default,{spacing:2,direction:"row",children:[e.jsx(q.default,{variant:"rounded",width:88,height:32}),e.jsx(q.default,{variant:"rounded",width:88,height:32}),e.jsx(q.default,{variant:"rounded",width:88,height:32})]})]})})}const Ha="oraculo__FadeItemWrapper-module__fadeWrapper___kFOH4",Ka={fadeWrapper:Ha};function ye({children:t}){return e.jsx("div",{className:Ka.fadeWrapper,children:t})}const Za="oraculo__OraculoSeccionEventoEnVivo-module__padding___Sh8tD",Ja={padding:Za},Xa=t=>{const a=["esports","cyber"];return t.filter(n=>{var s;if(n.event.sport!=="FOOTBALL")return!1;const o=((s=n.event.group)==null?void 0:s.toLowerCase())||"";return!a.some(r=>o.includes(r))})},Ya=re.default.memo(st);function xt({items:t,title:a="En vivo",iconUrl:n="https://stg-www.contodobet.com/static/img/landing/EventoEnVivo/icon.svg",onViewMore:o,className:s=""}){const r="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",d=h.useRef(null),[f,b]=h.useState({isStart:!0,isEnd:!1}),[x,i]=h.useState(null),[m,u]=h.useState({}),[_,v]=h.useState({start:null,end:null}),I=h.useRef(!1),[O,B]=h.useState(null),j=h.useRef(!1),C=H.useCaptureInteraction(),N=K(),E=h.useRef(new Map),M=nt(_,300),w=h.useRef(new Set),L=()=>{var c;C({element:"evento_en_vivo_prev",label:`Landing: ${N} - OraculoSeccionEventoEnVivo - Anterior`,target:"prev",event_type:"click",module_id:301,metadata:{location:typeof globalThis!="undefined"&&globalThis.location?globalThis.location.pathname:""},tags:{section:"OraculoSeccionEventoEnVivo"}}),(c=d.current)==null||c.prev()},P=()=>{var c;C({element:"evento_en_vivo_next",label:`Landing: ${N} - OraculoSeccionEventoEnVivo - Siguiente`,target:"next",event_type:"click",module_id:301,metadata:{location:typeof globalThis!="undefined"&&globalThis.location?globalThis.location.pathname:""},tags:{section:"OraculoSeccionEventoEnVivo"}}),(c=d.current)==null||c.next()},S=()=>{C({element:"evento_en_vivo_view_more",label:`Landing: ${N} - OraculoSeccionEventoEnVivo - Ver más`,target:"ver_mas",event_type:"click",module_id:301,metadata:{location:typeof globalThis!="undefined"&&globalThis.location?globalThis.location.pathname:""},tags:{section:"OraculoSeccionEventoEnVivo"}}),va()},T=h.useCallback(async()=>{var c;try{if(!j.current){j.current=!0;try{const A=await(await fetch("https://api.mktolimpo.com/api/kambi/eventos/orden")).json(),G=((c=A==null?void 0:A.data)==null?void 0:c.event_ids)||[],V=new Map;G.forEach((W,Z)=>V.set(String(W),Z)),E.current=V}catch($){console.error("Order fetch failed, using default sorting",$)}}const p=await fetch(r);if(!p.ok)throw new Error("Failed to fetch live events");const y=await p.json(),k=Xa(y.events);if(E.current.size===0)i(k);else{const $=[...k].sort((A,G)=>{const V=E.current.get(String(A.event.id)),W=E.current.get(String(G.event.id));return(V!==void 0?V:1/0)-(W!==void 0?W:1/0)});i($)}}catch(p){console.error("LoadData Error:",p)}},[]);h.useEffect(()=>{T();const c=setInterval(T,2e4);return()=>clearInterval(c)},[T]),h.useEffect(()=>{if(M.start===null||M.end===null||!(x!=null&&x.length)||I.current)return;const c=3,p=Math.max(0,M.start-c),y=Math.min(x.length-1,M.end+c),k=x.slice(p,y+1).map($=>{var A;return(A=$==null?void 0:$.event)==null?void 0:A.id}).filter($=>$&&!w.current.has($));k.length!==0&&(k.forEach($=>w.current.add($)),I.current=!0,at(k).then($=>{$!=null&&$.events&&u(A=>({...A,...$.events}))}).catch($=>{console.error("Jersey fetch error",$),k.forEach(A=>w.current.delete(A))}).finally(()=>{I.current=!1}))},[M,x]);const F=s||void 0,g=x===null;if(!g&&x.length===0)return null;const l=h.useMemo(()=>g?Array(4).fill({}):(x==null?void 0:x.slice(0,20))||[],[g,x]);return e.jsx("section",{className:F,style:{width:"100%",boxSizing:"border-box"},children:e.jsxs(z.default,{direction:"column",spacing:1.5,useFlexGap:!0,children:[e.jsx("div",{className:Ja.padding,children:e.jsxs(J,{spacing:1.5,columns:"1fr auto ",justify:"start",children:[e.jsx(te,{title:a,iconUrl:n,size:"md"}),e.jsxs("div",{style:{display:"flex",gap:8,alignItems:"center"},children:[e.jsxs(J,{spacing:1,columns:"auto auto",children:[e.jsx(D,{ariaLabel:"Anterior",variant:"secondary",iconOnly:!0,leftIcon:e.jsx(oe.ChevronLeftRounded,{}),onClick:L,disabled:f.isStart}),e.jsx(D,{ariaLabel:"Siguiente",variant:"secondary",iconOnly:!0,rightIcon:e.jsx(oe.ChevronRightRounded,{}),onClick:P,disabled:f.isEnd})]}),e.jsx(D,{variant:"secondary",onClick:S,children:"Ver más"})]})]})}),e.jsx(ae,{ref:d,items:l,perPage:void 0,showRightGradient:!0,enableHorizontalWheel:!0,gap:"16px",options:{autoWidth:!0,trimSpace:"move"},breakpoints:{400:{gap:"4px",focus:"center",padding:{left:"24px",right:"24px"}},768:{gap:"8px",focus:"center",padding:{left:"24px",right:"24px"}},1024:{gap:"10px",focus:"center",padding:{left:"24px",right:"24px"}}},renderItem:c=>{var k;const p=((k=c.event)==null?void 0:k.id)||c.eventId,y=p in m?m[p]:void 0;return g?e.jsx(ye,{children:e.jsx(Ga,{})}):e.jsx(ye,{children:e.jsx(Ya,{...c,jersey:y})})},onMove:({isStart:c,isEnd:p,visibleStart:y,visibleEnd:k})=>{b($=>$.isStart===c&&$.isEnd===p?$:{isStart:c,isEnd:p}),v({start:y,end:k})}})]})})}function Qa(){return e.jsxs("div",{className:se.cardContainer,children:[e.jsx(Me,{title:""}),e.jsx("div",{className:se.cardBackground,children:e.jsxs(z.default,{direction:"column",spacing:{xs:.5,md:1},useFlexGap:!0,children:[e.jsxs(z.default,{spacing:8,direction:"row",justifyContent:"center",alignItems:"center",children:[e.jsx(q.default,{variant:"circular",width:48,height:48}),e.jsx(q.default,{variant:"circular",width:48,height:48})]}),e.jsxs(z.default,{direction:"column",spacing:{xs:.5,md:1},useFlexGap:!0,children:[e.jsxs(z.default,{spacing:8,direction:"row",justifyContent:"center",alignItems:"center",children:[e.jsx(q.default,{variant:"text",width:80,height:12}),e.jsx(q.default,{variant:"text",width:80,height:12})]}),e.jsx(z.default,{spacing:8,direction:"row",justifyContent:"center",alignItems:"center",children:e.jsx(q.default,{variant:"text",width:160,height:12})}),e.jsxs(z.default,{direction:"row",spacing:1,children:[e.jsx(q.default,{variant:"text",width:80,height:16}),e.jsx(q.default,{variant:"text",width:80,height:16}),e.jsx(q.default,{variant:"text",width:80,height:16})]}),e.jsx("div",{className:se.jugadas,children:e.jsxs(z.default,{direction:"row",spacing:1,children:[e.jsx(q.default,{variant:"rounded",width:80,height:32}),e.jsx(q.default,{variant:"rounded",width:80,height:32}),e.jsx(q.default,{variant:"rounded",width:80,height:32})]})})]})]})})]})}const en="oraculo__OraculoSeccionEventoSemana-module__wrapper___eqVq-",tn="oraculo__OraculoSeccionEventoSemana-module__container___5yFQs",an="oraculo__OraculoSeccionEventoSemana-module__buttonWrapper___-6IDT",nn="oraculo__OraculoSeccionEventoSemana-module__padding___vfUcV",he={wrapper:en,container:tn,buttonWrapper:an,padding:nn},on=re.default.memo(rt);async function sn(t,a=2,n){const o=[];for(let s=0;s<t.length;s+=a){if(n.aborted)throw new DOMException("Aborted","AbortError");const r=t.slice(s,s+a),d=await Promise.all(r.map(f=>fetch(f,{signal:n}).then(b=>b.json())));o.push(...d)}return o}function rn(t){return[...t].sort((a,n)=>new Date(a.start).getTime()-new Date(n.start).getTime())}function ln(t){const a=new Date,n=new Date(a.getTime()+480*60*60*1e3);return t.filter(o=>{if(!o.start)return!1;const s=new Date(o.start);return s>=a&&s<=n})}function cn(t,a){const o=a.filter(s=>{var r;return((r=s.betOfferType)==null?void 0:r.id)===2}).reduce((s,r)=>(s[r.eventId]||(s[r.eventId]=[]),s[r.eventId].push(r),s),{});return t.filter(s=>o[s.id]).map(s=>({...s,outcome:o[s.id]}))}function vt({items:t,title:a="En vivo",iconUrl:n,onViewMore:o,className:s=""}){const r=H.useCaptureInteraction(),d=K(),f="https://us1.offering-api.kambicdn.com/offering/v2018/nexuspe/group.json?channel_id=1&client_id=200&lang=es_PE&market=PE",b=h.useRef(null),[x,i]=h.useState({isStart:!0,isEnd:!1}),[m,u]=h.useState(null);h.useRef(new Set);const[_,v]=h.useState({}),[I,O]=h.useState({start:null,end:null}),B="channel_id=1&client_id=200&competitionId=undefined&lang=es_PE&market=PE&useCombined=true",j=nt(I,250),C=h.useRef(!1);h.useMemo(()=>m===null?Array(6).fill({}):m.slice(0,20),[m]);const N=()=>{r({element:"evento_semana_view_more",label:`Landing: ${d} - OraculoSeccionEventoSemana - Ver más`,target:"ver_mas",event_type:"click",module_id:301,metadata:{location:typeof globalThis!="undefined"&&globalThis.location?globalThis.location.pathname:""},tags:{section:"OraculoSeccionEventoSemana"}}),_a()};async function E(S){var g,l;let T=[],F=[];try{const c=await fetch("https://api.mktolimpo.com/api/kambi/eventos/orden",{signal:S});if(c.ok){const p=await c.json();T=((g=p==null?void 0:p.data)==null?void 0:g.group_ids)||[],F=((l=p==null?void 0:p.data)==null?void 0:l.event_ids)||[]}}catch(c){c.name!=="AbortError"&&console.warn("Order API not available, using default group order");return}try{const y=(await(await fetch(f,{signal:S})).json()).group.groups.find(W=>W.englishName==="Football");if(!y||!Array.isArray(y.groups)){console.error("Football groups not found");return}let k=[...y.groups];if(T.length>0){const W=new Map(T.map((Z,ne)=>[Z,ne]));k.sort((Z,ne)=>{const me=W.get(String(Z.id)),le=W.get(String(ne.id));return me!==void 0&&le!==void 0?me-le:me!==void 0?-1:le!==void 0?1:0})}const A=k.slice(0,5),G=W=>{const Z="https://us1.offering-api.kambicdn.com/offering/v2018/nexuspe/listView/football";if(W.groups&&W.groups.length>0){const ne=W.groups[0];return[`${Z}/${W.termKey}/${ne.termKey}/all/matches.json?${B}`]}return[`${Z}/${W.termKey}/all/all/matches.json?${B}`]},V=A.flatMap(G);M(V,F,S)}catch(c){console.error(c)}}async function M(S,T,F){try{const g=await sn(S,2,F);let l=[],c=[];g.forEach($=>{$.events&&(l.push(...$.events.map(A=>A.event)),c.push(...$.events.flatMap(A=>A.betOffers||[])))});const p=cn(l,c),y=rn(ln(p));let k=y;if(T.length>0){const $=new Map(T.map((A,G)=>[String(A),G]));k=[...y].sort((A,G)=>{const V=$.get(String(A.id)),W=$.get(String(G.id));return V!==void 0&&W!==void 0?V-W:V!==void 0?-1:W!==void 0?1:0})}if(F.aborted)return;u(k)}catch(g){console.error("Error loading events:",g)}}h.useEffect(()=>{if(!t)return;const S=new AbortController;return E(S.signal),()=>{S.abort()}},[t]),h.useEffect(()=>{if(j.start===null||j.end===null||!(m!=null&&m.length)||C.current)return;const S=2,T=Math.max(0,j.start-S),F=Math.min(m.length-1,j.end+S),g=m.slice(T,F+1).map(c=>c==null?void 0:c.id).filter(Boolean).filter(c=>_[c]===void 0);if(!g.length)return;let l=!1;return C.current=!0,(async()=>{try{const c=await at(g);l||v(p=>({...p,...c.events}))}catch(c){console.error("Jersey fetch error",c)}finally{C.current=!1}})(),()=>{l=!0}},[j,m]);const w=s||void 0,L={paddingLeft:0,width:"100%",boxSizing:"border-box"},P=m===null;return!P&&m.length===0?null:e.jsx("section",{className:w,style:L,children:e.jsxs("div",{className:`${he.wrapper} ${he.padding}`,children:[e.jsx("div",{className:he.container,children:e.jsxs(z.default,{direction:"column",spacing:1.5,useFlexGap:!0,children:[e.jsx(te,{title:"Eventos de la semana"}),e.jsx("div",{className:he.buttonWrapper,children:e.jsx(D,{variant:"secondary",size:"lg",fullWidth:!0,onClick:()=>{N()},children:"Ver más"})})]})}),e.jsx("div",{style:{minWidth:"180px"},children:e.jsx(ae,{ref:b,items:P?Array(6).fill({}):m.slice(0,20),perPage:3.5,gap:"16px",enableHorizontalWheel:!0,showRightGradient:!0,options:{autoWidth:!0,trimSpace:!0},breakpoints:{1024:{perPage:1.4,gap:"8px",focus:"center",padding:{left:"8px",right:"8px"}}},renderItem:S=>{const T=S.id,F=T in _?_[T]:void 0;return P?e.jsx(ye,{children:e.jsx(Qa,{})}):e.jsx(ye,{children:e.jsx(on,{event:S,jersey:F})})},onMove:({isStart:S,isEnd:T,visibleStart:F,visibleEnd:g})=>{i({isStart:S,isEnd:T}),O({start:F,end:g}),r({element:"evento_semana_carousel_slide",label:`Landing: ${d} - OraculoSeccionEventoSemana - Slide Carousel`,target:"carousel",event_type:"slide",module_id:301,metadata:{location:typeof globalThis!="undefined"&&globalThis.location?globalThis.location.pathname:"",visibleStart:F,visibleEnd:g,isStart:S,isEnd:T},tags:{section:"OraculoSeccionEventoSemana"}})}})})]})})}function _t({backgrounds:t,items:a,hideItems:n}){var T,F,g;const[o,s]=h.useState(0),r=H.useCaptureInteraction(),d=K(),f=h.useRef(null),b=h.useRef(!1),x=h.useRef(!1),i=(t==null?void 0:t.length)||1,m=!t||t.length===0,u=!m&&((T=t==null?void 0:t.length)!=null?T:0)>1,_=!n&&((F=a==null?void 0:a.length)!=null?F:0)>0,v="#B5B5B5",I={position:"absolute",top:"50%",transform:"translateY(-50%)",zIndex:5,width:48,height:40,borderRadius:"12px",border:`1.5px solid ${v}`,py:1,px:1.5,color:v,backgroundColor:"transparent","&:hover":{backgroundColor:"rgba(181,181,181,0.08)"},"&.Mui-disabled":{opacity:.35,borderColor:v,color:v,backgroundColor:"transparent",cursor:"default"}},O=h.useMemo(()=>({type:"loop",perMove:1,pagination:!1,arrows:!1,drag:!0,focus:"center"}),[]);h.useEffect(()=>{const l=setTimeout(()=>{b.current=!0},500);return()=>clearTimeout(l)},[]);const B=(l,c)=>{var y,k;const p=((k=(y=l.href)==null?void 0:y.split("/").pop())==null?void 0:k.split(".")[0])||l.label||l.id||`banner_${c+1}`;r({element:"banner_carousel",label:`Landing: ${d} - OraculoSeccionBanners - Banner click: ${p}`,target:l.href||"no_url",event_type:"click",module_id:301,metadata:{location:typeof globalThis!="undefined"&&globalThis.location?globalThis.location.pathname:"",banner_position:c+1,banner_total:(t==null?void 0:t.length)||0},tags:{banner_type:"carousel",banner_target:"_self",banner_url:l.href||"no_url"}})},j=l=>{if(r({element:"banner_menu_item",label:`Landing: ${d} - OraculoSeccionBanners - Menu item click: ${l.label||l.id}`,target:l.href||"action",event_type:"click",module_id:301,metadata:{location:typeof globalThis!="undefined"&&globalThis.location?globalThis.location.pathname:"",item_id:l.id},tags:{item_label:l.label||"no_label"}}),l.onClick){l.onClick();return}l.href&&typeof globalThis!="undefined"&&globalThis.location&&globalThis.location.assign(l.href)},C=5e3,N=h.useRef(null),E=!m&&((g=t==null?void 0:t.length)!=null?g:0)>1,M=()=>{N.current!=null&&(window.clearTimeout(N.current),N.current=null)},w=()=>{M(),E&&(N.current=window.setTimeout(()=>{var l;x.current=!0,(l=f.current)==null||l.next()},C))};h.useEffect(()=>(w(),()=>M()),[E,C]);const L=l=>{var c;l.preventDefault(),l.stopPropagation(),M(),(c=f.current)==null||c.prev()},P=l=>{var c;l.preventDefault(),l.stopPropagation(),M(),(c=f.current)==null||c.next()},S=l=>{var y,k,$,A;const c=(l%i+i)%i;if(!b.current)return;const p=(y=t==null?void 0:t[c])!=null&&y.href?(($=(k=t[c].href)==null?void 0:k.split("/").pop())==null?void 0:$.split(".")[0])||`banner_${c+1}`:`banner_${c+1}`;r({element:"banner_carousel",label:`Landing: ${d} - OraculoSeccionBanners - Banner view: Slide ${c+1} - ${p}`,target:((A=t==null?void 0:t[c])==null?void 0:A.href)||"no_url",event_type:"view",module_id:301,metadata:{location:typeof globalThis!="undefined"&&globalThis.location?globalThis.location.pathname:"",slide_index:c+1,total_slides:i,interaction_type:"manual_slide"},tags:{banner_position:String(c+1)}})};return e.jsxs(U.Box,{component:"section",sx:{position:"relative",overflow:"visible"},children:[e.jsxs(U.Box,{sx:{position:"relative",borderRadius:0,overflow:"hidden",width:"100%",height:{xs:300,sm:360},"@media (min-width:800px)":{height:"auto",aspectRatio:"1920 / 460"}},children:[e.jsx(U.Box,{sx:{height:"100%","& .splide, & .splide__track, & .splide__list":{height:"100%"},"& .splide__slide":{height:"100%",position:"relative"}},children:e.jsx(ae,{ref:f,items:t,perPage:1,gap:"0px",enableHorizontalWheel:!0,options:O,onMove:({index:l})=>{const c=(l%i+i)%i;s(c);const p=x.current;x.current=!1,w(),p||S(l)},renderItem:(l,c)=>{var p,y;return e.jsxs(U.Box,{component:"a",href:l.href,target:(p=l.target)!=null?p:"_self",rel:l.target==="_blank"?"noopener noreferrer":void 0,onClick:()=>B(l,c),sx:{position:"relative",width:"100%",height:"100%",display:"block",textDecoration:"none",cursor:"pointer"},children:[e.jsxs(U.Box,{component:"picture",sx:{position:"absolute",inset:0,lineHeight:0},children:[e.jsx("source",{srcSet:l.desktopSrc,media:"(min-width:800px)"}),e.jsx("source",{srcSet:l.mobileSrc,media:"(max-width:799px)"}),e.jsx(U.Box,{component:"img",src:(y=l.fallbackSrc)!=null?y:l.desktopSrc,alt:"","aria-hidden":!0,loading:"lazy",sx:{width:"100%",height:"100%",objectFit:"cover",display:"block"}})]}),e.jsx(U.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%)"}}})]})}})}),u&&e.jsxs(e.Fragment,{children:[e.jsx(U.IconButton,{"aria-label":"Anterior",onClick:L,sx:{...I,left:"120px","@media (max-width:1024px)":{left:24},"@media (max-width:786px)":{display:"none"}},children:e.jsx(oe.ChevronLeftRounded,{})}),e.jsx(U.IconButton,{"aria-label":"Siguiente",onClick:P,sx:{...I,right:"120px","@media (max-width:1024px)":{right:24},"@media (max-width:786px)":{display:"none"}},children:e.jsx(oe.ChevronRightRounded,{})})]}),e.jsx(U.Box,{sx:{position:"absolute",left:0,right:0,bottom:72,display:"flex",justifyContent:"center",zIndex:2},children:e.jsx(ke,{total:i,active:o,durationMs:C},`${o}-${i}`)})]}),_&&e.jsx(U.Box,{sx:{position:"absolute",bottom:{xs:-12,sm:0},left:120,right:120,"@media (max-width:1024px)":{left:24,right:24},backgroundColor:"#363636",borderRadius:2,p:1.5,display:"flex",justifyContent:"space-around",alignItems:"center",boxShadow:"0 10px 24px rgba(0,0,0,.35)",zIndex:3},children:a==null?void 0:a.map(l=>e.jsxs(U.Box,{sx:{display:"flex",flexDirection:{xs:"column",md:"row"},alignItems:"center",justifyContent:"center",gap:{xs:.5,md:1},color:"#FFFFFF",minWidth:0,cursor:l.onClick||l.href?"pointer":"default",whiteSpace:"nowrap"},onClick:()=>j(l),children:[l.icon&&e.jsx(U.Box,{component:"img",src:l.icon,alt:l.label||`icon-${l.id}`,sx:{width:{xs:20,sm:22,md:24},height:{xs:20,sm:22,md:24},objectFit:"contain"}}),e.jsx(U.Typography,{sx:{fontSize:{xs:10,sm:11,md:12},fontWeight:600,color:"#E0E0E0",textAlign:"center"},children:l.label})]},l.id))})]})}const dn=[{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/BCP.png",alt:"BCP"},{src:"https://stg-www.contodobet.com/static/img/landing/MediosPago/pagoEfectivo.png",alt:"PagoEfectivo"},{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 yt({title:t="Medios de pago",items:a=dn}){const n=Math.ceil(a.length/2),o=a.slice(0,n),s=a.slice(n);return e.jsxs(U.Box,{component:"section","aria-labelledby":"mp-title",sx:{color:"#fff"},children:[e.jsx(U.Typography,{id:"mp-title",variant:"h6",sx:{fontWeight:800,fontSize:{xs:20,md:32},textAlign:"center",mb:1.5},children:t}),e.jsx(U.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.jsxs(U.Stack,{spacing:{xs:2,md:3},alignItems:"center",children:[e.jsx(U.Stack,{direction:"row",justifyContent:"center",alignItems:"center",gap:{xs:2,md:3},flexWrap:"wrap",children:o.map((r,d)=>e.jsx(Ie,{...r},`${r.alt}-${r.src}-${d}`))}),e.jsx(U.Stack,{direction:"row",justifyContent:"center",alignItems:"center",gap:{xs:2,md:3},flexWrap:"wrap",children:s.map((r,d)=>e.jsx(Ie,{...r},`${r.alt}-${r.src}-${d}`))})]})]})}function we({children:t}){const a=Se.useTheme(),n=re.default.useMemo(()=>Se.createTheme(a,{typography:{fontFamily:"var(--orc-font)"},components:{MuiTypography:{styleOverrides:{root:{fontFamily:"var(--orc-font)"}}}}}),[a]);return e.jsxs(Se.ThemeProvider,{theme:n,children:[e.jsx(Mt.default,{}),t]})}function un({docId:t="home",children:a}){return e.jsx(we,{children:e.jsx(ve,{docId:t,children:a})})}const mn={OraculoSeccionDestacados:lt,OraculoSeccionTopJuegos:Le,OraculoSeccionCasinoEnVivo:dt,OraculoSeccionCasino:mt,OraculoSeccionVirtuales:ft,OraculoSeccionClubOlimpo:ht,OraculoSeccionBonoBienvenida:gt,OraculoSeccionBanners:_t,OraculoSeccionMediosPago:yt,OraculoSeccionEventoEnVivo:xt,OraculoSeccionEventoSemana:vt,OraculoSeccionEventoCombinadas:bt},De={sections:[{variableName2:"backgrounds",updatedAt:"2026-01-22T04:11:09.501Z",variableName:"items",dataMode:"manual",title:"Banners",visible:!0,id:9,manualItems:[{id:"724a1dc0-d55b-4443-a580-cad22e328536",fields:[{type:"string",id:"abb2c3d6-d5c5-47ee-8ffa-c764a8bc731e",isImage:!1,required:!0,value:"1",name:"id"},{name:"label",isImage:!1,value:"POR INICIAR",required:!1,id:"549c02bf-56b5-4652-93d9-46b9451bac39",type:"string"},{type:"string",id:"c6538242-1974-4bed-aed3-703a111987b5",maxSizeMB:.2,required:!0,isImage:!0,value:"https://stg-www.contodobet.com/static/img/landing/Banner/clock.svg",name:"icon"},{id:"7d564f31-69ff-4f32-983b-46d28ced4a18",type:"string",required:!1,value:"https://www.olimpo.bet/deportes#starting-soon",isImage:!1,name:"href"}]},{fields:[{type:"string",isImage:!1,id:"45c50e08-560e-42cb-8be1-e9722f69c8a0",required:!0,name:"id",value:"2"},{type:"string",name:"label",isImage:!1,value:"EXPLORAR",required:!1,id:"2eec0f3d-0126-4960-8ec0-17cc92b5eb43"},{maxSizeMB:.2,isImage:!0,required:!0,value:"https://stg-www.contodobet.com/static/img/landing/Banner/icon2.svg",id:"5530e6bd-d2b2-4045-9371-722e23d96e14",type:"string",name:"icon"},{id:"7e5375ad-ecbb-4354-868a-b9323bcfd053",required:!1,name:"href",isImage:!1,type:"string",value:"https://www.olimpo.bet/deportes#sports/a-z"}],id:"ad0df0e2-c8ce-4524-b05a-2a29578aba11"},{id:"966bc1fc-0b1a-4a50-a4a2-964262922c3d",fields:[{isImage:!1,required:!0,id:"fc35f393-6692-4d25-a534-d51f4bd6d9a2",value:"3",name:"id",type:"string"},{isImage:!1,name:"label",value:"TOP JUEGOS",id:"a323e324-cf04-4178-b2c2-596d51564123",type:"string",required:!1},{type:"string",name:"icon",maxSizeMB:.2,value:"https://imagenesolimpo.s3.us-east-1.amazonaws.com/landing/1765981473501-icon3.svg",id:"6ede5815-7336-40fa-99f2-57ac6cb938cd",required:!0,isImage:!0},{required:!1,id:"26a486fd-31e6-4ed4-ab83-0f9a7bf6adc4",value:"https://www.olimpo.bet/casino",isImage:!1,name:"href",type:"string"}]},{id:"31e00ff9-f2dd-4942-bff3-919902fde880",fields:[{id:"fbec2c21-cf32-426f-910b-9c78a6cd714c",required:!0,isImage:!1,value:"4",name:"id",type:"string"},{isImage:!1,name:"label",type:"string",value:"MISIONES",required:!1,id:"2de80dbf-998b-4bc7-8383-4b69746ef155"},{type:"string",id:"686c62bd-ea86-4aeb-97b7-6f1488912066",required:!0,isImage:!0,maxSizeMB:.2,value:"https://stg-www.contodobet.com/static/img/landing/Banner/icon3.svg",name:"icon"},{id:"4b72f490-75e4-458e-a4b5-68f0736a25d4",isImage:!1,required:!1,type:"string",value:"https://www.olimpo.bet/private/misiones",name:"href"}]}],manualScalarFields:[{id:"7ee165a0-1268-4825-82df-9fef9857f535",type:"string",isImage:!1,value:"",required:!1,name:"groups"}],order:1,manualItems2:[{id:"13b35362-5695-4687-b6a8-645f8effd264",fields:[{isImage:!0,name:"desktopSrc",id:"eea41214-3c26-41e9-a908-d87327147396",maxSizeMB:2,type:"string",value:"https://imagenesolimpo.s3.us-east-1.amazonaws.com/landing/1768333229541-banner032.webp",required:!1},{maxSizeMB:2,isImage:!0,type:"string",name:"mobileSrc",id:"b393dfd3-c085-43e0-b68a-97cc04c06b6a",value:"https://stg-www.contodobet.com/static/img/landing/Banner/FondoMisiones.png",required:!1},{maxSizeMB:2,id:"2616b944-7cd1-4919-bc56-38ddb1a3093b",value:"https://stg-www.contodobet.com/static/img/landing/Banner/FondoMisiones.png",isImage:!0,name:"fallbackSrc",type:"string",required:!1},{name:"href",id:"54689f0e-f698-48a1-9d84-d13a397e24ea",required:!1,value:"",type:"string",isImage:!1}]},{id:"024f8130-91e1-4296-b826-cffa32ab1a96",fields:[{maxSizeMB:2,isImage:!0,value:"https://imagenesolimpo.s3.us-east-1.amazonaws.com/landing/1768852295069-ftd_web_captacion60.jpg",name:"desktopSrc",type:"string",required:!1,id:"1ebab59e-f706-4795-81cb-7accfc9f33d7"},{id:"bdebd1b0-d633-4b9e-9247-8e769cdc5b3b",type:"string",isImage:!0,required:!1,value:"https://imagenesolimpo.s3.us-east-1.amazonaws.com/landing/1768852302781-ftd_mobile_captacion60.jpg",maxSizeMB:2,name:"mobileSrc"},{isImage:!0,maxSizeMB:2,value:"https://imagenesolimpo.s3.us-east-1.amazonaws.com/landing/1768852309554-ftd_web_captacion60.jpg",id:"4bc20da7-b769-43dd-ba2e-ee9261ec73d7",name:"fallbackSrc",type:"string",required:!1},{id:"b85e737d-97ec-430c-b819-ba6e91a25372",type:"string",isImage:!1,required:!1,value:"",name:"href"}]},{id:"cbd24716-9770-418f-aa87-ae60e7e9e0ee",fields:[{maxSizeMB:2,required:!1,name:"desktopSrc",type:"string",value:"https://imagenesolimpo.s3.us-east-1.amazonaws.com/landing/1768831142801-ftd_web_tenismasters.jpg",id:"fa31486e-ec9b-4c99-b870-396d25bc66d6",isImage:!0},{isImage:!0,name:"mobileSrc",id:"954a4363-1373-44f2-b677-1bea66882838",maxSizeMB:2,type:"string",value:"https://imagenesolimpo.s3.us-east-1.amazonaws.com/landing/1768831155101-ftd_mobile_tenismasters.jpg",required:!1},{required:!1,type:"string",id:"be8789e8-cbf6-49c1-9ae5-ebc958404369",maxSizeMB:2,name:"fallbackSrc",isImage:!0,value:"https://imagenesolimpo.s3.us-east-1.amazonaws.com/landing/1768831198671-ftd_web_tenismasters.jpg"},{value:"https://www.olimpo.bet/torneos/Torneo_Olimpo_Tennis",type:"string",required:!1,isImage:!1,id:"142b0cb2-e255-4240-aea1-807a67321e34",name:"href"}]},{fields:[{required:!1,isImage:!0,id:"4414dbe4-67b3-428c-9d9d-920fff30956a",value:"https://imagenesolimpo.s3.us-east-1.amazonaws.com/landing/1768831210432-ftd_web_verano.jpg",type:"string",maxSizeMB:2,name:"desktopSrc"},{required:!1,isImage:!0,id:"b74d7582-94be-4608-8cdc-e6f8cab3e115",name:"mobileSrc",type:"string",value:"https://imagenesolimpo.s3.us-east-1.amazonaws.com/landing/1768831218073-ftd_mobile_verano.jpg",maxSizeMB:2},{id:"ada12745-3851-4a86-912c-2c9ec7c3e5de",maxSizeMB:2,value:"https://imagenesolimpo.s3.us-east-1.amazonaws.com/landing/1768831228250-ftd_web_verano.jpg",name:"fallbackSrc",type:"string",required:!1,isImage:!0},{value:"https://www.olimpo.bet/torneos/Endorphina_09012026_Casino",isImage:!1,required:!1,name:"href",type:"string",id:"e23e8b63-0ca4-436f-b53a-1bdf8d6442a6"}],id:"0d5ffdb1-d55f-47b6-9e61-e6b571bf2db2"},{id:"cf073698-ff54-4a9e-9c4f-c34b6987e8b5",fields:[{type:"string",isImage:!0,required:!1,value:"https://imagenesolimpo.s3.us-east-1.amazonaws.com/landing/1768831260900-ftd_web_virtuales.jpg",maxSizeMB:2,name:"desktopSrc",id:"1a1ef092-aff6-49c5-81be-7d76c6ac94e1"},{required:!1,value:"https://imagenesolimpo.s3.us-east-1.amazonaws.com/landing/1768831267161-ftd_mobile_virtuales.jpg",isImage:!0,type:"string",maxSizeMB:2,name:"mobileSrc",id:"901cc080-4907-47a8-8b2e-73a7b9fc27a3"},{type:"string",name:"fallbackSrc",isImage:!0,id:"8f97418b-6f27-4231-b6f8-e01e1d3c94f8",maxSizeMB:2,value:"https://imagenesolimpo.s3.us-east-1.amazonaws.com/landing/1768831274473-ftd_web_virtuales.jpg",required:!1},{type:"string",value:"https://www.olimpo.bet/torneos/Torneo_Lo_Mejor_De_Virtuales",required:!1,name:"href",isImage:!1,id:"a140f16d-8af9-474a-a77c-6ddc1651b3e5"}]}],componentKey:"OraculoSeccionBanners"},{visible:!0,dataMode:"url",apiUrl:"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%22",variableName:"items",apiParams:[],id:2,componentKey:"OraculoSeccionEventoEnVivo",order:2,manualScalarFields:[{isUrl:!1,id:"7fc591db-555b-49b2-a3ad-30aa66eff17b",required:!0,name:"title",type:"string",value:"En vivo"},{type:"string",value:"https://stg-www.contodobet.com/assets/img/home/EnVivo/icon.svg",name:"iconUrl",isUrl:!0,required:!1,id:"db4b6355-ed6c-4265-ad78-d8fffb660997"},{required:!1,value:"",type:"function",id:"e4647a65-2e60-4243-bab4-25b7ba8461f8",isUrl:!1,name:"onViewMore"},{id:"a16ab6c6-321c-4ebe-bd36-a85ad49edf3e",type:"string",isUrl:!1,required:!1,value:"",name:"className"}],title:"Eventos en vivo",apiMethod:"GET",updatedAt:"2026-01-22T04:11:09.501Z"},{visible:!0,manualScalarFields:[{name:"title",required:!0,value:"Casino",id:"c2046b5a-4d30-46ff-9513-e15a6e0b0a7e",isImage:!1,type:"string"},{required:!0,type:"string",maxSizeMB:.2,name:"iconUrl",isImage:!0,value:"https://stg-www.contodobet.com/static/img/landing/Casino/diamante.svg",id:"9c5964ca-ce84-4c47-86ec-b34d7f3a5793"},{id:"1c32ea69-598b-4f80-81e4-709d887c12c1",value:"true",name:"mosaicFirst",required:!1,type:"boolean",isImage:!1},{value:"4",type:"number",required:!1,name:"gridSize",id:"5c3c60eb-cf49-4083-ab83-67d65f829554",isImage:!1},{value:"",name:"groups",isImage:!1,id:"c4d4c4b9-0c93-4aca-a61f-042e52fd9254",required:!1,type:"string"}],variableName:"items",componentKey:"OraculoSeccionCasino",order:3,apiUrl:"https://wallet-pe.olimpo.bet/api/contents/getLobby",apiParams:[{value:"OLI",key:"company",id:"2af22a50-07e2-4a48-8569-90c79827f3e7"},{key:"lobby",id:"efa2def8-eeb4-4fcc-80f6-32c24e7804e6",value:"HOME_CASINO"}],id:4,updatedAt:"2026-01-22T04:11:09.501Z",apiMethod:"GET",dataMode:"url",title:"Casino"},{title:"Eventos Combinadas",id:1,updatedAt:"2026-01-22T04:11:09.501Z",apiParams:[],apiMethod:"GET",order:4,apiUrl:"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",manualScalarFields:[{required:!0,id:"33e5944d-b5be-4971-8c10-65aa6b71051c",name:"title",type:"string",value:"Combinadas",isImage:!1},{id:"95cd1489-206c-4a72-b4bd-b65161089f73",isImage:!0,name:"iconUrl",value:"https://imagenesolimpo.s3.us-east-1.amazonaws.com/landing/1765894618836-frame181009.svg",type:"string",dimensions:"40x40",required:!1,maxSizeMB:.2},{name:"className",value:"",id:"af234a92-41ad-4ff1-bfbb-ac63a9af19f7",type:"string",isImage:!1,required:!1},{value:"",required:!1,name:"groups",isImage:!1,id:"52f226c8-6456-4395-b72d-d140af6fa46d",type:"string"}],dataMode:"url",variableName:"items",visible:!0,componentKey:"OraculoSeccionEventoCombinadas"},{updatedAt:"2026-01-22T04:11:09.501Z",apiUrl:"https://us1.offering-api.kambicdn.com/coupon/v2018/nexuspe/coupon/3935.json?lang=es_PE&market=PE&client_id=200&channel_id=1&ncid=1764401676636&startTime=2025-11-29T06:00:00.000Z&endTime=2026-06-25T15:00:00.000Z&minNoOfEvents=0&maxNoOfEvents=25&categoryGroup=list_view_competitions",dataMode:"url",title:"Eventos de la semana",order:5,apiParams:[],variableName:"items",apiMethod:"GET",visible:!0,id:3,componentKey:"OraculoSeccionEventoSemana",manualScalarFields:[{id:"7a3de844-5727-4043-be42-7f965e2aa249",isUrl:!1,value:"Eventos esta semana",required:!1,name:"title",type:"string"},{value:"",isUrl:!0,required:!1,id:"2895f65f-e75b-4116-958d-04d4c34f16fe",name:"iconUrl",type:"string"},{type:"function",required:!1,value:"",id:"d973d3ee-721e-4d76-888c-6ad8b7bb3414",isUrl:!1,name:"onViewMore"},{required:!1,type:"string",value:"",name:"className",id:"c062fe02-c069-49fb-aae6-d39aa3fde89c",isUrl:!1}]},{componentKey:"OraculoSeccionBonoBienvenida",visible:!1,order:6,manualScalarFields:[{id:"fec2252c-2c2d-448d-8775-9d073bd8def9",value:"Te damos la",name:"headline",type:"string",required:!1,isUrl:!1},{name:"headline2",required:!1,id:"17e045d1-8ddb-46bc-b3ae-ae0c7ffc5952",isUrl:!1,value:"bienvenida al club",type:"string"},{type:"string",required:!1,isUrl:!0,name:"backgroundImageUrl",value:"https://stg-www.contodobet.com/static/img/landing/Bonos/Fondobg.png",id:"cae601b0-ed5d-4b97-9e1f-1816d7986c6b"}],variableName:"items",title:"Bono Bienvenida",updatedAt:"2026-01-22T04:11:09.501Z",manualItems:[{id:"8677b338-7d12-4ba9-a95f-d34ed71d92b0",fields:[{value:"Recibe",type:"string",name:"title",isUrl:!1,required:!0,id:"e015fc5e-983e-4096-b82e-6d5ed9957dd5"},{value:"S/60",required:!1,name:"amount",type:"string",id:"00b69888-d8ee-4bae-943c-be4e0dead26b",isUrl:!1},{name:"subtitle",required:!1,isUrl:!1,id:"376cd731-4a20-4435-a5ee-351ac55d4351",value:"SIN ROLLOVER",type:"string"},{value:"Hazlo aquí",name:"buttonText",required:!0,id:"3b73cff5-cb30-4b00-9b41-305455334e56",type:"string",isUrl:!1},{isUrl:!0,type:"string",required:!0,name:"backgroundImage",value:"https://stg-www.contodobet.com/static/img/landing/Bonos/Fondo.png",id:"89710b59-2a6a-4de8-be9a-7d9274bad84b"},{isUrl:!1,name:"onButtonClick",value:"window.location='https://www.olimpo.bet/promociones/Adq_Recibe30Flex_AAP100'",type:"function",required:!1,id:"e7ceaadc-b203-4587-856b-b9015201a43f"}]},{fields:[{id:"81e1730c-0f9b-4ab9-a4df-f36c974ae99d",required:!0,type:"string",name:"title",value:"Regístrate y recibe",isUrl:!1},{required:!1,value:"S/40",name:"amount",type:"string",isUrl:!1,id:"c1e96d9b-e7c7-4bb7-a8db-b67c32dcae32"},{required:!1,isUrl:!1,name:"subtitle",value:"SIN ROLLOVER",type:"string",id:"93242ead-5f09-4966-9484-471b27859c31"},{id:"0d97802b-7aaf-4ae3-b513-8a5a469e5d5d",value:"Hazlo aquí",name:"buttonText",type:"string",isUrl:!1,required:!0},{required:!0,isUrl:!0,id:"541fcdc8-07a7-47b8-9a33-d22cb865823c",name:"backgroundImage",value:"https://stg-www.contodobet.com/static/img/landing/Bonos/Fondo.png",type:"string"},{isUrl:!1,name:"onButtonClick",id:"b8c4b96c-0807-4040-8c3e-8392fb278aab",required:!1,type:"function",value:"window.location='https://www.olimpo.bet/promociones/Adq_Recibe30Flex_AAP100'"}],id:"6707ce1d-064a-43af-8679-712c7235873a"}],id:11,dataMode:"manual"},{dataMode:"url",componentKey:"OraculoSeccionCasinoEnVivo",order:7,title:"Casino en vivo",updatedAt:"2026-01-22T04:11:09.501Z",id:12,apiUrl:"https://wallet-pe.olimpo.bet/api/contents/getLobby",apiMethod:"POST",manualScalarFields:[{isImage:!1,value:"Casino en vivo",type:"string",name:"title",id:"52e655b4-7259-4f7f-9017-dafe24247810",required:!0},{required:!1,isImage:!1,id:"e299d500-abdc-4577-bb38-1943b6f02dfd",name:"subtitle",type:"string",value:"Disfruta la emoción en tus juegos favoritos y gana en tiempo real."},{isImage:!0,dimensions:"1080x1920",value:"https://stg-www.contodobet.com/static/img/landing/CasinoEnVivo/FondoMobile.png",name:"backgroundMobileUrl",required:!1,id:"6dcfd666-c2db-4a19-9fbf-08167bf56ae0",type:"string",maxSizeMB:2},{type:"string",maxSizeMB:2,name:"backgroundDesktopUrl",isImage:!0,id:"2aa55855-0865-4cf1-a1ee-e52db864c6b4",value:"https://stg-www.contodobet.com/static/img/landing/CasinoEnVivo/FondoDesktop.png",dimensions:"1920x1080",required:!1},{isImage:!1,name:"groups",type:"string",value:"",id:"e1599845-59d4-4320-903b-3857453b4322",required:!1}],variableName:"items",apiParams:[{key:"company",value:"OLI",id:"2822fa64-0e89-43ea-9c80-ee77076c95bd"},{key:"lobby",value:"HOME_CASINOENVIVO",id:"2d6f8267-0468-4320-976d-b01df40e8ca3"}],visible:!0},{order:8,title:"Oraculo Seccion Top Juegos",visible:!0,dataMode:"url",apiMethod:"GET",componentKey:"OraculoSeccionTopJuegos",updatedAt:"2026-01-22T04:11:09.501Z",manualScalarFields:[{isImage:!1,value:"Top juegos",type:"string",required:!0,name:"title",id:"a01c36e7-a551-4c92-89e0-e9eabcdbe344"},{required:!0,type:"string",id:"1960df1d-b07e-4461-b55f-39834ac30d8e",maxSizeMB:.2,value:"https://imagenesolimpo.s3.us-east-1.amazonaws.com/landing/1768597100868-virtuales.webp",isImage:!0,name:"iconUrl"},{value:"",name:"groups",isImage:!1,type:"string",id:"63dab0f6-b4d1-47af-b1e7-d3dcf4c69c4e",required:!1}],apiParams:[{id:"2bcfd8cd-8f1f-474f-beb4-170477acf9bd",value:"OLI",key:"company"},{id:"dac0b2d9-f00d-4979-9deb-31c6f66b1899",key:"lobby",value:"HOME_TOPJUEGOS"}],apiUrl:"https://wallet-pe.olimpo.bet/api/contents/getLobby",id:13,variableName:"items"},{apiMethod:"GET",componentKey:"OraculoSeccionDestacados",id:6,variableName:"items",title:'Promociones "Lo nuevo"',order:9,apiParams:[{id:"a2ee1b32-dc39-434f-9358-920e6c7bba0b",value:"OLI",key:"company"},{id:"16715513-30a1-4955-8e94-a4deee4722ba",value:"DESTACADOS",key:"lobby"}],dataMode:"url",updatedAt:"2026-01-22T04:11:09.501Z",apiUrl:"https://wallet-pe.olimpo.bet/api/contents/getPromotionsLobby",manualScalarFields:[{id:"f131acc5-a298-4583-9952-c0747dc1f1af",name:"title",type:"string",value:"Lo nuevo",required:!0,isImage:!1},{id:"8f0dadc8-ff0f-4074-870f-2bbcd9f38cab",required:!0,name:"iconUrl",type:"string",maxSizeMB:.2,dimensions:"40x40",value:"https://stg-www.contodobet.com/static/img/landing/Destacados/starIcon.svg",isImage:!0},{isImage:!1,type:"string",name:"className",value:"",required:!1,id:"39cd368d-0003-4145-88a9-f22b1a4ef32b"},{isImage:!1,type:"string",value:"",name:"groups",required:!1,id:"a9e218fd-9cc6-432f-a7bf-c119581e6927"}],visible:!0},{title:"Club Olimpo",componentKey:"OraculoSeccionClubOlimpo",dataMode:"manual",visible:!0,variableName:"items",manualItems:[{fields:[{required:!0,id:"65b37bc4-f480-4409-afd7-ff8b83c722e0",value:"¡Canjea bonos, productos y las mejores experiencias!",isUrl:!1,name:"text",type:"string"},{id:"cdc8fb20-5c5a-4165-93be-4df1026cdcee",required:!1,name:"buttonLabel",value:"Vamos",type:"string",isUrl:!1},{value:"",name:"imgAlt",type:"string",required:!1,id:"9f25442e-caeb-4fab-9bea-b91f1aef97eb",isUrl:!1},{id:"259ffa74-7e4f-48e6-90da-4837f2c37fe9",isUrl:!0,name:"imgMobile",type:"string",required:!0,value:"https://stg-www.contodobet.com/static/img/landing/ClubOlimpo/FondoMobile.png"},{value:"https://stg-www.contodobet.com/static/img/landing/ClubOlimpo/FondoDesktop.png",id:"e7812141-42d8-419f-9d15-b8711139e980",required:!1,type:"string",isUrl:!0,name:"imgDesktopBg"},{name:"imgDesktopLogo",id:"622d860b-9f9f-462a-a675-3768d6daf3c3",value:"https://stg-www.contodobet.com/static/img/landing/ClubOlimpo/Logo.png",required:!1,type:"string",isUrl:!0},{name:"onClick",id:"cc465fd9-907d-427a-b5bb-e0963bdd833a",value:"",required:!1,type:"function",isUrl:!1}],id:"03e20297-c0fa-4382-85b2-54eaa9325be1"}],id:8,updatedAt:"2026-01-22T04:11:09.501Z",order:10},{updatedAt:"2026-01-22T04:11:09.501Z",dataMode:"url",title:"Virtuales",order:11,variableName:"items",componentKey:"OraculoSeccionVirtuales",id:7,apiParams:[{value:"OLI",key:"company",id:"de915e1d-1742-4383-bd83-ed96fda1145a"},{key:"lobby",value:"HOME_VIRTUALES",id:"039b41a3-4e94-4a52-8798-e78d8651c090"}],apiMethod:"GET",manualScalarFields:[{required:!0,name:"title",id:"f6b16510-51db-4124-864d-2d12a0bb1b23",value:"Virtuales",type:"string",isImage:!1},{type:"string",id:"f9686ddc-f673-4784-8025-df26f48cc04f",value:"https://stg-www.contodobet.com/static/img/landing/Virtuales/virtuales.svg",maxSizeMB:.2,required:!0,isImage:!0,name:"iconUrl"},{type:"boolean",id:"4c4f348c-cb17-4fd6-bc4d-f816a42da249",name:"mosaicFirst",isImage:!1,value:"true",required:!1},{id:"c264c9c3-7178-4961-b366-163d9b818800",type:"number",name:"gridSize",value:"4",required:!1,isImage:!1},{id:"2310900e-68ce-4a64-89da-e0976d172fee",required:!1,type:"string",value:"",isImage:!1,name:"groups"}],visible:!0,apiUrl:"https://wallet-pe.olimpo.bet/api/contents/getLobby"},{title:"Medios de Pago",id:10,order:12,componentKey:"OraculoSeccionMediosPago",visible:!0,updatedAt:"2026-01-22T04:11:09.501Z"}]},pn=t=>typeof t=="function"||t&&typeof t=="object"&&"$$typeof"in t,fn=t=>/^OraculoSeccion[A-Z]/.test(t);function Ee(t){return t&&Array.isArray(t.sections)?t.sections.slice().sort((a,n)=>{var o,s;return((o=a.order)!=null?o:0)-((s=n.order)!=null?s:0)}).map((a,n)=>({...a,order:n+1})):t&&Array.isArray(t.components)?t.components.map((a,n)=>{var o,s,r,d,f;return{id:(o=a.id)!=null?o:n+1,title:(s=a.title)!=null?s:"",componentKey:a.componentKey,visible:(r=a.visible)!=null?r:!0,order:n+1,props:(d=a.props)!=null?d:{},apiUrl:(f=a.apiUrl)!=null?f:"",dataMode:a.dataMode,variableName:a.variableName,manualItems:a.manualItems,apiMethod:a.apiMethod,apiParams:a.apiParams}}):[]}const gn=Object.fromEntries(Object.entries(mn).filter(([t,a])=>fn(t)&&pn(a))),hn=t=>{try{return Object.fromEntries(t!=null?t:[])}catch{return console.warn("[oraculo] extras inválidos. Debe ser Array<[string, unknown]>",t),{}}};class We extends Error{constructor(a,n,o){super(`HTTP ${a} ${o}`),this.status=a,this.url=n,this.statusText=o,this.name="HttpError"}}const Ge=["OraculoSeccionEventoEnVivo","OraculoSeccionEventoSemana","OraculoSeccionEventoCombinadas"],wt=({sectionsOverride:t,docId:a="home",db:n,extras:o,loader:s,disableWrapper:r=!1})=>{const d=h.useMemo(()=>hn(o),[o]),f=s||d.loader,[b,x]=h.useState([]),[i,m]=h.useState(!1),[u,_]=h.useState({}),[v,I]=h.useState({}),[O,B]=h.useState({}),j=U.useMediaQuery("(min-width:1024px)");h.useEffect(()=>{if(t)return;if(!n){console.warn("[landing] sin db -> fallback json"),x(Ee(De));return}const g=(c,p)=>{console.warn("[landing] FALLBACK:",c,p!=null?p:""),x(Ee(De)),m(!1)};if(process.env.NEXT_PUBLIC_LANDING_FORCE_FALLBACK==="1"){m(!0),g("forzado por env");return}m(!0);const l=Fe.onSnapshot(Fe.doc(n,"landings",a),c=>{try{if(!c.exists()){g(`doc landings/${a} no existe`);return}const p=c.data(),y=Ee(p);if(!y.length){g("JSON inválido o sin secciones normalizables",p);return}console.log("[landing] Firestore OK (json grande):",p),x(y)}catch(p){g("error procesando snapshot",p)}finally{m(!1)}},c=>{g("error onSnapshot",c)});return()=>l()},[t,a,n]),h.useEffect(()=>(Ba(d),()=>Na()),[d]),h.useEffect(()=>{(t?t.slice():b.slice()).map(c=>c.componentKey).filter(c=>!!c).length},[t,b]);const C=async g=>{if(Ge.includes(g.componentKey))return{items:[],events:[],data:{}};const l=(g.apiUrl||"").trim();if(!l)return;const c=g.apiMethod||"GET",p=g.apiParams||[];let y=l,k,$;if(c==="GET"){const G=new URL(l,typeof window=="undefined"?"http://localhost":window.location.origin);for(const V of p)V.key&&G.searchParams.append(V.key,V.value);y=G.toString()}else{const G=new URLSearchParams;for(const V of p)V.key&&G.append(V.key,V.value);k=G.toString(),$={"Content-Type":"application/x-www-form-urlencoded; charset=UTF-8"}}const A=await fetch(y,{method:c,headers:$,body:k});if(!A.ok)throw new We(A.status,y,A.statusText);return A.json()},N=h.useMemo(()=>t?t.slice():b.slice(),[t,b]),E=re.default.useRef(new Set);h.useEffect(()=>{const g=N.map(l=>({s:l,url:(l.apiUrl||"").trim()})).filter(({url:l})=>!!l);if(g.length)for(const{s:l,url:c}of g){const p=`${l.id}|${c}`;E.current.has(p)||(E.current.add(p),I(y=>({...y,[l.id]:!0})),B(y=>({...y,[l.id]:""})),(async()=>{try{const y=await C(l);_(k=>({...k,[l.id]:y}))}catch(y){let k="Error desconocido";y instanceof We?k=`Error HTTP ${y.status} (${y.statusText}) en ${y.url}`:y instanceof SyntaxError?k="Respuesta no es JSON válido":y instanceof TypeError?k="Fallo de red / CORS / conexión":typeof y=="string"&&(k=y.toString()),B($=>({...$,[l.id]:k}))}finally{I(y=>({...y,[l.id]:!1}))}})())}},[N]);const M=h.useMemo(()=>N.filter(g=>g.visible).sort((g,l)=>g.order-l.order),[N]),w=g=>Array.isArray(g)?g.map(l=>{const c={};for(const p of l.fields||[]){const y=(p.type||"string").toLowerCase();if(y==="number"){const k=String(p.value||"").trim();if(k!==""){const $=Number(k);Number.isNaN($)||(c[p.name]=$)}}else if(y==="boolean")c[p.name]=String(p.value).toLowerCase()==="true";else if(y==="function"){const k=String(p.value||"").trim();if(k)try{const $=new Function(k);c[p.name]=$}catch($){console.error(`❌ Error creando función en item '${p.name}':`,$)}}else c[p.name]=p.value}return c}):[],L=g=>{const l={};if(!Array.isArray(g))return l;for(const c of g){if(!c.name)continue;const p=(c.type||"string").toLowerCase();if(p==="number"){const y=String(c.value||"").trim();if(y!==""){const k=Number(y);Number.isNaN(k)||(l[c.name]=k)}}else if(p==="boolean")l[c.name]=String(c.value).toLowerCase()==="true";else if(p==="function"){const y=String(c.value||"").trim();if(y)try{const k=new Function(y);l[c.name]=k}catch(k){console.error(`❌ Error creando función en item '${c.name}':`,k)}}else l[c.name]=c.value}return l},P=(g,l,c)=>{const p=c?{...c}:{};if(l){const V=(l.variableName||"items").trim()||"items";return p[V]=l.arr||[],p}const y=g,k=Array.isArray(y),$=!k&&typeof y=="object"&&y!==null?y:void 0,A=$&&Array.isArray($.lobby||$.items)?$.lobby||$.items:void 0,G=V=>k?y:A||V;return p.items=G(A||[]),p},S=g=>{var k;const l=!!((k=g.apiUrl)!=null&&k.trim()),c=l?u[g.id]:void 0;let p=g.props?{...g.props}:{};const y=L(g.manualScalarFields);if(Ge.includes(g.componentKey))return{items:c,...p,...y};if(p={...p,...y},l)p=P(c,null,p);else if(g.dataMode==="manual"){const $=w(g.manualItems);if(p=P(null,{arr:$,variableName:g.variableName},p),g.variableName2&&g.manualItems2){const A=w(g.manualItems2),G=(g.variableName2||"items2").trim()||"items2";p[G]=A}}return p},T=(g,l,c)=>{const p={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 ${p[l]}`,children:c},g)},F=g=>{var le;const l=g.componentKey,c=gn[l];if(!c)return console.warn(`No hay componente registrado para "${l}"`),T(g.id,"component",`Componente "${l}" no encontrado`);const p=!!((le=g.apiUrl)!=null&&le.trim()),y=p?u[g.id]:void 0,k=p?!!v[g.id]:!1,$=p?O[g.id]:"";if(p){if(k&&!y)return T(g.id,"loading",`Cargando datos desde ${g.apiUrl}...`);if($&&!y)return T(g.id,"error",`Error cargando ${g.apiUrl}: ${$}`)}const A=S(g),V=new Set(["OraculoSeccionBanners","OraculoSeccionBonoBienvenida","OraculoSeccionCasinoEnVivo",...j?[]:["OraculoSeccionClubOlimpo","OraculoSeccionEventoEnVivo","OraculoSeccionEventoSemana","OraculoSeccionEventoCombinadas","OraculoSeccionVirtuales","OraculoSeccionDestacados","OraculoSeccionCasino"]]).has(g.componentKey),W=j?120:24,Z=(j?8:5)*8,ne=g.componentKey==="OraculoSeccionCasinoEnVivo",me={width:"100%",boxSizing:"border-box",...V?{}:{paddingLeft:W,paddingRight:W},...ne?{marginTop:-Z,marginBottom:-Z}:{}};return e.jsx("div",{style:me,className:"oraculo-section-wrapper",children:e.jsx(c,{...A})},g.id)};return i&&!t?f?e.jsx(f,{}):e.jsx("div",{children:"Cargando..."}):!i&&!t&&b.length===0?e.jsx("div",{className:"text-xs text-gray-500",children:"Sin secciones (Firestore)"}):r?e.jsx(we,{children:e.jsx(ve,{docId:a,children:e.jsx(e.Fragment,{children:M.map(F)})})}):e.jsx(we,{children:e.jsx(ve,{docId:a,children:e.jsx(U.Container,{className:"oli-font",maxWidth:!1,disableGutters:!0,sx:{backgroundColor:"#121212",position:"relative",pb:5,width:"100%",maxWidth:"100%",overflowX:"hidden"},children:e.jsx(U.Stack,{direction:"column",spacing:j?8:5,useFlexGap:!0,children:M.map(F)})})})})};exports.DocIdProvider=ve;exports.OraculoButton=D;exports.OraculoCarousel=ae;exports.OraculoCarouselDots=ke;exports.OraculoClubOlimpoVisual=tt;exports.OraculoEventCombinadasCard=it;exports.OraculoEventEnVivoCard=st;exports.OraculoEventHeader=Ye;exports.OraculoEventLabel=$e;exports.OraculoEventLeague=Me;exports.OraculoEventScore=Be;exports.OraculoEventSemanaCard=rt;exports.OraculoEventStatus=Xe;exports.OraculoEventStatusBadge=Je;exports.OraculoEventTeamInfo=fe;exports.OraculoGameCard=pe;exports.OraculoGameRankCard=Qe;exports.OraculoGameSlide=Ne;exports.OraculoGridGroup=J;exports.OraculoLiveCasinoCard=et;exports.OraculoLogoMediosPago=Ie;exports.OraculoPageLandingPreview=wt;exports.OraculoSeccionBanners=_t;exports.OraculoSeccionBonoBienvenida=gt;exports.OraculoSeccionCasino=mt;exports.OraculoSeccionCasinoEnVivo=dt;exports.OraculoSeccionClubOlimpo=ht;exports.OraculoSeccionDestacados=lt;exports.OraculoSeccionEventoCombinadas=bt;exports.OraculoSeccionEventoEnVivo=xt;exports.OraculoSeccionEventoSemana=vt;exports.OraculoSeccionMediosPago=yt;exports.OraculoSeccionTopJuegos=Le;exports.OraculoSeccionVirtuales=ft;exports.OraculoSectionHost=un;exports.OraculoSectionTitle=te;exports.OraculoThemeProvider=we;exports.OraculoTopJuegoItem=Le;exports.OraculoWelcomeBanner=Te;exports.default=wt;
|
|
19
|
+
`},gt=({headline:t,headline2:a,items:n,backgroundImageUrl:o})=>{const s=H.useCaptureInteraction(),r=K(),d=$t.default("(max-width: 767px)"),f=n.length>1,b=h.useRef(null),x=h.useRef(null),i=h.useRef(!1),m=h.useRef(!1),[u,_]=h.useState(0),[v,I]=h.useState({isStart:!0,isEnd:!1});h.useEffect(()=>{const S=setTimeout(()=>{i.current=!0},500);return()=>clearTimeout(S)},[]);const O=h.useRef(v);h.useEffect(()=>{O.current=v},[v]);const B=h.useRef(!1),j=h.useRef(null),C=n==null?void 0:n[u],N=h.useMemo(()=>{var S,T;return(T=(S=C==null?void 0:C.backgroundImageUrl)!=null?S:o)!=null?T:""},[C,o]),E=Pa(N),M=!n||n.length===0,w=(S,T)=>{s({element:"welcome_banner_button",label:`OraculoSeccionBonoBienvenida - Banner button click: ${S.title||"OraculoSeccionBonoBienvenida - Banner "+(T+1)}`,target:"action",event_type:"click",module_id:301,metadata:{location:typeof globalThis!="undefined"&&globalThis.location?globalThis.location.pathname:"",banner_position:T+1,banner_total:(n==null?void 0:n.length)||0},tags:{banner_title:S.title||"no_title",button_text:S.buttonText||"no_text"}}),S.onButtonClick&&S.onButtonClick()},L=S=>{if(!i.current)return;if(m.current){m.current=!1;return}const T=n==null?void 0:n[S];s({element:"welcome_banner_carousel",label:`Landing: ${r} - OraculoSeccionBonoBienvenida - Banner view: ${(T==null?void 0:T.title)||"OraculoSeccionBonoBienvenida - Banner "+(S+1)}`,target:"no_url",event_type:"view",module_id:301,metadata:{location:typeof globalThis!="undefined"&&globalThis.location?globalThis.location.pathname:"",slide_index:S+1,total_slides:(n==null?void 0:n.length)||0,interaction_type:"manual_slide"},tags:{banner_position:String(S+1),banner_title:(T==null?void 0:T.title)||"no_title"}})};h.useEffect(()=>{const S=x.current;if(!S)return;const T=6,F=380,g=l=>{var k,$;if(M||l.ctrlKey||B.current)return;const c=l.deltaX,p=l.deltaY;if(Math.abs(c)<=Math.abs(p)||Math.abs(c)<T)return;const y=c>0;y&&O.current.isEnd||!y&&O.current.isStart||(l.preventDefault(),B.current=!0,y?(k=b.current)==null||k.next():($=b.current)==null||$.prev(),j.current&&window.clearTimeout(j.current),j.current=window.setTimeout(()=>{B.current=!1},F))};return S.addEventListener("wheel",g,{passive:!1}),()=>{S.removeEventListener("wheel",g),j.current&&window.clearTimeout(j.current)}},[M]);const P=(S,T,F)=>{var c,p;const g=(c=S.headline)!=null?c:t,l=(p=S.headline2)!=null?p:a;return T?e.jsxs(R.default,{sx:{maxWidth:1200,mx:"auto",px:15,display:"grid",gridTemplateColumns:"260px minmax(0, 1fr)",alignItems:"center",columnGap:6},children:[(g||l)&&e.jsx(R.default,{sx:{display:"flex",alignItems:"center",justifyContent:"flex-start",minHeight:"100%"},children:e.jsxs(R.default,{sx:{...qe,textAlign:"left",mb:0},children:[g&&e.jsx(Q.default,{component:"span",sx:ze,children:g}),l&&e.jsxs(e.Fragment,{children:[e.jsx("br",{}),e.jsx(Q.default,{component:"span",sx:Ue,children:l})]})]})}),e.jsx(R.default,{sx:{display:"flex",justifyContent:"center",alignItems:"center"},children:e.jsx(R.default,{sx:{width:"100%",maxWidth:600,mx:"auto"},children:e.jsx(Te,{...S,onButtonClick:()=>w(S,F),variant:"large"})})})]}):e.jsxs(R.default,{sx:{textAlign:"center"},children:[(g||l)&&e.jsxs(R.default,{sx:qe,children:[g&&e.jsx(Q.default,{component:"span",sx:ze,children:g}),l&&e.jsxs(e.Fragment,{children:[e.jsx("br",{}),e.jsx(Q.default,{component:"span",sx:Ue,children:l})]})]}),e.jsx(R.default,{sx:{display:"flex",justifyContent:"center"},children:e.jsx(Te,{...S,onButtonClick:()=>w(S,F),variant:"small"})})]})};return e.jsxs(R.default,{component:"section",sx:E,children:[e.jsx("div",{ref:x,style:{width:"100%"},children:e.jsx(ae,{ref:b,items:n,perPage:1,gap:"0px",options:{autoWidth:!1},renderItem:(S,T)=>e.jsx(R.default,{sx:{width:"100%"},children:P(S,!d,T)}),onMove:({index:S,isStart:T,isEnd:F})=>{_(S),typeof T=="boolean"&&typeof F=="boolean"&&I({isStart:T,isEnd:F}),L(S)}})}),f&&e.jsx(R.default,{sx:{mt:2,display:"flex",justifyContent:"center"},children:e.jsx(ke,{total:n.length,active:u,onSelect:S=>{var T;s({element:"welcome_banner_dots",label:`Landing: ${r} - OraculoSeccionBonoBienvenida - Dot navigation: Banner ${S+1}`,target:"no_url",event_type:"click",module_id:301,metadata:{location:typeof globalThis!="undefined"&&globalThis.location?globalThis.location.pathname:"",dot_index:S+1,total_dots:n.length},tags:{navigation_type:"dot_click"}}),_(S),(T=b.current)==null||T.go(S)}})})]})},ht=({className:t="",fullBleed:a=!0,items:n,selectedIndex:o=0,ariaLabel:s})=>{const r=h.useRef(null),d=h.useRef(null),f=H.useCaptureInteraction(),b=K();if(!n)return null;const x=()=>{f({element:"club_olimpo_button",label:`Landing: ${b} - OraculoSeccionClubOlimpo - Click: Club Olimpo`,target:"https://www.olimpo.bet/conoce-club-olimpo",event_type:"click",module_id:301,metadata:{location:typeof globalThis!="undefined"&&globalThis.location?globalThis.location.pathname:""},tags:{section:"OraculoSeccionClubOlimpo"}}),typeof globalThis!="undefined"&&globalThis.location&&globalThis.location.assign("https://www.olimpo.bet/conoce-club-olimpo")},i=Array.isArray(n)?n[o]:n;h.useLayoutEffect(()=>{if(!r.current||!d.current||typeof ResizeObserver=="undefined")return;const u=r.current,_=d.current,v=()=>{u.style.setProperty("--orc-co-bottomH",`${_.offsetHeight+16}px`)},I=new ResizeObserver(v);return I.observe(_),v(),()=>I.disconnect()},[]);const m=["orc-co-wrap",a?"orc-co-fullBleed":"",t].filter(Boolean).join(" ");return e.jsx("section",{ref:r,className:m,"aria-label":s||i.imgAlt||"Club Olimpo",children:e.jsx("div",{ref:d,children:e.jsx(tt,{text:i.text,onClick:x,imgAlt:i.imgAlt,buttonLabel:i.buttonLabel,imgSrcMobile:i.imgMobile,imgSrcDesktopBg:i.imgDesktopBg,imgSrcDesktopLogo:i.imgDesktopLogo})})})},qa="oraculo__OraculoSeccionEventoCombinadas-module__controls___Zsta4",za="oraculo__OraculoSeccionEventoCombinadas-module__padding___vf-yF",Ve={controls:qa,padding:za},Ua=t=>{var a,n;return(a=t.outcome)!=null&&a.id?[t.outcome.id]:t.type==="BET_BUILDER"&&((n=t.group)!=null&&n.groups)?t.group.groups.flatMap(o=>{var s,r;return(r=(s=o.outcomes)==null?void 0:s.map(d=>d.id))!=null?r:[]}):[]};function Va(t,a,n){return n?n.map(o=>{var i,m;const s=o.prePackCouponRows.flatMap(u=>Ua(u).map(_=>({eventId:u.eventId,outcomeId:_}))),r=new Set(s.map(u=>u.eventId)),d=new Set(s.map(u=>u.outcomeId)),f=new Map(s.map((u,_)=>[u.outcomeId,_])),b={};for(const u of a){if(!r.has(u.eventId))continue;const _=u.outcomes.filter(v=>d.has(v.id)).map(v=>({...v,position:f.get(v.id)}));_.length&&((m=b[i=u.eventId])!=null||(b[i]=[]),b[u.eventId].push({...u,outcomes:_}))}const x=t.filter(u=>r.has(u.id)).map(u=>{var _;return{...u,betoffers:(_=b[u.id])!=null?_:[]}});return{couponId:o.id,status:o.status,combinadoTotal:Da(o.prePackCouponRows),events:x}}):[]}function Da(t){if(!Array.isArray(t)||t.length===0)return 0;let a=1;for(const n of t){const o=n.odds.decimal/1e3,s=Math.round(o*100)/100;a*=s}return Math.floor(a*100)/100}const Wa=re.default.memo(it);function bt({items:t,title:a="Combinadas del Olimpo",iconUrl:n="https://stg-www.contodobet.com/static/img/landing/EventoCombinada/rayoIcon.svg",onViewMore:o,className:s=""}){const r=H.useCaptureInteraction(),d=K(),f=h.useRef(null),[b,x]=h.useState({isStart:!0,isEnd:!1}),[i,m]=h.useState([]),u="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",_=()=>{var C;r({element:"evento_combinadas_prev",label:`Landing: ${d} - OraculoSeccionEventoCombinadas - Click: Anterior`,event_type:"click",module_id:301,metadata:{location:typeof globalThis!="undefined"&&globalThis.location?globalThis.location.pathname:""},tags:{section:"OraculoSeccionEventoCombinadas"}}),(C=f.current)==null||C.prev()},v=()=>{var C;r({element:"evento_combinadas_next",label:`Landing: ${d} - OraculoSeccionEventoCombinadas - Click: Siguiente`,event_type:"click",module_id:301,metadata:{location:typeof globalThis!="undefined"&&globalThis.location?globalThis.location.pathname:""},tags:{section:"OraculoSeccionEventoCombinadas"}}),(C=f.current)==null||C.next()},I=()=>{r({element:"evento_combinadas_ver_mas",label:`Landing: ${d} - OraculoSeccionEventoCombinadas - Click: Ver más`,event_type:"click",module_id:301,metadata:{location:typeof globalThis!="undefined"&&globalThis.location?globalThis.location.pathname:""},tags:{section:"OraculoSeccionEventoCombinadas"}}),ya()},O=h.useMemo(()=>i.filter(C=>C.combinadoTotal!==null),[i]);async function B(){var C,N,E;try{const w=await(await fetch(u)).json(),L=(E=(N=(C=w==null?void 0:w.group)==null?void 0:C.groups)==null?void 0:N[0])==null?void 0:E.id;if(!L){console.error("Could not extract group ID");return}const P=`https://us1.offering-api.kambicdn.com/offering/v2018/nexuspe/prepackcoupon/eventgroup/${L}.json?lang=es_PE&market=PE&client_id=200&channel_id=1&ncid=1764283566783&prePackCouponTags=CUSTOM`,T=await(await fetch(P)).json();m(Va(T.events,T.betOffers,T.prePackCoupons))}catch(M){console.error("loadDataEventSpecial error:",M)}}h.useEffect(()=>{B()},[]);const j=s||void 0;return O.length===0?null:e.jsx("section",{className:j,style:{width:"100%",boxSizing:"border-box"},children:e.jsxs(z.default,{direction:"column",spacing:1.5,useFlexGap:!0,children:[e.jsx("div",{className:Ve.padding,children:e.jsxs(J,{spacing:1.5,columns:"1fr auto ",justify:"start",children:[e.jsx(te,{title:a,iconUrl:n,size:"md"}),e.jsxs("div",{className:Ve.controls,children:[e.jsxs(J,{spacing:1,columns:"auto auto",children:[e.jsx(D,{ariaLabel:"Anterior",variant:"secondary",iconOnly:!0,leftIcon:e.jsx(oe.ChevronLeftRounded,{}),onClick:_,disabled:b.isStart}),e.jsx(D,{ariaLabel:"Siguiente",variant:"secondary",iconOnly:!0,rightIcon:e.jsx(oe.ChevronRightRounded,{}),onClick:v,disabled:b.isEnd})]}),e.jsx(D,{variant:"secondary",onClick:I,children:"Ver más"})]})]})}),e.jsx(ae,{ref:f,items:O,perPage:void 0,gap:"16px",options:{autoWidth:!0,trimSpace:"move"},useIndexAsKey:!0,enableHorizontalWheel:!0,showRightGradient:!0,breakpoints:{768:{perPage:1.2,gap:"12px",padding:{left:"24px",right:"24px"}}},renderItem:C=>e.jsx(Wa,{coupon:C}),onMove:({isStart:C,isEnd:N})=>x({isStart:C,isEnd:N})})]})})}function Ga({}){return e.jsx("div",{className:be.cardWrapper,children:e.jsxs(z.default,{direction:"column",spacing:1,children:[e.jsxs(z.default,{spacing:1,direction:"row",children:[e.jsx(q.default,{variant:"text",width:"60%",height:24}),e.jsx(q.default,{variant:"text",width:"39%",height:24})]}),e.jsxs(z.default,{spacing:8,direction:"row",justifyContent:"center",alignItems:"center",children:[e.jsx(q.default,{variant:"circular",width:32,height:40}),e.jsx(q.default,{variant:"text",width:40,height:40}),e.jsx(q.default,{variant:"circular",width:32,height:40})]}),e.jsxs(z.default,{spacing:8,direction:"row",justifyContent:"center",alignItems:"center",children:[e.jsx(q.default,{variant:"text",width:32,height:16}),e.jsx(q.default,{variant:"text",width:40,height:16}),e.jsx(q.default,{variant:"text",width:32,height:16})]}),e.jsxs(z.default,{spacing:2,direction:"row",children:[e.jsx(q.default,{variant:"rounded",width:88,height:16}),e.jsx(q.default,{variant:"rounded",width:88,height:16}),e.jsx(q.default,{variant:"rounded",width:88,height:16})]}),e.jsxs(z.default,{spacing:2,direction:"row",children:[e.jsx(q.default,{variant:"rounded",width:88,height:32}),e.jsx(q.default,{variant:"rounded",width:88,height:32}),e.jsx(q.default,{variant:"rounded",width:88,height:32})]})]})})}const Ha="oraculo__FadeItemWrapper-module__fadeWrapper___kFOH4",Ka={fadeWrapper:Ha};function ye({children:t}){return e.jsx("div",{className:Ka.fadeWrapper,children:t})}const Za="oraculo__OraculoSeccionEventoEnVivo-module__padding___Sh8tD",Ja={padding:Za},Xa=t=>{const a=["esports","cyber"];return t.filter(n=>{var s;if(n.event.sport!=="FOOTBALL")return!1;const o=((s=n.event.group)==null?void 0:s.toLowerCase())||"";return!a.some(r=>o.includes(r))})},Ya=re.default.memo(st);function xt({items:t,title:a="En vivo",iconUrl:n="https://stg-www.contodobet.com/static/img/landing/EventoEnVivo/icon.svg",onViewMore:o,className:s=""}){const r="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",d=h.useRef(null),[f,b]=h.useState({isStart:!0,isEnd:!1}),[x,i]=h.useState(null),[m,u]=h.useState({}),[_,v]=h.useState({start:null,end:null}),I=h.useRef(!1),[O,B]=h.useState(null),j=h.useRef(!1),C=H.useCaptureInteraction(),N=K(),E=h.useRef(new Map),M=nt(_,300),w=h.useRef(new Set),L=()=>{var c;C({element:"evento_en_vivo_prev",label:`Landing: ${N} - OraculoSeccionEventoEnVivo - Anterior`,target:"prev",event_type:"click",module_id:301,metadata:{location:typeof globalThis!="undefined"&&globalThis.location?globalThis.location.pathname:""},tags:{section:"OraculoSeccionEventoEnVivo"}}),(c=d.current)==null||c.prev()},P=()=>{var c;C({element:"evento_en_vivo_next",label:`Landing: ${N} - OraculoSeccionEventoEnVivo - Siguiente`,target:"next",event_type:"click",module_id:301,metadata:{location:typeof globalThis!="undefined"&&globalThis.location?globalThis.location.pathname:""},tags:{section:"OraculoSeccionEventoEnVivo"}}),(c=d.current)==null||c.next()},S=()=>{C({element:"evento_en_vivo_view_more",label:`Landing: ${N} - OraculoSeccionEventoEnVivo - Ver más`,target:"ver_mas",event_type:"click",module_id:301,metadata:{location:typeof globalThis!="undefined"&&globalThis.location?globalThis.location.pathname:""},tags:{section:"OraculoSeccionEventoEnVivo"}}),va()},T=h.useCallback(async()=>{var c;try{if(!j.current){j.current=!0;try{const A=await(await fetch("https://api.mktolimpo.com/api/kambi/eventos/orden")).json(),G=((c=A==null?void 0:A.data)==null?void 0:c.event_ids)||[],V=new Map;G.forEach((W,Z)=>V.set(String(W),Z)),E.current=V}catch($){console.error("Order fetch failed, using default sorting",$)}}const p=await fetch(r);if(!p.ok)throw new Error("Failed to fetch live events");const y=await p.json(),k=Xa(y.events);if(E.current.size===0)i(k);else{const $=[...k].sort((A,G)=>{const V=E.current.get(String(A.event.id)),W=E.current.get(String(G.event.id));return(V!==void 0?V:1/0)-(W!==void 0?W:1/0)});i($)}}catch(p){console.error("LoadData Error:",p)}},[]);h.useEffect(()=>{T();const c=setInterval(T,2e4);return()=>clearInterval(c)},[T]),h.useEffect(()=>{if(M.start===null||M.end===null||!(x!=null&&x.length)||I.current)return;const c=3,p=Math.max(0,M.start-c),y=Math.min(x.length-1,M.end+c),k=x.slice(p,y+1).map($=>{var A;return(A=$==null?void 0:$.event)==null?void 0:A.id}).filter($=>$&&!w.current.has($));k.length!==0&&(k.forEach($=>w.current.add($)),I.current=!0,at(k).then($=>{$!=null&&$.events&&u(A=>({...A,...$.events}))}).catch($=>{console.error("Jersey fetch error",$),k.forEach(A=>w.current.delete(A))}).finally(()=>{I.current=!1}))},[M,x]);const F=s||void 0,g=x===null;if(!g&&x.length===0)return null;const l=h.useMemo(()=>g?Array(4).fill({}):(x==null?void 0:x.slice(0,20))||[],[g,x]);return e.jsx("section",{className:F,style:{width:"100%",boxSizing:"border-box"},children:e.jsxs(z.default,{direction:"column",spacing:1.5,useFlexGap:!0,children:[e.jsx("div",{className:Ja.padding,children:e.jsxs(J,{spacing:1.5,columns:"1fr auto ",justify:"start",children:[e.jsx(te,{title:a,iconUrl:n,size:"md"}),e.jsxs("div",{style:{display:"flex",gap:8,alignItems:"center"},children:[e.jsxs(J,{spacing:1,columns:"auto auto",children:[e.jsx(D,{ariaLabel:"Anterior",variant:"secondary",iconOnly:!0,leftIcon:e.jsx(oe.ChevronLeftRounded,{}),onClick:L,disabled:f.isStart}),e.jsx(D,{ariaLabel:"Siguiente",variant:"secondary",iconOnly:!0,rightIcon:e.jsx(oe.ChevronRightRounded,{}),onClick:P,disabled:f.isEnd})]}),e.jsx(D,{variant:"secondary",onClick:S,children:"Ver más"})]})]})}),e.jsx(ae,{ref:d,items:l,perPage:void 0,showRightGradient:!0,enableHorizontalWheel:!0,gap:"16px",options:{autoWidth:!0,trimSpace:"move"},breakpoints:{400:{gap:"4px",focus:"center",padding:{left:"24px",right:"24px"}},768:{gap:"8px",focus:"center",padding:{left:"24px",right:"24px"}},1024:{gap:"10px",focus:"center",padding:{left:"24px",right:"24px"}}},renderItem:c=>{var k;const p=((k=c.event)==null?void 0:k.id)||c.eventId,y=p in m?m[p]:void 0;return g?e.jsx(ye,{children:e.jsx(Ga,{})}):e.jsx(ye,{children:e.jsx(Ya,{...c,jersey:y})})},onMove:({isStart:c,isEnd:p,visibleStart:y,visibleEnd:k})=>{b($=>$.isStart===c&&$.isEnd===p?$:{isStart:c,isEnd:p}),v({start:y,end:k})}})]})})}function Qa(){return e.jsxs("div",{className:se.cardContainer,children:[e.jsx(Me,{title:""}),e.jsx("div",{className:se.cardBackground,children:e.jsxs(z.default,{direction:"column",spacing:{xs:.5,md:1},useFlexGap:!0,children:[e.jsxs(z.default,{spacing:8,direction:"row",justifyContent:"center",alignItems:"center",children:[e.jsx(q.default,{variant:"circular",width:48,height:48}),e.jsx(q.default,{variant:"circular",width:48,height:48})]}),e.jsxs(z.default,{direction:"column",spacing:{xs:.5,md:1},useFlexGap:!0,children:[e.jsxs(z.default,{spacing:8,direction:"row",justifyContent:"center",alignItems:"center",children:[e.jsx(q.default,{variant:"text",width:80,height:12}),e.jsx(q.default,{variant:"text",width:80,height:12})]}),e.jsx(z.default,{spacing:8,direction:"row",justifyContent:"center",alignItems:"center",children:e.jsx(q.default,{variant:"text",width:160,height:12})}),e.jsxs(z.default,{direction:"row",spacing:1,children:[e.jsx(q.default,{variant:"text",width:80,height:16}),e.jsx(q.default,{variant:"text",width:80,height:16}),e.jsx(q.default,{variant:"text",width:80,height:16})]}),e.jsx("div",{className:se.jugadas,children:e.jsxs(z.default,{direction:"row",spacing:1,children:[e.jsx(q.default,{variant:"rounded",width:80,height:32}),e.jsx(q.default,{variant:"rounded",width:80,height:32}),e.jsx(q.default,{variant:"rounded",width:80,height:32})]})})]})]})})]})}const en="oraculo__OraculoSeccionEventoSemana-module__wrapper___eqVq-",tn="oraculo__OraculoSeccionEventoSemana-module__container___5yFQs",an="oraculo__OraculoSeccionEventoSemana-module__buttonWrapper___-6IDT",nn="oraculo__OraculoSeccionEventoSemana-module__padding___vfUcV",he={wrapper:en,container:tn,buttonWrapper:an,padding:nn},on=re.default.memo(rt);async function sn(t,a=2,n){const o=[];for(let s=0;s<t.length;s+=a){if(n.aborted)throw new DOMException("Aborted","AbortError");const r=t.slice(s,s+a),d=await Promise.all(r.map(f=>fetch(f,{signal:n}).then(b=>b.json())));o.push(...d)}return o}function rn(t){return[...t].sort((a,n)=>new Date(a.start).getTime()-new Date(n.start).getTime())}function ln(t){const a=new Date,n=new Date(a.getTime()+480*60*60*1e3);return t.filter(o=>{if(!o.start)return!1;const s=new Date(o.start);return s>=a&&s<=n})}function cn(t,a){const o=a.filter(s=>{var r;return((r=s.betOfferType)==null?void 0:r.id)===2}).reduce((s,r)=>(s[r.eventId]||(s[r.eventId]=[]),s[r.eventId].push(r),s),{});return t.filter(s=>o[s.id]).map(s=>({...s,outcome:o[s.id]}))}function vt({items:t,title:a="En vivo",iconUrl:n,onViewMore:o,className:s=""}){const r=H.useCaptureInteraction(),d=K(),f="https://us1.offering-api.kambicdn.com/offering/v2018/nexuspe/group.json?channel_id=1&client_id=200&lang=es_PE&market=PE",b=h.useRef(null),[x,i]=h.useState({isStart:!0,isEnd:!1}),[m,u]=h.useState(null);h.useRef(new Set);const[_,v]=h.useState({}),[I,O]=h.useState({start:null,end:null}),B="channel_id=1&client_id=200&competitionId=undefined&lang=es_PE&market=PE&useCombined=true",j=nt(I,250),C=h.useRef(!1);h.useMemo(()=>m===null?Array(6).fill({}):m.slice(0,20),[m]);const N=()=>{r({element:"evento_semana_view_more",label:`Landing: ${d} - OraculoSeccionEventoSemana - Ver más`,target:"ver_mas",event_type:"click",module_id:301,metadata:{location:typeof globalThis!="undefined"&&globalThis.location?globalThis.location.pathname:""},tags:{section:"OraculoSeccionEventoSemana"}}),_a()};async function E(S){var g,l;let T=[],F=[];try{const c=await fetch("https://api.mktolimpo.com/api/kambi/eventos/orden",{signal:S});if(c.ok){const p=await c.json();T=((g=p==null?void 0:p.data)==null?void 0:g.group_ids)||[],F=((l=p==null?void 0:p.data)==null?void 0:l.event_ids)||[]}}catch(c){c.name!=="AbortError"&&console.warn("Order API not available, using default group order");return}try{const y=(await(await fetch(f,{signal:S})).json()).group.groups.find(W=>W.englishName==="Football");if(!y||!Array.isArray(y.groups)){console.error("Football groups not found");return}let k=[...y.groups];if(T.length>0){const W=new Map(T.map((Z,ne)=>[Z,ne]));k.sort((Z,ne)=>{const me=W.get(String(Z.id)),le=W.get(String(ne.id));return me!==void 0&&le!==void 0?me-le:me!==void 0?-1:le!==void 0?1:0})}const A=k.slice(0,5),G=W=>{const Z="https://us1.offering-api.kambicdn.com/offering/v2018/nexuspe/listView/football";if(W.groups&&W.groups.length>0){const ne=W.groups[0];return[`${Z}/${W.termKey}/${ne.termKey}/all/matches.json?${B}`]}return[`${Z}/${W.termKey}/all/all/matches.json?${B}`]},V=A.flatMap(G);M(V,F,S)}catch(c){console.error(c)}}async function M(S,T,F){try{const g=await sn(S,2,F);let l=[],c=[];g.forEach($=>{$.events&&(l.push(...$.events.map(A=>A.event)),c.push(...$.events.flatMap(A=>A.betOffers||[])))});const p=cn(l,c),y=rn(ln(p));let k=y;if(T.length>0){const $=new Map(T.map((A,G)=>[String(A),G]));k=[...y].sort((A,G)=>{const V=$.get(String(A.id)),W=$.get(String(G.id));return V!==void 0&&W!==void 0?V-W:V!==void 0?-1:W!==void 0?1:0})}if(F.aborted)return;u(k)}catch(g){console.error("Error loading events:",g)}}h.useEffect(()=>{if(!t)return;const S=new AbortController;return E(S.signal),()=>{S.abort()}},[t]),h.useEffect(()=>{if(j.start===null||j.end===null||!(m!=null&&m.length)||C.current)return;const S=2,T=Math.max(0,j.start-S),F=Math.min(m.length-1,j.end+S),g=m.slice(T,F+1).map(c=>c==null?void 0:c.id).filter(Boolean).filter(c=>_[c]===void 0);if(!g.length)return;let l=!1;return C.current=!0,(async()=>{try{const c=await at(g);l||v(p=>({...p,...c.events}))}catch(c){console.error("Jersey fetch error",c)}finally{C.current=!1}})(),()=>{l=!0}},[j,m]);const w=s||void 0,L={paddingLeft:0,width:"100%",boxSizing:"border-box"},P=m===null;return!P&&m.length===0?null:e.jsx("section",{className:w,style:L,children:e.jsxs("div",{className:`${he.wrapper} ${he.padding}`,children:[e.jsx("div",{className:he.container,children:e.jsxs(z.default,{direction:"column",spacing:1.5,useFlexGap:!0,children:[e.jsx(te,{title:"Eventos de la semana"}),e.jsx("div",{className:he.buttonWrapper,children:e.jsx(D,{variant:"secondary",size:"lg",fullWidth:!0,onClick:()=>{N()},children:"Ver más"})})]})}),e.jsx("div",{style:{minWidth:"180px"},children:e.jsx(ae,{ref:b,items:P?Array(6).fill({}):m.slice(0,20),perPage:3.5,gap:"16px",enableHorizontalWheel:!0,showRightGradient:!0,options:{autoWidth:!0,trimSpace:!0},breakpoints:{1024:{perPage:1.4,gap:"8px",focus:"center",padding:{left:"8px",right:"8px"}}},renderItem:S=>{const T=S.id,F=T in _?_[T]:void 0;return P?e.jsx(ye,{children:e.jsx(Qa,{})}):e.jsx(ye,{children:e.jsx(on,{event:S,jersey:F})})},onMove:({isStart:S,isEnd:T,visibleStart:F,visibleEnd:g})=>{i({isStart:S,isEnd:T}),O({start:F,end:g}),r({element:"evento_semana_carousel_slide",label:`Landing: ${d} - OraculoSeccionEventoSemana - Slide Carousel`,target:"carousel",event_type:"slide",module_id:301,metadata:{location:typeof globalThis!="undefined"&&globalThis.location?globalThis.location.pathname:"",visibleStart:F,visibleEnd:g,isStart:S,isEnd:T},tags:{section:"OraculoSeccionEventoSemana"}})}})})]})})}function _t({backgrounds:t,items:a,hideItems:n}){var T,F,g;const[o,s]=h.useState(0),r=H.useCaptureInteraction(),d=K(),f=h.useRef(null),b=h.useRef(!1),x=h.useRef(!1),i=(t==null?void 0:t.length)||1,m=!t||t.length===0,u=!m&&((T=t==null?void 0:t.length)!=null?T:0)>1,_=!n&&((F=a==null?void 0:a.length)!=null?F:0)>0,v="#B5B5B5",I={position:"absolute",top:"50%",transform:"translateY(-50%)",zIndex:5,width:48,height:40,borderRadius:"12px",border:`1.5px solid ${v}`,py:1,px:1.5,color:v,backgroundColor:"transparent","&:hover":{backgroundColor:"rgba(181,181,181,0.08)"},"&.Mui-disabled":{opacity:.35,borderColor:v,color:v,backgroundColor:"transparent",cursor:"default"}},O=h.useMemo(()=>({type:"loop",perMove:1,pagination:!1,arrows:!1,drag:!0,focus:"center"}),[]);h.useEffect(()=>{const l=setTimeout(()=>{b.current=!0},500);return()=>clearTimeout(l)},[]);const B=(l,c)=>{var y,k;const p=((k=(y=l.href)==null?void 0:y.split("/").pop())==null?void 0:k.split(".")[0])||l.label||l.id||`banner_${c+1}`;r({element:"banner_carousel",label:`Landing: ${d} - OraculoSeccionBanners - Banner click: ${p}`,target:l.href||"no_url",event_type:"click",module_id:301,metadata:{location:typeof globalThis!="undefined"&&globalThis.location?globalThis.location.pathname:"",banner_position:c+1,banner_total:(t==null?void 0:t.length)||0},tags:{banner_type:"carousel",banner_target:"_self",banner_url:l.href||"no_url"}})},j=l=>{if(r({element:"banner_menu_item",label:`Landing: ${d} - OraculoSeccionBanners - Menu item click: ${l.label||l.id}`,target:l.href||"action",event_type:"click",module_id:301,metadata:{location:typeof globalThis!="undefined"&&globalThis.location?globalThis.location.pathname:"",item_id:l.id},tags:{item_label:l.label||"no_label"}}),l.onClick){l.onClick();return}l.href&&typeof globalThis!="undefined"&&globalThis.location&&globalThis.location.assign(l.href)},C=5e3,N=h.useRef(null),E=!m&&((g=t==null?void 0:t.length)!=null?g:0)>1,M=()=>{N.current!=null&&(window.clearTimeout(N.current),N.current=null)},w=()=>{M(),E&&(N.current=window.setTimeout(()=>{var l;x.current=!0,(l=f.current)==null||l.next()},C))};h.useEffect(()=>(w(),()=>M()),[E,C]);const L=l=>{var c;l.preventDefault(),l.stopPropagation(),M(),(c=f.current)==null||c.prev()},P=l=>{var c;l.preventDefault(),l.stopPropagation(),M(),(c=f.current)==null||c.next()},S=l=>{var y,k,$,A;const c=(l%i+i)%i;if(!b.current)return;const p=(y=t==null?void 0:t[c])!=null&&y.href?(($=(k=t[c].href)==null?void 0:k.split("/").pop())==null?void 0:$.split(".")[0])||`banner_${c+1}`:`banner_${c+1}`;r({element:"banner_carousel",label:`Landing: ${d} - OraculoSeccionBanners - Banner view: Slide ${c+1} - ${p}`,target:((A=t==null?void 0:t[c])==null?void 0:A.href)||"no_url",event_type:"view",module_id:301,metadata:{location:typeof globalThis!="undefined"&&globalThis.location?globalThis.location.pathname:"",slide_index:c+1,total_slides:i,interaction_type:"manual_slide"},tags:{banner_position:String(c+1)}})};return e.jsxs(U.Box,{component:"section",sx:{position:"relative",overflow:"visible"},children:[e.jsxs(U.Box,{sx:{position:"relative",borderRadius:0,overflow:"hidden",width:"100%",height:{xs:300,sm:360},"@media (min-width:800px)":{height:"auto",aspectRatio:"1920 / 460"}},children:[e.jsx(U.Box,{sx:{height:"100%","& .splide, & .splide__track, & .splide__list":{height:"100%"},"& .splide__slide":{height:"100%",position:"relative"}},children:e.jsx(ae,{ref:f,items:t,perPage:1,gap:"0px",enableHorizontalWheel:!0,options:O,onMove:({index:l})=>{const c=(l%i+i)%i;s(c);const p=x.current;x.current=!1,w(),p||S(l)},renderItem:(l,c)=>{var p,y;return e.jsxs(U.Box,{component:"a",href:l.href,target:(p=l.target)!=null?p:"_self",rel:l.target==="_blank"?"noopener noreferrer":void 0,onClick:()=>B(l,c),sx:{position:"relative",width:"100%",height:"100%",display:"block",textDecoration:"none",cursor:"pointer"},children:[e.jsxs(U.Box,{component:"picture",sx:{position:"absolute",inset:0,lineHeight:0},children:[e.jsx("source",{srcSet:l.desktopSrc,media:"(min-width:800px)"}),e.jsx("source",{srcSet:l.mobileSrc,media:"(max-width:799px)"}),e.jsx(U.Box,{component:"img",src:(y=l.fallbackSrc)!=null?y:l.desktopSrc,alt:"","aria-hidden":!0,loading:"lazy",sx:{width:"100%",height:"100%",objectFit:"cover",display:"block"}})]}),e.jsx(U.Box,{sx:{position:"absolute",inset:0,pointerEvents:"none","&::before":{content:'""',position:"absolute",left:0,right:0,bottom:0,top:"80%",background:"linear-gradient(to bottom, rgba(0,0,0,0) 0%, rgba(18,18,18,0.85) 80%, #121212 100%)"}}})]})}})}),u&&e.jsxs(e.Fragment,{children:[e.jsx(U.IconButton,{"aria-label":"Anterior",onClick:L,sx:{...I,left:"120px","@media (max-width:1024px)":{left:24},"@media (max-width:786px)":{display:"none"}},children:e.jsx(oe.ChevronLeftRounded,{})}),e.jsx(U.IconButton,{"aria-label":"Siguiente",onClick:P,sx:{...I,right:"120px","@media (max-width:1024px)":{right:24},"@media (max-width:786px)":{display:"none"}},children:e.jsx(oe.ChevronRightRounded,{})})]}),e.jsx(U.Box,{sx:{position:"absolute",left:0,right:0,bottom:72,display:"flex",justifyContent:"center",zIndex:2},children:e.jsx(ke,{total:i,active:o,durationMs:C},`${o}-${i}`)})]}),_&&e.jsx(U.Box,{sx:{position:"absolute",bottom:{xs:-12,sm:0},left:120,right:120,"@media (max-width:1024px)":{left:24,right:24},backgroundColor:"#363636",borderRadius:2,p:1.5,display:"flex",justifyContent:"space-around",alignItems:"center",boxShadow:"0 10px 24px rgba(0,0,0,.35)",zIndex:3},children:a==null?void 0:a.map(l=>e.jsxs(U.Box,{sx:{display:"flex",flexDirection:{xs:"column",md:"row"},alignItems:"center",justifyContent:"center",gap:{xs:.5,md:1},color:"#FFFFFF",minWidth:0,cursor:l.onClick||l.href?"pointer":"default",whiteSpace:"nowrap"},onClick:()=>j(l),children:[l.icon&&e.jsx(U.Box,{component:"img",src:l.icon,alt:l.label||`icon-${l.id}`,sx:{width:{xs:20,sm:22,md:24},height:{xs:20,sm:22,md:24},objectFit:"contain"}}),e.jsx(U.Typography,{sx:{fontSize:{xs:10,sm:11,md:12},fontWeight:600,color:"#E0E0E0",textAlign:"center"},children:l.label})]},l.id))})]})}const dn=[{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/BCP.png",alt:"BCP"},{src:"https://stg-www.contodobet.com/static/img/landing/MediosPago/pagoEfectivo.png",alt:"PagoEfectivo"},{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 yt({title:t="Medios de pago",items:a=dn}){const n=Math.ceil(a.length/2),o=a.slice(0,n),s=a.slice(n);return e.jsxs(U.Box,{component:"section","aria-labelledby":"mp-title",sx:{color:"#fff"},children:[e.jsx(U.Typography,{id:"mp-title",variant:"h6",sx:{fontWeight:800,fontSize:{xs:20,md:32},textAlign:"center",mb:1.5},children:t}),e.jsx(U.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.jsxs(U.Stack,{spacing:{xs:2,md:3},alignItems:"center",children:[e.jsx(U.Stack,{direction:"row",justifyContent:"center",alignItems:"center",gap:{xs:2,md:3},flexWrap:"wrap",children:o.map((r,d)=>e.jsx(Ie,{...r},`${r.alt}-${r.src}-${d}`))}),e.jsx(U.Stack,{direction:"row",justifyContent:"center",alignItems:"center",gap:{xs:2,md:3},flexWrap:"wrap",children:s.map((r,d)=>e.jsx(Ie,{...r},`${r.alt}-${r.src}-${d}`))})]})]})}function we({children:t}){const a=Se.useTheme(),n=re.default.useMemo(()=>Se.createTheme(a,{typography:{fontFamily:"var(--orc-font)"},components:{MuiTypography:{styleOverrides:{root:{fontFamily:"var(--orc-font)"}}}}}),[a]);return e.jsxs(Se.ThemeProvider,{theme:n,children:[e.jsx(Mt.default,{}),t]})}function un({docId:t="home",children:a}){return e.jsx(we,{children:e.jsx(ve,{docId:t,children:a})})}const mn={OraculoSeccionDestacados:lt,OraculoSeccionTopJuegos:Le,OraculoSeccionCasinoEnVivo:dt,OraculoSeccionCasino:mt,OraculoSeccionVirtuales:ft,OraculoSeccionClubOlimpo:ht,OraculoSeccionBonoBienvenida:gt,OraculoSeccionBanners:_t,OraculoSeccionMediosPago:yt,OraculoSeccionEventoEnVivo:xt,OraculoSeccionEventoSemana:vt,OraculoSeccionEventoCombinadas:bt},De={sections:[{variableName2:"backgrounds",updatedAt:"2026-01-22T04:11:09.501Z",variableName:"items",dataMode:"manual",title:"Banners",visible:!0,id:9,manualItems:[{id:"724a1dc0-d55b-4443-a580-cad22e328536",fields:[{type:"string",id:"abb2c3d6-d5c5-47ee-8ffa-c764a8bc731e",isImage:!1,required:!0,value:"1",name:"id"},{name:"label",isImage:!1,value:"POR INICIAR",required:!1,id:"549c02bf-56b5-4652-93d9-46b9451bac39",type:"string"},{type:"string",id:"c6538242-1974-4bed-aed3-703a111987b5",maxSizeMB:.2,required:!0,isImage:!0,value:"https://stg-www.contodobet.com/static/img/landing/Banner/clock.svg",name:"icon"},{id:"7d564f31-69ff-4f32-983b-46d28ced4a18",type:"string",required:!1,value:"https://www.olimpo.bet/deportes#starting-soon",isImage:!1,name:"href"}]},{fields:[{type:"string",isImage:!1,id:"45c50e08-560e-42cb-8be1-e9722f69c8a0",required:!0,name:"id",value:"2"},{type:"string",name:"label",isImage:!1,value:"EXPLORAR",required:!1,id:"2eec0f3d-0126-4960-8ec0-17cc92b5eb43"},{maxSizeMB:.2,isImage:!0,required:!0,value:"https://stg-www.contodobet.com/static/img/landing/Banner/icon2.svg",id:"5530e6bd-d2b2-4045-9371-722e23d96e14",type:"string",name:"icon"},{id:"7e5375ad-ecbb-4354-868a-b9323bcfd053",required:!1,name:"href",isImage:!1,type:"string",value:"https://www.olimpo.bet/deportes#sports/a-z"}],id:"ad0df0e2-c8ce-4524-b05a-2a29578aba11"},{id:"966bc1fc-0b1a-4a50-a4a2-964262922c3d",fields:[{isImage:!1,required:!0,id:"fc35f393-6692-4d25-a534-d51f4bd6d9a2",value:"3",name:"id",type:"string"},{isImage:!1,name:"label",value:"TOP JUEGOS",id:"a323e324-cf04-4178-b2c2-596d51564123",type:"string",required:!1},{type:"string",name:"icon",maxSizeMB:.2,value:"https://imagenesolimpo.s3.us-east-1.amazonaws.com/landing/1765981473501-icon3.svg",id:"6ede5815-7336-40fa-99f2-57ac6cb938cd",required:!0,isImage:!0},{required:!1,id:"26a486fd-31e6-4ed4-ab83-0f9a7bf6adc4",value:"https://www.olimpo.bet/casino",isImage:!1,name:"href",type:"string"}]},{id:"31e00ff9-f2dd-4942-bff3-919902fde880",fields:[{id:"fbec2c21-cf32-426f-910b-9c78a6cd714c",required:!0,isImage:!1,value:"4",name:"id",type:"string"},{isImage:!1,name:"label",type:"string",value:"MISIONES",required:!1,id:"2de80dbf-998b-4bc7-8383-4b69746ef155"},{type:"string",id:"686c62bd-ea86-4aeb-97b7-6f1488912066",required:!0,isImage:!0,maxSizeMB:.2,value:"https://stg-www.contodobet.com/static/img/landing/Banner/icon3.svg",name:"icon"},{id:"4b72f490-75e4-458e-a4b5-68f0736a25d4",isImage:!1,required:!1,type:"string",value:"https://www.olimpo.bet/private/misiones",name:"href"}]}],manualScalarFields:[{id:"7ee165a0-1268-4825-82df-9fef9857f535",type:"string",isImage:!1,value:"",required:!1,name:"groups"}],order:1,manualItems2:[{id:"13b35362-5695-4687-b6a8-645f8effd264",fields:[{isImage:!0,name:"desktopSrc",id:"eea41214-3c26-41e9-a908-d87327147396",maxSizeMB:2,type:"string",value:"https://imagenesolimpo.s3.us-east-1.amazonaws.com/landing/1768333229541-banner032.webp",required:!1},{maxSizeMB:2,isImage:!0,type:"string",name:"mobileSrc",id:"b393dfd3-c085-43e0-b68a-97cc04c06b6a",value:"https://stg-www.contodobet.com/static/img/landing/Banner/FondoMisiones.png",required:!1},{maxSizeMB:2,id:"2616b944-7cd1-4919-bc56-38ddb1a3093b",value:"https://stg-www.contodobet.com/static/img/landing/Banner/FondoMisiones.png",isImage:!0,name:"fallbackSrc",type:"string",required:!1},{name:"href",id:"54689f0e-f698-48a1-9d84-d13a397e24ea",required:!1,value:"",type:"string",isImage:!1}]},{id:"024f8130-91e1-4296-b826-cffa32ab1a96",fields:[{maxSizeMB:2,isImage:!0,value:"https://imagenesolimpo.s3.us-east-1.amazonaws.com/landing/1768852295069-ftd_web_captacion60.jpg",name:"desktopSrc",type:"string",required:!1,id:"1ebab59e-f706-4795-81cb-7accfc9f33d7"},{id:"bdebd1b0-d633-4b9e-9247-8e769cdc5b3b",type:"string",isImage:!0,required:!1,value:"https://imagenesolimpo.s3.us-east-1.amazonaws.com/landing/1768852302781-ftd_mobile_captacion60.jpg",maxSizeMB:2,name:"mobileSrc"},{isImage:!0,maxSizeMB:2,value:"https://imagenesolimpo.s3.us-east-1.amazonaws.com/landing/1768852309554-ftd_web_captacion60.jpg",id:"4bc20da7-b769-43dd-ba2e-ee9261ec73d7",name:"fallbackSrc",type:"string",required:!1},{id:"b85e737d-97ec-430c-b819-ba6e91a25372",type:"string",isImage:!1,required:!1,value:"",name:"href"}]},{id:"cbd24716-9770-418f-aa87-ae60e7e9e0ee",fields:[{maxSizeMB:2,required:!1,name:"desktopSrc",type:"string",value:"https://imagenesolimpo.s3.us-east-1.amazonaws.com/landing/1768831142801-ftd_web_tenismasters.jpg",id:"fa31486e-ec9b-4c99-b870-396d25bc66d6",isImage:!0},{isImage:!0,name:"mobileSrc",id:"954a4363-1373-44f2-b677-1bea66882838",maxSizeMB:2,type:"string",value:"https://imagenesolimpo.s3.us-east-1.amazonaws.com/landing/1768831155101-ftd_mobile_tenismasters.jpg",required:!1},{required:!1,type:"string",id:"be8789e8-cbf6-49c1-9ae5-ebc958404369",maxSizeMB:2,name:"fallbackSrc",isImage:!0,value:"https://imagenesolimpo.s3.us-east-1.amazonaws.com/landing/1768831198671-ftd_web_tenismasters.jpg"},{value:"https://www.olimpo.bet/torneos/Torneo_Olimpo_Tennis",type:"string",required:!1,isImage:!1,id:"142b0cb2-e255-4240-aea1-807a67321e34",name:"href"}]},{fields:[{required:!1,isImage:!0,id:"4414dbe4-67b3-428c-9d9d-920fff30956a",value:"https://imagenesolimpo.s3.us-east-1.amazonaws.com/landing/1768831210432-ftd_web_verano.jpg",type:"string",maxSizeMB:2,name:"desktopSrc"},{required:!1,isImage:!0,id:"b74d7582-94be-4608-8cdc-e6f8cab3e115",name:"mobileSrc",type:"string",value:"https://imagenesolimpo.s3.us-east-1.amazonaws.com/landing/1768831218073-ftd_mobile_verano.jpg",maxSizeMB:2},{id:"ada12745-3851-4a86-912c-2c9ec7c3e5de",maxSizeMB:2,value:"https://imagenesolimpo.s3.us-east-1.amazonaws.com/landing/1768831228250-ftd_web_verano.jpg",name:"fallbackSrc",type:"string",required:!1,isImage:!0},{value:"https://www.olimpo.bet/torneos/Endorphina_09012026_Casino",isImage:!1,required:!1,name:"href",type:"string",id:"e23e8b63-0ca4-436f-b53a-1bdf8d6442a6"}],id:"0d5ffdb1-d55f-47b6-9e61-e6b571bf2db2"},{id:"cf073698-ff54-4a9e-9c4f-c34b6987e8b5",fields:[{type:"string",isImage:!0,required:!1,value:"https://imagenesolimpo.s3.us-east-1.amazonaws.com/landing/1768831260900-ftd_web_virtuales.jpg",maxSizeMB:2,name:"desktopSrc",id:"1a1ef092-aff6-49c5-81be-7d76c6ac94e1"},{required:!1,value:"https://imagenesolimpo.s3.us-east-1.amazonaws.com/landing/1768831267161-ftd_mobile_virtuales.jpg",isImage:!0,type:"string",maxSizeMB:2,name:"mobileSrc",id:"901cc080-4907-47a8-8b2e-73a7b9fc27a3"},{type:"string",name:"fallbackSrc",isImage:!0,id:"8f97418b-6f27-4231-b6f8-e01e1d3c94f8",maxSizeMB:2,value:"https://imagenesolimpo.s3.us-east-1.amazonaws.com/landing/1768831274473-ftd_web_virtuales.jpg",required:!1},{type:"string",value:"https://www.olimpo.bet/torneos/Torneo_Lo_Mejor_De_Virtuales",required:!1,name:"href",isImage:!1,id:"a140f16d-8af9-474a-a77c-6ddc1651b3e5"}]}],componentKey:"OraculoSeccionBanners"},{visible:!0,dataMode:"url",apiUrl:"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%22",variableName:"items",apiParams:[],id:2,componentKey:"OraculoSeccionEventoEnVivo",order:2,manualScalarFields:[{isUrl:!1,id:"7fc591db-555b-49b2-a3ad-30aa66eff17b",required:!0,name:"title",type:"string",value:"En vivo"},{type:"string",value:"https://stg-www.contodobet.com/assets/img/home/EnVivo/icon.svg",name:"iconUrl",isUrl:!0,required:!1,id:"db4b6355-ed6c-4265-ad78-d8fffb660997"},{required:!1,value:"",type:"function",id:"e4647a65-2e60-4243-bab4-25b7ba8461f8",isUrl:!1,name:"onViewMore"},{id:"a16ab6c6-321c-4ebe-bd36-a85ad49edf3e",type:"string",isUrl:!1,required:!1,value:"",name:"className"}],title:"Eventos en vivo",apiMethod:"GET",updatedAt:"2026-01-22T04:11:09.501Z"},{visible:!0,manualScalarFields:[{name:"title",required:!0,value:"Casino",id:"c2046b5a-4d30-46ff-9513-e15a6e0b0a7e",isImage:!1,type:"string"},{required:!0,type:"string",maxSizeMB:.2,name:"iconUrl",isImage:!0,value:"https://stg-www.contodobet.com/static/img/landing/Casino/diamante.svg",id:"9c5964ca-ce84-4c47-86ec-b34d7f3a5793"},{id:"1c32ea69-598b-4f80-81e4-709d887c12c1",value:"true",name:"mosaicFirst",required:!1,type:"boolean",isImage:!1},{value:"4",type:"number",required:!1,name:"gridSize",id:"5c3c60eb-cf49-4083-ab83-67d65f829554",isImage:!1},{value:"",name:"groups",isImage:!1,id:"c4d4c4b9-0c93-4aca-a61f-042e52fd9254",required:!1,type:"string"}],variableName:"items",componentKey:"OraculoSeccionCasino",order:3,apiUrl:"https://wallet-pe.olimpo.bet/api/contents/getLobby",apiParams:[{value:"OLI",key:"company",id:"2af22a50-07e2-4a48-8569-90c79827f3e7"},{key:"lobby",id:"efa2def8-eeb4-4fcc-80f6-32c24e7804e6",value:"HOME_CASINO"}],id:4,updatedAt:"2026-01-22T04:11:09.501Z",apiMethod:"GET",dataMode:"url",title:"Casino"},{title:"Eventos Combinadas",id:1,updatedAt:"2026-01-22T04:11:09.501Z",apiParams:[],apiMethod:"GET",order:4,apiUrl:"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",manualScalarFields:[{required:!0,id:"33e5944d-b5be-4971-8c10-65aa6b71051c",name:"title",type:"string",value:"Combinadas",isImage:!1},{id:"95cd1489-206c-4a72-b4bd-b65161089f73",isImage:!0,name:"iconUrl",value:"https://imagenesolimpo.s3.us-east-1.amazonaws.com/landing/1765894618836-frame181009.svg",type:"string",dimensions:"40x40",required:!1,maxSizeMB:.2},{name:"className",value:"",id:"af234a92-41ad-4ff1-bfbb-ac63a9af19f7",type:"string",isImage:!1,required:!1},{value:"",required:!1,name:"groups",isImage:!1,id:"52f226c8-6456-4395-b72d-d140af6fa46d",type:"string"}],dataMode:"url",variableName:"items",visible:!0,componentKey:"OraculoSeccionEventoCombinadas"},{updatedAt:"2026-01-22T04:11:09.501Z",apiUrl:"https://us1.offering-api.kambicdn.com/coupon/v2018/nexuspe/coupon/3935.json?lang=es_PE&market=PE&client_id=200&channel_id=1&ncid=1764401676636&startTime=2025-11-29T06:00:00.000Z&endTime=2026-06-25T15:00:00.000Z&minNoOfEvents=0&maxNoOfEvents=25&categoryGroup=list_view_competitions",dataMode:"url",title:"Eventos de la semana",order:5,apiParams:[],variableName:"items",apiMethod:"GET",visible:!0,id:3,componentKey:"OraculoSeccionEventoSemana",manualScalarFields:[{id:"7a3de844-5727-4043-be42-7f965e2aa249",isUrl:!1,value:"Eventos esta semana",required:!1,name:"title",type:"string"},{value:"",isUrl:!0,required:!1,id:"2895f65f-e75b-4116-958d-04d4c34f16fe",name:"iconUrl",type:"string"},{type:"function",required:!1,value:"",id:"d973d3ee-721e-4d76-888c-6ad8b7bb3414",isUrl:!1,name:"onViewMore"},{required:!1,type:"string",value:"",name:"className",id:"c062fe02-c069-49fb-aae6-d39aa3fde89c",isUrl:!1}]},{componentKey:"OraculoSeccionBonoBienvenida",visible:!1,order:6,manualScalarFields:[{id:"fec2252c-2c2d-448d-8775-9d073bd8def9",value:"Te damos la",name:"headline",type:"string",required:!1,isUrl:!1},{name:"headline2",required:!1,id:"17e045d1-8ddb-46bc-b3ae-ae0c7ffc5952",isUrl:!1,value:"bienvenida al club",type:"string"},{type:"string",required:!1,isUrl:!0,name:"backgroundImageUrl",value:"https://stg-www.contodobet.com/static/img/landing/Bonos/Fondobg.png",id:"cae601b0-ed5d-4b97-9e1f-1816d7986c6b"}],variableName:"items",title:"Bono Bienvenida",updatedAt:"2026-01-22T04:11:09.501Z",manualItems:[{id:"8677b338-7d12-4ba9-a95f-d34ed71d92b0",fields:[{value:"Recibe",type:"string",name:"title",isUrl:!1,required:!0,id:"e015fc5e-983e-4096-b82e-6d5ed9957dd5"},{value:"S/60",required:!1,name:"amount",type:"string",id:"00b69888-d8ee-4bae-943c-be4e0dead26b",isUrl:!1},{name:"subtitle",required:!1,isUrl:!1,id:"376cd731-4a20-4435-a5ee-351ac55d4351",value:"SIN ROLLOVER",type:"string"},{value:"Hazlo aquí",name:"buttonText",required:!0,id:"3b73cff5-cb30-4b00-9b41-305455334e56",type:"string",isUrl:!1},{isUrl:!0,type:"string",required:!0,name:"backgroundImage",value:"https://stg-www.contodobet.com/static/img/landing/Bonos/Fondo.png",id:"89710b59-2a6a-4de8-be9a-7d9274bad84b"},{isUrl:!1,name:"onButtonClick",value:"window.location='https://www.olimpo.bet/promociones/Adq_Recibe30Flex_AAP100'",type:"function",required:!1,id:"e7ceaadc-b203-4587-856b-b9015201a43f"}]},{fields:[{id:"81e1730c-0f9b-4ab9-a4df-f36c974ae99d",required:!0,type:"string",name:"title",value:"Regístrate y recibe",isUrl:!1},{required:!1,value:"S/40",name:"amount",type:"string",isUrl:!1,id:"c1e96d9b-e7c7-4bb7-a8db-b67c32dcae32"},{required:!1,isUrl:!1,name:"subtitle",value:"SIN ROLLOVER",type:"string",id:"93242ead-5f09-4966-9484-471b27859c31"},{id:"0d97802b-7aaf-4ae3-b513-8a5a469e5d5d",value:"Hazlo aquí",name:"buttonText",type:"string",isUrl:!1,required:!0},{required:!0,isUrl:!0,id:"541fcdc8-07a7-47b8-9a33-d22cb865823c",name:"backgroundImage",value:"https://stg-www.contodobet.com/static/img/landing/Bonos/Fondo.png",type:"string"},{isUrl:!1,name:"onButtonClick",id:"b8c4b96c-0807-4040-8c3e-8392fb278aab",required:!1,type:"function",value:"window.location='https://www.olimpo.bet/promociones/Adq_Recibe30Flex_AAP100'"}],id:"6707ce1d-064a-43af-8679-712c7235873a"}],id:11,dataMode:"manual"},{dataMode:"url",componentKey:"OraculoSeccionCasinoEnVivo",order:7,title:"Casino en vivo",updatedAt:"2026-01-22T04:11:09.501Z",id:12,apiUrl:"https://wallet-pe.olimpo.bet/api/contents/getLobby",apiMethod:"POST",manualScalarFields:[{isImage:!1,value:"Casino en vivo",type:"string",name:"title",id:"52e655b4-7259-4f7f-9017-dafe24247810",required:!0},{required:!1,isImage:!1,id:"e299d500-abdc-4577-bb38-1943b6f02dfd",name:"subtitle",type:"string",value:"Disfruta la emoción en tus juegos favoritos y gana en tiempo real."},{isImage:!0,dimensions:"1080x1920",value:"https://stg-www.contodobet.com/static/img/landing/CasinoEnVivo/FondoMobile.png",name:"backgroundMobileUrl",required:!1,id:"6dcfd666-c2db-4a19-9fbf-08167bf56ae0",type:"string",maxSizeMB:2},{type:"string",maxSizeMB:2,name:"backgroundDesktopUrl",isImage:!0,id:"2aa55855-0865-4cf1-a1ee-e52db864c6b4",value:"https://stg-www.contodobet.com/static/img/landing/CasinoEnVivo/FondoDesktop.png",dimensions:"1920x1080",required:!1},{isImage:!1,name:"groups",type:"string",value:"",id:"e1599845-59d4-4320-903b-3857453b4322",required:!1}],variableName:"items",apiParams:[{key:"company",value:"OLI",id:"2822fa64-0e89-43ea-9c80-ee77076c95bd"},{key:"lobby",value:"HOME_CASINOENVIVO",id:"2d6f8267-0468-4320-976d-b01df40e8ca3"}],visible:!0},{order:8,title:"Oraculo Seccion Top Juegos",visible:!0,dataMode:"url",apiMethod:"GET",componentKey:"OraculoSeccionTopJuegos",updatedAt:"2026-01-22T04:11:09.501Z",manualScalarFields:[{isImage:!1,value:"Top juegos",type:"string",required:!0,name:"title",id:"a01c36e7-a551-4c92-89e0-e9eabcdbe344"},{required:!0,type:"string",id:"1960df1d-b07e-4461-b55f-39834ac30d8e",maxSizeMB:.2,value:"https://imagenesolimpo.s3.us-east-1.amazonaws.com/landing/1768597100868-virtuales.webp",isImage:!0,name:"iconUrl"},{value:"",name:"groups",isImage:!1,type:"string",id:"63dab0f6-b4d1-47af-b1e7-d3dcf4c69c4e",required:!1}],apiParams:[{id:"2bcfd8cd-8f1f-474f-beb4-170477acf9bd",value:"OLI",key:"company"},{id:"dac0b2d9-f00d-4979-9deb-31c6f66b1899",key:"lobby",value:"HOME_TOPJUEGOS"}],apiUrl:"https://wallet-pe.olimpo.bet/api/contents/getLobby",id:13,variableName:"items"},{apiMethod:"GET",componentKey:"OraculoSeccionDestacados",id:6,variableName:"items",title:'Promociones "Lo nuevo"',order:9,apiParams:[{id:"a2ee1b32-dc39-434f-9358-920e6c7bba0b",value:"OLI",key:"company"},{id:"16715513-30a1-4955-8e94-a4deee4722ba",value:"DESTACADOS",key:"lobby"}],dataMode:"url",updatedAt:"2026-01-22T04:11:09.501Z",apiUrl:"https://wallet-pe.olimpo.bet/api/contents/getPromotionsLobby",manualScalarFields:[{id:"f131acc5-a298-4583-9952-c0747dc1f1af",name:"title",type:"string",value:"Lo nuevo",required:!0,isImage:!1},{id:"8f0dadc8-ff0f-4074-870f-2bbcd9f38cab",required:!0,name:"iconUrl",type:"string",maxSizeMB:.2,dimensions:"40x40",value:"https://stg-www.contodobet.com/static/img/landing/Destacados/starIcon.svg",isImage:!0},{isImage:!1,type:"string",name:"className",value:"",required:!1,id:"39cd368d-0003-4145-88a9-f22b1a4ef32b"},{isImage:!1,type:"string",value:"",name:"groups",required:!1,id:"a9e218fd-9cc6-432f-a7bf-c119581e6927"}],visible:!0},{title:"Club Olimpo",componentKey:"OraculoSeccionClubOlimpo",dataMode:"manual",visible:!0,variableName:"items",manualItems:[{fields:[{required:!0,id:"65b37bc4-f480-4409-afd7-ff8b83c722e0",value:"¡Canjea bonos, productos y las mejores experiencias!",isUrl:!1,name:"text",type:"string"},{id:"cdc8fb20-5c5a-4165-93be-4df1026cdcee",required:!1,name:"buttonLabel",value:"Vamos",type:"string",isUrl:!1},{value:"",name:"imgAlt",type:"string",required:!1,id:"9f25442e-caeb-4fab-9bea-b91f1aef97eb",isUrl:!1},{id:"259ffa74-7e4f-48e6-90da-4837f2c37fe9",isUrl:!0,name:"imgMobile",type:"string",required:!0,value:"https://stg-www.contodobet.com/static/img/landing/ClubOlimpo/FondoMobile.png"},{value:"https://stg-www.contodobet.com/static/img/landing/ClubOlimpo/FondoDesktop.png",id:"e7812141-42d8-419f-9d15-b8711139e980",required:!1,type:"string",isUrl:!0,name:"imgDesktopBg"},{name:"imgDesktopLogo",id:"622d860b-9f9f-462a-a675-3768d6daf3c3",value:"https://stg-www.contodobet.com/static/img/landing/ClubOlimpo/Logo.png",required:!1,type:"string",isUrl:!0},{name:"onClick",id:"cc465fd9-907d-427a-b5bb-e0963bdd833a",value:"",required:!1,type:"function",isUrl:!1}],id:"03e20297-c0fa-4382-85b2-54eaa9325be1"}],id:8,updatedAt:"2026-01-22T04:11:09.501Z",order:10},{updatedAt:"2026-01-22T04:11:09.501Z",dataMode:"url",title:"Virtuales",order:11,variableName:"items",componentKey:"OraculoSeccionVirtuales",id:7,apiParams:[{value:"OLI",key:"company",id:"de915e1d-1742-4383-bd83-ed96fda1145a"},{key:"lobby",value:"HOME_VIRTUALES",id:"039b41a3-4e94-4a52-8798-e78d8651c090"}],apiMethod:"GET",manualScalarFields:[{required:!0,name:"title",id:"f6b16510-51db-4124-864d-2d12a0bb1b23",value:"Virtuales",type:"string",isImage:!1},{type:"string",id:"f9686ddc-f673-4784-8025-df26f48cc04f",value:"https://stg-www.contodobet.com/static/img/landing/Virtuales/virtuales.svg",maxSizeMB:.2,required:!0,isImage:!0,name:"iconUrl"},{type:"boolean",id:"4c4f348c-cb17-4fd6-bc4d-f816a42da249",name:"mosaicFirst",isImage:!1,value:"true",required:!1},{id:"c264c9c3-7178-4961-b366-163d9b818800",type:"number",name:"gridSize",value:"4",required:!1,isImage:!1},{id:"2310900e-68ce-4a64-89da-e0976d172fee",required:!1,type:"string",value:"",isImage:!1,name:"groups"}],visible:!0,apiUrl:"https://wallet-pe.olimpo.bet/api/contents/getLobby"},{title:"Medios de Pago",id:10,order:12,componentKey:"OraculoSeccionMediosPago",visible:!0,updatedAt:"2026-01-22T04:11:09.501Z"}]},pn=t=>typeof t=="function"||t&&typeof t=="object"&&"$$typeof"in t,fn=t=>/^OraculoSeccion[A-Z]/.test(t);function Ee(t){return t&&Array.isArray(t.sections)?t.sections.slice().sort((a,n)=>{var o,s;return((o=a.order)!=null?o:0)-((s=n.order)!=null?s:0)}).map((a,n)=>({...a,order:n+1})):t&&Array.isArray(t.components)?t.components.map((a,n)=>{var o,s,r,d,f;return{id:(o=a.id)!=null?o:n+1,title:(s=a.title)!=null?s:"",componentKey:a.componentKey,visible:(r=a.visible)!=null?r:!0,order:n+1,props:(d=a.props)!=null?d:{},apiUrl:(f=a.apiUrl)!=null?f:"",dataMode:a.dataMode,variableName:a.variableName,manualItems:a.manualItems,apiMethod:a.apiMethod,apiParams:a.apiParams}}):[]}const gn=Object.fromEntries(Object.entries(mn).filter(([t,a])=>fn(t)&&pn(a))),hn=t=>{try{return Object.fromEntries(t!=null?t:[])}catch{return console.warn("[oraculo] extras inválidos. Debe ser Array<[string, unknown]>",t),{}}};class We extends Error{constructor(a,n,o){super(`HTTP ${a} ${o}`),this.status=a,this.url=n,this.statusText=o,this.name="HttpError"}}const Ge=["OraculoSeccionEventoEnVivo","OraculoSeccionEventoSemana","OraculoSeccionEventoCombinadas"],wt=({sectionsOverride:t,docId:a="home",db:n,extras:o,loader:s,disableWrapper:r=!1})=>{const d=h.useMemo(()=>hn(o),[o]),f=s||d.loader,[b,x]=h.useState([]),[i,m]=h.useState(!1),[u,_]=h.useState({}),[v,I]=h.useState({}),[O,B]=h.useState({}),j=U.useMediaQuery("(min-width:1024px)");h.useEffect(()=>{if(t)return;if(!n){console.warn("[landing] sin db -> fallback json"),x(Ee(De));return}const g=(c,p)=>{console.warn("[landing] FALLBACK:",c,p!=null?p:""),x(Ee(De)),m(!1)};if(process.env.NEXT_PUBLIC_LANDING_FORCE_FALLBACK==="1"){m(!0),g("forzado por env");return}m(!0);const l=Fe.onSnapshot(Fe.doc(n,"landings",a),c=>{try{if(!c.exists()){g(`doc landings/${a} no existe`);return}const p=c.data(),y=Ee(p);if(!y.length){g("JSON inválido o sin secciones normalizables",p);return}console.log("[landing] Firestore OK (json grande):",p),x(y)}catch(p){g("error procesando snapshot",p)}finally{m(!1)}},c=>{g("error onSnapshot",c)});return()=>l()},[t,a,n]),h.useEffect(()=>(Ba(d),()=>Na()),[d]),h.useEffect(()=>{(t?t.slice():b.slice()).map(c=>c.componentKey).filter(c=>!!c).length},[t,b]);const C=async g=>{if(Ge.includes(g.componentKey))return{items:[],events:[],data:{}};const l=(g.apiUrl||"").trim();if(!l)return;const c=g.apiMethod||"GET",p=g.apiParams||[];let y=l,k,$;if(c==="GET"){const G=new URL(l,typeof window=="undefined"?"http://localhost":window.location.origin);for(const V of p)V.key&&G.searchParams.append(V.key,V.value);y=G.toString()}else{const G=new URLSearchParams;for(const V of p)V.key&&G.append(V.key,V.value);k=G.toString(),$={"Content-Type":"application/x-www-form-urlencoded; charset=UTF-8"}}const A=await fetch(y,{method:c,headers:$,body:k});if(!A.ok)throw new We(A.status,y,A.statusText);return A.json()},N=h.useMemo(()=>t?t.slice():b.slice(),[t,b]),E=re.default.useRef(new Set);h.useEffect(()=>{const g=N.map(l=>({s:l,url:(l.apiUrl||"").trim()})).filter(({url:l})=>!!l);if(g.length)for(const{s:l,url:c}of g){const p=`${l.id}|${c}`;E.current.has(p)||(E.current.add(p),I(y=>({...y,[l.id]:!0})),B(y=>({...y,[l.id]:""})),(async()=>{try{const y=await C(l);_(k=>({...k,[l.id]:y}))}catch(y){let k="Error desconocido";y instanceof We?k=`Error HTTP ${y.status} (${y.statusText}) en ${y.url}`:y instanceof SyntaxError?k="Respuesta no es JSON válido":y instanceof TypeError?k="Fallo de red / CORS / conexión":typeof y=="string"&&(k=y.toString()),B($=>({...$,[l.id]:k}))}finally{I(y=>({...y,[l.id]:!1}))}})())}},[N]);const M=h.useMemo(()=>N.filter(g=>g.visible).sort((g,l)=>g.order-l.order),[N]),w=g=>Array.isArray(g)?g.map(l=>{const c={};for(const p of l.fields||[]){const y=(p.type||"string").toLowerCase();if(y==="number"){const k=String(p.value||"").trim();if(k!==""){const $=Number(k);Number.isNaN($)||(c[p.name]=$)}}else if(y==="boolean")c[p.name]=String(p.value).toLowerCase()==="true";else if(y==="function"){const k=String(p.value||"").trim();if(k)try{const $=new Function(k);c[p.name]=$}catch($){console.error(`❌ Error creando función en item '${p.name}':`,$)}}else c[p.name]=p.value}return c}):[],L=g=>{const l={};if(!Array.isArray(g))return l;for(const c of g){if(!c.name)continue;const p=(c.type||"string").toLowerCase();if(p==="number"){const y=String(c.value||"").trim();if(y!==""){const k=Number(y);Number.isNaN(k)||(l[c.name]=k)}}else if(p==="boolean")l[c.name]=String(c.value).toLowerCase()==="true";else if(p==="function"){const y=String(c.value||"").trim();if(y)try{const k=new Function(y);l[c.name]=k}catch(k){console.error(`❌ Error creando función en item '${c.name}':`,k)}}else l[c.name]=c.value}return l},P=(g,l,c)=>{const p=c?{...c}:{};if(l){const V=(l.variableName||"items").trim()||"items";return p[V]=l.arr||[],p}const y=g,k=Array.isArray(y),$=!k&&typeof y=="object"&&y!==null?y:void 0,A=$&&Array.isArray($.lobby||$.items)?$.lobby||$.items:void 0,G=V=>k?y:A||V;return p.items=G(A||[]),p},S=g=>{var k;const l=!!((k=g.apiUrl)!=null&&k.trim()),c=l?u[g.id]:void 0;let p=g.props?{...g.props}:{};const y=L(g.manualScalarFields);if(Ge.includes(g.componentKey))return{items:c,...p,...y};if(p={...p,...y},l)p=P(c,null,p);else if(g.dataMode==="manual"){const $=w(g.manualItems);if(p=P(null,{arr:$,variableName:g.variableName},p),g.variableName2&&g.manualItems2){const A=w(g.manualItems2),G=(g.variableName2||"items2").trim()||"items2";p[G]=A}}return p},T=(g,l,c)=>{const p={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 ${p[l]}`,children:c},g)},F=g=>{var le;const l=g.componentKey,c=gn[l];if(!c)return console.warn(`No hay componente registrado para "${l}"`),T(g.id,"component",`Componente "${l}" no encontrado`);const p=!!((le=g.apiUrl)!=null&&le.trim()),y=p?u[g.id]:void 0,k=p?!!v[g.id]:!1,$=p?O[g.id]:"";if(p){if(k&&!y)return T(g.id,"loading",`Cargando datos desde ${g.apiUrl}...`);if($&&!y)return T(g.id,"error",`Error cargando ${g.apiUrl}: ${$}`)}const A=S(g),V=new Set(["OraculoSeccionBanners","OraculoSeccionBonoBienvenida","OraculoSeccionCasinoEnVivo",...j?[]:["OraculoSeccionClubOlimpo","OraculoSeccionEventoEnVivo","OraculoSeccionEventoSemana","OraculoSeccionEventoCombinadas","OraculoSeccionVirtuales","OraculoSeccionDestacados","OraculoSeccionCasino"]]).has(g.componentKey),W=j?120:24,Z=(j?8:5)*8,ne=g.componentKey==="OraculoSeccionCasinoEnVivo",me={width:"100%",boxSizing:"border-box",...V?{}:{paddingLeft:W,paddingRight:W},...ne?{marginTop:-Z,marginBottom:-Z}:{}};return e.jsx("div",{style:me,className:"oraculo-section-wrapper",children:e.jsx(c,{...A})},g.id)};return i&&!t?f?e.jsx(f,{}):e.jsx("div",{children:"Cargando..."}):!i&&!t&&b.length===0?e.jsx("div",{className:"text-xs text-gray-500",children:"Sin secciones (Firestore)"}):r?e.jsx(we,{children:e.jsx(ve,{docId:a,children:e.jsx(e.Fragment,{children:M.map(F)})})}):e.jsx(we,{children:e.jsx(ve,{docId:a,children:e.jsx(U.Container,{className:"oli-font",maxWidth:!1,disableGutters:!0,sx:{backgroundColor:"#121212",position:"relative",pb:5,width:"100%",maxWidth:"100%",overflowX:"hidden"},children:e.jsx(U.Stack,{direction:"column",spacing:j?8:5,useFlexGap:!0,children:M.map(F)})})})})};exports.DocIdProvider=ve;exports.OraculoButton=D;exports.OraculoCarousel=ae;exports.OraculoCarouselDots=ke;exports.OraculoClubOlimpoVisual=tt;exports.OraculoEventCombinadasCard=it;exports.OraculoEventEnVivoCard=st;exports.OraculoEventHeader=Ye;exports.OraculoEventLabel=$e;exports.OraculoEventLeague=Me;exports.OraculoEventScore=Be;exports.OraculoEventSemanaCard=rt;exports.OraculoEventStatus=Xe;exports.OraculoEventStatusBadge=Je;exports.OraculoEventTeamInfo=fe;exports.OraculoGameCard=pe;exports.OraculoGameRankCard=Qe;exports.OraculoGameSlide=Ne;exports.OraculoGridGroup=J;exports.OraculoLiveCasinoCard=et;exports.OraculoLogoMediosPago=Ie;exports.OraculoPageLandingPreview=wt;exports.OraculoSeccionBanners=_t;exports.OraculoSeccionBonoBienvenida=gt;exports.OraculoSeccionCasino=mt;exports.OraculoSeccionCasinoEnVivo=dt;exports.OraculoSeccionClubOlimpo=ht;exports.OraculoSeccionDestacados=lt;exports.OraculoSeccionEventoCombinadas=bt;exports.OraculoSeccionEventoEnVivo=xt;exports.OraculoSeccionEventoSemana=vt;exports.OraculoSeccionMediosPago=yt;exports.OraculoSeccionTopJuegos=Le;exports.OraculoSeccionVirtuales=ft;exports.OraculoSectionHost=un;exports.OraculoSectionTitle=te;exports.OraculoThemeProvider=we;exports.OraculoTopJuegoItem=Le;exports.OraculoWelcomeBanner=Te;exports.default=wt;
|
|
20
20
|
//# sourceMappingURL=index.cjs.js.map
|