@simple-parlay/components 1.30.6-pre → 1.30.6-pre.2

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.
@@ -74,7 +74,7 @@ return T(z,{style:{gap:i?24:16,paddingBottom:64,width:"100%"},children:[/* @__PU
74
74
  return W(z,{style:{flexDirection:"row",borderBottomWidth:1,borderBottomColor:e.border,marginBottom:16,width:"100%"},children:[0,1].map(t=>/* @__PURE__ */T(z,{style:{flexDirection:"row",alignItems:"center",gap:8,paddingHorizontal:16,paddingVertical:10},children:[/* @__PURE__ */W(Gn,{color:e.textMuted,style:{height:14,width:68}}),/* @__PURE__ */W(Gn,{color:e.textMuted,style:{height:20,width:20,borderRadius:999}})]},t))})}function Jn({colors:e}){/* @__PURE__ */
75
75
  return T(z,{style:{borderRadius:8,borderWidth:1,borderColor:e.border,backgroundColor:Nn(e),overflow:"hidden",width:"100%"},children:[/* @__PURE__ */T(z,{style:{width:"100%",paddingHorizontal:16,paddingVertical:12,flexDirection:"row",alignItems:"center",justifyContent:"space-between",gap:12},children:[/* @__PURE__ */T(z,{style:{flex:1,minWidth:0,gap:6},children:[/* @__PURE__ */W(Gn,{color:e.textMuted,style:{height:18,width:160,maxWidth:"75%"}}),/* @__PURE__ */W(Gn,{color:e.textMuted,style:{height:12,width:128,maxWidth:"65%"}})]}),/* @__PURE__ */T(z,{style:{flexDirection:"row",alignItems:"center",gap:12,flexShrink:0},children:[/* @__PURE__ */W(Gn,{color:e.textMuted,style:{height:14,width:40}}),/* @__PURE__ */W(Gn,{color:e.textMuted,style:{height:24,width:60,borderRadius:999}})]})]}),/* @__PURE__ */W(z,{style:{borderTopWidth:1,borderTopColor:e.border,width:"100%"},children:[0,1,2].map(t=>/* @__PURE__ */T(z,{style:{paddingHorizontal:16,paddingVertical:10,flexDirection:"row",alignItems:"center",justifyContent:"space-between",gap:12,borderTopWidth:0===t?0:1,borderTopColor:e.border},children:[/* @__PURE__ */T(z,{style:{flex:1,minWidth:0,gap:4},children:[/* @__PURE__ */W(Gn,{color:e.textMuted,style:{height:14,width:"88%"}}),/* @__PURE__ */W(Gn,{color:e.textMuted,style:{height:12,width:"70%"}})]}),/* @__PURE__ */W(Gn,{color:e.textMuted,style:{height:20,width:40,borderRadius:4}})]},t))})]})}function $n({colors:e,rows:t=2}){/* @__PURE__ */
76
76
  return T(z,{style:{width:"100%"},children:[/* @__PURE__ */W(Qn,{colors:e}),/* @__PURE__ */W(z,{style:{gap:12,width:"100%"},children:Array.from({length:t}).map((t,n)=>/* @__PURE__ */W(Jn,{colors:e},n))})]})}function _n({colors:e,bodyFont:t,message:n,variant:o="category",gameCardCount:i=3,categoryCount:r=2,showTierTabs:l=!1}){const a=n?.trim()||"Loading",c=(()=>{switch(o){case"sport":/* @__PURE__ */return W(Vn,{colors:e,count:Math.max(r,2)});case"event":/* @__PURE__ */return W(Un,{colors:e});case"games":/* @__PURE__ */return W(Zn,{colors:e,count:i,showTierTabs:l});case"propositions":/* @__PURE__ */return W(Xn,{colors:e});case"entries":/* @__PURE__ */return W($n,{colors:e,rows:2});default:/* @__PURE__ */return W(Yn,{colors:e,count:r})}})();/* @__PURE__ */
77
- return T(z,{accessibilityRole:"progressbar",accessibilityLabel:a,accessibilityLiveRegion:"polite",style:{width:"100%"},children:[n?.trim()?/* @__PURE__ */W(S,{style:{fontSize:14,textAlign:"center",marginBottom:16,color:e.textMuted,fontFamily:t},children:n}):null,c]})}function eo(e){return e.homeTeam&&e.awayTeam?`${e.homeTeam} vs ${e.awayTeam}`:e.homeTeam??e.awayTeam??e.id}function to(e){return(e??"").trim().toLowerCase().replace(/[^a-z0-9]+/g,"")}function no(e){if(!e||e.quick_pick_only)return!1;const t=to(e.selection_scope);if("samegamemulti"===to(e.rule)||!0===e.require_same_event||"singleevent"===t||"sameevent"===t)return!0;const n=[e.game_name,e.game_name_template].map(to);return n.includes("samegame")||n.includes("samegamemulti")}function oo(e){return(e.eventId??e.event_id)?.trim()||null}function io(e){const t=/* @__PURE__ */new Map;for(const n of e){if(!co(n))continue;const e=oo(n);if(!e)continue;const o=t.get(e);o?(o.propositionCount+=1,o.homeTeam=ro(o.homeTeam,n.home_team),o.awayTeam=ro(o.awayTeam,n.away_team),o.sport=ro(o.sport,n.sport),o.league=ro(o.league,n.league),o.commenceTime=ao(o.commenceTime,n.commence_time)):t.set(e,{id:e,homeTeam:n.home_team?.trim()||void 0,awayTeam:n.away_team?.trim()||void 0,commenceTime:n.commence_time?.trim()||void 0,sport:n.sport?.trim()||void 0,league:n.league?.trim()||void 0,propositionCount:1})}return[...t.values()].sort((e,t)=>{const n=lo(e.commenceTime),o=lo(t.commenceTime);return n!==o?n-o:e.id.localeCompare(t.id)})}function ro(e,t){const n=t?.trim();return n?e&&e.localeCompare(n)<=0?e:n:e}function lo(e){if(!e)return Number.MAX_SAFE_INTEGER;const t=new Date(e).getTime();return Number.isFinite(t)?t:Number.MAX_SAFE_INTEGER}function ao(e,t){const n=t?.trim();if(!n)return e;if(!e)return n;const o=lo(e),i=lo(n);return i!==o?i<o?n:e:e.localeCompare(n)<=0?e:n}function co(e){return!1!==e.bettable&&!0!==e.is_suspended&&!0!==e.is_expired&&!0!==e.is_voided&&!0!==e.is_composite_component}function so(e,t){return t?e.filter(e=>co(e)&&oo(e)===t):[]}function ho(e,t){return!!t&&e.length>0&&e.every(e=>co(e)&&oo(e)===t)}var uo={signature:1,premier:2,exclusive:3},go=[{id:"signature",label:"Signature Games",shortLabel:"Signature",level:1},{id:"premier",label:"Premier Games",shortLabel:"Premier",level:2},{id:"exclusive",label:"Exclusive Games",shortLabel:"Exclusive",level:3}];function fo(e){return"number"==typeof e.tier&&Number.isFinite(e.tier)?e.tier:1}function po(e,t){return e.filter(e=>fo(e)===t)}function yo(e){const t=new Set(e.map(fo));return go.filter(e=>t.has(e.level))}function mo(e){return yo(e)[0]?.id??"signature"}var bo=4,wo=6,xo=[4,12],ko=[5,10,20,50];function So(e){return!!e&&!e.quick_pick_only&&"safety_net"===(e.rule??"").trim().toLowerCase()}function Co(e){const t=e.payout_structure;return{margin:e.operator_margin??0,perLegProbability:t?.per_leg_probability??.5,perfectMultiple:t?.perfect_prize?.stake_multiple??25,perfectBaseLegs:t?.perfect_prize?.base_legs??6,nearMissBudgetFraction:t?.near_miss?.budget_fraction??.5,roundTo:t?.round_to??5}}function Bo(e,t){return t>0&&e>=t?Math.round(e/t)*t:Math.round(e)}function zo(e,t){if(t<0||t>e)return 0;let n=1;for(let o=0;o<t;o+=1)n=n*(e-o)/(o+1);return Math.round(n)}function Fo(e,t,n,o){const i=Math.max(0,Math.min(n,t)),r=e*o.perfectMultiple*Math.pow(2,t-o.perfectBaseLegs),l=i>0?e*(1-o.margin)*o.nearMissBudgetFraction/i:0,a=Math.pow(1/o.perLegProbability,t),c=[];let s=zo(t,0);for(let d=1;d<=i;d+=1)s+=zo(t,d),c.push(Bo(l*a/s,o.roundTo));return{legs:t,stake:e,allowedMisses:i,perfect:r,nearMiss:c,sweep:r+c.reduce((e,t)=>e+t,0)}}function vo(e,t){if(t<0||t>e.allowedMisses)return 0;let n=0===t?e.perfect:0;for(let o=Math.max(1,t);o<=e.nearMiss.length;o+=1)n+=e.nearMiss[o-1];return n}function Wo(e){return e.includes(8)?8:e[Math.floor(e.length/2)]}function To(e){return e.toLowerCase().replace(/[^a-z]+/g," ").trim()}function Ao(e,t){const n=To(t);return e.permitted_rules?.find(e=>To(e.name??"").includes(n))??null}function Ro(e,t,n){const o=t?.min_propositions??n,i=t?.max_propositions??null;return e.filter(e=>e>=o&&(null==i||e<=i))}function Lo(e){if(!So(e)||!e)return null;const t=e.min_propositions??e.allowed_propositions?.[0]??xo[0],n=e.max_propositions??e.allowed_propositions?.[e.allowed_propositions.length-1]??xo[1],o=e.allowed_propositions&&e.allowed_propositions.length>0?[...e.allowed_propositions].sort((e,t)=>e-t):Array.from({length:Math.max(0,n-t+1)},(e,n)=>t+n),i=Ao(e,"Extra Shot"),r=Ao(e,"Double Shot"),l=Ro(o,i,4).filter(e=>e>1),a=Ro(o,r,6).filter(e=>e>2);if(0===l.length)return null;const c=[{id:"extra_shot",label:"Extra Shot",allowedMisses:1,stat:"Bigger payout",explain:"Miss one leg and you win the All but 1 prize. Get every leg right and you win both — the Perfect prize on top.",legOptions:l,defaultLegs:Wo(l),ruleId:i?.id??null}],s=!e.permitted_rules?.length||!!r;a.length>0&&s&&c.push({id:"double_shot",label:"Double Shot",allowedMisses:2,stat:"Safer play",explain:"Miss two legs and you win the All but 2 prize. Miss one and you win two prizes. Get every leg right and you win all three — the whole stack.",legOptions:a,defaultLegs:Wo(a),ruleId:r?.id??null});const d=Math.max(e.min_bet??5,.01),h=e.max_bet??null,u=ko.filter(e=>null===h||e<=h);return{modes:c,defaultModeId:"extra_shot",defaultStake:Math.min(Math.max(10,d),h??10),minStake:d,maxStake:h,quickAdds:u,tagline:"The wider the safety net, the more misses it catches. The narrower it is, the bigger the top prize.",pricing:Co(e)}}function Do(e){return[{id:`target-${e}`,label:"Perfect pick",stat:"Top payout",detail:["Get every pick right","nothing else pays"],emphasis:!0,expectedCorrect:e}]}function Mo(e,t,n){const o=Math.max(0,e-t),i=Fo(20,e,o,n),r=[];for(let l=0;l<=o;l+=1){const t=Math.round(vo(i,l));r.push({misses:l,label:`${e-l}/${e}`,multiplier:t/20,payout20:t})}return r}function Po(e,t){return[{id:"net-1",label:"Extra Shot",stat:"Bigger payout",detail:["One wrong wins a prize","Perfect wins both","Miss twice and the ticket does not pay"],dividends:Mo(e,e-1,t),expectedCorrect:e-1},{id:"net-2",label:"Double Shot",stat:"Safer play",detail:["Two wrong wins a prize","One wrong wins two","Perfect wins all three"],dividends:Mo(e,e-2,t),expectedCorrect:e-2}]}function Ho(e,t){if(!e||e.quick_pick_only)return null;const n=function(e){return(e??"").trim().toLowerCase()}(e.rule),o=t??e.num_propositions??e.min_propositions??e.allowed_propositions?.[0]??0;return"safety_net"===n&&o>0?function(e,t){return{mode:"selection",kind:"safety_net",title:"Choose your safety net",headline:"2 Ways to PLAY, more ways to PAY",heroTagline:"The wider the safety net, the more misses it catches. The narrower it is, the bigger the top prize.",legCount:t,options:Po(t,Co(e)),continueLabel:"Continue to picks"}}(e,o):"exact"===n&&o>0?function(e,t){return{mode:"selection",kind:"exact",title:"All or nothing",headline:"Get it PERFECT, take the top PAY",heroTagline:"Every pick has to land. Miss a single one and the ticket is gone — but a clean sweep pays the biggest prize.",legCount:t,options:Do(t),continueLabel:"Continue to picks"}}(0,o):"pick"===n&&o>0?function(e,t){return{mode:"description",kind:"pick",title:"How it plays",headline:"Every hit PLAYS, every hit PAYS",heroTagline:"No all-or-nothing — your multiplier climbs with every correct pick.",legCount:t,highlights:["Make your yes/no picks across the available markets","Each correct pick pushes your multiplier higher","Land fewer than the full card and you can still cash"],continueLabel:"Continue to picks"}}(0,o):null}function Oo(e){return null!=Ho(e)}var Io=[500,1e3,2500,5e3,7500,1e4,12500,15e3],Eo=[12,11,10,9,8,7,6];function jo(e){return!!e&&!e.quick_pick_only&&"pick_your_dividend"===(e.rule??"").trim().toLowerCase()}function No(e){return Math.round(100*e)/100}function Go(e,t,n=.21875){const o=Math.pow(2,t),i=e/(1-n)/o,r=Number.isInteger(i),l=No(i),a=r?i:No(.96*i);return{legs:t,exactStake:l,stake:a,margin:1-e/(a*o),multiple:e/a,oddsOneIn:o,discounted:!r}}function Yo(e,t=Eo){return{dividend:e,rungs:t.map(t=>Go(e,t))}}function Vo(e,t){if(!jo(e)||!e)return null;const n=e.min_propositions??6,o=e.max_propositions??12,i=Eo.filter(e=>e>=n&&e<=o);if(0===i.length)return null;const r=t?.dividends??Io;return{dividends:r.map(e=>Yo(e,i)),defaultDividend:r.includes(1e4)?1e4:r[Math.floor(r.length/2)],defaultLegs:i.includes(9)?9:i[Math.floor(i.length/2)],tagline:"The dividend is set. The win is yours to build."}}function Uo(e,t){const n=e.allowed_propositions&&e.allowed_propositions.length>0?e.allowed_propositions.map(Number):[],o=e.min_propositions??e.num_propositions??null,i=e.max_propositions??e.num_propositions??null,r=0===n.length&&null!==o&&null!==i&&i>0,l=n.length>0?n:r?Ln(o,i):[],a=/* @__PURE__ */new Map;for(const p of t?.top_payouts??[]){const e=Number(p.proposition_count),t=Number(p.net_payout),n=Number(p.bet_amount??20);!Number.isFinite(e)||e<=0||a.set(e,{count:e,payout:Number.isFinite(t)?t:0,betAmount:Number.isFinite(n)&&n>0?n:20})}for(const p of l){const e=Number(p);a.has(e)||a.set(e,{count:e,payout:0,betAmount:20})}const c=Array.from(a.values()).sort((e,t)=>e.count-t.count),s=l.length>0?Math.max(...l.map(Number)):0,d=jo(e)?Vo(e):null,h=d?d.dividends.map(e=>({dividend:e.dividend,stakeFrom:Math.min(...e.rungs.map(e=>e.stake))})):void 0,u=d?[]:c.map(e=>({count:e.count,payout20:e.payout>0&&e.betAmount>0?e.payout/e.betAmount*20:0})),g=Ho(e,s),f="safety_net"===g?.kind?(g.options??[]).flatMap(e=>e.dividends?.length?[{id:e.id,label:e.label,tiers:e.dividends.map(e=>({label:e.label,payout20:e.payout20}))}]:[]):[];return{legOptions:l.map(Number),maxLegCount:s,tiers:u,modes:f,pydDividends:h,hasGenericDividends:(n.length>0||r)&&u.some(e=>e.payout20>0),minBet:Math.max(e.min_bet??1,1),maxBet:e.max_bet??null}}function qo({tiers:e,modes:t,pydDividends:n,onPlayCount:o,minBet:i=1,maxBet:r=null,colors:l,bodyFont:a,headingFont:s}){const d=e=>Math.min(Math.max(e,i),r??1/0),[h,u]=c(()=>String(d(20))),g=parseFloat(h),f=d(Number.isFinite(g)&&g>0?g:20),p=f/20,y=!!(t?.length||n?.length||e.some(e=>e.payout20>0)),m=!!t?.length;if(!y)return null;const b=/* @__PURE__ */T(z,{style:{marginBottom:8,flexDirection:"row",alignItems:"center",gap:4,flexWrap:"wrap"},children:[
77
+ return T(z,{accessibilityRole:"progressbar",accessibilityLabel:a,accessibilityLiveRegion:"polite",style:{width:"100%"},children:[n?.trim()?/* @__PURE__ */W(S,{style:{fontSize:14,textAlign:"center",marginBottom:16,color:e.textMuted,fontFamily:t},children:n}):null,c]})}function eo(e){return e.homeTeam&&e.awayTeam?`${e.homeTeam} vs ${e.awayTeam}`:e.homeTeam??e.awayTeam??e.id}function to(e){return(e??"").trim().toLowerCase().replace(/[^a-z0-9]+/g,"")}function no(e){if(!e||e.quick_pick_only)return!1;const t=to(e.selection_scope);if("samegamemulti"===to(e.rule)||!0===e.require_same_event||"singleevent"===t||"sameevent"===t)return!0;const n=[e.game_name,e.game_name_template].map(to);return n.includes("samegame")||n.includes("samegamemulti")}function oo(e){return(e.eventId??e.event_id)?.trim()||null}function io(e){const t=/* @__PURE__ */new Map;for(const n of e){if(!co(n))continue;const e=oo(n);if(!e)continue;const o=t.get(e);o?(o.propositionCount+=1,o.homeTeam=ro(o.homeTeam,n.home_team),o.awayTeam=ro(o.awayTeam,n.away_team),o.sport=ro(o.sport,n.sport),o.league=ro(o.league,n.league),o.commenceTime=ao(o.commenceTime,n.commence_time)):t.set(e,{id:e,homeTeam:n.home_team?.trim()||void 0,awayTeam:n.away_team?.trim()||void 0,commenceTime:n.commence_time?.trim()||void 0,sport:n.sport?.trim()||void 0,league:n.league?.trim()||void 0,propositionCount:1})}return[...t.values()].sort((e,t)=>{const n=lo(e.commenceTime),o=lo(t.commenceTime);return n!==o?n-o:e.id.localeCompare(t.id)})}function ro(e,t){const n=t?.trim();return n?e&&e.localeCompare(n)<=0?e:n:e}function lo(e){if(!e)return Number.MAX_SAFE_INTEGER;const t=new Date(e).getTime();return Number.isFinite(t)?t:Number.MAX_SAFE_INTEGER}function ao(e,t){const n=t?.trim();if(!n)return e;if(!e)return n;const o=lo(e),i=lo(n);return i!==o?i<o?n:e:e.localeCompare(n)<=0?e:n}function co(e){return!1!==e.bettable&&!0!==e.is_suspended&&!0!==e.is_expired&&!0!==e.is_voided&&!0!==e.is_composite_component}function so(e,t){return t?e.filter(e=>co(e)&&oo(e)===t):[]}function ho(e,t){return!!t&&e.length>0&&e.every(e=>co(e)&&oo(e)===t)}var uo={signature:1,premier:2,exclusive:3},go=[{id:"signature",label:"Signature Games",shortLabel:"Signature",level:1},{id:"premier",label:"Premier Games",shortLabel:"Premier",level:2},{id:"exclusive",label:"Exclusive Games",shortLabel:"Exclusive",level:3}];function fo(e){return"number"==typeof e.tier&&Number.isFinite(e.tier)?e.tier:1}function po(e,t){return e.filter(e=>fo(e)===t)}function yo(e){const t=new Set(e.map(fo));return go.filter(e=>t.has(e.level))}function mo(e){return yo(e)[0]?.id??"signature"}var bo=4,wo=6,xo=[4,12],ko=[5,10,20,50];function So(e){return!!e&&!e.quick_pick_only&&"safety_net"===(e.rule??"").trim().toLowerCase()}function Co(e){const t=e.payout_structure;return{margin:e.operator_margin??0,perLegProbability:t?.per_leg_probability??.5,perfectMultiple:t?.perfect_prize?.stake_multiple??25,perfectBaseLegs:t?.perfect_prize?.base_legs??6,nearMissBudgetFraction:t?.near_miss?.budget_fraction??.5,roundTo:t?.round_to??5}}function Bo(e,t){return t>0&&e>=t?Math.round(e/t)*t:Math.round(e)}function zo(e,t){if(t<0||t>e)return 0;let n=1;for(let o=0;o<t;o+=1)n=n*(e-o)/(o+1);return Math.round(n)}function Fo(e,t,n,o){const i=Math.max(0,Math.min(n,t)),r=e*o.perfectMultiple*Math.pow(2,t-o.perfectBaseLegs),l=i>0?e*(1-o.margin)*o.nearMissBudgetFraction/i:0,a=Math.pow(1/o.perLegProbability,t),c=[];let s=zo(t,0);for(let d=1;d<=i;d+=1)s+=zo(t,d),c.push(Bo(l*a/s,o.roundTo));return{legs:t,stake:e,allowedMisses:i,perfect:r,nearMiss:c,sweep:r+c.reduce((e,t)=>e+t,0)}}function vo(e,t){if(t<0||t>e.allowedMisses)return 0;let n=0===t?e.perfect:0;for(let o=Math.max(1,t);o<=e.nearMiss.length;o+=1)n+=e.nearMiss[o-1];return n}function Wo(e){return e.includes(8)?8:e[Math.floor(e.length/2)]}function To(e){return e.toLowerCase().replace(/[^a-z]+/g," ").trim()}function Ao(e,t){const n=To(t);return e.permitted_rules?.find(e=>To(e.name??"").includes(n))??null}function Ro(e,t,n){const o=t?.min_propositions??n,i=t?.max_propositions??null;return e.filter(e=>e>=o&&(null==i||e<=i))}function Lo(e){if(!So(e)||!e)return null;const t=e.min_propositions??e.allowed_propositions?.[0]??xo[0],n=e.max_propositions??e.allowed_propositions?.[e.allowed_propositions.length-1]??xo[1],o=e.allowed_propositions&&e.allowed_propositions.length>0?[...e.allowed_propositions].sort((e,t)=>e-t):Array.from({length:Math.max(0,n-t+1)},(e,n)=>t+n),i=Ao(e,"Extra Shot"),r=Ao(e,"Double Shot"),l=Ro(o,i,4).filter(e=>e>1),a=Ro(o,r,6).filter(e=>e>2);if(0===l.length)return null;const c=[{id:"extra_shot",label:"Extra Shot",allowedMisses:1,stat:"Bigger payout",explain:"Miss one leg and you win the All but 1 prize. Get every leg right and you win both — the Perfect prize on top.",legOptions:l,defaultLegs:Wo(l),ruleId:i?.id??null}],s=!e.permitted_rules?.length||!!r;a.length>0&&s&&c.push({id:"double_shot",label:"Double Shot",allowedMisses:2,stat:"Safer play",explain:"Miss two legs and you win the All but 2 prize. Miss one and you win two prizes. Get every leg right and you win all three — the whole stack.",legOptions:a,defaultLegs:Wo(a),ruleId:r?.id??null});const d=Math.max(e.min_bet??5,.01),h=e.max_bet??null,u=ko.filter(e=>null===h||e<=h);return{modes:c,defaultModeId:"extra_shot",defaultStake:Math.min(Math.max(20,d),h??20),minStake:d,maxStake:h,quickAdds:u,tagline:"The wider the safety net, the more misses it catches. The narrower it is, the bigger the top prize.",pricing:Co(e)}}function Do(e){return[{id:`target-${e}`,label:"Perfect pick",stat:"Top payout",detail:["Get every pick right","nothing else pays"],emphasis:!0,expectedCorrect:e}]}function Mo(e,t,n){const o=Math.max(0,e-t),i=Fo(20,e,o,n),r=[];for(let l=0;l<=o;l+=1){const t=Math.round(vo(i,l));r.push({misses:l,label:`${e-l}/${e}`,multiplier:t/20,payout20:t})}return r}function Po(e,t){return[{id:"net-1",label:"Extra Shot",stat:"Bigger payout",detail:["One wrong wins a prize","Perfect wins both","Miss twice and the ticket does not pay"],dividends:Mo(e,e-1,t),expectedCorrect:e-1},{id:"net-2",label:"Double Shot",stat:"Safer play",detail:["Two wrong wins a prize","One wrong wins two","Perfect wins all three"],dividends:Mo(e,e-2,t),expectedCorrect:e-2}]}function Ho(e,t){if(!e||e.quick_pick_only)return null;const n=function(e){return(e??"").trim().toLowerCase()}(e.rule),o=t??e.num_propositions??e.min_propositions??e.allowed_propositions?.[0]??0;return"safety_net"===n&&o>0?function(e,t){return{mode:"selection",kind:"safety_net",title:"Choose your safety net",headline:"2 Ways to PLAY, more ways to PAY",heroTagline:"The wider the safety net, the more misses it catches. The narrower it is, the bigger the top prize.",legCount:t,options:Po(t,Co(e)),continueLabel:"Continue to picks"}}(e,o):"exact"===n&&o>0?function(e,t){return{mode:"selection",kind:"exact",title:"All or nothing",headline:"Get it PERFECT, take the top PAY",heroTagline:"Every pick has to land. Miss a single one and the ticket is gone — but a clean sweep pays the biggest prize.",legCount:t,options:Do(t),continueLabel:"Continue to picks"}}(0,o):"pick"===n&&o>0?function(e,t){return{mode:"description",kind:"pick",title:"How it plays",headline:"Every hit PLAYS, every hit PAYS",heroTagline:"No all-or-nothing — your multiplier climbs with every correct pick.",legCount:t,highlights:["Make your yes/no picks across the available markets","Each correct pick pushes your multiplier higher","Land fewer than the full card and you can still cash"],continueLabel:"Continue to picks"}}(0,o):null}function Oo(e){return null!=Ho(e)}var Io=[500,1e3,2500,5e3,7500,1e4,12500,15e3],Eo=[12,11,10,9,8,7,6];function jo(e){return!!e&&!e.quick_pick_only&&"pick_your_dividend"===(e.rule??"").trim().toLowerCase()}function No(e){return Math.round(100*e)/100}function Go(e,t,n=.21875){const o=Math.pow(2,t),i=e/(1-n)/o,r=Number.isInteger(i),l=No(i),a=r?i:No(.96*i);return{legs:t,exactStake:l,stake:a,margin:1-e/(a*o),multiple:e/a,oddsOneIn:o,discounted:!r}}function Yo(e,t=Eo){return{dividend:e,rungs:t.map(t=>Go(e,t))}}function Vo(e,t){if(!jo(e)||!e)return null;const n=e.min_propositions??6,o=e.max_propositions??12,i=Eo.filter(e=>e>=n&&e<=o);if(0===i.length)return null;const r=t?.dividends??Io;return{dividends:r.map(e=>Yo(e,i)),defaultDividend:r.includes(1e4)?1e4:r[Math.floor(r.length/2)],defaultLegs:i.includes(9)?9:i[Math.floor(i.length/2)],tagline:"The dividend is set. The win is yours to build."}}function Uo(e,t){const n=e.allowed_propositions&&e.allowed_propositions.length>0?e.allowed_propositions.map(Number):[],o=e.min_propositions??e.num_propositions??null,i=e.max_propositions??e.num_propositions??null,r=0===n.length&&null!==o&&null!==i&&i>0,l=n.length>0?n:r?Ln(o,i):[],a=/* @__PURE__ */new Map;for(const p of t?.top_payouts??[]){const e=Number(p.proposition_count),t=Number(p.net_payout),n=Number(p.bet_amount??20);!Number.isFinite(e)||e<=0||a.set(e,{count:e,payout:Number.isFinite(t)?t:0,betAmount:Number.isFinite(n)&&n>0?n:20})}for(const p of l){const e=Number(p);a.has(e)||a.set(e,{count:e,payout:0,betAmount:20})}const c=Array.from(a.values()).sort((e,t)=>e.count-t.count),s=l.length>0?Math.max(...l.map(Number)):0,d=jo(e)?Vo(e):null,h=d?d.dividends.map(e=>({dividend:e.dividend,stakeFrom:Math.min(...e.rungs.map(e=>e.stake))})):void 0,u=d?[]:c.map(e=>({count:e.count,payout20:e.payout>0&&e.betAmount>0?e.payout/e.betAmount*20:0})),g=Ho(e,s),f="safety_net"===g?.kind?(g.options??[]).flatMap(e=>e.dividends?.length?[{id:e.id,label:e.label,tiers:e.dividends.map(e=>({label:e.label,payout20:e.payout20}))}]:[]):[];return{legOptions:l.map(Number),maxLegCount:s,tiers:u,modes:f,pydDividends:h,hasGenericDividends:(n.length>0||r)&&u.some(e=>e.payout20>0),minBet:Math.max(e.min_bet??1,1),maxBet:e.max_bet??null}}function qo({tiers:e,modes:t,pydDividends:n,onPlayCount:o,minBet:i=1,maxBet:r=null,colors:l,bodyFont:a,headingFont:s}){const d=e=>Math.min(Math.max(e,i),r??1/0),[h,u]=c(()=>String(d(20))),g=parseFloat(h),f=d(Number.isFinite(g)&&g>0?g:20),p=f/20,y=!!(t?.length||n?.length||e.some(e=>e.payout20>0)),m=!!t?.length;if(!y)return null;const b=/* @__PURE__ */T(z,{style:{marginBottom:8,flexDirection:"row",alignItems:"center",gap:4,flexWrap:"wrap"},children:[
78
78
  /* @__PURE__ */W(S,{style:{fontSize:10,fontStyle:"italic",color:l.textMuted,fontFamily:a},children:"Example values for a"}),
79
79
  /* @__PURE__ */W(S,{style:{fontSize:11,fontWeight:"700",color:l.textMuted,fontFamily:a},children:"$"}),
80
80
  /* @__PURE__ */W(C,{value:h,onChangeText:u,onBlur:()=>u(String(f)),keyboardType:"numeric",accessibilityLabel:"Example bet amount",style:{width:64,paddingVertical:2,paddingHorizontal:5,borderRadius:6,borderWidth:1,borderColor:l.border,backgroundColor:l.background??"#fff",color:l.text,fontSize:11,fontWeight:"600",fontFamily:a}}),
@@ -94,344 +94,351 @@ return T(z,{style:[_o.gameCard,Xo,{width:K||void 0,flexGrow:0,flexShrink:0,borde
94
94
  /* @__PURE__ */T(S,{style:{marginTop:8,fontFamily:F,fontSize:13,letterSpacing:-.52,lineHeight:13},children:[/* @__PURE__ */W(S,{style:{fontWeight:"800",color:w.primary},children:"YES"}),/* @__PURE__ */W(S,{style:{fontWeight:"600",color:ne(w.primary,.85)},children:"NO"})]}),
95
95
  /* @__PURE__ */T(z,{style:{marginTop:2,flexDirection:"row",alignItems:"center",justifyContent:"center",gap:6},children:[/* @__PURE__ */W(S,{style:{fontFamily:F,fontWeight:"600",fontSize:G?19:21,color:A,letterSpacing:-.19,lineHeight:1.2*(G?19:21),textAlign:"center",paddingHorizontal:4},children:I(e)}),/* @__PURE__ */W(St,{variant:"icon",panel:ot(e),content:c||"Pick outcomes and land the payout for this game.",theme:b,title:I(e),label:`How to play ${I(e)}`,extra:/* @__PURE__ */W(qo,{tiers:v?f:[],modes:x,pydDividends:B,onPlayCount:d.length>1?t=>E(e,t):void 0,minBet:D,maxBet:M,colors:w,bodyFont:C,headingFont:F}),colors:w,bodyFont:C,headingFont:F})]}),s?/* @__PURE__ */W(S,{style:{marginTop:6,fontSize:13,lineHeight:17,fontWeight:"700",color:w.primary,textAlign:"center",fontFamily:C},children:s}):null,c?/* @__PURE__ */W(S,{style:{marginTop:8,fontSize:12.5,lineHeight:18,color:w.textMuted,textAlign:"center",fontFamily:C},children:c}):null,a.enabled&&/* @__PURE__ */W(z,{style:[_o.jackpotBadge,{backgroundColor:`${w.warning}15`,marginTop:8}],children:/* @__PURE__ */T(S,{style:[_o.jackpotBadgeText,{color:w.warning,fontFamily:C}],children:["★ ",a.progressive?a.amount>0?$t(a.amount):a.limit>0?`Up to ${$t(a.limit)}`:"Jackpot":$t(a.amount)]})}),(u||h)&&/* @__PURE__ */T(z,{style:[_o.tagsRow,{justifyContent:"center",marginTop:8}],children:[u&&e.category&&/* @__PURE__ */W(z,{style:[_o.tag,{backgroundColor:w.backgroundAlt}],children:/* @__PURE__ */W(S,{style:[_o.tagText,{color:de(b),fontFamily:C}],children:e.category})}),u&&/* @__PURE__ */W(z,{style:[_o.tag,{backgroundColor:w.backgroundAlt}],children:/* @__PURE__ */W(S,{style:[_o.tagText,{color:de(b),fontFamily:C}],children:e.rule})}),u&&e.lotto_type&&/* @__PURE__ */W(z,{style:[_o.tag,{backgroundColor:w.backgroundAlt}],children:/* @__PURE__ */W(S,{style:[_o.tagText,{color:de(b),fontFamily:C}],children:e.lotto_type})}),h&&null!=e.tier&&/* @__PURE__ */W(z,{style:[_o.tag,{backgroundColor:w.backgroundAlt}],children:/* @__PURE__ */T(S,{style:[_o.tagText,{color:de(b),fontFamily:C}],children:["Tier ",e.tier]})})]}),0===d.length&&/* @__PURE__ */W(z,{style:{marginTop:8,width:"100%"},children:/* @__PURE__ */W(at,{theme:b,variant:"primary",size:"sm",onPress:()=>{n(e),p?.()},children:"Select game"})}),H?/* @__PURE__ */W(z,{style:{marginTop:"auto",width:"100%",paddingTop:12},children:/* @__PURE__ */W(S,{style:{fontSize:11,lineHeight:15,fontWeight:"600",color:w.text,textAlign:"center",fontFamily:C},children:H})}):null]},l)})}),J&&/* @__PURE__ */W(v,{children:[-1,1].map(e=>{const t=e<0?_>0:_<O.length-1;/* @__PURE__ */
96
96
  return W(B,{accessibilityRole:"button",accessibilityLabel:e<0?"Previous game":"Next game",onPress:()=>te(_+e),disabled:!t,style:{position:"absolute",top:"38%",left:e<0?2:void 0,right:e>0?2:void 0,width:44,height:44,borderRadius:22,borderWidth:1,borderColor:w.border,backgroundColor:ne(w.background??"#fff",.94),alignItems:"center",justifyContent:"center",opacity:t?1:.3,zIndex:1,...oe},children:/* @__PURE__ */W(S,{style:{fontSize:18,lineHeight:20,color:w.primary,fontFamily:C},children:e<0?"‹":"›"})},e)})})]}),O.length>0&&Q&&/* @__PURE__ */W(z,{style:{flexDirection:"row",justifyContent:"center",flexWrap:"wrap",paddingTop:4,paddingBottom:8},children:O.map((e,t)=>/* @__PURE__ */W(B,{accessibilityRole:"button",accessibilityLabel:`Go to ${I(e)}`,onPress:()=>te(t),style:{paddingVertical:18.5,paddingHorizontal:5,marginVertical:-18.5,alignItems:"center",justifyContent:"center"},children:/* @__PURE__ */W(z,{style:{width:t===_?22:7,height:7,borderRadius:999,backgroundColor:t===_?w.primary:ne(w.primary,.25)}})},e.id))}),O.length>0&&Q&&/* @__PURE__ */T(z,{style:{borderTopWidth:1,borderTopColor:w.border,paddingTop:10,marginTop:2},children:[/* @__PURE__ */W(S,{style:{fontSize:10,fontWeight:"700",textTransform:"uppercase",letterSpacing:1.6,color:w.textMuted,fontFamily:F,marginBottom:8},children:"All games"}),/* @__PURE__ */W(z,{style:{flexDirection:"row",flexWrap:"wrap",gap:4},children:O.map((e,t)=>{const n=vn(e);/* @__PURE__ */
97
- return T(B,{accessibilityRole:"button",accessibilityState:{selected:t===_,disabled:!n},onPress:()=>(e=>{E(e,Uo(e,m?.[e.id]).maxLegCount)})(e),disabled:!n,style:{alignItems:"center",gap:4,paddingHorizontal:4,paddingVertical:6,borderRadius:16,borderWidth:1,borderColor:t===_?w.primary:"transparent",opacity:n?1:.5,width:q},children:[/* @__PURE__ */W(Qo,{iconUrl:Ze(e),size:G?44:52,brandColor:w.primary,iconColor:w.primaryText,accentColor:L}),/* @__PURE__ */W(S,{numberOfLines:2,style:{fontSize:11,fontWeight:"700",lineHeight:13,textAlign:"center",letterSpacing:-.11,color:t===_?w.primary:A,fontFamily:F},children:I(e)})]},e.id)})})]})]})}var _o=k.create({centerContainer:{alignItems:"center",justifyContent:"center",padding:32,gap:8},gameCard:{flexDirection:"column",alignItems:"center",borderWidth:1,borderRadius:24,paddingHorizontal:20,paddingTop:22,paddingBottom:20},jackpotBadge:{alignSelf:"center",flexDirection:"row",alignItems:"center",gap:2,paddingHorizontal:8,paddingVertical:2,borderRadius:999},jackpotBadgeText:{fontSize:10,fontWeight:"700"},tagsRow:{flexDirection:"row",flexWrap:"wrap",gap:4},tag:{paddingHorizontal:6,paddingVertical:2,borderRadius:4},tagText:{fontSize:12}}),ei=class{constructor(e){this.inflight=/* @__PURE__ */new Map,this.cache=/* @__PURE__ */new Map,this.apiUrl=e.apiUrl,this.apiKey=e.apiKey,this.fetchImpl=e.fetchImpl??fetch.bind(globalThis),this.getAuthHeaders=e.getAuthHeaders}invalidateCache(){this.cache.clear()}invalidate(){this.invalidateCache()}async request(e,t,n){const o=`${this.apiUrl}${e}`,i=(t?.method??"GET").toUpperCase(),r="GET"===i,l=r,a=!r&&!n?.idempotent,c=`${i} ${o}`;if(l){const e=this.cache.get(c);if(e&&Date.now()-e.at<5e3)return e.value;const t=this.inflight.get(c);if(t)return t}const s=l?this.cache.get(c):void 0,d=(async()=>{let e;try{const n=this.getAuthHeaders?await this.getAuthHeaders():void 0;e=await this.fetchImpl(o,{...t,headers:{"Content-Type":"application/json",...this.apiKey?{"X-API-Key":this.apiKey}:{},...n??{},...s?.etag?{"If-None-Match":s.etag}:{},...t?.headers}})}catch(i){throw i}if(304===e.status&&s)return l&&this.cache.set(c,{at:Date.now(),value:s.value,etag:s.etag}),s.value;if(!e.ok){let t=`API request failed: ${e.status} ${e.statusText}`;try{const n=await e.json();422===e.status&&n.detail?Array.isArray(n.detail)?t=n.detail.map(e=>`${Array.isArray(e.loc)?e.loc.join("."):"field"}: ${e.msg}`).join("; "):"string"==typeof n.detail?t=n.detail:"object"==typeof n.detail&&(t=JSON.stringify(n.detail)):n.message?t=n.message:n.error&&(t=n.error)}catch{}throw new Error(t)}const n=await e.json();if(l){const t=e.headers.get("ETag")??void 0;this.cache.set(c,{at:Date.now(),value:n,etag:t})}return n})();return l?(this.inflight.set(c,d),d.catch(()=>{}).finally(()=>{this.inflight.delete(c)})):a&&d.finally(()=>this.invalidateCache()).catch(()=>{}),d}async getGames(e){const t=new URLSearchParams;e?.category&&t.append("category",e.category),e?.jurisdiction&&t.append("jurisdiction",e.jurisdiction),e?.sport&&t.append("sport",e.sport);const n=t.toString(),o=n?`/games?${n}`:"/games",i=await this.request(o);return{games:i.payload||[],howToPlayMarkdown:i.how_to_play_markdown??null}}async getGame(e){return(await this.request(`/games/${e}`)).payload}async getPropositions(e){const t=new URLSearchParams;e?.event_id&&t.append("event_id",e.event_id),e?.sport&&t.append("sport",e.sport),e?.category&&t.append("category",e.category);const n=t.toString(),o=n?`/propositions?${n}`:"/propositions";return(await this.request(o)).payload||[]}async getSports(){return(await this.request("/propositions/sports")).sports||[]}async getPropositionsByIds(e){if(0===e.length)return[];const t=new URLSearchParams({ids:e.join(","),include_expired:"true"});return(await this.request(`/propositions?${t.toString()}`)).payload||[]}async getProposition(e){const t=(await this.request(`/propositions/${e}?include_expired=true`)).payload;return Array.isArray(t)?t.find(t=>t.id===e)??t[0]:t}async getGameEntries(e){const t=new URLSearchParams;null!=e?.user_id&&t.append("user_id",String(e.user_id)),null!=e?.pending&&t.append("pending",String(e.pending));const n=t.toString(),o=n?`/game-entries?${n}`:"/game-entries";return((await this.request(o)).payload||[]).map(e=>{const t={...e};return!t.created_at&&t.entry_date&&(t.created_at=t.entry_date),null!=t.stake&&null==t.bet_amount&&(t.bet_amount=Number(t.stake)),(!t.proposition_ids||0===t.proposition_ids.length)&&t.propositions&&t.propositions.length>0&&(t.proposition_ids=t.propositions.map(e=>e.id)),t})}async createGameEntry(e){const t=e.proposition_ids.map(t=>({proposition_id:t,user_prediction:e.selections?.[t]??"yes"})),n={game_id:e.game_id,user_id:e.user_id,propositions:t};null!=e.stake&&(n.stake=e.stake),null!=e.rule_id&&(n.rule_id=e.rule_id);const o=(await this.request("/game-entries",{method:"POST",body:JSON.stringify(n)})).payload;return null!=o.stake&&null==o.bet_amount&&(o.bet_amount=Number(o.stake)),o}async getPayoutsDue(e){const t=new URLSearchParams;null!=e?.game_id&&t.set("game_id",String(e.game_id)),null!=e?.limit&&t.set("limit",String(e.limit)),null!=e?.offset&&t.set("offset",String(e.offset));const n=t.toString();return await this.request(n?`/game-entries/payouts/due?${n}`:"/game-entries/payouts/due")}async getEntryPayout(e){return(await this.request(`/game-entries/${e}/payout`)).payload}async markEntryPaidOut(e){const t=await this.request(`/game-entries/${e}/payout/mark-paid-out`,{method:"POST",body:JSON.stringify({})});return this.invalidate(),t.payload}async updateGameEntryResult(e,t){return(await this.request(`/game-entries/${e}/result`,{method:"POST",body:JSON.stringify(t)})).payload}async getGameMaxPayout(e,t){const n=null!=t?`?bet_amount=${encodeURIComponent(String(t))}`:"";return(await this.request(`/games/${e}/max-payout${n}`)).payload}async getGamesMaxPayouts(e,t){if(0===e.length)return{};const n=new URLSearchParams({ids:e.join(",")});null!=t&&n.set("bet_amount",String(t));const o=await this.request(`/games/max-payouts?${n.toString()}`),i={};for(const[r,l]of Object.entries(o.payload||{}))i[Number(r)]=l;return i}async getEntryPreview(e,t){return(await this.request(`/games/${e}/preview`,{method:"POST",body:JSON.stringify(t)},{idempotent:!0})).payload}async evaluateRule(e,t){return(await this.request(`/games/${e}/evaluate-rule`,{method:"POST",body:JSON.stringify(t)},{idempotent:!0})).payload}async calculatePayout(e,t){return(await this.request(`/games/${e}/calculate-payout`,{method:"POST",body:JSON.stringify(t)},{idempotent:!0})).payload}};function ti(e,t,o){const[r,l]=c([]),[s,d]=c(null),[h,u]=c(!o?.skip),[g,f]=c(null),p=t?`${t.category||""}_${t.jurisdiction||""}_${t.sport||""}`:"",y=a(t);y.current=t;const m=o?.skip??!1,b=n(async()=>{if(!m)try{u(!0),f(null);const t=await e.getGames(y.current);l(t.games),d(t.howToPlayMarkdown)}catch(t){f(t instanceof Error?t.message:"Failed to fetch games")}finally{u(!1)}},[e,p,m]);return i(()=>{b()},[b]),{games:r,howToPlayMarkdown:s,loading:h,error:g,refetch:n(async()=>{e.invalidate(),await b()},[e,b])}}function ni(e,t,o){const[r,l]=c([]),[s,d]=c(!o?.skip),[h,u]=c(null),g=o?.skip??!1,f=t?`${t.event_id||""}_${t.sport||""}_${t.category||""}`:"",p=a(t);p.current=t;const y=n(async()=>{if(!g)try{d(!0),u(null);const t=await e.getPropositions(p.current);l(t)}catch(t){u(t instanceof Error?t.message:"Failed to fetch propositions")}finally{d(!1)}},[e,f,g]);return i(()=>{y()},[y]),{propositions:r,loading:s,error:h,refetch:n(async()=>{e.invalidate(),await y()},[e,y])}}function oi(e,t){const[o,r]=c([]),[l,a]=c(!t?.skip),[s,d]=c(null),h=t?.skip??!1,u=n(async()=>{if(!h)try{a(!0),d(null),r(await e.getSports())}catch(t){d(t instanceof Error?t.message:"Failed to fetch sports")}finally{a(!1)}},[e,h]);return i(()=>{u()},[u]),{sports:o,loading:l,error:s,refetch:n(async()=>{e.invalidate(),await u()},[e,u])}}function ii(e,t,o){const[r,l]=c([]),[s,d]=c(!o?.skip),[h,u]=c(null),g=o?.skip??!1,f=t?`${t.user_id??""}_${t.pending??""}`:"",p=a(t);p.current=t;const y=n(async()=>{if(!g)try{d(!0),u(null);const t=await e.getGameEntries(p.current);l(t)}catch(t){u(t instanceof Error?t.message:"Failed to fetch entries")}finally{d(!1)}},[e,f,g]);return i(()=>{y()},[y]),{entries:r,loading:s,error:h,refetch:n(async()=>{e.invalidate(),await y()},[e,y])}}function ri(e,t,o){const[r,l]=c({}),[s,d]=c(!1),h=o?.skip??!1,u=o?.betAmount,g=a(/* @__PURE__ */new Set);return i(()=>{if(h||0===t.length)return;const n=t.filter(e=>!(e.id in r)&&!g.current.has(e.id));if(0===n.length)return;for(const e of n)g.current.add(e.id);let o=!1;return d(!0),(async()=>{try{const t=await e.getGamesMaxPayouts(n.map(e=>e.id),u);o||l(e=>({...e,...t}))}catch{}finally{o||d(!1)}})(),()=>{o=!0}},[e,t.map(e=>e.id).join(","),h,u]),{maxPayouts:r,loading:s,refetchGame:n(async(t,n)=>{if(!h)try{const o=await e.getGamesMaxPayouts([t],n??u);o[t]&&l(e=>({...e,[t]:o[t]}))}catch{}},[e,h,u])}}function li(e){const[t,o]=c(!1),[i,r]=c(null),[l,a]=c(null);return{createEntry:async t=>{try{o(!0),r(null),await function(e=15e3){return"undefined"==typeof navigator||!1!==navigator.onLine||"undefined"==typeof window||"function"!=typeof window.addEventListener?Promise.resolve():new Promise(t=>{const n=()=>{window.removeEventListener("online",n),clearTimeout(o),t()},o=setTimeout(n,e);window.addEventListener("online",n)})}();const n=await e.createGameEntry(t);return a(n),n}catch(n){const e=n instanceof Error?n.message:"Failed to create entry";throw r(e),new Error(e)}finally{o(!1)}},loading:t,error:i,entry:l,clearSubmitError:n(()=>r(null),[])}}function ai(e){const[t,n]=c(e?"sport":"game"),[o,i]=c(null),[r,l]=c({}),[a,s]=c(null);return{step:t,selectedGame:o,selections:r,placedEntry:a,setGameOnly:e=>{i(e)},clearSelectedGame:()=>{i(null),l({})},goToSportSelection:e=>{e&&i(e),n("sport")},goToConfirmation:()=>{n("confirm")},goToSuccess:e=>{s(e),n("success")},goBack:()=>{"confirm"===t?n("sport"):"sport"===t&&(n("game"),i(null),l({}))},reset:()=>{n("game"),i(null),l({}),s(null)},toggleSelection:(e,t)=>{l(n=>{const o={...n};return o[e]===t?delete o[e]:o[e]=t,o})}}}function ci(e){const[t,o]=c(!1),[i,r]=c(null),[l,a]=c(null);return{evaluate:n(async(t,n)=>{try{o(!0),r(null);const i=await e.evaluateRule(t,n);return a(i),i}catch(i){const e=i instanceof Error?i.message:"Failed to evaluate rule";throw r(e),new Error(e)}finally{o(!1)}},[e]),loading:t,error:i,result:l}}function si(e){const[t,o]=c(!1),[i,r]=c(null),[l,a]=c(null);return{calculate:n(async(t,n)=>{try{o(!0),r(null);const i=await e.calculatePayout(t,n);return a(i),i}catch(i){const e=i instanceof Error?i.message:"Failed to calculate payout";throw r(e),new Error(e)}finally{o(!1)}},[e]),loading:t,error:i,result:l}}function di(e){const[t,o]=c(!1),[i,r]=c(null),[l,a]=c(null);return{preview:n(async(t,n)=>{try{o(!0),r(null);const i=await e.getEntryPreview(t,n);return a(i),i}catch(i){const e=i instanceof Error?i.message:"Failed to preview entry";throw r(e),new Error(e)}finally{o(!1)}},[e]),loading:t,error:i,result:l}}var hi=[1,5,10,20,50,100],ui=[4,12];function gi(e){return!!e&&!e.quick_pick_only&&"game_set"===(e.rule??"").trim().toLowerCase()}function fi(e,t,n){const o=n?.operatorMargin??.2,i=n?.perLegProbability??.5,r=Math.round(Math.pow(1/i,t)),l=(1-o)*Math.pow(1/i,t);return{legs:t,stake:e,prize:Math.round(e*l*100)/100,multiple:l,oddsOneIn:r}}function pi(e){if(!gi(e)||!e)return null;const t=e.min_propositions??e.allowed_propositions?.[0]??ui[0],n=e.max_propositions??e.allowed_propositions?.[e.allowed_propositions.length-1]??ui[1],o=e.allowed_propositions&&e.allowed_propositions.length>0?[...e.allowed_propositions].sort((e,t)=>e-t):Array.from({length:Math.max(0,n-t+1)},(e,n)=>t+n);if(0===o.length)return null;const i=Math.max(e.min_bet??1,.01),r=e.max_bet??null,l=hi.filter(e=>e>=i&&(null===r||e<=r));return{legOptions:o,defaultLegs:o.includes(8)?8:o[Math.floor(o.length/2)],defaultStake:Math.min(Math.max(10,i),r??10),minStake:i,maxStake:r,quickStakes:l,tagline:"Two steps to your multi. Tweak legs and stake — the prize updates as you go.",operatorMargin:e.operator_margin??.2,perLegProbability:e.payout_structure?.per_leg_probability??.5}}var yi=50,mi=[25,50,75,100],bi=[{legs:4,firstPayingTier:3,tiers50:[[3,60],[4,340]]},{legs:6,firstPayingTier:4,tiers50:[[4,40],[5,110],[6,850]]},{legs:8,firstPayingTier:5,tiers50:[[5,30],[6,70],[7,300],[8,2100]]},{legs:9,firstPayingTier:5,tiers50:[[5,10],[6,40],[7,100],[8,350],[9,4500]]},{legs:10,firstPayingTier:6,tiers50:[[6,15],[7,45],[8,140],[9,800],[10,1e4]]}];function wi(e){return!!e&&!e.quick_pick_only&&"ladder"===(e.rule??"").trim().toLowerCase()}function xi(e,t){return Math.round(e*t/50*100)/100}function ki(e,t){let n=0;return e.tiers50.map(([e,o])=>(n+=o,{atLeast:e,prize:xi(o,t),cumulative:xi(n,t)}))}function Si(e,t){return xi(e.tiers50.reduce((e,[,t])=>e+t,0),t)}function Ci(e,t,n){return xi(e.tiers50.reduce((e,[n,o])=>n<=t?e+o:e,0),n)}function Bi(e){if(!wi(e)||!e)return null;const t=e.allowed_propositions,n=e.min_propositions??4,o=e.max_propositions??10,i=bi.filter(e=>t&&t.length>0?t.includes(e.legs):e.legs>=n&&e.legs<=o);if(0===i.length)return null;const r=e.min_bet??mi[0],l=e.max_bet??mi[mi.length-1],a=mi.filter(e=>e>=r&&e<=l);return{ladders:i,defaultLegs:i.some(e=>8===e.legs)?8:i[Math.floor(i.length/2)].legs,defaultStake:a.includes(50)?50:a[0]??50,stakes:a.length>0?a:mi,tagline:"Climb the ladder. Every step pays its own prize, and every prize stacks on the one before."}}var zi=.21875,Fi=[1,5,10,20,50],vi=[4,12];function Wi(e){return!!e&&!e.quick_pick_only&&"mirror"===(e.rule??"").trim().toLowerCase()}function Ti(e,t,n){const o=n?.operatorMargin??.21875,i=n?.perLegProbability??.5,r=Math.round(Math.pow(2,t)),l=Math.pow(i,t)+Math.pow(1-i,t),a=Math.round(1/l),c=(1-o)*Math.pow(2,t-1);return{legs:t,stake:e,prize:Math.round(e*c*100)/100,multiple:c,totalOutcomes:r,winningOutcomes:2,oddsOneIn:a}}function Ai(e){if(!Wi(e)||!e)return null;const t=e.min_propositions??e.allowed_propositions?.[0]??vi[0],n=e.max_propositions??e.allowed_propositions?.[e.allowed_propositions.length-1]??vi[1],o=e.allowed_propositions&&e.allowed_propositions.length>0?[...e.allowed_propositions].sort((e,t)=>e-t):Array.from({length:Math.max(0,n-t+1)},(e,n)=>t+n);if(0===o.length)return null;const i=Math.max(e.min_bet??1,.01),r=e.max_bet??null,l=Fi.filter(e=>e>=i&&(null===r||e<=r));return{legOptions:o,defaultLegs:o.includes(8)?8:o[Math.floor(o.length/2)],defaultStake:Math.min(Math.max(10,i),r??10),minStake:i,maxStake:r,quickStakes:l,tagline:"Call every leg. Get them all right, you win — all wrong, you win the same.",operatorMargin:e.operator_margin??.21875,perLegProbability:e.payout_structure?.per_leg_probability??.5}}var Ri=.21875,Li=6,Di=5,Mi=1,Pi=2;function Hi(e){return!!e&&!e.quick_pick_only&&"six_again"===(e.rule??"").trim().toLowerCase()}var Oi={golden_point:!1,captains_challenge:!1};function Ii(e,t,n){const o=1+(t.golden_point?1:0)+(t.captains_challenge?1:0),i=e*n.baseMultiple*(t.golden_point?n.goldenPointFactor:1),r=t.captains_challenge?e*n.challengeMultiple:0;return{legs:n.legs,unit:e,stake:e*o,base:i,challenge:r,perfect:i+r,lowestWinningCount:n.legs-(t.captains_challenge?n.challengeMisses:0),ruleId:Ei(t,n)}}function Ei(e,t){return e.captains_challenge?e.golden_point?t.ruleIds.goldenChallenge:t.ruleIds.challenge:t.ruleIds.base}function ji(e,t){const n=Ii(1,e,t);return{perfect:n.perfect/n.stake,challenge:n.challenge/n.stake}}function Ni(e,t){return e.permitted_rules?.find(e=>t((e.name??"").toLowerCase().replace(/[^a-z]+/g," ").trim()))??null}function Gi(e){if(!Hi(e)||!e)return null;const t=e.num_propositions??e.min_propositions??6;if(t<2)return null;const n=e.operator_margin??.21875,o=Math.max(e.min_bet??10,.01),i=null!=e.max_bet?Math.max(o,Math.floor(e.max_bet/3/o)*o):Math.max(o,100),r=Ni(e,e=>e.includes("challenge")&&!e.includes("golden")),l=Ni(e,e=>e.includes("challenge")&&e.includes("golden")),a=Ni(e,e=>!e.includes("challenge"))??null;return{legs:t,unitMin:o,unitStep:o,unitMax:i,defaultUnit:o,baseMultiple:Math.round(Math.pow(2,t)*(1-n)*100)/100,challengeMultiple:5,challengeMisses:1,goldenPointFactor:2,boosts:[{id:"golden_point",label:"Golden Point",costUnits:1},{id:"captains_challenge",label:"Captain's Challenge",costUnits:1}],tagline:"Set your play, then pick your six. Every call a yes or a no.",ruleIds:{base:a?.id??e.default_rule_id??null,challenge:r?.id??null,goldenChallenge:l?.id??null}}}function Yi(e){return e?.quick_pick_only?"quick_pick":gi(e)?"game_set":jo(e)?"pick_your_dividend":wi(e)?"ladder":Wi(e)?"mirror":So(e)?"safety_net":Hi(e)?"six_again":no(e)?"selections":Oo(e)?"rule_setup":"selections"}function Vi(e){if(!e||e.quick_pick_only)return!1;if("exact"!==(e.rule??"").trim().toLowerCase())return!1;if(no(e))return!1;const t=!!(e.allowed_markets&&e.allowed_markets.length>0),n=!!(e.allowed_sports&&e.allowed_sports.length>0);return t||n}function Ui(e){return!(!e||e.quick_pick_only||"exact"!==(e.rule??"").trim().toLowerCase()||no(e)||Vi(e))}function qi(e){switch(Yi(e)){case"ladder":return{belowRequiredHint:(e,t)=>`Drop to Ladder ${e} or add another pick to stay on Ladder ${t}.`,belowRequiredAddOnlyHint:e=>`Add another pick to stay on Ladder ${e}.`,switchTierLabel:e=>`Switch to Ladder ${e}`,overloadTitle:"Add more picks to climb higher",tableColumnLabel:"Ladder",tierButtonLabel:e=>`Ladder ${e}`};case"game_set":case"pick_your_dividend":case"mirror":case"safety_net":case"six_again":return{belowRequiredHint:(e,t)=>`Drop to ${e} legs or add another pick to stay at ${t}.`,belowRequiredAddOnlyHint:e=>`Add another pick to stay at ${e} legs.`,switchTierLabel:e=>`Switch to ${e} legs`,overloadTitle:"Add more legs to win more",tableColumnLabel:"Legs",tierButtonLabel:e=>`${e} legs`};default:return{belowRequiredHint:(e,t)=>`Drop to a ${e}-leg multi or add another pick to stay at ${t}.`,belowRequiredAddOnlyHint:e=>`Add another pick to stay at ${e}.`,switchTierLabel:e=>`Switch to ${e}-leg`,overloadTitle:"Add more picks to win more",tableColumnLabel:"Legs",tierButtonLabel:e=>`Multi ${e}`}}}function Ki(e){const t=Yi(e);return"six_again"===t||"pick_your_dividend"===t}function Zi(e){return"six_again"===Yi(e)?"Set by your ticket and boosts.":"Set by your dividend ladder rung."}function Xi(e,t,n){if(!e||t<=0||n<=0)return 0;switch(Yi(e)){case"game_set":return fi(n,t,{operatorMargin:e.operator_margin??void 0,perLegProbability:e.payout_structure?.per_leg_probability??void 0}).prize;case"mirror":return Ti(n,t,{operatorMargin:e.operator_margin??void 0,perLegProbability:e.payout_structure?.per_leg_probability??void 0}).prize;case"pick_your_dividend":return function(e,t,n=Io){if(!(e>0&&t>0))return 0;for(const o of n)if(Math.abs(Go(o,e).stake-t)<.005)return o;return 0}(t,n);default:return 0}}var Qi=t(null),Ji={};function $i(){const e=o(Qi);if(!e)throw new Error("usePlaceEntry must be used within a <PlaceEntryProvider>");return e}function _i({apiUrl:t,apiKey:o,fetchImpl:r,getAuthHeaders:s,userId:d,getUserBalance:h,children:u,theme:g,colorScheme:f,demoGames:p,demoPropositions:y,demoEntries:m,demoMaxPayouts:b,gameCategory:w,jurisdiction:x,initialGameId:k,filterSport:S,initialSport:C,initialEventId:B,initialEventLabel:z,sportBaseKey:F,disableQuickPick:v=!1,renderTeamLogo:T,renderPropositionSilk:A,selectionVariant:R,disableEventSwipe:L,enableSportFavourites:D,onEntryPlaced:M,onBeforeSubmit:P,onCancel:H,onShare:O,onRecharge:I,onClearEventFilter:E,screenSize:j="desktop",howToPlayMarkdown:N,sportDisplayNames:G,categoryDisplayNames:Y}){const V=je(g,f),U=Ne(V),q=Ge(V),K=!(!p||!y),Z=l(()=>new ei({apiUrl:t,apiKey:o,fetchImpl:r,getAuthHeaders:s}),[t,o,r,s]),[X,Q]=c(0),J=a(0),[$,_]=c(0),[ee,te]=c([]),[ne,oe]=c({}),[ie,re]=c({}),[le,ae]=c(void 0),[ce,se]=c(null),[de,he]=c(void 0),ue=e.useCallback(async()=>{if(h)try{const e=await h();"number"==typeof e&&Number.isFinite(e)&&he(e)}catch(e){}},[h]);i(()=>{h?ue():he(void 0)},[h,ue]);const ge=a(null),fe=a(null),[pe,ye]=c(null),[me,be]=c(C??null),[we,xe]=c(B??null);i(()=>{C&&be(C)},[C]),i(()=>{xe(B??null)},[B]);const[ke,Se]=c(B),Ce=a(!1);i(()=>{if(!B)return Se(void 0),void(Ce.current=!1);Ce.current||Se(B)},[B]);const Be=w??pe??void 0,ze=S??C??void 0,Fe=yn(me??ze,F),ve=yn(ze,F)??ze,We=me??void 0,{games:Te,howToPlayMarkdown:Ae,loading:Re,error:Le}=ti(Z,{category:Be,jurisdiction:x,sport:Fe},{skip:K}),{propositions:De,loading:Me,error:Pe}=ni(Z,{category:Be,sport:ve,event_id:ke},{skip:K}),{sports:He,loading:Oe}=oi(Z,{skip:K}),{createEntry:Ie,loading:Ee,error:Ye,clearSubmitError:Ve}=li(Z),{preview:Ue}=di(Z),qe=l(()=>Bn((K?p:Te)??[],{category:Be,sport:Fe??We,sportBaseKey:F}),[K,p,Te,Be,Fe,We,F]),Ke=N??Ae??null,{maxPayouts:Ze,refetchGame:Xe}=ri(Z,qe??[],{skip:K,betAmount:20}),Qe=K?b??Ji:Ze,Je=K?y:De,$e=S?(Je??[]).filter(e=>e.sport===S):Je,_e=l(()=>an($e??[]),[$e]),et=l(()=>Be||(1===_e.length?_e[0]:void 0),[Be,_e]),tt=l(()=>{const e=$e??[];return et?xn(e,{category:et,sportBaseKey:F}):e},[$e,et,F]),nt=l(()=>We?xn(tt,{sport:We,sportBaseKey:F}):tt,[tt,We,F]),ot=l(()=>({category:et,sport:We,sportBaseKey:F}),[et,We,F]),it=l(()=>{const e=(qe??[]).filter(e=>e.active);if(!et&&_e.length>1)return[];const t=et?Bn(e,ot):e;return et||We?function(e,t,n){return n?.category||n?.sport?e.filter(e=>Cn(e,t,n)):e}(t,nt,ot):t},[qe,nt,ot,et,We,_e.length]),{step:rt,selectedGame:lt,selections:at,placedEntry:ct,setGameOnly:st,clearSelectedGame:dt,goToSportSelection:ht,goToConfirmation:ut,goToSuccess:gt,goBack:ft,reset:pt,toggleSelection:yt}=ai(k),mt=e.useCallback(()=>{Ce.current=!0,Se(void 0),pt(),E?.()},[pt,E]),bt=!!ke,wt=bt?z:void 0,xt=!K&&(Re||Me||!!lt&&Oe),kt=K?null:lt?Le||Pe:Le,St=l(()=>lt?Fn(nt,lt,F):nt,[lt,nt,F]),Ct=l(()=>{const e=lt?Fn(tt,lt,F):tt,t=lt?.allowed_sports,n=/* @__PURE__ */new Map;for(const o of e){const i=tn(o,e);"Other"!==i&&(t?.length&&!t.includes(i)||n.set(i,(n.get(i)??0)+1))}return Array.from(n.entries()).sort((e,t)=>t[1]-e[1]).map(([e,t])=>({key:e,count:t}))},[lt,tt,F]),Bt=l(()=>Ct.map(e=>e.key),[Ct]),zt=l(()=>lt?St:tt,[lt,St,tt]),Ft=l(()=>xn(lt?St:tt,{category:et}),[lt,St,tt,et]),vt=l(()=>{const e=new Set(Bt);return He.filter(t=>e.has(t.key))},[He,Bt]),Wt=l(()=>xn(St,{category:et,sport:me}),[St,et,me]),Tt=l(()=>{if(!lt||!no(lt))return[];const{min:e}=dn(lt,le),t=le??e;return io(Wt).filter(e=>e.propositionCount>=t)},[lt,le,Wt]),At=l(()=>no(lt)?so(Wt,we):Wt,[lt,Wt,we]),Rt=function(e,t){const[n,o]=c([]),r=a(/* @__PURE__ */new Set),s=l(()=>{const e=/* @__PURE__ */new Map;for(const n of t)e.set(n.id,n);for(const t of n)e.set(t.id,t);return e},[t,n]),d=l(()=>e?function(e){const t=/* @__PURE__ */new Set;for(const n of e)if(Et(n))for(const e of jt(n))t.add(e);return[...t]}(t).filter(e=>!s.has(e)):[],[e,t,s]);return i(()=>{if(!e||0===d.length)return;const t=d.filter(e=>!r.current.has(e));if(0===t.length)return;for(const e of t)r.current.add(e);let n=!1;return e.getPropositionsByIds(t).then(e=>{!n&&e.length>0&&o(t=>[...t,...e])}).catch(()=>{}),()=>{n=!0}},[e,d]),s}(K?null:Z,At),Lt=Object.keys(at).map(Number),Dt=Lt.length,Mt=l(()=>Wt.filter(e=>Lt.includes(e.id)),[Wt,Lt]);i(()=>{w||pe||1===_e.length&&ye(_e[0])},[w,pe,_e]),i(()=>{if(!lt)return;const e=St,t=new Set(e.map(on));let n=pe;n&&t.has(n)||(n=1===t.size?Array.from(t)[0]:null,n!==pe&&ye(n));const o=n?e.filter(e=>on(e)===n):e,i=new Set(function(e){const t=/* @__PURE__ */new Set;for(const n of e){const o=tn(n,e);"Other"!==o&&t.add(o)}return[...t]}(o)),r=lt.allowed_sports;be(e=>e&&i.has(e)&&(!r?.length||r.includes(e))?e:1===r?.length&&i.has(r[0])?r[0]:1===i.size?Array.from(i)[0]:(()=>{const e=/* @__PURE__ */new Map;for(const i of o){const t=tn(i,o);"Other"!==t&&(r?.length&&!r.includes(t)||e.set(t,(e.get(t)??0)+1))}let t=null,n=0;for(const[o,i]of e)i>n&&(t=o,n=i);return t})())},[lt?.id,St,pe]),i(()=>{Ve()},[lt?.id,rt,Ve]),i(()=>{lt&&et&&(kn(lt,et)||dt())},[lt,et,dt]),i(()=>{lt&&(Cn(lt,nt,{category:et,sport:me,sportBaseKey:F})||dt())},[lt,et,me,F,nt,dt]),i(()=>{if(lt){const e=ge.current,t=fe.current!==lt.id;if(fe.current=lt.id,null!=e?.stake&&e.stake>0?_(e.stake):t&&_(0),e){const{count:t}=e;return ge.current=null,ae(t),void Q(t)}if(lt.allowed_propositions&&lt.allowed_propositions.length>0){const e=le;null!=e&&lt.allowed_propositions.includes(e)?Q(e):(ae(void 0),Q(0))}else ae(void 0),Q(lt.num_propositions||lt.max_propositions||0)}},[lt]);const Pt=(e,t,n)=>{const o=(Qe[e]?.top_payouts??[]).find(e=>e.proposition_count===t),i=o&&o.bet_amount&&o.bet_amount>0?o.bet_amount:20,r=o&&i>0?o.net_payout/i*n:0;return r>0?r:Xi((qe??[]).find(t=>t.id===e)??(lt?.id===e?lt:null),t,n)};i(()=>{if("sport"!==rt&&"confirm"!==rt||!lt||K)return;const e=no(lt)&&we?At.length:Number.MAX_SAFE_INTEGER;let t;if(lt.allowed_propositions&&lt.allowed_propositions.length>0){const n=lt.allowed_propositions?[...lt.allowed_propositions].filter(t=>t<=e).sort((e,t)=>e-t):[];if(0===n.length)return void re({});const o=le??n[0],i=n.filter(e=>e>o);if(0===i.length)return void re({});t=[o,...i]}else{const{min:n,max:o}=dn(lt),i=Math.min(o,e);if(n<=0||i<=n)return void re({});t=Array.from({length:i-n+1},(e,t)=>n+t)}const n={};for(const o of t)n[o]=Pt(lt.id,o,20);re(n)},[rt,lt,le,we,At.length,K,Qe]),i(()=>{if("confirm"!==rt||!lt)return;const e=Lt.length;if(0===e)return;let t=!1;const n={};for(let i=0;i<=e;i++)n[i]=Pt(lt.id,i,$);oe(n),e!==J.current?(J.current=e,Q(e)):(X>e||X<=0&&e>0)&&Q(e);const o=$>0?$:Math.max(lt.min_bet??20,.01);return(async()=>{try{const n=await Ue(lt.id,{actual:X,predicted:X,total:e,bet_amount:o,rule_id:ce});if(t)return;if(te(n.winning_counts),$>0&&n.payouts){const e={};for(const[t,o]of Object.entries(n.payouts)){const n=Number(t);e[n]=o>0?o:Pt(lt.id,n,$)}oe(e)}}catch{t||te([])}})(),()=>{t=!0}},[rt,lt,Lt.length,X,$,Ue,Qe,ce]);const Ht=l(()=>{return t=ce,(e=lt)&&null!=t?e.permitted_rules?.find(e=>e.id===t)??null:null;var e,t},[lt,ce]),Ot=!no(lt)||ho(Mt,we),It=lt?dn(lt,void 0,Ht):null,Nt=!(!lt||!Ot)&&(lt.allowed_propositions&&lt.allowed_propositions.length>0?null!=le&&Dt===le&&sn(Dt,It?.min,It?.max):sn(Dt,It?.min,It?.max)),Gt=lt?.min_bet??0,Yt=Math.max(Gt,.01),Vt=null==de||$<=de,Ut=!Ee&&$>=Yt&&Nt&&Vt,qt=e=>{ae(e),Q(e);for(const t of Object.keys(at))yt(Number(t),at[Number(t)])},Kt=e=>{ae(e),Q(e)},Zt=e=>{xe(no(e)?B??null:null),st(e)},Xt=e=>{if(e!==we){for(const e of Object.keys(at)){const t=Number(e);yt(t,at[t])}xe(e)}},Qt=(e,t,n)=>{ge.current={count:t,stake:n},st(e),Xe(e.id);const o=e.allowed_sports??[];let i=null;me&&o.some(e=>mn(me,e,F))?i=me:1===o.length&&(i=o[0]),be(i);for(const c of Object.keys(at)){const e=Number(c);yt(e,at[e])}let r=xn(Fn($e??[],e,F),{category:et,sport:i,sportBaseKey:F});const l=Math.max(0,Math.min(t,r.length)),a=[...r].sort(()=>Math.random()-.5).slice(0,l);for(const c of a)yt(c.id,Math.random()<.5?"yes":"no");ut()},Jt=a(!1),$t=async()=>{if(lt&&Nt&&!Jt.current){if(K){const e={id:Math.floor(1e4*Math.random()),game_id:lt.id,user_id:d,proposition_ids:Lt,selections:at,pending:!0,expected_correct:X,bet_amount:$};return M?.(e),gt(e),void ue()}Jt.current=!0;try{P&&await P($);const e=await Ie({game_id:lt.id,user_id:d,proposition_ids:Lt,selections:at,stake:$,rule_id:Ht?.id??null});M?.(e),gt(e),ue()}catch(e){}finally{Jt.current=!1}}},_t=n(e=>G?.[e]??vt.find(t=>t.key===e)?.label??fn(e,void 0,F),[G,vt,F]),en=n(e=>pn(e,Y),[Y]),nn=l(()=>({theme:V,bodyFont:U,headingFont:q,games:it,propositions:At,compositeComponentById:Rt,propositionsForCategoryPicker:zt,sportsForSelectedGame:Bt,sportOptions:Ct,propositionsForSportPicker:Ft,sportSummaries:vt,loading:xt,error:kt,step:rt,selectedGame:lt,selections:at,placedEntry:ct,selectedPropositionIds:Lt,selectedPropositions:Mt,selectionValid:Nt,selectedRuleId:ce,setSelectedRuleId:se,selectedRule:Ht,answeredCount:Dt,betAmount:$,setBetAmount:_,expectedCorrect:X,setExpectedCorrect:Q,selectedPropositionCount:le,handlePropositionCountChange:qt,upgradePropositionCount:Kt,winningCounts:ee,payouts:ne,overloadPayouts:ie,submitting:Ee,submitError:Ye,canSubmit:Ut,gamePrice:Gt,userBalance:de,hasSufficientBalance:Vt,refreshUserBalance:ue,handleSubmit:$t,selectGame:Zt,goToSportSelection:ht,goToConfirmation:ut,goBack:ft,reset:pt,clearSelectedGame:dt,toggleSelection:yt,quickPickGame:Qt,selectedCategory:pe,setSelectedCategory:ye,selectedSport:me,setSelectedSport:be,selectedEventId:we,sameGameMultiEvents:Tt,selectSameGameMultiEvent:Xt,apiUrl:t,apiKey:o,fetchImpl:r,getAuthHeaders:s,userId:d,disableQuickPick:v,renderTeamLogo:T,renderPropositionSilk:A,selectionVariant:R,disableEventSwipe:L,enableSportFavourites:D,filterSport:S,initialSport:C,initialEventId:B,sportBaseKey:F,gameCategory:w,eventFilterActive:bt,eventFilterLabel:wt,clearEventFilter:mt,screenSize:j,displaySportName:_t,displayCategoryName:en,maxPayouts:Qe??{},howToPlayMarkdown:Ke,onEntryPlaced:M,onCancel:H,onShare:O,onRecharge:I,demoEntries:m,demoGames:p,demoPropositions:y}),[V,U,q,it,At,Rt,zt,Ft,Bt,Ct,vt,xt,kt,rt,lt,at,ct,Lt,Mt,Nt,Dt,$,X,le,ce,Ht,ee,ne,ie,Ee,Ye,Ut,Gt,t,o,d,de,r,s,v,T,A,R,L,D,S,C,B,F,w,j,bt,wt,mt,pe,me,we,Tt,Qe,Ke,M,H,O,I,E,m,p,y,qt,_t,en]);/* @__PURE__ */
98
- return W(Qi.Provider,{value:nn,children:u})}function er({onPress:e,onDoubleClick:t,label:n="QUICKPICK",size:i="md",yesColor:r,noColor:l,theme:c}){const s=o(Qi),d=c??s?.theme??Be,h=ae(d),u=d.colors,g=r??ue(d),f=l??ge(d),p="sm"===i,y=p?h.space.xs:h.space.sm,m=p?6:8,b=p?h.fontSize.sm:h.fontSize.md,w=p?8.5:10,x=a(0);/* @__PURE__ */
99
- return T(B,{onPress:()=>{if(e(),t){const e=Date.now();e-x.current<300?(x.current=0,t()):x.current=e}},activeOpacity:.8,accessibilityRole:"button",accessibilityLabel:n,style:[tr.container,{borderColor:ne(u.border,.6),borderRadius:h.radius.sm,minHeight:h.touchTarget.min}],children:[/* @__PURE__ */T(z,{style:tr.topRow,children:[
97
+ return T(B,{accessibilityRole:"button",accessibilityState:{selected:t===_,disabled:!n},onPress:()=>(e=>{E(e,Uo(e,m?.[e.id]).maxLegCount)})(e),disabled:!n,style:{alignItems:"center",gap:4,paddingHorizontal:4,paddingVertical:6,borderRadius:16,borderWidth:1,borderColor:t===_?w.primary:"transparent",opacity:n?1:.5,width:q},children:[/* @__PURE__ */W(Qo,{iconUrl:Ze(e),size:G?44:52,brandColor:w.primary,iconColor:w.primaryText,accentColor:L}),/* @__PURE__ */W(S,{numberOfLines:2,style:{fontSize:11,fontWeight:"700",lineHeight:13,textAlign:"center",letterSpacing:-.11,color:t===_?w.primary:A,fontFamily:F},children:I(e)})]},e.id)})})]})]})}var _o=k.create({centerContainer:{alignItems:"center",justifyContent:"center",padding:32,gap:8},gameCard:{flexDirection:"column",alignItems:"center",borderWidth:1,borderRadius:24,paddingHorizontal:20,paddingTop:22,paddingBottom:20},jackpotBadge:{alignSelf:"center",flexDirection:"row",alignItems:"center",gap:2,paddingHorizontal:8,paddingVertical:2,borderRadius:999},jackpotBadgeText:{fontSize:10,fontWeight:"700"},tagsRow:{flexDirection:"row",flexWrap:"wrap",gap:4},tag:{paddingHorizontal:6,paddingVertical:2,borderRadius:4},tagText:{fontSize:12}}),ei=class{constructor(e){this.inflight=/* @__PURE__ */new Map,this.cache=/* @__PURE__ */new Map,this.apiUrl=e.apiUrl,this.apiKey=e.apiKey,this.fetchImpl=e.fetchImpl??fetch.bind(globalThis),this.getAuthHeaders=e.getAuthHeaders}invalidateCache(){this.cache.clear()}invalidate(){this.invalidateCache()}async request(e,t,n){const o=`${this.apiUrl}${e}`,i=(t?.method??"GET").toUpperCase(),r="GET"===i,l=r,a=!r&&!n?.idempotent,c=`${i} ${o}`;if(l){const e=this.cache.get(c);if(e&&Date.now()-e.at<5e3)return e.value;const t=this.inflight.get(c);if(t)return t}const s=l?this.cache.get(c):void 0,d=(async()=>{let e;try{const n=this.getAuthHeaders?await this.getAuthHeaders():void 0;e=await this.fetchImpl(o,{...t,headers:{"Content-Type":"application/json",...this.apiKey?{"X-API-Key":this.apiKey}:{},...n??{},...s?.etag?{"If-None-Match":s.etag}:{},...t?.headers}})}catch(i){throw i}if(304===e.status&&s)return l&&this.cache.set(c,{at:Date.now(),value:s.value,etag:s.etag}),s.value;if(!e.ok){let t=`API request failed: ${e.status} ${e.statusText}`;try{const n=await e.json();422===e.status&&n.detail?Array.isArray(n.detail)?t=n.detail.map(e=>`${Array.isArray(e.loc)?e.loc.join("."):"field"}: ${e.msg}`).join("; "):"string"==typeof n.detail?t=n.detail:"object"==typeof n.detail&&(t=JSON.stringify(n.detail)):n.message?t=n.message:n.error&&(t=n.error)}catch{}throw new Error(t)}const n=await e.json();if(l){const t=e.headers.get("ETag")??void 0;this.cache.set(c,{at:Date.now(),value:n,etag:t})}return n})();return l?(this.inflight.set(c,d),d.catch(()=>{}).finally(()=>{this.inflight.delete(c)})):a&&d.finally(()=>this.invalidateCache()).catch(()=>{}),d}async getGames(e){const t=new URLSearchParams;e?.category&&t.append("category",e.category),e?.jurisdiction&&t.append("jurisdiction",e.jurisdiction),e?.sport&&t.append("sport",e.sport);const n=t.toString(),o=n?`/games?${n}`:"/games",i=await this.request(o);return{games:i.payload||[],howToPlayMarkdown:i.how_to_play_markdown??null}}async getGame(e){return(await this.request(`/games/${e}`)).payload}async getPropositions(e){const t=new URLSearchParams;e?.event_id&&t.append("event_id",e.event_id),e?.sport&&t.append("sport",e.sport),e?.category&&t.append("category",e.category);const n=t.toString(),o=n?`/propositions?${n}`:"/propositions";return(await this.request(o)).payload||[]}async getSports(){return(await this.request("/propositions/sports")).sports||[]}async getPropositionsByIds(e){if(0===e.length)return[];const t=new URLSearchParams({ids:e.join(","),include_expired:"true"});return(await this.request(`/propositions?${t.toString()}`)).payload||[]}async getProposition(e){const t=(await this.request(`/propositions/${e}?include_expired=true`)).payload;return Array.isArray(t)?t.find(t=>t.id===e)??t[0]:t}async getGameEntries(e){const t=new URLSearchParams;null!=e?.user_id&&t.append("user_id",String(e.user_id)),null!=e?.pending&&t.append("pending",String(e.pending));const n=t.toString(),o=n?`/game-entries?${n}`:"/game-entries";return((await this.request(o)).payload||[]).map(e=>{const t={...e};return!t.created_at&&t.entry_date&&(t.created_at=t.entry_date),null!=t.stake&&null==t.bet_amount&&(t.bet_amount=Number(t.stake)),(!t.proposition_ids||0===t.proposition_ids.length)&&t.propositions&&t.propositions.length>0&&(t.proposition_ids=t.propositions.map(e=>e.id)),t})}async createGameEntry(e){const t=e.proposition_ids.map(t=>({proposition_id:t,user_prediction:e.selections?.[t]??"yes"})),n={game_id:e.game_id,user_id:e.user_id,propositions:t};null!=e.stake&&(n.stake=e.stake),null!=e.rule_id&&(n.rule_id=e.rule_id);const o=(await this.request("/game-entries",{method:"POST",body:JSON.stringify(n)})).payload;return null!=o.stake&&null==o.bet_amount&&(o.bet_amount=Number(o.stake)),o}async getPayoutsDue(e){const t=new URLSearchParams;null!=e?.game_id&&t.set("game_id",String(e.game_id)),null!=e?.limit&&t.set("limit",String(e.limit)),null!=e?.offset&&t.set("offset",String(e.offset));const n=t.toString();return await this.request(n?`/game-entries/payouts/due?${n}`:"/game-entries/payouts/due")}async getEntryPayout(e){return(await this.request(`/game-entries/${e}/payout`)).payload}async markEntryPaidOut(e){const t=await this.request(`/game-entries/${e}/payout/mark-paid-out`,{method:"POST",body:JSON.stringify({})});return this.invalidate(),t.payload}async updateGameEntryResult(e,t){return(await this.request(`/game-entries/${e}/result`,{method:"POST",body:JSON.stringify(t)})).payload}async getGameMaxPayout(e,t){const n=null!=t?`?bet_amount=${encodeURIComponent(String(t))}`:"";return(await this.request(`/games/${e}/max-payout${n}`)).payload}async getGamesMaxPayouts(e,t){if(0===e.length)return{};const n=new URLSearchParams({ids:e.join(",")});null!=t&&n.set("bet_amount",String(t));const o=await this.request(`/games/max-payouts?${n.toString()}`),i={};for(const[r,l]of Object.entries(o.payload||{}))i[Number(r)]=l;return i}async getEntryPreview(e,t){return(await this.request(`/games/${e}/preview`,{method:"POST",body:JSON.stringify(t)},{idempotent:!0})).payload}async evaluateRule(e,t){return(await this.request(`/games/${e}/evaluate-rule`,{method:"POST",body:JSON.stringify(t)},{idempotent:!0})).payload}async calculatePayout(e,t){return(await this.request(`/games/${e}/calculate-payout`,{method:"POST",body:JSON.stringify(t)},{idempotent:!0})).payload}};function ti(e,t,o){const[r,l]=c([]),[s,d]=c(null),[h,u]=c(!o?.skip),[g,f]=c(null),p=t?`${t.category||""}_${t.jurisdiction||""}_${t.sport||""}`:"",y=a(t);y.current=t;const m=o?.skip??!1,b=n(async()=>{if(!m)try{u(!0),f(null);const t=await e.getGames(y.current);l(t.games),d(t.howToPlayMarkdown)}catch(t){f(t instanceof Error?t.message:"Failed to fetch games")}finally{u(!1)}},[e,p,m]);return i(()=>{b()},[b]),{games:r,howToPlayMarkdown:s,loading:h,error:g,refetch:n(async()=>{e.invalidate(),await b()},[e,b])}}function ni(e,t,o){const[r,l]=c([]),[s,d]=c(!o?.skip),[h,u]=c(null),g=o?.skip??!1,f=t?`${t.event_id||""}_${t.sport||""}_${t.category||""}`:"",p=a(t);p.current=t;const y=n(async()=>{if(!g)try{d(!0),u(null);const t=await e.getPropositions(p.current);l(t)}catch(t){u(t instanceof Error?t.message:"Failed to fetch propositions")}finally{d(!1)}},[e,f,g]);return i(()=>{y()},[y]),{propositions:r,loading:s,error:h,refetch:n(async()=>{e.invalidate(),await y()},[e,y])}}function oi(e,t){const[o,r]=c([]),[l,a]=c(!t?.skip),[s,d]=c(null),h=t?.skip??!1,u=n(async()=>{if(!h)try{a(!0),d(null),r(await e.getSports())}catch(t){d(t instanceof Error?t.message:"Failed to fetch sports")}finally{a(!1)}},[e,h]);return i(()=>{u()},[u]),{sports:o,loading:l,error:s,refetch:n(async()=>{e.invalidate(),await u()},[e,u])}}function ii(e,t,o){const[r,l]=c([]),[s,d]=c(!o?.skip),[h,u]=c(null),g=o?.skip??!1,f=t?`${t.user_id??""}_${t.pending??""}`:"",p=a(t);p.current=t;const y=n(async()=>{if(!g)try{d(!0),u(null);const t=await e.getGameEntries(p.current);l(t)}catch(t){u(t instanceof Error?t.message:"Failed to fetch entries")}finally{d(!1)}},[e,f,g]);return i(()=>{y()},[y]),{entries:r,loading:s,error:h,refetch:n(async()=>{e.invalidate(),await y()},[e,y])}}function ri(e,t,o){const[r,l]=c({}),[s,d]=c(!1),h=o?.skip??!1,u=o?.betAmount,g=a(/* @__PURE__ */new Set);return i(()=>{if(h||0===t.length)return;const n=t.filter(e=>!(e.id in r)&&!g.current.has(e.id));if(0===n.length)return;for(const e of n)g.current.add(e.id);let o=!1;return d(!0),(async()=>{try{const t=await e.getGamesMaxPayouts(n.map(e=>e.id),u);o||l(e=>({...e,...t}))}catch{}finally{o||d(!1)}})(),()=>{o=!0}},[e,t.map(e=>e.id).join(","),h,u]),{maxPayouts:r,loading:s,refetchGame:n(async(t,n)=>{if(!h)try{const o=await e.getGamesMaxPayouts([t],n??u);o[t]&&l(e=>({...e,[t]:o[t]}))}catch{}},[e,h,u])}}function li(e){const[t,o]=c(!1),[i,r]=c(null),[l,a]=c(null);return{createEntry:async t=>{try{o(!0),r(null),await function(e=15e3){return"undefined"==typeof navigator||!1!==navigator.onLine||"undefined"==typeof window||"function"!=typeof window.addEventListener?Promise.resolve():new Promise(t=>{const n=()=>{window.removeEventListener("online",n),clearTimeout(o),t()},o=setTimeout(n,e);window.addEventListener("online",n)})}();const n=await e.createGameEntry(t);return a(n),n}catch(n){const e=n instanceof Error?n.message:"Failed to create entry";throw r(e),new Error(e)}finally{o(!1)}},loading:t,error:i,entry:l,clearSubmitError:n(()=>r(null),[])}}function ai(e){const[t,n]=c(e?"sport":"game"),[o,i]=c(null),[r,l]=c({}),[a,s]=c(null);return{step:t,selectedGame:o,selections:r,placedEntry:a,setGameOnly:e=>{i(e)},clearSelectedGame:()=>{i(null),l({})},goToSportSelection:e=>{e&&i(e),n("sport")},goToConfirmation:()=>{n("confirm")},goToSuccess:e=>{s(e),n("success")},goBack:()=>{"confirm"===t?n("sport"):"sport"===t&&(n("game"),i(null),l({}))},reset:()=>{n("game"),i(null),l({}),s(null)},toggleSelection:(e,t)=>{l(n=>{const o={...n};return o[e]===t?delete o[e]:o[e]=t,o})}}}function ci(e){const[t,o]=c(!1),[i,r]=c(null),[l,a]=c(null);return{evaluate:n(async(t,n)=>{try{o(!0),r(null);const i=await e.evaluateRule(t,n);return a(i),i}catch(i){const e=i instanceof Error?i.message:"Failed to evaluate rule";throw r(e),new Error(e)}finally{o(!1)}},[e]),loading:t,error:i,result:l}}function si(e){const[t,o]=c(!1),[i,r]=c(null),[l,a]=c(null);return{calculate:n(async(t,n)=>{try{o(!0),r(null);const i=await e.calculatePayout(t,n);return a(i),i}catch(i){const e=i instanceof Error?i.message:"Failed to calculate payout";throw r(e),new Error(e)}finally{o(!1)}},[e]),loading:t,error:i,result:l}}function di(e){const[t,o]=c(!1),[i,r]=c(null),[l,a]=c(null);return{preview:n(async(t,n)=>{try{o(!0),r(null);const i=await e.getEntryPreview(t,n);return a(i),i}catch(i){const e=i instanceof Error?i.message:"Failed to preview entry";throw r(e),new Error(e)}finally{o(!1)}},[e]),loading:t,error:i,result:l}}var hi=[1,5,10,20,50,100],ui=[4,12];function gi(e){return!!e&&!e.quick_pick_only&&"game_set"===(e.rule??"").trim().toLowerCase()}function fi(e,t,n){const o=n?.operatorMargin??.2,i=n?.perLegProbability??.5,r=Math.round(Math.pow(1/i,t)),l=(1-o)*Math.pow(1/i,t);return{legs:t,stake:e,prize:Math.round(e*l*100)/100,multiple:l,oddsOneIn:r}}function pi(e){if(!gi(e)||!e)return null;const t=e.min_propositions??e.allowed_propositions?.[0]??ui[0],n=e.max_propositions??e.allowed_propositions?.[e.allowed_propositions.length-1]??ui[1],o=e.allowed_propositions&&e.allowed_propositions.length>0?[...e.allowed_propositions].sort((e,t)=>e-t):Array.from({length:Math.max(0,n-t+1)},(e,n)=>t+n);if(0===o.length)return null;const i=Math.max(e.min_bet??1,.01),r=e.max_bet??null,l=hi.filter(e=>e>=i&&(null===r||e<=r));return{legOptions:o,defaultLegs:o.includes(8)?8:o[Math.floor(o.length/2)],defaultStake:Math.min(Math.max(20,i),r??20),minStake:i,maxStake:r,quickStakes:l,tagline:"Two steps to your multi. Tweak legs and stake — the prize updates as you go.",operatorMargin:e.operator_margin??.2,perLegProbability:e.payout_structure?.per_leg_probability??.5}}var yi=50,mi=[25,50,75,100],bi=[{legs:4,firstPayingTier:3,tiers50:[[3,60],[4,340]]},{legs:6,firstPayingTier:4,tiers50:[[4,40],[5,110],[6,850]]},{legs:8,firstPayingTier:5,tiers50:[[5,30],[6,70],[7,300],[8,2100]]},{legs:9,firstPayingTier:5,tiers50:[[5,10],[6,40],[7,100],[8,350],[9,4500]]},{legs:10,firstPayingTier:6,tiers50:[[6,15],[7,45],[8,140],[9,800],[10,1e4]]}];function wi(e){return!!e&&!e.quick_pick_only&&"ladder"===(e.rule??"").trim().toLowerCase()}function xi(e,t){return Math.round(e*t/50*100)/100}function ki(e,t){let n=0;return e.tiers50.map(([e,o])=>(n+=o,{atLeast:e,prize:xi(o,t),cumulative:xi(n,t)}))}function Si(e,t){return xi(e.tiers50.reduce((e,[,t])=>e+t,0),t)}function Ci(e,t,n){return xi(e.tiers50.reduce((e,[n,o])=>n<=t?e+o:e,0),n)}function Bi(e){if(!wi(e)||!e)return null;const t=e.allowed_propositions,n=e.min_propositions??4,o=e.max_propositions??10,i=bi.filter(e=>t&&t.length>0?t.includes(e.legs):e.legs>=n&&e.legs<=o);if(0===i.length)return null;const r=e.min_bet??mi[0],l=e.max_bet??mi[mi.length-1],a=mi.filter(e=>e>=r&&e<=l);return{ladders:i,defaultLegs:i.some(e=>8===e.legs)?8:i[Math.floor(i.length/2)].legs,defaultStake:a.includes(50)?50:a[0]??50,stakes:a.length>0?a:mi,tagline:"Climb the ladder. Every step pays its own prize, and every prize stacks on the one before."}}var zi=.21875,Fi=[1,5,10,20,50],vi=[4,12];function Wi(e){return(e??"").trim().toLowerCase()}var Ti={straight:"mirror",double:"double_mirror",triple:"triple_mirror"};function Ai(e){if(!e||e.quick_pick_only)return!1;const t=Wi(e.rule);return Object.values(Ti).includes(t)}function Ri(e,t,n){const o=n?.operatorMargin??.21875,i=n?.perLegProbability??.5,r=Math.round(Math.pow(2,t)),l=Math.pow(i,t)+Math.pow(1-i,t),a=Math.round(1/l),c=(1-o)*Math.pow(2,t-1);return{legs:t,stake:e,prize:Math.round(e*c*100)/100,multiple:c,totalOutcomes:r,winningOutcomes:2,oddsOneIn:a}}function Li(e){if(!Ai(e)||!e)return null;const t=e.min_propositions??e.allowed_propositions?.[0]??vi[0],n=e.max_propositions??e.allowed_propositions?.[e.allowed_propositions.length-1]??vi[1],o=Mi(function(e){const t=Wi(e?.rule);return Object.keys(Ti).find(e=>Ti[e]===t)??"straight"}(e)),i=(e.allowed_propositions&&e.allowed_propositions.length>0?[...e.allowed_propositions].sort((e,t)=>e-t):Array.from({length:Math.max(0,n-t+1)},(e,n)=>t+n)).filter(e=>e>=o.minLegs);if(0===i.length)return null;const r=Math.max(e.min_bet??1,.01),l=e.max_bet??null,a=Fi.filter(e=>e>=r&&(null===l||e<=l));return{variant:o,legOptions:i,defaultLegs:i.includes(8)?8:i[Math.floor(i.length/2)],defaultStake:Math.min(Math.max(20,r),l??20),minStake:r,maxStake:l,quickStakes:a,tagline:o.tagline,operatorMargin:e.operator_margin??.21875,perLegProbability:e.payout_structure?.per_leg_probability??.5}}var Di=[{id:"straight",name:"Straight Mirror",depth:1,minLegs:4,waysToWin:"2 ways to win",description:"All or nothing. Get every call right, or every call wrong. Both pay the same.",tagline:"Call every leg. Get them all right, you win — all wrong, you win the same.",tierNames:["Perfect"]},{id:"double",name:"Double Mirror",depth:2,minLegs:6,waysToWin:"4 ways to win",description:"Perfect, or one off, at either edge. All right or all wrong, plus the near miss on each side.",tagline:"Perfect, or one off, at either edge — four ways to land a win.",tierNames:["Perfect","Near"]},{id:"triple",name:"Triple Mirror",depth:3,minLegs:9,waysToWin:"6 ways to win",description:"Within two of a clean sweep, either way. Longer legs only, so you still miss the middle.",tagline:"Within two of a clean sweep, either way — six ways to land a win.",tierNames:["Perfect","Near","Third"]}];function Mi(e){return Di.find(t=>t.id===e)??Di[0]}function Pi(e,t){if(t<0||t>e)return 0;const n=Math.min(t,e-t);let o=1;for(let i=0;i<n;i++)o=o*(e-i)/(i+1);return Math.round(o)}var Hi=.21875,Oi=6,Ii=5,Ei=1,ji=2;function Ni(e){return!!e&&!e.quick_pick_only&&"six_again"===(e.rule??"").trim().toLowerCase()}var Gi={golden_point:!1,captains_challenge:!1};function Yi(e,t,n){const o=1+(t.golden_point?1:0)+(t.captains_challenge?1:0),i=e*n.baseMultiple*(t.golden_point?n.goldenPointFactor:1),r=t.captains_challenge?e*n.challengeMultiple:0;return{legs:n.legs,unit:e,stake:e*o,base:i,challenge:r,perfect:i+r,lowestWinningCount:n.legs-(t.captains_challenge?n.challengeMisses:0),ruleId:Vi(t,n)}}function Vi(e,t){return e.captains_challenge?e.golden_point?t.ruleIds.goldenChallenge:t.ruleIds.challenge:t.ruleIds.base}function Ui(e,t){const n=Yi(1,e,t);return{perfect:n.perfect/n.stake,challenge:n.challenge/n.stake}}function qi(e,t){return e.permitted_rules?.find(e=>t((e.name??"").toLowerCase().replace(/[^a-z]+/g," ").trim()))??null}function Ki(e){if(!Ni(e)||!e)return null;const t=e.num_propositions??e.min_propositions??6;if(t<2)return null;const n=e.operator_margin??.21875,o=Math.max(e.min_bet??10,.01),i=null!=e.max_bet?Math.max(o,Math.floor(e.max_bet/3/o)*o):Math.max(o,100),r=qi(e,e=>e.includes("challenge")&&!e.includes("golden")),l=qi(e,e=>e.includes("challenge")&&e.includes("golden")),a=qi(e,e=>!e.includes("challenge"))??null;return{legs:t,unitMin:o,unitStep:o,unitMax:i,defaultUnit:o,baseMultiple:Math.round(Math.pow(2,t)*(1-n)*100)/100,challengeMultiple:5,challengeMisses:1,goldenPointFactor:2,boosts:[{id:"golden_point",label:"Golden Point",costUnits:1},{id:"captains_challenge",label:"Captain's Challenge",costUnits:1}],tagline:"Set your play, then pick your six. Every call a yes or a no.",ruleIds:{base:a?.id??e.default_rule_id??null,challenge:r?.id??null,goldenChallenge:l?.id??null}}}function Zi(e){return e?.quick_pick_only?"quick_pick":gi(e)?"game_set":jo(e)?"pick_your_dividend":wi(e)?"ladder":Ai(e)?"mirror":So(e)?"safety_net":Ni(e)?"six_again":no(e)?"selections":Oo(e)?"rule_setup":"selections"}function Xi(e){if(!e||e.quick_pick_only)return!1;if("exact"!==(e.rule??"").trim().toLowerCase())return!1;if(no(e))return!1;const t=!!(e.allowed_markets&&e.allowed_markets.length>0),n=!!(e.allowed_sports&&e.allowed_sports.length>0);return t||n}function Qi(e){return!(!e||e.quick_pick_only||"exact"!==(e.rule??"").trim().toLowerCase()||no(e)||Xi(e))}function Ji(e){switch(Zi(e)){case"ladder":return{belowRequiredHint:(e,t)=>`Drop to Ladder ${e} or add another pick to stay on Ladder ${t}.`,belowRequiredAddOnlyHint:e=>`Add another pick to stay on Ladder ${e}.`,switchTierLabel:e=>`Switch to Ladder ${e}`,overloadTitle:"Add more picks to climb higher",tableColumnLabel:"Ladder",tierButtonLabel:e=>`Ladder ${e}`};case"game_set":case"pick_your_dividend":case"mirror":case"safety_net":case"six_again":return{belowRequiredHint:(e,t)=>`Drop to ${e} legs or add another pick to stay at ${t}.`,belowRequiredAddOnlyHint:e=>`Add another pick to stay at ${e} legs.`,switchTierLabel:e=>`Switch to ${e} legs`,overloadTitle:"Add more legs to win more",tableColumnLabel:"Legs",tierButtonLabel:e=>`${e} legs`};default:return{belowRequiredHint:(e,t)=>`Drop to a ${e}-leg multi or add another pick to stay at ${t}.`,belowRequiredAddOnlyHint:e=>`Add another pick to stay at ${e}.`,switchTierLabel:e=>`Switch to ${e}-leg`,overloadTitle:"Add more picks to win more",tableColumnLabel:"Legs",tierButtonLabel:e=>`Multi ${e}`}}}function $i(e){const t=Zi(e);return"six_again"===t||"pick_your_dividend"===t}function _i(e){return"six_again"===Zi(e)?"Set by your ticket and boosts.":"Set by your dividend ladder rung."}function er(e,t,n){if(!e||t<=0||n<=0)return 0;switch(Zi(e)){case"game_set":return fi(n,t,{operatorMargin:e.operator_margin??void 0,perLegProbability:e.payout_structure?.per_leg_probability??void 0}).prize;case"mirror":return Ri(n,t,{operatorMargin:e.operator_margin??void 0,perLegProbability:e.payout_structure?.per_leg_probability??void 0}).prize;case"pick_your_dividend":return function(e,t,n=Io){if(!(e>0&&t>0))return 0;for(const o of n)if(Math.abs(Go(o,e).stake-t)<.005)return o;return 0}(t,n);default:return 0}}var tr=t(null),nr={};function or(){const e=o(tr);if(!e)throw new Error("usePlaceEntry must be used within a <PlaceEntryProvider>");return e}function ir({apiUrl:t,apiKey:o,fetchImpl:r,getAuthHeaders:s,userId:d,getUserBalance:h,children:u,theme:g,colorScheme:f,demoGames:p,demoPropositions:y,demoEntries:m,demoMaxPayouts:b,gameCategory:w,jurisdiction:x,initialGameId:k,filterSport:S,initialSport:C,initialEventId:B,initialEventLabel:z,sportBaseKey:F,disableQuickPick:v=!1,renderTeamLogo:T,renderPropositionSilk:A,selectionVariant:R,disableEventSwipe:L,enableSportFavourites:D,onEntryPlaced:M,onBeforeSubmit:P,onCancel:H,onShare:O,onRecharge:I,onClearEventFilter:E,screenSize:j="desktop",howToPlayMarkdown:N,sportDisplayNames:G,categoryDisplayNames:Y}){const V=je(g,f),U=Ne(V),q=Ge(V),K=!(!p||!y),Z=l(()=>new ei({apiUrl:t,apiKey:o,fetchImpl:r,getAuthHeaders:s}),[t,o,r,s]),[X,Q]=c(0),J=a(0),[$,_]=c(0),[ee,te]=c([]),[ne,oe]=c({}),[ie,re]=c({}),[le,ae]=c(void 0),[ce,se]=c(null),[de,he]=c(void 0),ue=e.useCallback(async()=>{if(h)try{const e=await h();"number"==typeof e&&Number.isFinite(e)&&he(e)}catch(e){}},[h]);i(()=>{h?ue():he(void 0)},[h,ue]);const ge=a(null),fe=a(null),[pe,ye]=c(null),[me,be]=c(C??null),[we,xe]=c(B??null);i(()=>{C&&be(C)},[C]),i(()=>{xe(B??null)},[B]);const[ke,Se]=c(B),Ce=a(!1);i(()=>{if(!B)return Se(void 0),void(Ce.current=!1);Ce.current||Se(B)},[B]);const Be=w??pe??void 0,ze=yn(me??S??C??void 0,F),Fe=yn(S,F)??S,ve=me??void 0,{games:We,howToPlayMarkdown:Te,loading:Ae,error:Re}=ti(Z,{category:Be,jurisdiction:x,sport:ze},{skip:K}),{propositions:Le,loading:De,error:Me}=ni(Z,{category:Be,sport:Fe,event_id:ke},{skip:K}),{sports:Pe,loading:He}=oi(Z,{skip:K}),{createEntry:Oe,loading:Ie,error:Ee,clearSubmitError:Ye}=li(Z),{preview:Ve}=di(Z),Ue=l(()=>Bn((K?p:We)??[],{category:Be,sport:ze??ve,sportBaseKey:F}),[K,p,We,Be,ze,ve,F]),qe=N??Te??null,{maxPayouts:Ke,refetchGame:Ze}=ri(Z,Ue??[],{skip:K,betAmount:20}),Xe=K?b??nr:Ke,Qe=K?y:Le,Je=S?(Qe??[]).filter(e=>e.sport===S):Qe,$e=l(()=>an(Je??[]),[Je]),_e=l(()=>Be||(1===$e.length?$e[0]:void 0),[Be,$e]),et=l(()=>{const e=Je??[];return _e?xn(e,{category:_e,sportBaseKey:F}):e},[Je,_e,F]),tt=l(()=>ve?xn(et,{sport:ve,sportBaseKey:F}):et,[et,ve,F]),nt=l(()=>({category:_e,sport:ve,sportBaseKey:F}),[_e,ve,F]),ot=l(()=>{const e=(Ue??[]).filter(e=>e.active);if(!_e&&$e.length>1)return[];const t=_e?Bn(e,nt):e;return _e||ve?function(e,t,n){return n?.category||n?.sport?e.filter(e=>Cn(e,t,n)):e}(t,tt,nt):t},[Ue,tt,nt,_e,ve,$e.length]),{step:it,selectedGame:rt,selections:lt,placedEntry:at,setGameOnly:ct,clearSelectedGame:st,goToSportSelection:dt,goToConfirmation:ht,goToSuccess:ut,goBack:gt,reset:ft,toggleSelection:pt}=ai(k),yt=e.useCallback(()=>{Ce.current=!0,Se(void 0),ft(),E?.()},[ft,E]),mt=!!ke,bt=mt?z:void 0,wt=!K&&(Ae||De||!!rt&&He),xt=K?null:rt?Re||Me:Re,kt=l(()=>rt?Fn(tt,rt,F):tt,[rt,tt,F]),St=l(()=>{const e=rt?Fn(et,rt,F):et,t=rt?.allowed_sports,n=/* @__PURE__ */new Map;for(const o of e){const i=tn(o,e);"Other"!==i&&(t?.length&&!t.includes(i)||n.set(i,(n.get(i)??0)+1))}return Array.from(n.entries()).sort((e,t)=>t[1]-e[1]).map(([e,t])=>({key:e,count:t}))},[rt,et,F]),Ct=l(()=>St.map(e=>e.key),[St]),Bt=l(()=>rt?kt:et,[rt,kt,et]),zt=l(()=>xn(rt?kt:et,{category:_e}),[rt,kt,et,_e]),Ft=l(()=>{const e=new Set(Ct);return Pe.filter(t=>e.has(t.key))},[Pe,Ct]),vt=l(()=>xn(kt,{category:_e,sport:me}),[kt,_e,me]),Wt=l(()=>{if(!rt||!no(rt))return[];const{min:e}=dn(rt,le),t=le??e;return io(vt).filter(e=>e.propositionCount>=t)},[rt,le,vt]),Tt=l(()=>no(rt)?so(vt,we):vt,[rt,vt,we]),At=function(e,t){const[n,o]=c([]),r=a(/* @__PURE__ */new Set),s=l(()=>{const e=/* @__PURE__ */new Map;for(const n of t)e.set(n.id,n);for(const t of n)e.set(t.id,t);return e},[t,n]),d=l(()=>e?function(e){const t=/* @__PURE__ */new Set;for(const n of e)if(Et(n))for(const e of jt(n))t.add(e);return[...t]}(t).filter(e=>!s.has(e)):[],[e,t,s]);return i(()=>{if(!e||0===d.length)return;const t=d.filter(e=>!r.current.has(e));if(0===t.length)return;for(const e of t)r.current.add(e);let n=!1;return e.getPropositionsByIds(t).then(e=>{!n&&e.length>0&&o(t=>[...t,...e])}).catch(()=>{}),()=>{n=!0}},[e,d]),s}(K?null:Z,Tt),Rt=Object.keys(lt).map(Number),Lt=Rt.length,Dt=l(()=>vt.filter(e=>Rt.includes(e.id)),[vt,Rt]);i(()=>{w||pe||1===$e.length&&ye($e[0])},[w,pe,$e]),i(()=>{if(!rt)return;const e=kt,t=new Set(e.map(on));let n=pe;n&&t.has(n)||(n=1===t.size?Array.from(t)[0]:null,n!==pe&&ye(n));const o=n?e.filter(e=>on(e)===n):e,i=new Set(function(e){const t=/* @__PURE__ */new Set;for(const n of e){const o=tn(n,e);"Other"!==o&&t.add(o)}return[...t]}(o)),r=rt.allowed_sports;be(e=>e&&i.has(e)&&(!r?.length||r.includes(e))?e:1===r?.length&&i.has(r[0])?r[0]:1===i.size?Array.from(i)[0]:(()=>{const e=/* @__PURE__ */new Map;for(const i of o){const t=tn(i,o);"Other"!==t&&(r?.length&&!r.includes(t)||e.set(t,(e.get(t)??0)+1))}let t=null,n=0;for(const[o,i]of e)i>n&&(t=o,n=i);return t})())},[rt?.id,kt,pe]),i(()=>{Ye()},[rt?.id,it,Ye]),i(()=>{rt&&_e&&(kn(rt,_e)||st())},[rt,_e,st]),i(()=>{rt&&(Cn(rt,tt,{category:_e,sport:me,sportBaseKey:F})||st())},[rt,_e,me,F,tt,st]),i(()=>{if(rt){const e=ge.current,t=fe.current!==rt.id;if(fe.current=rt.id,null!=e?.stake&&e.stake>0?_(e.stake):t&&_(Math.max(20,rt.min_bet??0)),e){const{count:t}=e;return ge.current=null,ae(t),void Q(t)}if(rt.allowed_propositions&&rt.allowed_propositions.length>0){const e=le;null!=e&&rt.allowed_propositions.includes(e)?Q(e):(ae(void 0),Q(0))}else ae(void 0),Q(rt.num_propositions||rt.max_propositions||0)}},[rt]);const Mt=(e,t,n)=>{const o=(Xe[e]?.top_payouts??[]).find(e=>e.proposition_count===t),i=o&&o.bet_amount&&o.bet_amount>0?o.bet_amount:20,r=o&&i>0?o.net_payout/i*n:0;return r>0?r:er((Ue??[]).find(t=>t.id===e)??(rt?.id===e?rt:null),t,n)};i(()=>{if("sport"!==it&&"confirm"!==it||!rt||K)return;const e=no(rt)&&we?Tt.length:Number.MAX_SAFE_INTEGER;let t;if(rt.allowed_propositions&&rt.allowed_propositions.length>0){const n=rt.allowed_propositions?[...rt.allowed_propositions].filter(t=>t<=e).sort((e,t)=>e-t):[];if(0===n.length)return void re({});const o=le??n[0],i=n.filter(e=>e>o);if(0===i.length)return void re({});t=[o,...i]}else{const{min:n,max:o}=dn(rt),i=Math.min(o,e);if(n<=0||i<=n)return void re({});t=Array.from({length:i-n+1},(e,t)=>n+t)}const n={};for(const o of t)n[o]=Mt(rt.id,o,20);re(n)},[it,rt,le,we,Tt.length,K,Xe]),i(()=>{if("confirm"!==it||!rt)return;const e=Rt.length;if(0===e)return;let t=!1;const n={};for(let i=0;i<=e;i++)n[i]=Mt(rt.id,i,$);oe(n),e!==J.current?(J.current=e,Q(e)):(X>e||X<=0&&e>0)&&Q(e);const o=$>0?$:Math.max(rt.min_bet??20,.01);return(async()=>{try{const n=await Ve(rt.id,{actual:X,predicted:X,total:e,bet_amount:o,rule_id:ce});if(t)return;if(te(n.winning_counts),$>0&&n.payouts){const e={};for(const[t,o]of Object.entries(n.payouts)){const n=Number(t);e[n]=o>0?o:Mt(rt.id,n,$)}oe(e)}}catch{t||te([])}})(),()=>{t=!0}},[it,rt,Rt.length,X,$,Ve,Xe,ce]);const Pt=l(()=>{return t=ce,(e=rt)&&null!=t?e.permitted_rules?.find(e=>e.id===t)??null:null;var e,t},[rt,ce]),Ht=!no(rt)||ho(Dt,we),Ot=rt?dn(rt,void 0,Pt):null,It=!(!rt||!Ht)&&(rt.allowed_propositions&&rt.allowed_propositions.length>0?null!=le&&Lt===le&&sn(Lt,Ot?.min,Ot?.max):sn(Lt,Ot?.min,Ot?.max)),Nt=rt?.min_bet??0,Gt=Math.max(Nt,.01),Yt=null==de||$<=de,Vt=!Ie&&$>=Gt&&It&&Yt,Ut=e=>{ae(e),Q(e);for(const t of Object.keys(lt))pt(Number(t),lt[Number(t)])},qt=e=>{ae(e),Q(e)},Kt=e=>{xe(no(e)?B??null:null),ct(e)},Zt=e=>{if(e!==we){for(const e of Object.keys(lt)){const t=Number(e);pt(t,lt[t])}xe(e)}},Xt=(e,t,n)=>{ge.current={count:t,stake:n},ct(e),Ze(e.id);const o=e.allowed_sports??[];let i=null;me&&o.some(e=>mn(me,e,F))?i=me:1===o.length&&(i=o[0]),be(i);for(const c of Object.keys(lt)){const e=Number(c);pt(e,lt[e])}let r=xn(Fn(Je??[],e,F),{category:_e,sport:i,sportBaseKey:F});const l=Math.max(0,Math.min(t,r.length)),a=[...r].sort(()=>Math.random()-.5).slice(0,l);for(const c of a)pt(c.id,Math.random()<.5?"yes":"no");ht()},Qt=a(!1),Jt=async()=>{if(rt&&It&&!Qt.current){if(K){const e={id:Math.floor(1e4*Math.random()),game_id:rt.id,user_id:d,proposition_ids:Rt,selections:lt,pending:!0,expected_correct:X,bet_amount:$};return M?.(e),ut(e),void ue()}Qt.current=!0;try{P&&await P($);const e=await Oe({game_id:rt.id,user_id:d,proposition_ids:Rt,selections:lt,stake:$,rule_id:Pt?.id??null});M?.(e),ut(e),ue()}catch(e){}finally{Qt.current=!1}}},$t=n(e=>G?.[e]??Ft.find(t=>t.key===e)?.label??fn(e,void 0,F),[G,Ft,F]),_t=n(e=>pn(e,Y),[Y]),en=l(()=>({theme:V,bodyFont:U,headingFont:q,games:ot,propositions:Tt,compositeComponentById:At,propositionsForCategoryPicker:Bt,sportsForSelectedGame:Ct,sportOptions:St,propositionsForSportPicker:zt,sportSummaries:Ft,loading:wt,error:xt,step:it,selectedGame:rt,selections:lt,placedEntry:at,selectedPropositionIds:Rt,selectedPropositions:Dt,selectionValid:It,selectedRuleId:ce,setSelectedRuleId:se,selectedRule:Pt,answeredCount:Lt,betAmount:$,setBetAmount:_,expectedCorrect:X,setExpectedCorrect:Q,selectedPropositionCount:le,handlePropositionCountChange:Ut,upgradePropositionCount:qt,winningCounts:ee,payouts:ne,overloadPayouts:ie,submitting:Ie,submitError:Ee,canSubmit:Vt,gamePrice:Nt,userBalance:de,hasSufficientBalance:Yt,refreshUserBalance:ue,handleSubmit:Jt,selectGame:Kt,goToSportSelection:dt,goToConfirmation:ht,goBack:gt,reset:ft,clearSelectedGame:st,toggleSelection:pt,quickPickGame:Xt,selectedCategory:pe,setSelectedCategory:ye,selectedSport:me,setSelectedSport:be,selectedEventId:we,sameGameMultiEvents:Wt,selectSameGameMultiEvent:Zt,apiUrl:t,apiKey:o,fetchImpl:r,getAuthHeaders:s,userId:d,disableQuickPick:v,renderTeamLogo:T,renderPropositionSilk:A,selectionVariant:R,disableEventSwipe:L,enableSportFavourites:D,filterSport:S,initialSport:C,initialEventId:B,sportBaseKey:F,gameCategory:w,eventFilterActive:mt,eventFilterLabel:bt,clearEventFilter:yt,screenSize:j,displaySportName:$t,displayCategoryName:_t,maxPayouts:Xe??{},howToPlayMarkdown:qe,onEntryPlaced:M,onCancel:H,onShare:O,onRecharge:I,demoEntries:m,demoGames:p,demoPropositions:y}),[V,U,q,ot,Tt,At,Bt,zt,Ct,St,Ft,wt,xt,it,rt,lt,at,Rt,Dt,It,Lt,$,X,le,ce,Pt,ee,ne,ie,Ie,Ee,Vt,Nt,t,o,d,de,r,s,v,T,A,R,L,D,S,C,B,F,w,j,mt,bt,yt,pe,me,we,Wt,Xe,qe,M,H,O,I,E,m,p,y,Ut,$t,_t]);/* @__PURE__ */
98
+ return W(tr.Provider,{value:en,children:u})}function rr({onPress:e,onDoubleClick:t,label:n="QUICKPICK",size:i="md",yesColor:r,noColor:l,theme:c}){const s=o(tr),d=c??s?.theme??Be,h=ae(d),u=d.colors,g=r??ue(d),f=l??ge(d),p="sm"===i,y=p?h.space.xs:h.space.sm,m=p?6:8,b=p?h.fontSize.sm:h.fontSize.md,w=p?8.5:10,x=a(0);/* @__PURE__ */
99
+ return T(B,{onPress:()=>{if(e(),t){const e=Date.now();e-x.current<300?(x.current=0,t()):x.current=e}},activeOpacity:.8,accessibilityRole:"button",accessibilityLabel:n,style:[lr.container,{borderColor:ne(u.border,.6),borderRadius:h.radius.sm,minHeight:h.touchTarget.min}],children:[/* @__PURE__ */T(z,{style:lr.topRow,children:[
100
100
  /* @__PURE__ */T(A,{style:k.absoluteFill,viewBox:"0 0 100 100",preserveAspectRatio:"none",children:[
101
101
  /* @__PURE__ */W(O,{points:"0,0 53,0 47,100 0,100",fill:g}),
102
102
  /* @__PURE__ */W(O,{points:"53,0 100,0 100,100 47,100",fill:f}),
103
103
  /* @__PURE__ */W(M,{x1:"53",y1:"0",x2:"47",y2:"100",stroke:"rgba(255,255,255,0.85)",strokeWidth:"1.5",vectorEffect:"non-scaling-stroke"})]}),
104
- /* @__PURE__ */W(z,{style:[tr.half,{paddingHorizontal:y,paddingVertical:m}],children:/* @__PURE__ */W(S,{style:[tr.halfLabel,{fontSize:b}],numberOfLines:1,children:"Yes"})}),
105
- /* @__PURE__ */W(z,{style:[tr.half,{paddingHorizontal:y,paddingVertical:m}],children:/* @__PURE__ */W(S,{style:[tr.halfLabel,{fontSize:b}],numberOfLines:1,children:"No"})})]}),/* @__PURE__ */W(z,{style:[tr.labelRow,{backgroundColor:u.buttonSecondary}],children:/* @__PURE__ */W(S,{style:[tr.labelText,{color:u.buttonSecondaryText,fontSize:w,letterSpacing:.14*w,fontFamily:d.fonts?.mono??Ne(d)}],numberOfLines:1,children:n})})]})}var tr=k.create({container:{borderWidth:1,overflow:"hidden",flexShrink:0,flexDirection:"column",width:"100%",minWidth:92},topRow:{flexDirection:"row",flex:1,flexShrink:0},half:{flex:1,flexShrink:0,alignItems:"center",justifyContent:"center"},halfLabel:{color:"#ffffff",fontWeight:"600",letterSpacing:.2,flexShrink:0,textAlign:"center"},labelRow:{paddingTop:3,paddingBottom:4,alignItems:"center",justifyContent:"center"},labelText:{fontWeight:"700",textAlign:"center",flexShrink:0}}),nr=3;function or(e,t){const n=new Set(t.map(e=>e.eventId??e.event_id).filter(e=>Boolean(e)));if(0===n.size)return e;const o=[],i=[];for(const r of e){const e=r.eventId??r.event_id;(e&&n.has(e)?i:o).push(r)}return[...o,...i]}function ir(e,t,o){const[r,s]=c([]),[d,h]=c([]),[u,g]=c([]),[f,p]=c([]),[y,m]=c(null),b=l(()=>{const t=/* @__PURE__ */new Map;for(const n of e)t.set(n.id,n);return t},[e]),w=l(()=>e.filter(e=>null!=t[e.id]),[e,t]),x=l(()=>e.map(e=>e.id).join(","),[e]),k=a(null);i(()=>{if(k.current===x)return;k.current=x;const n=e.filter(e=>!(e.id in t)),o=e.filter(e=>null!=t[e.id]);s(n.map(e=>e.id)),h(or(n,o).slice(0,3).map(e=>e.id)),g([]),p([]),m(null)},[x,e,t]);const S=l(()=>{const e=new Set(u);return[...or(r.map(e=>b.get(e)).filter(e=>Boolean(e)).filter(t=>!e.has(t.id)),w).map(e=>e.id),...u.filter(e=>r.includes(e))]},[r,b,w,u]);i(()=>{h(e=>{const t=new Set(r),n=e.filter(e=>t.has(e));if(0===f.length&&!y){const t=S.slice(0,3);return t.length===n.length&&t.every((e,t)=>e===n[t])?n.length===e.length?e:n:t}if(n.length>=Math.min(3,r.length))return n.length===e.length?e:n;const o=[...n];for(const i of S){if(o.length>=3)break;o.includes(i)||o.push(i)}return o})},[r,S,f,y]);const C=l(()=>d.map(e=>b.get(e)).filter(e=>Boolean(e)),[d,b]),B=n((e,t)=>{m(null),t&&o(e,t),p(n=>[...n,{id:e,answer:t}]),h(t=>t.filter(t=>t!==e)),g(n=>{const o=n.filter(t=>t!==e);return t?o:[...o,e]}),s(n=>{const o=n.filter(t=>t!==e);return t?o:[...o,e]})},[o]),z=n(()=>{const e=f[f.length-1];e&&(e.answer&&o(e.id,e.answer),m({id:e.id,from:"yes"===e.answer?"right":"no"===e.answer?"left":"up"}),p(e=>e.slice(0,-1)),g(t=>t.filter(t=>t!==e.id)),s(t=>[e.id,...t.filter(t=>t!==e.id)]),h(t=>[e.id,...t.filter(t=>t!==e.id)].slice(0,3)))},[f,o]);return{visible:C,canSkip:r.length>1,canUndo:f.length>0,restored:y,resolve:B,undo:z}}var rr=g.bezier(.32,0,.67,0),lr=g.bezier(.22,1,.36,1),ar={stiffness:420,damping:34},cr={stiffness:280,damping:28},sr="#00C853",dr="#E53935",hr=e=>"web"===m.OS?{userSelect:"none",cursor:e?"grabbing":"grab"}:null;function ur(e){return"up"===e?{x:0,y:-720}:{x:"right"===e?640:-640,y:70}}function gr(e,t,n){return n&&-t>Math.abs(e)}function fr({prop:e,theme:t,depth:r=0,enterFrom:s,canSkip:d=!1,onResolve:u,registerApi:g,onDragStateChange:f,children:p}){const m=o(Qi),b=t??m?.theme??Be,w=Ge(b),x=b.colors.productYes??sr,C=b.colors.productNo??dr,B=0===r,[F,A]=c(!1),R=a(!1),L=a({x:0,y:0}),D=a({x:0,y:0}),M=a(null),P=a(0),H=a(null),O=a(null),I=a(null),E=a(d);E.current=d;const j=a(f);j.current=f;const N=a(new h.ValueXY({x:0,y:0})).current,G=a(new h.Value(0)).current,Y=n(()=>{N.setValue({x:L.current.x,y:L.current.y}),G.setValue(gr(L.current.x,L.current.y,E.current)?1:0)},[G,N]),V=n(()=>{null!=H.current&&(cancelAnimationFrame(H.current),H.current=null),O.current&&(O.current.stop(),O.current=null)},[]),U=n(e=>{V();let t=null;const n=o=>{const i=Math.min(null==t?1/60:(o-t)/1e3,1/30);t=o;const r=L.current,l=D.current;if(l.x+=(-e.stiffness*r.x-e.damping*l.x)*i,l.y+=(-e.stiffness*r.y-e.damping*l.y)*i,r.x+=l.x*i,r.y+=l.y*i,Math.abs(r.x)<.5&&Math.abs(r.y)<.5&&Math.abs(l.x)<2&&Math.abs(l.y)<2)return r.x=0,r.y=0,l.x=0,l.y=0,Y(),void(H.current=null);Y(),H.current=requestAnimationFrame(n)};H.current=requestAnimationFrame(n)},[Y,V]),q=n(t=>{if(R.current)return;if("up"===t&&!E.current)return;R.current=!0,V();const n="right"===t?"yes":"left"===t?"no":null,o=ur(t);L.current={...o},G.setValue("up"===t?1:0),O.current=h.timing(N,{toValue:o,duration:260,easing:rr,useNativeDriver:!1}),O.current.start(),I.current=setTimeout(()=>u(e.id,n),260)},[u,e.id,V,G,N]);i(()=>()=>{I.current&&clearTimeout(I.current),null!=H.current&&cancelAnimationFrame(H.current),O.current?.stop(),M.current&&j.current?.(!1)},[]),i(()=>{if(!s)return V(),L.current={x:0,y:0},D.current={x:0,y:0},void Y();const e=ur(s);L.current={x:e.x,y:e.y},D.current={x:0,y:0},Y(),U(cr)},[s,Y,U,V]),i(()=>{if(B&&g)return g({fly:q}),()=>g(null)},[q,B,g]);const K=l(()=>y.create({onStartShouldSetPanResponder:()=>!1,onMoveShouldSetPanResponder:(e,t)=>!R.current&&(Math.abs(t.dx)>2&&Math.abs(t.dx)>Math.abs(t.dy)||E.current&&-t.dy>2&&-t.dy>Math.abs(t.dx)),onPanResponderGrant:()=>{V(),M.current={x:L.current.x,y:L.current.y},D.current={x:0,y:0},P.current=Date.now(),A(!0),j.current?.(!0)},onPanResponderMove:(e,t)=>{if(R.current||!M.current)return;if(t.numberActiveTouches>1)return;const n=M.current.x+t.dx,o=Math.min(M.current.y+t.dy,0),i=e.nativeEvent.timestamp??Date.now(),r=i-P.current;if(r>0){const e=1-Math.exp(-r/40);D.current.x+=((n-L.current.x)/r*1e3-D.current.x)*e,D.current.y+=((o-L.current.y)/r*1e3-D.current.y)*e,P.current=i}L.current.x=n,L.current.y=o,Y()},onPanResponderRelease:e=>{if(!M.current)return;if(M.current=null,A(!1),j.current?.(!1),R.current)return;(e.nativeEvent.timestamp??Date.now())-P.current>90&&(D.current={x:0,y:0});const t=L.current,n=D.current;if(gr(t.x,t.y,E.current)){if(t.y<-110||n.y<-620)return q("up")}else{if(t.x>110||n.x>620)return q("right");if(t.x<-110||n.x<-620)return q("left")}U(ar)},onPanResponderTerminate:()=>{M.current=null,D.current={x:0,y:0},A(!1),j.current?.(!1),R.current||U(ar)},onPanResponderTerminationRequest:()=>!1,onShouldBlockNativeResponder:()=>!0}),[q,Y,U,V]),Z=N.x.interpolate({inputRange:[-260,0,260],outputRange:["-16deg","0deg","16deg"],extrapolate:"clamp"}),X=h.subtract(1,G),Q=h.multiply(X,N.x.interpolate({inputRange:[24,132],outputRange:[0,1],extrapolate:"clamp"})),J=h.multiply(X,N.x.interpolate({inputRange:[-132,-24],outputRange:[1,0],extrapolate:"clamp"})),$=h.multiply(G,N.y.interpolate({inputRange:[-120,-30],outputRange:[1,0],extrapolate:"clamp"})),_=a(new h.Value(r)).current;i(()=>{const e=h.timing(_,{toValue:r,duration:240,easing:lr,useNativeDriver:!1});return e.start(),()=>e.stop()},[r,_]);const ee=_.interpolate({inputRange:[0,3],outputRange:[0,36]}),te=_.interpolate({inputRange:[0,3],outputRange:[1,.88]});/* @__PURE__ */
106
- return W(h.View,{style:[k.absoluteFill,{zIndex:3-r,transform:[{translateY:ee},{scale:te}]}],pointerEvents:B?"auto":"none",children:/* @__PURE__ */T(h.View,{style:[{flex:1,transform:[{translateX:N.x},{translateY:N.y},{rotate:Z}]},B&&hr(F)],...B?K.panHandlers:{},children:[p,B&&/* @__PURE__ */T(v,{children:[
107
- /* @__PURE__ */W(h.View,{pointerEvents:"none",style:[mr.stamp,mr.stampLeft,{opacity:Q,borderColor:x,transform:[{rotate:"-12deg"}]}],children:/* @__PURE__ */W(S,{style:[mr.stampText,{color:x,fontFamily:w}],children:"Yes"})}),
108
- /* @__PURE__ */W(h.View,{pointerEvents:"none",style:[mr.stamp,mr.stampRight,{opacity:J,borderColor:C,transform:[{rotate:"12deg"}]}],children:/* @__PURE__ */W(S,{style:[mr.stampText,{color:C,fontFamily:w}],children:"No"})}),d&&/* @__PURE__ */W(h.View,{pointerEvents:"none",style:[mr.skipPillWrap,{opacity:$}],children:/* @__PURE__ */W(z,{style:[mr.skipPill,{borderColor:b.colors.border,backgroundColor:b.colors.background}],children:/* @__PURE__ */W(S,{style:[mr.skipPillText,{color:b.colors.primary}],children:"Skip"})})})]})]})})}function pr({prop:e}){const{theme:t,headingFont:n,renderTeamLogo:o,renderPropositionSilk:i,displaySportName:r,gameCategory:l,compositeComponentById:a}=$i(),c=t.colors,{height:s}=F(),d=s<700?12:24,h=Gt(e,a),u=Ht(e),g=("racing"===l?[e.away_team?.trim()||e.home_team?.trim()]:[e.home_team?.trim(),e.away_team?.trim()]).filter(Boolean),f=(t,n)=>t&&i?.(t,n)||Hr(t??e,o,g.join(" vs "))||null;/* @__PURE__ */
109
- return T(z,{style:[mr.face,{backgroundColor:be(t),borderColor:c.border}],children:[
110
- /* @__PURE__ */W(z,{style:[mr.matchupBand,{backgroundColor:we(t)}],children:g.length>0?g.map((e,n)=>/* @__PURE__ */T(z,{style:mr.matchupTeam,children:[n>0&&/* @__PURE__ */W(S,{style:[mr.matchupVs,{color:me(t)}],children:"vs"}),o?.(e),
111
- /* @__PURE__ */W(S,{style:[mr.matchupName,{color:ye(t)}],children:e})]},`${e}-${n}`)):/* @__PURE__ */W(S,{style:[mr.matchupName,{color:ye(t)}],children:e.league??r(e.sport??"")})}),
112
- /* @__PURE__ */T(z,{style:[mr.faceBody,{paddingVertical:d,gap:12===d?12:16}],children:[/* @__PURE__ */T(z,{style:mr.propositionRow,children:[!h&&f(e,32),h?/* @__PURE__ */T(z,{style:{flex:1,gap:12},children:[/* @__PURE__ */T(S,{style:[mr.compositeLabel,{color:de(t)}],children:["All ","OR"===h.operator?"or any of these":"of these"]}),/* @__PURE__ */W(z,{style:{gap:8},children:h.legs.map((e,o)=>/* @__PURE__ */T(z,{style:mr.compositeLeg,children:[
104
+ /* @__PURE__ */W(z,{style:[lr.half,{paddingHorizontal:y,paddingVertical:m}],children:/* @__PURE__ */W(S,{style:[lr.halfLabel,{fontSize:b}],numberOfLines:1,children:"Yes"})}),
105
+ /* @__PURE__ */W(z,{style:[lr.half,{paddingHorizontal:y,paddingVertical:m}],children:/* @__PURE__ */W(S,{style:[lr.halfLabel,{fontSize:b}],numberOfLines:1,children:"No"})})]}),/* @__PURE__ */W(z,{style:[lr.labelRow,{backgroundColor:u.buttonSecondary}],children:/* @__PURE__ */W(S,{style:[lr.labelText,{color:u.buttonSecondaryText,fontSize:w,letterSpacing:.14*w,fontFamily:d.fonts?.mono??Ne(d)}],numberOfLines:1,children:n})})]})}var lr=k.create({container:{borderWidth:1,overflow:"hidden",flexShrink:0,flexDirection:"column",width:"100%",minWidth:92},topRow:{flexDirection:"row",flex:1,flexShrink:0},half:{flex:1,flexShrink:0,alignItems:"center",justifyContent:"center"},halfLabel:{color:"#ffffff",fontWeight:"600",letterSpacing:.2,flexShrink:0,textAlign:"center"},labelRow:{paddingTop:3,paddingBottom:4,alignItems:"center",justifyContent:"center"},labelText:{fontWeight:"700",textAlign:"center",flexShrink:0}}),ar=3;function cr(e,t){const n=new Set(t.map(e=>e.eventId??e.event_id).filter(e=>Boolean(e)));if(0===n.size)return e;const o=[],i=[];for(const r of e){const e=r.eventId??r.event_id;(e&&n.has(e)?i:o).push(r)}return[...o,...i]}function sr(e,t,o){const[r,s]=c([]),[d,h]=c([]),[u,g]=c([]),[f,p]=c([]),[y,m]=c(null),b=l(()=>{const t=/* @__PURE__ */new Map;for(const n of e)t.set(n.id,n);return t},[e]),w=l(()=>e.filter(e=>null!=t[e.id]),[e,t]),x=l(()=>e.map(e=>e.id).join(","),[e]),k=a(null);i(()=>{if(k.current===x)return;k.current=x;const n=e.filter(e=>!(e.id in t)),o=e.filter(e=>null!=t[e.id]);s(n.map(e=>e.id)),h(cr(n,o).slice(0,3).map(e=>e.id)),g([]),p([]),m(null)},[x,e,t]);const S=l(()=>{const e=new Set(u);return[...cr(r.map(e=>b.get(e)).filter(e=>Boolean(e)).filter(t=>!e.has(t.id)),w).map(e=>e.id),...u.filter(e=>r.includes(e))]},[r,b,w,u]);i(()=>{h(e=>{const t=new Set(r),n=e.filter(e=>t.has(e));if(0===f.length&&!y){const t=S.slice(0,3);return t.length===n.length&&t.every((e,t)=>e===n[t])?n.length===e.length?e:n:t}if(n.length>=Math.min(3,r.length))return n.length===e.length?e:n;const o=[...n];for(const i of S){if(o.length>=3)break;o.includes(i)||o.push(i)}return o})},[r,S,f,y]);const C=l(()=>d.map(e=>b.get(e)).filter(e=>Boolean(e)),[d,b]),B=n((e,t)=>{m(null),t&&o(e,t),p(n=>[...n,{id:e,answer:t}]),h(t=>t.filter(t=>t!==e)),g(n=>{const o=n.filter(t=>t!==e);return t?o:[...o,e]}),s(n=>{const o=n.filter(t=>t!==e);return t?o:[...o,e]})},[o]),z=n(()=>{const e=f[f.length-1];e&&(e.answer&&o(e.id,e.answer),m({id:e.id,from:"yes"===e.answer?"right":"no"===e.answer?"left":"up"}),p(e=>e.slice(0,-1)),g(t=>t.filter(t=>t!==e.id)),s(t=>[e.id,...t.filter(t=>t!==e.id)]),h(t=>[e.id,...t.filter(t=>t!==e.id)].slice(0,3)))},[f,o]);return{visible:C,canSkip:r.length>1,canUndo:f.length>0,restored:y,resolve:B,undo:z}}var dr=g.bezier(.32,0,.67,0),hr=g.bezier(.22,1,.36,1),ur={stiffness:420,damping:34},gr={stiffness:280,damping:28},fr="#00C853",pr="#E53935",yr=e=>"web"===m.OS?{userSelect:"none",cursor:e?"grabbing":"grab"}:null;function mr(e){return"up"===e?{x:0,y:-720}:{x:"right"===e?640:-640,y:70}}function br(e,t,n){return n&&-t>Math.abs(e)}function wr({prop:e,theme:t,depth:r=0,enterFrom:s,canSkip:d=!1,onResolve:u,registerApi:g,onDragStateChange:f,children:p}){const m=o(tr),b=t??m?.theme??Be,w=Ge(b),x=b.colors.productYes??fr,C=b.colors.productNo??pr,B=0===r,[F,A]=c(!1),R=a(!1),L=a({x:0,y:0}),D=a({x:0,y:0}),M=a(null),P=a(0),H=a(null),O=a(null),I=a(null),E=a(d);E.current=d;const j=a(f);j.current=f;const N=a(new h.ValueXY({x:0,y:0})).current,G=a(new h.Value(0)).current,Y=n(()=>{N.setValue({x:L.current.x,y:L.current.y}),G.setValue(br(L.current.x,L.current.y,E.current)?1:0)},[G,N]),V=n(()=>{null!=H.current&&(cancelAnimationFrame(H.current),H.current=null),O.current&&(O.current.stop(),O.current=null)},[]),U=n(e=>{V();let t=null;const n=o=>{const i=Math.min(null==t?1/60:(o-t)/1e3,1/30);t=o;const r=L.current,l=D.current;if(l.x+=(-e.stiffness*r.x-e.damping*l.x)*i,l.y+=(-e.stiffness*r.y-e.damping*l.y)*i,r.x+=l.x*i,r.y+=l.y*i,Math.abs(r.x)<.5&&Math.abs(r.y)<.5&&Math.abs(l.x)<2&&Math.abs(l.y)<2)return r.x=0,r.y=0,l.x=0,l.y=0,Y(),void(H.current=null);Y(),H.current=requestAnimationFrame(n)};H.current=requestAnimationFrame(n)},[Y,V]),q=n(t=>{if(R.current)return;if("up"===t&&!E.current)return;R.current=!0,V();const n="right"===t?"yes":"left"===t?"no":null,o=mr(t);L.current={...o},G.setValue("up"===t?1:0),O.current=h.timing(N,{toValue:o,duration:260,easing:dr,useNativeDriver:!1}),O.current.start(),I.current=setTimeout(()=>u(e.id,n),260)},[u,e.id,V,G,N]);i(()=>()=>{I.current&&clearTimeout(I.current),null!=H.current&&cancelAnimationFrame(H.current),O.current?.stop(),M.current&&j.current?.(!1)},[]),i(()=>{if(!s)return V(),L.current={x:0,y:0},D.current={x:0,y:0},void Y();const e=mr(s);L.current={x:e.x,y:e.y},D.current={x:0,y:0},Y(),U(gr)},[s,Y,U,V]),i(()=>{if(B&&g)return g({fly:q}),()=>g(null)},[q,B,g]);const K=l(()=>y.create({onStartShouldSetPanResponder:()=>!1,onMoveShouldSetPanResponder:(e,t)=>!R.current&&(Math.abs(t.dx)>2&&Math.abs(t.dx)>Math.abs(t.dy)||E.current&&-t.dy>2&&-t.dy>Math.abs(t.dx)),onPanResponderGrant:()=>{V(),M.current={x:L.current.x,y:L.current.y},D.current={x:0,y:0},P.current=Date.now(),A(!0),j.current?.(!0)},onPanResponderMove:(e,t)=>{if(R.current||!M.current)return;if(t.numberActiveTouches>1)return;const n=M.current.x+t.dx,o=Math.min(M.current.y+t.dy,0),i=e.nativeEvent.timestamp??Date.now(),r=i-P.current;if(r>0){const e=1-Math.exp(-r/40);D.current.x+=((n-L.current.x)/r*1e3-D.current.x)*e,D.current.y+=((o-L.current.y)/r*1e3-D.current.y)*e,P.current=i}L.current.x=n,L.current.y=o,Y()},onPanResponderRelease:e=>{if(!M.current)return;if(M.current=null,A(!1),j.current?.(!1),R.current)return;(e.nativeEvent.timestamp??Date.now())-P.current>90&&(D.current={x:0,y:0});const t=L.current,n=D.current;if(br(t.x,t.y,E.current)){if(t.y<-110||n.y<-620)return q("up")}else{if(t.x>110||n.x>620)return q("right");if(t.x<-110||n.x<-620)return q("left")}U(ur)},onPanResponderTerminate:()=>{M.current=null,D.current={x:0,y:0},A(!1),j.current?.(!1),R.current||U(ur)},onPanResponderTerminationRequest:()=>!1,onShouldBlockNativeResponder:()=>!0}),[q,Y,U,V]),Z=N.x.interpolate({inputRange:[-260,0,260],outputRange:["-16deg","0deg","16deg"],extrapolate:"clamp"}),X=h.subtract(1,G),Q=h.multiply(X,N.x.interpolate({inputRange:[24,132],outputRange:[0,1],extrapolate:"clamp"})),J=h.multiply(X,N.x.interpolate({inputRange:[-132,-24],outputRange:[1,0],extrapolate:"clamp"})),$=h.multiply(G,N.y.interpolate({inputRange:[-120,-30],outputRange:[1,0],extrapolate:"clamp"})),_=a(new h.Value(r)).current;i(()=>{const e=h.timing(_,{toValue:r,duration:240,easing:hr,useNativeDriver:!1});return e.start(),()=>e.stop()},[r,_]);const ee=_.interpolate({inputRange:[0,3],outputRange:[0,36]}),te=_.interpolate({inputRange:[0,3],outputRange:[1,.88]});/* @__PURE__ */
106
+ return W(h.View,{style:[k.absoluteFill,{zIndex:3-r,transform:[{translateY:ee},{scale:te}]}],pointerEvents:B?"auto":"none",children:/* @__PURE__ */T(h.View,{style:[{flex:1,transform:[{translateX:N.x},{translateY:N.y},{rotate:Z}]},B&&yr(F)],...B?K.panHandlers:{},children:[p,B&&/* @__PURE__ */T(v,{children:[
107
+ /* @__PURE__ */W(h.View,{pointerEvents:"none",style:[Sr.stamp,Sr.stampLeft,{opacity:Q,borderColor:x,transform:[{rotate:"-12deg"}]}],children:/* @__PURE__ */W(S,{style:[Sr.stampText,{color:x,fontFamily:w}],children:"Yes"})}),
108
+ /* @__PURE__ */W(h.View,{pointerEvents:"none",style:[Sr.stamp,Sr.stampRight,{opacity:J,borderColor:C,transform:[{rotate:"12deg"}]}],children:/* @__PURE__ */W(S,{style:[Sr.stampText,{color:C,fontFamily:w}],children:"No"})}),d&&/* @__PURE__ */W(h.View,{pointerEvents:"none",style:[Sr.skipPillWrap,{opacity:$}],children:/* @__PURE__ */W(z,{style:[Sr.skipPill,{borderColor:b.colors.border,backgroundColor:b.colors.background}],children:/* @__PURE__ */W(S,{style:[Sr.skipPillText,{color:b.colors.primary}],children:"Skip"})})})]})]})})}function xr({prop:e}){const{theme:t,headingFont:n,renderTeamLogo:o,renderPropositionSilk:i,displaySportName:r,gameCategory:l,compositeComponentById:a}=or(),c=t.colors,{height:s}=F(),d=s<700?12:24,h=Gt(e,a),u=Ht(e),g=("racing"===l?[e.away_team?.trim()||e.home_team?.trim()]:[e.home_team?.trim(),e.away_team?.trim()]).filter(Boolean),f=(t,n)=>t&&i?.(t,n)||Nr(t??e,o,g.join(" vs "))||null;/* @__PURE__ */
109
+ return T(z,{style:[Sr.face,{backgroundColor:be(t),borderColor:c.border}],children:[
110
+ /* @__PURE__ */W(z,{style:[Sr.matchupBand,{backgroundColor:we(t)}],children:g.length>0?g.map((e,n)=>/* @__PURE__ */T(z,{style:Sr.matchupTeam,children:[n>0&&/* @__PURE__ */W(S,{style:[Sr.matchupVs,{color:me(t)}],children:"vs"}),o?.(e),
111
+ /* @__PURE__ */W(S,{style:[Sr.matchupName,{color:ye(t)}],children:e})]},`${e}-${n}`)):/* @__PURE__ */W(S,{style:[Sr.matchupName,{color:ye(t)}],children:e.league??r(e.sport??"")})}),
112
+ /* @__PURE__ */T(z,{style:[Sr.faceBody,{paddingVertical:d,gap:12===d?12:16}],children:[/* @__PURE__ */T(z,{style:Sr.propositionRow,children:[!h&&f(e,32),h?/* @__PURE__ */T(z,{style:{flex:1,gap:12},children:[/* @__PURE__ */T(S,{style:[Sr.compositeLabel,{color:de(t)}],children:["All ","OR"===h.operator?"or any of these":"of these"]}),/* @__PURE__ */W(z,{style:{gap:8},children:h.legs.map((e,o)=>/* @__PURE__ */T(z,{style:Sr.compositeLeg,children:[
113
113
  /* @__PURE__ */W(S,{style:{color:c.primary,fontWeight:"700"},children:"OR"===h.operator?"/":"+"}),f(e.prop,24),
114
- /* @__PURE__ */T(z,{style:mr.compositeLegBody,children:[e.eventLabel?/* @__PURE__ */W(S,{style:[mr.compositeLegEvent,{color:c.textMuted}],children:e.eventLabel}):null,/* @__PURE__ */W(S,{style:[mr.compositeLegText,{color:he(t),fontFamily:n}],children:e.text})]})]},o))})]}):/* @__PURE__ */W(S,{style:[mr.proposition,{flex:1,color:he(t),fontFamily:n}],children:e.description??e.proposition})]}),e.outcome_description&&e.outcome_description!==e.description&&/* @__PURE__ */W(S,{style:[mr.outcome,{color:c.textMuted}],children:e.outcome_description})]}),
115
- /* @__PURE__ */T(z,{style:[mr.faceFooter,{borderTopColor:c.borderSubtle??c.border}],children:[e.sport?/* @__PURE__ */W(z,{style:[mr.sportChip,{backgroundColor:c.infoBg}],children:/* @__PURE__ */W(S,{style:[mr.sportChipText,{color:c.infoText}],children:r(e.sport)})}):null,u?/* @__PURE__ */W(S,{style:[mr.footerMeta,{color:c.textMuted}],children:u.replace(/[_-]+/g," ").toUpperCase()}):null,e.commence_time?/* @__PURE__ */W(S,{style:[mr.footerMeta,mr.footerDate,{color:c.textMuted}],children:_t(e.commence_time)}):null]})]})}function yr({onBack:e,onNext:t,viewSwitch:o,onDragStateChange:r}){const{theme:l,headingFont:c,propositions:s,selections:d,toggleSelection:h,selectedGame:u,selectedPropositionCount:g,answeredCount:f,selectionValid:p,goToConfirmation:y,goToSportSelection:m,loading:b,error:w,selectedRule:x}=$i(),k=l.colors,C=k.productYes??sr,A=k.productNo??dr,{height:R}=F(),L=Math.max(224,Math.min(.44*R,416)),D=a(null);i(()=>{u||(m(),e?.())},[m,e,u]);const{visible:M,canSkip:P,canUndo:H,restored:O,resolve:I,undo:E}=ir(s,d,h),j=u?dn(u,g??void 0,x):{min:0,max:0},N=j.max,G=N>0&&f>=N,Y=(()=>{if(!u)return null;if(j.min>0&&j.min===j.max)return j.min;const e=Yi(u);return null!=g&&g>0&&("game_set"===e||"pick_your_dividend"===e||Vi(u))?g:N>0?N:null})(),V=a(f);i(()=>{const e=V.current;if(V.current=f,null==Y||e>=Y||f!==Y)return;const n=setTimeout(()=>{y(),t?.()},420);return()=>clearTimeout(n)},[f,y,t,Y]);const U=!G&&M.length>0,q=n(e=>{D.current=e},[]);if(!u)return null;const K=(e,t,n,o)=>/* @__PURE__ */W(B,{onPress:n,disabled:o,accessibilityLabel:e,accessibilityRole:"button",style:[mr.circleButton,{borderColor:k.border,backgroundColor:k.background},o&&mr.disabled],children:/* @__PURE__ */W(S,{style:{fontSize:18,color:k.textMuted},children:t})});/* @__PURE__ */
116
- return T(z,{style:mr.container,children:[o?/* @__PURE__ */W(z,{style:mr.viewSwitchRow,children:o}):null,b?/* @__PURE__ */W(S,{style:[mr.loadingText,{color:k.textMuted}],children:"Loading…"}):w?/* @__PURE__ */W(z,{style:[mr.errorBox,{backgroundColor:k.errorBg,borderColor:k.error}],children:/* @__PURE__ */W(S,{style:{fontSize:14,color:k.errorText??k.error,textAlign:"center"},children:w})}):/* @__PURE__ */T(v,{children:[/* @__PURE__ */W(z,{style:mr.deckArea,children:U?/* @__PURE__ */W(z,{style:[mr.deck,{height:L}],children:M.map((e,t)=>/* @__PURE__ */W(fr,{prop:e,depth:t,canSkip:P,enterFrom:O?.id===e.id?O.from:null,onResolve:I,registerApi:0===t?q:void 0,onDragStateChange:0===t?r:void 0,children:/* @__PURE__ */W(pr,{prop:e})},e.id))}):/* @__PURE__ */T(z,{style:[mr.emptyState,{backgroundColor:be(l),borderColor:k.border}],children:[
117
- /* @__PURE__ */W(S,{style:[mr.emptyTitle,{color:se(l),fontFamily:c}],children:G?"Card full":"That’s the last one"}),
118
- /* @__PURE__ */W(S,{style:[mr.emptyBody,{color:k.textMuted}],children:G?`You've picked all ${N} legs for ${u.game_name}. Undo a swipe to change one, or lock it in.`:p?"You've been through every proposition. Lock your card in, or undo to revisit a pick.":`No propositions left to answer${j.min>0?` — this game needs at least ${j.min}`:""}. Undo a swipe or head back to widen the pool.`}),H&&/* @__PURE__ */W(B,{onPress:E,style:[mr.emptyUndo,{borderColor:k.border}],children:/* @__PURE__ */W(S,{style:{fontSize:14,fontWeight:"600",color:k.text},children:"Undo last swipe"})})]})}),/* @__PURE__ */T(z,{style:[mr.buttonArea,{backgroundColor:be(l),borderColor:k.border}],children:[/* @__PURE__ */T(z,{style:mr.buttonRow,children:[K("Undo last swipe","↺",E,!H),
119
- /* @__PURE__ */W(B,{onPress:()=>D.current?.fly("left"),disabled:!U,style:[mr.answerButton,{backgroundColor:A},!U&&mr.disabled],children:/* @__PURE__ */W(S,{style:[mr.answerButtonText,{fontFamily:c}],children:"NO"})}),
120
- /* @__PURE__ */W(B,{onPress:()=>D.current?.fly("right"),disabled:!U,style:[mr.answerButton,{backgroundColor:C},!U&&mr.disabled],children:/* @__PURE__ */W(S,{style:[mr.answerButtonText,{fontFamily:c}],children:"YES"})}),K("Skip this proposition","↑",()=>D.current?.fly("up"),!U||!P)]}),/* @__PURE__ */W(S,{style:[mr.gestureHint,{color:k.textMuted}],children:P?"Swipe right for Yes, left for No · ↑ to skip":"Swipe right for Yes, left for No"})]})]})]})}var mr=k.create({container:{flex:1},viewSwitchRow:{flexDirection:"row",justifyContent:"flex-end",paddingBottom:12},loadingText:{paddingVertical:40,textAlign:"center",fontSize:14},errorBox:{borderRadius:12,borderWidth:1,padding:16},deckArea:{flex:1,minHeight:0,justifyContent:"center",paddingTop:12,paddingBottom:32},deck:{width:"100%",maxWidth:384,alignSelf:"center"},face:{flex:1,borderRadius:24,borderWidth:1,overflow:"hidden",shadowColor:"#0A1416",shadowOpacity:.25,shadowRadius:20,shadowOffset:{width:0,height:12},elevation:8},matchupBand:{flexDirection:"row",flexWrap:"wrap",alignItems:"center",columnGap:8,rowGap:4,paddingHorizontal:20,paddingVertical:12},matchupTeam:{flexDirection:"row",alignItems:"center",gap:6},matchupVs:{fontSize:12,marginRight:4},matchupName:{fontSize:14,fontWeight:"600"},faceBody:{flex:1,justifyContent:"center",gap:16,paddingHorizontal:20,paddingVertical:24},compositeLabel:{fontSize:12,fontWeight:"700",textTransform:"uppercase",letterSpacing:1.5},compositeLeg:{flexDirection:"row",alignItems:"flex-start",gap:8},compositeLegBody:{flex:1,minWidth:0},compositeLegEvent:{fontSize:10,fontWeight:"600",textTransform:"uppercase",letterSpacing:.25,lineHeight:13},compositeLegText:{fontSize:16,fontWeight:"700",lineHeight:21},propositionRow:{flexDirection:"row",alignItems:"flex-start",gap:8},proposition:{fontSize:21,fontWeight:"800",lineHeight:27,letterSpacing:-.3},outcome:{fontSize:14,lineHeight:19},faceFooter:{flexDirection:"row",flexWrap:"wrap",alignItems:"center",gap:8,borderTopWidth:1,paddingHorizontal:20,paddingVertical:12},sportChip:{borderRadius:999,paddingHorizontal:8,paddingVertical:2},sportChipText:{fontSize:11,fontWeight:"600",textTransform:"uppercase",letterSpacing:.5},footerMeta:{fontSize:11,letterSpacing:.5},footerDate:{marginLeft:"auto"},stamp:{position:"absolute",top:20,borderWidth:4,borderRadius:12,paddingHorizontal:12,paddingVertical:4},stampLeft:{left:20},stampRight:{right:20},stampText:{fontSize:24,fontWeight:"800",textTransform:"uppercase",letterSpacing:2},skipPillWrap:{position:"absolute",left:0,right:0,bottom:24,alignItems:"center"},skipPill:{borderWidth:1,borderRadius:999,paddingHorizontal:12,paddingVertical:4},skipPillText:{fontSize:12,fontWeight:"600",textTransform:"uppercase",letterSpacing:1.5},emptyState:{width:"100%",maxWidth:384,alignSelf:"center",alignItems:"center",gap:12,borderRadius:24,borderWidth:1,borderStyle:"dashed",paddingHorizontal:24,paddingVertical:40},emptyTitle:{fontSize:16,fontWeight:"800"},emptyBody:{fontSize:14,textAlign:"center",lineHeight:19},emptyUndo:{borderWidth:1,borderRadius:999,paddingHorizontal:20,paddingVertical:8},buttonArea:{flexShrink:0,borderWidth:1,borderRadius:16,paddingHorizontal:12,paddingTop:12,paddingBottom:10},buttonRow:{flexDirection:"row",alignItems:"center",justifyContent:"center",gap:12,width:"100%",maxWidth:384,alignSelf:"center"},circleButton:{height:44,width:44,borderRadius:999,borderWidth:1,alignItems:"center",justifyContent:"center"},answerButton:{flex:1,height:56,borderRadius:999,alignItems:"center",justifyContent:"center"},answerButtonText:{fontSize:18,fontWeight:"800",letterSpacing:1.5,color:"#ffffff"},gestureHint:{marginTop:8,textAlign:"center",fontSize:11},disabled:{opacity:.35}});function br({propositions:e,title:t,onClose:o}){const{theme:i,selections:r,toggleSelection:l}=$i(),c=i.colors,{height:s}=F(),{visible:d,canSkip:h,canUndo:u,restored:g,resolve:f,undo:y}=ir(e,r,l),m=a(null),b=n(e=>{m.current=e},[]),w=Ge(i),x=me(i),k=d.length>0,C=be(i),v=Math.max(224,Math.min(.44*s,416)),A=(e,t,n,o)=>/* @__PURE__ */W(B,{onPress:n,disabled:o,accessibilityLabel:e,accessibilityRole:"button",style:[wr.circle,{borderColor:c.border,backgroundColor:c.background},o&&wr.disabled],children:/* @__PURE__ */W(S,{style:{fontSize:18,color:c.textMuted},children:t})}),R=(e,t,n)=>/* @__PURE__ */W(B,{onPress:()=>m.current?.fly(e),disabled:!k,style:[wr.answer,{backgroundColor:n},!k&&wr.disabled],children:/* @__PURE__ */W(S,{style:[wr.answerText,{fontFamily:w}],children:t.toUpperCase()})});/* @__PURE__ */
121
- return W(p,{visible:!0,transparent:!0,animationType:"fade",onRequestClose:o,children:/* @__PURE__ */W(z,{style:wr.backdrop,children:/* @__PURE__ */T(z,{style:[wr.panel,{backgroundColor:C,borderColor:c.border}],children:[
122
- /* @__PURE__ */T(z,{style:wr.header,children:[/* @__PURE__ */W(S,{numberOfLines:1,style:[wr.title,{color:ye(i),fontFamily:w}],children:t}),/* @__PURE__ */W(B,{onPress:o,accessibilityLabel:"Close",accessibilityRole:"button",style:[wr.close,{borderColor:c.border}],children:/* @__PURE__ */W(S,{style:{fontSize:16,color:x},children:"×"})})]}),
123
- /* @__PURE__ */W(z,{style:wr.deckArea,children:k?/* @__PURE__ */W(z,{style:[wr.deck,{height:v}],children:d.map((e,t)=>/* @__PURE__ */W(fr,{prop:e,depth:t,canSkip:h,enterFrom:g?.id===e.id?g.from:null,onResolve:f,registerApi:0===t?b:void 0,children:/* @__PURE__ */W(pr,{prop:e})},e.id))}):/* @__PURE__ */T(z,{style:[wr.empty,{borderColor:c.border}],children:[/* @__PURE__ */W(S,{style:[wr.emptyTitle,{color:se(i),fontFamily:w}],children:"That’s the last one"}),/* @__PURE__ */W(S,{style:[wr.emptyBody,{color:c.textMuted}],children:"You’ve been through every proposition on this fixture. Close to go back to the card, or undo to revisit a pick."})]})}),
124
- /* @__PURE__ */T(z,{style:wr.buttonRow,children:[A("Undo last swipe","↺",y,!u),R("left","No",ge(i)),R("right","Yes",ue(i)),A("Skip this proposition","↑",()=>m.current?.fly("up"),!k||!h)]}),
125
- /* @__PURE__ */W(S,{style:[wr.hint,{color:c.textMuted}],children:h?"Swipe right for Yes, left for No · ↑ to skip":"Swipe right for Yes, left for No"})]})})})}var wr=k.create({backdrop:{flex:1,backgroundColor:"rgba(0,0,0,0.6)",alignItems:"center",justifyContent:"center",padding:16},panel:{width:"100%",maxWidth:420,borderRadius:24,borderWidth:1,padding:16,overflow:"hidden"},header:{flexDirection:"row",alignItems:"center",gap:8,marginBottom:12},title:{flex:1,minWidth:0,fontSize:14,fontWeight:"700"},close:{width:32,height:32,borderRadius:999,borderWidth:1,alignItems:"center",justifyContent:"center"},deckArea:{justifyContent:"center",paddingTop:4,paddingBottom:12},deck:{width:"100%",alignSelf:"center"},empty:{alignItems:"center",gap:12,borderRadius:24,borderWidth:1,borderStyle:"dashed",paddingHorizontal:24,paddingVertical:40},emptyTitle:{fontSize:16,fontWeight:"800"},emptyBody:{fontSize:14,textAlign:"center"},buttonRow:{flexDirection:"row",alignItems:"center",justifyContent:"center",gap:12,paddingTop:24},circle:{width:44,height:44,borderRadius:999,borderWidth:1,alignItems:"center",justifyContent:"center"},answer:{flex:1,height:56,borderRadius:999,alignItems:"center",justifyContent:"center"},answerText:{fontSize:18,fontWeight:"800",letterSpacing:1.5,color:"#fff"},hint:{marginTop:8,fontSize:11,textAlign:"center"},disabled:{opacity:.35}}),xr=["split","split-inline","compact"];function kr(e){return new Intl.DateTimeFormat("en-AU",{weekday:"short",day:"numeric",month:"short"}).format(e).replace(",","")}function Sr(e){return new Intl.DateTimeFormat("en-AU",{hour:"numeric",minute:"2-digit",hour12:!0}).format(e).replace(/\s/g,"").toLowerCase()}function Cr(e){const t=(e??"").trim().split(/\s+/).filter(Boolean);return(t[t.length-1]??"").slice(0,3).toUpperCase()}function Br(e){if(!e.commence_time)return null;const t=new Date(e.commence_time);return Number.isNaN(t.getTime())?null:t}function zr(e){const t=e?.trim();if(t&&"undefined"!==t&&"null"!==t)return t}function Fr(e,t=!1){const n=Object.entries(e).map(([e,n])=>function(e,t,n){const[o,i]=n?[]:e.split(" vs ").map(zr),r=t.map(Br).filter(e=>null!==e),l=r.length>0?new Date(Math.min(...r.map(e=>e.getTime()))):null;return{key:e,title:n||!o?n?e:zr(t[0]?.league??void 0)??"":[o,i].filter(Boolean).join(" vs "),home:o,away:i,racing:n,date:l,props:t}}(e,n,t)),o=n.filter(e=>null!==e.date).sort((e,t)=>e.date.getTime()-t.date.getTime()),i=n.filter(e=>null===e.date),r=/* @__PURE__ */new Map;for(const a of o){const e=a.date.toDateString(),t=r.get(e);t?t.events.push(a):r.set(e,{key:e,label:kr(a.date),events:[a]})}const l=[...r.values()];return i.length>0&&l.push({key:"undated",label:"",events:i}),l}var vr={split:{fontSize:13,fontWeight:"700",lineHeight:18},compact:{fontSize:11,fontWeight:"700",lineHeight:15}};function Wr({variant:e,groups:t,racing:n,selections:o,onToggleSelection:i,atMax:r,theme:a,renderTeamLogo:s,componentById:d,disableEventSwipe:h=!1}){const u=a.colors,g=be(a),f=we(a),p=u.borderSubtle??u.border,y=ye(a),m=me(a),b=he(a),w=de(a),x=se(a),k=Ge(a),{width:C}=F(),[A,R]=c(null),[L,D]=c(/* @__PURE__ */new Set),[M,P]=c(/* @__PURE__ */new Set),H=e=>t=>e(e=>{const n=new Set(e);return n.delete(t)||n.add(t),n}),O=H(D),I=H(P),E=l(()=>Fr(t,n),[t,n]),j=e=>r&&!(e.id in o),N=(e,t)=>{j(e)||i(e.id,t)},G=(e,t)=>e?s?.(e,t)??null:null,Y=(e,t,n)=>/* @__PURE__ */W(dt,{theme:a,size:t,stretch:n,disabled:j(e),value:o[e.id]??null,onYes:()=>N(e,"yes"),onNo:()=>N(e,"no")}),V=(e,t)=>/* @__PURE__ */T(z,{style:Rr.question,children:[n?Hr(e,s,null):null,/* @__PURE__ */W(Gr,{prop:e,colors:u,componentById:d,textStyle:vr[t],textColor:b})]}),U=e=>{if(h)return null;const t=e.props.filter(e=>!j(e));return 0===t.length?null:/* @__PURE__ */W(B,{onPress:()=>R(e),accessibilityRole:"button",accessibilityLabel:`Swipe ${t.length} proposition${1===t.length?"":"s"}`,style:[Rr.roundButton,{borderColor:p}],children:/* @__PURE__ */W(Tr,{color:w})})},q=(e,t)=>/* @__PURE__ */W(B,{onPress:()=>O(e.key),accessibilityRole:"button",accessibilityState:{expanded:t},accessibilityLabel:`${t?"Hide":"Show"} ${e.props.length} proposition${1===e.props.length?"":"s"}`,style:[Rr.foldButton,{borderColor:p}],children:/* @__PURE__ */W(z,{style:{transform:[{rotate:t?"0deg":"-90deg"}]},children:/* @__PURE__ */W(Ar,{color:w})})}),K=e=>{if(!e.home&&!e.away)/* @__PURE__ */return W(S,{numberOfLines:1,style:[Rr.shortLabel,{color:y}],children:e.title});const t=[e.home,e.away].filter(Boolean).join(" v "),n=M.has(e.key);/* @__PURE__ */
114
+ /* @__PURE__ */T(z,{style:Sr.compositeLegBody,children:[e.eventLabel?/* @__PURE__ */W(S,{style:[Sr.compositeLegEvent,{color:c.textMuted}],children:e.eventLabel}):null,/* @__PURE__ */W(S,{style:[Sr.compositeLegText,{color:he(t),fontFamily:n}],children:e.text})]})]},o))})]}):/* @__PURE__ */W(S,{style:[Sr.proposition,{flex:1,color:he(t),fontFamily:n}],children:e.description??e.proposition})]}),e.outcome_description&&e.outcome_description!==e.description&&/* @__PURE__ */W(S,{style:[Sr.outcome,{color:c.textMuted}],children:e.outcome_description})]}),
115
+ /* @__PURE__ */T(z,{style:[Sr.faceFooter,{borderTopColor:c.borderSubtle??c.border}],children:[e.sport?/* @__PURE__ */W(z,{style:[Sr.sportChip,{backgroundColor:c.infoBg}],children:/* @__PURE__ */W(S,{style:[Sr.sportChipText,{color:c.infoText}],children:r(e.sport)})}):null,u?/* @__PURE__ */W(S,{style:[Sr.footerMeta,{color:c.textMuted}],children:u.replace(/[_-]+/g," ").toUpperCase()}):null,e.commence_time?/* @__PURE__ */W(S,{style:[Sr.footerMeta,Sr.footerDate,{color:c.textMuted}],children:_t(e.commence_time)}):null]})]})}function kr({onBack:e,onNext:t,viewSwitch:o,onDragStateChange:r}){const{theme:l,headingFont:c,propositions:s,selections:d,toggleSelection:h,selectedGame:u,selectedPropositionCount:g,answeredCount:f,selectionValid:p,goToConfirmation:y,goToSportSelection:m,loading:b,error:w,selectedRule:x}=or(),k=l.colors,C=k.productYes??fr,A=k.productNo??pr,{height:R}=F(),L=Math.max(224,Math.min(.44*R,416)),D=a(null);i(()=>{u||(m(),e?.())},[m,e,u]);const{visible:M,canSkip:P,canUndo:H,restored:O,resolve:I,undo:E}=sr(s,d,h),j=u?dn(u,g??void 0,x):{min:0,max:0},N=j.max,G=N>0&&f>=N,Y=(()=>{if(!u)return null;if(j.min>0&&j.min===j.max)return j.min;const e=Zi(u);return null!=g&&g>0&&("game_set"===e||"pick_your_dividend"===e||Xi(u))?g:N>0?N:null})(),V=a(f);i(()=>{const e=V.current;if(V.current=f,null==Y||e>=Y||f!==Y)return;const n=setTimeout(()=>{y(),t?.()},420);return()=>clearTimeout(n)},[f,y,t,Y]);const U=!G&&M.length>0,q=n(e=>{D.current=e},[]);if(!u)return null;const K=(e,t,n,o)=>/* @__PURE__ */W(B,{onPress:n,disabled:o,accessibilityLabel:e,accessibilityRole:"button",style:[Sr.circleButton,{borderColor:k.border,backgroundColor:k.background},o&&Sr.disabled],children:/* @__PURE__ */W(S,{style:{fontSize:18,color:k.textMuted},children:t})});/* @__PURE__ */
116
+ return T(z,{style:Sr.container,children:[o?/* @__PURE__ */W(z,{style:Sr.viewSwitchRow,children:o}):null,b?/* @__PURE__ */W(S,{style:[Sr.loadingText,{color:k.textMuted}],children:"Loading…"}):w?/* @__PURE__ */W(z,{style:[Sr.errorBox,{backgroundColor:k.errorBg,borderColor:k.error}],children:/* @__PURE__ */W(S,{style:{fontSize:14,color:k.errorText??k.error,textAlign:"center"},children:w})}):/* @__PURE__ */T(v,{children:[/* @__PURE__ */W(z,{style:Sr.deckArea,children:U?/* @__PURE__ */W(z,{style:[Sr.deck,{height:L}],children:M.map((e,t)=>/* @__PURE__ */W(wr,{prop:e,depth:t,canSkip:P,enterFrom:O?.id===e.id?O.from:null,onResolve:I,registerApi:0===t?q:void 0,onDragStateChange:0===t?r:void 0,children:/* @__PURE__ */W(xr,{prop:e})},e.id))}):/* @__PURE__ */T(z,{style:[Sr.emptyState,{backgroundColor:be(l),borderColor:k.border}],children:[
117
+ /* @__PURE__ */W(S,{style:[Sr.emptyTitle,{color:se(l),fontFamily:c}],children:G?"Card full":"That’s the last one"}),
118
+ /* @__PURE__ */W(S,{style:[Sr.emptyBody,{color:k.textMuted}],children:G?`You've picked all ${N} legs for ${u.game_name}. Undo a swipe to change one, or lock it in.`:p?"You've been through every proposition. Lock your card in, or undo to revisit a pick.":`No propositions left to answer${j.min>0?` — this game needs at least ${j.min}`:""}. Undo a swipe or head back to widen the pool.`}),H&&/* @__PURE__ */W(B,{onPress:E,style:[Sr.emptyUndo,{borderColor:k.border}],children:/* @__PURE__ */W(S,{style:{fontSize:14,fontWeight:"600",color:k.text},children:"Undo last swipe"})})]})}),/* @__PURE__ */T(z,{style:[Sr.buttonArea,{backgroundColor:be(l),borderColor:k.border}],children:[/* @__PURE__ */T(z,{style:Sr.buttonRow,children:[K("Undo last swipe","↺",E,!H),
119
+ /* @__PURE__ */W(B,{onPress:()=>D.current?.fly("left"),disabled:!U,style:[Sr.answerButton,{backgroundColor:A},!U&&Sr.disabled],children:/* @__PURE__ */W(S,{style:[Sr.answerButtonText,{fontFamily:c}],children:"NO"})}),
120
+ /* @__PURE__ */W(B,{onPress:()=>D.current?.fly("right"),disabled:!U,style:[Sr.answerButton,{backgroundColor:C},!U&&Sr.disabled],children:/* @__PURE__ */W(S,{style:[Sr.answerButtonText,{fontFamily:c}],children:"YES"})}),K("Skip this proposition","↑",()=>D.current?.fly("up"),!U||!P)]}),/* @__PURE__ */W(S,{style:[Sr.gestureHint,{color:k.textMuted}],children:P?"Swipe right for Yes, left for No · ↑ to skip":"Swipe right for Yes, left for No"})]})]})]})}var Sr=k.create({container:{flex:1},viewSwitchRow:{flexDirection:"row",justifyContent:"flex-end",paddingBottom:12},loadingText:{paddingVertical:40,textAlign:"center",fontSize:14},errorBox:{borderRadius:12,borderWidth:1,padding:16},deckArea:{flex:1,minHeight:0,justifyContent:"center",paddingTop:12,paddingBottom:32},deck:{width:"100%",maxWidth:384,alignSelf:"center"},face:{flex:1,borderRadius:24,borderWidth:1,overflow:"hidden",shadowColor:"#0A1416",shadowOpacity:.25,shadowRadius:20,shadowOffset:{width:0,height:12},elevation:8},matchupBand:{flexDirection:"row",flexWrap:"wrap",alignItems:"center",columnGap:8,rowGap:4,paddingHorizontal:20,paddingVertical:12},matchupTeam:{flexDirection:"row",alignItems:"center",gap:6},matchupVs:{fontSize:12,marginRight:4},matchupName:{fontSize:14,fontWeight:"600"},faceBody:{flex:1,justifyContent:"center",gap:16,paddingHorizontal:20,paddingVertical:24},compositeLabel:{fontSize:12,fontWeight:"700",textTransform:"uppercase",letterSpacing:1.5},compositeLeg:{flexDirection:"row",alignItems:"flex-start",gap:8},compositeLegBody:{flex:1,minWidth:0},compositeLegEvent:{fontSize:10,fontWeight:"600",textTransform:"uppercase",letterSpacing:.25,lineHeight:13},compositeLegText:{fontSize:16,fontWeight:"700",lineHeight:21},propositionRow:{flexDirection:"row",alignItems:"flex-start",gap:8},proposition:{fontSize:21,fontWeight:"800",lineHeight:27,letterSpacing:-.3},outcome:{fontSize:14,lineHeight:19},faceFooter:{flexDirection:"row",flexWrap:"wrap",alignItems:"center",gap:8,borderTopWidth:1,paddingHorizontal:20,paddingVertical:12},sportChip:{borderRadius:999,paddingHorizontal:8,paddingVertical:2},sportChipText:{fontSize:11,fontWeight:"600",textTransform:"uppercase",letterSpacing:.5},footerMeta:{fontSize:11,letterSpacing:.5},footerDate:{marginLeft:"auto"},stamp:{position:"absolute",top:20,borderWidth:4,borderRadius:12,paddingHorizontal:12,paddingVertical:4},stampLeft:{left:20},stampRight:{right:20},stampText:{fontSize:24,fontWeight:"800",textTransform:"uppercase",letterSpacing:2},skipPillWrap:{position:"absolute",left:0,right:0,bottom:24,alignItems:"center"},skipPill:{borderWidth:1,borderRadius:999,paddingHorizontal:12,paddingVertical:4},skipPillText:{fontSize:12,fontWeight:"600",textTransform:"uppercase",letterSpacing:1.5},emptyState:{width:"100%",maxWidth:384,alignSelf:"center",alignItems:"center",gap:12,borderRadius:24,borderWidth:1,borderStyle:"dashed",paddingHorizontal:24,paddingVertical:40},emptyTitle:{fontSize:16,fontWeight:"800"},emptyBody:{fontSize:14,textAlign:"center",lineHeight:19},emptyUndo:{borderWidth:1,borderRadius:999,paddingHorizontal:20,paddingVertical:8},buttonArea:{flexShrink:0,borderWidth:1,borderRadius:16,paddingHorizontal:12,paddingTop:12,paddingBottom:10},buttonRow:{flexDirection:"row",alignItems:"center",justifyContent:"center",gap:12,width:"100%",maxWidth:384,alignSelf:"center"},circleButton:{height:44,width:44,borderRadius:999,borderWidth:1,alignItems:"center",justifyContent:"center"},answerButton:{flex:1,height:56,borderRadius:999,alignItems:"center",justifyContent:"center"},answerButtonText:{fontSize:18,fontWeight:"800",letterSpacing:1.5,color:"#ffffff"},gestureHint:{marginTop:8,textAlign:"center",fontSize:11},disabled:{opacity:.35}});function Cr({propositions:e,title:t,onClose:o}){const{theme:i,selections:r,toggleSelection:l}=or(),c=i.colors,{height:s}=F(),{visible:d,canSkip:h,canUndo:u,restored:g,resolve:f,undo:y}=sr(e,r,l),m=a(null),b=n(e=>{m.current=e},[]),w=Ge(i),x=me(i),k=d.length>0,C=be(i),v=Math.max(224,Math.min(.44*s,416)),A=(e,t,n,o)=>/* @__PURE__ */W(B,{onPress:n,disabled:o,accessibilityLabel:e,accessibilityRole:"button",style:[Br.circle,{borderColor:c.border,backgroundColor:c.background},o&&Br.disabled],children:/* @__PURE__ */W(S,{style:{fontSize:18,color:c.textMuted},children:t})}),R=(e,t,n)=>/* @__PURE__ */W(B,{onPress:()=>m.current?.fly(e),disabled:!k,style:[Br.answer,{backgroundColor:n},!k&&Br.disabled],children:/* @__PURE__ */W(S,{style:[Br.answerText,{fontFamily:w}],children:t.toUpperCase()})});/* @__PURE__ */
121
+ return W(p,{visible:!0,transparent:!0,animationType:"fade",onRequestClose:o,children:/* @__PURE__ */W(z,{style:Br.backdrop,children:/* @__PURE__ */T(z,{style:[Br.panel,{backgroundColor:C,borderColor:c.border}],children:[
122
+ /* @__PURE__ */T(z,{style:Br.header,children:[/* @__PURE__ */W(S,{numberOfLines:1,style:[Br.title,{color:ye(i),fontFamily:w}],children:t}),/* @__PURE__ */W(B,{onPress:o,accessibilityLabel:"Close",accessibilityRole:"button",style:[Br.close,{borderColor:c.border}],children:/* @__PURE__ */W(S,{style:{fontSize:16,color:x},children:"×"})})]}),
123
+ /* @__PURE__ */W(z,{style:Br.deckArea,children:k?/* @__PURE__ */W(z,{style:[Br.deck,{height:v}],children:d.map((e,t)=>/* @__PURE__ */W(wr,{prop:e,depth:t,canSkip:h,enterFrom:g?.id===e.id?g.from:null,onResolve:f,registerApi:0===t?b:void 0,children:/* @__PURE__ */W(xr,{prop:e})},e.id))}):/* @__PURE__ */T(z,{style:[Br.empty,{borderColor:c.border}],children:[/* @__PURE__ */W(S,{style:[Br.emptyTitle,{color:se(i),fontFamily:w}],children:"That’s the last one"}),/* @__PURE__ */W(S,{style:[Br.emptyBody,{color:c.textMuted}],children:"You’ve been through every proposition on this fixture. Close to go back to the card, or undo to revisit a pick."})]})}),
124
+ /* @__PURE__ */T(z,{style:Br.buttonRow,children:[A("Undo last swipe","↺",y,!u),R("left","No",ge(i)),R("right","Yes",ue(i)),A("Skip this proposition","↑",()=>m.current?.fly("up"),!k||!h)]}),
125
+ /* @__PURE__ */W(S,{style:[Br.hint,{color:c.textMuted}],children:h?"Swipe right for Yes, left for No · ↑ to skip":"Swipe right for Yes, left for No"})]})})})}var Br=k.create({backdrop:{flex:1,backgroundColor:"rgba(0,0,0,0.6)",alignItems:"center",justifyContent:"center",padding:16},panel:{width:"100%",maxWidth:420,borderRadius:24,borderWidth:1,padding:16,overflow:"hidden"},header:{flexDirection:"row",alignItems:"center",gap:8,marginBottom:12},title:{flex:1,minWidth:0,fontSize:14,fontWeight:"700"},close:{width:32,height:32,borderRadius:999,borderWidth:1,alignItems:"center",justifyContent:"center"},deckArea:{justifyContent:"center",paddingTop:4,paddingBottom:12},deck:{width:"100%",alignSelf:"center"},empty:{alignItems:"center",gap:12,borderRadius:24,borderWidth:1,borderStyle:"dashed",paddingHorizontal:24,paddingVertical:40},emptyTitle:{fontSize:16,fontWeight:"800"},emptyBody:{fontSize:14,textAlign:"center"},buttonRow:{flexDirection:"row",alignItems:"center",justifyContent:"center",gap:12,paddingTop:24},circle:{width:44,height:44,borderRadius:999,borderWidth:1,alignItems:"center",justifyContent:"center"},answer:{flex:1,height:56,borderRadius:999,alignItems:"center",justifyContent:"center"},answerText:{fontSize:18,fontWeight:"800",letterSpacing:1.5,color:"#fff"},hint:{marginTop:8,fontSize:11,textAlign:"center"},disabled:{opacity:.35}}),zr=["split","split-inline","compact"];function Fr(e){return new Intl.DateTimeFormat("en-AU",{weekday:"short",day:"numeric",month:"short"}).format(e).replace(",","")}function vr(e){return new Intl.DateTimeFormat("en-AU",{hour:"numeric",minute:"2-digit",hour12:!0}).format(e).replace(/\s/g,"").toLowerCase()}function Wr(e){const t=(e??"").trim().split(/\s+/).filter(Boolean);return(t[t.length-1]??"").slice(0,3).toUpperCase()}function Tr(e){if(!e.commence_time)return null;const t=new Date(e.commence_time);return Number.isNaN(t.getTime())?null:t}function Ar(e){const t=e?.trim();if(t&&"undefined"!==t&&"null"!==t)return t}function Rr(e,t=!1){const n=Object.entries(e).map(([e,n])=>function(e,t,n){const[o,i]=n?[]:e.split(" vs ").map(Ar),r=t.map(Tr).filter(e=>null!==e),l=r.length>0?new Date(Math.min(...r.map(e=>e.getTime()))):null;return{key:e,title:n||!o?n?e:Ar(t[0]?.league??void 0)??"":[o,i].filter(Boolean).join(" vs "),home:o,away:i,racing:n,date:l,props:t}}(e,n,t)),o=n.filter(e=>null!==e.date).sort((e,t)=>e.date.getTime()-t.date.getTime()),i=n.filter(e=>null===e.date),r=/* @__PURE__ */new Map;for(const a of o){const e=a.date.toDateString(),t=r.get(e);t?t.events.push(a):r.set(e,{key:e,label:Fr(a.date),events:[a]})}const l=[...r.values()];return i.length>0&&l.push({key:"undated",label:"",events:i}),l}var Lr={split:{fontSize:13,fontWeight:"700",lineHeight:18},compact:{fontSize:11,fontWeight:"700",lineHeight:15}};function Dr({variant:e,groups:t,racing:n,selections:o,onToggleSelection:i,atMax:r,theme:a,renderTeamLogo:s,componentById:d,disableEventSwipe:h=!1}){const u=a.colors,g=be(a),f=we(a),p=u.borderSubtle??u.border,y=ye(a),m=me(a),b=he(a),w=de(a),x=se(a),k=Ge(a),{width:C}=F(),[A,R]=c(null),[L,D]=c(/* @__PURE__ */new Set),[M,P]=c(/* @__PURE__ */new Set),H=e=>t=>e(e=>{const n=new Set(e);return n.delete(t)||n.add(t),n}),O=H(D),I=H(P),E=l(()=>Rr(t,n),[t,n]),j=e=>r&&!(e.id in o),N=(e,t)=>{j(e)||i(e.id,t)},G=(e,t)=>e?s?.(e,t)??null:null,Y=(e,t,n)=>/* @__PURE__ */W(dt,{theme:a,size:t,stretch:n,disabled:j(e),value:o[e.id]??null,onYes:()=>N(e,"yes"),onNo:()=>N(e,"no")}),V=(e,t)=>/* @__PURE__ */T(z,{style:Hr.question,children:[n?Nr(e,s,null):null,/* @__PURE__ */W(Kr,{prop:e,colors:u,componentById:d,textStyle:Lr[t],textColor:b})]}),U=e=>{if(h)return null;const t=e.props.filter(e=>!j(e));return 0===t.length?null:/* @__PURE__ */W(B,{onPress:()=>R(e),accessibilityRole:"button",accessibilityLabel:`Swipe ${t.length} proposition${1===t.length?"":"s"}`,style:[Hr.roundButton,{borderColor:p}],children:/* @__PURE__ */W(Mr,{color:w})})},q=(e,t)=>/* @__PURE__ */W(B,{onPress:()=>O(e.key),accessibilityRole:"button",accessibilityState:{expanded:t},accessibilityLabel:`${t?"Hide":"Show"} ${e.props.length} proposition${1===e.props.length?"":"s"}`,style:[Hr.foldButton,{borderColor:p}],children:/* @__PURE__ */W(z,{style:{transform:[{rotate:t?"0deg":"-90deg"}]},children:/* @__PURE__ */W(Pr,{color:w})})}),K=e=>{if(!e.home&&!e.away)/* @__PURE__ */return W(S,{numberOfLines:1,style:[Hr.shortLabel,{color:y}],children:e.title});const t=[e.home,e.away].filter(Boolean).join(" v "),n=M.has(e.key);/* @__PURE__ */
126
126
  return T(B,{onPress:()=>I(e.key),accessibilityRole:"button",accessibilityLabel:t,accessibilityState:{selected:n},style:{minWidth:0,flexDirection:"row",alignItems:"center"},children:[
127
- /* @__PURE__ */W(S,{style:[Rr.shortLabel,{color:y,fontFamily:k}],children:n?e.home:Cr(e.home)}),
128
- /* @__PURE__ */W(S,{style:[Rr.vs,{color:m}],children:"v"}),
129
- /* @__PURE__ */W(S,{style:[Rr.shortLabel,{color:y,fontFamily:k}],children:n?e.away:Cr(e.away)})]})},Z=t=>"compact"===e?(e=>/* @__PURE__ */T(z,{style:[Rr.compactCard,{borderColor:u.border,backgroundColor:g}],children:[/* @__PURE__ */T(z,{style:[Rr.compactHeader,{backgroundColor:f}],children:[!e.racing&&G(e.home,18),K(e),!e.racing&&G(e.away,18),e.date&&/* @__PURE__ */W(S,{style:[Rr.compactTime,{color:m}],children:Sr(e.date)}),
130
- /* @__PURE__ */W(z,{style:{marginLeft:"auto"},children:U(e)})]}),e.props.map(e=>/* @__PURE__ */T(z,{style:[Rr.compactRow,{borderTopColor:p,opacity:j(e)?.45:1}],children:[/* @__PURE__ */W(z,{style:{flex:1,minWidth:0},children:V(e,"compact")}),Y(e,"xs")]},e.id))]},e.key))(t):((e,t)=>{const n=!L.has(e.key),o=`${e.props.length} proposition${1===e.props.length?"":"s"}`;/* @__PURE__ */
131
- return T(z,n?{style:[Rr.splitCard,{borderColor:u.border,backgroundColor:g}],children:[/* @__PURE__ */T(z,{style:[Rr.splitStub,{borderColor:p,backgroundColor:f}],children:[!e.racing&&/* @__PURE__ */T(z,{style:{flexDirection:"row",alignItems:"center",gap:2},children:[G(e.home,24),G(e.away,24)]}),K(e),e.date&&/* @__PURE__ */W(S,{style:[Rr.time,{color:m}],children:Sr(e.date)}),U(e)]}),/* @__PURE__ */T(z,{style:{flex:1,minWidth:0},children:[/* @__PURE__ */T(z,{style:[Rr.splitCountRow,{borderBottomColor:p}],children:[/* @__PURE__ */W(S,{style:[Rr.count,{color:m}],children:o}),/* @__PURE__ */W(z,{style:{marginLeft:"auto"},children:q(e,n)})]}),/* @__PURE__ */W(z,{style:Rr.splitBody,children:e.props.map(e=>/* @__PURE__ */T(z,{style:[t?{flexDirection:"row",alignItems:"center",gap:10}:{flexDirection:"column",gap:10},{opacity:j(e)?.45:1}],children:[/* @__PURE__ */W(z,{style:{flex:1,minWidth:0},children:V(e,"split")}),t?Y(e,"xs"):Y(e,"sm",!0)]},e.id))})]})]}:{style:[Rr.foldedStrip,{borderColor:u.border,backgroundColor:g}],children:[
132
- /* @__PURE__ */T(z,{style:[Rr.foldedStub,{borderColor:p,backgroundColor:f}],children:[!e.racing&&/* @__PURE__ */T(v,{children:[G(e.home,16),G(e.away,16)]}),K(e)]}),
133
- /* @__PURE__ */W(S,{style:[Rr.count,Rr.foldedCount,{color:m}],children:o}),
127
+ /* @__PURE__ */W(S,{style:[Hr.shortLabel,{color:y,fontFamily:k}],children:n?e.home:Wr(e.home)}),
128
+ /* @__PURE__ */W(S,{style:[Hr.vs,{color:m}],children:"v"}),
129
+ /* @__PURE__ */W(S,{style:[Hr.shortLabel,{color:y,fontFamily:k}],children:n?e.away:Wr(e.away)})]})},Z=t=>"compact"===e?(e=>/* @__PURE__ */T(z,{style:[Hr.compactCard,{borderColor:u.border,backgroundColor:g}],children:[/* @__PURE__ */T(z,{style:[Hr.compactHeader,{backgroundColor:f}],children:[!e.racing&&G(e.home,18),K(e),!e.racing&&G(e.away,18),e.date&&/* @__PURE__ */W(S,{style:[Hr.compactTime,{color:m}],children:vr(e.date)}),
130
+ /* @__PURE__ */W(z,{style:{marginLeft:"auto"},children:U(e)})]}),e.props.map(e=>/* @__PURE__ */T(z,{style:[Hr.compactRow,{borderTopColor:p,opacity:j(e)?.45:1}],children:[/* @__PURE__ */W(z,{style:{flex:1,minWidth:0},children:V(e,"compact")}),Y(e,"xs")]},e.id))]},e.key))(t):((e,t)=>{const n=!L.has(e.key),o=`${e.props.length} proposition${1===e.props.length?"":"s"}`;/* @__PURE__ */
131
+ return T(z,n?{style:[Hr.splitCard,{borderColor:u.border,backgroundColor:g}],children:[/* @__PURE__ */T(z,{style:[Hr.splitStub,{borderColor:p,backgroundColor:f}],children:[!e.racing&&/* @__PURE__ */T(z,{style:{flexDirection:"row",alignItems:"center",gap:2},children:[G(e.home,24),G(e.away,24)]}),K(e),e.date&&/* @__PURE__ */W(S,{style:[Hr.time,{color:m}],children:vr(e.date)}),U(e)]}),/* @__PURE__ */T(z,{style:{flex:1,minWidth:0},children:[/* @__PURE__ */T(z,{style:[Hr.splitCountRow,{borderBottomColor:p}],children:[/* @__PURE__ */W(S,{style:[Hr.count,{color:m}],children:o}),/* @__PURE__ */W(z,{style:{marginLeft:"auto"},children:q(e,n)})]}),/* @__PURE__ */W(z,{style:Hr.splitBody,children:e.props.map(e=>/* @__PURE__ */T(z,{style:[t?{flexDirection:"row",alignItems:"center",gap:10}:{flexDirection:"column",gap:10},{opacity:j(e)?.45:1}],children:[/* @__PURE__ */W(z,{style:{flex:1,minWidth:0},children:V(e,"split")}),t?Y(e,"xs"):Y(e,"sm",!0)]},e.id))})]})]}:{style:[Hr.foldedStrip,{borderColor:u.border,backgroundColor:g}],children:[
132
+ /* @__PURE__ */T(z,{style:[Hr.foldedStub,{borderColor:p,backgroundColor:f}],children:[!e.racing&&/* @__PURE__ */T(v,{children:[G(e.home,16),G(e.away,16)]}),K(e)]}),
133
+ /* @__PURE__ */W(S,{style:[Hr.count,Hr.foldedCount,{color:m}],children:o}),
134
134
  /* @__PURE__ */W(z,{style:{marginLeft:"auto",paddingRight:8},children:q(e,n)})]},e.key)})(t,"split-inline"===e);/* @__PURE__ */
135
- return T(z,{style:{paddingBottom:16},children:[E.map(e=>{/* @__PURE__ */return T(z,{children:[e.label?(t=e.label,/* @__PURE__ */T(z,{style:Rr.dayHeader,children:[/* @__PURE__ */W(S,{style:[Rr.dayLabel,{color:x,fontFamily:k}],children:t}),/* @__PURE__ */W(z,{style:[Rr.rule,{backgroundColor:p}]})]})):null,e.events.map(Z)]},e.key);var t}),A&&/* @__PURE__ */W(br,{propositions:A.props.filter(e=>!j(e)),title:A.title,onClose:()=>R(null)})]})}function Tr({color:e}){/* @__PURE__ */
136
- return T(A,{width:15,height:15,viewBox:"0 0 24 24",fill:"none",children:[/* @__PURE__ */W(I,{x:3,y:5,width:12,height:16,rx:2,stroke:e,strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"}),/* @__PURE__ */W(H,{d:"M8.5 3h7a2 2 0 0 1 2 2v12",stroke:e,strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})]})}function Ar({color:e}){/* @__PURE__ */
137
- return W(A,{width:14,height:14,viewBox:"0 0 24 24",fill:"none",children:/* @__PURE__ */W(H,{d:"m6 9 6 6 6-6",stroke:e,strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})})}var Rr=k.create({question:{flexDirection:"row",alignItems:"flex-start",gap:8,minWidth:0,flex:1},dayHeader:{flexDirection:"row",alignItems:"center",gap:8,marginTop:16,marginBottom:8},dayLabel:{fontSize:11,fontWeight:"700",letterSpacing:.3},rule:{flex:1,height:1},shortLabel:{fontSize:11.5,fontWeight:"700",lineHeight:15},vs:{fontSize:9,fontWeight:"600",paddingHorizontal:2},roundButton:{height:28,minWidth:28,borderRadius:999,borderWidth:1,alignItems:"center",justifyContent:"center",paddingHorizontal:6},foldButton:{width:24,height:24,borderRadius:999,borderWidth:1,alignItems:"center",justifyContent:"center"},count:{fontSize:10,fontWeight:"600"},foldedCount:{fontSize:11,paddingHorizontal:12},time:{fontSize:9.5,fontWeight:"500"},foldedStrip:{flexDirection:"row",alignItems:"center",borderRadius:16,borderWidth:1,overflow:"hidden",marginBottom:8},foldedStub:{flexDirection:"row",alignItems:"center",gap:4,alignSelf:"stretch",borderRightWidth:1,paddingHorizontal:8,paddingVertical:6},splitCard:{flexDirection:"row",alignItems:"stretch",borderRadius:16,borderWidth:1,overflow:"hidden",marginBottom:8},splitStub:{width:80,alignItems:"center",justifyContent:"center",gap:6,borderRightWidth:1,paddingHorizontal:8,paddingVertical:12},splitCountRow:{flexDirection:"row",alignItems:"center",gap:8,paddingHorizontal:12,paddingVertical:6,borderBottomWidth:1},splitBody:{justifyContent:"center",gap:12,paddingHorizontal:12,paddingVertical:10},compactCard:{borderRadius:16,borderWidth:1,overflow:"hidden",marginBottom:8},compactHeader:{flexDirection:"row",alignItems:"center",gap:6,minWidth:0,paddingHorizontal:12,paddingVertical:8},compactTime:{fontSize:9,fontWeight:"500"},compactRow:{flexDirection:"row",alignItems:"center",gap:8,paddingHorizontal:12,paddingVertical:10,borderTopWidth:1}}),Lr={today:"Today",weekend:"This weekend",next7:"Next 7 days"},Dr=["today","weekend","next7"];function Mr(e,t){const n=new Date(e);return n.setDate(n.getDate()+t),n}function Pr(e,t,n){if(!e)return!1;const o=new Date(e);if(Number.isNaN(o.getTime()))return!1;const{start:i,end:r}=function(e,t){const n=function(e){const t=new Date(e);return t.setHours(0,0,0,0),t}(t);switch(e){case"today":return{start:n,end:Mr(n,1)};case"weekend":{const e=n.getDay(),t=Mr(n,0===e?-1:(6-e)%7);return{start:t<n?n:t,end:Mr(t,2)}}case"next7":return{start:n,end:Mr(n,7)}}}(t,n);return o>=i&&o<r}function Hr(e,t,n){if(!t||(o=n)&&o.split(" vs ").length>1)return null;var o;const i=e.outcome||e.description;return i?t(i):null}var Or=640,Ir=12;function Er({theme:e,variant:t,disabled:n,onPress:o,children:i}){const r=e.colors,[l,a]=c(!1),s="primary"===t?{bg:r.buttonPrimary,bgHover:r.buttonPrimaryHover,fg:r.buttonPrimaryText,border:r.buttonPrimary}:{bg:r.buttonSecondary,bgHover:r.buttonSecondaryHover,fg:r.buttonSecondaryText,border:r.border};/* @__PURE__ */
138
- return W(B,{onPress:o,disabled:n,activeOpacity:.85,...rt(()=>a(!0),()=>a(!1)),style:{minHeight:44,paddingHorizontal:16,borderRadius:12,borderWidth:1,borderColor:s.border,backgroundColor:l&&!n?s.bgHover:s.bg,opacity:n?.5:1,alignItems:"center",justifyContent:"center",flexDirection:"row"},children:/* @__PURE__ */W(S,{style:{color:s.fg,fontSize:14,fontWeight:"500",lineHeight:17},children:i})})}function jr({matchup:e,renderTeamLogo:t,altText:n,mutedColor:o,size:i="sm"}){const{width:r}=F(),l=r>=Or,[a,c=""]=e.split(" vs "),s=c.length>0,d="md"===i&&l?16:14;if(!s)/* @__PURE__ */return W(S,{style:{color:n,fontSize:d,fontWeight:"600"},children:e});const h=e=>/* @__PURE__ */T(z,{style:Vr.teamLogoRowWrap,children:[t?.(e),/* @__PURE__ */W(S,{style:{color:n,fontSize:d,fontWeight:"600",flexShrink:1},children:e})]}),u=/* @__PURE__ */W(S,{style:{color:o,fontSize:12,flexShrink:0},children:"vs"});/* @__PURE__ */
139
- return T(z,l?{style:Vr.matchupTeamsRow,children:[h(a),u,h(c)]}:{style:Vr.matchupTeamsStacked,children:[u,/* @__PURE__ */T(z,{style:{flexShrink:1,minWidth:0},children:[h(a),h(c)]})]})}function Nr({label:e,colors:t,onOpenChange:n}){const o="OR"===e?"If either wins, you win.":"Both must win for Yes.",[r,l]=c(!1);return i(()=>{n?.(r)},[r,n]),/* @__PURE__ */T(z,{style:{position:"relative",zIndex:r?9999:0,elevation:r?9999:0},children:[/* @__PURE__ */W(b,{onPress:()=>l(e=>!e),onHoverIn:()=>l(!0),onHoverOut:()=>l(!1),hitSlop:6,accessibilityLabel:o,accessibilityRole:"button",accessibilityState:{expanded:r},children:/* @__PURE__ */W(z,{style:{paddingHorizontal:8,paddingVertical:2,borderRadius:6,backgroundColor:ne(t.primary,.14),borderWidth:1,borderColor:ne(t.primary,.45)},children:/* @__PURE__ */W(S,{style:{color:t.primary,fontSize:10,fontWeight:"700",lineHeight:10,textTransform:"uppercase",letterSpacing:.25},children:e})})}),r&&/* @__PURE__ */W(z,{style:{position:"absolute",top:"100%",left:0,marginTop:4,minWidth:192,maxWidth:352,paddingHorizontal:10,paddingVertical:6,borderRadius:6,backgroundColor:t.backgroundAlt??"#fff",borderWidth:1,borderColor:t.border??ne(t.primary,.3),shadowColor:"#000",shadowOffset:{width:0,height:2},shadowOpacity:.12,shadowRadius:4,elevation:9999},children:/* @__PURE__ */W(S,{style:{color:t.text,fontSize:11,lineHeight:15},children:o})})]})}function Gr({prop:t,colors:n,size:o="sm",componentById:i,textStyle:r,textColor:l}){const{width:a}=F(),s=a>=Or,d=Gt(t,i),h=t.description??t.proposition??"",u=r?.fontSize??("md"===o?s?16:14:s?14:12),g=r?.fontWeight??("md"===o?"500":"400"),f=r?.lineHeight,p=r?.textAlign,y=l??n.text,m=n.textMuted??n.textAltMuted??n.text,[b,w]=c(!1);if(!d)/* @__PURE__ */return W(S,{style:{color:y,fontSize:u,fontWeight:g,lineHeight:f,textAlign:p,flex:1},children:h});const{operator:x,legs:k}=d;return k.some(e=>e.eventLabel)?/* @__PURE__ */W(z,{style:{flex:1,minWidth:0,flexDirection:"column",gap:8,...b&&{zIndex:9999,elevation:9999,position:"relative"}},children:k.map((e,t)=>/* @__PURE__ */T(z,{style:{minWidth:0},children:[t>0&&/* @__PURE__ */W(z,{style:{marginBottom:4},children:/* @__PURE__ */W(Nr,{label:x,colors:n,onOpenChange:w})}),e.eventLabel&&/* @__PURE__ */W(S,{style:{color:m,fontSize:s?12:10,fontWeight:"600",textTransform:"uppercase",letterSpacing:.25},children:e.eventLabel}),
140
- /* @__PURE__ */W(S,{style:{color:y,fontSize:u,fontWeight:g,lineHeight:f,textAlign:p},children:e.text})]},t))}):/* @__PURE__ */W(z,{style:{flex:1,minWidth:0,...b&&{zIndex:9999,elevation:9999,position:"relative"}},children:/* @__PURE__ */W(z,{style:{flexDirection:"row",flexWrap:"wrap",alignItems:"center",columnGap:6,rowGap:4},children:k.map((t,o)=>/* @__PURE__ */T(e.Fragment,{children:[o>0&&/* @__PURE__ */W(Nr,{label:x,colors:n,onOpenChange:w}),/* @__PURE__ */W(S,{style:{color:y,fontSize:u,fontWeight:g,lineHeight:f,textAlign:p},children:t.text})]},o))})})}function Yr({game:t,propositions:n,selections:r,onToggleSelection:a,onNext:s,onBack:d,loading:h,error:u,theme:g,colorScheme:f,hideActions:p=!1,initialSport:y,renderTeamLogo:m,disableQuickPick:b=!1,selectedPropositionCount:w,onPropositionCountChange:x,gameCategory:k,headerExtra:R,variant:L,disableEventSwipe:D}){const M=o(Qi),P=M?.sportBaseKey,O=M?.compositeComponentById,I=L??M?.selectionVariant,E=D??M?.disableEventSwipe??!1,j=je(g,f),N=j.colors,G=be(j),Y=xe(j),V=N.matchupHeader??(t.color?ne(t.color,.14):we(j)),U=N.textAlt??N.text;Ge(j);const q=Ne(j);se(j);const{width:K}=F(),Z=K>=Or,X=function(e){return{shadowColor:"#000",shadowOpacity:"dark"===e.colorScheme?.4:.12,shadowRadius:12,shadowOffset:{width:0,height:6},elevation:2}}(j),Q=!!(t.allowed_propositions&&t.allowed_propositions.length>0),{min:J,max:$}=dn(t,w),_=J,ee=$,[te,oe]=e.useState(()=>new Set(Object.keys(An(n,k,P))));e.useEffect(()=>{const e=An(n,k,P),t=Object.keys(e);t.length>0&&oe(e=>t.every(t=>e.has(t))?e:new Set(t))},[n]);const ie=_>0&&_===ee,re=_||1,le=ee||n.length,ae=ee||_||n.length,[ce,de]=e.useState(ae),he=Object.keys(r).length,ue=ee>0&&he>=ee,ge=Q?null!=w&&he===w:sn(he,t.min_propositions,t.max_propositions);t.min_bet,ee>0?Math.max(2,2*ee):Math.max(2,2*he);const fe=e.useRef(he),pe=Q?null!=w&&he===w:ee>0&&he===ee;i(()=>{pe&&he>fe.current&&s?.(),fe.current=he},[he,pe]);const ye=(e,t)=>{!(e in r)&&ue||a(e,t)};i(()=>{const e=ee||n.length,t=_||1;de(n=>ie?ee:Math.max(t,Math.min(n,e)))},[n.length,_,ee,ie]);const me=l(()=>/* @__PURE__ */new Date,[]),Se=l(()=>function(e,t){const n=e.filter(e=>null!=function(e){if(!e.commence_time)return null;const t=new Date(e.commence_time);return Number.isNaN(t.getTime())?null:t}(e));if(n.length<2)return[];const o=[];for(const i of Dr){let e=0,r=0;for(const o of n)if(Pr(o.commence_time,i,t)?e+=1:r+=1,e>0&&r>0)break;e>0&&r>0&&o.push({id:i,label:Lr[i]})}return o}(n,me),[n,me]),[Ce,Be]=c(null);i(()=>{Ce&&!Se.some(e=>e.id===Ce)&&Be(null)},[Se,Ce]);const ze=l(()=>function(e,t,n){return t?e.filter(e=>Pr(e.commence_time,t,n)):e.slice()}(n,Ce,me),[n,Ce,me]),Fe=l(()=>un(k,ze,P),[k,ze,P]),ve=l(()=>An(ze,k,P),[ze,k,P]),We=l(()=>{const e=/* @__PURE__ */new Set;for(const t of ze){const n=Ht(t);n&&e.add(n)}return Array.from(e).sort((e,t)=>e.localeCompare(t))},[ze]),[Te,Ae]=c(null),[Re,Le]=c(!1);i(()=>{Te&&!We.includes(Te)&&Ae(null)},[We,Te]);const De=l(()=>{if(!Te)return ve;const e={};for(const[t,n]of Object.entries(ve)){const o=n.filter(e=>Ht(e)===Te);o.length>0&&(e[t]=o)}return e},[ve,Te]),Me=Object.keys(De);if(h)/* @__PURE__ */return W(Xn,{colors:ke(j)});if(u)/* @__PURE__ */return W(z,{style:Vr.centered,children:/* @__PURE__ */W(S,{style:{color:N.error},children:u})});const Pe=!b&&n.length>0,He=Se.length>0||We.length>1,Oe=(null!=Ce?1:0)+(null!=Te?1:0);/* @__PURE__ */
141
- return T(z,{style:{gap:Z?24:16,paddingBottom:64},children:[He||R?/* @__PURE__ */T(z,{style:Vr.filterHeaderRow,children:[/* @__PURE__ */W(z,{style:Vr.filterToggleRow,children:He?/* @__PURE__ */T(v,{children:[/* @__PURE__ */T(B,{onPress:()=>Le(e=>!e),activeOpacity:.85,accessibilityRole:"button",style:[Vr.filterToggle,{borderColor:Oe>0?N.primary:N.border,backgroundColor:Oe>0?N.primary:N.background??"#fff"}],children:[
135
+ return T(z,{style:{paddingBottom:16},children:[E.map(e=>{/* @__PURE__ */return T(z,{children:[e.label?(t=e.label,/* @__PURE__ */T(z,{style:Hr.dayHeader,children:[/* @__PURE__ */W(S,{style:[Hr.dayLabel,{color:x,fontFamily:k}],children:t}),/* @__PURE__ */W(z,{style:[Hr.rule,{backgroundColor:p}]})]})):null,e.events.map(Z)]},e.key);var t}),A&&/* @__PURE__ */W(Cr,{propositions:A.props.filter(e=>!j(e)),title:A.title,onClose:()=>R(null)})]})}function Mr({color:e}){/* @__PURE__ */
136
+ return T(A,{width:15,height:15,viewBox:"0 0 24 24",fill:"none",children:[/* @__PURE__ */W(I,{x:3,y:5,width:12,height:16,rx:2,stroke:e,strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"}),/* @__PURE__ */W(H,{d:"M8.5 3h7a2 2 0 0 1 2 2v12",stroke:e,strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})]})}function Pr({color:e}){/* @__PURE__ */
137
+ return W(A,{width:14,height:14,viewBox:"0 0 24 24",fill:"none",children:/* @__PURE__ */W(H,{d:"m6 9 6 6 6-6",stroke:e,strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})})}var Hr=k.create({question:{flexDirection:"row",alignItems:"flex-start",gap:8,minWidth:0,flex:1},dayHeader:{flexDirection:"row",alignItems:"center",gap:8,marginTop:16,marginBottom:8},dayLabel:{fontSize:11,fontWeight:"700",letterSpacing:.3},rule:{flex:1,height:1},shortLabel:{fontSize:11.5,fontWeight:"700",lineHeight:15},vs:{fontSize:9,fontWeight:"600",paddingHorizontal:2},roundButton:{height:28,minWidth:28,borderRadius:999,borderWidth:1,alignItems:"center",justifyContent:"center",paddingHorizontal:6},foldButton:{width:24,height:24,borderRadius:999,borderWidth:1,alignItems:"center",justifyContent:"center"},count:{fontSize:10,fontWeight:"600"},foldedCount:{fontSize:11,paddingHorizontal:12},time:{fontSize:9.5,fontWeight:"500"},foldedStrip:{flexDirection:"row",alignItems:"center",borderRadius:16,borderWidth:1,overflow:"hidden",marginBottom:8},foldedStub:{flexDirection:"row",alignItems:"center",gap:4,alignSelf:"stretch",borderRightWidth:1,paddingHorizontal:8,paddingVertical:6},splitCard:{flexDirection:"row",alignItems:"stretch",borderRadius:16,borderWidth:1,overflow:"hidden",marginBottom:8},splitStub:{width:80,alignItems:"center",justifyContent:"center",gap:6,borderRightWidth:1,paddingHorizontal:8,paddingVertical:12},splitCountRow:{flexDirection:"row",alignItems:"center",gap:8,paddingHorizontal:12,paddingVertical:6,borderBottomWidth:1},splitBody:{justifyContent:"center",gap:12,paddingHorizontal:12,paddingVertical:10},compactCard:{borderRadius:16,borderWidth:1,overflow:"hidden",marginBottom:8},compactHeader:{flexDirection:"row",alignItems:"center",gap:6,minWidth:0,paddingHorizontal:12,paddingVertical:8},compactTime:{fontSize:9,fontWeight:"500"},compactRow:{flexDirection:"row",alignItems:"center",gap:8,paddingHorizontal:12,paddingVertical:10,borderTopWidth:1}}),Or={today:"Today",weekend:"This weekend",next7:"Next 7 days"},Ir=["today","weekend","next7"];function Er(e,t){const n=new Date(e);return n.setDate(n.getDate()+t),n}function jr(e,t,n){if(!e)return!1;const o=new Date(e);if(Number.isNaN(o.getTime()))return!1;const{start:i,end:r}=function(e,t){const n=function(e){const t=new Date(e);return t.setHours(0,0,0,0),t}(t);switch(e){case"today":return{start:n,end:Er(n,1)};case"weekend":{const e=n.getDay(),t=Er(n,0===e?-1:(6-e)%7);return{start:t<n?n:t,end:Er(t,2)}}case"next7":return{start:n,end:Er(n,7)}}}(t,n);return o>=i&&o<r}function Nr(e,t,n){if(!t||(o=n)&&o.split(" vs ").length>1)return null;var o;const i=e.outcome||e.description;return i?t(i):null}var Gr=640,Yr=12;function Vr({theme:e,variant:t,disabled:n,onPress:o,children:i}){const r=e.colors,[l,a]=c(!1),s="primary"===t?{bg:r.buttonPrimary,bgHover:r.buttonPrimaryHover,fg:r.buttonPrimaryText,border:r.buttonPrimary}:{bg:r.buttonSecondary,bgHover:r.buttonSecondaryHover,fg:r.buttonSecondaryText,border:r.border};/* @__PURE__ */
138
+ return W(B,{onPress:o,disabled:n,activeOpacity:.85,...rt(()=>a(!0),()=>a(!1)),style:{minHeight:44,paddingHorizontal:16,borderRadius:12,borderWidth:1,borderColor:s.border,backgroundColor:l&&!n?s.bgHover:s.bg,opacity:n?.5:1,alignItems:"center",justifyContent:"center",flexDirection:"row"},children:/* @__PURE__ */W(S,{style:{color:s.fg,fontSize:14,fontWeight:"500",lineHeight:17},children:i})})}function Ur({matchup:e,renderTeamLogo:t,altText:n,mutedColor:o,size:i="sm"}){const{width:r}=F(),l=r>=Gr,[a,c=""]=e.split(" vs "),s=c.length>0,d="md"===i&&l?16:14;if(!s)/* @__PURE__ */return W(S,{style:{color:n,fontSize:d,fontWeight:"600"},children:e});const h=e=>/* @__PURE__ */T(z,{style:Xr.teamLogoRowWrap,children:[t?.(e),/* @__PURE__ */W(S,{style:{color:n,fontSize:d,fontWeight:"600",flexShrink:1},children:e})]}),u=/* @__PURE__ */W(S,{style:{color:o,fontSize:12,flexShrink:0},children:"vs"});/* @__PURE__ */
139
+ return T(z,l?{style:Xr.matchupTeamsRow,children:[h(a),u,h(c)]}:{style:Xr.matchupTeamsStacked,children:[u,/* @__PURE__ */T(z,{style:{flexShrink:1,minWidth:0},children:[h(a),h(c)]})]})}function qr({label:e,colors:t,onOpenChange:n}){const o="OR"===e?"If either wins, you win.":"Both must win for Yes.",[r,l]=c(!1);return i(()=>{n?.(r)},[r,n]),/* @__PURE__ */T(z,{style:{position:"relative",zIndex:r?9999:0,elevation:r?9999:0},children:[/* @__PURE__ */W(b,{onPress:()=>l(e=>!e),onHoverIn:()=>l(!0),onHoverOut:()=>l(!1),hitSlop:6,accessibilityLabel:o,accessibilityRole:"button",accessibilityState:{expanded:r},children:/* @__PURE__ */W(z,{style:{paddingHorizontal:8,paddingVertical:2,borderRadius:6,backgroundColor:ne(t.primary,.14),borderWidth:1,borderColor:ne(t.primary,.45)},children:/* @__PURE__ */W(S,{style:{color:t.primary,fontSize:10,fontWeight:"700",lineHeight:10,textTransform:"uppercase",letterSpacing:.25},children:e})})}),r&&/* @__PURE__ */W(z,{style:{position:"absolute",top:"100%",left:0,marginTop:4,minWidth:192,maxWidth:352,paddingHorizontal:10,paddingVertical:6,borderRadius:6,backgroundColor:t.backgroundAlt??"#fff",borderWidth:1,borderColor:t.border??ne(t.primary,.3),shadowColor:"#000",shadowOffset:{width:0,height:2},shadowOpacity:.12,shadowRadius:4,elevation:9999},children:/* @__PURE__ */W(S,{style:{color:t.text,fontSize:11,lineHeight:15},children:o})})]})}function Kr({prop:t,colors:n,size:o="sm",componentById:i,textStyle:r,textColor:l}){const{width:a}=F(),s=a>=Gr,d=Gt(t,i),h=t.description??t.proposition??"",u=r?.fontSize??("md"===o?s?16:14:s?14:12),g=r?.fontWeight??("md"===o?"500":"400"),f=r?.lineHeight,p=r?.textAlign,y=l??n.text,m=n.textMuted??n.textAltMuted??n.text,[b,w]=c(!1);if(!d)/* @__PURE__ */return W(S,{style:{color:y,fontSize:u,fontWeight:g,lineHeight:f,textAlign:p,flex:1},children:h});const{operator:x,legs:k}=d;return k.some(e=>e.eventLabel)?/* @__PURE__ */W(z,{style:{flex:1,minWidth:0,flexDirection:"column",gap:8,...b&&{zIndex:9999,elevation:9999,position:"relative"}},children:k.map((e,t)=>/* @__PURE__ */T(z,{style:{minWidth:0},children:[t>0&&/* @__PURE__ */W(z,{style:{marginBottom:4},children:/* @__PURE__ */W(qr,{label:x,colors:n,onOpenChange:w})}),e.eventLabel&&/* @__PURE__ */W(S,{style:{color:m,fontSize:s?12:10,fontWeight:"600",textTransform:"uppercase",letterSpacing:.25},children:e.eventLabel}),
140
+ /* @__PURE__ */W(S,{style:{color:y,fontSize:u,fontWeight:g,lineHeight:f,textAlign:p},children:e.text})]},t))}):/* @__PURE__ */W(z,{style:{flex:1,minWidth:0,...b&&{zIndex:9999,elevation:9999,position:"relative"}},children:/* @__PURE__ */W(z,{style:{flexDirection:"row",flexWrap:"wrap",alignItems:"center",columnGap:6,rowGap:4},children:k.map((t,o)=>/* @__PURE__ */T(e.Fragment,{children:[o>0&&/* @__PURE__ */W(qr,{label:x,colors:n,onOpenChange:w}),/* @__PURE__ */W(S,{style:{color:y,fontSize:u,fontWeight:g,lineHeight:f,textAlign:p},children:t.text})]},o))})})}function Zr({game:t,propositions:n,selections:r,onToggleSelection:a,onNext:s,onBack:d,loading:h,error:u,theme:g,colorScheme:f,hideActions:p=!1,initialSport:y,renderTeamLogo:m,disableQuickPick:b=!1,selectedPropositionCount:w,onPropositionCountChange:x,gameCategory:k,headerExtra:R,variant:L,disableEventSwipe:D}){const M=o(tr),P=M?.sportBaseKey,O=M?.compositeComponentById,I=L??M?.selectionVariant,E=D??M?.disableEventSwipe??!1,j=je(g,f),N=j.colors,G=be(j),Y=xe(j),V=N.matchupHeader??(t.color?ne(t.color,.14):we(j)),U=N.textAlt??N.text;Ge(j);const q=Ne(j);se(j);const{width:K}=F(),Z=K>=Gr,X=function(e){return{shadowColor:"#000",shadowOpacity:"dark"===e.colorScheme?.4:.12,shadowRadius:12,shadowOffset:{width:0,height:6},elevation:2}}(j),Q=!!(t.allowed_propositions&&t.allowed_propositions.length>0),{min:J,max:$}=dn(t,w),_=J,ee=$,[te,oe]=e.useState(()=>new Set(Object.keys(An(n,k,P))));e.useEffect(()=>{const e=An(n,k,P),t=Object.keys(e);t.length>0&&oe(e=>t.every(t=>e.has(t))?e:new Set(t))},[n]);const ie=_>0&&_===ee,re=_||1,le=ee||n.length,ae=ee||_||n.length,[ce,de]=e.useState(ae),he=Object.keys(r).length,ue=ee>0&&he>=ee,ge=Q?null!=w&&he===w:sn(he,t.min_propositions,t.max_propositions);t.min_bet,ee>0?Math.max(2,2*ee):Math.max(2,2*he);const fe=e.useRef(he),pe=Q?null!=w&&he===w:ee>0&&he===ee;i(()=>{pe&&he>fe.current&&s?.(),fe.current=he},[he,pe]);const ye=(e,t)=>{!(e in r)&&ue||a(e,t)};i(()=>{const e=ee||n.length,t=_||1;de(n=>ie?ee:Math.max(t,Math.min(n,e)))},[n.length,_,ee,ie]);const me=l(()=>/* @__PURE__ */new Date,[]),Se=l(()=>function(e,t){const n=e.filter(e=>null!=function(e){if(!e.commence_time)return null;const t=new Date(e.commence_time);return Number.isNaN(t.getTime())?null:t}(e));if(n.length<2)return[];const o=[];for(const i of Ir){let e=0,r=0;for(const o of n)if(jr(o.commence_time,i,t)?e+=1:r+=1,e>0&&r>0)break;e>0&&r>0&&o.push({id:i,label:Or[i]})}return o}(n,me),[n,me]),[Ce,Be]=c(null);i(()=>{Ce&&!Se.some(e=>e.id===Ce)&&Be(null)},[Se,Ce]);const ze=l(()=>function(e,t,n){return t?e.filter(e=>jr(e.commence_time,t,n)):e.slice()}(n,Ce,me),[n,Ce,me]),Fe=l(()=>un(k,ze,P),[k,ze,P]),ve=l(()=>An(ze,k,P),[ze,k,P]),We=l(()=>{const e=/* @__PURE__ */new Set;for(const t of ze){const n=Ht(t);n&&e.add(n)}return Array.from(e).sort((e,t)=>e.localeCompare(t))},[ze]),[Te,Ae]=c(null),[Re,Le]=c(!1);i(()=>{Te&&!We.includes(Te)&&Ae(null)},[We,Te]);const De=l(()=>{if(!Te)return ve;const e={};for(const[t,n]of Object.entries(ve)){const o=n.filter(e=>Ht(e)===Te);o.length>0&&(e[t]=o)}return e},[ve,Te]),Me=Object.keys(De);if(h)/* @__PURE__ */return W(Xn,{colors:ke(j)});if(u)/* @__PURE__ */return W(z,{style:Xr.centered,children:/* @__PURE__ */W(S,{style:{color:N.error},children:u})});const Pe=!b&&n.length>0,He=Se.length>0||We.length>1,Oe=(null!=Ce?1:0)+(null!=Te?1:0);/* @__PURE__ */
141
+ return T(z,{style:{gap:Z?24:16,paddingBottom:64},children:[He||R?/* @__PURE__ */T(z,{style:Xr.filterHeaderRow,children:[/* @__PURE__ */W(z,{style:Xr.filterToggleRow,children:He?/* @__PURE__ */T(v,{children:[/* @__PURE__ */T(B,{onPress:()=>Le(e=>!e),activeOpacity:.85,accessibilityRole:"button",style:[Xr.filterToggle,{borderColor:Oe>0?N.primary:N.border,backgroundColor:Oe>0?N.primary:N.background??"#fff"}],children:[
142
142
  /* @__PURE__ */W(vt,{size:13,color:Oe>0?N.primaryText:N.text}),
143
143
  /* @__PURE__ */W(S,{style:{fontSize:11,fontWeight:"700",color:Oe>0?N.primaryText:N.text},children:"Filter"}),Oe>0&&/* @__PURE__ */T(S,{style:{fontSize:11,fontWeight:"700",color:N.primaryText},children:["· ",Oe]}),
144
- /* @__PURE__ */W(z,{style:{transform:[{rotate:Re?"-90deg":"90deg"}],opacity:.75},children:/* @__PURE__ */W(zt,{size:13,color:Oe>0?N.primaryText:N.text})})]}),Oe>0&&/* @__PURE__ */W(B,{onPress:()=>{Be(null),Ae(null)},activeOpacity:.85,accessibilityRole:"button",children:/* @__PURE__ */W(S,{style:{fontSize:11,fontWeight:"600",color:N.textMuted},children:"Clear"})})]}):null}),R]}):null,Re&&He&&/* @__PURE__ */T(z,{style:{gap:10},children:[Se.length>0&&/* @__PURE__ */W(Mt,{label:"When",options:[{value:null,label:"All dates"},...Se.map(e=>({value:e.id,label:e.label}))],value:Ce,onChange:e=>Be(e),theme:j,bodyFont:q}),We.length>1&&/* @__PURE__ */W(Mt,{label:"Market",options:[{value:null,label:"All markets"},...We.map(e=>{return{value:e,label:(t=e,t.replace(/[_-]+/g," ").replace(/\b\w/g,e=>e.toUpperCase()))};var t})],value:Te,onChange:Ae,theme:j,bodyFont:q})]}),Pe&&/* @__PURE__ */W(z,{style:[Vr.topBar,{justifyContent:"flex-end"}],children:/* @__PURE__ */T(z,{style:[Vr.quickPickRow,{gap:Z?8:6}],children:[!ie&&/* @__PURE__ */T(z,{style:Vr.quickPickCountRow,children:[/* @__PURE__ */W(C,{keyboardType:"number-pad",value:String(ce),onChangeText:e=>{const t=parseInt(e,10);isNaN(t)||de(Math.max(re,Math.min(le,t)))},style:[Vr.quickPickInput,{width:Z?56:40,paddingHorizontal:Z?8:4,paddingVertical:Z?6:4,fontSize:Z?14:12,color:U,backgroundColor:N.backgroundAlt,borderColor:N.border}]}),/* @__PURE__ */T(S,{style:{color:N.textMuted,fontSize:12},children:["/ ",n.length]})]}),/* @__PURE__ */W(er,{onPress:()=>{const e=ie?ee:ce;for(const n of Object.keys(r)){const e=Number(n);a(e,r[e])}const{yesPicks:t,noPicks:o}=Dn(n,e);for(const n of t)a(n.id,"yes");for(const n of o)a(n.id,"no");s?.()}})]})}),n.length>0&&I?/* @__PURE__ */W(Wr,{variant:I,groups:De,racing:Fe,selections:r,onToggleSelection:ye,atMax:ue,theme:j,renderTeamLogo:m,componentById:O,disableEventSwipe:E}):null,n.length>0&&!I&&/* @__PURE__ */W(z,{style:Vr.matchupList,children:Me.every(e=>1===De[e].length)?/* @__PURE__ */W(z,{style:[Vr.matchupCard,{borderColor:N.border,backgroundColor:G},X],children:Me.map((e,t)=>{const n=De[e][0],o="yes"===r[n.id],i="no"===r[n.id],l=n.id in r,a=ue&&!l,c=0===t,s=t===Me.length-1;/* @__PURE__ */
145
- return T(z,{style:{borderTopColor:N.border,borderTopWidth:c?0:1,opacity:a?.45:1},children:[/* @__PURE__ */T(z,{style:{paddingHorizontal:16,paddingVertical:Z?12:10,backgroundColor:V,borderTopLeftRadius:c?Ir:0,borderTopRightRadius:c?Ir:0},children:[/* @__PURE__ */W(z,{style:{minWidth:0},children:/* @__PURE__ */W(jr,{matchup:e,renderTeamLogo:m,altText:U,mutedColor:N.textAltMuted??N.textMuted??U})}),n.commence_time&&/* @__PURE__ */W(S,{style:{color:N.textAltMuted??N.textMuted,fontSize:11,opacity:.7,marginTop:2},children:_t(n.commence_time)})]}),/* @__PURE__ */T(z,{style:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",gap:12,paddingHorizontal:16,paddingVertical:Z?14:12,backgroundColor:Y,borderTopWidth:1,borderTopColor:N.border,borderBottomLeftRadius:s?Ir:0,borderBottomRightRadius:s?Ir:0},children:[/* @__PURE__ */T(z,{style:{flex:1,minWidth:0,flexDirection:"row",alignItems:"flex-start",gap:8},children:[Hr(n,m,e),/* @__PURE__ */W(Gr,{prop:n,colors:N,componentById:O})]}),/* @__PURE__ */W(dt,{theme:j,size:"sm",value:o?"yes":i?"no":null,onYes:()=>ye(n.id,"yes"),onNo:()=>ye(n.id,"no"),disabled:a})]})]},n.id)})}):Me.map(e=>{const t=De[e],n=te.has(e),o=t.filter(e=>e.id in r).length,i=t[0]?.commence_time;/* @__PURE__ */
146
- return T(z,{style:[Vr.matchupCard,{borderColor:N.border,backgroundColor:G},X],children:[/* @__PURE__ */T(B,{onPress:()=>{return t=e,oe(e=>{const n=new Set(e);return n.has(t)?n.delete(t):n.add(t),n});var t},style:[Vr.matchupHeader,{backgroundColor:V,borderTopLeftRadius:Ir,borderTopRightRadius:Ir,borderBottomLeftRadius:n?0:Ir,borderBottomRightRadius:n?0:Ir}],children:[/* @__PURE__ */T(z,{style:Vr.matchupHeaderLeft,children:[/* @__PURE__ */W(A,{width:18,height:18,viewBox:"0 0 24 24",style:{flexShrink:0,transform:[{rotate:n?"180deg":"0deg"}]},children:/* @__PURE__ */W(H,{d:"m6 9 6 6 6-6",stroke:N.textAltMuted??N.textMuted,strokeWidth:2.5,strokeLinecap:"round",strokeLinejoin:"round",fill:"none"})}),/* @__PURE__ */T(z,{style:Vr.matchupTeamWrapper,children:[/* @__PURE__ */W(jr,{matchup:e,renderTeamLogo:m,altText:U,mutedColor:N.textAltMuted??N.textMuted??U,size:"md"}),i&&/* @__PURE__ */W(S,{style:{color:N.textAltMuted??N.textMuted,fontSize:12,opacity:.7,marginTop:2,textAlign:"left"},children:_t(i)})]})]}),/* @__PURE__ */W(z,{style:Vr.matchupHeaderRight,children:o>0&&/* @__PURE__ */W(z,{style:[Vr.answeredBadge,{backgroundColor:N.successBg}],children:/* @__PURE__ */T(S,{style:{color:N.successText,fontSize:12,fontWeight:"500"},children:[o,"/",t.length]})})})]}),n&&/* @__PURE__ */W(z,{children:/* @__PURE__ */W(v,{children:t.map((n,o)=>{const i="yes"===r[n.id],l="no"===r[n.id],a=n.id in r,c=ue&&!a,s=o===t.length-1;/* @__PURE__ */
147
- return W(z,{style:{paddingHorizontal:16,paddingVertical:Z?14:12,backgroundColor:Y,borderTopColor:N.border,borderTopWidth:0===o?0:1,opacity:c?.45:1,borderBottomLeftRadius:s?Ir:0,borderBottomRightRadius:s?Ir:0},children:/* @__PURE__ */T(z,{style:{flexDirection:"row",flexWrap:"wrap",justifyContent:"space-between",alignItems:"flex-start",columnGap:Z?16:8,rowGap:Z?16:8},children:[/* @__PURE__ */T(z,{style:{flex:1,minWidth:128,flexDirection:"row",alignItems:"flex-start",gap:8},children:[Hr(n,m,e),/* @__PURE__ */W(Gr,{prop:n,colors:N,size:"md",componentById:O})]}),/* @__PURE__ */W(dt,{theme:j,size:"sm",value:i?"yes":l?"no":null,onYes:()=>ye(n.id,"yes"),onNo:()=>ye(n.id,"no"),disabled:c})]})},n.id)})})})]},e)})}),0===n.length&&/* @__PURE__ */W(z,{style:Vr.centered,children:/* @__PURE__ */W(S,{style:{color:N.textMuted},children:"No propositions available at this time"})}),!p&&/* @__PURE__ */T(z,{style:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",gap:12,borderTopWidth:1,borderTopColor:N.border,backgroundColor:G,marginHorizontal:Z?-24:-16,paddingHorizontal:Z?24:16,paddingVertical:Z?16:12},children:[/* @__PURE__ */W(Er,{theme:j,variant:"secondary",onPress:d,children:"Back"}),/* @__PURE__ */W(z,{style:{flexDirection:"row",alignItems:"center",gap:Z?12:8},children:/* @__PURE__ */W(Er,{theme:j,variant:"primary",disabled:!ge,onPress:s,children:"Wager"})})]})]})}var Vr=k.create({centered:{alignItems:"center",justifyContent:"center",padding:32,flexDirection:"row"},filterHeaderRow:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",gap:8},filterToggleRow:{flexDirection:"row",alignItems:"center",gap:8},filterToggle:{flexDirection:"row",alignItems:"center",gap:6,borderWidth:1,borderRadius:999,paddingHorizontal:12,paddingVertical:6},topBar:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",flexWrap:"wrap",gap:8},quickPickRow:{flexDirection:"row",alignItems:"center",flexShrink:0},quickPickCountRow:{flexDirection:"row",alignItems:"center",gap:4},quickPickInput:{borderRadius:8,borderWidth:2,fontWeight:"600",textAlign:"center"},matchupList:{gap:16},matchupCard:{borderRadius:Ir,borderWidth:1,overflow:"visible"},matchupHeader:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",paddingHorizontal:16,paddingVertical:14},matchupHeaderLeft:{flexDirection:"row",alignItems:"center",gap:8,flex:1,minWidth:0},matchupTeamWrapper:{flex:1,minWidth:0},matchupTeamsRow:{flexDirection:"row",flexWrap:"wrap",alignItems:"center",columnGap:6,rowGap:4},matchupTeamsStacked:{flexDirection:"row",alignItems:"center",gap:6,alignSelf:"stretch"},teamLogoRowWrap:{flexDirection:"row",alignItems:"center",gap:4,flexShrink:1,minWidth:0},matchupHeaderRight:{flexDirection:"row",alignItems:"center",gap:8,marginLeft:8,flexShrink:0},answeredBadge:{paddingHorizontal:8,paddingVertical:2,borderRadius:999}});function Ur({theme:e,variant:t,disabled:n,onPress:o,children:i}){const r=e.colors,[l,a]=c(!1),s="primary"===t?{bg:r.buttonPrimary,bgHover:r.buttonPrimaryHover,fg:r.buttonPrimaryText,border:r.buttonPrimary}:{bg:r.buttonSecondary,bgHover:r.buttonSecondaryHover,fg:r.buttonSecondaryText,border:r.border};/* @__PURE__ */
148
- return W(B,{onPress:o,disabled:n,activeOpacity:.85,...rt(()=>a(!0),()=>a(!1)),style:{minHeight:44,paddingHorizontal:16,borderRadius:12,borderWidth:1,borderColor:s.border,backgroundColor:l&&!n?s.bgHover:s.bg,opacity:n?.5:1,alignItems:"center",justifyContent:"center",flexDirection:"row"},children:/* @__PURE__ */W(S,{style:{color:s.fg,fontSize:14,fontWeight:"500",lineHeight:17},children:i})})}function qr({propositions:e,selections:t,onToggleSelection:n,onNext:o,onBack:i,theme:r,colorScheme:l,hideActions:a=!1,renderTeamLogo:s,allowAnswerToggle:d=!0,gameName:h,potentialPayout:u,defaultExpanded:g=!1,addMorePicks:f}){const p=je(r,l),y=p.colors,m=be(p),b=Ge(p),w=se(p),x=y.textAlt??y.text,{width:k}=F(),C=k>=640,v=function(e){return{shadowColor:"#000",shadowOpacity:"dark"===e.colorScheme?.4:.12,shadowRadius:12,shadowOffset:{width:0,height:6},elevation:2}}(p),[R,L]=c(null),[D,M]=c(g),P=e.filter(e=>e.id in t),O=P.length,I=Rn(P),E=y.matchupHeader??we(p),j=xe(p),N=C?16:12;/* @__PURE__ */
144
+ /* @__PURE__ */W(z,{style:{transform:[{rotate:Re?"-90deg":"90deg"}],opacity:.75},children:/* @__PURE__ */W(zt,{size:13,color:Oe>0?N.primaryText:N.text})})]}),Oe>0&&/* @__PURE__ */W(B,{onPress:()=>{Be(null),Ae(null)},activeOpacity:.85,accessibilityRole:"button",children:/* @__PURE__ */W(S,{style:{fontSize:11,fontWeight:"600",color:N.textMuted},children:"Clear"})})]}):null}),R]}):null,Re&&He&&/* @__PURE__ */T(z,{style:{gap:10},children:[Se.length>0&&/* @__PURE__ */W(Mt,{label:"When",options:[{value:null,label:"All dates"},...Se.map(e=>({value:e.id,label:e.label}))],value:Ce,onChange:e=>Be(e),theme:j,bodyFont:q}),We.length>1&&/* @__PURE__ */W(Mt,{label:"Market",options:[{value:null,label:"All markets"},...We.map(e=>{return{value:e,label:(t=e,t.replace(/[_-]+/g," ").replace(/\b\w/g,e=>e.toUpperCase()))};var t})],value:Te,onChange:Ae,theme:j,bodyFont:q})]}),Pe&&/* @__PURE__ */W(z,{style:[Xr.topBar,{justifyContent:"flex-end"}],children:/* @__PURE__ */T(z,{style:[Xr.quickPickRow,{gap:Z?8:6}],children:[!ie&&/* @__PURE__ */T(z,{style:Xr.quickPickCountRow,children:[/* @__PURE__ */W(C,{keyboardType:"number-pad",value:String(ce),onChangeText:e=>{const t=parseInt(e,10);isNaN(t)||de(Math.max(re,Math.min(le,t)))},style:[Xr.quickPickInput,{width:Z?56:40,paddingHorizontal:Z?8:4,paddingVertical:Z?6:4,fontSize:Z?14:12,color:U,backgroundColor:N.backgroundAlt,borderColor:N.border}]}),/* @__PURE__ */T(S,{style:{color:N.textMuted,fontSize:12},children:["/ ",n.length]})]}),/* @__PURE__ */W(rr,{onPress:()=>{const e=ie?ee:ce;for(const n of Object.keys(r)){const e=Number(n);a(e,r[e])}const{yesPicks:t,noPicks:o}=Dn(n,e);for(const n of t)a(n.id,"yes");for(const n of o)a(n.id,"no");s?.()}})]})}),n.length>0&&I?/* @__PURE__ */W(Dr,{variant:I,groups:De,racing:Fe,selections:r,onToggleSelection:ye,atMax:ue,theme:j,renderTeamLogo:m,componentById:O,disableEventSwipe:E}):null,n.length>0&&!I&&/* @__PURE__ */W(z,{style:Xr.matchupList,children:Me.every(e=>1===De[e].length)?/* @__PURE__ */W(z,{style:[Xr.matchupCard,{borderColor:N.border,backgroundColor:G},X],children:Me.map((e,t)=>{const n=De[e][0],o="yes"===r[n.id],i="no"===r[n.id],l=n.id in r,a=ue&&!l,c=0===t,s=t===Me.length-1;/* @__PURE__ */
145
+ return T(z,{style:{borderTopColor:N.border,borderTopWidth:c?0:1,opacity:a?.45:1},children:[/* @__PURE__ */T(z,{style:{paddingHorizontal:16,paddingVertical:Z?12:10,backgroundColor:V,borderTopLeftRadius:c?Yr:0,borderTopRightRadius:c?Yr:0},children:[/* @__PURE__ */W(z,{style:{minWidth:0},children:/* @__PURE__ */W(Ur,{matchup:e,renderTeamLogo:m,altText:U,mutedColor:N.textAltMuted??N.textMuted??U})}),n.commence_time&&/* @__PURE__ */W(S,{style:{color:N.textAltMuted??N.textMuted,fontSize:11,opacity:.7,marginTop:2},children:_t(n.commence_time)})]}),/* @__PURE__ */T(z,{style:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",gap:12,paddingHorizontal:16,paddingVertical:Z?14:12,backgroundColor:Y,borderTopWidth:1,borderTopColor:N.border,borderBottomLeftRadius:s?Yr:0,borderBottomRightRadius:s?Yr:0},children:[/* @__PURE__ */T(z,{style:{flex:1,minWidth:0,flexDirection:"row",alignItems:"flex-start",gap:8},children:[Nr(n,m,e),/* @__PURE__ */W(Kr,{prop:n,colors:N,componentById:O})]}),/* @__PURE__ */W(dt,{theme:j,size:"sm",value:o?"yes":i?"no":null,onYes:()=>ye(n.id,"yes"),onNo:()=>ye(n.id,"no"),disabled:a})]})]},n.id)})}):Me.map(e=>{const t=De[e],n=te.has(e),o=t.filter(e=>e.id in r).length,i=t[0]?.commence_time;/* @__PURE__ */
146
+ return T(z,{style:[Xr.matchupCard,{borderColor:N.border,backgroundColor:G},X],children:[/* @__PURE__ */T(B,{onPress:()=>{return t=e,oe(e=>{const n=new Set(e);return n.has(t)?n.delete(t):n.add(t),n});var t},style:[Xr.matchupHeader,{backgroundColor:V,borderTopLeftRadius:Yr,borderTopRightRadius:Yr,borderBottomLeftRadius:n?0:Yr,borderBottomRightRadius:n?0:Yr}],children:[/* @__PURE__ */T(z,{style:Xr.matchupHeaderLeft,children:[/* @__PURE__ */W(A,{width:18,height:18,viewBox:"0 0 24 24",style:{flexShrink:0,transform:[{rotate:n?"180deg":"0deg"}]},children:/* @__PURE__ */W(H,{d:"m6 9 6 6 6-6",stroke:N.textAltMuted??N.textMuted,strokeWidth:2.5,strokeLinecap:"round",strokeLinejoin:"round",fill:"none"})}),/* @__PURE__ */T(z,{style:Xr.matchupTeamWrapper,children:[/* @__PURE__ */W(Ur,{matchup:e,renderTeamLogo:m,altText:U,mutedColor:N.textAltMuted??N.textMuted??U,size:"md"}),i&&/* @__PURE__ */W(S,{style:{color:N.textAltMuted??N.textMuted,fontSize:12,opacity:.7,marginTop:2,textAlign:"left"},children:_t(i)})]})]}),/* @__PURE__ */W(z,{style:Xr.matchupHeaderRight,children:o>0&&/* @__PURE__ */W(z,{style:[Xr.answeredBadge,{backgroundColor:N.successBg}],children:/* @__PURE__ */T(S,{style:{color:N.successText,fontSize:12,fontWeight:"500"},children:[o,"/",t.length]})})})]}),n&&/* @__PURE__ */W(z,{children:/* @__PURE__ */W(v,{children:t.map((n,o)=>{const i="yes"===r[n.id],l="no"===r[n.id],a=n.id in r,c=ue&&!a,s=o===t.length-1;/* @__PURE__ */
147
+ return W(z,{style:{paddingHorizontal:16,paddingVertical:Z?14:12,backgroundColor:Y,borderTopColor:N.border,borderTopWidth:0===o?0:1,opacity:c?.45:1,borderBottomLeftRadius:s?Yr:0,borderBottomRightRadius:s?Yr:0},children:/* @__PURE__ */T(z,{style:{flexDirection:"row",flexWrap:"wrap",justifyContent:"space-between",alignItems:"flex-start",columnGap:Z?16:8,rowGap:Z?16:8},children:[/* @__PURE__ */T(z,{style:{flex:1,minWidth:128,flexDirection:"row",alignItems:"flex-start",gap:8},children:[Nr(n,m,e),/* @__PURE__ */W(Kr,{prop:n,colors:N,size:"md",componentById:O})]}),/* @__PURE__ */W(dt,{theme:j,size:"sm",value:i?"yes":l?"no":null,onYes:()=>ye(n.id,"yes"),onNo:()=>ye(n.id,"no"),disabled:c})]})},n.id)})})})]},e)})}),0===n.length&&/* @__PURE__ */W(z,{style:Xr.centered,children:/* @__PURE__ */W(S,{style:{color:N.textMuted},children:"No propositions available at this time"})}),!p&&/* @__PURE__ */T(z,{style:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",gap:12,borderTopWidth:1,borderTopColor:N.border,backgroundColor:G,marginHorizontal:Z?-24:-16,paddingHorizontal:Z?24:16,paddingVertical:Z?16:12},children:[/* @__PURE__ */W(Vr,{theme:j,variant:"secondary",onPress:d,children:"Back"}),/* @__PURE__ */W(z,{style:{flexDirection:"row",alignItems:"center",gap:Z?12:8},children:/* @__PURE__ */W(Vr,{theme:j,variant:"primary",disabled:!ge,onPress:s,children:"Wager"})})]})]})}var Xr=k.create({centered:{alignItems:"center",justifyContent:"center",padding:32,flexDirection:"row"},filterHeaderRow:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",gap:8},filterToggleRow:{flexDirection:"row",alignItems:"center",gap:8},filterToggle:{flexDirection:"row",alignItems:"center",gap:6,borderWidth:1,borderRadius:999,paddingHorizontal:12,paddingVertical:6},topBar:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",flexWrap:"wrap",gap:8},quickPickRow:{flexDirection:"row",alignItems:"center",flexShrink:0},quickPickCountRow:{flexDirection:"row",alignItems:"center",gap:4},quickPickInput:{borderRadius:8,borderWidth:2,fontWeight:"600",textAlign:"center"},matchupList:{gap:16},matchupCard:{borderRadius:Yr,borderWidth:1,overflow:"visible"},matchupHeader:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",paddingHorizontal:16,paddingVertical:14},matchupHeaderLeft:{flexDirection:"row",alignItems:"center",gap:8,flex:1,minWidth:0},matchupTeamWrapper:{flex:1,minWidth:0},matchupTeamsRow:{flexDirection:"row",flexWrap:"wrap",alignItems:"center",columnGap:6,rowGap:4},matchupTeamsStacked:{flexDirection:"row",alignItems:"center",gap:6,alignSelf:"stretch"},teamLogoRowWrap:{flexDirection:"row",alignItems:"center",gap:4,flexShrink:1,minWidth:0},matchupHeaderRight:{flexDirection:"row",alignItems:"center",gap:8,marginLeft:8,flexShrink:0},answeredBadge:{paddingHorizontal:8,paddingVertical:2,borderRadius:999}});function Qr({theme:e,variant:t,disabled:n,onPress:o,children:i}){const r=e.colors,[l,a]=c(!1),s="primary"===t?{bg:r.buttonPrimary,bgHover:r.buttonPrimaryHover,fg:r.buttonPrimaryText,border:r.buttonPrimary}:{bg:r.buttonSecondary,bgHover:r.buttonSecondaryHover,fg:r.buttonSecondaryText,border:r.border};/* @__PURE__ */
148
+ return W(B,{onPress:o,disabled:n,activeOpacity:.85,...rt(()=>a(!0),()=>a(!1)),style:{minHeight:44,paddingHorizontal:16,borderRadius:12,borderWidth:1,borderColor:s.border,backgroundColor:l&&!n?s.bgHover:s.bg,opacity:n?.5:1,alignItems:"center",justifyContent:"center",flexDirection:"row"},children:/* @__PURE__ */W(S,{style:{color:s.fg,fontSize:14,fontWeight:"500",lineHeight:17},children:i})})}function Jr({propositions:e,selections:t,onToggleSelection:n,onNext:o,onBack:i,theme:r,colorScheme:l,hideActions:a=!1,renderTeamLogo:s,allowAnswerToggle:d=!0,gameName:h,potentialPayout:u,defaultExpanded:g=!1,addMorePicks:f}){const p=je(r,l),y=p.colors,m=be(p),b=Ge(p),w=se(p),x=y.textAlt??y.text,{width:k}=F(),C=k>=640,v=function(e){return{shadowColor:"#000",shadowOpacity:"dark"===e.colorScheme?.4:.12,shadowRadius:12,shadowOffset:{width:0,height:6},elevation:2}}(p),[R,L]=c(null),[D,M]=c(g),P=e.filter(e=>e.id in t),O=P.length,I=Rn(P),E=y.matchupHeader??we(p),j=xe(p),N=C?16:12;/* @__PURE__ */
149
149
  return T(z,{style:{gap:C?24:16,paddingBottom:64},children:[
150
- /* @__PURE__ */T(z,{style:[Kr.section,{padding:C?24:16,backgroundColor:m,borderColor:y.border},v],children:[
150
+ /* @__PURE__ */T(z,{style:[$r.section,{padding:C?24:16,backgroundColor:m,borderColor:y.border},v],children:[
151
151
  /* @__PURE__ */T(B,{onPress:()=>M(e=>!e),accessibilityRole:"button",accessibilityState:{expanded:D},style:{flexDirection:"row",justifyContent:"space-between",alignItems:"center",gap:12},children:[/* @__PURE__ */T(z,{style:{flexDirection:"row",alignItems:"center",gap:8,flex:1,minWidth:0},children:[/* @__PURE__ */W(A,{width:18,height:18,viewBox:"0 0 24 24",style:{flexShrink:0,transform:[{rotate:D?"180deg":"0deg"}]},children:/* @__PURE__ */W(H,{d:"m6 9 6 6 6-6",stroke:y.textMuted,strokeWidth:2.5,strokeLinecap:"round",strokeLinejoin:"round",fill:"none"})}),/* @__PURE__ */T(z,{style:{flex:1,minWidth:0},children:[/* @__PURE__ */T(z,{style:{flexDirection:"row",alignItems:"center",gap:8},children:[/* @__PURE__ */W(S,{style:{fontSize:C?18:16,fontWeight:"600",color:w,fontFamily:b},children:"Your Selections"}),/* @__PURE__ */W(z,{style:{backgroundColor:y.primary,paddingHorizontal:6,paddingVertical:2,borderRadius:999},children:/* @__PURE__ */W(S,{style:{color:y.primaryText,fontSize:12,fontWeight:"600"},children:O})})]}),h&&/* @__PURE__ */W(S,{numberOfLines:1,style:{color:y.textMuted,fontSize:14,marginTop:2},children:h})]})]}),null!=u&&u>0&&/* @__PURE__ */T(z,{style:{alignItems:"flex-end",flexShrink:0},children:[/* @__PURE__ */W(S,{style:{color:y.textMuted,fontSize:10,textTransform:"uppercase",letterSpacing:.25},children:"Potential Payout"}),/* @__PURE__ */W(S,{style:{color:w,fontSize:14,fontWeight:"700"},children:$t(u)})]})]}),f&&f.remaining>0&&/* @__PURE__ */T(z,{style:{marginTop:N,padding:12,borderRadius:8,borderWidth:1,borderColor:`${y.primary}30`,backgroundColor:`${y.primary}08`,flexDirection:"row",alignItems:"center",justifyContent:"space-between",gap:12},children:[/* @__PURE__ */T(S,{style:{flex:1,color:y.textMuted,fontSize:12},children:[1===f.remaining?"Add ":"Add up to ",
152
152
  /* @__PURE__ */T(S,{style:{color:y.primary,fontWeight:"700"},children:[f.remaining," more pick",1!==f.remaining?"s":""]}),null!=f.potentialPayout&&f.potentialPayout>0&&/* @__PURE__ */T(S,{children:[" ","to win up to"," ",
153
- /* @__PURE__ */W(S,{style:{color:w,fontWeight:"700"},children:$t(f.potentialPayout)})," ","with ",f.max," picks"]})]}),/* @__PURE__ */W(B,{onPress:()=>f.onAdd(),style:{flexShrink:0,paddingHorizontal:12,paddingVertical:6,borderRadius:8,backgroundColor:y.buttonPrimary},children:/* @__PURE__ */W(S,{style:{color:y.buttonPrimaryText,fontSize:12,fontWeight:"600"},children:"Add picks"})})]}),D&&(0===P.length?/* @__PURE__ */W(z,{style:[Kr.emptyState,{marginTop:N}],children:/* @__PURE__ */W(S,{style:{color:y.textMuted},children:"No selections made yet"})}):/* @__PURE__ */W(z,{style:{gap:C?12:8,marginTop:N},children:I.map(e=>/* @__PURE__ */T(z,{style:{borderRadius:8,overflow:"hidden",borderWidth:1,borderColor:y.border},children:[e.key?/* @__PURE__ */T(z,{style:{paddingHorizontal:12,paddingVertical:8,backgroundColor:E},children:[/* @__PURE__ */W(jr,{matchup:e.key,renderTeamLogo:s,altText:x,mutedColor:y.textAltMuted??y.textMuted??x}),e.props[0].commence_time?/* @__PURE__ */W(S,{style:[Kr.propTime,{color:y.textAltMuted??y.textMuted}],children:_t(e.props[0].commence_time)}):null]}):null,e.props.map((o,r)=>{const l=t[o.id],a="yes"===l,c="no"===l;/* @__PURE__ */
154
- return T(z,{style:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",gap:C?12:8,paddingHorizontal:12,paddingVertical:C?12:10,backgroundColor:j,borderTopWidth:e.key||r>0?1:0,borderTopColor:y.border},children:[/* @__PURE__ */T(z,{style:{flex:1,minWidth:0,flexDirection:"row",alignItems:"flex-start",gap:8},children:[Hr(o,s,e.key),/* @__PURE__ */W(S,{style:{flex:1,minWidth:0,color:x,fontSize:14,lineHeight:19},children:o.description})]}),/* @__PURE__ */T(z,{style:Kr.rightControls,children:[d?/* @__PURE__ */W(dt,{theme:p,size:"sm",value:a?"yes":c?"no":null,onYes:()=>n(o.id,"yes"),onNo:()=>n(o.id,"no")}):l&&/* @__PURE__ */W(ht,{theme:p,size:"sm",value:"yes"===l?"yes":"no"}),/* @__PURE__ */W(B,{onPress:()=>{n(o.id,t[o.id]),i()},accessibilityLabel:"Remove selection",...rt(()=>L(o.id),()=>L(e=>e===o.id?null:e)),style:[Kr.removeButton,{backgroundColor:"transparent"}],children:/* @__PURE__ */W(A,{width:12,height:12,viewBox:"0 0 24 24",children:/* @__PURE__ */W(H,{d:"M6 18L18 6M6 6l12 12",stroke:R===o.id?y.error:y.textAltMuted??y.textMuted,strokeWidth:2.5,strokeLinecap:"round",strokeLinejoin:"round",fill:"none"})})})]})]},o.id)})]},e.key??`solo-${e.props[0].id}`))}))]}),
155
- /* @__PURE__ */W(z,{style:[Kr.section,{padding:C?24:16,backgroundColor:m,borderColor:y.border},v],children:/* @__PURE__ */T(z,{style:Kr.summaryRow,children:[/* @__PURE__ */W(S,{style:{color:y.textMuted,fontSize:14},children:"Total Selections"}),/* @__PURE__ */W(S,{style:{color:y.text,fontSize:14,fontWeight:"600"},children:P.length})]})}),!a&&/* @__PURE__ */T(z,{style:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",gap:12,borderTopWidth:1,borderTopColor:y.border,backgroundColor:y.background,marginHorizontal:C?-24:-16,paddingHorizontal:C?24:16,paddingVertical:C?16:12},children:[/* @__PURE__ */W(Ur,{theme:p,variant:"secondary",onPress:i,children:"Back"}),/* @__PURE__ */W(Ur,{theme:p,variant:"primary",disabled:0===P.length,onPress:o,children:"Place bet"})]})]})}var Kr=k.create({section:{borderRadius:12,borderWidth:1},emptyState:{alignItems:"center",paddingVertical:32},selectionInfo:{flex:1,minWidth:0},teamsRow:{flexDirection:"row",flexWrap:"wrap",alignItems:"center",columnGap:6,rowGap:2},teamLogoRow:{flexDirection:"row",alignItems:"center",gap:4},teamText:{fontWeight:"600"},vsSmall:{fontSize:12,fontWeight:"400"},propDesc:{fontSize:14,marginTop:4},propTime:{fontSize:12,opacity:.7,marginTop:2},rightControls:{flexDirection:"row",alignItems:"center",gap:8},removeButton:{width:20,height:20,borderRadius:10,alignItems:"center",justifyContent:"center"},summaryRow:{flexDirection:"row",justifyContent:"space-between"}});function Zr({game:t,propositions:n,selections:o,onToggleSelection:i,onRemoveSelection:r,onSubmit:l,onBack:a,loading:c,error:s,expectedCorrect:h,onExpectedCorrectChange:u,betAmount:g,onBetAmountChange:f,theme:p,colorScheme:y,hideActions:m=!1,winningCounts:w,payouts:x,renderTeamLogo:k,showCustomAmount:R=!1,betAmountLocked:L=!1,betAmountLockedNote:D,canSubmit:M,authenticated:P=!0,userBalance:O,onRecharge:I,boostBanner:E}){const j=je(p,y),N=j.colors,G=be(j),Y=Ge(j),V=se(j),U=de(j),q=he(j),K=N.textAlt??N.text,{width:Z}=F(),X=Z>=640,Q="dark"===j.colorScheme,J=n.length,$=t.min_bet??0,_=Math.max($,.01),ee=t.max_bet??null,te=[5,10,20,50,100,200,500].filter(e=>e>=_&&(null===ee||e<=ee)).slice(0,4),ne={};for(let e=0;e<=J;e++)ne[e]=g*e;const oe=x??ne,ie=oe[h]??0,re=hn(t),le=re.enabled&&h===J,[ae,ce]=e.useState(null),[ue,ge]=e.useState(!0),[fe,pe]=e.useState(!1),ye=c||g<_||!1===M,me=null!=O&&g>O,ke=m&&!!l&&P,Se=o?n.filter(e=>e.id in o):n,Ce=Rn(Se),Be=N.matchupHeader??we(j),ze=xe(j),Fe=Object.entries(oe).map(([e,t])=>({correct:Number(e),payout:t})).filter(e=>e.correct>0&&e.payout>0).sort((e,t)=>e.correct-t.correct),ve=1===Fe.length?Fe[0].correct:null;e.useEffect(()=>{null!==ve&&h!==ve&&u(ve)},[ve]);const We={shadowColor:"#000",shadowOpacity:Q?.4:.12,shadowRadius:12,shadowOffset:{width:0,height:6},elevation:2};/* @__PURE__ */
153
+ /* @__PURE__ */W(S,{style:{color:w,fontWeight:"700"},children:$t(f.potentialPayout)})," ","with ",f.max," picks"]})]}),/* @__PURE__ */W(B,{onPress:()=>f.onAdd(),style:{flexShrink:0,paddingHorizontal:12,paddingVertical:6,borderRadius:8,backgroundColor:y.buttonPrimary},children:/* @__PURE__ */W(S,{style:{color:y.buttonPrimaryText,fontSize:12,fontWeight:"600"},children:"Add picks"})})]}),D&&(0===P.length?/* @__PURE__ */W(z,{style:[$r.emptyState,{marginTop:N}],children:/* @__PURE__ */W(S,{style:{color:y.textMuted},children:"No selections made yet"})}):/* @__PURE__ */W(z,{style:{gap:C?12:8,marginTop:N},children:I.map(e=>/* @__PURE__ */T(z,{style:{borderRadius:8,overflow:"hidden",borderWidth:1,borderColor:y.border},children:[e.key?/* @__PURE__ */T(z,{style:{paddingHorizontal:12,paddingVertical:8,backgroundColor:E},children:[/* @__PURE__ */W(Ur,{matchup:e.key,renderTeamLogo:s,altText:x,mutedColor:y.textAltMuted??y.textMuted??x}),e.props[0].commence_time?/* @__PURE__ */W(S,{style:[$r.propTime,{color:y.textAltMuted??y.textMuted}],children:_t(e.props[0].commence_time)}):null]}):null,e.props.map((o,r)=>{const l=t[o.id],a="yes"===l,c="no"===l;/* @__PURE__ */
154
+ return T(z,{style:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",gap:C?12:8,paddingHorizontal:12,paddingVertical:C?12:10,backgroundColor:j,borderTopWidth:e.key||r>0?1:0,borderTopColor:y.border},children:[/* @__PURE__ */T(z,{style:{flex:1,minWidth:0,flexDirection:"row",alignItems:"flex-start",gap:8},children:[Nr(o,s,e.key),/* @__PURE__ */W(S,{style:{flex:1,minWidth:0,color:x,fontSize:14,lineHeight:19},children:o.description})]}),/* @__PURE__ */T(z,{style:$r.rightControls,children:[d?/* @__PURE__ */W(dt,{theme:p,size:"sm",value:a?"yes":c?"no":null,onYes:()=>n(o.id,"yes"),onNo:()=>n(o.id,"no")}):l&&/* @__PURE__ */W(ht,{theme:p,size:"sm",value:"yes"===l?"yes":"no"}),/* @__PURE__ */W(B,{onPress:()=>{n(o.id,t[o.id]),i()},accessibilityLabel:"Remove selection",...rt(()=>L(o.id),()=>L(e=>e===o.id?null:e)),style:[$r.removeButton,{backgroundColor:"transparent"}],children:/* @__PURE__ */W(A,{width:12,height:12,viewBox:"0 0 24 24",children:/* @__PURE__ */W(H,{d:"M6 18L18 6M6 6l12 12",stroke:R===o.id?y.error:y.textAltMuted??y.textMuted,strokeWidth:2.5,strokeLinecap:"round",strokeLinejoin:"round",fill:"none"})})})]})]},o.id)})]},e.key??`solo-${e.props[0].id}`))}))]}),
155
+ /* @__PURE__ */W(z,{style:[$r.section,{padding:C?24:16,backgroundColor:m,borderColor:y.border},v],children:/* @__PURE__ */T(z,{style:$r.summaryRow,children:[/* @__PURE__ */W(S,{style:{color:y.textMuted,fontSize:14},children:"Total Selections"}),/* @__PURE__ */W(S,{style:{color:y.text,fontSize:14,fontWeight:"600"},children:P.length})]})}),!a&&/* @__PURE__ */T(z,{style:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",gap:12,borderTopWidth:1,borderTopColor:y.border,backgroundColor:y.background,marginHorizontal:C?-24:-16,paddingHorizontal:C?24:16,paddingVertical:C?16:12},children:[/* @__PURE__ */W(Qr,{theme:p,variant:"secondary",onPress:i,children:"Back"}),/* @__PURE__ */W(Qr,{theme:p,variant:"primary",disabled:0===P.length,onPress:o,children:"Place bet"})]})]})}var $r=k.create({section:{borderRadius:12,borderWidth:1},emptyState:{alignItems:"center",paddingVertical:32},selectionInfo:{flex:1,minWidth:0},teamsRow:{flexDirection:"row",flexWrap:"wrap",alignItems:"center",columnGap:6,rowGap:2},teamLogoRow:{flexDirection:"row",alignItems:"center",gap:4},teamText:{fontWeight:"600"},vsSmall:{fontSize:12,fontWeight:"400"},propDesc:{fontSize:14,marginTop:4},propTime:{fontSize:12,opacity:.7,marginTop:2},rightControls:{flexDirection:"row",alignItems:"center",gap:8},removeButton:{width:20,height:20,borderRadius:10,alignItems:"center",justifyContent:"center"},summaryRow:{flexDirection:"row",justifyContent:"space-between"}});function _r({game:t,propositions:n,selections:o,onToggleSelection:i,onRemoveSelection:r,onSubmit:l,onBack:a,loading:c,error:s,expectedCorrect:h,onExpectedCorrectChange:u,betAmount:g,onBetAmountChange:f,theme:p,colorScheme:y,hideActions:m=!1,winningCounts:w,payouts:x,renderTeamLogo:k,showCustomAmount:R=!1,betAmountLocked:L=!1,betAmountLockedNote:D,canSubmit:M,authenticated:P=!0,userBalance:O,onRecharge:I,boostBanner:E}){const j=je(p,y),N=j.colors,G=be(j),Y=Ge(j),V=se(j),U=de(j),q=he(j),K=N.textAlt??N.text,{width:Z}=F(),X=Z>=640,Q="dark"===j.colorScheme,J=n.length,$=t.min_bet??0,_=Math.max($,.01),ee=t.max_bet??null,te=[5,10,20,50,100,200,500].filter(e=>e>=_&&(null===ee||e<=ee)).slice(0,4),ne={};for(let e=0;e<=J;e++)ne[e]=g*e;const oe=x??ne,ie=oe[h]??0,re=hn(t),le=re.enabled&&h===J,[ae,ce]=e.useState(null),[ue,ge]=e.useState(!0),[fe,pe]=e.useState(!1),ye=c||g<_||!1===M,me=null!=O&&g>O,ke=m&&!!l&&P,Se=o?n.filter(e=>e.id in o):n,Ce=Rn(Se),Be=N.matchupHeader??we(j),ze=xe(j),Fe=Object.entries(oe).map(([e,t])=>({correct:Number(e),payout:t})).filter(e=>e.correct>0&&e.payout>0).sort((e,t)=>e.correct-t.correct),ve=1===Fe.length?Fe[0].correct:null;e.useEffect(()=>{null!==ve&&h!==ve&&u(ve)},[ve]);const We={shadowColor:"#000",shadowOpacity:Q?.4:.12,shadowRadius:12,shadowOffset:{width:0,height:6},elevation:2};/* @__PURE__ */
156
156
  return T(z,{style:{gap:X?16:12,paddingBottom:64},children:[E,
157
- /* @__PURE__ */T(z,{style:[Xr.section,We,{padding:X?20:16,backgroundColor:G,borderColor:N.border}],children:[
158
- /* @__PURE__ */T(z,{style:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",gap:12},children:[/* @__PURE__ */T(B,{onPress:()=>ge(e=>!e),accessibilityRole:"button",accessibilityState:{expanded:ue},accessibilityLabel:ue?"Hide selections":"Show selections",testID:"entry-submission-selections-toggle",style:{flexDirection:"row",alignItems:"center",gap:8,flex:1},activeOpacity:.7,children:[/* @__PURE__ */W(z,{style:{transform:[{rotate:ue?"180deg":"0deg"}]},children:/* @__PURE__ */W(A,{width:18,height:18,viewBox:"0 0 24 24",fill:"none",children:/* @__PURE__ */W(H,{d:"m6 9 6 6 6-6",stroke:N.textMuted,strokeWidth:2.5,strokeLinecap:"round",strokeLinejoin:"round"})})}),/* @__PURE__ */W(S,{style:{fontSize:X?16:14,fontWeight:"600",color:V,fontFamily:Y},children:ue?"Hide Selections":"Review Selections"})]}),/* @__PURE__ */W(z,{style:{paddingHorizontal:8,paddingVertical:2,borderRadius:999,flexShrink:0,backgroundColor:`${N.primary}15`},children:/* @__PURE__ */T(S,{style:{color:N.primary,fontSize:12,fontWeight:"600"},children:[Se.length," pick",1!==Se.length?"s":""]})})]}),!ue&&/* @__PURE__ */W(S,{style:{color:N.textMuted,fontSize:12,marginTop:8},children:"Tap to show your picks"}),ue&&/* @__PURE__ */W(z,{style:{gap:8,marginTop:12},children:Ce.map(e=>/* @__PURE__ */T(z,{style:{borderRadius:8,overflow:"hidden",borderWidth:1,borderColor:N.border},children:[e.key?/* @__PURE__ */T(z,{style:{paddingHorizontal:12,paddingVertical:8,backgroundColor:Be},children:[/* @__PURE__ */W(jr,{matchup:e.key,renderTeamLogo:k,altText:K,mutedColor:N.textAltMuted??N.textMuted??K}),e.props[0].commence_time?/* @__PURE__ */W(S,{style:{color:N.textAltMuted??N.textMuted,fontSize:11,marginTop:2,opacity:.7},children:_t(e.props[0].commence_time)}):null]}):null,e.props.map((t,n)=>{const l=o?.[t.id],a="yes"===l,c="no"===l,s=!!i;/* @__PURE__ */
159
- return T(z,{style:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",gap:8,paddingVertical:8,paddingHorizontal:12,backgroundColor:ze,borderTopWidth:e.key||n>0?1:0,borderTopColor:N.border},children:[/* @__PURE__ */T(z,{style:{flex:1,minWidth:0,flexDirection:"row",alignItems:"flex-start",gap:8},children:[Hr(t,k,e.key),/* @__PURE__ */W(S,{style:{color:K,fontSize:X?14:12,flexShrink:1},children:t.description})]}),/* @__PURE__ */T(z,{style:{flexDirection:"row",alignItems:"center",gap:6,flexShrink:0},children:[s?/* @__PURE__ */W(dt,{theme:j,size:"xs",value:a?"yes":c?"no":null,onYes:()=>i(t.id,"yes"),onNo:()=>i(t.id,"no")}):l?/* @__PURE__ */W(ht,{theme:j,size:"sm",value:"yes"===l?"yes":"no",style:{flexShrink:0}}):null,ue&&r&&/* @__PURE__ */W(b,{onPress:()=>{l&&i?.(t.id,l),r(t.id)},...rt(()=>ce(t.id),()=>ce(null)),accessibilityRole:"button",accessibilityLabel:"Remove selection",style:{flexShrink:0,width:44,height:44,alignItems:"center",justifyContent:"center",backgroundColor:"transparent"},children:/* @__PURE__ */W(z,{style:{width:26,height:26,borderRadius:13,alignItems:"center",justifyContent:"center",backgroundColor:ae===t.id?N.error:"transparent"},children:/* @__PURE__ */W(A,{width:14,height:14,viewBox:"0 0 24 24",fill:"none",children:/* @__PURE__ */W(H,{d:"M6 18L18 6M6 6l12 12",stroke:ae===t.id?"#fff":N.textMuted,strokeWidth:2.5,strokeLinecap:"round",strokeLinejoin:"round"})})})})]})]},t.id)})]},e.key??`solo-${e.props[0].id}`))})]}),ke&&/* @__PURE__ */T(z,{testID:"entry-submission-scroll-hint",style:{flexDirection:"row",alignItems:"center",gap:6,marginTop:-4},children:[/* @__PURE__ */W(S,{style:{color:N.textMuted,fontSize:X?14:12,fontWeight:"500"},children:"↓"}),/* @__PURE__ */W(S,{style:{color:N.textMuted,fontSize:X?14:12,fontWeight:"500",flex:1},children:"Scroll down to set your bet and place your entry"})]}),P?/* @__PURE__ */T(v,{children:[/* @__PURE__ */T(z,{style:[Xr.section,We,{padding:X?24:16,backgroundColor:G,borderColor:N.border}],children:[
157
+ /* @__PURE__ */T(z,{style:[el.section,We,{padding:X?20:16,backgroundColor:G,borderColor:N.border}],children:[
158
+ /* @__PURE__ */T(z,{style:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",gap:12},children:[/* @__PURE__ */T(B,{onPress:()=>ge(e=>!e),accessibilityRole:"button",accessibilityState:{expanded:ue},accessibilityLabel:ue?"Hide selections":"Show selections",testID:"entry-submission-selections-toggle",style:{flexDirection:"row",alignItems:"center",gap:8,flex:1},activeOpacity:.7,children:[/* @__PURE__ */W(z,{style:{transform:[{rotate:ue?"180deg":"0deg"}]},children:/* @__PURE__ */W(A,{width:18,height:18,viewBox:"0 0 24 24",fill:"none",children:/* @__PURE__ */W(H,{d:"m6 9 6 6 6-6",stroke:N.textMuted,strokeWidth:2.5,strokeLinecap:"round",strokeLinejoin:"round"})})}),/* @__PURE__ */W(S,{style:{fontSize:X?16:14,fontWeight:"600",color:V,fontFamily:Y},children:ue?"Hide Selections":"Review Selections"})]}),/* @__PURE__ */W(z,{style:{paddingHorizontal:8,paddingVertical:2,borderRadius:999,flexShrink:0,backgroundColor:`${N.primary}15`},children:/* @__PURE__ */T(S,{style:{color:N.primary,fontSize:12,fontWeight:"600"},children:[Se.length," pick",1!==Se.length?"s":""]})})]}),!ue&&/* @__PURE__ */W(S,{style:{color:N.textMuted,fontSize:12,marginTop:8},children:"Tap to show your picks"}),ue&&/* @__PURE__ */W(z,{style:{gap:8,marginTop:12},children:Ce.map(e=>/* @__PURE__ */T(z,{style:{borderRadius:8,overflow:"hidden",borderWidth:1,borderColor:N.border},children:[e.key?/* @__PURE__ */T(z,{style:{paddingHorizontal:12,paddingVertical:8,backgroundColor:Be},children:[/* @__PURE__ */W(Ur,{matchup:e.key,renderTeamLogo:k,altText:K,mutedColor:N.textAltMuted??N.textMuted??K}),e.props[0].commence_time?/* @__PURE__ */W(S,{style:{color:N.textAltMuted??N.textMuted,fontSize:11,marginTop:2,opacity:.7},children:_t(e.props[0].commence_time)}):null]}):null,e.props.map((t,n)=>{const l=o?.[t.id],a="yes"===l,c="no"===l,s=!!i;/* @__PURE__ */
159
+ return T(z,{style:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",gap:8,paddingVertical:8,paddingHorizontal:12,backgroundColor:ze,borderTopWidth:e.key||n>0?1:0,borderTopColor:N.border},children:[/* @__PURE__ */T(z,{style:{flex:1,minWidth:0,flexDirection:"row",alignItems:"flex-start",gap:8},children:[Nr(t,k,e.key),/* @__PURE__ */W(S,{style:{color:K,fontSize:X?14:12,flexShrink:1},children:t.description})]}),/* @__PURE__ */T(z,{style:{flexDirection:"row",alignItems:"center",gap:6,flexShrink:0},children:[s?/* @__PURE__ */W(dt,{theme:j,size:"xs",value:a?"yes":c?"no":null,onYes:()=>i(t.id,"yes"),onNo:()=>i(t.id,"no")}):l?/* @__PURE__ */W(ht,{theme:j,size:"sm",value:"yes"===l?"yes":"no",style:{flexShrink:0}}):null,ue&&r&&/* @__PURE__ */W(b,{onPress:()=>{l&&i?.(t.id,l),r(t.id)},...rt(()=>ce(t.id),()=>ce(null)),accessibilityRole:"button",accessibilityLabel:"Remove selection",style:{flexShrink:0,width:44,height:44,alignItems:"center",justifyContent:"center",backgroundColor:"transparent"},children:/* @__PURE__ */W(z,{style:{width:26,height:26,borderRadius:13,alignItems:"center",justifyContent:"center",backgroundColor:ae===t.id?N.error:"transparent"},children:/* @__PURE__ */W(A,{width:14,height:14,viewBox:"0 0 24 24",fill:"none",children:/* @__PURE__ */W(H,{d:"M6 18L18 6M6 6l12 12",stroke:ae===t.id?"#fff":N.textMuted,strokeWidth:2.5,strokeLinecap:"round",strokeLinejoin:"round"})})})})]})]},t.id)})]},e.key??`solo-${e.props[0].id}`))})]}),ke&&/* @__PURE__ */T(z,{testID:"entry-submission-scroll-hint",style:{flexDirection:"row",alignItems:"center",gap:6,marginTop:-4},children:[/* @__PURE__ */W(S,{style:{color:N.textMuted,fontSize:X?14:12,fontWeight:"500"},children:"↓"}),/* @__PURE__ */W(S,{style:{color:N.textMuted,fontSize:X?14:12,fontWeight:"500",flex:1},children:"Scroll down to set your bet and place your entry"})]}),P?/* @__PURE__ */T(v,{children:[/* @__PURE__ */T(z,{style:[el.section,We,{padding:X?24:16,backgroundColor:G,borderColor:N.border}],children:[
160
160
  /* @__PURE__ */T(z,{style:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",marginBottom:X?16:12},children:[/* @__PURE__ */W(S,{style:{fontSize:X?18:16,fontWeight:"600",color:V,fontFamily:Y},children:"How much are you betting?"}),null!=O&&/* @__PURE__ */T(S,{style:{fontSize:12,fontWeight:"600",color:N.textMuted},children:["Balance: ",/* @__PURE__ */W(S,{style:{color:me?N.error:N.success},children:$t(O)})]})]}),me&&/* @__PURE__ */T(z,{style:{marginBottom:12,paddingHorizontal:12,paddingVertical:8,borderRadius:8,backgroundColor:N.errorBg??`${N.error}15`,flexDirection:"row",alignItems:"center",justifyContent:"space-between",gap:12},children:[/* @__PURE__ */T(S,{style:{flex:1,fontSize:12,fontWeight:"500",color:N.errorText??N.error},children:["Insufficient balance. Your bet of ",$t(g)," exceeds your available ",$t(O),"."]}),I&&/* @__PURE__ */W(B,{onPress:I,style:{paddingHorizontal:12,paddingVertical:4,borderRadius:6,backgroundColor:N.error},children:/* @__PURE__ */W(S,{style:{fontSize:12,fontWeight:"600",color:N.buttonPrimaryText??"#fff"},children:"Add funds"})})]}),/* @__PURE__ */T(z,L?{style:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",gap:12,borderRadius:8,paddingHorizontal:12,paddingVertical:10,backgroundColor:N.backgroundAlt,borderWidth:1,borderColor:N.border},children:[/* @__PURE__ */W(S,{style:{fontSize:12,color:N.textMuted,flex:1},children:D??"Stake is set for this ticket."}),/* @__PURE__ */W(S,{style:{fontSize:18,fontWeight:"700",color:V,fontFamily:Y},children:$t(g)})]}:{style:{gap:16},children:[R&&/* @__PURE__ */T(z,{children:[
161
161
  /* @__PURE__ */W(S,{style:{fontSize:X?14:12,fontWeight:"600",color:U,marginBottom:8},children:"Entry amount"}),
162
162
  /* @__PURE__ */T(z,{style:{position:"relative"},children:[/* @__PURE__ */W(z,{style:{position:"absolute",left:12,top:0,bottom:0,justifyContent:"center",zIndex:1},pointerEvents:"none",children:/* @__PURE__ */W(S,{style:{color:N.textMuted},children:"$"})}),/* @__PURE__ */W(C,{keyboardType:"decimal-pad",placeholder:"Enter amount",accessibilityLabel:"Entry amount",value:g?String(g):"",onChangeText:e=>{if(""===e)return void f(0);const t=Number(e);if(!Number.isFinite(t))return;const n=Math.max(0,Math.round(100*t)/100);f(null!==ee?Math.min(n,ee):n)},onFocus:()=>pe(!0),onBlur:()=>pe(!1),style:{paddingLeft:32,paddingRight:16,paddingVertical:12,borderWidth:1,borderRadius:8,fontSize:18,fontWeight:"600",borderColor:fe?N.borderFocus??N.primary:N.border,color:K,backgroundColor:N.backgroundAlt},placeholderTextColor:N.textMuted})]}),
163
163
  /* @__PURE__ */T(S,{style:{fontSize:12,marginTop:6,color:N.textMuted},children:["Minimum bet: ",$t(_),null!==ee?` · Maximum: ${$t(ee)}`:""]}),g>0&&g<_&&/* @__PURE__ */T(S,{style:{fontSize:12,marginTop:4,color:N.error},children:["Bet amount must be at least ",$t(_)]})]}),/* @__PURE__ */T(z,{children:[(R||g>0)&&/* @__PURE__ */T(z,{style:{flexDirection:"row",justifyContent:"space-between",alignItems:"center",marginBottom:8},children:[R?/* @__PURE__ */W(S,{style:{fontSize:X?14:12,fontWeight:"600",color:U},children:"Add to bet"}):/* @__PURE__ */W(z,{}),g>0&&/* @__PURE__ */W(B,{onPress:()=>f(0),style:{paddingHorizontal:10,paddingVertical:4,borderRadius:6,backgroundColor:N.backgroundAlt,borderWidth:1.5,borderColor:N.border},children:/* @__PURE__ */W(S,{style:{color:N.textMuted,fontSize:12,fontWeight:"600"},children:"Clear bet"})})]}),/* @__PURE__ */W(z,{style:{flexDirection:"row",gap:8},children:te.map(e=>{const t=null!==ee&&g>=ee;/* @__PURE__ */
164
- return W(B,{onPress:()=>{const t=g+e;f(null!==ee?Math.min(t,ee):t)},disabled:t,style:{flex:1,minWidth:0,paddingHorizontal:12,paddingVertical:10,borderRadius:8,backgroundColor:"transparent",borderWidth:1,borderColor:N.border,opacity:t?.5:1,alignItems:"center",justifyContent:"center"},children:/* @__PURE__ */T(S,{style:{color:K,fontSize:14,fontWeight:"600"},children:["+",$t(e)]})},e)})})]})]})]}),/* @__PURE__ */W(z,{style:[Xr.section,We,{padding:X?20:16,backgroundColor:G,borderColor:N.border}],children:(()=>{const e=m&&!!l,t=/* @__PURE__ */T(v,{children:[
165
- /* @__PURE__ */T(z,{style:{flexDirection:"row",justifyContent:"space-between",alignItems:"center",marginBottom:4},children:[/* @__PURE__ */W(S,{style:{color:U,fontSize:14},children:"Bet"}),/* @__PURE__ */W(S,{style:{color:q,fontSize:14,fontWeight:"600"},children:$t(g)})]}),ie>0&&/* @__PURE__ */T(z,{style:{flexDirection:"row",flexWrap:"wrap",columnGap:8,justifyContent:"space-between",alignItems:"center",paddingTop:8,borderTopWidth:1,borderTopColor:N.border},children:[/* @__PURE__ */W(S,{style:{color:U,fontSize:14,fontWeight:"600"},children:"Potential Payout"}),/* @__PURE__ */T(z,{style:{flexDirection:"row",alignItems:"center"},children:[/* @__PURE__ */W(S,{style:{color:V,fontSize:18,fontWeight:"700"},children:$t(ie)}),le&&/* @__PURE__ */W(S,{style:{color:N.warning,fontSize:12,marginLeft:4},children:"+ Jackpot"})]})]}),re.enabled&&/* @__PURE__ */T(z,{style:[Xr.jackpotBanner,{backgroundColor:`${N.warning}08`,borderColor:`${N.warning}25`}],children:[/* @__PURE__ */T(S,{style:{color:N.warning,fontSize:12,fontWeight:"600"},children:["★ ",re.progressive?"Progressive Jackpot":"Jackpot"]}),/* @__PURE__ */W(S,{style:{color:N.warning,fontSize:14,fontWeight:"700"},children:re.progressive?re.amount>0?$t(re.amount):re.limit>0?`Up to ${$t(re.limit)}`:"Progressive":$t(re.amount)})]})]});return e?/* @__PURE__ */T(z,{style:{flexDirection:"row",alignItems:"stretch",gap:16},children:[
164
+ return W(B,{onPress:()=>{const t=g+e;f(null!==ee?Math.min(t,ee):t)},disabled:t,style:{flex:1,minWidth:0,paddingHorizontal:12,paddingVertical:10,borderRadius:8,backgroundColor:"transparent",borderWidth:1,borderColor:N.border,opacity:t?.5:1,alignItems:"center",justifyContent:"center"},children:/* @__PURE__ */T(S,{style:{color:K,fontSize:14,fontWeight:"600"},children:["+",$t(e)]})},e)})})]})]})]}),/* @__PURE__ */W(z,{style:[el.section,We,{padding:X?20:16,backgroundColor:G,borderColor:N.border}],children:(()=>{const e=m&&!!l,t=/* @__PURE__ */T(v,{children:[
165
+ /* @__PURE__ */T(z,{style:{flexDirection:"row",justifyContent:"space-between",alignItems:"center",marginBottom:4},children:[/* @__PURE__ */W(S,{style:{color:U,fontSize:14},children:"Bet"}),/* @__PURE__ */W(S,{style:{color:q,fontSize:14,fontWeight:"600"},children:$t(g)})]}),ie>0&&/* @__PURE__ */T(z,{style:{flexDirection:"row",flexWrap:"wrap",columnGap:8,justifyContent:"space-between",alignItems:"center",paddingTop:8,borderTopWidth:1,borderTopColor:N.border},children:[/* @__PURE__ */W(S,{style:{color:U,fontSize:14,fontWeight:"600"},children:"Potential Payout"}),/* @__PURE__ */T(z,{style:{flexDirection:"row",alignItems:"center"},children:[/* @__PURE__ */W(S,{style:{color:V,fontSize:18,fontWeight:"700"},children:$t(ie)}),le&&/* @__PURE__ */W(S,{style:{color:N.warning,fontSize:12,marginLeft:4},children:"+ Jackpot"})]})]}),re.enabled&&/* @__PURE__ */T(z,{style:[el.jackpotBanner,{backgroundColor:`${N.warning}08`,borderColor:`${N.warning}25`}],children:[/* @__PURE__ */T(S,{style:{color:N.warning,fontSize:12,fontWeight:"600"},children:["★ ",re.progressive?"Progressive Jackpot":"Jackpot"]}),/* @__PURE__ */W(S,{style:{color:N.warning,fontSize:14,fontWeight:"700"},children:re.progressive?re.amount>0?$t(re.amount):re.limit>0?`Up to ${$t(re.limit)}`:"Progressive":$t(re.amount)})]})]});return e?/* @__PURE__ */T(z,{style:{flexDirection:"row",alignItems:"stretch",gap:16},children:[
166
166
  /* @__PURE__ */W(z,{style:{flex:1,minWidth:0},children:t}),
167
167
  /* @__PURE__ */W(z,{style:{width:1,alignSelf:"stretch",backgroundColor:N.border}}),
168
- /* @__PURE__ */W(B,{onPress:l,disabled:ye,accessibilityState:{disabled:ye,busy:!!c},activeOpacity:.7,style:{flexShrink:0,paddingVertical:12,paddingHorizontal:20,borderRadius:8,backgroundColor:N.buttonPrimary,opacity:ye?.5:1,alignItems:"center",justifyContent:"center",minWidth:120},children:c?/* @__PURE__ */T(z,{style:{alignItems:"center",gap:8},children:[/* @__PURE__ */W(d,{size:"small",color:N.buttonPrimaryText}),/* @__PURE__ */W(S,{style:{color:N.buttonPrimaryText,fontSize:14,fontWeight:"600"},children:"Placing Entry…"})]}):/* @__PURE__ */T(v,{children:[/* @__PURE__ */W(S,{style:{color:N.buttonPrimaryText,fontSize:16,fontWeight:"700"},children:"Place Entry"}),/* @__PURE__ */W(S,{style:{color:N.buttonPrimaryText,fontSize:12,opacity:.9,marginTop:2},children:$t(g)})]})})]}):t})()})]}):/* @__PURE__ */T(z,{style:[Xr.section,We,{padding:X?24:16,backgroundColor:G,borderColor:N.border}],children:[
168
+ /* @__PURE__ */W(B,{onPress:l,disabled:ye,accessibilityState:{disabled:ye,busy:!!c},activeOpacity:.7,style:{flexShrink:0,paddingVertical:12,paddingHorizontal:20,borderRadius:8,backgroundColor:N.buttonPrimary,opacity:ye?.5:1,alignItems:"center",justifyContent:"center",minWidth:120},children:c?/* @__PURE__ */T(z,{style:{alignItems:"center",gap:8},children:[/* @__PURE__ */W(d,{size:"small",color:N.buttonPrimaryText}),/* @__PURE__ */W(S,{style:{color:N.buttonPrimaryText,fontSize:14,fontWeight:"600"},children:"Placing Entry…"})]}):/* @__PURE__ */T(v,{children:[/* @__PURE__ */W(S,{style:{color:N.buttonPrimaryText,fontSize:16,fontWeight:"700"},children:"Place Entry"}),/* @__PURE__ */W(S,{style:{color:N.buttonPrimaryText,fontSize:12,opacity:.9,marginTop:2},children:$t(g)})]})})]}):t})()})]}):/* @__PURE__ */T(z,{style:[el.section,We,{padding:X?24:16,backgroundColor:G,borderColor:N.border}],children:[
169
169
  /* @__PURE__ */W(S,{style:{fontSize:X?18:16,fontWeight:"600",color:V,fontFamily:Y},children:"Log in to place this entry"}),
170
170
  /* @__PURE__ */W(S,{style:{fontSize:X?14:12,color:N.textMuted,marginTop:4,marginBottom:16},children:"Your picks are held. Log in to set your bet and confirm."}),
171
- /* @__PURE__ */W(B,{onPress:l,style:{paddingVertical:12,paddingHorizontal:24,borderRadius:8,backgroundColor:N.buttonPrimary,alignItems:"center"},children:/* @__PURE__ */W(S,{style:{color:N.buttonPrimaryText,fontSize:14,fontWeight:"600"},children:"Log in"})})]}),s&&/* @__PURE__ */W(z,{style:[Xr.errorBanner,{backgroundColor:N.errorBg,borderColor:N.error}],children:/* @__PURE__ */W(S,{style:{color:N.errorText,fontSize:14},children:s})}),!m&&/* @__PURE__ */T(z,{style:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",gap:12,borderTopWidth:1,borderTopColor:N.border,backgroundColor:N.background,marginHorizontal:X?-24:-16,paddingHorizontal:X?24:16,paddingVertical:X?16:12},children:[/* @__PURE__ */W(at,{theme:j,variant:"secondary",disabled:c,onPress:a,children:"Back"}),/* @__PURE__ */W(B,{onPress:l,disabled:ye,accessibilityState:{disabled:ye,busy:!!c},activeOpacity:.7,style:{flexDirection:"row",alignItems:"center",justifyContent:"center",gap:8,paddingHorizontal:24,paddingVertical:10,borderRadius:8,backgroundColor:N.buttonPrimary,opacity:ye?.5:1},children:c?/* @__PURE__ */T(v,{children:[/* @__PURE__ */W(d,{size:"small",color:N.buttonPrimaryText}),/* @__PURE__ */W(S,{style:{color:N.buttonPrimaryText,fontSize:14,fontWeight:"600"},children:"Placing Entry…"})]}):/* @__PURE__ */W(S,{style:{color:N.buttonPrimaryText,fontSize:14,fontWeight:"600"},children:`Place Entry (${$t(g)})`})})]})]})}var Xr=k.create({section:{borderRadius:12,borderWidth:1},jackpotBanner:{flexDirection:"row",justifyContent:"space-between",alignItems:"center",paddingVertical:6,paddingHorizontal:8,borderRadius:4,borderWidth:1,marginTop:8},errorBanner:{padding:12,borderRadius:8,borderWidth:1}}),Qr="M12 2l3.09 6.26L22 9.27l-5 4.87L18.18 22 12 18.27 5.82 22 7 14.14l-5-4.87 6.91-1.01L12 2z";function Jr({index:e,size:t,wide:n,isWinning:o,isJackpot:i,isSelected:r,bgColor:l,borderFallback:a,warning:s,primary:d,textMuted:h,payout:u,onPress:g,accessibilityLabel:f}){const[p,y]=c(!1),m=!!g,b=o||i,w=m&&p?1.12:b?1.1:1;/* @__PURE__ */
172
- return T(B,{onPress:g,disabled:!m,activeOpacity:.7,accessibilityRole:"button",accessibilityLabel:f,accessibilityState:{disabled:!m,selected:r},...rt(()=>y(!0),()=>y(!1)),style:[_r.circle,{width:t,height:t,borderRadius:t/2,backgroundColor:l,borderColor:i?s:o?l:a,zIndex:r?10:i?6:o?5:1,transform:[{scale:w}]},b&&_r.circleWinning,m&&p&&_r.circleHovered],children:[i&&/* @__PURE__ */W(z,{pointerEvents:"none",style:{position:"absolute",top:-3,right:-3,bottom:-3,left:-3,borderRadius:t/2+3,borderWidth:2,borderColor:`${s}80`}}),r&&/* @__PURE__ */W(z,{pointerEvents:"none",style:{position:"absolute",top:-6,right:-6,bottom:-6,left:-6,borderRadius:t/2+6,borderWidth:3,borderColor:d}}),i&&/* @__PURE__ */W(z,{pointerEvents:"none",style:{position:"absolute",top:-6,right:-6},children:/* @__PURE__ */W(A,{width:14,height:14,viewBox:"0 0 24 24",children:/* @__PURE__ */W(H,{d:Qr,fill:s,stroke:s,strokeWidth:1})})}),
173
- /* @__PURE__ */W(S,{style:{fontSize:n?16:14,lineHeight:n?16:14,fontWeight:"600",color:o||i?"#ffffff":h},children:e}),u>0&&/* @__PURE__ */W(S,{style:{fontSize:n?8:7,lineHeight:n?8:7,fontWeight:"400",color:o||i?"#ffffff":h},children:$t(u)})]})}function $r({game:e,totalSelections:t,expectedCorrect:n,onExpectedCorrectChange:o,theme:i=Be,colorWinning:r,colorNone:l,winningCounts:a,payouts:s}){const d=i.colors,{width:h}=F(),u=h>=640,g=r??d.payoutWinning,f=l??d.payoutNone,p=hn(e),y=u?48:40,[m,b]=c({width:0,height:0});/* @__PURE__ */
174
- return T(z,{style:_r.container,children:[
175
- /* @__PURE__ */W(S,{style:[_r.title,{color:d.textMuted}],children:"Payout Visualization"}),p.enabled&&/* @__PURE__ */T(z,{style:[_r.jackpotBanner,{borderColor:`${d.warning}30`}],onLayout:e=>b({width:e.nativeEvent.layout.width,height:e.nativeEvent.layout.height}),children:[m.width>0&&/* @__PURE__ */T(A,{style:k.absoluteFill,width:m.width,height:m.height,pointerEvents:"none",children:[/* @__PURE__ */W(L,{children:/* @__PURE__ */T(P,{id:"payout-jackpot-grad",x1:"0%",y1:"0%",x2:"100%",y2:"100%",children:[/* @__PURE__ */W(E,{offset:"0%",stopColor:d.warning,stopOpacity:.094}),/* @__PURE__ */W(E,{offset:"100%",stopColor:d.warning,stopOpacity:.031})]})}),/* @__PURE__ */W(I,{x:0,y:0,width:m.width,height:m.height,fill:"url(#payout-jackpot-grad)"})]}),
176
- /* @__PURE__ */W(A,{width:16,height:16,viewBox:"0 0 24 24",style:{flexShrink:0},children:/* @__PURE__ */W(H,{d:Qr,fill:d.warning})}),
177
- /* @__PURE__ */W(S,{style:[_r.jackpotText,{color:d.warning}],children:p.progressive?p.amount>0?`Progressive Jackpot: ${$t(p.amount)}${p.limit>0?` (up to ${$t(p.limit)})`:""} for a perfect pick!`:p.limit>0?`Progressive Jackpot — up to ${$t(p.limit)} for a perfect pick!`:"Progressive Jackpot for a perfect pick!":`Jackpot: ${$t(p.amount)} for a perfect pick!`})]}),
178
- /* @__PURE__ */W(z,{style:[_r.circleGrid,{gap:u?8:6}],children:Array.from({length:t+1},(e,i)=>{const r=a.includes(i),l=s[i]??0,c=i===t,h=p.enabled&&c,m=h?d.warning:r?g:f,b=i===n,w=h?p.progressive?`${i} correct wins progressive jackpot${p.amount>0?` (currently ${$t(p.amount)})`:""}${p.limit>0?` up to ${$t(p.limit)}`:""} plus ${$t(l)}`:`${i} correct wins jackpot ${$t(p.amount)} plus ${$t(l)}`:r?`${i} correct wins ${$t(l)}`:l>0?`${i} correct pays ${$t(l)} but does not win`:`${i} correct — no payout`,x=o?`${w}. Tap to select`:w;/* @__PURE__ */
179
- return W(Jr,{index:i,size:y,wide:u,isWinning:r,isJackpot:h,isSelected:b,bgColor:m,borderFallback:d.border,warning:d.warning,primary:d.primary,textMuted:d.textMuted,payout:l,onPress:o?()=>o(i):void 0,accessibilityLabel:x},i)})}),
180
- /* @__PURE__ */T(S,{style:[_r.expectedText,{color:d.textMuted}],children:["Your expected: ",/* @__PURE__ */T(S,{style:_r.expectedBold,children:[n," correct"]})]})]})}var _r=k.create({container:{gap:16},title:{fontSize:14,fontWeight:"600",textAlign:"center"},jackpotBanner:{flexDirection:"row",alignItems:"center",justifyContent:"center",gap:8,paddingVertical:10,paddingHorizontal:16,borderRadius:8,borderWidth:1,overflow:"hidden"},jackpotText:{fontSize:14,fontWeight:"600",textAlign:"center",flexShrink:1},circleGrid:{flexDirection:"row",flexWrap:"wrap",justifyContent:"center"},circle:{borderWidth:2,alignItems:"center",justifyContent:"center"},circleWinning:{elevation:4,shadowColor:"#000",shadowOffset:{width:0,height:2},shadowOpacity:.25,shadowRadius:4},circleHovered:{elevation:6,shadowColor:"#000",shadowOffset:{width:0,height:4},shadowOpacity:.3,shadowRadius:8},expectedText:{fontSize:12,textAlign:"center"},expectedBold:{fontWeight:"600"}});function el({iconUrl:e,gameName:t,chipColor:n,textColor:o,iconColor:i,accentColor:r,brandColor:l,height:a=56,showTrademark:c=!0,compact:s=!1,onPress:d}){const h=n??l??"#0F4C5C",u=o??h,g=.85*a,f=1.8*g,p=g/2,y='Manrope, Poppins, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif',m=a,w=f-.18*g*2,x=g-.05*g*2,k=/* @__PURE__ */T(v,{children:[
171
+ /* @__PURE__ */W(B,{onPress:l,style:{paddingVertical:12,paddingHorizontal:24,borderRadius:8,backgroundColor:N.buttonPrimary,alignItems:"center"},children:/* @__PURE__ */W(S,{style:{color:N.buttonPrimaryText,fontSize:14,fontWeight:"600"},children:"Log in"})})]}),s&&/* @__PURE__ */W(z,{style:[el.errorBanner,{backgroundColor:N.errorBg,borderColor:N.error}],children:/* @__PURE__ */W(S,{style:{color:N.errorText,fontSize:14},children:s})}),!m&&/* @__PURE__ */T(z,{style:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",gap:12,borderTopWidth:1,borderTopColor:N.border,backgroundColor:N.background,marginHorizontal:X?-24:-16,paddingHorizontal:X?24:16,paddingVertical:X?16:12},children:[/* @__PURE__ */W(at,{theme:j,variant:"secondary",disabled:c,onPress:a,children:"Back"}),/* @__PURE__ */W(B,{onPress:l,disabled:ye,accessibilityState:{disabled:ye,busy:!!c},activeOpacity:.7,style:{flexDirection:"row",alignItems:"center",justifyContent:"center",gap:8,paddingHorizontal:24,paddingVertical:10,borderRadius:8,backgroundColor:N.buttonPrimary,opacity:ye?.5:1},children:c?/* @__PURE__ */T(v,{children:[/* @__PURE__ */W(d,{size:"small",color:N.buttonPrimaryText}),/* @__PURE__ */W(S,{style:{color:N.buttonPrimaryText,fontSize:14,fontWeight:"600"},children:"Placing Entry…"})]}):/* @__PURE__ */W(S,{style:{color:N.buttonPrimaryText,fontSize:14,fontWeight:"600"},children:`Place Entry (${$t(g)})`})})]})]})}var el=k.create({section:{borderRadius:12,borderWidth:1},jackpotBanner:{flexDirection:"row",justifyContent:"space-between",alignItems:"center",paddingVertical:6,paddingHorizontal:8,borderRadius:4,borderWidth:1,marginTop:8},errorBanner:{padding:12,borderRadius:8,borderWidth:1}}),tl="M12 2l3.09 6.26L22 9.27l-5 4.87L18.18 22 12 18.27 5.82 22 7 14.14l-5-4.87 6.91-1.01L12 2z";function nl({index:e,size:t,wide:n,isWinning:o,isJackpot:i,isSelected:r,bgColor:l,borderFallback:a,warning:s,primary:d,textMuted:h,payout:u,onPress:g,accessibilityLabel:f}){const[p,y]=c(!1),m=!!g,b=o||i,w=m&&p?1.12:b?1.1:1;/* @__PURE__ */
172
+ return T(B,{onPress:g,disabled:!m,activeOpacity:.7,accessibilityRole:"button",accessibilityLabel:f,accessibilityState:{disabled:!m,selected:r},...rt(()=>y(!0),()=>y(!1)),style:[il.circle,{width:t,height:t,borderRadius:t/2,backgroundColor:l,borderColor:i?s:o?l:a,zIndex:r?10:i?6:o?5:1,transform:[{scale:w}]},b&&il.circleWinning,m&&p&&il.circleHovered],children:[i&&/* @__PURE__ */W(z,{pointerEvents:"none",style:{position:"absolute",top:-3,right:-3,bottom:-3,left:-3,borderRadius:t/2+3,borderWidth:2,borderColor:`${s}80`}}),r&&/* @__PURE__ */W(z,{pointerEvents:"none",style:{position:"absolute",top:-6,right:-6,bottom:-6,left:-6,borderRadius:t/2+6,borderWidth:3,borderColor:d}}),i&&/* @__PURE__ */W(z,{pointerEvents:"none",style:{position:"absolute",top:-6,right:-6},children:/* @__PURE__ */W(A,{width:14,height:14,viewBox:"0 0 24 24",children:/* @__PURE__ */W(H,{d:tl,fill:s,stroke:s,strokeWidth:1})})}),
173
+ /* @__PURE__ */W(S,{style:{fontSize:n?16:14,lineHeight:n?16:14,fontWeight:"600",color:o||i?"#ffffff":h},children:e}),u>0&&/* @__PURE__ */W(S,{style:{fontSize:n?8:7,lineHeight:n?8:7,fontWeight:"400",color:o||i?"#ffffff":h},children:$t(u)})]})}function ol({game:e,totalSelections:t,expectedCorrect:n,onExpectedCorrectChange:o,theme:i=Be,colorWinning:r,colorNone:l,winningCounts:a,payouts:s}){const d=i.colors,{width:h}=F(),u=h>=640,g=r??d.payoutWinning,f=l??d.payoutNone,p=hn(e),y=u?48:40,[m,b]=c({width:0,height:0});/* @__PURE__ */
174
+ return T(z,{style:il.container,children:[
175
+ /* @__PURE__ */W(S,{style:[il.title,{color:d.textMuted}],children:"Payout Visualization"}),p.enabled&&/* @__PURE__ */T(z,{style:[il.jackpotBanner,{borderColor:`${d.warning}30`}],onLayout:e=>b({width:e.nativeEvent.layout.width,height:e.nativeEvent.layout.height}),children:[m.width>0&&/* @__PURE__ */T(A,{style:k.absoluteFill,width:m.width,height:m.height,pointerEvents:"none",children:[/* @__PURE__ */W(L,{children:/* @__PURE__ */T(P,{id:"payout-jackpot-grad",x1:"0%",y1:"0%",x2:"100%",y2:"100%",children:[/* @__PURE__ */W(E,{offset:"0%",stopColor:d.warning,stopOpacity:.094}),/* @__PURE__ */W(E,{offset:"100%",stopColor:d.warning,stopOpacity:.031})]})}),/* @__PURE__ */W(I,{x:0,y:0,width:m.width,height:m.height,fill:"url(#payout-jackpot-grad)"})]}),
176
+ /* @__PURE__ */W(A,{width:16,height:16,viewBox:"0 0 24 24",style:{flexShrink:0},children:/* @__PURE__ */W(H,{d:tl,fill:d.warning})}),
177
+ /* @__PURE__ */W(S,{style:[il.jackpotText,{color:d.warning}],children:p.progressive?p.amount>0?`Progressive Jackpot: ${$t(p.amount)}${p.limit>0?` (up to ${$t(p.limit)})`:""} for a perfect pick!`:p.limit>0?`Progressive Jackpot — up to ${$t(p.limit)} for a perfect pick!`:"Progressive Jackpot for a perfect pick!":`Jackpot: ${$t(p.amount)} for a perfect pick!`})]}),
178
+ /* @__PURE__ */W(z,{style:[il.circleGrid,{gap:u?8:6}],children:Array.from({length:t+1},(e,i)=>{const r=a.includes(i),l=s[i]??0,c=i===t,h=p.enabled&&c,m=h?d.warning:r?g:f,b=i===n,w=h?p.progressive?`${i} correct wins progressive jackpot${p.amount>0?` (currently ${$t(p.amount)})`:""}${p.limit>0?` up to ${$t(p.limit)}`:""} plus ${$t(l)}`:`${i} correct wins jackpot ${$t(p.amount)} plus ${$t(l)}`:r?`${i} correct wins ${$t(l)}`:l>0?`${i} correct pays ${$t(l)} but does not win`:`${i} correct — no payout`,x=o?`${w}. Tap to select`:w;/* @__PURE__ */
179
+ return W(nl,{index:i,size:y,wide:u,isWinning:r,isJackpot:h,isSelected:b,bgColor:m,borderFallback:d.border,warning:d.warning,primary:d.primary,textMuted:d.textMuted,payout:l,onPress:o?()=>o(i):void 0,accessibilityLabel:x},i)})}),
180
+ /* @__PURE__ */T(S,{style:[il.expectedText,{color:d.textMuted}],children:["Your expected: ",/* @__PURE__ */T(S,{style:il.expectedBold,children:[n," correct"]})]})]})}var il=k.create({container:{gap:16},title:{fontSize:14,fontWeight:"600",textAlign:"center"},jackpotBanner:{flexDirection:"row",alignItems:"center",justifyContent:"center",gap:8,paddingVertical:10,paddingHorizontal:16,borderRadius:8,borderWidth:1,overflow:"hidden"},jackpotText:{fontSize:14,fontWeight:"600",textAlign:"center",flexShrink:1},circleGrid:{flexDirection:"row",flexWrap:"wrap",justifyContent:"center"},circle:{borderWidth:2,alignItems:"center",justifyContent:"center"},circleWinning:{elevation:4,shadowColor:"#000",shadowOffset:{width:0,height:2},shadowOpacity:.25,shadowRadius:4},circleHovered:{elevation:6,shadowColor:"#000",shadowOffset:{width:0,height:4},shadowOpacity:.3,shadowRadius:8},expectedText:{fontSize:12,textAlign:"center"},expectedBold:{fontWeight:"600"}});function rl({iconUrl:e,gameName:t,chipColor:n,textColor:o,iconColor:i,accentColor:r,brandColor:l,height:a=56,showTrademark:c=!0,compact:s=!1,onPress:d}){const h=n??l??"#0F4C5C",u=o??h,g=.85*a,f=1.8*g,p=g/2,y='Manrope, Poppins, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif',m=a,w=f-.18*g*2,x=g-.05*g*2,k=/* @__PURE__ */T(v,{children:[
181
181
  /* @__PURE__ */T(S,{accessibilityLabel:"YESNO",style:{fontFamily:y,fontSize:a,lineHeight:1.15*a,letterSpacing:-1,color:u,includeFontPadding:!1},children:[/* @__PURE__ */W(S,{style:{fontWeight:"900"},children:"YES"}),/* @__PURE__ */W(S,{style:{fontWeight:"300"},children:"NO"})]}),
182
182
  /* @__PURE__ */W(z,{accessible:!0,accessibilityRole:"image",accessibilityLabel:t,style:{width:f,height:g,borderRadius:p,backgroundColor:h,alignItems:"center",justifyContent:"center",flexShrink:0,transform:[{translateY:.06*-a}]},children:/* @__PURE__ */W(On,{iconUrl:e,width:w,height:x,iconColor:i,accentColor:r})}),
183
- /* @__PURE__ */T(z,{style:{flexDirection:"row",alignItems:"flex-start",flexShrink:1,minWidth:0},children:[/* @__PURE__ */W(S,{style:{fontFamily:y,fontSize:m,lineHeight:1.15*m,fontWeight:"500",color:u,includeFontPadding:!1,flexShrink:1},children:t}),c&&/* @__PURE__ */W(S,{style:{fontFamily:y,fontSize:.3*m,lineHeight:.3*m,fontWeight:"600",color:u,marginLeft:.06*m,includeFontPadding:!1},children:"TM"})]})]});return d?/* @__PURE__ */W(b,{onPress:d,accessibilityRole:"button",accessibilityLabel:`Play ${t}`,testID:"brand-logo-play",style:{flexDirection:"row",alignItems:"center",flexWrap:"wrap",gap:.2*a,maxWidth:"100%",minWidth:0},children:k}):/* @__PURE__ */W(z,{style:{flexDirection:"row",alignItems:"center",flexWrap:"wrap",gap:.2*a,maxWidth:"100%",minWidth:0},children:k})}function tl({color:e,style:t}){/* @__PURE__ */
184
- return W(z,{style:[{backgroundColor:e,opacity:.35,borderRadius:6},t]})}function nl({colors:e}){const t=e.selectionCard??e.backgroundAlt;/* @__PURE__ */
185
- return T(z,{style:{width:"100%"},children:[/* @__PURE__ */W(z,{style:{flexDirection:"row",borderBottomWidth:1,borderBottomColor:e.border,marginBottom:16},children:[0,1].map(t=>/* @__PURE__ */T(z,{style:{flexDirection:"row",alignItems:"center",gap:8,paddingHorizontal:16,paddingVertical:10},children:[/* @__PURE__ */W(tl,{color:e.textMuted,style:{height:14,width:68}}),/* @__PURE__ */W(tl,{color:e.textMuted,style:{height:20,width:20,borderRadius:999}})]},t))}),/* @__PURE__ */W(z,{style:{gap:12,width:"100%"},children:[0,1].map(n=>/* @__PURE__ */T(z,{style:{borderRadius:8,borderWidth:1,borderColor:e.border,backgroundColor:t,overflow:"hidden",width:"100%"},children:[/* @__PURE__ */T(z,{style:{width:"100%",paddingHorizontal:16,paddingVertical:12,flexDirection:"row",alignItems:"center",justifyContent:"space-between",gap:12},children:[/* @__PURE__ */T(z,{style:{flex:1,gap:6},children:[/* @__PURE__ */W(tl,{color:e.textMuted,style:{height:18,width:160,maxWidth:"75%"}}),/* @__PURE__ */W(tl,{color:e.textMuted,style:{height:12,width:128,maxWidth:"65%"}})]}),/* @__PURE__ */T(z,{style:{flexDirection:"row",alignItems:"center",gap:12,flexShrink:0},children:[/* @__PURE__ */W(tl,{color:e.textMuted,style:{height:14,width:40}}),/* @__PURE__ */W(tl,{color:e.textMuted,style:{height:24,width:60,borderRadius:999}})]})]}),/* @__PURE__ */W(z,{style:{borderTopWidth:1,borderTopColor:e.border,width:"100%"},children:[0,1,2].map(t=>/* @__PURE__ */T(z,{style:{paddingHorizontal:16,paddingVertical:10,flexDirection:"row",alignItems:"center",justifyContent:"space-between",gap:12,borderTopWidth:0===t?0:1,borderTopColor:e.border},children:[/* @__PURE__ */T(z,{style:{flex:1,gap:4},children:[/* @__PURE__ */W(tl,{color:e.textMuted,style:{height:14,width:"88%"}}),/* @__PURE__ */W(tl,{color:e.textMuted,style:{height:12,width:"70%"}})]}),/* @__PURE__ */W(tl,{color:e.textMuted,style:{height:20,width:40,borderRadius:4}})]},t))})]},n))})]})}function ol({apiUrl:e,apiKey:t,fetchImpl:n,getAuthHeaders:o,userId:r,demoEntries:s,demoGames:d,demoPropositions:h,onSelectEntry:u,theme:g,colorScheme:f,renderTeamLogo:p,filterSport:y}){const m=je(g,f),b=!!(s&&d&&h),w=m.colors,x=Ge(m),[k,C]=c("pending"),[F,v]=c([]),R=l(()=>new ei({apiUrl:e,apiKey:t,fetchImpl:n,getAuthHeaders:o}),[e,t,n,o]),{entries:L,loading:D,error:M,refetch:P}=ii(R,{user_id:r},{skip:b}),{games:O,loading:I,error:E}=ti(R,void 0,{skip:b}),{propositions:j,loading:N,error:G}=ni(R,void 0,{skip:b}),Y=b?s:L,V=b?d:O,U=b?h:j,q=!b&&(D||I||N),K=b?null:M||E||G,Z=l(()=>Y.map(e=>{const t={...e};return!t.created_at&&t.entry_date&&(t.created_at=t.entry_date),(!t.proposition_ids||0===t.proposition_ids.length)&&t.propositions&&t.propositions.length>0&&(t.proposition_ids=t.propositions.map(e=>e.id)),t}),[Y]),X=l(()=>{const e=/* @__PURE__ */new Map;for(const t of V)e.set(t.id,t);return e},[V]),Q=l(()=>{const e=/* @__PURE__ */new Map;for(const t of U)e.set(t.id,t);for(const t of Z)if(t.propositions)for(const n of t.propositions)e.has(n.id)||e.set(n.id,n);for(const t of F)e.set(t.id,t);return e},[U,Z,F]),J=a(/* @__PURE__ */new Set);i(()=>{if(q||b)return;const e=[];for(const n of Z)for(const t of n.proposition_ids??[])Q.has(t)||J.current.has(t)||(e.push(t),J.current.add(t));if(0===e.length)return;let t=!1;return(async()=>{try{const n=await R.getPropositionsByIds(e);!t&&n.length>0&&v(e=>[...e,...n])}catch{}})(),()=>{t=!0}},[Z,Q,q,b,R]);const $=l(()=>y?Z.filter(e=>{const t=e.proposition_ids??[];return 0===t.length||t.some(t=>(Q.get(t)??e.propositions?.find(e=>e.id===t))?.sport===y)}):Z,[Z,y,Q]),_=l(()=>$.filter(e=>Jt(e.pending)),[$]),ee=l(()=>$.filter(e=>!Jt(e.pending)),[$]),te="pending"===k?_:ee;return q?/* @__PURE__ */W(z,{style:rl.container,accessibilityLabel:"Loading entries",children:/* @__PURE__ */W(nl,{colors:ke(m)})}):K?/* @__PURE__ */W(z,{style:rl.container,children:/* @__PURE__ */T(z,{style:[rl.errorBanner,{backgroundColor:w.errorBg,borderColor:w.error}],children:[/* @__PURE__ */W(S,{style:{color:w.errorText},children:K}),/* @__PURE__ */W(B,{onPress:P,style:rl.retryButton,children:/* @__PURE__ */W(S,{style:{color:w.error,textDecorationLine:"underline",fontSize:14,fontWeight:"500"},children:"Try again"})})]})}):/* @__PURE__ */T(z,{style:rl.container,children:[
186
- /* @__PURE__ */W(z,{style:[rl.tabBar,{borderBottomColor:w.border}],children:["pending","completed"].map(e=>{const t=k===e,n="pending"===e?_.length:ee.length;/* @__PURE__ */
187
- return T(B,{onPress:()=>C(e),accessibilityRole:"tab",accessibilityState:{selected:t},style:[rl.tab,{borderBottomColor:t?w.primary:"transparent"}],children:[/* @__PURE__ */W(S,{style:[rl.tabLabel,{color:t?w.primary:w.textMuted,fontFamily:x}],children:"pending"===e?"Pending":"Completed"}),/* @__PURE__ */W(z,{style:[rl.tabBadge,{backgroundColor:t?`${w.primary}15`:w.backgroundAlt}],children:/* @__PURE__ */W(S,{style:[rl.tabBadgeText,{color:t?w.primary:w.textMuted}],children:n})})]},e)})}),0===te.length&&/* @__PURE__ */T(z,{style:rl.emptyState,children:[
183
+ /* @__PURE__ */T(z,{style:{flexDirection:"row",alignItems:"flex-start",flexShrink:1,minWidth:0},children:[/* @__PURE__ */W(S,{style:{fontFamily:y,fontSize:m,lineHeight:1.15*m,fontWeight:"500",color:u,includeFontPadding:!1,flexShrink:1},children:t}),c&&/* @__PURE__ */W(S,{style:{fontFamily:y,fontSize:.3*m,lineHeight:.3*m,fontWeight:"600",color:u,marginLeft:.06*m,includeFontPadding:!1},children:"TM"})]})]});return d?/* @__PURE__ */W(b,{onPress:d,accessibilityRole:"button",accessibilityLabel:`Play ${t}`,testID:"brand-logo-play",style:{flexDirection:"row",alignItems:"center",flexWrap:"wrap",gap:.2*a,maxWidth:"100%",minWidth:0},children:k}):/* @__PURE__ */W(z,{style:{flexDirection:"row",alignItems:"center",flexWrap:"wrap",gap:.2*a,maxWidth:"100%",minWidth:0},children:k})}function ll({color:e,style:t}){/* @__PURE__ */
184
+ return W(z,{style:[{backgroundColor:e,opacity:.35,borderRadius:6},t]})}function al({colors:e}){const t=e.selectionCard??e.backgroundAlt;/* @__PURE__ */
185
+ return T(z,{style:{width:"100%"},children:[/* @__PURE__ */W(z,{style:{flexDirection:"row",borderBottomWidth:1,borderBottomColor:e.border,marginBottom:16},children:[0,1].map(t=>/* @__PURE__ */T(z,{style:{flexDirection:"row",alignItems:"center",gap:8,paddingHorizontal:16,paddingVertical:10},children:[/* @__PURE__ */W(ll,{color:e.textMuted,style:{height:14,width:68}}),/* @__PURE__ */W(ll,{color:e.textMuted,style:{height:20,width:20,borderRadius:999}})]},t))}),/* @__PURE__ */W(z,{style:{gap:12,width:"100%"},children:[0,1].map(n=>/* @__PURE__ */T(z,{style:{borderRadius:8,borderWidth:1,borderColor:e.border,backgroundColor:t,overflow:"hidden",width:"100%"},children:[/* @__PURE__ */T(z,{style:{width:"100%",paddingHorizontal:16,paddingVertical:12,flexDirection:"row",alignItems:"center",justifyContent:"space-between",gap:12},children:[/* @__PURE__ */T(z,{style:{flex:1,gap:6},children:[/* @__PURE__ */W(ll,{color:e.textMuted,style:{height:18,width:160,maxWidth:"75%"}}),/* @__PURE__ */W(ll,{color:e.textMuted,style:{height:12,width:128,maxWidth:"65%"}})]}),/* @__PURE__ */T(z,{style:{flexDirection:"row",alignItems:"center",gap:12,flexShrink:0},children:[/* @__PURE__ */W(ll,{color:e.textMuted,style:{height:14,width:40}}),/* @__PURE__ */W(ll,{color:e.textMuted,style:{height:24,width:60,borderRadius:999}})]})]}),/* @__PURE__ */W(z,{style:{borderTopWidth:1,borderTopColor:e.border,width:"100%"},children:[0,1,2].map(t=>/* @__PURE__ */T(z,{style:{paddingHorizontal:16,paddingVertical:10,flexDirection:"row",alignItems:"center",justifyContent:"space-between",gap:12,borderTopWidth:0===t?0:1,borderTopColor:e.border},children:[/* @__PURE__ */T(z,{style:{flex:1,gap:4},children:[/* @__PURE__ */W(ll,{color:e.textMuted,style:{height:14,width:"88%"}}),/* @__PURE__ */W(ll,{color:e.textMuted,style:{height:12,width:"70%"}})]}),/* @__PURE__ */W(ll,{color:e.textMuted,style:{height:20,width:40,borderRadius:4}})]},t))})]},n))})]})}function cl({apiUrl:e,apiKey:t,fetchImpl:n,getAuthHeaders:o,userId:r,demoEntries:s,demoGames:d,demoPropositions:h,onSelectEntry:u,theme:g,colorScheme:f,renderTeamLogo:p,filterSport:y}){const m=je(g,f),b=!!(s&&d&&h),w=m.colors,x=Ge(m),[k,C]=c("pending"),[F,v]=c([]),R=l(()=>new ei({apiUrl:e,apiKey:t,fetchImpl:n,getAuthHeaders:o}),[e,t,n,o]),{entries:L,loading:D,error:M,refetch:P}=ii(R,{user_id:r},{skip:b}),{games:O,loading:I,error:E}=ti(R,void 0,{skip:b}),{propositions:j,loading:N,error:G}=ni(R,void 0,{skip:b}),Y=b?s:L,V=b?d:O,U=b?h:j,q=!b&&(D||I||N),K=b?null:M||E||G,Z=l(()=>Y.map(e=>{const t={...e};return!t.created_at&&t.entry_date&&(t.created_at=t.entry_date),(!t.proposition_ids||0===t.proposition_ids.length)&&t.propositions&&t.propositions.length>0&&(t.proposition_ids=t.propositions.map(e=>e.id)),t}),[Y]),X=l(()=>{const e=/* @__PURE__ */new Map;for(const t of V)e.set(t.id,t);return e},[V]),Q=l(()=>{const e=/* @__PURE__ */new Map;for(const t of U)e.set(t.id,t);for(const t of Z)if(t.propositions)for(const n of t.propositions)e.has(n.id)||e.set(n.id,n);for(const t of F)e.set(t.id,t);return e},[U,Z,F]),J=a(/* @__PURE__ */new Set);i(()=>{if(q||b)return;const e=[];for(const n of Z)for(const t of n.proposition_ids??[])Q.has(t)||J.current.has(t)||(e.push(t),J.current.add(t));if(0===e.length)return;let t=!1;return(async()=>{try{const n=await R.getPropositionsByIds(e);!t&&n.length>0&&v(e=>[...e,...n])}catch{}})(),()=>{t=!0}},[Z,Q,q,b,R]);const $=l(()=>y?Z.filter(e=>{const t=e.proposition_ids??[];return 0===t.length||t.some(t=>(Q.get(t)??e.propositions?.find(e=>e.id===t))?.sport===y)}):Z,[Z,y,Q]),_=l(()=>$.filter(e=>Jt(e.pending)),[$]),ee=l(()=>$.filter(e=>!Jt(e.pending)),[$]),te="pending"===k?_:ee;return q?/* @__PURE__ */W(z,{style:dl.container,accessibilityLabel:"Loading entries",children:/* @__PURE__ */W(al,{colors:ke(m)})}):K?/* @__PURE__ */W(z,{style:dl.container,children:/* @__PURE__ */T(z,{style:[dl.errorBanner,{backgroundColor:w.errorBg,borderColor:w.error}],children:[/* @__PURE__ */W(S,{style:{color:w.errorText},children:K}),/* @__PURE__ */W(B,{onPress:P,style:dl.retryButton,children:/* @__PURE__ */W(S,{style:{color:w.error,textDecorationLine:"underline",fontSize:14,fontWeight:"500"},children:"Try again"})})]})}):/* @__PURE__ */T(z,{style:dl.container,children:[
186
+ /* @__PURE__ */W(z,{style:[dl.tabBar,{borderBottomColor:w.border}],children:["pending","completed"].map(e=>{const t=k===e,n="pending"===e?_.length:ee.length;/* @__PURE__ */
187
+ return T(B,{onPress:()=>C(e),accessibilityRole:"tab",accessibilityState:{selected:t},style:[dl.tab,{borderBottomColor:t?w.primary:"transparent"}],children:[/* @__PURE__ */W(S,{style:[dl.tabLabel,{color:t?w.primary:w.textMuted,fontFamily:x}],children:"pending"===e?"Pending":"Completed"}),/* @__PURE__ */W(z,{style:[dl.tabBadge,{backgroundColor:t?`${w.primary}15`:w.backgroundAlt}],children:/* @__PURE__ */W(S,{style:[dl.tabBadgeText,{color:t?w.primary:w.textMuted}],children:n})})]},e)})}),0===te.length&&/* @__PURE__ */T(z,{style:dl.emptyState,children:[
188
188
  /* @__PURE__ */W(z,{style:{marginBottom:16},children:/* @__PURE__ */W(A,{width:48,height:48,viewBox:"0 0 24 24",fill:"none",children:/* @__PURE__ */W(H,{d:"pending"===k?"M12 6v6l4 2m6-2a10 10 0 1 1-20 0 10 10 0 0 1 20 0z":"M9 12l2 2 4-4m6 2a10 10 0 1 1-20 0 10 10 0 0 1 20 0z",stroke:w.textMuted,strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"})})}),
189
- /* @__PURE__ */W(S,{style:[rl.emptyTitle,{color:w.text}],children:"pending"===k?"No pending entries":"No completed entries"}),
190
- /* @__PURE__ */W(S,{style:[rl.emptySubtitle,{color:w.textMuted}],children:"pending"===k?"Entries awaiting results will appear here":"Settled entries will appear here"})]}),
191
- /* @__PURE__ */W(z,{style:rl.entryList,children:te.map(e=>/* @__PURE__ */W(il,{entry:e,game:X.get(e.game_id),propositionsById:Q,onSelect:u,theme:m,renderTeamLogo:p},e.id))})]})}function il({entry:e,game:t,propositionsById:n,onSelect:o,theme:i,renderTeamLogo:r}){const a=i.colors,s=be(i),d=Ge(i),h="dark"===i.colorScheme,u=e.proposition_ids??[],g=l(()=>u.map(e=>n.get(e)).filter(Boolean),[u,n]),f=u.length,[p,y]=c(!1),m=f>0,b=l(()=>{const t=/* @__PURE__ */new Map;for(const n of e.propositions??[])t.set(n.id,n);return t},[e.propositions]),w=t=>{const o=e.selections?.[t];return null!=o?o:b.get(t)?.user_prediction??n.get(t)?.user_prediction},x=g.filter(e=>null!=e.result&&!e.is_voided).length,k=g.filter(e=>{if(null==e.result||e.is_voided)return!1;const t=w(e.id);return null!=t&&t===e.result}).length,C=null!=e.selections&&Object.keys(e.selections).length>0||(e.propositions??[]).some(e=>null!=e.user_prediction),F=Jt(e.pending),R=!F&&Qt(e.winning)>0,L=e.payout_status,D="fulfilled"===L&&R,M=F?"Pending":D?"Won — pay due":"paid_out"===L&&R?"Paid":R?"Won":"Lost",P=F||D?a.warningBg:R?a.successBg:a.errorBg,O=F||D?a.warningText:R?a.successText:a.errorText,I=C&&x>0?`${k}/${f} correct`:f>0?`${f} pick${1!==f?"s":""}`:null,E=C&&x>0?k>0?a.success:a.error:a.textMuted,j=/* @__PURE__ */T(z,{style:rl.cardHeader,children:[/* @__PURE__ */T(z,{style:rl.cardHeaderLeft,children:[(()=>{const n=t?t.allowed_propositions&&t.allowed_propositions.length>0&&t.game_name.replace(/\s+\d+\s*$/,"").trim()||t.game_name:`Game #${e.game_id}`;return t?/* @__PURE__ */W(el,{iconUrl:Ze(t),gameName:n,height:18,chipColor:a.primary,textColor:a.text,iconColor:a.primaryText,accentColor:i.brand?.accent}):/* @__PURE__ */W(S,{style:[rl.cardGameName,{color:a.text,fontFamily:d}],numberOfLines:1,children:n})})(),/* @__PURE__ */T(z,{style:rl.metaRow,children:[(e.created_at||e.entry_date)&&/* @__PURE__ */W(S,{style:[rl.metaText,{color:a.textMuted}],children:_t(e.created_at||e.entry_date)}),I&&/* @__PURE__ */T(v,{children:[/* @__PURE__ */W(S,{style:[rl.metaDot,{color:a.textMuted}],children:"·"}),/* @__PURE__ */W(S,{style:[rl.metaText,{fontWeight:"500",color:E}],children:I})]})]})]}),/* @__PURE__ */T(z,{style:rl.cardHeaderRight,children:[
192
- /* @__PURE__ */T(z,{style:rl.amounts,children:[Qt(e.bet_amount)>0&&/* @__PURE__ */W(S,{style:[rl.betLabel,{color:a.textMuted}],children:$t(Qt(e.bet_amount))}),!F&&Qt(e.winning)>0&&/* @__PURE__ */T(z,{style:{alignItems:"flex-end"},children:[/* @__PURE__ */W(S,{style:[rl.winAmount,{color:a.success}],children:$t(Qt(e.winning))}),(e.payout_jackpot??0)>0&&/* @__PURE__ */T(S,{style:{fontSize:12,fontWeight:"400",color:a.textMuted},children:["incl. ",$t(Qt(e.payout_jackpot))," jackpot"]})]})]}),
193
- /* @__PURE__ */W(z,{style:[rl.statusPill,{backgroundColor:P}],children:/* @__PURE__ */W(S,{style:[rl.statusText,{color:O}],children:M})}),m&&/* @__PURE__ */W(z,{style:{transform:[{rotate:p?"180deg":"0deg"}]},accessibilityElementsHidden:!0,children:/* @__PURE__ */W(A,{width:18,height:18,viewBox:"0 0 24 24",fill:"none",children:/* @__PURE__ */W(H,{d:"m6 9 6 6 6-6",stroke:a.textMuted,strokeWidth:2.5,strokeLinecap:"round",strokeLinejoin:"round"})})})]})]});/* @__PURE__ */
194
- return T(z,{style:[rl.card,{borderColor:a.border,backgroundColor:s,shadowColor:"#000",shadowOpacity:h?.4:.12,shadowRadius:12,shadowOffset:{width:0,height:6},elevation:2}],children:[/* @__PURE__ */W(B,{testID:"entry-card",onPress:()=>{m&&y(e=>!e),o?.({entry:e,game:t,propositions:g})},activeOpacity:.7,disabled:!m&&!o,accessibilityLabel:`Entry #${e.id}`,accessibilityState:m?{expanded:p}:void 0,children:j}),p&&f>0&&u.map(t=>{const o=(t=>n.get(t)??e.propositions?.find(e=>e.id===t))(t),l=w(t);if(!o)/* @__PURE__ */return T(z,{style:[rl.propRow,{borderTopColor:a.border,borderTopWidth:1}],children:[/* @__PURE__ */W(z,{style:rl.propInfo,children:/* @__PURE__ */T(S,{style:{fontSize:14,color:a.textMuted},children:["Loading proposition #",t,"…"]})}),null!=l&&/* @__PURE__ */W(ht,{theme:i,size:"sm",value:"yes"===l?"yes":"no"})]},t);const c=o.result,s=null!=c,d=!!o.is_voided,h=s&&!d&&null!=l&&l===c;let u,g,f;d?(u="Void",g=`${a.textMuted}20`,f=a.textMuted):s?h?(u="Won",g=a.successBg,f=a.successText):(u="Lost",g=a.errorBg,f=a.errorText):(u="Pending",g=a.warningBg,f=a.warningText);const p=rn(o)?void 0:o.home_team;/* @__PURE__ */
195
- return T(z,{style:[rl.propRow,{borderTopColor:a.border,borderTopWidth:1}],children:[
196
- /* @__PURE__ */T(z,{style:rl.propInfo,children:[(o.home_team||o.away_team)&&/* @__PURE__ */T(z,{style:rl.teamsRow,children:[r&&p?r(p):null,p?/* @__PURE__ */W(S,{style:[rl.teamName,{color:a.text}],children:p}):null,p&&o.away_team?/* @__PURE__ */W(S,{style:[rl.vsText,{color:a.textMuted}],children:"vs"}):null,r&&o.away_team?r(o.away_team):null,o.away_team?/* @__PURE__ */W(S,{style:[rl.teamName,{color:a.text}],children:o.away_team}):null]}),(o.proposition||o.description)&&/* @__PURE__ */W(S,{style:{fontSize:12,color:a.textMuted,marginTop:2},children:o.proposition||o.description}),o.commence_time&&/* @__PURE__ */W(S,{style:{fontSize:12,color:a.textMuted,marginTop:2},children:_t(o.commence_time)})]}),
197
- /* @__PURE__ */T(z,{style:rl.outcomeCol,children:[/* @__PURE__ */W(S,{style:[rl.outcomeLabel,{color:a.textMuted}],children:"Pick"}),null!=l?/* @__PURE__ */W(ht,{theme:i,size:"sm",value:"yes"===l?"yes":"no"}):/* @__PURE__ */W(S,{style:{fontSize:12,color:a.textMuted},children:"—"})]}),
198
- /* @__PURE__ */T(z,{style:rl.outcomeCol,children:[/* @__PURE__ */W(S,{style:[rl.outcomeLabel,{color:a.textMuted}],children:"Result"}),/* @__PURE__ */W(z,{style:{paddingHorizontal:8,paddingVertical:2,borderRadius:4,backgroundColor:g},children:/* @__PURE__ */W(S,{style:{fontSize:12,fontWeight:"700",color:f,textTransform:"uppercase"},children:u})})]})]},t)})]})}var rl=k.create({container:{flex:1},errorBanner:{padding:16,borderRadius:8,borderWidth:1},retryButton:{marginTop:8},tabBar:{flexDirection:"row",borderBottomWidth:1,marginBottom:16},tab:{flexDirection:"row",alignItems:"center",gap:8,paddingHorizontal:16,paddingVertical:10,borderBottomWidth:2,marginBottom:-1},tabLabel:{fontSize:14,fontWeight:"500"},tabBadge:{minWidth:20,height:20,paddingHorizontal:6,borderRadius:999,alignItems:"center",justifyContent:"center"},tabBadgeText:{fontSize:12,fontWeight:"600"},emptyState:{alignItems:"center",justifyContent:"center",paddingVertical:48,paddingHorizontal:16},emptyTitle:{fontSize:16,fontWeight:"500"},emptySubtitle:{fontSize:14,marginTop:4},entryList:{gap:12},card:{borderRadius:12,borderWidth:1,overflow:"hidden"},cardHeader:{flexDirection:"row",justifyContent:"space-between",alignItems:"center",paddingHorizontal:16,paddingVertical:12,gap:12},cardHeaderLeft:{flex:1,minWidth:0},cardGameName:{fontSize:16,fontWeight:"600"},metaRow:{flexDirection:"row",alignItems:"center",gap:8,marginTop:2},metaText:{fontSize:12},metaDot:{fontSize:12},cardHeaderRight:{flexDirection:"row",alignItems:"center",gap:12,flexShrink:0},amounts:{alignItems:"flex-end"},betLabel:{fontSize:12},winAmount:{fontSize:14,fontWeight:"700"},statusPill:{paddingHorizontal:10,paddingVertical:2,borderRadius:999},statusText:{fontSize:12,fontWeight:"700",textTransform:"uppercase",letterSpacing:.3},propRow:{flexDirection:"row",alignItems:"center",paddingHorizontal:16,paddingVertical:10,gap:12},propInfo:{flex:1},teamsRow:{flexDirection:"row",flexWrap:"wrap",alignItems:"center",gap:6},teamName:{fontSize:14,fontWeight:"500"},vsText:{fontSize:12,fontWeight:"400"},outcomeCol:{alignItems:"center",gap:2,flexShrink:0},outcomeLabel:{fontSize:9,fontWeight:"600",letterSpacing:.225,textTransform:"uppercase"}});function ll({style:t}){const{theme:n,bodyFont:o,eventFilterActive:i,eventFilterLabel:r,clearEventFilter:l,gameCategory:a}=$i(),{width:c}=F(),s=c>=640,[d,h]=e.useState(!1);if(!i)return null;const u=n.colors,g=r??("racing"===a?"This race":"This event");/* @__PURE__ */
199
- return T(z,{style:[al.container,s&&al.containerWide,{borderColor:`${u.primary}33`,backgroundColor:u.surface},t],children:[/* @__PURE__ */T(z,{style:al.textBlock,children:[
200
- /* @__PURE__ */W(S,{style:[al.kicker,{color:u.primary,fontFamily:o}],children:"Event filter"}),
201
- /* @__PURE__ */W(S,{style:[al.label,{color:u.text,fontFamily:o}],numberOfLines:1,children:g}),
202
- /* @__PURE__ */W(S,{style:[al.hint,{color:u.textMuted,fontFamily:o}],children:"Only propositions from this event are shown."})]}),/* @__PURE__ */W(B,{onPress:l,...rt(()=>h(!0),()=>h(!1)),style:[al.button,s&&al.buttonWide,{borderColor:`${u.primary}44`,backgroundColor:u.background,opacity:d?.9:1}],children:/* @__PURE__ */W(S,{style:[al.buttonText,{color:u.text,fontFamily:o}],children:"Show all events"})})]})}var al=k.create({container:{marginBottom:16,flexDirection:"column",borderWidth:1,borderRadius:12,paddingHorizontal:12,paddingVertical:10,gap:8},containerWide:{flexDirection:"row",alignItems:"center",justifyContent:"space-between"},textBlock:{minWidth:0,flexShrink:1},kicker:{fontSize:10,fontWeight:"700",letterSpacing:1.2,textTransform:"uppercase"},label:{fontSize:14,fontWeight:"600"},hint:{fontSize:12},button:{flexShrink:0,alignSelf:"flex-start",borderWidth:1,borderRadius:8,paddingHorizontal:12,paddingVertical:6},buttonWide:{alignSelf:"center"},buttonText:{fontSize:12,fontWeight:"600"}});function cl({onBack:t,title:n="Go back"}){const{theme:o}=$i(),i=o.colors,[r,l]=e.useState(!1);/* @__PURE__ */
203
- return W(B,{onPress:t,accessibilityRole:"button",accessibilityLabel:n,...rt(()=>l(!0),()=>l(!1)),style:{padding:2,alignItems:"center",justifyContent:"center",borderRadius:999,transform:[{translateX:r?-2:0}]},children:/* @__PURE__ */W(A,{width:14,height:14,viewBox:"0 0 24 24",fill:"none",children:/* @__PURE__ */W(H,{d:"M19 12H5 M12 19l-7-7 7-7",stroke:r?i.text:i.textMuted,strokeWidth:2.5,strokeLinecap:"round",strokeLinejoin:"round"})})})}function sl({onBack:t,label:n="Games"}){const{theme:o}=$i(),i=o.colors,[r,l]=e.useState(!1),a=r?i.primary:i.textMuted;/* @__PURE__ */
204
- return T(B,{onPress:t,accessibilityRole:"button",accessibilityLabel:n,activeOpacity:.7,...rt(()=>l(!0),()=>l(!1)),style:{flexDirection:"row",alignItems:"center",gap:6,alignSelf:"flex-start",marginBottom:12,transform:[{translateX:r?-2:0}]},children:[/* @__PURE__ */W(A,{width:16,height:16,viewBox:"0 0 24 24",fill:"none",children:/* @__PURE__ */W(H,{d:"M19 12H5 M12 19l-7-7 7-7",stroke:a,strokeWidth:2.5,strokeLinecap:"round",strokeLinejoin:"round"})}),/* @__PURE__ */W(S,{style:{fontSize:14,fontWeight:"600",color:a},children:n})]})}function dl({onBack:t,hideActions:n,label:o,children:i}){const{theme:r}=$i(),l=r.colors,{width:a}=F(),c=a>=640,[s,d]=e.useState(!1);if(!t&&null==o&&!i)return null;const h=e=>/* @__PURE__ */W(S,{style:{fontSize:c?14:12,flexShrink:1,color:e},children:o});/* @__PURE__ */
205
- return T(z,{style:{flexDirection:"row",alignItems:"center",gap:6,marginTop:2},children:[t&&(null!=o?/* @__PURE__ */T(B,{onPress:t,accessibilityRole:"button",accessibilityLabel:"Go back",activeOpacity:.7,...rt(()=>d(!0),()=>d(!1)),style:{flexDirection:"row",alignItems:"center",gap:6,minWidth:0,flexShrink:1,transform:[{translateX:s?-2:0}]},children:[/* @__PURE__ */W(A,{width:14,height:14,viewBox:"0 0 24 24",fill:"none",children:/* @__PURE__ */W(H,{d:"M19 12H5 M12 19l-7-7 7-7",stroke:s?l.text:l.textMuted,strokeWidth:2.5,strokeLinecap:"round",strokeLinejoin:"round"})}),h(s?l.text:l.textMuted)]}):/* @__PURE__ */W(cl,{onBack:t})),!t&&null!=o&&h(l.textMuted),i]})}function hl({onBack:e,hideActions:t}={}){const{theme:n,headingFont:o,bodyFont:i,howToPlayMarkdown:r,selectedCategory:l,displayCategoryName:a}=$i(),c=n.colors,{width:s}=F(),d=s>=640,h=s>=768;/* @__PURE__ */
206
- return T(z,{style:d&&fl.headerWide,children:[/* @__PURE__ */T(z,{style:fl.titleRow,children:[/* @__PURE__ */W(S,{style:[fl.title,d&&fl.titleWide,h&&fl.titleDesktop,{color:se(n),fontFamily:o,flex:1}],children:"Choose your game"}),r?.trim()?/* @__PURE__ */W(z,{style:fl.howToPlayWrap,children:/* @__PURE__ */W(St,{content:r,title:"How to Play",colors:{text:c.text,textMuted:c.textMuted,border:c.border,background:c.background,backgroundAlt:c.backgroundAlt,primary:c.primary,primaryText:c.primaryText},bodyFont:i,headingFont:o})}):null]}),/* @__PURE__ */W(dl,{onBack:e,hideActions:t,label:l?a(l):void 0})]})}function ul({onCancel:e,onSelectGame:t}){const{theme:n,screenSize:o}=$i(),i=n.colors;return e&&"mobile"!==o?/* @__PURE__ */W(z,{style:[fl.footer],children:/* @__PURE__ */W(B,{onPress:e,style:[fl.secondaryBtn,{backgroundColor:i.buttonSecondary}],children:/* @__PURE__ */W(S,{style:[fl.secondaryBtnText,{color:i.buttonSecondaryText}],children:"Cancel"})})}):null}function gl({onSelectGame:t,onGameSetup:n,onRuleSetup:o,onGameSetBet:i,onPickYourDividend:r,onLadder:l,onMirror:a,onSafetyNet:c,onQuickPick:s,onCancel:d,hideTitle:h,hideActions:u,showPerfectPickSetup:g=!1,showTierFilter:f=!1}){const p=$i(),{theme:y,games:m,loading:b,error:w,selectedGame:x,selectedPropositionCount:k,handlePropositionCountChange:S,maxPayouts:C}=p;y.colors;const B=e.useRef(x);B.current=x;const{width:v}=F(),A=v>=640;/* @__PURE__ */
207
- return T(z,{style:fl.container,children:[!h&&/* @__PURE__ */W(z,{style:{marginBottom:A?24:16},children:/* @__PURE__ */W(hl,{onBack:d,hideActions:u})}),
208
- /* @__PURE__ */W(ll,{}),
209
- /* @__PURE__ */W(z,{style:fl.content,children:/* @__PURE__ */W($o,{games:m,selectedGame:x,onSelectGame:e=>{B.current=e,p.selectGame(e)},loading:b,error:w,theme:y,showTierFilter:f,selectedPropositionCount:k,onPropositionCountChange:S,onPropositionCountSelected:()=>{const e=B.current;if("rule_setup"===Yi(e)&&Ui(e)&&!g)return p.goToSportSelection(),void t?.();const s=Yi(e);if("quick_pick"===s||"selections"===s)return p.goToSportSelection(),void t?.();n?n(s):({game_set:i,pick_your_dividend:r,ladder:l,mirror:a,safety_net:c,rule_setup:o}[s]??o)?.()},onQuickPickGame:(e,t)=>{p.quickPickGame(e,t),s?.()},maxPayouts:C})})]})}var fl=k.create({container:{flex:1},headerWide:{paddingLeft:8},titleRow:{flexDirection:"row",alignItems:"flex-start",justifyContent:"space-between",gap:12},title:{fontSize:18,fontWeight:"700",lineHeight:22.5},titleWide:{fontSize:20,lineHeight:25},titleDesktop:{fontSize:24,lineHeight:30},howToPlayWrap:{flexShrink:0,marginTop:2},content:{flex:1},footer:{flexDirection:"row",alignItems:"center",paddingTop:16},secondaryBtn:{paddingHorizontal:20,paddingVertical:10,borderRadius:8},secondaryBtnText:{fontSize:14,fontWeight:"500"}});function pl({onBack:e,hideActions:t}={}){const{theme:n}=$i(),o=Ge(n),i=n.colors,{width:r}=F(),l=r>=640;/* @__PURE__ */
210
- return T(z,{style:l&&bl.headerWide,children:[/* @__PURE__ */W(S,{style:[bl.sectionTitle,l&&bl.sectionTitleWide,{color:i.primary,fontFamily:o}],children:"Pick a category"}),/* @__PURE__ */W(dl,{onBack:e,hideActions:t})]})}function yl({onCancel:e}){const{theme:t,screenSize:n}=$i(),o=t.colors;return e&&"mobile"!==n?/* @__PURE__ */W(z,{style:bl.footer,children:/* @__PURE__ */W(B,{onPress:e,style:[bl.secondaryBtn,{backgroundColor:o.buttonSecondary}],children:/* @__PURE__ */W(S,{style:[bl.secondaryBtnText,{color:o.buttonSecondaryText}],children:"Cancel"})})}):null}function ml({onSelectCategory:t,onCancel:n,hideTitle:o,hideActions:i,renderCategoryIcon:r,getCategoryTagline:l}){const{theme:a,propositionsForCategoryPicker:c,loading:s,setSelectedCategory:d,setSelectedSport:h,clearSelectedGame:u,displayCategoryName:g}=$i(),f=a.colors,p=be(a),y=Ne(a),{width:m}=F(),b=m>=640,w=m>=400,[x,k]=e.useState(null),[C,v]=e.useState(0),A=w?C>0?(C-(b?12:10))/2:"48%":"100%";ln(c);const R=an(c);return s?/* @__PURE__ */W(z,{style:bl.container,children:/* @__PURE__ */W(_n,{colors:ke(a),bodyFont:y,variant:"category",categoryCount:R.length>0?R.length:2})}):/* @__PURE__ */T(z,{style:bl.container,children:[!o&&/* @__PURE__ */W(z,{style:bl.titleWrap,children:/* @__PURE__ */W(pl,{onBack:n,hideActions:i})}),/* @__PURE__ */W(z,{style:bl.content,children:/* @__PURE__ */W(z,{style:[bl.grid,b&&bl.gridWide],onLayout:e=>v(e.nativeEvent.layout.width),children:R.map(e=>{const n=l?.(e)??function(e){return Ut[e]??""}(e),o=x===e;/* @__PURE__ */
211
- return T(B,{onPress:()=>{d(e),h(null),u(),t?.(e)},...rt(()=>k(e),()=>k(t=>t===e?null:t)),style:[bl.card,b&&bl.cardWide,{width:A,backgroundColor:p,borderColor:o?f.primary:f.border},o&&bl.cardHovered],activeOpacity:.85,children:[/* @__PURE__ */W(Wt,{label:g(e),category:e,icon:r?.(e),theme:a}),n?/* @__PURE__ */W(S,{style:[bl.tagline,b&&bl.taglineWide,{color:f.primary,fontFamily:y}],children:n}):null]},e)})})})]})}var bl=k.create({container:{flex:1},centered:{flex:1,flexDirection:"row",justifyContent:"center",alignItems:"center",padding:32},titleWrap:{marginBottom:8},headerWide:{paddingLeft:8},sectionTitle:{fontSize:10,fontWeight:"700",textTransform:"uppercase",letterSpacing:1.4,marginBottom:12},sectionTitleWide:{fontSize:12,letterSpacing:2.16,marginBottom:16},content:{flex:1},grid:{flexDirection:"row",flexWrap:"wrap",gap:10},gridWide:{gap:12},card:{alignItems:"flex-start",justifyContent:"center",gap:8,minHeight:112,borderRadius:16,borderWidth:1,padding:14},cardWide:{gap:12,minHeight:140,padding:20},cardHovered:{shadowColor:"#000",shadowOpacity:.1,shadowRadius:6,shadowOffset:{width:0,height:4},elevation:3},tagline:{fontSize:10,fontWeight:"500",textTransform:"uppercase",letterSpacing:.8},taglineWide:{fontSize:12,letterSpacing:1.2},footer:{flexDirection:"row",alignItems:"center",paddingTop:16},secondaryBtn:{paddingHorizontal:20,paddingVertical:10,borderRadius:8},secondaryBtnText:{fontSize:14,fontWeight:"500"}});function wl(e){if(!e)return"Start time to be confirmed";const t=new Date(e);return Number.isNaN(t.getTime())?e:new Intl.DateTimeFormat(void 0,{weekday:"short",day:"numeric",month:"short",hour:"numeric",minute:"2-digit"}).format(t)}function xl({name:e,renderTeamLogo:t,muted:n,headingFont:o,ink:i,wide:r}){if(!e)/* @__PURE__ */return W(S,{style:[Sl.teamName,{color:n,fontFamily:o}],children:"TBC"});const l=t?.(e);/* @__PURE__ */
212
- return T(z,{style:Sl.teamMark,children:[null!=l?/* @__PURE__ */W(z,{style:Sl.teamLogo,children:l}):null,/* @__PURE__ */W(S,{style:[Sl.teamName,r&&Sl.teamNameWide,{color:i,fontFamily:o}],children:e})]})}function kl({onSelectEvent:t}){const{theme:n,loading:o,sameGameMultiEvents:i,selectSameGameMultiEvent:r,renderTeamLogo:l,displaySportName:a}=$i(),c=n.colors,s=Ne(n),d=Ge(n),h=be(n),u=we(n),{width:g}=F(),f=g>=640,[p,y]=e.useState(null),[m,b]=e.useState(null);return o?/* @__PURE__ */W(z,{style:Sl.container,children:/* @__PURE__ */W(_n,{colors:ke(n),bodyFont:s,variant:"event"})}):/* @__PURE__ */T(z,{style:Sl.container,accessibilityLabel:"Available fixtures",children:[/* @__PURE__ */W(S,{style:[Sl.intro,{color:c.textMuted,fontFamily:s}],children:"All picks in your multi must come from one game."}),0===i.length?/* @__PURE__ */W(z,{accessibilityRole:"text",accessibilityLiveRegion:"polite",style:[Sl.emptyState,{borderColor:c.border,backgroundColor:h}],children:/* @__PURE__ */W(S,{style:[Sl.emptyText,{color:c.textMuted,fontFamily:s}],children:"No fixtures with available propositions."})}):/* @__PURE__ */W(z,{style:[Sl.list,f&&Sl.listWide],children:i.map(e=>{const n=p===e.id,o=m===e.id;/* @__PURE__ */
213
- return T(B,{accessibilityRole:"button",accessibilityLabel:`Select ${eo(e)}`,onPress:()=>{r(e.id),t?.(e.id)},activeOpacity:.85,...rt(()=>y(e.id),()=>y(t=>t===e.id?null:t)),onFocus:()=>b(e.id),onBlur:()=>b(t=>t===e.id?null:t),style:[Sl.card,f&&Sl.cardWide,{borderColor:n||o?c.primary:c.border,backgroundColor:h},n&&Sl.cardHovered],children:[/* @__PURE__ */T(z,{style:Sl.cardMain,children:[/* @__PURE__ */T(z,{style:[Sl.matchup,f&&Sl.matchupWide,{backgroundColor:u}],children:[
214
- /* @__PURE__ */W(xl,{name:e.homeTeam,renderTeamLogo:l,muted:c.textMuted,headingFont:d,ink:c.text,wide:f}),
215
- /* @__PURE__ */W(S,{style:[Sl.vs,{color:c.textMuted,fontFamily:d}],children:"vs"}),
216
- /* @__PURE__ */W(xl,{name:e.awayTeam,renderTeamLogo:l,muted:c.textMuted,headingFont:d,ink:c.text,wide:f})]}),/* @__PURE__ */T(S,{style:[Sl.meta,f&&Sl.metaWide,{color:c.textMuted,fontFamily:s}],children:[wl(e.commenceTime)," · ",e.propositionCount," proposition",1===e.propositionCount?"":"s",e.league||e.sport?` · ${e.league?.toUpperCase()??a(e.sport)}`:""]})]}),/* @__PURE__ */W(z,{style:{flexShrink:0,transform:[{translateX:n?2:0}]},children:/* @__PURE__ */W(zt,{size:22,color:c.textMuted})})]},e.id)})})]})}var Sl=k.create({container:{flex:1},centered:{flex:1,flexDirection:"row",justifyContent:"center",alignItems:"center",padding:32},intro:{fontSize:14,lineHeight:22.75,marginBottom:16},emptyState:{borderWidth:1,borderRadius:16,padding:24,alignItems:"center"},emptyText:{fontSize:14,textAlign:"center"},list:{gap:10},listWide:{gap:12},cardHovered:{shadowColor:"#000",shadowOpacity:.1,shadowRadius:6,shadowOffset:{width:0,height:4},elevation:3},card:{minHeight:64,width:"100%",flexDirection:"row",alignItems:"center",justifyContent:"space-between",gap:12,borderWidth:1,borderRadius:16,paddingHorizontal:14,paddingVertical:14},cardWide:{paddingHorizontal:20,paddingVertical:16},cardMain:{flex:1,minWidth:0},matchup:{flexDirection:"column",alignItems:"flex-start",gap:4,borderRadius:12,paddingHorizontal:12,paddingVertical:10},matchupWide:{flexDirection:"row",flexWrap:"wrap",alignItems:"center",columnGap:6},teamMark:{flexDirection:"row",alignItems:"center",gap:6,minWidth:0,maxWidth:"100%"},teamLogo:{flexShrink:0},teamName:{fontSize:14,fontWeight:"600",flexShrink:1},teamNameWide:{fontSize:16},vs:{fontSize:12,fontWeight:"400"},meta:{marginTop:8,fontSize:11,fontWeight:"500"},metaWide:{fontSize:12}});function Cl({counts:e,onPick:t,onDoubleAction:n,colors:o,align:l="right",direction:s="down",menuShadow:d="0 1px 0 rgba(255,255,255,0.6) inset, 0 20px 50px -24px rgba(15,23,42,0.22)"}){const[h,g]=c(!1),[f,p]=c(!1),[y,b]=c(null),w=a(0),x=a(null),k=a(null),[C,F]=c(null),[A,R]=c(null),L="web"===m.OS,D=36+36*e.length+12,M="up"===s||f?"up":"down";r(()=>{if(!h||!L)return;const e=x.current;if(!e||"function"!=typeof e.getBoundingClientRect)return;const t=e.getBoundingClientRect(),n=window.scrollX||window.pageXOffset||0,o=window.scrollY||window.pageYOffset||0;F({top:t.top+o,bottom:t.bottom+o,left:t.left+n,right:t.right+n,width:t.width});const i=window.innerHeight-t.bottom,r=t.top;p(i<D&&r>i)},[h,L,D]),i(()=>{if(!h)return b(null),void(L||p(!1));if(L){const e=e=>{const t=x.current,n=e.target;t&&"function"==typeof t.contains&&t.contains(n)||k.current&&k.current.contains(n)||g(!1)};return document.addEventListener("mousedown",e),()=>{document.removeEventListener("mousedown",e)}}const e=x.current;e&&"function"==typeof e.measureInWindow&&e.measureInWindow((e,t,n,o)=>{const i=u.get("window").height-(t+o);p(i<D&&t>i),R({x:e,y:t,width:n,height:o})})},[h,L,D]);const P=/* @__PURE__ */T(v,{children:[/* @__PURE__ */W(z,{style:{paddingHorizontal:12,paddingVertical:6,borderBottomWidth:1,borderBottomColor:o.border},children:/* @__PURE__ */W(S,{style:{fontSize:10,fontWeight:"700",color:o.text,opacity:.55,letterSpacing:.5,textTransform:"uppercase"},children:"How many picks?"})}),e.map(e=>/* @__PURE__ */T(B,{onPress:()=>{t(e),g(!1)},accessibilityRole:"menuitem",...rt(()=>b(e),()=>b(t=>t===e?null:t)),style:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",paddingHorizontal:12,paddingVertical:8,borderTopWidth:1,borderTopColor:o.border,backgroundColor:y===e?o.backgroundAlt:"transparent"},children:[/* @__PURE__ */T(S,{style:{fontSize:14,fontWeight:"600",color:o.text},children:[e," picks"]}),/* @__PURE__ */W(z,{style:{backgroundColor:o.backgroundAlt,paddingHorizontal:6,paddingVertical:2,borderRadius:4},children:/* @__PURE__ */W(S,{style:{color:o.text,fontSize:10,fontWeight:"700",letterSpacing:.5},children:"QP"})})]},e))]});/* @__PURE__ */
189
+ /* @__PURE__ */W(S,{style:[dl.emptyTitle,{color:w.text}],children:"pending"===k?"No pending entries":"No completed entries"}),
190
+ /* @__PURE__ */W(S,{style:[dl.emptySubtitle,{color:w.textMuted}],children:"pending"===k?"Entries awaiting results will appear here":"Settled entries will appear here"})]}),
191
+ /* @__PURE__ */W(z,{style:dl.entryList,children:te.map(e=>/* @__PURE__ */W(sl,{entry:e,game:X.get(e.game_id),propositionsById:Q,onSelect:u,theme:m,renderTeamLogo:p},e.id))})]})}function sl({entry:e,game:t,propositionsById:n,onSelect:o,theme:i,renderTeamLogo:r}){const a=i.colors,s=be(i),d=Ge(i),h="dark"===i.colorScheme,u=e.proposition_ids??[],g=l(()=>u.map(e=>n.get(e)).filter(Boolean),[u,n]),f=u.length,[p,y]=c(!1),m=f>0,b=l(()=>{const t=/* @__PURE__ */new Map;for(const n of e.propositions??[])t.set(n.id,n);return t},[e.propositions]),w=t=>{const o=e.selections?.[t];return null!=o?o:b.get(t)?.user_prediction??n.get(t)?.user_prediction},x=g.filter(e=>null!=e.result&&!e.is_voided).length,k=g.filter(e=>{if(null==e.result||e.is_voided)return!1;const t=w(e.id);return null!=t&&t===e.result}).length,C=null!=e.selections&&Object.keys(e.selections).length>0||(e.propositions??[]).some(e=>null!=e.user_prediction),F=Jt(e.pending),R=!F&&Qt(e.winning)>0,L=e.payout_status,D="fulfilled"===L&&R,M=F?"Pending":D?"Won — pay due":"paid_out"===L&&R?"Paid":R?"Won":"Lost",P=F||D?a.warningBg:R?a.successBg:a.errorBg,O=F||D?a.warningText:R?a.successText:a.errorText,I=C&&x>0?`${k}/${f} correct`:f>0?`${f} pick${1!==f?"s":""}`:null,E=C&&x>0?k>0?a.success:a.error:a.textMuted,j=/* @__PURE__ */T(z,{style:dl.cardHeader,children:[/* @__PURE__ */T(z,{style:dl.cardHeaderLeft,children:[(()=>{const n=t?t.allowed_propositions&&t.allowed_propositions.length>0&&t.game_name.replace(/\s+\d+\s*$/,"").trim()||t.game_name:`Game #${e.game_id}`;return t?/* @__PURE__ */W(rl,{iconUrl:Ze(t),gameName:n,height:18,chipColor:a.primary,textColor:a.text,iconColor:a.primaryText,accentColor:i.brand?.accent}):/* @__PURE__ */W(S,{style:[dl.cardGameName,{color:a.text,fontFamily:d}],numberOfLines:1,children:n})})(),/* @__PURE__ */T(z,{style:dl.metaRow,children:[(e.created_at||e.entry_date)&&/* @__PURE__ */W(S,{style:[dl.metaText,{color:a.textMuted}],children:_t(e.created_at||e.entry_date)}),I&&/* @__PURE__ */T(v,{children:[/* @__PURE__ */W(S,{style:[dl.metaDot,{color:a.textMuted}],children:"·"}),/* @__PURE__ */W(S,{style:[dl.metaText,{fontWeight:"500",color:E}],children:I})]})]})]}),/* @__PURE__ */T(z,{style:dl.cardHeaderRight,children:[
192
+ /* @__PURE__ */T(z,{style:dl.amounts,children:[Qt(e.bet_amount)>0&&/* @__PURE__ */W(S,{style:[dl.betLabel,{color:a.textMuted}],children:$t(Qt(e.bet_amount))}),!F&&Qt(e.winning)>0&&/* @__PURE__ */T(z,{style:{alignItems:"flex-end"},children:[/* @__PURE__ */W(S,{style:[dl.winAmount,{color:a.success}],children:$t(Qt(e.winning))}),(e.payout_jackpot??0)>0&&/* @__PURE__ */T(S,{style:{fontSize:12,fontWeight:"400",color:a.textMuted},children:["incl. ",$t(Qt(e.payout_jackpot))," jackpot"]})]})]}),
193
+ /* @__PURE__ */W(z,{style:[dl.statusPill,{backgroundColor:P}],children:/* @__PURE__ */W(S,{style:[dl.statusText,{color:O}],children:M})}),m&&/* @__PURE__ */W(z,{style:{transform:[{rotate:p?"180deg":"0deg"}]},accessibilityElementsHidden:!0,children:/* @__PURE__ */W(A,{width:18,height:18,viewBox:"0 0 24 24",fill:"none",children:/* @__PURE__ */W(H,{d:"m6 9 6 6 6-6",stroke:a.textMuted,strokeWidth:2.5,strokeLinecap:"round",strokeLinejoin:"round"})})})]})]});/* @__PURE__ */
194
+ return T(z,{style:[dl.card,{borderColor:a.border,backgroundColor:s,shadowColor:"#000",shadowOpacity:h?.4:.12,shadowRadius:12,shadowOffset:{width:0,height:6},elevation:2}],children:[/* @__PURE__ */W(B,{testID:"entry-card",onPress:()=>{m&&y(e=>!e),o?.({entry:e,game:t,propositions:g})},activeOpacity:.7,disabled:!m&&!o,accessibilityLabel:`Entry #${e.id}`,accessibilityState:m?{expanded:p}:void 0,children:j}),p&&f>0&&u.map(t=>{const o=(t=>n.get(t)??e.propositions?.find(e=>e.id===t))(t),l=w(t);if(!o)/* @__PURE__ */return T(z,{style:[dl.propRow,{borderTopColor:a.border,borderTopWidth:1}],children:[/* @__PURE__ */W(z,{style:dl.propInfo,children:/* @__PURE__ */T(S,{style:{fontSize:14,color:a.textMuted},children:["Loading proposition #",t,"…"]})}),null!=l&&/* @__PURE__ */W(ht,{theme:i,size:"sm",value:"yes"===l?"yes":"no"})]},t);const c=o.result,s=null!=c,d=!!o.is_voided,h=s&&!d&&null!=l&&l===c;let u,g,f;d?(u="Void",g=`${a.textMuted}20`,f=a.textMuted):s?h?(u="Won",g=a.successBg,f=a.successText):(u="Lost",g=a.errorBg,f=a.errorText):(u="Pending",g=a.warningBg,f=a.warningText);const p=rn(o)?void 0:o.home_team;/* @__PURE__ */
195
+ return T(z,{style:[dl.propRow,{borderTopColor:a.border,borderTopWidth:1}],children:[
196
+ /* @__PURE__ */T(z,{style:dl.propInfo,children:[(o.home_team||o.away_team)&&/* @__PURE__ */T(z,{style:dl.teamsRow,children:[r&&p?r(p):null,p?/* @__PURE__ */W(S,{style:[dl.teamName,{color:a.text}],children:p}):null,p&&o.away_team?/* @__PURE__ */W(S,{style:[dl.vsText,{color:a.textMuted}],children:"vs"}):null,r&&o.away_team?r(o.away_team):null,o.away_team?/* @__PURE__ */W(S,{style:[dl.teamName,{color:a.text}],children:o.away_team}):null]}),(o.proposition||o.description)&&/* @__PURE__ */W(S,{style:{fontSize:12,color:a.textMuted,marginTop:2},children:o.proposition||o.description}),o.commence_time&&/* @__PURE__ */W(S,{style:{fontSize:12,color:a.textMuted,marginTop:2},children:_t(o.commence_time)})]}),
197
+ /* @__PURE__ */T(z,{style:dl.outcomeCol,children:[/* @__PURE__ */W(S,{style:[dl.outcomeLabel,{color:a.textMuted}],children:"Pick"}),null!=l?/* @__PURE__ */W(ht,{theme:i,size:"sm",value:"yes"===l?"yes":"no"}):/* @__PURE__ */W(S,{style:{fontSize:12,color:a.textMuted},children:"—"})]}),
198
+ /* @__PURE__ */T(z,{style:dl.outcomeCol,children:[/* @__PURE__ */W(S,{style:[dl.outcomeLabel,{color:a.textMuted}],children:"Result"}),/* @__PURE__ */W(z,{style:{paddingHorizontal:8,paddingVertical:2,borderRadius:4,backgroundColor:g},children:/* @__PURE__ */W(S,{style:{fontSize:12,fontWeight:"700",color:f,textTransform:"uppercase"},children:u})})]})]},t)})]})}var dl=k.create({container:{flex:1},errorBanner:{padding:16,borderRadius:8,borderWidth:1},retryButton:{marginTop:8},tabBar:{flexDirection:"row",borderBottomWidth:1,marginBottom:16},tab:{flexDirection:"row",alignItems:"center",gap:8,paddingHorizontal:16,paddingVertical:10,borderBottomWidth:2,marginBottom:-1},tabLabel:{fontSize:14,fontWeight:"500"},tabBadge:{minWidth:20,height:20,paddingHorizontal:6,borderRadius:999,alignItems:"center",justifyContent:"center"},tabBadgeText:{fontSize:12,fontWeight:"600"},emptyState:{alignItems:"center",justifyContent:"center",paddingVertical:48,paddingHorizontal:16},emptyTitle:{fontSize:16,fontWeight:"500"},emptySubtitle:{fontSize:14,marginTop:4},entryList:{gap:12},card:{borderRadius:12,borderWidth:1,overflow:"hidden"},cardHeader:{flexDirection:"row",justifyContent:"space-between",alignItems:"center",paddingHorizontal:16,paddingVertical:12,gap:12},cardHeaderLeft:{flex:1,minWidth:0},cardGameName:{fontSize:16,fontWeight:"600"},metaRow:{flexDirection:"row",alignItems:"center",gap:8,marginTop:2},metaText:{fontSize:12},metaDot:{fontSize:12},cardHeaderRight:{flexDirection:"row",alignItems:"center",gap:12,flexShrink:0},amounts:{alignItems:"flex-end"},betLabel:{fontSize:12},winAmount:{fontSize:14,fontWeight:"700"},statusPill:{paddingHorizontal:10,paddingVertical:2,borderRadius:999},statusText:{fontSize:12,fontWeight:"700",textTransform:"uppercase",letterSpacing:.3},propRow:{flexDirection:"row",alignItems:"center",paddingHorizontal:16,paddingVertical:10,gap:12},propInfo:{flex:1},teamsRow:{flexDirection:"row",flexWrap:"wrap",alignItems:"center",gap:6},teamName:{fontSize:14,fontWeight:"500"},vsText:{fontSize:12,fontWeight:"400"},outcomeCol:{alignItems:"center",gap:2,flexShrink:0},outcomeLabel:{fontSize:9,fontWeight:"600",letterSpacing:.225,textTransform:"uppercase"}});function hl({style:t}){const{theme:n,bodyFont:o,eventFilterActive:i,eventFilterLabel:r,clearEventFilter:l,gameCategory:a}=or(),{width:c}=F(),s=c>=640,[d,h]=e.useState(!1);if(!i)return null;const u=n.colors,g=r??("racing"===a?"This race":"This event");/* @__PURE__ */
199
+ return T(z,{style:[ul.container,s&&ul.containerWide,{borderColor:`${u.primary}33`,backgroundColor:u.surface},t],children:[/* @__PURE__ */T(z,{style:ul.textBlock,children:[
200
+ /* @__PURE__ */W(S,{style:[ul.kicker,{color:u.primary,fontFamily:o}],children:"Event filter"}),
201
+ /* @__PURE__ */W(S,{style:[ul.label,{color:u.text,fontFamily:o}],numberOfLines:1,children:g}),
202
+ /* @__PURE__ */W(S,{style:[ul.hint,{color:u.textMuted,fontFamily:o}],children:"Only propositions from this event are shown."})]}),/* @__PURE__ */W(B,{onPress:l,...rt(()=>h(!0),()=>h(!1)),style:[ul.button,s&&ul.buttonWide,{borderColor:`${u.primary}44`,backgroundColor:u.background,opacity:d?.9:1}],children:/* @__PURE__ */W(S,{style:[ul.buttonText,{color:u.text,fontFamily:o}],children:"Show all events"})})]})}var ul=k.create({container:{marginBottom:16,flexDirection:"column",borderWidth:1,borderRadius:12,paddingHorizontal:12,paddingVertical:10,gap:8},containerWide:{flexDirection:"row",alignItems:"center",justifyContent:"space-between"},textBlock:{minWidth:0,flexShrink:1},kicker:{fontSize:10,fontWeight:"700",letterSpacing:1.2,textTransform:"uppercase"},label:{fontSize:14,fontWeight:"600"},hint:{fontSize:12},button:{flexShrink:0,alignSelf:"flex-start",borderWidth:1,borderRadius:8,paddingHorizontal:12,paddingVertical:6},buttonWide:{alignSelf:"center"},buttonText:{fontSize:12,fontWeight:"600"}});function gl({onBack:t,title:n="Go back"}){const{theme:o}=or(),i=o.colors,[r,l]=e.useState(!1);/* @__PURE__ */
203
+ return W(B,{onPress:t,accessibilityRole:"button",accessibilityLabel:n,...rt(()=>l(!0),()=>l(!1)),style:{padding:2,alignItems:"center",justifyContent:"center",borderRadius:999,transform:[{translateX:r?-2:0}]},children:/* @__PURE__ */W(A,{width:14,height:14,viewBox:"0 0 24 24",fill:"none",children:/* @__PURE__ */W(H,{d:"M19 12H5 M12 19l-7-7 7-7",stroke:r?i.text:i.textMuted,strokeWidth:2.5,strokeLinecap:"round",strokeLinejoin:"round"})})})}function fl({onBack:t,label:n="Games"}){const{theme:o}=or(),i=o.colors,[r,l]=e.useState(!1),a=r?i.primary:i.textMuted;/* @__PURE__ */
204
+ return T(B,{onPress:t,accessibilityRole:"button",accessibilityLabel:n,activeOpacity:.7,...rt(()=>l(!0),()=>l(!1)),style:{flexDirection:"row",alignItems:"center",gap:6,alignSelf:"flex-start",marginBottom:12,transform:[{translateX:r?-2:0}]},children:[/* @__PURE__ */W(A,{width:16,height:16,viewBox:"0 0 24 24",fill:"none",children:/* @__PURE__ */W(H,{d:"M19 12H5 M12 19l-7-7 7-7",stroke:a,strokeWidth:2.5,strokeLinecap:"round",strokeLinejoin:"round"})}),/* @__PURE__ */W(S,{style:{fontSize:14,fontWeight:"600",color:a},children:n})]})}function pl({onBack:t,hideActions:n,label:o,children:i}){const{theme:r}=or(),l=r.colors,{width:a}=F(),c=a>=640,[s,d]=e.useState(!1);if(!t&&null==o&&!i)return null;const h=e=>/* @__PURE__ */W(S,{style:{fontSize:c?14:12,flexShrink:1,color:e},children:o});/* @__PURE__ */
205
+ return T(z,{style:{flexDirection:"row",alignItems:"center",gap:6,marginTop:2},children:[t&&(null!=o?/* @__PURE__ */T(B,{onPress:t,accessibilityRole:"button",accessibilityLabel:"Go back",activeOpacity:.7,...rt(()=>d(!0),()=>d(!1)),style:{flexDirection:"row",alignItems:"center",gap:6,minWidth:0,flexShrink:1,transform:[{translateX:s?-2:0}]},children:[/* @__PURE__ */W(A,{width:14,height:14,viewBox:"0 0 24 24",fill:"none",children:/* @__PURE__ */W(H,{d:"M19 12H5 M12 19l-7-7 7-7",stroke:s?l.text:l.textMuted,strokeWidth:2.5,strokeLinecap:"round",strokeLinejoin:"round"})}),h(s?l.text:l.textMuted)]}):/* @__PURE__ */W(gl,{onBack:t})),!t&&null!=o&&h(l.textMuted),i]})}function yl({onBack:e,hideActions:t}={}){const{theme:n,headingFont:o,bodyFont:i,howToPlayMarkdown:r,selectedCategory:l,displayCategoryName:a}=or(),c=n.colors,{width:s}=F(),d=s>=640,h=s>=768;/* @__PURE__ */
206
+ return T(z,{style:d&&wl.headerWide,children:[/* @__PURE__ */T(z,{style:wl.titleRow,children:[/* @__PURE__ */W(S,{style:[wl.title,d&&wl.titleWide,h&&wl.titleDesktop,{color:se(n),fontFamily:o,flex:1}],children:"Choose your game"}),r?.trim()?/* @__PURE__ */W(z,{style:wl.howToPlayWrap,children:/* @__PURE__ */W(St,{content:r,title:"How to Play",colors:{text:c.text,textMuted:c.textMuted,border:c.border,background:c.background,backgroundAlt:c.backgroundAlt,primary:c.primary,primaryText:c.primaryText},bodyFont:i,headingFont:o})}):null]}),/* @__PURE__ */W(pl,{onBack:e,hideActions:t,label:l?a(l):void 0})]})}function ml({onCancel:e,onSelectGame:t}){const{theme:n,screenSize:o}=or(),i=n.colors;return e&&"mobile"!==o?/* @__PURE__ */W(z,{style:[wl.footer],children:/* @__PURE__ */W(B,{onPress:e,style:[wl.secondaryBtn,{backgroundColor:i.buttonSecondary}],children:/* @__PURE__ */W(S,{style:[wl.secondaryBtnText,{color:i.buttonSecondaryText}],children:"Cancel"})})}):null}function bl({onSelectGame:t,onGameSetup:n,onRuleSetup:o,onGameSetBet:i,onPickYourDividend:r,onLadder:l,onMirror:a,onSafetyNet:c,onQuickPick:s,onCancel:d,hideTitle:h,hideActions:u,showPerfectPickSetup:g=!1,showTierFilter:f=!1}){const p=or(),{theme:y,games:m,loading:b,error:w,selectedGame:x,selectedPropositionCount:k,handlePropositionCountChange:S,maxPayouts:C}=p;y.colors;const B=e.useRef(x);B.current=x;const{width:v}=F(),A=v>=640;/* @__PURE__ */
207
+ return T(z,{style:wl.container,children:[!h&&/* @__PURE__ */W(z,{style:{marginBottom:A?24:16},children:/* @__PURE__ */W(yl,{onBack:d,hideActions:u})}),
208
+ /* @__PURE__ */W(hl,{}),
209
+ /* @__PURE__ */W(z,{style:wl.content,children:/* @__PURE__ */W($o,{games:m,selectedGame:x,onSelectGame:e=>{B.current=e,p.selectGame(e)},loading:b,error:w,theme:y,showTierFilter:f,selectedPropositionCount:k,onPropositionCountChange:S,onPropositionCountSelected:()=>{const e=B.current;if("rule_setup"===Zi(e)&&Qi(e)&&!g)return p.goToSportSelection(),void t?.();const s=Zi(e);if("quick_pick"===s||"selections"===s)return p.goToSportSelection(),void t?.();n?n(s):({game_set:i,pick_your_dividend:r,ladder:l,mirror:a,safety_net:c,rule_setup:o}[s]??o)?.()},onQuickPickGame:(e,t)=>{p.quickPickGame(e,t),s?.()},maxPayouts:C})})]})}var wl=k.create({container:{flex:1},headerWide:{paddingLeft:8},titleRow:{flexDirection:"row",alignItems:"flex-start",justifyContent:"space-between",gap:12},title:{fontSize:18,fontWeight:"700",lineHeight:22.5},titleWide:{fontSize:20,lineHeight:25},titleDesktop:{fontSize:24,lineHeight:30},howToPlayWrap:{flexShrink:0,marginTop:2},content:{flex:1},footer:{flexDirection:"row",alignItems:"center",paddingTop:16},secondaryBtn:{paddingHorizontal:20,paddingVertical:10,borderRadius:8},secondaryBtnText:{fontSize:14,fontWeight:"500"}});function xl({onBack:e,hideActions:t}={}){const{theme:n}=or(),o=Ge(n),i=n.colors,{width:r}=F(),l=r>=640;/* @__PURE__ */
210
+ return T(z,{style:l&&Cl.headerWide,children:[/* @__PURE__ */W(S,{style:[Cl.sectionTitle,l&&Cl.sectionTitleWide,{color:i.primary,fontFamily:o}],children:"Pick a category"}),/* @__PURE__ */W(pl,{onBack:e,hideActions:t})]})}function kl({onCancel:e}){const{theme:t,screenSize:n}=or(),o=t.colors;return e&&"mobile"!==n?/* @__PURE__ */W(z,{style:Cl.footer,children:/* @__PURE__ */W(B,{onPress:e,style:[Cl.secondaryBtn,{backgroundColor:o.buttonSecondary}],children:/* @__PURE__ */W(S,{style:[Cl.secondaryBtnText,{color:o.buttonSecondaryText}],children:"Cancel"})})}):null}function Sl({onSelectCategory:t,onCancel:n,hideTitle:o,hideActions:i,renderCategoryIcon:r,getCategoryTagline:l}){const{theme:a,propositionsForCategoryPicker:c,loading:s,setSelectedCategory:d,setSelectedSport:h,clearSelectedGame:u,displayCategoryName:g}=or(),f=a.colors,p=be(a),y=Ne(a),{width:m}=F(),b=m>=640,w=m>=400,[x,k]=e.useState(null),[C,v]=e.useState(0),A=w?C>0?(C-(b?12:10))/2:"48%":"100%";ln(c);const R=an(c);return s?/* @__PURE__ */W(z,{style:Cl.container,children:/* @__PURE__ */W(_n,{colors:ke(a),bodyFont:y,variant:"category",categoryCount:R.length>0?R.length:2})}):/* @__PURE__ */T(z,{style:Cl.container,children:[!o&&/* @__PURE__ */W(z,{style:Cl.titleWrap,children:/* @__PURE__ */W(xl,{onBack:n,hideActions:i})}),/* @__PURE__ */W(z,{style:Cl.content,children:/* @__PURE__ */W(z,{style:[Cl.grid,b&&Cl.gridWide],onLayout:e=>v(e.nativeEvent.layout.width),children:R.map(e=>{const n=l?.(e)??function(e){return Ut[e]??""}(e),o=x===e;/* @__PURE__ */
211
+ return T(B,{onPress:()=>{d(e),h(null),u(),t?.(e)},...rt(()=>k(e),()=>k(t=>t===e?null:t)),style:[Cl.card,b&&Cl.cardWide,{width:A,backgroundColor:p,borderColor:o?f.primary:f.border},o&&Cl.cardHovered],activeOpacity:.85,children:[/* @__PURE__ */W(Wt,{label:g(e),category:e,icon:r?.(e),theme:a}),n?/* @__PURE__ */W(S,{style:[Cl.tagline,b&&Cl.taglineWide,{color:f.primary,fontFamily:y}],children:n}):null]},e)})})})]})}var Cl=k.create({container:{flex:1},centered:{flex:1,flexDirection:"row",justifyContent:"center",alignItems:"center",padding:32},titleWrap:{marginBottom:8},headerWide:{paddingLeft:8},sectionTitle:{fontSize:10,fontWeight:"700",textTransform:"uppercase",letterSpacing:1.4,marginBottom:12},sectionTitleWide:{fontSize:12,letterSpacing:2.16,marginBottom:16},content:{flex:1},grid:{flexDirection:"row",flexWrap:"wrap",gap:10},gridWide:{gap:12},card:{alignItems:"flex-start",justifyContent:"center",gap:8,minHeight:112,borderRadius:16,borderWidth:1,padding:14},cardWide:{gap:12,minHeight:140,padding:20},cardHovered:{shadowColor:"#000",shadowOpacity:.1,shadowRadius:6,shadowOffset:{width:0,height:4},elevation:3},tagline:{fontSize:10,fontWeight:"500",textTransform:"uppercase",letterSpacing:.8},taglineWide:{fontSize:12,letterSpacing:1.2},footer:{flexDirection:"row",alignItems:"center",paddingTop:16},secondaryBtn:{paddingHorizontal:20,paddingVertical:10,borderRadius:8},secondaryBtnText:{fontSize:14,fontWeight:"500"}});function Bl(e){if(!e)return"Start time to be confirmed";const t=new Date(e);return Number.isNaN(t.getTime())?e:new Intl.DateTimeFormat(void 0,{weekday:"short",day:"numeric",month:"short",hour:"numeric",minute:"2-digit"}).format(t)}function zl({name:e,renderTeamLogo:t,muted:n,headingFont:o,ink:i,wide:r}){if(!e)/* @__PURE__ */return W(S,{style:[vl.teamName,{color:n,fontFamily:o}],children:"TBC"});const l=t?.(e);/* @__PURE__ */
212
+ return T(z,{style:vl.teamMark,children:[null!=l?/* @__PURE__ */W(z,{style:vl.teamLogo,children:l}):null,/* @__PURE__ */W(S,{style:[vl.teamName,r&&vl.teamNameWide,{color:i,fontFamily:o}],children:e})]})}function Fl({onSelectEvent:t}){const{theme:n,loading:o,sameGameMultiEvents:i,selectSameGameMultiEvent:r,renderTeamLogo:l,displaySportName:a}=or(),c=n.colors,s=Ne(n),d=Ge(n),h=be(n),u=we(n),{width:g}=F(),f=g>=640,[p,y]=e.useState(null),[m,b]=e.useState(null);return o?/* @__PURE__ */W(z,{style:vl.container,children:/* @__PURE__ */W(_n,{colors:ke(n),bodyFont:s,variant:"event"})}):/* @__PURE__ */T(z,{style:vl.container,accessibilityLabel:"Available fixtures",children:[/* @__PURE__ */W(S,{style:[vl.intro,{color:c.textMuted,fontFamily:s}],children:"All picks in your multi must come from one game."}),0===i.length?/* @__PURE__ */W(z,{accessibilityRole:"text",accessibilityLiveRegion:"polite",style:[vl.emptyState,{borderColor:c.border,backgroundColor:h}],children:/* @__PURE__ */W(S,{style:[vl.emptyText,{color:c.textMuted,fontFamily:s}],children:"No fixtures with available propositions."})}):/* @__PURE__ */W(z,{style:[vl.list,f&&vl.listWide],children:i.map(e=>{const n=p===e.id,o=m===e.id;/* @__PURE__ */
213
+ return T(B,{accessibilityRole:"button",accessibilityLabel:`Select ${eo(e)}`,onPress:()=>{r(e.id),t?.(e.id)},activeOpacity:.85,...rt(()=>y(e.id),()=>y(t=>t===e.id?null:t)),onFocus:()=>b(e.id),onBlur:()=>b(t=>t===e.id?null:t),style:[vl.card,f&&vl.cardWide,{borderColor:n||o?c.primary:c.border,backgroundColor:h},n&&vl.cardHovered],children:[/* @__PURE__ */T(z,{style:vl.cardMain,children:[/* @__PURE__ */T(z,{style:[vl.matchup,f&&vl.matchupWide,{backgroundColor:u}],children:[
214
+ /* @__PURE__ */W(zl,{name:e.homeTeam,renderTeamLogo:l,muted:c.textMuted,headingFont:d,ink:c.text,wide:f}),
215
+ /* @__PURE__ */W(S,{style:[vl.vs,{color:c.textMuted,fontFamily:d}],children:"vs"}),
216
+ /* @__PURE__ */W(zl,{name:e.awayTeam,renderTeamLogo:l,muted:c.textMuted,headingFont:d,ink:c.text,wide:f})]}),/* @__PURE__ */T(S,{style:[vl.meta,f&&vl.metaWide,{color:c.textMuted,fontFamily:s}],children:[Bl(e.commenceTime)," · ",e.propositionCount," proposition",1===e.propositionCount?"":"s",e.league||e.sport?` · ${e.league?.toUpperCase()??a(e.sport)}`:""]})]}),/* @__PURE__ */W(z,{style:{flexShrink:0,transform:[{translateX:n?2:0}]},children:/* @__PURE__ */W(zt,{size:22,color:c.textMuted})})]},e.id)})})]})}var vl=k.create({container:{flex:1},centered:{flex:1,flexDirection:"row",justifyContent:"center",alignItems:"center",padding:32},intro:{fontSize:14,lineHeight:22.75,marginBottom:16},emptyState:{borderWidth:1,borderRadius:16,padding:24,alignItems:"center"},emptyText:{fontSize:14,textAlign:"center"},list:{gap:10},listWide:{gap:12},cardHovered:{shadowColor:"#000",shadowOpacity:.1,shadowRadius:6,shadowOffset:{width:0,height:4},elevation:3},card:{minHeight:64,width:"100%",flexDirection:"row",alignItems:"center",justifyContent:"space-between",gap:12,borderWidth:1,borderRadius:16,paddingHorizontal:14,paddingVertical:14},cardWide:{paddingHorizontal:20,paddingVertical:16},cardMain:{flex:1,minWidth:0},matchup:{flexDirection:"column",alignItems:"flex-start",gap:4,borderRadius:12,paddingHorizontal:12,paddingVertical:10},matchupWide:{flexDirection:"row",flexWrap:"wrap",alignItems:"center",columnGap:6},teamMark:{flexDirection:"row",alignItems:"center",gap:6,minWidth:0,maxWidth:"100%"},teamLogo:{flexShrink:0},teamName:{fontSize:14,fontWeight:"600",flexShrink:1},teamNameWide:{fontSize:16},vs:{fontSize:12,fontWeight:"400"},meta:{marginTop:8,fontSize:11,fontWeight:"500"},metaWide:{fontSize:12}});function Wl({counts:e,onPick:t,onDoubleAction:n,colors:o,align:l="right",direction:s="down",menuShadow:d="0 1px 0 rgba(255,255,255,0.6) inset, 0 20px 50px -24px rgba(15,23,42,0.22)"}){const[h,g]=c(!1),[f,p]=c(!1),[y,b]=c(null),w=a(0),x=a(null),k=a(null),[C,F]=c(null),[A,R]=c(null),L="web"===m.OS,D=36+36*e.length+12,M="up"===s||f?"up":"down";r(()=>{if(!h||!L)return;const e=x.current;if(!e||"function"!=typeof e.getBoundingClientRect)return;const t=e.getBoundingClientRect(),n=window.scrollX||window.pageXOffset||0,o=window.scrollY||window.pageYOffset||0;F({top:t.top+o,bottom:t.bottom+o,left:t.left+n,right:t.right+n,width:t.width});const i=window.innerHeight-t.bottom,r=t.top;p(i<D&&r>i)},[h,L,D]),i(()=>{if(!h)return b(null),void(L||p(!1));if(L){const e=e=>{const t=x.current,n=e.target;t&&"function"==typeof t.contains&&t.contains(n)||k.current&&k.current.contains(n)||g(!1)};return document.addEventListener("mousedown",e),()=>{document.removeEventListener("mousedown",e)}}const e=x.current;e&&"function"==typeof e.measureInWindow&&e.measureInWindow((e,t,n,o)=>{const i=u.get("window").height-(t+o);p(i<D&&t>i),R({x:e,y:t,width:n,height:o})})},[h,L,D]);const P=/* @__PURE__ */T(v,{children:[/* @__PURE__ */W(z,{style:{paddingHorizontal:12,paddingVertical:6,borderBottomWidth:1,borderBottomColor:o.border},children:/* @__PURE__ */W(S,{style:{fontSize:10,fontWeight:"700",color:o.text,opacity:.55,letterSpacing:.5,textTransform:"uppercase"},children:"How many picks?"})}),e.map(e=>/* @__PURE__ */T(B,{onPress:()=>{t(e),g(!1)},accessibilityRole:"menuitem",...rt(()=>b(e),()=>b(t=>t===e?null:t)),style:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",paddingHorizontal:12,paddingVertical:8,borderTopWidth:1,borderTopColor:o.border,backgroundColor:y===e?o.backgroundAlt:"transparent"},children:[/* @__PURE__ */T(S,{style:{fontSize:14,fontWeight:"600",color:o.text},children:[e," picks"]}),/* @__PURE__ */W(z,{style:{backgroundColor:o.backgroundAlt,paddingHorizontal:6,paddingVertical:2,borderRadius:4},children:/* @__PURE__ */W(S,{style:{color:o.text,fontSize:10,fontWeight:"700",letterSpacing:.5},children:"QP"})})]},e))]});/* @__PURE__ */
217
217
  return T(z,{ref:x,style:{position:"relative",flexShrink:0},children:[
218
- /* @__PURE__ */W(er,{onPress:()=>{if(!n)return void g(e=>!e);const e=Date.now();if(e-w.current<280)return w.current=0,g(!1),void n();w.current=e,setTimeout(()=>{w.current&&Date.now()-w.current>=270&&(w.current=0,g(e=>!e))},290)}}),h&&L&&C&&"undefined"!=typeof document&&G(/* @__PURE__ */W("div",{ref:k,role:"menu",style:{position:"absolute",top:"up"===M?void 0:C.bottom+6,..."up"===M?{top:C.top-6,transform:"translateY(-100%)"}:null,left:"left"===l?C.left:void 0,..."right"===l?{left:C.right,transform:"up"===M?"translate(-100%, -100%)":"translateX(-100%)"}:null,zIndex:20,backgroundColor:o.background,border:`1px solid ${o.border}`,borderRadius:8,minWidth:160,boxShadow:d,overflow:"hidden"},children:P}),document.body),
219
- /* @__PURE__ */W(jn,{visible:h&&!L,anchor:A,onClose:()=>g(!1),flipUp:"up"===M,align:l,children:/* @__PURE__ */W(z,{accessibilityRole:"menu",style:{elevation:8,backgroundColor:o.background,borderRadius:8,borderWidth:1,borderColor:o.border,minWidth:160,shadowColor:"#000",shadowOffset:{width:0,height:6},shadowOpacity:.18,shadowRadius:12,overflow:"hidden"},children:P})})]})}var Bl="Your stake";function zl(e,t){const n=e?.top_payouts?.find(e=>Number(e.proposition_count)===t);if(!n)return 0;const o=n.bet_amount&&n.bet_amount>0?n.bet_amount:20,i=Number(n.net_payout);return Number.isFinite(i)?i/o*20:0}function Fl({gameKey:e,short:t,size:n=56,footer:o="YESNO Multi",title:i,sportBaseKey:r}){const l=qt(e,r,t),a=function(e){return e.length<=3?92:4===e.length?72:56}(l);/* @__PURE__ */
218
+ /* @__PURE__ */W(rr,{onPress:()=>{if(!n)return void g(e=>!e);const e=Date.now();if(e-w.current<280)return w.current=0,g(!1),void n();w.current=e,setTimeout(()=>{w.current&&Date.now()-w.current>=270&&(w.current=0,g(e=>!e))},290)}}),h&&L&&C&&"undefined"!=typeof document&&G(/* @__PURE__ */W("div",{ref:k,role:"menu",style:{position:"absolute",top:"up"===M?void 0:C.bottom+6,..."up"===M?{top:C.top-6,transform:"translateY(-100%)"}:null,left:"left"===l?C.left:void 0,..."right"===l?{left:C.right,transform:"up"===M?"translate(-100%, -100%)":"translateX(-100%)"}:null,zIndex:20,backgroundColor:o.background,border:`1px solid ${o.border}`,borderRadius:8,minWidth:160,boxShadow:d,overflow:"hidden"},children:P}),document.body),
219
+ /* @__PURE__ */W(jn,{visible:h&&!L,anchor:A,onClose:()=>g(!1),flipUp:"up"===M,align:l,children:/* @__PURE__ */W(z,{accessibilityRole:"menu",style:{elevation:8,backgroundColor:o.background,borderRadius:8,borderWidth:1,borderColor:o.border,minWidth:160,shadowColor:"#000",shadowOffset:{width:0,height:6},shadowOpacity:.18,shadowRadius:12,overflow:"hidden"},children:P})})]})}var Tl="Your stake";function Al(e,t){const n=e?.top_payouts?.find(e=>Number(e.proposition_count)===t);if(!n)return 0;const o=n.bet_amount&&n.bet_amount>0?n.bet_amount:20,i=Number(n.net_payout);return Number.isFinite(i)?i/o*20:0}function Rl({gameKey:e,short:t,size:n=56,footer:o="YESNO Multi",title:i,sportBaseKey:r}){const l=qt(e,r,t),a=function(e){return e.length<=3?92:4===e.length?72:56}(l);/* @__PURE__ */
220
220
  return T(A,{viewBox:"0 0 360 360",width:n,height:n,accessibilityLabel:i??`${l} button`,children:[
221
221
  /* @__PURE__ */W(I,{x:2,y:2,width:356,height:356,rx:78,fill:"#DDD9D2",stroke:Yt,strokeWidth:4}),
222
222
  /* @__PURE__ */W(I,{x:50,y:10,width:260,height:260,rx:52,fill:Yt,opacity:.3}),
223
223
  /* @__PURE__ */W(I,{x:50,y:35,width:260,height:260,rx:52,fill:Yt,opacity:.55}),
224
224
  /* @__PURE__ */W(I,{x:50,y:60,width:260,height:260,rx:52,fill:Yt}),
225
- /* @__PURE__ */W(N,{x:180,y:220,fontFamily:"Manrope, Poppins, sans-serif",fontSize:a,letterSpacing:-3,textAnchor:"middle",fontWeight:"800",fill:"#DFFF1A",children:l}),o&&/* @__PURE__ */T(v,{children:[/* @__PURE__ */W(N,{x:180,y:345,fontFamily:"Manrope, Poppins, sans-serif",fontSize:24,letterSpacing:-.5,textAnchor:"middle",fontWeight:"700",fill:Yt,children:o}),/* @__PURE__ */W(N,{x:262,y:333,fontFamily:"Manrope, Poppins, sans-serif",fontSize:10,fontWeight:"600",fill:Yt,children:"TM"})]})]})}var vl="yesno:favourite-sport",Wl=null;function Tl(){try{return globalThis.localStorage??null}catch{return null}}function Al({label:t="Pick your sport",sublabel:n,renderSportLogo:o,style:i}){const{theme:r,sportOptions:l,sportSummaries:a,selectedSport:c,setSelectedSport:s,sportBaseKey:d,displaySportName:h,selections:u,toggleSelection:g,enableSportFavourites:f}=$i(),p=r.colors,y=be(r),m=Ne(r),b=Ge(r),w=se(r),x=fe(r),[k,C]=e.useState(null);if(e.useEffect(()=>{C(f?function(){try{const e=Tl()?.getItem(vl);if(e)return e}catch{}return Wl}():null)},[f]),l.length<2)return null;const F=k?[...l].sort((e,t)=>Number(t.key===k)-Number(e.key===k)):l,v=void 0===n?f?"Tap to select. Star your favourite to pin it up front.":"Tap to select.":n;/* @__PURE__ */
226
- return T(z,{style:[Ll.wrap,i],children:[t?/* @__PURE__ */W(S,{style:[Ll.label,{color:w,fontFamily:b}],children:t}):null,v?/* @__PURE__ */W(S,{style:[Ll.hint,{color:p.textMuted,fontFamily:m}],children:v}):null,
227
- /* @__PURE__ */W(Rt,{theme:r,contentContainerStyle:Ll.shelf,children:F.map(({key:e,count:t})=>{const n=a.find(t=>t.key===e),i=n?.games_today??0,l=c===e,F=k===e,v=n?.label??h(e);/* @__PURE__ */
228
- return T(z,{style:Ll.slot,children:[/* @__PURE__ */T(B,{accessibilityRole:"button",accessibilityState:{selected:l},activeOpacity:.85,onPress:()=>(e=>{if(e!==c){for(const e of Object.keys(u)){const t=Number(e);g(t,u[t])}s(e)}})(e),style:[Ll.card,Rl(r),{backgroundColor:y,borderColor:l?p.primary:p.border,borderWidth:l?2:1,paddingTop:(f?26:12)-(l?1:0),paddingBottom:l?7:8}],children:[
229
- /* @__PURE__ */T(z,{style:Ll.tile,children:[o?o(e):/* @__PURE__ */W(Fl,{gameKey:e,size:40,footer:null,sportBaseKey:d,title:`${v} button`}),i>0&&/* @__PURE__ */W(z,{style:[Ll.liveDot,{backgroundColor:p.success,borderColor:y}]})]}),
230
- /* @__PURE__ */W(S,{numberOfLines:2,style:[Ll.name,{color:l?w:p.text,fontFamily:b}],children:v}),
231
- /* @__PURE__ */W(S,{numberOfLines:1,style:[Ll.caption,{color:l?p.primary:ne(p.textMuted,.9),fontFamily:m}],children:Kt(i,t).toUpperCase()})]}),f&&/* @__PURE__ */W(B,{accessibilityRole:"button",accessibilityState:{selected:F},accessibilityLabel:F?`Unpin ${v}`:`Pin ${v} to the front`,activeOpacity:.7,onPress:()=>(e=>{const t=k===e?null:e;C(t),function(e){Wl=e;try{e?Tl()?.setItem(vl,e):Tl()?.removeItem(vl)}catch{}}(t)})(e),style:Ll.starHit,children:/* @__PURE__ */W(z,{style:[Ll.star,{backgroundColor:F?ne(x,.22):y,borderColor:F?x:p.border}],children:/* @__PURE__ */W(At,{size:12,filled:F,color:F?w:ne(p.textMuted,.6)})})})]},e)})})]})}function Rl(e){return{shadowColor:"#000",shadowOpacity:"dark"===e.colorScheme?.4:.12,shadowRadius:12,shadowOffset:{width:0,height:6},elevation:2}}var Ll=k.create({wrap:{minWidth:0},label:{paddingLeft:2,fontSize:14,fontWeight:"800",lineHeight:18,letterSpacing:-.2},hint:{marginBottom:6,paddingLeft:2,fontSize:12,lineHeight:16},shelf:{alignItems:"stretch",gap:10,paddingHorizontal:2,paddingTop:4,paddingBottom:10},slot:{position:"relative",width:88},card:{width:88,minHeight:44,borderRadius:16,paddingHorizontal:6,alignItems:"center",gap:6},tile:{position:"relative"},liveDot:{position:"absolute",top:-2,right:-2,width:10,height:10,borderRadius:5,borderWidth:2},name:{fontSize:11,fontWeight:"800",lineHeight:13,letterSpacing:-.2,textAlign:"center"},caption:{fontSize:9,fontWeight:"700",letterSpacing:.9,textAlign:"center"},starHit:{position:"absolute",left:0,top:0,width:32,height:32,alignItems:"center",justifyContent:"center",zIndex:1},star:{width:20,height:20,borderRadius:10,borderWidth:1,alignItems:"center",justifyContent:"center"}});function Dl(e,t){const n=/^#([0-9a-f]{6})$/i.exec((e??"").trim());if(!n)return e;const o=parseInt(n[1],16);return`rgba(${o>>16&255}, ${o>>8&255}, ${255&o}, ${t})`}function Ml({iconUrl:e,size:t=56}){const{theme:n}=$i(),o=n.colors,i=n.brand?.chip??o.primary,r=n.brand?.icon??o.primaryText,l=pe(i,fe(n),r);/* @__PURE__ */
232
- return W(z,{style:{width:t,height:t,borderRadius:.3*t,backgroundColor:i,borderWidth:1,borderColor:Dl(r,.16),alignItems:"center",justifyContent:"center",shadowColor:i,shadowOpacity:.45,shadowRadius:9,shadowOffset:{width:0,height:4},elevation:2},children:/* @__PURE__ */W(On,{iconUrl:e,width:Math.round(.68*t),height:Math.round(.68*t),iconColor:r,accentColor:l})})}function Pl({eyebrow:e,iconUrl:t,gameName:n,tagline:o,style:i}){const{theme:r,screenSize:l}=$i(),a=r.colors,c=Ge(r),s="mobile"===l,{width:d}=F(),h=d>=640;/* @__PURE__ */
233
- return T(z,{style:[Hl.block,h&&Hl.blockWide,i],children:[e&&h?/* @__PURE__ */W(S,{style:[Hl.eyebrow,{color:a.primary,fontFamily:c}],children:e.toUpperCase()}):null,
234
- /* @__PURE__ */W(el,{iconUrl:t,gameName:n,height:s?20:32,chipColor:a.primary,textColor:a.text,iconColor:a.primaryText,accentColor:r.brand?.accent,compact:s}),o?/* @__PURE__ */W(S,{style:[Hl.tagline,h&&Hl.taglineWide,{color:a.textMuted}],children:o}):null]})}var Hl=k.create({block:{alignItems:"center",marginBottom:16},blockWide:{marginBottom:28},eyebrow:{fontSize:12,fontWeight:"700",textTransform:"uppercase",letterSpacing:2.16,marginBottom:20,textAlign:"center"},tagline:{marginTop:8,fontSize:13,lineHeight:18,textAlign:"center",maxWidth:384},taglineWide:{marginTop:12,fontSize:15,lineHeight:24}});function Ol({ariaLabel:e,children:t}){const{width:n}=F();return n>=640?/* @__PURE__ */W(z,{accessibilityRole:"radiogroup",accessibilityLabel:e,style:El.grid,children:t}):/* @__PURE__ */W(x,{horizontal:!0,showsHorizontalScrollIndicator:!1,accessibilityRole:"radiogroup",accessibilityLabel:e,contentContainerStyle:El.rail,children:t})}function Il(e,t="21%"){return e?{flexGrow:1,flexBasis:t,minWidth:0}:{width:124,flexGrow:0,flexShrink:0}}var El=k.create({grid:{flexDirection:"row",flexWrap:"wrap",gap:8},rail:{flexDirection:"row",gap:8,paddingBottom:4}});function jl({legs:e,prizeBall:t=!0}){const{theme:n}=$i(),o=n.colors.primary,i=fe(n);/* @__PURE__ */
235
- return T(z,{style:{flexDirection:"row",alignItems:"center"},children:[Array.from({length:e}).map((e,t)=>/* @__PURE__ */W(z,{style:{width:5,height:5,borderRadius:1.5,backgroundColor:o,opacity:.85,marginRight:3}},t)),t?/* @__PURE__ */W(z,{style:{width:7,height:7,borderRadius:999,backgroundColor:i,marginLeft:2}}):null]})}function Nl({tile:e,label:t,stat:n,detail:o,onSelect:i,children:r}){const{theme:l}=$i(),a=l.colors,s=Ge(l),d=se(l),h=a.primary,u=a.selectionCard??a.backgroundAlt,{width:g}=F(),f=g>=640,[p,y]=c(!1);/* @__PURE__ */
236
- return T(z,{...rt(()=>y(!0),()=>y(!1)),style:[Gl.card,f&&Gl.cardWide,{backgroundColor:u,borderColor:p?h:a.border,shadowColor:p?h:"#000",shadowOpacity:p?.28:.08,shadowRadius:p?14:10,shadowOffset:{width:0,height:p?12:8},elevation:p?4:1,transform:[{translateY:p?-2:0}]}],children:[/* @__PURE__ */T(B,{onPress:i,activeOpacity:.85,style:[Gl.cardMain,f&&Gl.cardMainWide],children:[e,
237
- /* @__PURE__ */T(z,{style:[Gl.cardText,f&&Gl.cardTextWide],children:[/* @__PURE__ */T(z,{style:Gl.titleRow,children:[/* @__PURE__ */W(S,{style:[Gl.cardTitle,f&&Gl.cardTitleWide,{color:d,fontFamily:s}],children:t}),n?/* @__PURE__ */W(z,{style:[Gl.statChip,{backgroundColor:Dl(h,.12)}],children:/* @__PURE__ */W(S,{style:[Gl.statChipText,{color:h}],children:n.toUpperCase()})}):null]}),o&&o.length>0?/* @__PURE__ */W(z,{style:Gl.detailBlock,children:(f?o:o.slice(0,1)).map(e=>/* @__PURE__ */W(S,{style:[Gl.detailLine,f&&Gl.detailLineWide,{color:a.textMuted}],children:e},e))}):null]}),
238
- /* @__PURE__ */W(z,{style:[Gl.chevron,{transform:[{translateX:p?2:0}]}],children:/* @__PURE__ */W(A,{width:22,height:22,viewBox:"0 0 24 24",fill:"none",children:/* @__PURE__ */W(H,{d:"m9 6 6 6-6 6",stroke:h,strokeWidth:2.5,strokeLinecap:"round",strokeLinejoin:"round"})})})]}),r?/* @__PURE__ */W(z,{style:[Gl.childrenWrap,{borderTopColor:Dl(d,.08)}],children:r}):null]})}var Gl=k.create({card:{flexGrow:1,borderWidth:2,borderRadius:24,paddingHorizontal:14,paddingVertical:14},cardWide:{paddingHorizontal:20,paddingVertical:20},cardMain:{flexDirection:"row",alignItems:"flex-start",gap:14,flexGrow:1},cardMainWide:{gap:16},cardText:{flex:1,minWidth:0,gap:4},cardTextWide:{gap:6},titleRow:{flexDirection:"row",flexWrap:"wrap",alignItems:"center",columnGap:8,rowGap:4},cardTitle:{fontSize:16,fontWeight:"800",letterSpacing:-.4},cardTitleWide:{fontSize:20,letterSpacing:-.5},statChip:{borderRadius:999,paddingHorizontal:8,paddingVertical:2},statChipText:{fontSize:9,fontWeight:"700",letterSpacing:.72},detailBlock:{gap:2},detailLine:{fontSize:12,lineHeight:17},detailLineWide:{fontSize:13,lineHeight:18},chevron:{alignSelf:"center",flexShrink:0},childrenWrap:{marginTop:12,paddingTop:12,borderTopWidth:1}});function Yl({style:e}){/* @__PURE__ */
239
- return W(Al,{style:[{marginBottom:16},e]})}function Vl({onChange:e}){const{theme:t,selectedGame:n,selectedSport:o,sportSummaries:i,displaySportName:r,headingFont:l}=$i(),a=t.colors;if(!n)return null;const c=o?i.find(e=>e.key===o)?.label??r(o):null;/* @__PURE__ */
240
- return T(lt,{theme:t,level:"raised",padding:"sm",radius:"lg",style:Ul.card,children:[
241
- /* @__PURE__ */W(Ml,{iconUrl:Ze(n),size:44}),
242
- /* @__PURE__ */T(z,{style:Ul.info,children:[/* @__PURE__ */W(S,{numberOfLines:1,style:[Ul.name,{color:se(t),fontFamily:l}],children:n.game_name}),c?/* @__PURE__ */W(S,{numberOfLines:1,style:[Ul.sport,{color:a.textMuted}],children:c}):null]}),
243
- /* @__PURE__ */W(at,{theme:t,variant:"ghost",size:"sm",radius:"pill",onPress:e,children:"Change"})]})}var Ul=k.create({card:{marginBottom:16,flexDirection:"row",alignItems:"center",gap:12},info:{flex:1,minWidth:0},name:{fontSize:15,fontWeight:"700",lineHeight:18},sport:{fontSize:13,lineHeight:16}});function ql({onBack:e,onNext:t,hideActions:n}={}){const{theme:o,headingFont:i,bodyFont:r,selectedGame:l,propositions:a,selections:c,toggleSelection:s,selectedPropositionCount:d,disableQuickPick:h,answeredCount:u,goToConfirmation:g,selectedEventId:f,sameGameMultiEvents:p,selectSameGameMultiEvent:y,selectedRule:m,howToPlayMarkdown:b,maxPayouts:w}=$i(),x=o.colors,k=ot(l),C=Uo(l??{},l?w?.[l.id]:void 0),{width:B}=F(),v=B>=640,A=no(l)&&!f,R=p.find(e=>e.id===f),L=l?dn(l,d,m):{min:0,max:0},D=L.min,M=no(l)&&f?Math.min(L.max,a.length):L.max,P=D>0&&D===M,H=!(l?.allowed_propositions&&l.allowed_propositions.length>0)&&D>0&&M>D,O=P?M:M||a.length,I=e=>{const t=Math.max(0,Math.min(e??O,a.length));for(const r of Object.keys(c)){const e=Number(r);s(e,c[e])}const n=[...a].sort(()=>Math.random()-.5).slice(0,t),o=[],i=[];for(const r of n)Math.random()<.5?o.push(r):i.push(r);for(const r of o)s(r.id,"yes");for(const r of i)s(r.id,"no")},E=!h&&a.length>0,j=H?Array.from({length:M-D+1},(e,t)=>D+t).filter(e=>e<=a.length):[],N=u>0?u:D||O;/* @__PURE__ */
244
- return T(z,{style:[$l.header,{flexDirection:"row",alignItems:"center",justifyContent:"space-between",gap:12}],children:[/* @__PURE__ */T(z,{children:[/* @__PURE__ */W(S,{style:[$l.title,{fontSize:v?24:20,color:se(o),fontFamily:i}],children:A?"Choose a Game":"Select Propositions"}),l&&/* @__PURE__ */W(dl,{onBack:f?()=>y(null):e,hideActions:n,label:R?eo(R):l.game_name,children:k||b?.trim()?/* @__PURE__ */W(St,{variant:"icon",content:b,panel:k,theme:o,title:`${l.game_name} — How to Play`,extra:/* @__PURE__ */W(qo,{tiers:C.hasGenericDividends?C.tiers:[],modes:C.modes,pydDividends:C.pydDividends,minBet:C.minBet,maxBet:C.maxBet,colors:x,bodyFont:r,headingFont:i}),colors:{text:x.text,textMuted:x.textMuted,border:x.border,background:x.background,backgroundAlt:x.backgroundAlt,primary:x.primary,primaryText:x.primaryText},bodyFont:r,headingFont:i}):null})]}),E&&(j.length>1?/* @__PURE__ */W(Cl,{counts:j,onPick:e=>{I(e),g(),t?.()},onDoubleAction:()=>{I(N),g(),t?.()},colors:x,menuShadow:ce(o)}):/* @__PURE__ */W(z,{style:{flexShrink:0},children:/* @__PURE__ */W(er,{onPress:()=>{I(),g(),t?.()}})}))]})}function Kl({number:e,color:t,size:n=34,label:o,onSelect:i}){const r=(e,o)=>({position:"absolute",left:e,top:.4*e,width:n,height:n,borderRadius:.26*n,backgroundColor:t,opacity:o});/* @__PURE__ */
225
+ /* @__PURE__ */W(N,{x:180,y:220,fontFamily:"Manrope, Poppins, sans-serif",fontSize:a,letterSpacing:-3,textAnchor:"middle",fontWeight:"800",fill:"#DFFF1A",children:l}),o&&/* @__PURE__ */T(v,{children:[/* @__PURE__ */W(N,{x:180,y:345,fontFamily:"Manrope, Poppins, sans-serif",fontSize:24,letterSpacing:-.5,textAnchor:"middle",fontWeight:"700",fill:Yt,children:o}),/* @__PURE__ */W(N,{x:262,y:333,fontFamily:"Manrope, Poppins, sans-serif",fontSize:10,fontWeight:"600",fill:Yt,children:"TM"})]})]})}var Ll="yesno:favourite-sport",Dl=null;function Ml(){try{return globalThis.localStorage??null}catch{return null}}function Pl({label:t="Pick your sport",sublabel:n,renderSportLogo:o,style:i}){const{theme:r,sportOptions:l,sportSummaries:a,selectedSport:c,setSelectedSport:s,sportBaseKey:d,displaySportName:h,selections:u,toggleSelection:g,enableSportFavourites:f}=or(),p=r.colors,y=be(r),m=Ne(r),b=Ge(r),w=se(r),x=fe(r),[k,C]=e.useState(null);if(e.useEffect(()=>{C(f?function(){try{const e=Ml()?.getItem(Ll);if(e)return e}catch{}return Dl}():null)},[f]),l.length<2)return null;const F=k?[...l].sort((e,t)=>Number(t.key===k)-Number(e.key===k)):l,v=void 0===n?f?"Tap to select. Star your favourite to pin it up front.":"Tap to select.":n;/* @__PURE__ */
226
+ return T(z,{style:[Ol.wrap,i],children:[t?/* @__PURE__ */W(S,{style:[Ol.label,{color:w,fontFamily:b}],children:t}):null,v?/* @__PURE__ */W(S,{style:[Ol.hint,{color:p.textMuted,fontFamily:m}],children:v}):null,
227
+ /* @__PURE__ */W(Rt,{theme:r,contentContainerStyle:Ol.shelf,children:F.map(({key:e,count:t})=>{const n=a.find(t=>t.key===e),i=n?.games_today??0,l=c===e,F=k===e,v=n?.label??h(e);/* @__PURE__ */
228
+ return T(z,{style:Ol.slot,children:[/* @__PURE__ */T(B,{accessibilityRole:"button",accessibilityState:{selected:l},activeOpacity:.85,onPress:()=>(e=>{if(e!==c){for(const e of Object.keys(u)){const t=Number(e);g(t,u[t])}s(e)}})(e),style:[Ol.card,Hl(r),{backgroundColor:y,borderColor:l?p.primary:p.border,borderWidth:l?2:1,paddingTop:(f?26:12)-(l?1:0),paddingBottom:l?7:8}],children:[
229
+ /* @__PURE__ */T(z,{style:Ol.tile,children:[o?o(e):/* @__PURE__ */W(Rl,{gameKey:e,size:40,footer:null,sportBaseKey:d,title:`${v} button`}),i>0&&/* @__PURE__ */W(z,{style:[Ol.liveDot,{backgroundColor:p.success,borderColor:y}]})]}),
230
+ /* @__PURE__ */W(S,{numberOfLines:2,style:[Ol.name,{color:l?w:p.text,fontFamily:b}],children:v}),
231
+ /* @__PURE__ */W(S,{numberOfLines:1,style:[Ol.caption,{color:l?p.primary:ne(p.textMuted,.9),fontFamily:m}],children:Kt(i,t).toUpperCase()})]}),f&&/* @__PURE__ */W(B,{accessibilityRole:"button",accessibilityState:{selected:F},accessibilityLabel:F?`Unpin ${v}`:`Pin ${v} to the front`,activeOpacity:.7,onPress:()=>(e=>{const t=k===e?null:e;C(t),function(e){Dl=e;try{e?Ml()?.setItem(Ll,e):Ml()?.removeItem(Ll)}catch{}}(t)})(e),style:Ol.starHit,children:/* @__PURE__ */W(z,{style:[Ol.star,{backgroundColor:F?ne(x,.22):y,borderColor:F?x:p.border}],children:/* @__PURE__ */W(At,{size:12,filled:F,color:F?w:ne(p.textMuted,.6)})})})]},e)})})]})}function Hl(e){return{shadowColor:"#000",shadowOpacity:"dark"===e.colorScheme?.4:.12,shadowRadius:12,shadowOffset:{width:0,height:6},elevation:2}}var Ol=k.create({wrap:{minWidth:0},label:{paddingLeft:2,fontSize:14,fontWeight:"800",lineHeight:18,letterSpacing:-.2},hint:{marginBottom:6,paddingLeft:2,fontSize:12,lineHeight:16},shelf:{alignItems:"stretch",gap:10,paddingHorizontal:2,paddingTop:4,paddingBottom:10},slot:{position:"relative",width:88},card:{width:88,minHeight:44,borderRadius:16,paddingHorizontal:6,alignItems:"center",gap:6},tile:{position:"relative"},liveDot:{position:"absolute",top:-2,right:-2,width:10,height:10,borderRadius:5,borderWidth:2},name:{fontSize:11,fontWeight:"800",lineHeight:13,letterSpacing:-.2,textAlign:"center"},caption:{fontSize:9,fontWeight:"700",letterSpacing:.9,textAlign:"center"},starHit:{position:"absolute",left:0,top:0,width:32,height:32,alignItems:"center",justifyContent:"center",zIndex:1},star:{width:20,height:20,borderRadius:10,borderWidth:1,alignItems:"center",justifyContent:"center"}});function Il(e,t){const n=/^#([0-9a-f]{6})$/i.exec((e??"").trim());if(!n)return e;const o=parseInt(n[1],16);return`rgba(${o>>16&255}, ${o>>8&255}, ${255&o}, ${t})`}function El({iconUrl:e,size:t=56}){const{theme:n}=or(),o=n.colors,i=n.brand?.chip??o.primary,r=n.brand?.icon??o.primaryText,l=pe(i,fe(n),r);/* @__PURE__ */
232
+ return W(z,{style:{width:t,height:t,borderRadius:.3*t,backgroundColor:i,borderWidth:1,borderColor:Il(r,.16),alignItems:"center",justifyContent:"center",shadowColor:i,shadowOpacity:.45,shadowRadius:9,shadowOffset:{width:0,height:4},elevation:2},children:/* @__PURE__ */W(On,{iconUrl:e,width:Math.round(.68*t),height:Math.round(.68*t),iconColor:r,accentColor:l})})}function jl({eyebrow:e,iconUrl:t,gameName:n,tagline:o,style:i}){const{theme:r,screenSize:l}=or(),a=r.colors,c=Ge(r),s="mobile"===l,{width:d}=F(),h=d>=640;/* @__PURE__ */
233
+ return T(z,{style:[Nl.block,h&&Nl.blockWide,i],children:[e&&h?/* @__PURE__ */W(S,{style:[Nl.eyebrow,{color:a.primary,fontFamily:c}],children:e.toUpperCase()}):null,
234
+ /* @__PURE__ */W(rl,{iconUrl:t,gameName:n,height:s?20:32,chipColor:a.primary,textColor:a.text,iconColor:a.primaryText,accentColor:r.brand?.accent,compact:s}),o?/* @__PURE__ */W(S,{style:[Nl.tagline,h&&Nl.taglineWide,{color:a.textMuted}],children:o}):null]})}var Nl=k.create({block:{alignItems:"center",marginBottom:16},blockWide:{marginBottom:28},eyebrow:{fontSize:12,fontWeight:"700",textTransform:"uppercase",letterSpacing:2.16,marginBottom:20,textAlign:"center"},tagline:{marginTop:8,fontSize:13,lineHeight:18,textAlign:"center",maxWidth:384},taglineWide:{marginTop:12,fontSize:15,lineHeight:24}});function Gl({ariaLabel:e,children:t}){const{width:n}=F();return n>=640?/* @__PURE__ */W(z,{accessibilityRole:"radiogroup",accessibilityLabel:e,style:Vl.grid,children:t}):/* @__PURE__ */W(x,{horizontal:!0,showsHorizontalScrollIndicator:!1,accessibilityRole:"radiogroup",accessibilityLabel:e,contentContainerStyle:Vl.rail,children:t})}function Yl(e,t="21%"){return e?{flexGrow:1,flexBasis:t,minWidth:0}:{width:124,flexGrow:0,flexShrink:0}}var Vl=k.create({grid:{flexDirection:"row",flexWrap:"wrap",gap:8},rail:{flexDirection:"row",gap:8,paddingBottom:4}});function Ul({legs:e,prizeBall:t=!0}){const{theme:n}=or(),o=n.colors.primary,i=fe(n);/* @__PURE__ */
235
+ return T(z,{style:{flexDirection:"row",alignItems:"center"},children:[Array.from({length:e}).map((e,t)=>/* @__PURE__ */W(z,{style:{width:5,height:5,borderRadius:1.5,backgroundColor:o,opacity:.85,marginRight:3}},t)),t?/* @__PURE__ */W(z,{style:{width:7,height:7,borderRadius:999,backgroundColor:i,marginLeft:2}}):null]})}function ql({tile:e,label:t,stat:n,detail:o,onSelect:i,children:r}){const{theme:l}=or(),a=l.colors,s=Ge(l),d=se(l),h=a.primary,u=a.selectionCard??a.backgroundAlt,{width:g}=F(),f=g>=640,[p,y]=c(!1);/* @__PURE__ */
236
+ return T(z,{...rt(()=>y(!0),()=>y(!1)),style:[Kl.card,f&&Kl.cardWide,{backgroundColor:u,borderColor:p?h:a.border,shadowColor:p?h:"#000",shadowOpacity:p?.28:.08,shadowRadius:p?14:10,shadowOffset:{width:0,height:p?12:8},elevation:p?4:1,transform:[{translateY:p?-2:0}]}],children:[/* @__PURE__ */T(B,{onPress:i,activeOpacity:.85,style:[Kl.cardMain,f&&Kl.cardMainWide],children:[e,
237
+ /* @__PURE__ */T(z,{style:[Kl.cardText,f&&Kl.cardTextWide],children:[/* @__PURE__ */T(z,{style:Kl.titleRow,children:[/* @__PURE__ */W(S,{style:[Kl.cardTitle,f&&Kl.cardTitleWide,{color:d,fontFamily:s}],children:t}),n?/* @__PURE__ */W(z,{style:[Kl.statChip,{backgroundColor:Il(h,.12)}],children:/* @__PURE__ */W(S,{style:[Kl.statChipText,{color:h}],children:n.toUpperCase()})}):null]}),o&&o.length>0?/* @__PURE__ */W(z,{style:Kl.detailBlock,children:(f?o:o.slice(0,1)).map(e=>/* @__PURE__ */W(S,{style:[Kl.detailLine,f&&Kl.detailLineWide,{color:a.textMuted}],children:e},e))}):null]}),
238
+ /* @__PURE__ */W(z,{style:[Kl.chevron,{transform:[{translateX:p?2:0}]}],children:/* @__PURE__ */W(A,{width:22,height:22,viewBox:"0 0 24 24",fill:"none",children:/* @__PURE__ */W(H,{d:"m9 6 6 6-6 6",stroke:h,strokeWidth:2.5,strokeLinecap:"round",strokeLinejoin:"round"})})})]}),r?/* @__PURE__ */W(z,{style:[Kl.childrenWrap,{borderTopColor:Il(d,.08)}],children:r}):null]})}var Kl=k.create({card:{flexGrow:1,borderWidth:2,borderRadius:24,paddingHorizontal:14,paddingVertical:14},cardWide:{paddingHorizontal:20,paddingVertical:20},cardMain:{flexDirection:"row",alignItems:"flex-start",gap:14,flexGrow:1},cardMainWide:{gap:16},cardText:{flex:1,minWidth:0,gap:4},cardTextWide:{gap:6},titleRow:{flexDirection:"row",flexWrap:"wrap",alignItems:"center",columnGap:8,rowGap:4},cardTitle:{fontSize:16,fontWeight:"800",letterSpacing:-.4},cardTitleWide:{fontSize:20,letterSpacing:-.5},statChip:{borderRadius:999,paddingHorizontal:8,paddingVertical:2},statChipText:{fontSize:9,fontWeight:"700",letterSpacing:.72},detailBlock:{gap:2},detailLine:{fontSize:12,lineHeight:17},detailLineWide:{fontSize:13,lineHeight:18},chevron:{alignSelf:"center",flexShrink:0},childrenWrap:{marginTop:12,paddingTop:12,borderTopWidth:1}});function Zl({style:e}){/* @__PURE__ */
239
+ return W(Pl,{style:[{marginBottom:16},e]})}function Xl(e){const t=Zi(e);return"selections"===t||"rule_setup"===t&&Qi(e)}function Ql({onChange:t}){const{theme:n,selectedGame:o,selectedSport:i,sportSummaries:r,displaySportName:l,headingFont:a,games:c,selectGame:s}=or(),d=n.colors,[h,u]=e.useState(!1);if(!o)return null;const g=c.filter(Xl),f=i?r.find(e=>e.key===i)?.label??l(i):null;/* @__PURE__ */
240
+ return T(z,{style:Jl.wrap,children:[/* @__PURE__ */T(lt,{theme:n,level:"raised",padding:"sm",radius:"lg",style:Jl.card,children:[
241
+ /* @__PURE__ */W(El,{iconUrl:Ze(o),size:44}),
242
+ /* @__PURE__ */T(z,{style:Jl.info,children:[/* @__PURE__ */W(S,{numberOfLines:1,style:[Jl.name,{color:se(n),fontFamily:a}],children:o.game_name}),f?/* @__PURE__ */W(S,{numberOfLines:1,style:[Jl.sport,{color:d.textMuted}],children:f}):null]}),
243
+ /* @__PURE__ */W(at,{theme:n,variant:"ghost",size:"sm",radius:"pill",onPress:()=>g.length>1?u(e=>!e):t(),children:"Change"})]}),h&&g.length>1?/* @__PURE__ */W(z,{accessibilityLabel:"Choose a game",style:[Jl.menu,{backgroundColor:d.background,borderColor:d.border}],children:g.map(e=>{const t=e.id===o.id;/* @__PURE__ */
244
+ return T(B,{accessibilityRole:"button",accessibilityState:{selected:t},onPress:()=>(e=>{u(!1),e.id!==o.id&&s(e)})(e),style:Jl.menuRow,children:[/* @__PURE__ */W(S,{numberOfLines:1,style:[Jl.menuText,{color:t?d.primary:d.text,fontWeight:t?"700":"500"}],children:e.game_name}),t?/* @__PURE__ */W(S,{style:{color:d.primary},children:"✓"}):null]},e.id)})}):null]})}var Jl=k.create({wrap:{position:"relative",zIndex:1},card:{marginBottom:16,flexDirection:"row",alignItems:"center",gap:12},info:{flex:1,minWidth:0},name:{fontSize:15,fontWeight:"700",lineHeight:18},sport:{fontSize:13,lineHeight:16},menu:{position:"absolute",right:0,top:52,zIndex:1,width:240,maxHeight:288,borderRadius:12,borderWidth:1,paddingVertical:4},menuRow:{flexDirection:"row",alignItems:"center",gap:8,paddingHorizontal:12,paddingVertical:8},menuText:{flex:1,minWidth:0,fontSize:13}});function $l({onBack:e,onNext:t,hideActions:n}={}){const{theme:o,headingFont:i,bodyFont:r,selectedGame:l,propositions:a,selections:c,toggleSelection:s,selectedPropositionCount:d,disableQuickPick:h,answeredCount:u,goToConfirmation:g,selectedEventId:f,sameGameMultiEvents:p,selectSameGameMultiEvent:y,selectedRule:m,howToPlayMarkdown:b,maxPayouts:w}=or(),x=o.colors,k=ot(l),C=Uo(l??{},l?w?.[l.id]:void 0),{width:B}=F(),v=B>=640,A=no(l)&&!f,R=p.find(e=>e.id===f),L=l?dn(l,d,m):{min:0,max:0},D=L.min,M=no(l)&&f?Math.min(L.max,a.length):L.max,P=D>0&&D===M,H=!(l?.allowed_propositions&&l.allowed_propositions.length>0)&&D>0&&M>D,O=P?M:M||a.length,I=e=>{const t=Math.max(0,Math.min(e??O,a.length));for(const r of Object.keys(c)){const e=Number(r);s(e,c[e])}const n=[...a].sort(()=>Math.random()-.5).slice(0,t),o=[],i=[];for(const r of n)Math.random()<.5?o.push(r):i.push(r);for(const r of o)s(r.id,"yes");for(const r of i)s(r.id,"no")},E=!h&&a.length>0,j=H?Array.from({length:M-D+1},(e,t)=>D+t).filter(e=>e<=a.length):[],N=u>0?u:D||O;/* @__PURE__ */
245
+ return T(z,{style:[ia.header,{flexDirection:"row",alignItems:"center",justifyContent:"space-between",gap:12}],children:[/* @__PURE__ */T(z,{children:[/* @__PURE__ */W(S,{style:[ia.title,{fontSize:v?24:20,color:se(o),fontFamily:i}],children:A?"Choose a Game":"Select Propositions"}),l&&/* @__PURE__ */W(pl,{onBack:f?()=>y(null):e,hideActions:n,label:R?eo(R):l.game_name,children:k||b?.trim()?/* @__PURE__ */W(St,{variant:"icon",content:b,panel:k,theme:o,title:`${l.game_name} — How to Play`,extra:/* @__PURE__ */W(qo,{tiers:C.hasGenericDividends?C.tiers:[],modes:C.modes,pydDividends:C.pydDividends,minBet:C.minBet,maxBet:C.maxBet,colors:x,bodyFont:r,headingFont:i}),colors:{text:x.text,textMuted:x.textMuted,border:x.border,background:x.background,backgroundAlt:x.backgroundAlt,primary:x.primary,primaryText:x.primaryText},bodyFont:r,headingFont:i}):null})]}),E&&(j.length>1?/* @__PURE__ */W(Wl,{counts:j,onPick:e=>{I(e),g(),t?.()},onDoubleAction:()=>{I(N),g(),t?.()},colors:x,menuShadow:ce(o)}):/* @__PURE__ */W(z,{style:{flexShrink:0},children:/* @__PURE__ */W(rr,{onPress:()=>{I(),g(),t?.()}})}))]})}function _l({number:e,color:t,size:n=34,label:o,onSelect:i}){const r=(e,o)=>({position:"absolute",left:e,top:.4*e,width:n,height:n,borderRadius:.26*n,backgroundColor:t,opacity:o});/* @__PURE__ */
245
246
  return W(ut,{children:/* @__PURE__ */T(B,{accessibilityRole:"button",accessibilityLabel:o,onPress:i,activeOpacity:.8,style:{position:"relative",width:n+.2*n,height:1.3*n},children:[
246
247
  /* @__PURE__ */W(z,{style:r(.44*n,.3)}),
247
248
  /* @__PURE__ */W(z,{style:r(.22*n,.55)}),
248
- /* @__PURE__ */W(z,{style:{position:"absolute",left:0,top:0,width:n,height:n,borderRadius:.26*n,backgroundColor:t,alignItems:"center",justifyContent:"center"},children:/* @__PURE__ */W(S,{style:{color:"#fff",fontSize:n*(e>9?.42:.5),fontWeight:"800"},children:String(e)})})]})})}function Zl({onNext:t,onBack:n,hideButtons:o=!1}){const{theme:i,headingFont:r,selectedGame:l,selectedPropositionCount:a,selectedEventId:c,propositions:s,goToConfirmation:d,selectedRule:h,maxPayouts:u,betAmount:g,setBetAmount:f,selections:p,gamePrice:y}=$i(),m=i.colors,b=l?dn(l,a,h):{min:0,max:0},w=b.min,k=no(l)&&c?Math.min(b.max,s.length):b.max,B=e.useRef(!1);e.useEffect(()=>{B.current=!1},[l?.id]),e.useEffect(()=>{g<=0&&!B.current&&f(Math.max(10,y))},[g,y,f]);const F=e.useRef([]);F.current=function(e,t){const n=Object.keys(t).map(Number),o=new Set(n),i=e.filter(e=>o.has(e)),r=n.filter(e=>!i.includes(e)).sort((e,t)=>e-t);return 0===r.length&&i.length===e.length?e:[...i,...r]}(F.current,p);const v=function({selections:e,order:t,minReq:n,maxReq:o,stake:i,payout20:r=0}){const l=[];for(const h of t){const t=e[h];t&&l.push({id:h,number:l.length+1,side:t})}const a=l.length,c=a>=n,s=Math.max(0,n-a),d=c?r*(i/20):0;return{legs:l,count:a,dividend:d,dividendText:$t(d),ctaLabel:c?`Continue with ${a} ›`:0===a?`Select at least ${n}`:`Add ${s} more to continue`,ctaDisabled:!c,atMax:o>0&&a>=o}}({selections:p,order:F.current,minReq:w,maxReq:k,stake:g,payout20:l?zl(u?.[l.id],F.current.length):0}),A=ue(i),R=ge(i),L=m.primaryText,D=pe(m.primary,fe(i),m.primaryText),M={fontSize:10,fontWeight:"700",letterSpacing:.8,textTransform:"uppercase"},P=Ki(l),[H,O]=e.useState(null),I=v.legs.find(e=>e.id===H)??null,E=I?s.find(e=>e.id===I.id)?.description??s.find(e=>e.id===I.id)?.proposition??"":"";/* @__PURE__ */
249
+ /* @__PURE__ */W(z,{style:{position:"absolute",left:0,top:0,width:n,height:n,borderRadius:.26*n,backgroundColor:t,alignItems:"center",justifyContent:"center"},children:/* @__PURE__ */W(S,{style:{color:"#fff",fontSize:n*(e>9?.42:.5),fontWeight:"800"},children:String(e)})})]})})}function ea({onNext:t,onBack:n,hideButtons:o=!1}){const{theme:i,headingFont:r,selectedGame:l,selectedPropositionCount:a,selectedEventId:c,propositions:s,goToConfirmation:d,selectedRule:h,maxPayouts:u,betAmount:g,setBetAmount:f,selections:p,gamePrice:y,toggleSelection:m}=or(),b=i.colors,w=l?dn(l,a,h):{min:0,max:0},k=w.min,B=no(l)&&c?Math.min(w.max,s.length):w.max,F=e.useRef(!1);e.useEffect(()=>{F.current=!1},[l?.id]),e.useEffect(()=>{g<=0&&!F.current&&f(Math.max(20,y))},[g,y,f]);const v=e.useRef([]);v.current=function(e,t){const n=Object.keys(t).map(Number),o=new Set(n),i=e.filter(e=>o.has(e)),r=n.filter(e=>!i.includes(e)).sort((e,t)=>e-t);return 0===r.length&&i.length===e.length?e:[...i,...r]}(v.current,p);const A=function({selections:e,order:t,minReq:n,maxReq:o,stake:i,payout20:r=0}){const l=[];for(const h of t){const t=e[h];t&&l.push({id:h,number:l.length+1,side:t})}const a=l.length,c=a>=n,s=Math.max(0,n-a),d=c?r*(i/20):0;return{legs:l,count:a,dividend:d,dividendText:$t(d),ctaLabel:c?`Continue with ${a} ›`:0===a?`Select at least ${n}`:`Add ${s} more to continue`,ctaDisabled:!c,atMax:o>0&&a>=o}}({selections:p,order:v.current,minReq:k,maxReq:B,stake:g,payout20:l?Al(u?.[l.id],v.current.length):0}),R=ue(i),L=ge(i),D=b.primaryText,M=pe(b.primary,fe(i),b.primaryText),P={fontSize:10,fontWeight:"700",letterSpacing:.8,textTransform:"uppercase"},H=$i(l);/* @__PURE__ */
249
250
  return T(z,{children:[
250
- /* @__PURE__ */W(x,{horizontal:!0,showsHorizontalScrollIndicator:!1,style:{minHeight:44,marginBottom:6},contentContainerStyle:{alignItems:"center"},children:0===v.legs.length?/* @__PURE__ */W(S,{style:{fontSize:13,color:m.textMuted},children:"Tap Yes or No to start building your multi."}):v.legs.map(e=>/* @__PURE__ */W(Kl,{number:e.number,color:"yes"===e.side?A:R,label:`Leg ${e.number}, answered ${e.side}`,onSelect:()=>O(t=>t===e.id?null:e.id)},e.id))}),I&&/* @__PURE__ */T(z,{style:{flexDirection:"row",alignItems:"center",gap:8,marginBottom:8},children:[/* @__PURE__ */W(S,{style:{paddingHorizontal:6,paddingVertical:2,borderRadius:4,fontSize:10,fontWeight:"700",textTransform:"uppercase",color:"#fff",backgroundColor:"yes"===I.side?A:R},children:I.side}),/* @__PURE__ */W(S,{numberOfLines:1,style:{flex:1,fontSize:12,color:m.text},children:E})]}),
251
- /* @__PURE__ */T(z,{style:{flexDirection:"row",flexWrap:"wrap",alignItems:"center",gap:10,marginBottom:8},children:[/* @__PURE__ */T(z,{style:{flexDirection:"row",alignItems:"center",gap:8},children:[/* @__PURE__ */W(S,{style:[M,{color:m.textMuted}],children:Bl}),/* @__PURE__ */T(z,P?{accessibilityLabel:`${Bl}. ${Zi(l)}`,style:{flexDirection:"row",alignItems:"center",gap:8,borderRadius:10,paddingHorizontal:12,paddingVertical:8,borderWidth:1,borderColor:m.border,backgroundColor:m.backgroundAlt},children:[/* @__PURE__ */W(S,{style:{fontSize:15,fontWeight:"800",color:m.text},children:$t(g)}),/* @__PURE__ */W(S,{style:{fontSize:10,color:m.textMuted},children:"locked"})]}:{style:{flexDirection:"row",alignItems:"center",width:108,borderRadius:10,borderWidth:1,borderColor:m.border,backgroundColor:m.background,overflow:"hidden"},children:[/* @__PURE__ */W(S,{style:{paddingLeft:11,fontSize:16,fontWeight:"800",color:m.text},children:"$"}),/* @__PURE__ */W(C,{keyboardType:"decimal-pad",accessibilityLabel:Bl,value:g>0?String(g):"",onChangeText:e=>{B.current=!0,f(Math.max(0,parseFloat(e)||0))},style:{flex:1,minWidth:0,paddingVertical:8,paddingLeft:3,paddingRight:8,fontSize:15,fontWeight:"800",color:m.text,fontFamily:r}})]})]}),/* @__PURE__ */T(z,{style:{flexGrow:1,flexBasis:150,minWidth:0,flexDirection:"row",alignItems:"baseline",justifyContent:"flex-end",gap:8,borderRadius:10,paddingHorizontal:12,paddingVertical:6,backgroundColor:m.primary},children:[/* @__PURE__ */W(S,{style:[M,{color:L,opacity:.7}],children:"Potential dividend"}),/* @__PURE__ */W(S,{style:{fontSize:20,fontWeight:"800",color:D},children:v.dividendText})]})]}),!o&&/* @__PURE__ */W(at,{theme:i,block:!0,size:"md",radius:"lg",disabled:v.ctaDisabled,onPress:()=>{d(),t?.()},children:v.ctaLabel})]})}function Xl({view:e,onChange:t}){const{theme:n}=$i(),o=n.colors,i=(n,i)=>{const r=e===n;/* @__PURE__ */
252
- return W(B,{onPress:()=>t(n),accessibilityRole:"button",accessibilityState:{selected:r},style:[Ql.option,{backgroundColor:r?o.primary:"transparent"}],children:/* @__PURE__ */W(S,{style:[Ql.optionText,{color:r?o.primaryText:o.textMuted}],children:i})},n)};/* @__PURE__ */
253
- return T(z,{style:[Ql.track,{backgroundColor:o.backgroundAlt,borderColor:o.border}],children:[i("list","List"),i("swipe","Swipe")]})}var Ql=k.create({track:{flexDirection:"row",alignItems:"center",gap:4,borderRadius:8,borderWidth:1,padding:2,flexShrink:0},option:{borderRadius:6,paddingHorizontal:10,paddingVertical:4},optionText:{fontSize:12,fontWeight:"600"}});function Jl({onNext:t,onBack:n,hideTitle:o,hideActions:i,defaultView:r="list",view:l,onViewChange:a,hideViewSwitch:c,onSwipeDragStateChange:s}){const d=$i(),{selectedRule:h}=d,{theme:u,selectedGame:g,propositions:f,selections:p,toggleSelection:y,loading:m,error:b,disableQuickPick:w,renderTeamLogo:x,filterSport:k,initialSport:S,gameCategory:C,selectedPropositionCount:B,handlePropositionCountChange:F,goToConfirmation:A,goBack:R,selectedCategory:L,setSelectedCategory:D,selectedSport:M,selectedEventId:P,propositionsForCategoryPicker:H,answeredCount:O}=d,[I,E]=e.useState(r),j=l??I,N=e.useCallback(e=>{void 0===l&&E(e),a?.(e)},[l,a]);e.useEffect(()=>{g||(d.goToSportSelection(),n?.())},[g,d,n]);const G=e.useMemo(()=>{if(!g)return null;const{min:e,max:t}=dn(g,B??void 0,h);if(e>0&&e===t)return e;const n=Yi(g);return null!=B&&B>0&&("game_set"===n||"pick_your_dividend"===n||"safety_net"===n||Vi(g))?B:null},[g,B]),Y=e.useRef(O);e.useEffect(()=>{const e=Y.current;Y.current=O,null!=G&&e<G&&O===G&&(A(),t?.())},[O,G]);const V=e.useMemo(()=>an(H??[]),[H]);if(e.useEffect(()=>{g&&1===V.length&&L!==V[0]&&D(V[0])},[g,V,L,D]),!g)return null;const U=V.length>1&&!L,q=!U&&no(g)&&!P,K=(()=>{if(!no(g)||!P)return g;const e=Math.min(g.max_propositions??f.length,f.length);return{...g,max_propositions:e,allowed_propositions:g.allowed_propositions?.filter(t=>t<=e)}})(),Z=()=>{R(),n?.()};/* @__PURE__ */
254
- return T(z,{style:$l.container,children:[!o&&/* @__PURE__ */W(z,{style:{marginBottom:24},children:/* @__PURE__ */W(ql,{onBack:i?Z:void 0,onNext:i?t:void 0,hideActions:i})}),!no(g)&&/* @__PURE__ */W(ll,{}),
255
- /* @__PURE__ */W(z,{style:$l.content,children:U?/* @__PURE__ */W(ml,{hideTitle:!0,hideActions:!0,onSelectCategory:e=>D(e)}):q?/* @__PURE__ */W(kl,{}):"swipe"===j?/* @__PURE__ */W(yr,{onBack:Z,onNext:t,viewSwitch:c?void 0:/* @__PURE__ */W(Xl,{view:j,onChange:N}),onDragStateChange:s}):/* @__PURE__ */T(v,{children:[/* @__PURE__ */W(Vl,{onChange:Z}),/* @__PURE__ */W(Yr,{game:K,propositions:f,selections:p,onToggleSelection:y,onNext:()=>{A(),t?.()},onBack:Z,loading:m,error:b,theme:u,hideActions:!0,initialSport:k??S,renderTeamLogo:x,disableQuickPick:!0,selectedPropositionCount:B,onPropositionCountChange:F,gameCategory:C,headerExtra:c?void 0:/* @__PURE__ */W(Xl,{view:j,onChange:N})})]})}),!i&&!U&&!q&&/* @__PURE__ */W(z,{style:{marginTop:24},children:/* @__PURE__ */W(Zl,{onNext:t,onBack:n})})]})}var $l=k.create({container:{flex:1},header:{paddingLeft:8},title:{fontWeight:"700"},content:{flex:1}});function _l({tiers:e,selectedCount:t,onSelect:n,colors:o,bodyFont:i,extraBetAmount:r,buttonLabel:l,columnLabel:a="Legs",buildYourOwn:s,quickPickOnly:d,onQuickPick:h,collapsible:u,expanded:g,onExpandedChange:f,summaryTiers:p}){const[y,m]=c(!1),b=g??y,w=null!=r&&20!==r,k=w?`$${Math.round(r)} returns`:"$20 returns",C=e.some(e=>e.payout20>0),F=!!u&&!b,A=C&&!F,R=(p??e).reduce((e,t)=>t.payout20>e?t.payout20:e,0),L=w&&R>0?R*(r/20):R,D=e.length>0?82*e.length+8*Math.max(0,e.length-1):82,M=/* @__PURE__ */T(v,{children:[/* @__PURE__ */T(z,{style:{flexDirection:"column",gap:8,width:70,flexShrink:0},children:[/* @__PURE__ */W(z,{style:{paddingVertical:6,justifyContent:"center"},children:/* @__PURE__ */W(S,{style:[ea.labelText,{color:o.textMuted,fontFamily:i}],children:d?"Quick Pick":a})}),A&&/* @__PURE__ */T(v,{children:[/* @__PURE__ */W(z,{style:{paddingVertical:4,justifyContent:"center"},children:/* @__PURE__ */W(S,{style:[ea.labelText,{color:o.textMuted,fontFamily:i}],children:"Dividend"})}),/* @__PURE__ */W(z,{style:{paddingVertical:4,justifyContent:"center"},children:/* @__PURE__ */W(S,{style:[ea.labelText,{color:o.textMuted,fontFamily:i}],children:k})})]})]}),d?/* @__PURE__ */T(z,{style:{gap:8,alignSelf:"flex-start",width:D},children:[/* @__PURE__ */W(Cl,{counts:(p??e).map(e=>e.count),onPick:e=>h?h(e):n(e),align:"left",direction:"up",colors:{background:o.background??"#ffffff",backgroundAlt:o.backgroundAlt??"#f3f4f6",border:o.border??"#e5e7eb",text:o.text??"#111827"}}),C&&!F&&/* @__PURE__ */W(z,{style:{flexDirection:"row",gap:8},children:e.map(({count:e,payout20:t})=>{const n=w&&t>0?t*(r/20):null;/* @__PURE__ */
256
- return T(z,{style:{flexDirection:"column",gap:8,alignItems:"center",width:82},children:[/* @__PURE__ */W(z,{style:[ea.tableCell,{backgroundColor:`${o.success}15`,alignSelf:"stretch"}],children:/* @__PURE__ */T(S,{style:[ea.tableCellText,{color:o.success}],children:[e,"/",e]})}),/* @__PURE__ */W(z,{style:[ea.tableCell,{backgroundColor:`${o.primary}12`,alignSelf:"stretch"}],children:/* @__PURE__ */W(S,{style:[ea.tableCellText,{color:o.primary}],children:t>0?$t(n??t):"—"})})]},String(e))})})]}):s?/* @__PURE__ */T(z,{style:{gap:8,alignSelf:"flex-start",width:D},children:[/* @__PURE__ */W(B,{onPress:()=>n(e[0]?.count??0),style:[ea.optionButton,{paddingHorizontal:0,alignSelf:"stretch",alignItems:"center",borderColor:o.buttonPrimary??o.primary,backgroundColor:o.buttonPrimary??o.primary}],children:/* @__PURE__ */W(S,{style:[ea.optionButtonText,{color:o.buttonPrimaryText??"#ffffff",fontFamily:i}],children:"Make Your Selections"})}),C&&!F&&/* @__PURE__ */W(z,{style:{flexDirection:"row",gap:8},children:e.map(({count:e,payout20:t})=>{const n=t>0?$t(w?t*(r/20):t):"—";/* @__PURE__ */
257
- return T(z,{style:{flexDirection:"column",gap:8,alignItems:"center",width:82},children:[/* @__PURE__ */W(z,{style:[ea.tableCell,{backgroundColor:`${o.success}15`,alignSelf:"stretch"}],children:/* @__PURE__ */T(S,{style:[ea.tableCellText,{color:o.success}],children:[e,"/",e]})}),/* @__PURE__ */W(z,{style:[ea.tableCell,{backgroundColor:`${o.primary}12`,alignSelf:"stretch"}],children:/* @__PURE__ */W(S,{style:[ea.tableCellText,{color:o.primary}],children:n})})]},String(e))})})]}):e.map(({count:e,payout20:a})=>{const c=t===e,s=w&&a>0?a*(r/20):null;/* @__PURE__ */
258
- return T(z,{style:{flexDirection:"column",gap:8,alignItems:"center",width:82},children:[/* @__PURE__ */W(B,{onPress:()=>n(e),accessibilityState:{selected:c},style:[ea.optionButton,{alignSelf:"stretch",alignItems:"center",borderColor:c?o.buttonPrimary??o.primary:o.border??o.primary,backgroundColor:c?o.buttonPrimary??o.primary:o.buttonSecondary??o.background}],children:/* @__PURE__ */W(S,{style:[ea.optionButtonText,{color:c?o.buttonPrimaryText??"#ffffff":o.buttonSecondaryText??o.text,fontFamily:i}],numberOfLines:1,children:l?l(e):`Multi ${e}`})}),!F&&a>0&&/* @__PURE__ */T(v,{children:[/* @__PURE__ */W(z,{style:[ea.tableCell,{backgroundColor:`${o.success}15`,alignSelf:"stretch"}],children:/* @__PURE__ */T(S,{style:[ea.tableCellText,{color:o.success}],children:[e,"/",e]})}),w?null!=s&&/* @__PURE__ */W(z,{style:[ea.tableCell,{backgroundColor:`${o.primary}12`,alignSelf:"stretch"}],children:/* @__PURE__ */W(S,{style:[ea.tableCellText,{color:o.primary}],children:$t(s)})}):/* @__PURE__ */W(z,{style:[ea.tableCell,{backgroundColor:`${o.primary}12`,alignSelf:"stretch"}],children:/* @__PURE__ */W(S,{style:[ea.tableCellText,{color:o.primary}],children:$t(a)})})]})]},String(e))})]});/* @__PURE__ */
251
+ /* @__PURE__ */W(x,{horizontal:!0,showsHorizontalScrollIndicator:!1,style:{minHeight:44,marginBottom:6},contentContainerStyle:{alignItems:"center"},children:0===A.legs.length?/* @__PURE__ */W(S,{style:{fontSize:13,color:b.textMuted},children:"Tap Yes or No to start building your multi."}):A.legs.map(e=>/* @__PURE__ */W(_l,{number:e.number,color:"yes"===e.side?R:L,label:`Remove leg ${e.number}, answered ${e.side}`,onSelect:()=>m(e.id,e.side)},e.id))}),
252
+ /* @__PURE__ */T(z,{style:{flexDirection:"row",flexWrap:"wrap",alignItems:"center",gap:10,marginBottom:8},children:[/* @__PURE__ */T(z,{style:{flexDirection:"row",alignItems:"center",gap:8},children:[/* @__PURE__ */W(S,{style:[P,{color:b.textMuted}],children:Tl}),/* @__PURE__ */T(z,H?{accessibilityLabel:`${Tl}. ${_i(l)}`,style:{flexDirection:"row",alignItems:"center",gap:8,borderRadius:10,paddingHorizontal:12,paddingVertical:8,borderWidth:1,borderColor:b.border,backgroundColor:b.backgroundAlt},children:[/* @__PURE__ */W(S,{style:{fontSize:15,fontWeight:"800",color:b.text},children:$t(g)}),/* @__PURE__ */W(S,{style:{fontSize:10,color:b.textMuted},children:"locked"})]}:{style:{flexDirection:"row",alignItems:"center",width:108,borderRadius:10,borderWidth:1,borderColor:b.border,backgroundColor:b.background,overflow:"hidden"},children:[/* @__PURE__ */W(S,{style:{paddingLeft:11,fontSize:16,fontWeight:"800",color:b.text},children:"$"}),/* @__PURE__ */W(C,{keyboardType:"decimal-pad",accessibilityLabel:Tl,value:g>0?String(g):"",onChangeText:e=>{F.current=!0,f(Math.max(0,parseFloat(e)||0))},style:{flex:1,minWidth:0,paddingVertical:8,paddingLeft:3,paddingRight:8,fontSize:15,fontWeight:"800",color:b.text,fontFamily:r}})]})]}),/* @__PURE__ */T(z,{style:{flexGrow:1,flexBasis:150,minWidth:0,flexDirection:"row",alignItems:"baseline",justifyContent:"flex-end",gap:8,borderRadius:10,paddingHorizontal:12,paddingVertical:6,backgroundColor:b.primary},children:[/* @__PURE__ */W(S,{style:[P,{color:D,opacity:.7}],children:"Potential dividend"}),/* @__PURE__ */W(S,{style:{fontSize:20,fontWeight:"800",color:M},children:A.dividendText})]})]}),!o&&/* @__PURE__ */W(at,{theme:i,block:!0,size:"md",radius:"lg",disabled:A.ctaDisabled,onPress:()=>{d(),t?.()},children:A.ctaLabel})]})}function ta({view:e,onChange:t}){const{theme:n}=or(),o=n.colors,i=(n,i)=>{const r=e===n;/* @__PURE__ */
253
+ return W(B,{onPress:()=>t(n),accessibilityRole:"button",accessibilityState:{selected:r},style:[na.option,{backgroundColor:r?o.primary:"transparent"}],children:/* @__PURE__ */W(S,{style:[na.optionText,{color:r?o.primaryText:o.textMuted}],children:i})},n)};/* @__PURE__ */
254
+ return T(z,{style:[na.track,{backgroundColor:o.backgroundAlt,borderColor:o.border}],children:[i("list","List"),i("swipe","Swipe")]})}var na=k.create({track:{flexDirection:"row",alignItems:"center",gap:4,borderRadius:8,borderWidth:1,padding:2,flexShrink:0},option:{borderRadius:6,paddingHorizontal:10,paddingVertical:4},optionText:{fontSize:12,fontWeight:"600"}});function oa({onNext:t,onBack:n,hideTitle:o,hideActions:i,defaultView:r="list",view:l,onViewChange:a,hideViewSwitch:c,onSwipeDragStateChange:s}){const d=or(),{selectedRule:h}=d,{theme:u,selectedGame:g,propositions:f,selections:p,toggleSelection:y,loading:m,error:b,disableQuickPick:w,renderTeamLogo:x,filterSport:k,initialSport:S,gameCategory:C,selectedPropositionCount:B,handlePropositionCountChange:F,goToConfirmation:A,goBack:R,selectedCategory:L,setSelectedCategory:D,selectedSport:M,selectedEventId:P,propositionsForCategoryPicker:H,answeredCount:O}=d,[I,E]=e.useState(r),j=l??I,N=e.useCallback(e=>{void 0===l&&E(e),a?.(e)},[l,a]);e.useEffect(()=>{g||(d.goToSportSelection(),n?.())},[g,d,n]);const G=e.useMemo(()=>{if(!g)return null;const{min:e,max:t}=dn(g,B??void 0,h);if(e>0&&e===t)return e;const n=Zi(g);return null!=B&&B>0&&("game_set"===n||"pick_your_dividend"===n||"safety_net"===n||Xi(g))?B:null},[g,B]),Y=e.useRef(O);e.useEffect(()=>{const e=Y.current;Y.current=O,null!=G&&e<G&&O===G&&(A(),t?.())},[O,G]);const V=e.useMemo(()=>an(H??[]),[H]);if(e.useEffect(()=>{g&&1===V.length&&L!==V[0]&&D(V[0])},[g,V,L,D]),!g)return null;const U=V.length>1&&!L,q=!U&&no(g)&&!P,K=(()=>{if(!no(g)||!P)return g;const e=Math.min(g.max_propositions??f.length,f.length);return{...g,max_propositions:e,allowed_propositions:g.allowed_propositions?.filter(t=>t<=e)}})(),Z=()=>{R(),n?.()};/* @__PURE__ */
255
+ return T(z,{style:ia.container,children:[!o&&/* @__PURE__ */W(z,{style:{marginBottom:24},children:/* @__PURE__ */W($l,{onBack:i?Z:void 0,onNext:i?t:void 0,hideActions:i})}),!no(g)&&/* @__PURE__ */W(hl,{}),
256
+ /* @__PURE__ */W(z,{style:ia.content,children:U?/* @__PURE__ */W(Sl,{hideTitle:!0,hideActions:!0,onSelectCategory:e=>D(e)}):q?/* @__PURE__ */W(Fl,{}):"swipe"===j?/* @__PURE__ */W(kr,{onBack:Z,onNext:t,viewSwitch:c?void 0:/* @__PURE__ */W(ta,{view:j,onChange:N}),onDragStateChange:s}):/* @__PURE__ */T(v,{children:[/* @__PURE__ */W(Ql,{onChange:Z}),/* @__PURE__ */W(Zr,{game:K,propositions:f,selections:p,onToggleSelection:y,onNext:()=>{A(),t?.()},onBack:Z,loading:m,error:b,theme:u,hideActions:!0,initialSport:k??S,renderTeamLogo:x,disableQuickPick:!0,selectedPropositionCount:B,onPropositionCountChange:F,gameCategory:C,headerExtra:c?void 0:/* @__PURE__ */W(ta,{view:j,onChange:N})})]})}),!i&&!U&&!q&&/* @__PURE__ */W(z,{style:{marginTop:24},children:/* @__PURE__ */W(ea,{onNext:t,onBack:n})})]})}var ia=k.create({container:{flex:1},header:{paddingLeft:8},title:{fontWeight:"700"},content:{flex:1}});function ra({tiers:e,selectedCount:t,onSelect:n,colors:o,bodyFont:i,extraBetAmount:r,buttonLabel:l,columnLabel:a="Legs",buildYourOwn:s,quickPickOnly:d,onQuickPick:h,collapsible:u,expanded:g,onExpandedChange:f,summaryTiers:p}){const[y,m]=c(!1),b=g??y,w=null!=r&&20!==r,k=w?`$${Math.round(r)} returns`:"$20 returns",C=e.some(e=>e.payout20>0),F=!!u&&!b,A=C&&!F,R=(p??e).reduce((e,t)=>t.payout20>e?t.payout20:e,0),L=w&&R>0?R*(r/20):R,D=e.length>0?82*e.length+8*Math.max(0,e.length-1):82,M=/* @__PURE__ */T(v,{children:[/* @__PURE__ */T(z,{style:{flexDirection:"column",gap:8,width:70,flexShrink:0},children:[/* @__PURE__ */W(z,{style:{paddingVertical:6,justifyContent:"center"},children:/* @__PURE__ */W(S,{style:[la.labelText,{color:o.textMuted,fontFamily:i}],children:d?"Quick Pick":a})}),A&&/* @__PURE__ */T(v,{children:[/* @__PURE__ */W(z,{style:{paddingVertical:4,justifyContent:"center"},children:/* @__PURE__ */W(S,{style:[la.labelText,{color:o.textMuted,fontFamily:i}],children:"Dividend"})}),/* @__PURE__ */W(z,{style:{paddingVertical:4,justifyContent:"center"},children:/* @__PURE__ */W(S,{style:[la.labelText,{color:o.textMuted,fontFamily:i}],children:k})})]})]}),d?/* @__PURE__ */T(z,{style:{gap:8,alignSelf:"flex-start",width:D},children:[/* @__PURE__ */W(Wl,{counts:(p??e).map(e=>e.count),onPick:e=>h?h(e):n(e),align:"left",direction:"up",colors:{background:o.background??"#ffffff",backgroundAlt:o.backgroundAlt??"#f3f4f6",border:o.border??"#e5e7eb",text:o.text??"#111827"}}),C&&!F&&/* @__PURE__ */W(z,{style:{flexDirection:"row",gap:8},children:e.map(({count:e,payout20:t})=>{const n=w&&t>0?t*(r/20):null;/* @__PURE__ */
257
+ return T(z,{style:{flexDirection:"column",gap:8,alignItems:"center",width:82},children:[/* @__PURE__ */W(z,{style:[la.tableCell,{backgroundColor:`${o.success}15`,alignSelf:"stretch"}],children:/* @__PURE__ */T(S,{style:[la.tableCellText,{color:o.success}],children:[e,"/",e]})}),/* @__PURE__ */W(z,{style:[la.tableCell,{backgroundColor:`${o.primary}12`,alignSelf:"stretch"}],children:/* @__PURE__ */W(S,{style:[la.tableCellText,{color:o.primary}],children:t>0?$t(n??t):"—"})})]},String(e))})})]}):s?/* @__PURE__ */T(z,{style:{gap:8,alignSelf:"flex-start",width:D},children:[/* @__PURE__ */W(B,{onPress:()=>n(e[0]?.count??0),style:[la.optionButton,{paddingHorizontal:0,alignSelf:"stretch",alignItems:"center",borderColor:o.buttonPrimary??o.primary,backgroundColor:o.buttonPrimary??o.primary}],children:/* @__PURE__ */W(S,{style:[la.optionButtonText,{color:o.buttonPrimaryText??"#ffffff",fontFamily:i}],children:"Make Your Selections"})}),C&&!F&&/* @__PURE__ */W(z,{style:{flexDirection:"row",gap:8},children:e.map(({count:e,payout20:t})=>{const n=t>0?$t(w?t*(r/20):t):"—";/* @__PURE__ */
258
+ return T(z,{style:{flexDirection:"column",gap:8,alignItems:"center",width:82},children:[/* @__PURE__ */W(z,{style:[la.tableCell,{backgroundColor:`${o.success}15`,alignSelf:"stretch"}],children:/* @__PURE__ */T(S,{style:[la.tableCellText,{color:o.success}],children:[e,"/",e]})}),/* @__PURE__ */W(z,{style:[la.tableCell,{backgroundColor:`${o.primary}12`,alignSelf:"stretch"}],children:/* @__PURE__ */W(S,{style:[la.tableCellText,{color:o.primary}],children:n})})]},String(e))})})]}):e.map(({count:e,payout20:a})=>{const c=t===e,s=w&&a>0?a*(r/20):null;/* @__PURE__ */
259
+ return T(z,{style:{flexDirection:"column",gap:8,alignItems:"center",width:82},children:[/* @__PURE__ */W(B,{onPress:()=>n(e),accessibilityState:{selected:c},style:[la.optionButton,{alignSelf:"stretch",alignItems:"center",borderColor:c?o.buttonPrimary??o.primary:o.border??o.primary,backgroundColor:c?o.buttonPrimary??o.primary:o.buttonSecondary??o.background}],children:/* @__PURE__ */W(S,{style:[la.optionButtonText,{color:c?o.buttonPrimaryText??"#ffffff":o.buttonSecondaryText??o.text,fontFamily:i}],numberOfLines:1,children:l?l(e):`Multi ${e}`})}),!F&&a>0&&/* @__PURE__ */T(v,{children:[/* @__PURE__ */W(z,{style:[la.tableCell,{backgroundColor:`${o.success}15`,alignSelf:"stretch"}],children:/* @__PURE__ */T(S,{style:[la.tableCellText,{color:o.success}],children:[e,"/",e]})}),w?null!=s&&/* @__PURE__ */W(z,{style:[la.tableCell,{backgroundColor:`${o.primary}12`,alignSelf:"stretch"}],children:/* @__PURE__ */W(S,{style:[la.tableCellText,{color:o.primary}],children:$t(s)})}):/* @__PURE__ */W(z,{style:[la.tableCell,{backgroundColor:`${o.primary}12`,alignSelf:"stretch"}],children:/* @__PURE__ */W(S,{style:[la.tableCellText,{color:o.primary}],children:$t(a)})})]})]},String(e))})]});/* @__PURE__ */
259
260
  return T(z,{style:{flexDirection:"column",gap:8,alignSelf:"stretch"},children:[d?/* @__PURE__ */W(z,{style:{flexDirection:"row",gap:8,alignItems:"flex-start",paddingBottom:6},children:M}):/* @__PURE__ */W(x,{horizontal:!0,showsHorizontalScrollIndicator:!1,contentContainerStyle:{flexDirection:"row",gap:8,alignItems:"flex-start",paddingBottom:6},children:M}),u&&(C?/* @__PURE__ */T(z,{style:{alignSelf:"flex-start",flexDirection:"row",flexWrap:"wrap",alignItems:"center",columnGap:8,rowGap:4,maxWidth:"100%"},children:[/* @__PURE__ */T(S,{style:{fontSize:12,fontWeight:"600",color:o.text,fontFamily:i},children:["Win up to ",
260
261
  /* @__PURE__ */W(S,{style:{color:o.heading??o.text??o.primary},children:$t(L)}),
261
- /* @__PURE__ */W(S,{style:{color:o.textMuted},children:` for $${w?Math.round(r):20}`})]}),/* @__PURE__ */W(B,{onPress:()=>{return e=!b,void 0===g&&m(e),void f?.(e);var e},accessibilityRole:"button",accessibilityState:{expanded:b},style:{paddingVertical:4,paddingHorizontal:10,borderRadius:6,backgroundColor:b?o.buttonSecondary:o.background??"#ffffff",borderWidth:1,borderColor:b?o.primary??o.border:o.border},children:/* @__PURE__ */W(S,{style:{color:o.text,fontSize:12,fontWeight:"600",fontFamily:i},children:b?"Hide dividends":"Show dividends"})})]}):/* @__PURE__ */W(z,{style:{alignSelf:"flex-start",paddingVertical:2,opacity:0},pointerEvents:"none",children:/* @__PURE__ */W(S,{style:{fontSize:12,fontWeight:"600",fontFamily:i},children:"Show dividends"})}))]})}var ea=k.create({labelText:{fontSize:12,fontWeight:"400"},optionButton:{borderWidth:1,borderRadius:8,paddingHorizontal:12,paddingVertical:6},optionButtonText:{fontSize:14,fontWeight:"600"},tableCell:{paddingHorizontal:8,paddingVertical:4,borderRadius:6,alignItems:"center",justifyContent:"center"},tableCellText:{fontSize:12,fontWeight:"700"}});function ta(e){return{game_id:e.selectedGame.id,rule_id:e.selectedRule?.id??null,proposition_ids:e.selectedPropositionIds,selections:e.selections,stake:e.betAmount}}function na({onBack:e,hideActions:t}={}){const{theme:n,headingFont:o,selectedGame:i,selectedEventId:r,propositions:l,selections:a,toggleSelection:c,upgradePropositionCount:s,selectedPropositionCount:d,disableQuickPick:h,answeredCount:u,selectedRule:g}=$i(),f=n.colors,{width:p}=F(),y=p>=640,m=i?dn(i,d,g):{min:0,max:0},b=m.min,w=no(i)&&r?Math.min(m.max,l.length):m.max,x=b>0&&b===w,k=!(i?.allowed_propositions&&i.allowed_propositions.length>0)&&b>0&&w>b,C=x?w:w||l.length,B=e=>{const t=Math.max(0,Math.min(e??C,l.length));for(const i of Object.keys(a)){const e=Number(i);c(e,a[e])}const{yesPicks:n,noPicks:o}=Dn(l,t);for(const i of n)c(i.id,"yes");for(const i of o)c(i.id,"no");s(t)},v=!h&&l.length>0,A=k?Array.from({length:w-b+1},(e,t)=>b+t):[],R=u>0?u:b||C;/* @__PURE__ */
262
- return T(z,{style:[ra.header,{flexDirection:"row",alignItems:"center",justifyContent:"space-between",gap:12}],children:[/* @__PURE__ */T(z,{children:[/* @__PURE__ */W(S,{style:[ra.title,{fontSize:y?24:20,color:se(n),fontFamily:o}],children:"Place Your Wager"}),i&&/* @__PURE__ */W(dl,{onBack:e,hideActions:t,label:i.game_name})]}),v&&(A.length>1?/* @__PURE__ */W(Cl,{counts:A,onPick:e=>B(e),onDoubleAction:()=>B(R),colors:f,menuShadow:ce(n)}):/* @__PURE__ */W(z,{style:{flexShrink:0},children:/* @__PURE__ */W(er,{onPress:()=>B()})}))]})}function oa({onBack:e,onSubmitted:t,authenticated:n=!0,onUnauthenticated:o}){const i=$i(),{theme:r,selectedGame:l,expectedCorrect:a,betAmount:c,submitting:s,submitError:d,canSubmit:h,payouts:u,selectedPropositionIds:g,screenSize:f}=i,p=r.colors,{width:y}=F(),m=y>=640;if(!l)return null;const b=u[a]??0,w=hn(l),x=a===g.length,k=w?.enabled&&x,C=e&&"mobile"!==f;/* @__PURE__ */
263
- return T(z,{style:ra.footer,children:[C&&/* @__PURE__ */W(at,{theme:r,variant:"secondary",onPress:e,children:"Back"}),/* @__PURE__ */T(z,{style:ra.footerRight,children:[d?/* @__PURE__ */W(S,{style:[ra.errorText,{color:p.error}],children:d}):null,(b>0||k)&&m&&/* @__PURE__ */T(z,{style:ra.payoutInfo,children:[/* @__PURE__ */W(S,{style:[ra.payoutLabel,{color:p.textMuted}],children:"Potential winnings"}),/* @__PURE__ */T(S,{style:[ra.payoutAmount,{color:p.heading??p.text}],children:[$t(b),k?/* @__PURE__ */W(S,{style:{color:p.warning},children:" + Jackpot"}):null]})]}),
264
- /* @__PURE__ */W(at,{theme:r,variant:"primary",disabled:!h,onPress:async()=>{n?(await i.handleSubmit(),t?.()):o?.(ta(i))},children:n?s?"Placing…":`Place Entry (${$t(c)})`:"Log in to place entry"})]})]})}function ia({onBack:e,onSubmitted:t,authenticated:n=!0,onUnauthenticated:o,hideTitle:r,hideActions:l}){const a=$i(),{theme:c,selectedGame:s,selectedPropositions:d,selections:h,propositions:u,selectedPropositionCount:g,selectedEventId:f,expectedCorrect:p,setExpectedCorrect:y,betAmount:m,setBetAmount:b,submitting:w,submitError:x,canSubmit:k,winningCounts:C,payouts:A,overloadPayouts:R,renderTeamLogo:L,userBalance:D,onRecharge:M,goBack:P,toggleSelection:H,upgradePropositionCount:O,goToSportSelection:I,selectedRule:E}=a,j=c.colors,{width:N}=F(),G=N>=640;if(i(()=>{s||(I(),e?.())},[s,I,e]),!s)return null;const Y=!!(s.allowed_propositions&&s.allowed_propositions.length>0),V=dn(s,g,E),U=V.min,q=no(s)&&f?Math.min(V.max,u.length):V.max,K=Object.keys(h).length,Z=U>0&&K<U,X=!Y&&U>0&&q>U&&K>=U&&K<q,Q=Y?[...s.allowed_propositions??[]].sort((e,t)=>e-t).filter(e=>e>(g??0)):[],J=Y&&Q.length>0&&!Z,$=X||J,_=q-K;j.textAlt??j.text;const ee=()=>{P(),e?.()},te=(Y?[...s.allowed_propositions??[]].sort((e,t)=>t-e):[]).find(e=>e===K&&e<(g??1/0)),ne=Y&&K<Math.min(...s.allowed_propositions??[1/0]),oe=Y&&Z&&!ne,ie=qi(s),re=function(e,t,n,o){const i=e?.description?.trim();if(i)return i;const r=(t??[]).filter(e=>Number.isFinite(e)).sort((e,t)=>e-t);if(0===r.length||n<=0)return null;const l=r[0];if(l>=n)return"Get every pick right to win.";if(!r.every((e,t)=>e===l+t)||r[r.length-1]!==n)return 2===r.length&&0===r[0]&&r[1]===n?`Get all ${n} picks right — or all ${n} wrong — to win.`:`Get exactly ${r.join(" or ")} of your ${n} picks right to win.`;const a=r.map(e=>o?.[e]).filter(e=>Number.isFinite(e));if(a.length===r.length&&a.length>1&&a.every((e,t)=>0===t||e>a[t-1]))return`Get ${l} of your ${n} picks right to start winning — every pick after that grows the prize.`;const c=n-l;return`Get ${l} of your ${n} picks right to win — up to ${1===c?"one miss":`${c} misses`} still pays.`}(E,C,K,A),le=A[K]||Xi(s,K,m),ae=(C??[]).length>1?"Top prize":"That pays",ce=null!=te?ie.belowRequiredHint(te,g??U):ie.belowRequiredAddOnlyHint(g??U);return i(()=>{!Z||Y&&!ne||ee()},[Z,Y,ne]),/* @__PURE__ */T(z,{style:ra.container,children:[!r&&/* @__PURE__ */W(z,{style:{marginBottom:24},children:/* @__PURE__ */W(na,{onBack:e,hideActions:l})}),
265
- /* @__PURE__ */W(z,{style:ra.content,children:/* @__PURE__ */W(Zr,{game:s,propositions:d,selections:h,onToggleSelection:H,onRemoveSelection:()=>{},onSubmit:async()=>{n?(await a.handleSubmit(),t?.()):o?.(ta(a))},onBack:ee,loading:w,error:x,expectedCorrect:p,onExpectedCorrectChange:y,betAmount:m,onBetAmountChange:b,theme:c,showCustomAmount:!0,betAmountLocked:Ki(s),betAmountLockedNote:Zi(s),hideActions:!0,winningCounts:C,payouts:A,renderTeamLogo:L,canSubmit:k,authenticated:n,userBalance:D,onRecharge:M,boostBanner:/* @__PURE__ */T(v,{children:[(re||le>0)&&/* @__PURE__ */T(z,{style:{padding:12,borderRadius:8,borderWidth:1,borderColor:`${j.primary}30`,backgroundColor:`${j.primary}08`,marginBottom:12},children:[
262
+ /* @__PURE__ */W(S,{style:{color:o.textMuted},children:` for $${w?Math.round(r):20}`})]}),/* @__PURE__ */W(B,{onPress:()=>{return e=!b,void 0===g&&m(e),void f?.(e);var e},accessibilityRole:"button",accessibilityState:{expanded:b},style:{paddingVertical:4,paddingHorizontal:10,borderRadius:6,backgroundColor:b?o.buttonSecondary:o.background??"#ffffff",borderWidth:1,borderColor:b?o.primary??o.border:o.border},children:/* @__PURE__ */W(S,{style:{color:o.text,fontSize:12,fontWeight:"600",fontFamily:i},children:b?"Hide dividends":"Show dividends"})})]}):/* @__PURE__ */W(z,{style:{alignSelf:"flex-start",paddingVertical:2,opacity:0},pointerEvents:"none",children:/* @__PURE__ */W(S,{style:{fontSize:12,fontWeight:"600",fontFamily:i},children:"Show dividends"})}))]})}var la=k.create({labelText:{fontSize:12,fontWeight:"400"},optionButton:{borderWidth:1,borderRadius:8,paddingHorizontal:12,paddingVertical:6},optionButtonText:{fontSize:14,fontWeight:"600"},tableCell:{paddingHorizontal:8,paddingVertical:4,borderRadius:6,alignItems:"center",justifyContent:"center"},tableCellText:{fontSize:12,fontWeight:"700"}});function aa(e){return{game_id:e.selectedGame.id,rule_id:e.selectedRule?.id??null,proposition_ids:e.selectedPropositionIds,selections:e.selections,stake:e.betAmount}}function ca({onBack:e,hideActions:t}={}){const{theme:n,headingFont:o,selectedGame:i,selectedEventId:r,propositions:l,selections:a,toggleSelection:c,upgradePropositionCount:s,selectedPropositionCount:d,disableQuickPick:h,answeredCount:u,selectedRule:g}=or(),f=n.colors,{width:p}=F(),y=p>=640,m=i?dn(i,d,g):{min:0,max:0},b=m.min,w=no(i)&&r?Math.min(m.max,l.length):m.max,x=b>0&&b===w,k=!(i?.allowed_propositions&&i.allowed_propositions.length>0)&&b>0&&w>b,C=x?w:w||l.length,B=e=>{const t=Math.max(0,Math.min(e??C,l.length));for(const i of Object.keys(a)){const e=Number(i);c(e,a[e])}const{yesPicks:n,noPicks:o}=Dn(l,t);for(const i of n)c(i.id,"yes");for(const i of o)c(i.id,"no");s(t)},v=!h&&l.length>0,A=k?Array.from({length:w-b+1},(e,t)=>b+t):[],R=u>0?u:b||C;/* @__PURE__ */
263
+ return T(z,{style:[ha.header,{flexDirection:"row",alignItems:"center",justifyContent:"space-between",gap:12}],children:[/* @__PURE__ */T(z,{children:[/* @__PURE__ */W(S,{style:[ha.title,{fontSize:y?24:20,color:se(n),fontFamily:o}],children:"Place Your Wager"}),i&&/* @__PURE__ */W(pl,{onBack:e,hideActions:t,label:i.game_name})]}),v&&(A.length>1?/* @__PURE__ */W(Wl,{counts:A,onPick:e=>B(e),onDoubleAction:()=>B(R),colors:f,menuShadow:ce(n)}):/* @__PURE__ */W(z,{style:{flexShrink:0},children:/* @__PURE__ */W(rr,{onPress:()=>B()})}))]})}function sa({onBack:e,onSubmitted:t,authenticated:n=!0,onUnauthenticated:o}){const i=or(),{theme:r,selectedGame:l,expectedCorrect:a,betAmount:c,submitting:s,submitError:d,canSubmit:h,payouts:u,selectedPropositionIds:g,screenSize:f}=i,p=r.colors,{width:y}=F(),m=y>=640;if(!l)return null;const b=u[a]??0,w=hn(l),x=a===g.length,k=w?.enabled&&x,C=e&&"mobile"!==f;/* @__PURE__ */
264
+ return T(z,{style:ha.footer,children:[C&&/* @__PURE__ */W(at,{theme:r,variant:"secondary",onPress:e,children:"Back"}),/* @__PURE__ */T(z,{style:ha.footerRight,children:[d?/* @__PURE__ */W(S,{style:[ha.errorText,{color:p.error}],children:d}):null,(b>0||k)&&m&&/* @__PURE__ */T(z,{style:ha.payoutInfo,children:[/* @__PURE__ */W(S,{style:[ha.payoutLabel,{color:p.textMuted}],children:"Potential winnings"}),/* @__PURE__ */T(S,{style:[ha.payoutAmount,{color:p.heading??p.text}],children:[$t(b),k?/* @__PURE__ */W(S,{style:{color:p.warning},children:" + Jackpot"}):null]})]}),
265
+ /* @__PURE__ */W(at,{theme:r,variant:"primary",disabled:!h,onPress:async()=>{n?(await i.handleSubmit(),t?.()):o?.(aa(i))},children:n?s?"Placing…":`Place Entry (${$t(c)})`:"Log in to place entry"})]})]})}function da({onBack:e,onSubmitted:t,authenticated:n=!0,onUnauthenticated:o,hideTitle:r,hideActions:l}){const a=or(),{theme:c,selectedGame:s,selectedPropositions:d,selections:h,propositions:u,selectedPropositionCount:g,selectedEventId:f,expectedCorrect:p,setExpectedCorrect:y,betAmount:m,setBetAmount:b,submitting:w,submitError:x,canSubmit:k,winningCounts:C,payouts:A,overloadPayouts:R,renderTeamLogo:L,userBalance:D,onRecharge:M,goBack:P,toggleSelection:H,upgradePropositionCount:O,goToSportSelection:I,selectedRule:E}=a,j=c.colors,{width:N}=F(),G=N>=640;if(i(()=>{s||(I(),e?.())},[s,I,e]),!s)return null;const Y=!!(s.allowed_propositions&&s.allowed_propositions.length>0),V=dn(s,g,E),U=V.min,q=no(s)&&f?Math.min(V.max,u.length):V.max,K=Object.keys(h).length,Z=U>0&&K<U,X=!Y&&U>0&&q>U&&K>=U&&K<q,Q=Y?[...s.allowed_propositions??[]].sort((e,t)=>e-t).filter(e=>e>(g??0)):[],J=Y&&Q.length>0&&!Z,$=X||J,_=q-K;j.textAlt??j.text;const ee=()=>{P(),e?.()},te=(Y?[...s.allowed_propositions??[]].sort((e,t)=>t-e):[]).find(e=>e===K&&e<(g??1/0)),ne=Y&&K<Math.min(...s.allowed_propositions??[1/0]),oe=Y&&Z&&!ne,ie=Ji(s),re=function(e,t,n,o){const i=e?.description?.trim();if(i)return i;const r=(t??[]).filter(e=>Number.isFinite(e)).sort((e,t)=>e-t);if(0===r.length||n<=0)return null;const l=r[0];if(l>=n)return"Get every pick right to win.";if(!r.every((e,t)=>e===l+t)||r[r.length-1]!==n)return 2===r.length&&0===r[0]&&r[1]===n?`Get all ${n} picks right — or all ${n} wrong — to win.`:`Get exactly ${r.join(" or ")} of your ${n} picks right to win.`;const a=r.map(e=>o?.[e]).filter(e=>Number.isFinite(e));if(a.length===r.length&&a.length>1&&a.every((e,t)=>0===t||e>a[t-1]))return`Get ${l} of your ${n} picks right to start winning — every pick after that grows the prize.`;const c=n-l;return`Get ${l} of your ${n} picks right to win — up to ${1===c?"one miss":`${c} misses`} still pays.`}(E,C,K,A),le=A[K]||er(s,K,m),ae=(C??[]).length>1?"Top prize":"That pays",ce=null!=te?ie.belowRequiredHint(te,g??U):ie.belowRequiredAddOnlyHint(g??U);return i(()=>{!Z||Y&&!ne||ee()},[Z,Y,ne]),/* @__PURE__ */T(z,{style:ha.container,children:[!r&&/* @__PURE__ */W(z,{style:{marginBottom:24},children:/* @__PURE__ */W(ca,{onBack:e,hideActions:l})}),
266
+ /* @__PURE__ */W(z,{style:ha.content,children:/* @__PURE__ */W(_r,{game:s,propositions:d,selections:h,onToggleSelection:H,onRemoveSelection:()=>{},onSubmit:async()=>{n?(await a.handleSubmit(),t?.()):o?.(aa(a))},onBack:ee,loading:w,error:x,expectedCorrect:p,onExpectedCorrectChange:y,betAmount:m,onBetAmountChange:b,theme:c,showCustomAmount:!0,betAmountLocked:$i(s),betAmountLockedNote:_i(s),hideActions:!0,winningCounts:C,payouts:A,renderTeamLogo:L,canSubmit:k,authenticated:n,userBalance:D,onRecharge:M,boostBanner:/* @__PURE__ */T(v,{children:[(re||le>0)&&/* @__PURE__ */T(z,{style:{padding:12,borderRadius:8,borderWidth:1,borderColor:`${j.primary}30`,backgroundColor:`${j.primary}08`,marginBottom:12},children:[
266
267
  /* @__PURE__ */W(S,{style:{fontSize:10,fontWeight:"700",textTransform:"uppercase",letterSpacing:1,color:j.textMuted,marginBottom:4},children:"How you win"}),re&&/* @__PURE__ */W(S,{style:{fontSize:G?14:12,color:j.text},children:re}),le>0&&/* @__PURE__ */T(S,{style:{fontSize:G?14:12,color:j.textMuted,marginTop:6},children:[`${ae} `/* @__PURE__ */,W(S,{style:{fontWeight:"700",color:se(c)},children:$t(le)})]})]}),oe&&/* @__PURE__ */T(z,{style:{padding:12,borderRadius:8,borderWidth:1,borderColor:`${j.warning}40`,backgroundColor:`${j.warning}10`,flexDirection:G?"row":"column",alignItems:G?"center":"flex-start",justifyContent:"space-between",gap:12},children:[/* @__PURE__ */T(S,{style:{fontSize:G?14:12,color:j.text,flexShrink:1},children:["You have ",
267
268
  /* @__PURE__ */T(S,{style:{fontWeight:"700"},children:[K," pick",1!==K?"s":""]}),`. ${ce}`]}),/* @__PURE__ */T(z,{style:{flexDirection:"row",gap:8,flexShrink:0},children:[/* @__PURE__ */W(B,{onPress:ee,style:{paddingHorizontal:12,paddingVertical:6,borderRadius:8,backgroundColor:j.buttonSecondary},children:/* @__PURE__ */W(S,{style:{fontSize:12,fontWeight:"600",color:j.buttonSecondaryText},children:"Add a pick"})}),null!=te&&/* @__PURE__ */W(B,{onPress:()=>O(te),style:{paddingHorizontal:12,paddingVertical:6,borderRadius:8,backgroundColor:j.buttonPrimary},children:/* @__PURE__ */W(S,{style:{fontSize:12,fontWeight:"600",color:j.buttonPrimaryText},children:ie.switchTierLabel(te)})})]})]}),$&&/* @__PURE__ */W(z,{style:{padding:12,borderRadius:8,borderWidth:1,borderColor:`${j.primary}30`,backgroundColor:`${j.primary}08`},children:J?(()=>{const e=g??K,t=R[e],n=m>0?m:20,o=null!=t&&t>0?t*(n/20):null;/* @__PURE__ */
268
269
  return T(z,{children:[
269
270
  /* @__PURE__ */W(S,{style:{fontSize:14,fontWeight:"600",color:j.primary,marginBottom:4},children:ie.overloadTitle}),null!=o&&/* @__PURE__ */T(S,{style:{fontSize:12,color:j.textMuted,marginBottom:8},children:["Currently winning up to ",
270
271
  /* @__PURE__ */W(S,{style:{color:j.heading??j.text,fontWeight:"700"},children:$t(o)}),` with ${e} picks`]}),
271
- /* @__PURE__ */W(_l,{tiers:Q.map(e=>({count:e,payout20:R[e]??0})),selectedCount:void 0,onSelect:e=>{O(e),ee()},colors:j,bodyFont:a.bodyFont,extraBetAmount:20!==n?n:void 0,columnLabel:ie.tableColumnLabel,buttonLabel:ie.tierButtonLabel})]})})():/* @__PURE__ */T(z,{style:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",gap:12},children:[/* @__PURE__ */T(S,{style:{fontSize:12,color:j.textMuted,flex:1},children:[1===_?"Add ":"Add up to ",/* @__PURE__ */T(S,{style:{color:j.primary,fontWeight:"700"},children:[_," more pick",1!==_?"s":""]})]}),/* @__PURE__ */W(B,{onPress:ee,style:{flexShrink:0,paddingHorizontal:12,paddingVertical:6,borderRadius:8,backgroundColor:j.buttonPrimary},children:/* @__PURE__ */W(S,{style:{fontSize:12,fontWeight:"600",color:j.buttonPrimaryText},children:"Add picks"})})]})})]})})}),l&&x?/* @__PURE__ */W(z,{style:{marginTop:12,alignItems:"flex-end"},children:/* @__PURE__ */W(S,{style:[ra.errorText,{color:j.error}],children:x})}):null]})}var ra=k.create({container:{flex:1},header:{paddingLeft:8},title:{fontWeight:"700"},content:{flex:1},footer:{flexDirection:"row",justifyContent:"space-between",alignItems:"center",paddingTop:16},footerRight:{flexDirection:"row",alignItems:"center",gap:12},errorText:{fontSize:12},payoutInfo:{alignItems:"flex-end"},payoutLabel:{fontSize:10,textTransform:"uppercase",letterSpacing:.25},payoutAmount:{fontSize:14,fontWeight:"700"}}),la=m.select({ios:"Menlo",default:"monospace"});function aa({onBack:e,hideActions:t}={}){const{theme:n,headingFont:o,bodyFont:i,placedEntry:r}=$i(),l=n.colors,{width:a}=F(),c=a>=640;/* @__PURE__ */
272
- return T(z,{style:da.titleRow,children:[/* @__PURE__ */T(z,{style:da.titleText,children:[/* @__PURE__ */W(S,{style:[da.title,c&&da.titleWide,{color:se(n),fontFamily:o}],children:"Entry Placed!"}),/* @__PURE__ */W(dl,{onBack:e,hideActions:t,children:/* @__PURE__ */W(S,{style:[da.message,{color:l.textMuted,fontFamily:i}],children:r?/* @__PURE__ */T(v,{children:["Entry"," ",
273
- /* @__PURE__ */T(S,{style:{color:l.primary,fontWeight:"600",fontFamily:la},children:["#",r.id]})," ","successfully submitted"]}):"Your entry has been successfully submitted"})})]}),/* @__PURE__ */W(z,{style:[da.checkCircle,c&&da.checkCircleWide,{backgroundColor:`${l.success}20`}],children:/* @__PURE__ */W(A,{width:c?28:24,height:c?28:24,viewBox:"0 0 24 24",fill:"none",children:/* @__PURE__ */W(H,{d:"M5 13l4 4L19 7",stroke:l.success,strokeWidth:3,strokeLinecap:"round",strokeLinejoin:"round"})})})]})}function ca({onPlayAgain:e,onDone:t,onShare:n}){const{theme:o,reset:i,placedEntry:r,selectedGame:l,selectedPropositions:a,selections:c,betAmount:s}=$i();return o.colors,/* @__PURE__ */T(z,{style:da.footer,children:[/* @__PURE__ */W(at,{theme:o,variant:"secondary",onPress:()=>{i(),e?.()},children:"Place Another"}),t&&/* @__PURE__ */W(at,{theme:o,variant:"primary",onPress:t,children:"Done"})]})}function sa({onPlayAgain:t,onDone:n,onBack:o,onShare:i,hideTitle:r,hideActions:l}){const a=$i(),{theme:c,bodyFont:s,headingFont:d,selectedGame:h,placedEntry:u,betAmount:g,selectedPropositionIds:f,selectedPropositions:p,selections:y,payouts:m,onShare:b}=a,w=c.colors,x=be(c),k=w.textAlt??w.text,{width:C}=F(),B=C>=640,A={shadowColor:"#000",shadowOpacity:"dark"===c.colorScheme?.4:.12,shadowRadius:12,shadowOffset:{width:0,height:6},elevation:2},R=u?.proposition_ids?u.proposition_ids.length:f.length,L=m[R]??null,D=e.useRef(!1);return e.useEffect(()=>{u&&h?D.current=!1:(a.goToSportSelection(),D.current||(D.current=!0,t?t():n?.()))},[u,h,a,t,n]),u?/* @__PURE__ */T(z,{style:da.container,children:[!r&&/* @__PURE__ */W(z,{style:{marginBottom:24},children:/* @__PURE__ */W(aa,{onBack:o,hideActions:l})}),/* @__PURE__ */T(z,{style:[da.content,{gap:B?16:12}],children:[/* @__PURE__ */T(z,{style:[da.summaryCard,B&&da.summaryCardWide,{backgroundColor:x,borderColor:w.border},A],children:[/* @__PURE__ */T(z,{style:da.summaryHeader,children:[(()=>{const e=h?h.allowed_propositions&&h.allowed_propositions.length>0&&h.game_name.replace(/\s+\d+\s*$/,"").trim()||h.game_name:"Entry summary";return h?/* @__PURE__ */W(z,{style:{flex:1,minWidth:0},children:/* @__PURE__ */W(el,{iconUrl:Ze(h),gameName:e,height:18,chipColor:w.primary,textColor:w.text,iconColor:w.primaryText,accentColor:c.brand?.accent})}):/* @__PURE__ */W(S,{numberOfLines:1,style:[da.summaryHeading,B&&da.summaryHeadingWide,{color:se(c),fontFamily:d,flex:1}],children:e})})(),/* @__PURE__ */W(z,{style:{backgroundColor:`${w.primary}15`,borderRadius:999,paddingHorizontal:8,paddingVertical:2,flexShrink:0},children:/* @__PURE__ */T(S,{style:{color:w.primary,fontSize:12,fontWeight:"600",fontFamily:s},children:[R," pick",1!==R?"s":""]})})]}),/* @__PURE__ */T(z,{style:da.statsGrid,children:[
274
- /* @__PURE__ */T(z,{style:[da.statCell,B&&da.statCellWide],children:[/* @__PURE__ */W(S,{style:[da.statLabel,{color:w.textMuted,fontFamily:s}],children:"Selections"}),/* @__PURE__ */W(S,{style:[da.statValue,{color:k,fontFamily:s}],children:R})]}),g>0&&/* @__PURE__ */T(z,{style:[da.statCell,B&&da.statCellWide],children:[/* @__PURE__ */W(S,{style:[da.statLabel,{color:w.textMuted,fontFamily:s}],children:"Wager"}),/* @__PURE__ */W(S,{style:[da.statValue,{color:k,fontFamily:s}],children:$t(g)})]}),null!=L&&L>0&&/* @__PURE__ */T(z,{style:[da.statCell,B&&da.statCellWide],children:[/* @__PURE__ */W(S,{style:[da.statLabel,{color:w.textMuted,fontFamily:s}],children:"Potential win"}),/* @__PURE__ */W(S,{style:[da.statValue,{color:w.heading??w.text,fontWeight:"700",fontFamily:s}],children:$t(L)})]})]})]}),p.length>0&&/* @__PURE__ */T(z,{style:[da.summaryCard,B&&da.summaryCardWide,{backgroundColor:x,borderColor:w.border},A],children:[/* @__PURE__ */W(S,{style:[da.summaryHeading,B&&da.summaryHeadingWide,{color:se(c),fontFamily:d,marginBottom:8}],children:"Your picks"}),/* @__PURE__ */W(z,{style:da.pickList,children:p.map((e,t)=>{const n=y?.[e.id],o="yes"===n;/* @__PURE__ */
275
- return T(z,{style:[da.pickRow,{backgroundColor:w.backgroundAlt}],children:[
272
+ /* @__PURE__ */W(ra,{tiers:Q.map(e=>({count:e,payout20:R[e]??0})),selectedCount:void 0,onSelect:e=>{O(e),ee()},colors:j,bodyFont:a.bodyFont,extraBetAmount:20!==n?n:void 0,columnLabel:ie.tableColumnLabel,buttonLabel:ie.tierButtonLabel})]})})():/* @__PURE__ */T(z,{style:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",gap:12},children:[/* @__PURE__ */T(S,{style:{fontSize:12,color:j.textMuted,flex:1},children:[1===_?"Add ":"Add up to ",/* @__PURE__ */T(S,{style:{color:j.primary,fontWeight:"700"},children:[_," more pick",1!==_?"s":""]})]}),/* @__PURE__ */W(B,{onPress:ee,style:{flexShrink:0,paddingHorizontal:12,paddingVertical:6,borderRadius:8,backgroundColor:j.buttonPrimary},children:/* @__PURE__ */W(S,{style:{fontSize:12,fontWeight:"600",color:j.buttonPrimaryText},children:"Add picks"})})]})})]})})}),l&&x?/* @__PURE__ */W(z,{style:{marginTop:12,alignItems:"flex-end"},children:/* @__PURE__ */W(S,{style:[ha.errorText,{color:j.error}],children:x})}):null]})}var ha=k.create({container:{flex:1},header:{paddingLeft:8},title:{fontWeight:"700"},content:{flex:1},footer:{flexDirection:"row",justifyContent:"space-between",alignItems:"center",paddingTop:16},footerRight:{flexDirection:"row",alignItems:"center",gap:12},errorText:{fontSize:12},payoutInfo:{alignItems:"flex-end"},payoutLabel:{fontSize:10,textTransform:"uppercase",letterSpacing:.25},payoutAmount:{fontSize:14,fontWeight:"700"}}),ua=m.select({ios:"Menlo",default:"monospace"});function ga({onBack:e,hideActions:t}={}){const{theme:n,headingFont:o,bodyFont:i,placedEntry:r}=or(),l=n.colors,{width:a}=F(),c=a>=640;/* @__PURE__ */
273
+ return T(z,{style:ya.titleRow,children:[/* @__PURE__ */T(z,{style:ya.titleText,children:[/* @__PURE__ */W(S,{style:[ya.title,c&&ya.titleWide,{color:se(n),fontFamily:o}],children:"Entry Placed!"}),/* @__PURE__ */W(pl,{onBack:e,hideActions:t,children:/* @__PURE__ */W(S,{style:[ya.message,{color:l.textMuted,fontFamily:i}],children:r?/* @__PURE__ */T(v,{children:["Entry"," ",
274
+ /* @__PURE__ */T(S,{style:{color:l.primary,fontWeight:"600",fontFamily:ua},children:["#",r.id]})," ","successfully submitted"]}):"Your entry has been successfully submitted"})})]}),/* @__PURE__ */W(z,{style:[ya.checkCircle,c&&ya.checkCircleWide,{backgroundColor:`${l.success}20`}],children:/* @__PURE__ */W(A,{width:c?28:24,height:c?28:24,viewBox:"0 0 24 24",fill:"none",children:/* @__PURE__ */W(H,{d:"M5 13l4 4L19 7",stroke:l.success,strokeWidth:3,strokeLinecap:"round",strokeLinejoin:"round"})})})]})}function fa({onPlayAgain:e,onDone:t,onShare:n}){const{theme:o,reset:i,placedEntry:r,selectedGame:l,selectedPropositions:a,selections:c,betAmount:s}=or();return o.colors,/* @__PURE__ */T(z,{style:ya.footer,children:[/* @__PURE__ */W(at,{theme:o,variant:"secondary",onPress:()=>{i(),e?.()},children:"Place Another"}),t&&/* @__PURE__ */W(at,{theme:o,variant:"primary",onPress:t,children:"Done"})]})}function pa({onPlayAgain:t,onDone:n,onBack:o,onShare:i,hideTitle:r,hideActions:l}){const a=or(),{theme:c,bodyFont:s,headingFont:d,selectedGame:h,placedEntry:u,betAmount:g,selectedPropositionIds:f,selectedPropositions:p,selections:y,payouts:m,onShare:b}=a,w=c.colors,x=be(c),k=w.textAlt??w.text,{width:C}=F(),B=C>=640,A={shadowColor:"#000",shadowOpacity:"dark"===c.colorScheme?.4:.12,shadowRadius:12,shadowOffset:{width:0,height:6},elevation:2},R=u?.proposition_ids?u.proposition_ids.length:f.length,L=m[R]??null,D=e.useRef(!1);return e.useEffect(()=>{u&&h?D.current=!1:(a.goToSportSelection(),D.current||(D.current=!0,t?t():n?.()))},[u,h,a,t,n]),u?/* @__PURE__ */T(z,{style:ya.container,children:[!r&&/* @__PURE__ */W(z,{style:{marginBottom:24},children:/* @__PURE__ */W(ga,{onBack:o,hideActions:l})}),/* @__PURE__ */T(z,{style:[ya.content,{gap:B?16:12}],children:[/* @__PURE__ */T(z,{style:[ya.summaryCard,B&&ya.summaryCardWide,{backgroundColor:x,borderColor:w.border},A],children:[/* @__PURE__ */T(z,{style:ya.summaryHeader,children:[(()=>{const e=h?h.allowed_propositions&&h.allowed_propositions.length>0&&h.game_name.replace(/\s+\d+\s*$/,"").trim()||h.game_name:"Entry summary";return h?/* @__PURE__ */W(z,{style:{flex:1,minWidth:0},children:/* @__PURE__ */W(rl,{iconUrl:Ze(h),gameName:e,height:18,chipColor:w.primary,textColor:w.text,iconColor:w.primaryText,accentColor:c.brand?.accent})}):/* @__PURE__ */W(S,{numberOfLines:1,style:[ya.summaryHeading,B&&ya.summaryHeadingWide,{color:se(c),fontFamily:d,flex:1}],children:e})})(),/* @__PURE__ */W(z,{style:{backgroundColor:`${w.primary}15`,borderRadius:999,paddingHorizontal:8,paddingVertical:2,flexShrink:0},children:/* @__PURE__ */T(S,{style:{color:w.primary,fontSize:12,fontWeight:"600",fontFamily:s},children:[R," pick",1!==R?"s":""]})})]}),/* @__PURE__ */T(z,{style:ya.statsGrid,children:[
275
+ /* @__PURE__ */T(z,{style:[ya.statCell,B&&ya.statCellWide],children:[/* @__PURE__ */W(S,{style:[ya.statLabel,{color:w.textMuted,fontFamily:s}],children:"Selections"}),/* @__PURE__ */W(S,{style:[ya.statValue,{color:k,fontFamily:s}],children:R})]}),g>0&&/* @__PURE__ */T(z,{style:[ya.statCell,B&&ya.statCellWide],children:[/* @__PURE__ */W(S,{style:[ya.statLabel,{color:w.textMuted,fontFamily:s}],children:"Wager"}),/* @__PURE__ */W(S,{style:[ya.statValue,{color:k,fontFamily:s}],children:$t(g)})]}),null!=L&&L>0&&/* @__PURE__ */T(z,{style:[ya.statCell,B&&ya.statCellWide],children:[/* @__PURE__ */W(S,{style:[ya.statLabel,{color:w.textMuted,fontFamily:s}],children:"Potential win"}),/* @__PURE__ */W(S,{style:[ya.statValue,{color:w.heading??w.text,fontWeight:"700",fontFamily:s}],children:$t(L)})]})]})]}),p.length>0&&/* @__PURE__ */T(z,{style:[ya.summaryCard,B&&ya.summaryCardWide,{backgroundColor:x,borderColor:w.border},A],children:[/* @__PURE__ */W(S,{style:[ya.summaryHeading,B&&ya.summaryHeadingWide,{color:se(c),fontFamily:d,marginBottom:8}],children:"Your picks"}),/* @__PURE__ */W(z,{style:ya.pickList,children:p.map((e,t)=>{const n=y?.[e.id],o="yes"===n;/* @__PURE__ */
276
+ return T(z,{style:[ya.pickRow,{backgroundColor:w.backgroundAlt}],children:[
276
277
  /* @__PURE__ */W(z,{style:{width:20,height:20,borderRadius:10,backgroundColor:w.primary,alignItems:"center",justifyContent:"center",flexShrink:0},children:/* @__PURE__ */W(S,{style:{color:w.primaryText,fontSize:10,fontWeight:"700",fontFamily:s},children:t+1})}),
277
278
  /* @__PURE__ */T(z,{style:{flex:1,minWidth:0},children:[/* @__PURE__ */T(S,{numberOfLines:1,style:{color:k,fontSize:B?14:12,fontWeight:"500",fontFamily:s},children:[rn(e)?null:/* @__PURE__ */T(v,{children:[e.home_team," ",
278
- /* @__PURE__ */W(S,{style:{color:w.textMuted},children:"vs"})," "]}),e.away_team]}),/* @__PURE__ */W(S,{numberOfLines:1,style:{color:w.textMuted,fontSize:11,fontFamily:s},children:e.description})]}),null!=n&&/* @__PURE__ */W(ht,{theme:c,size:"sm",value:o?"yes":"no",style:{alignSelf:"center",flexShrink:0}})]},e.id)})})]})]})]}):null}var da=k.create({container:{flex:1},content:{flex:1},titleRow:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",gap:12,paddingLeft:8},titleText:{flex:1,minWidth:0},checkCircle:{width:48,height:48,borderRadius:999,alignItems:"center",justifyContent:"center",flexShrink:0},checkCircleWide:{width:56,height:56},title:{fontSize:20,fontWeight:"700",lineHeight:28},titleWide:{fontSize:24,lineHeight:32},message:{fontSize:14},summaryCard:{width:"100%",borderRadius:12,padding:16,borderWidth:1},summaryCardWide:{padding:20},summaryHeader:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",marginBottom:12,gap:12},summaryHeading:{fontSize:14,fontWeight:"600"},summaryHeadingWide:{fontSize:16},statsGrid:{flexDirection:"row",flexWrap:"wrap",gap:12},statCell:{flexBasis:"45%",flexGrow:1},statCellWide:{flexBasis:"30%"},statLabel:{fontSize:10,fontWeight:"600",letterSpacing:.25,textTransform:"uppercase"},statValue:{fontSize:14,fontWeight:"600",marginTop:2},pickList:{gap:6},pickRow:{flexDirection:"row",alignItems:"center",gap:8,paddingHorizontal:12,paddingVertical:8,borderRadius:4},footer:{flexDirection:"row",justifyContent:"space-between",alignItems:"center",paddingTop:16}});function ha({onBack:e,hideActions:t}={}){const{theme:n,headingFont:o}=$i(),{width:i}=F(),r=i>=640;/* @__PURE__ */
279
- return T(z,{style:ga.header,children:[/* @__PURE__ */W(S,{style:[ga.title,{fontSize:r?24:20,color:se(n),fontFamily:o}],children:"Your Entries"}),/* @__PURE__ */W(dl,{onBack:e,hideActions:t})]})}function ua({onSelectEntry:e,onBack:t,hideTitle:n,hideActions:o}){const{theme:i,apiUrl:r,apiKey:l,fetchImpl:a,getAuthHeaders:c,userId:s,demoEntries:d,demoGames:h,demoPropositions:u,renderTeamLogo:g,filterSport:f}=$i();/* @__PURE__ */
280
- return T(z,{style:ga.container,children:[!n&&/* @__PURE__ */W(z,{style:{marginBottom:24},children:/* @__PURE__ */W(ha,{onBack:t,hideActions:o})}),/* @__PURE__ */W(z,{style:ga.content,children:/* @__PURE__ */W(ol,{apiUrl:r,apiKey:l,fetchImpl:a,getAuthHeaders:c,userId:s,demoEntries:d,demoGames:h,demoPropositions:u,onSelectEntry:e,theme:i,renderTeamLogo:g,filterSport:f})})]})}var ga=k.create({container:{flex:1},header:{paddingLeft:8},title:{fontWeight:"700"},content:{flex:1}});function fa({onBack:e,hideActions:t,backLabel:n="Category"}={}){const{theme:o,selectedCategory:i}=$i(),r=o.colors,l=Ge(o),{width:a}=F(),c=a>=640;/* @__PURE__ */
281
- return T(z,{style:c&&ma.headerWide,children:[/* @__PURE__ */W(S,{style:[ma.sectionTitle,c&&ma.sectionTitleWide,{color:r.primary,fontFamily:l}],children:cn(i)}),/* @__PURE__ */W(dl,{onBack:e,hideActions:t,label:e?n:void 0})]})}function pa({onCancel:e}){const{theme:t,screenSize:n}=$i(),o=t.colors;return e&&"mobile"!==n?/* @__PURE__ */W(z,{style:ma.footer,children:/* @__PURE__ */W(B,{onPress:e,style:[ma.secondaryBtn,{backgroundColor:o.buttonSecondary}],children:/* @__PURE__ */W(S,{style:[ma.secondaryBtnText,{color:o.buttonSecondaryText}],children:"Cancel"})})}):null}function ya({onSelectSport:t,onCancel:n,hideTitle:o,hideActions:i,renderSportLogo:r,renderSportTagline:l,backLabel:a,comingSoonSports:c}){const{theme:s,propositionsForSportPicker:d,sportSummaries:h,loading:u,setSelectedSport:g,clearSelectedGame:f,selectedCategory:p,sportBaseKey:y,displaySportName:m}=$i(),b=s.colors,w=be(s),x=Ge(s),k=Ne(s),C=se(s),{width:v}=F(),A=v>=640,R=A?48:40,[L,D]=e.useState(null),M=en(d),P=Object.keys(M);return u?/* @__PURE__ */W(z,{style:ma.container,children:/* @__PURE__ */W(_n,{colors:ke(s),bodyFont:k,variant:"sport",categoryCount:P.length>0?P.length:2})}):/* @__PURE__ */T(z,{style:ma.container,children:[!o&&/* @__PURE__ */W(z,{style:ma.titleWrap,children:/* @__PURE__ */W(fa,{onBack:n,hideActions:i,backLabel:a})}),/* @__PURE__ */W(z,{style:ma.content,children:/* @__PURE__ */T(z,{style:ma.grid,children:[P.map(e=>{const n=h.find(t=>t.key===e),o=n?.active_props??M[e].length,i=l?.(e,o)??(n?`${a=n.games_today} game${1===a?"":"s"} today · ${c=n.active_props} pick${1===c?"":"s"} available`:function(e,t){return 0===e?"racing"===t?"No races today":"casino"===t?"No games today":"No picks available":"racing"===t?`${e} race${1===e?"":"s"} today`:"casino"===t?`${e} game${1===e?"":"s"} available`:`${e} pick${1===e?"":"s"} available`}(o,p));var a,c;const s=m(e),d=L===e,u=n?n.games_today>0:o>0;/* @__PURE__ */
282
- return T(B,{onPress:()=>{g(e),f(),t?.(e)},...rt(()=>D(e),()=>D(t=>t===e?null:t)),style:[ma.gridCard,A&&ma.gridCardWide,{backgroundColor:w,borderColor:d?b.primary:b.border},ma.gridCardRaised],activeOpacity:.85,children:[r?r(e):/* @__PURE__ */W(Fl,{gameKey:e,size:R,footer:null,sportBaseKey:y,title:`${s} button`}),
283
- /* @__PURE__ */T(z,{style:ma.gridText,children:[/* @__PURE__ */W(S,{numberOfLines:1,style:[ma.gridName,A&&ma.gridNameWide,{color:C,fontFamily:x}],children:s}),/* @__PURE__ */T(z,{style:ma.gridTaglineRow,children:[u?/* @__PURE__ */W(z,{style:[ma.liveDot,{backgroundColor:b.success}]}):null,/* @__PURE__ */W(S,{numberOfLines:1,style:[ma.gridMeta,{color:b.primary,fontFamily:k}],children:i})]})]}),
284
- /* @__PURE__ */W(z,{style:ma.gridChevron,children:/* @__PURE__ */W(zt,{size:20,color:b.textMuted})})]},e)}),c?.map(e=>{const{game:t,league:n}=function(e,t){const n=e.match(/^(.*?)\s*\(([^)]+)\)\s*$/);return n?{game:n[1].trim(),league:n[2].trim()}:{game:e,league:t}}(e.label,e.short??qt(e.key,y));/* @__PURE__ */
285
- return T(z,{style:[ma.gridCard,A&&ma.gridCardWide,{backgroundColor:ne(b.backgroundAlt,.4),borderColor:ne(b.border,.7)}],children:[
286
- /* @__PURE__ */W(z,{style:ma.comingSoonLogo,children:r?r(e.key):/* @__PURE__ */W(Fl,{gameKey:e.key,short:e.short,size:R,footer:null,sportBaseKey:y,title:`${e.label} button`})}),
287
- /* @__PURE__ */T(z,{style:ma.gridText,children:[/* @__PURE__ */W(S,{numberOfLines:1,style:[ma.gridName,A&&ma.gridNameWide,{color:b.textMuted,fontFamily:x}],children:n&&n!==t?`${t} · ${n}`:t}),/* @__PURE__ */W(S,{numberOfLines:1,style:[ma.gridMeta,ma.gridMetaSpaced,{color:b.textMuted,fontFamily:k}],children:(o=e.seasonStart,o?`Starts ${o}`:"Coming soon")})]}),
288
- /* @__PURE__ */T(z,{style:[ma.soonPill,{backgroundColor:b.backgroundAlt}],children:[/* @__PURE__ */W(Ft,{size:12,color:b.textMuted}),/* @__PURE__ */W(S,{style:[ma.soonPillText,{color:b.textMuted,fontFamily:k}],children:"Soon"})]})]},e.key);var o})]})})]})}var ma=k.create({container:{flex:1},centered:{flex:1,flexDirection:"row",justifyContent:"center",alignItems:"center",padding:32},titleWrap:{marginBottom:8},headerWide:{paddingLeft:8},sectionTitle:{fontSize:10,fontWeight:"700",textTransform:"uppercase",letterSpacing:1.4,marginBottom:12},sectionTitleWide:{fontSize:12,letterSpacing:2.16,marginBottom:16},content:{flex:1},grid:{flexDirection:"row",flexWrap:"wrap",gap:12},gridCard:{flexBasis:"100%",flexGrow:1,minWidth:0,flexDirection:"row",alignItems:"center",gap:12,borderRadius:16,borderWidth:1,paddingHorizontal:12,paddingVertical:12},gridCardWide:{flexBasis:"48%",gap:14,paddingHorizontal:16,paddingVertical:16},gridCardRaised:{shadowColor:"#000",shadowOpacity:.1,shadowRadius:6,shadowOffset:{width:0,height:4},elevation:2},gridText:{flexDirection:"column",alignItems:"flex-start",minWidth:0,flexShrink:1,flexGrow:1},gridName:{fontSize:14,fontWeight:"800",letterSpacing:-.35,lineHeight:18,maxWidth:"100%"},gridNameWide:{fontSize:16,lineHeight:20},gridTaglineRow:{marginTop:4,flexDirection:"row",alignItems:"center",gap:6,minWidth:0},gridMeta:{fontSize:9.3,fontWeight:"700",textTransform:"uppercase",letterSpacing:1.1,flexShrink:1},gridMetaSpaced:{marginTop:4},liveDot:{width:6,height:6,borderRadius:3},gridChevron:{marginLeft:"auto"},comingSoonLogo:{opacity:.6},soonPill:{marginLeft:"auto",flexDirection:"row",alignItems:"center",gap:4,borderRadius:999,paddingHorizontal:8,paddingVertical:4},soonPillText:{fontSize:10,fontWeight:"600",textTransform:"uppercase",letterSpacing:1},footer:{flexDirection:"row",alignItems:"center",paddingTop:16},secondaryBtn:{paddingHorizontal:20,paddingVertical:10,borderRadius:8},secondaryBtnText:{fontSize:14,fontWeight:"500"}});function ba(e,t){const n=/^#([0-9a-f]{6})$/i.exec((e??"").trim());if(!n)return e;const o=parseInt(n[1],16);return`rgba(${o>>16&255}, ${o>>8&255}, ${255&o}, ${t})`}function wa({ink:e,ball:t,size:n,balls:o=1}){/* @__PURE__ */
279
+ /* @__PURE__ */W(S,{style:{color:w.textMuted},children:"vs"})," "]}),e.away_team]}),/* @__PURE__ */W(S,{numberOfLines:1,style:{color:w.textMuted,fontSize:11,fontFamily:s},children:e.description})]}),null!=n&&/* @__PURE__ */W(ht,{theme:c,size:"sm",value:o?"yes":"no",style:{alignSelf:"center",flexShrink:0}})]},e.id)})})]})]})]}):null}var ya=k.create({container:{flex:1},content:{flex:1},titleRow:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",gap:12,paddingLeft:8},titleText:{flex:1,minWidth:0},checkCircle:{width:48,height:48,borderRadius:999,alignItems:"center",justifyContent:"center",flexShrink:0},checkCircleWide:{width:56,height:56},title:{fontSize:20,fontWeight:"700",lineHeight:28},titleWide:{fontSize:24,lineHeight:32},message:{fontSize:14},summaryCard:{width:"100%",borderRadius:12,padding:16,borderWidth:1},summaryCardWide:{padding:20},summaryHeader:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",marginBottom:12,gap:12},summaryHeading:{fontSize:14,fontWeight:"600"},summaryHeadingWide:{fontSize:16},statsGrid:{flexDirection:"row",flexWrap:"wrap",gap:12},statCell:{flexBasis:"45%",flexGrow:1},statCellWide:{flexBasis:"30%"},statLabel:{fontSize:10,fontWeight:"600",letterSpacing:.25,textTransform:"uppercase"},statValue:{fontSize:14,fontWeight:"600",marginTop:2},pickList:{gap:6},pickRow:{flexDirection:"row",alignItems:"center",gap:8,paddingHorizontal:12,paddingVertical:8,borderRadius:4},footer:{flexDirection:"row",justifyContent:"space-between",alignItems:"center",paddingTop:16}});function ma({onBack:e,hideActions:t}={}){const{theme:n,headingFont:o}=or(),{width:i}=F(),r=i>=640;/* @__PURE__ */
280
+ return T(z,{style:wa.header,children:[/* @__PURE__ */W(S,{style:[wa.title,{fontSize:r?24:20,color:se(n),fontFamily:o}],children:"Your Entries"}),/* @__PURE__ */W(pl,{onBack:e,hideActions:t})]})}function ba({onSelectEntry:e,onBack:t,hideTitle:n,hideActions:o}){const{theme:i,apiUrl:r,apiKey:l,fetchImpl:a,getAuthHeaders:c,userId:s,demoEntries:d,demoGames:h,demoPropositions:u,renderTeamLogo:g,filterSport:f}=or();/* @__PURE__ */
281
+ return T(z,{style:wa.container,children:[!n&&/* @__PURE__ */W(z,{style:{marginBottom:24},children:/* @__PURE__ */W(ma,{onBack:t,hideActions:o})}),/* @__PURE__ */W(z,{style:wa.content,children:/* @__PURE__ */W(cl,{apiUrl:r,apiKey:l,fetchImpl:a,getAuthHeaders:c,userId:s,demoEntries:d,demoGames:h,demoPropositions:u,onSelectEntry:e,theme:i,renderTeamLogo:g,filterSport:f})})]})}var wa=k.create({container:{flex:1},header:{paddingLeft:8},title:{fontWeight:"700"},content:{flex:1}});function xa({onBack:e,hideActions:t,backLabel:n="Category"}={}){const{theme:o,selectedCategory:i}=or(),r=o.colors,l=Ge(o),{width:a}=F(),c=a>=640;/* @__PURE__ */
282
+ return T(z,{style:c&&Ca.headerWide,children:[/* @__PURE__ */W(S,{style:[Ca.sectionTitle,c&&Ca.sectionTitleWide,{color:r.primary,fontFamily:l}],children:cn(i)}),/* @__PURE__ */W(pl,{onBack:e,hideActions:t,label:e?n:void 0})]})}function ka({onCancel:e}){const{theme:t,screenSize:n}=or(),o=t.colors;return e&&"mobile"!==n?/* @__PURE__ */W(z,{style:Ca.footer,children:/* @__PURE__ */W(B,{onPress:e,style:[Ca.secondaryBtn,{backgroundColor:o.buttonSecondary}],children:/* @__PURE__ */W(S,{style:[Ca.secondaryBtnText,{color:o.buttonSecondaryText}],children:"Cancel"})})}):null}function Sa({onSelectSport:t,onCancel:n,hideTitle:o,hideActions:i,renderSportLogo:r,renderSportTagline:l,backLabel:a,comingSoonSports:c}){const{theme:s,propositionsForSportPicker:d,sportSummaries:h,loading:u,setSelectedSport:g,clearSelectedGame:f,selectedCategory:p,sportBaseKey:y,displaySportName:m}=or(),b=s.colors,w=be(s),x=Ge(s),k=Ne(s),C=se(s),{width:v}=F(),A=v>=640,R=A?48:40,[L,D]=e.useState(null),M=en(d),P=Object.keys(M);return u?/* @__PURE__ */W(z,{style:Ca.container,children:/* @__PURE__ */W(_n,{colors:ke(s),bodyFont:k,variant:"sport",categoryCount:P.length>0?P.length:2})}):/* @__PURE__ */T(z,{style:Ca.container,children:[!o&&/* @__PURE__ */W(z,{style:Ca.titleWrap,children:/* @__PURE__ */W(xa,{onBack:n,hideActions:i,backLabel:a})}),/* @__PURE__ */W(z,{style:Ca.content,children:/* @__PURE__ */T(z,{style:Ca.grid,children:[P.map(e=>{const n=h.find(t=>t.key===e),o=n?.active_props??M[e].length,i=l?.(e,o)??(n?`${a=n.games_today} game${1===a?"":"s"} today · ${c=n.active_props} pick${1===c?"":"s"} available`:function(e,t){return 0===e?"racing"===t?"No races today":"casino"===t?"No games today":"No picks available":"racing"===t?`${e} race${1===e?"":"s"} today`:"casino"===t?`${e} game${1===e?"":"s"} available`:`${e} pick${1===e?"":"s"} available`}(o,p));var a,c;const s=m(e),d=L===e,u=n?n.games_today>0:o>0;/* @__PURE__ */
283
+ return T(B,{onPress:()=>{g(e),f(),t?.(e)},...rt(()=>D(e),()=>D(t=>t===e?null:t)),style:[Ca.gridCard,A&&Ca.gridCardWide,{backgroundColor:w,borderColor:d?b.primary:b.border},Ca.gridCardRaised],activeOpacity:.85,children:[r?r(e):/* @__PURE__ */W(Rl,{gameKey:e,size:R,footer:null,sportBaseKey:y,title:`${s} button`}),
284
+ /* @__PURE__ */T(z,{style:Ca.gridText,children:[/* @__PURE__ */W(S,{numberOfLines:1,style:[Ca.gridName,A&&Ca.gridNameWide,{color:C,fontFamily:x}],children:s}),/* @__PURE__ */T(z,{style:Ca.gridTaglineRow,children:[u?/* @__PURE__ */W(z,{style:[Ca.liveDot,{backgroundColor:b.success}]}):null,/* @__PURE__ */W(S,{numberOfLines:1,style:[Ca.gridMeta,{color:b.primary,fontFamily:k}],children:i})]})]}),
285
+ /* @__PURE__ */W(z,{style:Ca.gridChevron,children:/* @__PURE__ */W(zt,{size:20,color:b.textMuted})})]},e)}),c?.map(e=>{const{game:t,league:n}=function(e,t){const n=e.match(/^(.*?)\s*\(([^)]+)\)\s*$/);return n?{game:n[1].trim(),league:n[2].trim()}:{game:e,league:t}}(e.label,e.short??qt(e.key,y));/* @__PURE__ */
286
+ return T(z,{style:[Ca.gridCard,A&&Ca.gridCardWide,{backgroundColor:ne(b.backgroundAlt,.4),borderColor:ne(b.border,.7)}],children:[
287
+ /* @__PURE__ */W(z,{style:Ca.comingSoonLogo,children:r?r(e.key):/* @__PURE__ */W(Rl,{gameKey:e.key,short:e.short,size:R,footer:null,sportBaseKey:y,title:`${e.label} button`})}),
288
+ /* @__PURE__ */T(z,{style:Ca.gridText,children:[/* @__PURE__ */W(S,{numberOfLines:1,style:[Ca.gridName,A&&Ca.gridNameWide,{color:b.textMuted,fontFamily:x}],children:n&&n!==t?`${t} · ${n}`:t}),/* @__PURE__ */W(S,{numberOfLines:1,style:[Ca.gridMeta,Ca.gridMetaSpaced,{color:b.textMuted,fontFamily:k}],children:(o=e.seasonStart,o?`Starts ${o}`:"Coming soon")})]}),
289
+ /* @__PURE__ */T(z,{style:[Ca.soonPill,{backgroundColor:b.backgroundAlt}],children:[/* @__PURE__ */W(Ft,{size:12,color:b.textMuted}),/* @__PURE__ */W(S,{style:[Ca.soonPillText,{color:b.textMuted,fontFamily:k}],children:"Soon"})]})]},e.key);var o})]})})]})}var Ca=k.create({container:{flex:1},centered:{flex:1,flexDirection:"row",justifyContent:"center",alignItems:"center",padding:32},titleWrap:{marginBottom:8},headerWide:{paddingLeft:8},sectionTitle:{fontSize:10,fontWeight:"700",textTransform:"uppercase",letterSpacing:1.4,marginBottom:12},sectionTitleWide:{fontSize:12,letterSpacing:2.16,marginBottom:16},content:{flex:1},grid:{flexDirection:"row",flexWrap:"wrap",gap:12},gridCard:{flexBasis:"100%",flexGrow:1,minWidth:0,flexDirection:"row",alignItems:"center",gap:12,borderRadius:16,borderWidth:1,paddingHorizontal:12,paddingVertical:12},gridCardWide:{flexBasis:"48%",gap:14,paddingHorizontal:16,paddingVertical:16},gridCardRaised:{shadowColor:"#000",shadowOpacity:.1,shadowRadius:6,shadowOffset:{width:0,height:4},elevation:2},gridText:{flexDirection:"column",alignItems:"flex-start",minWidth:0,flexShrink:1,flexGrow:1},gridName:{fontSize:14,fontWeight:"800",letterSpacing:-.35,lineHeight:18,maxWidth:"100%"},gridNameWide:{fontSize:16,lineHeight:20},gridTaglineRow:{marginTop:4,flexDirection:"row",alignItems:"center",gap:6,minWidth:0},gridMeta:{fontSize:9.3,fontWeight:"700",textTransform:"uppercase",letterSpacing:1.1,flexShrink:1},gridMetaSpaced:{marginTop:4},liveDot:{width:6,height:6,borderRadius:3},gridChevron:{marginLeft:"auto"},comingSoonLogo:{opacity:.6},soonPill:{marginLeft:"auto",flexDirection:"row",alignItems:"center",gap:4,borderRadius:999,paddingHorizontal:8,paddingVertical:4},soonPillText:{fontSize:10,fontWeight:"600",textTransform:"uppercase",letterSpacing:1},footer:{flexDirection:"row",alignItems:"center",paddingTop:16},secondaryBtn:{paddingHorizontal:20,paddingVertical:10,borderRadius:8},secondaryBtnText:{fontSize:14,fontWeight:"500"}});function Ba(e,t){const n=/^#([0-9a-f]{6})$/i.exec((e??"").trim());if(!n)return e;const o=parseInt(n[1],16);return`rgba(${o>>16&255}, ${o>>8&255}, ${255&o}, ${t})`}function za({ink:e,ball:t,size:n,balls:o=1}){/* @__PURE__ */
289
290
  return T(A,{width:n,height:n,viewBox:"2 12 76 62",fill:"none",children:[
290
291
  /* @__PURE__ */W(M,{x1:"9",y1:"18",x2:"71",y2:"18",stroke:e,strokeWidth:2.5,strokeLinecap:"round"}),
291
292
  /* @__PURE__ */W(H,{d:"M12 18L13 25.67 M17.6 18L19 25.67 M17.6 18L13 25.67 M23.2 18L25 25.67 M23.2 18L19 25.67 M28.8 18L31 25.67 M28.8 18L25 25.67 M34.4 18L37 25.67 M34.4 18L31 25.67 M40 18L43 25.67 M40 18L37 25.67 M45.6 18L49 25.67 M45.6 18L43 25.67 M51.2 18L55 25.67 M51.2 18L49 25.67 M56.8 18L61 25.67 M56.8 18L55 25.67 M62.4 18L67 25.67 M62.4 18L61 25.67 M68 18L67 25.67 M13 25.67L15.5 33.33 M19 25.67L21.62 33.33 M19 25.67L15.5 33.33 M25 25.67L27.75 33.33 M25 25.67L21.62 33.33 M31 25.67L33.88 33.33 M31 25.67L27.75 33.33 M37 25.67L40 33.33 M37 25.67L33.88 33.33 M43 25.67L46.12 33.33 M43 25.67L40 33.33 M49 25.67L52.25 33.33 M49 25.67L46.12 33.33 M55 25.67L58.38 33.33 M55 25.67L52.25 33.33 M61 25.67L64.5 33.33 M61 25.67L58.38 33.33 M67 25.67L64.5 33.33 M15.5 33.33L19 41 M21.62 33.33L25 41 M21.62 33.33L19 41 M27.75 33.33L31 41 M27.75 33.33L25 41 M33.88 33.33L37 41 M33.88 33.33L31 41 M40 33.33L43 41 M40 33.33L37 41 M46.12 33.33L49 41 M46.12 33.33L43 41 M52.25 33.33L55 41 M52.25 33.33L49 41 M58.38 33.33L61 41 M58.38 33.33L55 41 M64.5 33.33L61 41 M19 41L23 48.67 M25 41L28.67 48.67 M25 41L23 48.67 M31 41L34.33 48.67 M31 41L28.67 48.67 M37 41L40 48.67 M37 41L34.33 48.67 M43 41L45.67 48.67 M43 41L40 48.67 M49 41L51.33 48.67 M49 41L45.67 48.67 M55 41L57 48.67 M55 41L51.33 48.67 M61 41L57 48.67 M23 48.67L25 56.33 M28.67 48.67L31 56.33 M28.67 48.67L25 56.33 M34.33 48.67L37 56.33 M34.33 48.67L31 56.33 M40 48.67L43 56.33 M40 48.67L37 56.33 M45.67 48.67L49 56.33 M45.67 48.67L43 56.33 M51.33 48.67L55 56.33 M51.33 48.67L49 56.33 M57 48.67L55 56.33 M25 56.33L22 64 M31 56.33L31 60.1 M31 56.33L22 64 M37 56.33L40 59.5 M37 56.33L31 60.1 M43 56.33L49 60.1 M43 56.33L40 59.5 M49 56.33L58 64 M49 56.33L49 60.1 M55 56.33L58 64",fill:"none",stroke:e,strokeWidth:1.3,strokeLinecap:"round",strokeLinejoin:"round",opacity:.9}),
292
293
  /* @__PURE__ */W(H,{d:"M12 18 C12.17 19.28 12.42 23.12 13 25.67 C13.58 28.23 14.5 30.77 15.5 33.33 C16.5 35.88 17.75 38.44 19 41 C20.25 43.56 22 46.12 23 48.67 C24 51.23 25.17 53.77 25 56.33 C24.83 58.88 22.5 62.72 22 64 M68 18 C67.83 19.28 67.58 23.12 67 25.67 C66.42 28.23 65.5 30.77 64.5 33.33 C63.5 35.88 62.25 38.44 61 41 C59.75 43.56 58 46.12 57 48.67 C56 51.23 54.83 53.77 55 56.33 C55.17 58.88 57.5 62.72 58 64",fill:"none",stroke:e,strokeWidth:2.2,strokeLinecap:"round",strokeLinejoin:"round"}),
293
- /* @__PURE__ */W(D,{cx:"40",cy:"64",rx:"18",ry:"4.5",fill:"none",stroke:e,strokeWidth:2.2}),(o>=2?[{cx:33,cy:52,r:6.6},{cx:48,cy:49,r:6.6}]:[{cx:40,cy:50,r:8}]).map((e,n)=>/* @__PURE__ */W(R,{cx:e.cx,cy:e.cy,r:e.r,fill:t},n))]})}function xa({ink:e,ball:t,size:n}){/* @__PURE__ */
294
+ /* @__PURE__ */W(D,{cx:"40",cy:"64",rx:"18",ry:"4.5",fill:"none",stroke:e,strokeWidth:2.2}),(o>=2?[{cx:33,cy:52,r:6.6},{cx:48,cy:49,r:6.6}]:[{cx:40,cy:50,r:8}]).map((e,n)=>/* @__PURE__ */W(R,{cx:e.cx,cy:e.cy,r:e.r,fill:t},n))]})}function Fa({ink:e,ball:t,size:n}){/* @__PURE__ */
294
295
  return T(A,{width:n,height:n,viewBox:"0 0 100 100",fill:"none",children:[
295
296
  /* @__PURE__ */W(R,{cx:"50",cy:"50",r:"34",stroke:e,strokeWidth:3,opacity:.9}),
296
297
  /* @__PURE__ */W(R,{cx:"50",cy:"50",r:"23",stroke:e,strokeWidth:3,opacity:.65}),
297
298
  /* @__PURE__ */W(R,{cx:"50",cy:"50",r:"8",fill:t}),
298
299
  /* @__PURE__ */W(M,{x1:"80",y1:"20",x2:"55",y2:"45",stroke:e,strokeWidth:4,strokeLinecap:"round"}),
299
- /* @__PURE__ */W(H,{d:"M50 50 l8 -3 -3 8 z",fill:e})]})}function ka({ink:e,ball:t,size:n}){const o=[{x:16,h:22},{x:40,h:40},{x:64,h:60}];/* @__PURE__ */
300
+ /* @__PURE__ */W(H,{d:"M50 50 l8 -3 -3 8 z",fill:e})]})}function va({ink:e,ball:t,size:n}){const o=[{x:16,h:22},{x:40,h:40},{x:64,h:60}];/* @__PURE__ */
300
301
  return T(A,{width:n,height:n,viewBox:"0 0 100 100",fill:"none",children:[
301
302
  /* @__PURE__ */W(M,{x1:"10",y1:"84",x2:"90",y2:"84",stroke:e,strokeWidth:2,opacity:.5}),o.map((n,i)=>/* @__PURE__ */W(I,{x:n.x,y:84-n.h,width:16,height:n.h,rx:3.5,fill:i===o.length-1?t:e,opacity:i===o.length-1?1:.5+.22*i},n.x)),
302
303
  /* @__PURE__ */W(H,{d:"M14 60 L38 48 L62 30 L86 14",stroke:e,strokeWidth:3,strokeLinecap:"round",strokeLinejoin:"round",fill:"none"}),
303
- /* @__PURE__ */W(H,{d:"M86 14 l-9 1 M86 14 l1 9",stroke:e,strokeWidth:3,strokeLinecap:"round"})]})}function Sa({kind:e,balls:t,...n}){return"safety_net"===e?/* @__PURE__ */W(wa,{...n,balls:t}):/* @__PURE__ */W("pick"===e?ka:xa,{...n})}function Ca({kind:e,size:t=56,balls:n}){const{theme:o}=$i(),i=o.colors,r=o.brand?.chip??i.primary,l=o.brand?.icon??i.primaryText,a=fe(o);/* @__PURE__ */
304
- return W(z,{style:{width:t,height:t,borderRadius:.3*t,backgroundColor:r,borderWidth:1,borderColor:ba(l,.16),alignItems:"center",justifyContent:"center"},children:/* @__PURE__ */W(Sa,{kind:e,ink:l,ball:a,balls:n,size:Math.round(.68*t)})})}function Ba({option:e,renderDividends:t}){const{theme:n}=$i(),o=n.colors,i=Ge(n),r=o.primary,l=fe(n),a=e.dividends??[];return t?/* @__PURE__ */W(v,{children:t(e)}):/* @__PURE__ */T(z,{style:Ra.dividends,children:[/* @__PURE__ */T(z,{style:Ra.dividendRow,children:[/* @__PURE__ */W(S,{style:[Ra.dividendsCaption,{color:o.textMuted}],children:"IF YOU LAND"}),/* @__PURE__ */T(S,{style:[Ra.dividendsCaption,{color:o.textMuted}],children:["$",20," RETURNS"]})]}),a.map((t,n)=>{const a=e.tierLegs?.[n];/* @__PURE__ */
305
- return T(z,{style:Ra.dividendTierRow,children:[/* @__PURE__ */T(z,{style:Ra.dividendLabelCol,children:[/* @__PURE__ */W(S,{style:[Ra.dividendLabel,{color:o.text}],children:t.label}),null!=a&&a>0&&/* @__PURE__ */T(z,{style:Ra.tierLegs,accessibilityElementsHidden:!0,importantForAccessibility:"no-hide-descendants",children:[Array.from({length:a}).map((e,t)=>/* @__PURE__ */W(z,{style:[Ra.tierLegDot,{backgroundColor:r}]},t)),0===t.misses&&/* @__PURE__ */W(z,{style:[Ra.tierLegBall,{backgroundColor:l}]})]})]}),/* @__PURE__ */W(S,{style:[Ra.dividendMult,{color:r,fontFamily:i}],children:$t(t.payout20)})]},t.misses)})]})}function za({option:e,renderDividends:t}){const{theme:o}=$i(),l=o.colors,s=e.dividends??[],d=s.reduce((e,t)=>t.payout20>e?t.payout20:e,0),[h,g]=c(!1),f=a(null),p=a(null),[y,b]=c(null),[w,x]=c(!1),[k,C]=c(null),F="web"===m.OS,A=40+36*Math.max(s.length,1)+12,R=n(()=>{const e=f.current;if(!e||"function"!=typeof e.getBoundingClientRect)return;const t=e.getBoundingClientRect(),n=window.innerHeight-t.bottom,o=t.top,i=n<A&&o>n;b({left:t.left,top:i?t.top-6:t.bottom+6,flipUp:i})},[A]);r(()=>{if(!h||!F)return void b(null);R();const e=()=>g(!1),t=()=>R();return window.addEventListener("scroll",e,!0),window.addEventListener("resize",t),()=>{window.removeEventListener("scroll",e,!0),window.removeEventListener("resize",t)}},[h,F,R]),i(()=>{if(!h)return;if(F){const e=e=>{const t=f.current,n=e.target;t&&"function"==typeof t.contains&&t.contains(n)||p.current&&p.current.contains(n)||g(!1)};return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)}const e=f.current;e&&"function"==typeof e.measureInWindow&&e.measureInWindow((e,t,n,o)=>{const i=u.get("window").height-(t+o);x(i<A&&t>i),C({x:e,y:t,width:n,height:o})})},[h,F,A]);const L=t?/* @__PURE__ */W(z,{style:{paddingHorizontal:12,paddingVertical:8},children:t(e)}):/* @__PURE__ */T(v,{children:[/* @__PURE__ */W(z,{style:{paddingHorizontal:12,paddingVertical:6,borderBottomWidth:1,borderBottomColor:l.border},children:/* @__PURE__ */T(S,{style:{fontSize:10,fontWeight:"700",color:l.text,opacity:.55,letterSpacing:.5,textTransform:"uppercase"},children:["Dividends for $",20]})}),s.map((e,t)=>/* @__PURE__ */T(z,{style:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",paddingHorizontal:12,paddingVertical:8,borderTopWidth:0===t?0:1,borderTopColor:l.border,gap:12},children:[/* @__PURE__ */W(S,{style:{fontWeight:"700",color:l.text,fontSize:13,flex:1},children:e.label}),/* @__PURE__ */W(S,{style:{fontWeight:"700",color:e.payout20>0?l.heading??l.text:l.textMuted,fontSize:13,textAlign:"right"},children:e.payout20>0?$t(e.payout20):"—"})]},e.misses))]});/* @__PURE__ */
304
+ /* @__PURE__ */W(H,{d:"M86 14 l-9 1 M86 14 l1 9",stroke:e,strokeWidth:3,strokeLinecap:"round"})]})}function Wa({kind:e,balls:t,...n}){return"safety_net"===e?/* @__PURE__ */W(za,{...n,balls:t}):/* @__PURE__ */W("pick"===e?va:Fa,{...n})}function Ta({kind:e,size:t=56,balls:n}){const{theme:o}=or(),i=o.colors,r=o.brand?.chip??i.primary,l=o.brand?.icon??i.primaryText,a=fe(o);/* @__PURE__ */
305
+ return W(z,{style:{width:t,height:t,borderRadius:.3*t,backgroundColor:r,borderWidth:1,borderColor:Ba(l,.16),alignItems:"center",justifyContent:"center"},children:/* @__PURE__ */W(Wa,{kind:e,ink:l,ball:a,balls:n,size:Math.round(.68*t)})})}function Aa({option:e,renderDividends:t}){const{theme:n}=or(),o=n.colors,i=Ge(n),r=o.primary,l=fe(n),a=e.dividends??[];return t?/* @__PURE__ */W(v,{children:t(e)}):/* @__PURE__ */T(z,{style:Oa.dividends,children:[/* @__PURE__ */T(z,{style:Oa.dividendRow,children:[/* @__PURE__ */W(S,{style:[Oa.dividendsCaption,{color:o.textMuted}],children:"IF YOU LAND"}),/* @__PURE__ */T(S,{style:[Oa.dividendsCaption,{color:o.textMuted}],children:["$",20," RETURNS"]})]}),a.map((t,n)=>{const a=e.tierLegs?.[n];/* @__PURE__ */
306
+ return T(z,{style:Oa.dividendTierRow,children:[/* @__PURE__ */T(z,{style:Oa.dividendLabelCol,children:[/* @__PURE__ */W(S,{style:[Oa.dividendLabel,{color:o.text}],children:t.label}),null!=a&&a>0&&/* @__PURE__ */T(z,{style:Oa.tierLegs,accessibilityElementsHidden:!0,importantForAccessibility:"no-hide-descendants",children:[Array.from({length:a}).map((e,t)=>/* @__PURE__ */W(z,{style:[Oa.tierLegDot,{backgroundColor:r}]},t)),0===t.misses&&/* @__PURE__ */W(z,{style:[Oa.tierLegBall,{backgroundColor:l}]})]})]}),/* @__PURE__ */W(S,{style:[Oa.dividendMult,{color:r,fontFamily:i}],children:$t(t.payout20)})]},t.misses)})]})}function Ra({option:e,renderDividends:t}){const{theme:o}=or(),l=o.colors,s=e.dividends??[],d=s.reduce((e,t)=>t.payout20>e?t.payout20:e,0),[h,g]=c(!1),f=a(null),p=a(null),[y,b]=c(null),[w,x]=c(!1),[k,C]=c(null),F="web"===m.OS,A=40+36*Math.max(s.length,1)+12,R=n(()=>{const e=f.current;if(!e||"function"!=typeof e.getBoundingClientRect)return;const t=e.getBoundingClientRect(),n=window.innerHeight-t.bottom,o=t.top,i=n<A&&o>n;b({left:t.left,top:i?t.top-6:t.bottom+6,flipUp:i})},[A]);r(()=>{if(!h||!F)return void b(null);R();const e=()=>g(!1),t=()=>R();return window.addEventListener("scroll",e,!0),window.addEventListener("resize",t),()=>{window.removeEventListener("scroll",e,!0),window.removeEventListener("resize",t)}},[h,F,R]),i(()=>{if(!h)return;if(F){const e=e=>{const t=f.current,n=e.target;t&&"function"==typeof t.contains&&t.contains(n)||p.current&&p.current.contains(n)||g(!1)};return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)}const e=f.current;e&&"function"==typeof e.measureInWindow&&e.measureInWindow((e,t,n,o)=>{const i=u.get("window").height-(t+o);x(i<A&&t>i),C({x:e,y:t,width:n,height:o})})},[h,F,A]);const L=t?/* @__PURE__ */W(z,{style:{paddingHorizontal:12,paddingVertical:8},children:t(e)}):/* @__PURE__ */T(v,{children:[/* @__PURE__ */W(z,{style:{paddingHorizontal:12,paddingVertical:6,borderBottomWidth:1,borderBottomColor:l.border},children:/* @__PURE__ */T(S,{style:{fontSize:10,fontWeight:"700",color:l.text,opacity:.55,letterSpacing:.5,textTransform:"uppercase"},children:["Dividends for $",20]})}),s.map((e,t)=>/* @__PURE__ */T(z,{style:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",paddingHorizontal:12,paddingVertical:8,borderTopWidth:0===t?0:1,borderTopColor:l.border,gap:12},children:[/* @__PURE__ */W(S,{style:{fontWeight:"700",color:l.text,fontSize:13,flex:1},children:e.label}),/* @__PURE__ */W(S,{style:{fontWeight:"700",color:e.payout20>0?l.heading??l.text:l.textMuted,fontSize:13,textAlign:"right"},children:e.payout20>0?$t(e.payout20):"—"})]},e.misses))]});/* @__PURE__ */
306
307
  return T(z,{style:{alignSelf:"center",maxWidth:"100%",width:"100%",alignItems:"center"},children:[/* @__PURE__ */T(z,{style:{flexDirection:"row",flexWrap:"wrap",alignItems:"center",justifyContent:"center",columnGap:8,rowGap:4,maxWidth:"100%"},children:[d>0?/* @__PURE__ */T(S,{style:{fontSize:12,fontWeight:"600",color:l.text},children:["Win up to ",
307
308
  /* @__PURE__ */W(S,{style:{color:l.heading??l.text},children:$t(d)}),
308
- /* @__PURE__ */T(S,{style:{color:l.textMuted},children:[" for $",20]})]}):null,/* @__PURE__ */T(z,{ref:f,collapsable:!1,style:{position:"relative",alignSelf:"flex-start"},children:[/* @__PURE__ */W(B,{onPress:()=>g(e=>!e),accessibilityRole:"button",accessibilityState:{expanded:h},style:{paddingVertical:4,paddingHorizontal:10,borderRadius:6,backgroundColor:h?l.buttonSecondary:l.background,borderWidth:1,borderColor:h?l.primary??l.border:l.border},children:/* @__PURE__ */W(S,{style:{color:l.text,fontSize:12,fontWeight:"600"},children:h?"Hide dividends":"Show dividends"})}),/* @__PURE__ */W(jn,{visible:h&&!F,anchor:k,onClose:()=>g(!1),flipUp:w,align:"left",children:/* @__PURE__ */W(z,{style:{elevation:8,backgroundColor:l.background,borderRadius:8,borderWidth:1,borderColor:l.border,minWidth:220,shadowColor:"#000",shadowOffset:{width:0,height:6},shadowOpacity:.18,shadowRadius:12,overflow:"hidden"},children:L})})]})]}),h&&F&&y&&"undefined"!=typeof document?G(/* @__PURE__ */W("div",{ref:p,style:{position:"fixed",left:y.left,top:y.top,transform:y.flipUp?"translateY(-100%)":void 0,zIndex:9999,backgroundColor:l.background,border:`1px solid ${l.border}`,borderRadius:8,minWidth:220,overflow:"hidden",boxShadow:"0 8px 24px rgba(0,0,0,0.18)"},children:L}),document.body):null]})}function Fa({kind:e,option:t,onSelect:n,renderDividends:o}){const{theme:i}=$i(),r=i.colors,l=Ge(i),a=se(i),s=r.primary,d=r.selectionCard??r.backgroundAlt,{width:h}=F(),u=h>=640,g="safety_net"===e?Math.max(1,(t.detail?.length??2)-1):void 0,f=!!o||(t.dividends?.length??0)>0,p=f&&!!t.dividendsInline,[y,m]=c(!1);/* @__PURE__ */
309
- return T(z,{...rt(()=>m(!0),()=>m(!1)),style:[Ra.card,u&&Ra.cardWide,{backgroundColor:d,borderColor:y?s:r.border,shadowColor:y?s:"#000",shadowOpacity:y?.28:.08,shadowRadius:y?14:8,shadowOffset:{width:0,height:y?12:8},elevation:y?4:1,transform:[{translateY:y?-2:0}]}],children:[/* @__PURE__ */T(B,{onPress:n,activeOpacity:.85,accessibilityRole:"button",style:Ra.cardMain,children:[
310
- /* @__PURE__ */W(Ca,{kind:e,balls:g,size:60}),
311
- /* @__PURE__ */T(z,{style:Ra.cardText,children:[
312
- /* @__PURE__ */W(S,{style:[Ra.cardTitle,{color:a,fontFamily:l}],children:t.label}),t.stat?/* @__PURE__ */W(z,{style:[Ra.statChip,{backgroundColor:ba(s,.12)}],children:/* @__PURE__ */W(S,{style:[Ra.statChipText,{color:s}],children:t.stat.toUpperCase()})}):null,
313
- /* @__PURE__ */W(z,{style:Ra.detailBlock,children:t.detail?.map(e=>/* @__PURE__ */W(S,{style:[Ra.detailLine,{color:r.textMuted}],children:e},e))})]}),
314
- /* @__PURE__ */W(z,{style:{alignSelf:"center",flexShrink:0,transform:[{translateX:y?2:0}]},children:/* @__PURE__ */W(A,{width:22,height:22,viewBox:"0 0 24 24",fill:"none",children:/* @__PURE__ */W(H,{d:"m9 6 6 6-6 6",stroke:s,strokeWidth:2.5,strokeLinecap:"round",strokeLinejoin:"round"})})})]}),f?/* @__PURE__ */W(z,{style:[Ra.dividendsWrap,{borderTopColor:ba(a,.08)}],children:/* @__PURE__ */W(p?Ba:za,{option:t,renderDividends:o})}):null]})}function va({kind:e,highlights:t,onSelect:n,accessibilityLabel:o}){const{theme:i}=$i(),r=i.colors,l=se(i),a=fe(i),s=r.primary,d=r.selectionCard??r.backgroundAlt,{width:h}=F(),u=h>=640,[g,f]=c(!1);/* @__PURE__ */
315
- return W(z,{...rt(()=>f(!0),()=>f(!1)),style:[Ra.card,u&&Ra.cardWide,{backgroundColor:d,borderColor:g?s:r.border,shadowColor:g?s:"#000",shadowOpacity:g?.28:.08,shadowRadius:g?14:8,shadowOffset:{width:0,height:g?12:8},elevation:g?4:1,transform:[{translateY:g?-2:0}]}],children:/* @__PURE__ */T(B,{onPress:n,activeOpacity:.85,accessibilityRole:"button",accessibilityLabel:o,style:Ra.cardMain,children:[
316
- /* @__PURE__ */W(Ca,{kind:e,size:60}),
317
- /* @__PURE__ */W(z,{style:{flex:1,minWidth:0,gap:8},children:t.map(e=>/* @__PURE__ */T(z,{style:Ra.bulletRow,children:[/* @__PURE__ */W(z,{style:[Ra.dot,{backgroundColor:a}]}),/* @__PURE__ */W(S,{style:[Ra.bulletText,{color:l}],children:e})]},e))}),
318
- /* @__PURE__ */W(z,{style:{alignSelf:"center",flexShrink:0,transform:[{translateX:g?2:0}]},children:/* @__PURE__ */W(A,{width:22,height:22,viewBox:"0 0 24 24",fill:"none",children:/* @__PURE__ */W(H,{d:"m9 6 6 6-6 6",stroke:s,strokeWidth:2.5,strokeLinecap:"round",strokeLinejoin:"round"})})})]})})}function Wa({onBack:e,hideActions:t}={}){const{theme:n,selectedGame:o,selectedPropositionCount:i}=$i(),r=Ge(n),l=n.colors,a=Ho(o,i),{width:c}=F(),s=c<640;/* @__PURE__ */
319
- return T(z,{style:[Ra.header,s&&Ra.headerCompact],children:[/* @__PURE__ */W(S,{accessibilityRole:"header",style:[Ra.sectionTitle,s&&Ra.sectionTitleCompact,{color:l.primary,fontFamily:r}],children:a?.title??"About this game"}),/* @__PURE__ */W(dl,{onBack:e,hideActions:t,label:o?`${o.game_name}${a?.subtitle?` · ${a.subtitle}`:""}`:void 0})]})}function Ta({onContinue:e,canContinue:t,continueLabel:n="Continue"}){const{theme:o,screenSize:i}=$i(),r=o.colors;return e&&"mobile"!==i?/* @__PURE__ */W(z,{style:Ra.footer,children:/* @__PURE__ */W(B,{onPress:e,disabled:!t,accessibilityRole:"button",accessibilityState:{disabled:!t},style:[Ra.smallBtn,{backgroundColor:r.buttonPrimary,opacity:t?1:.45}],children:/* @__PURE__ */W(S,{style:[Ra.smallBtnText,{color:r.buttonPrimaryText}],children:n})})}):null}function Aa({onContinue:e,onBack:t,hideTitle:n,config:o,renderDividends:i,backLabel:r="Games"}){const{theme:a,selectedGame:c,selectedPropositionCount:s,setExpectedCorrect:d,handlePropositionCountChange:h,bodyFont:u,screenSize:g}=$i(),f=a.colors,p=Ge(a),y="mobile"===g,{width:m}=F(),b=m>=640,w=l(()=>o??Ho(c,s),[o,c,s]),x=w?.options??[],k=t=>{null!=t?.expectedCorrect&&d(t.expectedCorrect),null!=t?.propositionCount&&h(t.propositionCount),e?.()};if(!c||!w)/* @__PURE__ */return W(z,{children:/* @__PURE__ */W(S,{style:{color:f.textMuted,fontFamily:u},children:"No rule setup required."})});const C=w.kind,B=w.headline??w.heroTitle,v=w.continueLabel??"Continue";/* @__PURE__ */
320
- return T(z,{style:[Ra.container,{backgroundColor:f.background}],children:[t?/* @__PURE__ */W(z,{style:Ra.backRow,children:/* @__PURE__ */W(sl,{onBack:t,label:r})}):null,/* @__PURE__ */T(ut,{style:Ra.inner,children:[n?null:/* @__PURE__ */W(S,{accessibilityRole:"header",style:[Ra.sectionTitle,Ra.sectionTitleInBody,{color:f.primary,fontFamily:p,textAlign:"center"}],children:w.title}),
321
- /* @__PURE__ */T(z,{style:Ra.headerBlock,children:[
322
- /* @__PURE__ */W(el,{iconUrl:Ze(c),gameName:c.game_name,height:y?24:32,chipColor:f.primary,textColor:f.text,iconColor:f.primaryText,accentColor:a.brand?.accent,compact:y}),w.subtitle?/* @__PURE__ */W(S,{style:[Ra.pickSubtitle,{color:f.textMuted}],children:w.subtitle}):null,B||w.heroTagline?/* @__PURE__ */W(S,{style:[Ra.tagline,{color:f.textMuted}],children:w.heroTagline??B}):null]}),
323
- /* @__PURE__ */W(Yl,{}),x.length>0?/* @__PURE__ */W(z,{style:[Ra.cardList,b&&x.length>1&&Ra.cardGrid],children:x.map(e=>/* @__PURE__ */W(z,{style:b&&x.length>1?Ra.cardCell:void 0,children:/* @__PURE__ */W(Fa,{kind:C,option:e,onSelect:()=>k(e),renderDividends:i})},e.id))}):w.highlights&&w.highlights.length>0?/* @__PURE__ */W(va,{kind:C,highlights:w.highlights,onSelect:()=>k(),accessibilityLabel:v}):null]})]})}var Ra=k.create({container:{flex:1},backRow:{paddingHorizontal:16,marginBottom:4},inner:{flex:1,paddingHorizontal:16,maxWidth:768,width:"100%",alignSelf:"center"},header:{marginBottom:8,paddingHorizontal:16},headerCompact:{paddingHorizontal:12},sectionTitle:{fontSize:12,fontWeight:"700",textTransform:"uppercase",letterSpacing:2.16,marginBottom:16},sectionTitleCompact:{fontSize:10,letterSpacing:1.4,marginBottom:12},sectionTitleInBody:{marginBottom:12},headerBlock:{alignItems:"center",marginBottom:24},pickSubtitle:{fontSize:13,marginTop:8},tagline:{fontSize:14,lineHeight:20,textAlign:"center",maxWidth:384,marginTop:12},cardList:{gap:12},cardGrid:{flexDirection:"row",flexWrap:"wrap",alignItems:"stretch"},cardCell:{flexBasis:"48%",flexGrow:1,minWidth:"45%"},card:{flexGrow:1,borderWidth:2,borderRadius:24,paddingHorizontal:16,paddingVertical:16},cardWide:{paddingHorizontal:20,paddingVertical:20},cardMain:{flexDirection:"row",alignItems:"flex-start",gap:14,flexGrow:1},cardText:{flex:1,minWidth:0,gap:5},cardTitle:{fontSize:19,fontWeight:"800",letterSpacing:-.3},statChip:{alignSelf:"flex-start",borderRadius:999,paddingHorizontal:8,paddingVertical:3},statChipText:{fontSize:9,fontWeight:"700",letterSpacing:.6},detailBlock:{minHeight:60,gap:2,justifyContent:"flex-start"},detailLine:{fontSize:13,lineHeight:18},dividendsWrap:{marginTop:12,paddingTop:12,borderTopWidth:1},dividends:{gap:5},dividendsCaption:{fontSize:9,fontWeight:"600",letterSpacing:1},dividendRow:{flexDirection:"row",alignItems:"baseline",justifyContent:"space-between",gap:12},dividendTierRow:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",gap:12},dividendLabelCol:{flexShrink:1,minWidth:0,gap:3},dividendLabel:{fontSize:13},tierLegs:{flexDirection:"row",alignItems:"center",gap:3},tierLegDot:{width:5,height:5,borderRadius:1.5,opacity:.85},tierLegBall:{width:7,height:7,borderRadius:999,marginLeft:2},dividendMult:{fontSize:15,fontWeight:"800",fontVariant:["tabular-nums"]},radio:{width:24,height:24,borderRadius:12,borderWidth:2,alignItems:"center",justifyContent:"center"},bulletRow:{flexDirection:"row",alignItems:"flex-start",gap:12},dot:{width:6,height:6,borderRadius:3,marginTop:7},bulletText:{flex:1,fontSize:15,lineHeight:21},footer:{flexDirection:"row",justifyContent:"flex-end",paddingTop:16,paddingHorizontal:16},smallBtn:{paddingHorizontal:20,paddingVertical:11,borderRadius:10},smallBtnText:{fontSize:14,fontWeight:"700"}});function La({onBack:e,hideActions:t}={}){const{theme:n,selectedGame:o}=$i(),i=Ge(n),r=n.colors,{width:l}=F(),a=l<640;/* @__PURE__ */
324
- return T(z,{style:[Ma.header,a&&Ma.headerCompact],children:[/* @__PURE__ */W(S,{style:[Ma.sectionTitle,a&&Ma.sectionTitleCompact,{color:r.primary,fontFamily:i}],children:"The fastest multi"}),/* @__PURE__ */W(dl,{onBack:e,hideActions:t,label:o?.game_name})]})}function Da({onQuickPick:e,onPickYourOwn:t,onBack:n,hideTitle:o,config:i,backLabel:r="Games"}){const{theme:a,selectedGame:s,selectedPropositionCount:d,handlePropositionCountChange:h,setExpectedCorrect:u,setBetAmount:g,quickPickGame:f,goToSportSelection:p}=$i(),y=a.colors,m=Ne(a),b=Ge(a),w=se(a),x=be(a),{width:k}=F(),v=k>=640,[A,R]=c(!1),L=l(()=>i??pi(s),[i,s]),[D,M]=c(()=>L?null!=d&&L.legOptions.includes(d)?d:L.defaultLegs:8),[P,H]=c(()=>L?.defaultStake??20);if(!s||!gi(s)||!L)/* @__PURE__ */return W(z,{style:[Ma.container,{backgroundColor:y.background}],children:/* @__PURE__ */W(S,{style:{color:y.textMuted,fontFamily:m},children:"No game set available."})});const O=fi(P,D,{operatorMargin:L.operatorMargin,perLegProbability:L.perLegProbability}),I=P>=L.minStake,E=(e,t)=>/* @__PURE__ */T(z,{style:Ma.controlLabelRow,children:[/* @__PURE__ */W(S,{style:[Ma.controlLabelText,{color:y.textMuted}],children:e}),/* @__PURE__ */W(S,{style:[Ma.controlValueText,{color:w}],children:t})]});/* @__PURE__ */
325
- return T(z,{style:[Ma.container,{backgroundColor:y.background}],children:[n?/* @__PURE__ */W(z,{style:Ma.backRow,children:/* @__PURE__ */W(sl,{onBack:n,label:r})}):null,/* @__PURE__ */T(ut,{style:Ma.inner,children:[
326
- /* @__PURE__ */W(Pl,{eyebrow:o?null:"The fastest multi",iconUrl:Ze(s),gameName:s.game_name,tagline:L.tagline}),
327
- /* @__PURE__ */W(Yl,{}),
328
- /* @__PURE__ */T(z,{style:[Ma.ticket,v&&Ma.ticketWide,{backgroundColor:x,borderColor:y.border,shadowColor:w,shadowOpacity:.14,shadowRadius:14,shadowOffset:{width:0,height:10},elevation:1}],children:[E("Legs",`${D} legs`),
329
- /* @__PURE__ */W(z,{style:Ma.chipRow,children:L.legOptions.map(e=>{const t=e===D;/* @__PURE__ */
330
- return W(B,{onPress:()=>M(e),accessibilityRole:"radio",accessibilityState:{selected:t},activeOpacity:.8,style:[Ma.chip,{backgroundColor:t?y.primary:"transparent",borderColor:t?y.primary:y.border}],children:/* @__PURE__ */W(S,{style:[Ma.chipText,{color:t?y.primaryText:y.textMuted}],children:e})},e)})}),
331
- /* @__PURE__ */T(z,{style:Ma.hintRow,children:[/* @__PURE__ */W(S,{style:[Ma.hintText,{color:y.textMuted}],children:"Easier to land"}),/* @__PURE__ */W(S,{style:[Ma.hintText,{color:y.textMuted}],children:"Bigger prize"})]}),
332
- /* @__PURE__ */T(z,{style:Ma.stakeBlock,children:[E("Stake",$t(P)),
333
- /* @__PURE__ */T(z,{style:[Ma.inputWrap,{borderColor:A?y.borderFocus??y.primary:y.border,backgroundColor:y.backgroundAlt}],children:[/* @__PURE__ */W(S,{style:[Ma.inputPrefix,{color:y.textMuted}],children:"$"}),/* @__PURE__ */W(C,{keyboardType:"decimal-pad",placeholder:"Enter stake",placeholderTextColor:y.textMuted,accessibilityLabel:"Stake amount",onFocus:()=>R(!0),onBlur:()=>R(!1),value:P?String(P):"",onChangeText:e=>{if(""===e)return void H(0);const t=Number(e);Number.isFinite(t)&&H((e=>{const t=Math.max(0,Math.round(100*e)/100);return null!==L.maxStake?Math.min(t,L.maxStake):t})(t))},style:[Ma.input,{color:y.textAlt??y.text,fontFamily:m}]})]}),
334
- /* @__PURE__ */W(z,{style:Ma.chipRow,children:L.quickStakes.map(e=>{const t=e===P;/* @__PURE__ */
335
- return W(B,{onPress:()=>H(e),activeOpacity:.8,style:[Ma.stakeChip,{backgroundColor:t?y.primary:"transparent",borderColor:t?y.primary:y.border}],children:/* @__PURE__ */T(S,{style:[Ma.chipText,{color:t?y.primaryText:y.textMuted}],children:["$",e]})},e)})}),!I&&P>0?/* @__PURE__ */T(S,{style:[Ma.errorText,{color:y.error}],children:["Minimum stake is ",$t(L.minStake),"."]}):null]}),
336
- /* @__PURE__ */T(z,{style:[Ma.dividendBlock,{borderTopColor:Dl(w,.08)}],children:[
337
- /* @__PURE__ */T(z,{style:Ma.dividendCaptionRow,children:[/* @__PURE__ */T(S,{style:[Ma.dividendCaption,{color:y.textMuted}],children:["If all ",D," land"]}),/* @__PURE__ */T(S,{style:[Ma.dividendCaption,{color:y.textMuted}],children:[$t(P)," returns"]})]}),
338
- /* @__PURE__ */T(z,{style:Ma.dividendMainRow,children:[/* @__PURE__ */T(z,{style:Ma.dividendMainLeft,children:[/* @__PURE__ */W(S,{style:[Ma.perfectTicket,{color:y.text}],children:"Perfect ticket"}),/* @__PURE__ */W(jl,{legs:D})]}),/* @__PURE__ */W(S,{style:[Ma.prize,v&&Ma.prizeWide,{color:y.primary,fontFamily:b}],children:$t(O.prize)})]}),
339
- /* @__PURE__ */T(S,{style:[Ma.multipleLine,{color:y.textMuted}],children:[(j=O.multiple,`×${(Math.round(10*j)/10).toLocaleString("en-US",{maximumFractionDigits:1})}`)," your stake · total return, stake included"]}),
340
- /* @__PURE__ */W(S,{style:[Ma.allOrNothing,{color:y.textMuted}],children:"All or nothing. Miss a single leg and the ticket does not pay."})]})]}),
341
- /* @__PURE__ */T(z,{style:[Ma.modeCards,v&&Ma.modeCardsWide],children:[/* @__PURE__ */W(z,{style:v?Ma.modeCardCell:void 0,children:/* @__PURE__ */W(Nl,{tile:/* @__PURE__ */W(Ml,{iconUrl:Ze(s),size:60}),label:"Pick my own",stat:"Your calls",detail:["A clean yes or no on every leg","You read the games, you make the calls"],onSelect:()=>{I&&(h(D),u(D),g(P),p(),t?.())}})}),/* @__PURE__ */W(z,{style:v?Ma.modeCardCell:void 0,children:/* @__PURE__ */W(Nl,{tile:/* @__PURE__ */W(Ml,{iconUrl:`${Ye}quickpick`,size:60}),label:"QuickPick for me",stat:"Fastest",detail:["We fill every leg for you","Straight to the bet slip"],onSelect:()=>{I&&(u(D),g(P),f(s,D,P),e?.())}})})]})]})]});var j}var Ma=k.create({container:{flex:1},backRow:{paddingHorizontal:16},inner:{flex:1,paddingHorizontal:16,width:"100%"},header:{marginBottom:8,paddingHorizontal:16},headerCompact:{paddingHorizontal:12},sectionTitle:{fontSize:12,fontWeight:"700",textTransform:"uppercase",letterSpacing:2.16,marginBottom:16},sectionTitleCompact:{fontSize:10,letterSpacing:1.4,marginBottom:12},tagline:{fontSize:14,lineHeight:23,textAlign:"center",maxWidth:384,marginTop:12},taglineWide:{fontSize:15,lineHeight:24},ticket:{borderWidth:2,borderRadius:24,paddingHorizontal:16,paddingVertical:16},ticketWide:{paddingHorizontal:20,paddingVertical:20},controlLabelRow:{flexDirection:"row",alignItems:"baseline",justifyContent:"space-between",marginBottom:8},controlLabelText:{fontSize:10,fontWeight:"700",textTransform:"uppercase",letterSpacing:1},controlValueText:{fontSize:12,fontWeight:"600",fontVariant:["tabular-nums"]},chipRow:{flexDirection:"row",flexWrap:"wrap",gap:6},chip:{flexGrow:1,minWidth:40,borderWidth:1,borderRadius:8,paddingHorizontal:4,paddingVertical:8,alignItems:"center",justifyContent:"center"},stakeChip:{flexGrow:1,minWidth:48,borderWidth:1,borderRadius:8,paddingHorizontal:4,paddingVertical:8,alignItems:"center",justifyContent:"center"},chipText:{fontSize:14,fontWeight:"700"},hintRow:{flexDirection:"row",alignItems:"baseline",justifyContent:"space-between",marginTop:8},hintText:{fontSize:11,fontStyle:"italic"},stakeBlock:{marginTop:16},inputWrap:{flexDirection:"row",alignItems:"center",borderWidth:1,borderRadius:8,paddingHorizontal:12},inputPrefix:{fontSize:16,fontWeight:"700",marginRight:4},input:{flex:1,paddingVertical:12,fontSize:18,fontWeight:"600",fontVariant:["tabular-nums"]},errorText:{fontSize:12,marginTop:8},dividendBlock:{marginTop:16,paddingTop:12,borderTopWidth:1},dividendCaptionRow:{flexDirection:"row",alignItems:"baseline",justifyContent:"space-between"},dividendCaption:{fontSize:10,fontWeight:"600",textTransform:"uppercase",letterSpacing:1},dividendMainRow:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",gap:12,marginTop:6},dividendMainLeft:{flex:1,minWidth:0,gap:3},perfectTicket:{fontSize:13},prize:{fontSize:20,fontWeight:"800",fontVariant:["tabular-nums"]},prizeWide:{fontSize:24},multipleLine:{fontSize:11,marginTop:6,fontVariant:["tabular-nums"]},allOrNothing:{fontSize:11,fontStyle:"italic",marginTop:4},modeCards:{marginTop:16,gap:12},modeCardsWide:{marginTop:20,flexDirection:"row",flexWrap:"wrap",alignItems:"stretch"},modeCardCell:{flexBasis:"48%",flexGrow:1,minWidth:"45%"}});function Pa({onBack:e,hideActions:t}={}){const{theme:n,selectedGame:o}=$i(),i=Ge(n),r=n.colors;/* @__PURE__ */
342
- return T(z,{style:Oa.titleWrap,children:[/* @__PURE__ */W(S,{style:[Oa.eyebrow,Oa.eyebrowLeft,{color:r.primary,fontFamily:i}],children:"The dividend is set"}),/* @__PURE__ */W(dl,{onBack:e,hideActions:t,label:o?.game_name})]})}function Ha({onQuickPick:e,onPickYourOwn:t,onBack:n,hideTitle:o,config:i,backLabel:r="Games"}){const{theme:a,selectedGame:s,selectedPropositionCount:d,handlePropositionCountChange:h,setExpectedCorrect:u,setBetAmount:g,quickPickGame:f,goToSportSelection:p}=$i(),y=a.colors,m=Ne(a),b=Ge(a),w=se(a),x=be(a),{width:k}=F(),C=k>=640,[v,A]=c(null),[R,L]=c(null),D=l(()=>i??Vo(s),[i,s]),[M,P]=c(()=>D?.defaultDividend??1e4),[H,O]=c(()=>{const e=D?.dividends[0]?.rungs.map(e=>e.legs)??[];return null!=d&&e.includes(d)?d:D?.defaultLegs??9});if(!s||!jo(s)||!D)/* @__PURE__ */return W(z,{children:/* @__PURE__ */W(S,{style:{color:y.textMuted,fontFamily:m},children:"No dividend series available."})});const I=D.dividends.find(e=>e.dividend===M)??D.dividends[0],E=I.rungs.find(e=>e.legs===H)??I.rungs[0],j=Math.max(...I.rungs.map(e=>e.legs)),N=Math.min(...I.rungs.map(e=>e.legs));/* @__PURE__ */
343
- return T(z,{style:Oa.container,children:[n?/* @__PURE__ */W(z,{style:Oa.backRow,children:/* @__PURE__ */W(sl,{onBack:n,label:r})}):null,/* @__PURE__ */T(ut,{style:Oa.inner,children:[
344
- /* @__PURE__ */W(Pl,{eyebrow:o?null:"Pick your dividend",iconUrl:Ze(s),gameName:s.game_name,tagline:D.tagline}),
345
- /* @__PURE__ */W(Yl,{}),
346
- /* @__PURE__ */T(z,{style:[Oa.ticket,C&&Oa.ticketWide,{backgroundColor:x,borderColor:y.border,shadowColor:w,shadowOpacity:.12,shadowRadius:12,shadowOffset:{width:0,height:8},elevation:1}],children:[(G=$t(I.dividend),/* @__PURE__ */T(z,{style:Oa.sectionLabelRow,children:[/* @__PURE__ */W(S,{style:[Oa.sectionLabelText,{color:y.textMuted}],children:"Set dividend"}),G?/* @__PURE__ */W(S,{style:[Oa.sectionValueText,{color:w}],children:G}):null]})),
347
- /* @__PURE__ */W(Ol,{ariaLabel:"Set dividend",children:D.dividends.map(e=>{const t=e.dividend===M,n=v===e.dividend;/* @__PURE__ */
348
- return T(B,{onPress:()=>P(e.dividend),activeOpacity:.85,accessibilityRole:"radio",accessibilityState:{selected:t},...rt(()=>A(e.dividend),()=>A(null)),style:[Oa.dividendTile,Il(C),{backgroundColor:t?Dl(y.primary,.08):"transparent",borderColor:t||n?y.primary:y.border}],children:[/* @__PURE__ */W(S,{style:[Oa.dividendValue,C&&Oa.dividendValueWide,{color:w,fontFamily:b}],children:$t(e.dividend)}),/* @__PURE__ */T(S,{style:[Oa.dividendFrom,{color:y.textMuted}],children:["from ",$t(e.rungs[0]?.stake??0)]})]},e.dividend)})}),
349
- /* @__PURE__ */W(S,{style:[Oa.ticketNote,{color:y.textMuted}],children:"One set amount — it does not move, whatever you spend."}),
350
- /* @__PURE__ */T(z,{style:[Oa.ladderDivider,{borderTopColor:Dl(w,.08)}],children:[
351
- /* @__PURE__ */T(z,{style:Oa.ladderHeaderRow,children:[/* @__PURE__ */W(S,{style:[Oa.ladderHeaderText,{color:y.textMuted}],children:"Legs to land"}),/* @__PURE__ */W(S,{style:[Oa.ladderHeaderText,{color:y.textMuted}],children:"Your stake"})]}),
352
- /* @__PURE__ */W(z,{style:Oa.rungList,children:I.rungs.map(e=>{const t=e.legs===H,n=R===e.legs;/* @__PURE__ */
353
- return T(B,{onPress:()=>O(e.legs),activeOpacity:.85,accessibilityRole:"radio",accessibilityState:{selected:t},...rt(()=>L(e.legs),()=>L(null)),style:[Oa.rungRow,{backgroundColor:t?Dl(y.primary,.08):"transparent",borderColor:t||n?y.primary:y.border}],children:[/* @__PURE__ */T(z,{style:Oa.rungLeft,children:[/* @__PURE__ */T(S,{style:[Oa.rungLegs,{color:y.text}],children:[e.legs," legs",C?e.legs===j?" · the long climb":e.legs===N?" · the sprint":"":""]}),/* @__PURE__ */W(jl,{legs:e.legs})]}),/* @__PURE__ */W(S,{style:[Oa.rungStake,C&&Oa.rungStakeWide,{color:y.primary,fontFamily:b}],children:$t(e.stake)})]},e.legs)})}),
354
- /* @__PURE__ */W(S,{style:[Oa.ticketNote,{color:y.textMuted}],children:"Same dividend on every rung — a little for the long climb, more for the short one."})]})]}),
355
- /* @__PURE__ */T(z,{style:[Oa.cardList,C&&Oa.cardListWide],children:[/* @__PURE__ */W(z,{style:C?Oa.cardCell:void 0,children:/* @__PURE__ */W(Nl,{tile:/* @__PURE__ */W(Ml,{iconUrl:Ze(s),size:60}),label:"Pick my own",stat:"Your calls",detail:[`A clean yes or no on all ${E.legs} legs`,`${$t(E.stake)} chasing the ${$t(I.dividend)}`],onSelect:()=>{var e;h((e=E).legs),u(e.legs),g(e.stake),p(),t?.()}})}),/* @__PURE__ */W(z,{style:C?Oa.cardCell:void 0,children:/* @__PURE__ */W(Nl,{tile:/* @__PURE__ */W(Ml,{iconUrl:`${Ye}quickpick`,size:60}),label:"QuickPick for me",stat:"Fastest",detail:[`We fill all ${E.legs} legs at ${$t(E.stake)}`,"Straight to the bet slip"],onSelect:()=>{u(E.legs),g(E.stake),f(s,E.legs,E.stake),e?.()}})})]})]})]});var G}var Oa=k.create({container:{flex:1},backRow:{paddingHorizontal:16},inner:{flex:1,paddingHorizontal:16,width:"100%"},titleWrap:{marginBottom:8,paddingHorizontal:16},eyebrow:{fontSize:12,fontWeight:"700",textTransform:"uppercase",letterSpacing:2.16,marginBottom:16},eyebrowLeft:{textAlign:"left"},eyebrowSectionWide:{marginBottom:20},tagline:{fontSize:14,lineHeight:23,textAlign:"center",maxWidth:384,marginTop:12},taglineWide:{fontSize:15,lineHeight:24},ticket:{borderWidth:2,borderRadius:24,paddingHorizontal:16,paddingVertical:16},ticketWide:{paddingHorizontal:20,paddingVertical:20},sectionLabelRow:{flexDirection:"row",alignItems:"baseline",justifyContent:"space-between",marginBottom:8},sectionLabelText:{fontSize:10,fontWeight:"700",textTransform:"uppercase",letterSpacing:1},sectionValueText:{fontSize:12,fontWeight:"600",fontVariant:["tabular-nums"]},dividendGrid:{flexDirection:"row",flexWrap:"wrap",gap:6},dividendTile:{borderWidth:1,borderRadius:12,paddingHorizontal:6,paddingVertical:10,alignItems:"center"},dividendValue:{fontSize:16,fontWeight:"800",letterSpacing:-.32,fontVariant:["tabular-nums"]},dividendValueWide:{fontSize:20,letterSpacing:-.4},dividendFrom:{fontSize:10,marginTop:4},ticketNote:{fontSize:11,fontStyle:"italic",marginTop:8},ladderDivider:{marginTop:16,paddingTop:12,borderTopWidth:1},ladderHeaderRow:{flexDirection:"row",alignItems:"baseline",justifyContent:"space-between"},ladderHeaderText:{fontSize:10,fontWeight:"600",textTransform:"uppercase",letterSpacing:1},rungList:{marginTop:6,gap:6},rungRow:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",gap:12,borderWidth:1,borderRadius:12,paddingHorizontal:12,paddingVertical:6},rungLeft:{flexShrink:1,minWidth:0,gap:3},rungLegs:{fontSize:13},rungStake:{fontSize:14,fontWeight:"800",fontVariant:["tabular-nums"]},rungStakeWide:{fontSize:16},cardList:{marginTop:16,gap:12},cardListWide:{marginTop:20,flexDirection:"row",flexWrap:"wrap",alignItems:"stretch"},cardCell:{flexBasis:"48%",flexGrow:1,minWidth:"45%"}});function Ia({onBack:e,hideActions:t}={}){const{theme:n,selectedGame:o}=$i(),i=Ge(n),r=n.colors;/* @__PURE__ */
356
- return T(z,{style:ja.titleWrap,children:[/* @__PURE__ */W(S,{style:[ja.eyebrow,{color:r.primary,fontFamily:i}],children:"Every step pays"}),/* @__PURE__ */W(dl,{onBack:e,hideActions:t,label:o?.game_name})]})}function Ea({onQuickPick:e,onPickYourOwn:t,onBack:n,hideTitle:o,config:i,backLabel:r="Games"}){const{theme:a,selectedGame:s,selectedPropositionCount:d,handlePropositionCountChange:h,setExpectedCorrect:u,setBetAmount:g,quickPickGame:f,goToSportSelection:p,screenSize:y,bodyFont:m}=$i(),b=a.colors,w="mobile"===y,x=Ge(a),k=se(a),C=fe(a),v=be(a),{width:A}=F(),R=A>=640,[L,D]=c(null),M=l(()=>i??Bi(s),[i,s]),[P,H]=c(()=>M?null!=d&&M.ladders.some(e=>e.legs===d)?d:M.defaultLegs:8),[O,I]=c(()=>M?.defaultStake??50),[E,j]=c(!1);if(!s||!wi(s)||!M)/* @__PURE__ */return W(z,{children:/* @__PURE__ */W(S,{style:{color:b.textMuted,fontFamily:m},children:"No ladders available."})});const N=M.ladders.find(e=>e.legs===P)??M.ladders[0],G=ki(N,O),Y=Si(N,O),V=[...G].reverse(),U=w&&V.length>4,q=U&&!E?V.slice(0,3):V,K=(e,t)=>/* @__PURE__ */T(z,{style:ja.sectionLabelRow,children:[/* @__PURE__ */W(S,{style:[ja.sectionLabelText,{color:b.textMuted}],children:e}),t?/* @__PURE__ */W(S,{style:[ja.sectionLabelValue,{color:k}],children:t}):null]});/* @__PURE__ */
357
- return T(z,{style:[ja.container,{backgroundColor:b.background}],children:[n?/* @__PURE__ */W(z,{style:ja.backRow,children:/* @__PURE__ */W(sl,{onBack:n,label:r})}):null,/* @__PURE__ */T(ut,{style:ja.inner,children:[
358
- /* @__PURE__ */W(Pl,{eyebrow:o?null:"Climb the ladder. Stack the prizes.",iconUrl:Ze(s),gameName:s.game_name,tagline:M.tagline}),
359
- /* @__PURE__ */W(Yl,{}),
360
- /* @__PURE__ */T(z,{style:[ja.builder,R&&ja.builderWide,{backgroundColor:v,borderColor:b.border,shadowColor:k,shadowOpacity:.14,shadowRadius:14,shadowOffset:{width:0,height:10},elevation:1}],children:[K("Your bet",$t(O)),
361
- /* @__PURE__ */W(z,{style:ja.betRow,children:M.stakes.map(e=>{const t=e===O;/* @__PURE__ */
362
- return W(B,{onPress:()=>I(e),activeOpacity:.85,accessibilityRole:"radio",accessibilityState:{selected:t},style:[ja.betChip,{backgroundColor:t?b.primary:"transparent",borderColor:t?b.primary:b.border}],children:/* @__PURE__ */T(S,{style:[ja.betChipText,{color:t?b.primaryText:b.textMuted}],children:["$",e]})},e)})}),
363
- /* @__PURE__ */W(S,{style:[ja.betNote,{color:b.textMuted}],children:"Every prize scales with your bet."}),
364
- /* @__PURE__ */T(z,{style:ja.laddersBlock,children:[K(`${M.ladders.length} ladders to choose from`),/* @__PURE__ */W(Ol,{ariaLabel:"Ladder",children:M.ladders.map(e=>{const t=e.legs===P,n=L===e.legs;/* @__PURE__ */
365
- return T(B,{onPress:()=>H(e.legs),activeOpacity:.85,accessibilityRole:"radio",accessibilityState:{selected:t},...rt(()=>D(e.legs),()=>D(null)),style:[ja.ladderTile,Il(R,"17%"),{backgroundColor:t?Dl(b.primary,.08):"transparent",borderColor:t||n?b.primary:b.border}],children:[
366
- /* @__PURE__ */T(S,{style:[ja.ladderTileLabel,{color:b.primary}],children:["Ladder ",e.legs]}),
367
- /* @__PURE__ */W(S,{style:[ja.ladderTilePrize,{color:k,fontFamily:x}],children:$t(Si(e,O))}),
368
- /* @__PURE__ */T(S,{style:[ja.ladderTileNote,{color:b.textMuted}],children:["Win from ",e.firstPayingTier," right"]})]},e.legs)})})]}),
369
- /* @__PURE__ */T(z,{style:[ja.stackTable,{borderTopColor:Dl(k,.08)}],children:[
370
- /* @__PURE__ */T(S,{style:[ja.stackIntro,{color:b.text}],children:["Ladder ",N.legs," wins from ",N.firstPayingTier," right — every tier stacks into the"," ",
309
+ /* @__PURE__ */T(S,{style:{color:l.textMuted},children:[" for $",20]})]}):null,/* @__PURE__ */T(z,{ref:f,collapsable:!1,style:{position:"relative",alignSelf:"flex-start"},children:[/* @__PURE__ */W(B,{onPress:()=>g(e=>!e),accessibilityRole:"button",accessibilityState:{expanded:h},style:{paddingVertical:4,paddingHorizontal:10,borderRadius:6,backgroundColor:h?l.buttonSecondary:l.background,borderWidth:1,borderColor:h?l.primary??l.border:l.border},children:/* @__PURE__ */W(S,{style:{color:l.text,fontSize:12,fontWeight:"600"},children:h?"Hide dividends":"Show dividends"})}),/* @__PURE__ */W(jn,{visible:h&&!F,anchor:k,onClose:()=>g(!1),flipUp:w,align:"left",children:/* @__PURE__ */W(z,{style:{elevation:8,backgroundColor:l.background,borderRadius:8,borderWidth:1,borderColor:l.border,minWidth:220,shadowColor:"#000",shadowOffset:{width:0,height:6},shadowOpacity:.18,shadowRadius:12,overflow:"hidden"},children:L})})]})]}),h&&F&&y&&"undefined"!=typeof document?G(/* @__PURE__ */W("div",{ref:p,style:{position:"fixed",left:y.left,top:y.top,transform:y.flipUp?"translateY(-100%)":void 0,zIndex:9999,backgroundColor:l.background,border:`1px solid ${l.border}`,borderRadius:8,minWidth:220,overflow:"hidden",boxShadow:"0 8px 24px rgba(0,0,0,0.18)"},children:L}),document.body):null]})}function La({kind:e,option:t,onSelect:n,renderDividends:o}){const{theme:i}=or(),r=i.colors,l=Ge(i),a=se(i),s=r.primary,d=r.selectionCard??r.backgroundAlt,{width:h}=F(),u=h>=640,g="safety_net"===e?Math.max(1,(t.detail?.length??2)-1):void 0,f=!!o||(t.dividends?.length??0)>0,p=f&&!!t.dividendsInline,[y,m]=c(!1);/* @__PURE__ */
310
+ return T(z,{...rt(()=>m(!0),()=>m(!1)),style:[Oa.card,u&&Oa.cardWide,{backgroundColor:d,borderColor:y?s:r.border,shadowColor:y?s:"#000",shadowOpacity:y?.28:.08,shadowRadius:y?14:8,shadowOffset:{width:0,height:y?12:8},elevation:y?4:1,transform:[{translateY:y?-2:0}]}],children:[/* @__PURE__ */T(B,{onPress:n,activeOpacity:.85,accessibilityRole:"button",style:Oa.cardMain,children:[
311
+ /* @__PURE__ */W(Ta,{kind:e,balls:g,size:60}),
312
+ /* @__PURE__ */T(z,{style:Oa.cardText,children:[
313
+ /* @__PURE__ */W(S,{style:[Oa.cardTitle,{color:a,fontFamily:l}],children:t.label}),t.stat?/* @__PURE__ */W(z,{style:[Oa.statChip,{backgroundColor:Ba(s,.12)}],children:/* @__PURE__ */W(S,{style:[Oa.statChipText,{color:s}],children:t.stat.toUpperCase()})}):null,
314
+ /* @__PURE__ */W(z,{style:Oa.detailBlock,children:t.detail?.map(e=>/* @__PURE__ */W(S,{style:[Oa.detailLine,{color:r.textMuted}],children:e},e))})]}),
315
+ /* @__PURE__ */W(z,{style:{alignSelf:"center",flexShrink:0,transform:[{translateX:y?2:0}]},children:/* @__PURE__ */W(A,{width:22,height:22,viewBox:"0 0 24 24",fill:"none",children:/* @__PURE__ */W(H,{d:"m9 6 6 6-6 6",stroke:s,strokeWidth:2.5,strokeLinecap:"round",strokeLinejoin:"round"})})})]}),f?/* @__PURE__ */W(z,{style:[Oa.dividendsWrap,{borderTopColor:Ba(a,.08)}],children:/* @__PURE__ */W(p?Aa:Ra,{option:t,renderDividends:o})}):null]})}function Da({kind:e,highlights:t,onSelect:n,accessibilityLabel:o}){const{theme:i}=or(),r=i.colors,l=se(i),a=fe(i),s=r.primary,d=r.selectionCard??r.backgroundAlt,{width:h}=F(),u=h>=640,[g,f]=c(!1);/* @__PURE__ */
316
+ return W(z,{...rt(()=>f(!0),()=>f(!1)),style:[Oa.card,u&&Oa.cardWide,{backgroundColor:d,borderColor:g?s:r.border,shadowColor:g?s:"#000",shadowOpacity:g?.28:.08,shadowRadius:g?14:8,shadowOffset:{width:0,height:g?12:8},elevation:g?4:1,transform:[{translateY:g?-2:0}]}],children:/* @__PURE__ */T(B,{onPress:n,activeOpacity:.85,accessibilityRole:"button",accessibilityLabel:o,style:Oa.cardMain,children:[
317
+ /* @__PURE__ */W(Ta,{kind:e,size:60}),
318
+ /* @__PURE__ */W(z,{style:{flex:1,minWidth:0,gap:8},children:t.map(e=>/* @__PURE__ */T(z,{style:Oa.bulletRow,children:[/* @__PURE__ */W(z,{style:[Oa.dot,{backgroundColor:a}]}),/* @__PURE__ */W(S,{style:[Oa.bulletText,{color:l}],children:e})]},e))}),
319
+ /* @__PURE__ */W(z,{style:{alignSelf:"center",flexShrink:0,transform:[{translateX:g?2:0}]},children:/* @__PURE__ */W(A,{width:22,height:22,viewBox:"0 0 24 24",fill:"none",children:/* @__PURE__ */W(H,{d:"m9 6 6 6-6 6",stroke:s,strokeWidth:2.5,strokeLinecap:"round",strokeLinejoin:"round"})})})]})})}function Ma({onBack:e,hideActions:t}={}){const{theme:n,selectedGame:o,selectedPropositionCount:i}=or(),r=Ge(n),l=n.colors,a=Ho(o,i),{width:c}=F(),s=c<640;/* @__PURE__ */
320
+ return T(z,{style:[Oa.header,s&&Oa.headerCompact],children:[/* @__PURE__ */W(S,{accessibilityRole:"header",style:[Oa.sectionTitle,s&&Oa.sectionTitleCompact,{color:l.primary,fontFamily:r}],children:a?.title??"About this game"}),/* @__PURE__ */W(pl,{onBack:e,hideActions:t,label:o?`${o.game_name}${a?.subtitle?` · ${a.subtitle}`:""}`:void 0})]})}function Pa({onContinue:e,canContinue:t,continueLabel:n="Continue"}){const{theme:o,screenSize:i}=or(),r=o.colors;return e&&"mobile"!==i?/* @__PURE__ */W(z,{style:Oa.footer,children:/* @__PURE__ */W(B,{onPress:e,disabled:!t,accessibilityRole:"button",accessibilityState:{disabled:!t},style:[Oa.smallBtn,{backgroundColor:r.buttonPrimary,opacity:t?1:.45}],children:/* @__PURE__ */W(S,{style:[Oa.smallBtnText,{color:r.buttonPrimaryText}],children:n})})}):null}function Ha({onContinue:e,onBack:t,hideTitle:n,config:o,renderDividends:i,backLabel:r="Games"}){const{theme:a,selectedGame:c,selectedPropositionCount:s,setExpectedCorrect:d,handlePropositionCountChange:h,bodyFont:u,screenSize:g}=or(),f=a.colors,p=Ge(a),y="mobile"===g,{width:m}=F(),b=m>=640,w=l(()=>o??Ho(c,s),[o,c,s]),x=w?.options??[],k=t=>{null!=t?.expectedCorrect&&d(t.expectedCorrect),null!=t?.propositionCount&&h(t.propositionCount),e?.()};if(!c||!w)/* @__PURE__ */return W(z,{children:/* @__PURE__ */W(S,{style:{color:f.textMuted,fontFamily:u},children:"No rule setup required."})});const C=w.kind,B=w.headline??w.heroTitle,v=w.continueLabel??"Continue";/* @__PURE__ */
321
+ return T(z,{style:[Oa.container,{backgroundColor:f.background}],children:[t?/* @__PURE__ */W(z,{style:Oa.backRow,children:/* @__PURE__ */W(fl,{onBack:t,label:r})}):null,/* @__PURE__ */T(ut,{style:Oa.inner,children:[n?null:/* @__PURE__ */W(S,{accessibilityRole:"header",style:[Oa.sectionTitle,Oa.sectionTitleInBody,{color:f.primary,fontFamily:p,textAlign:"center"}],children:w.title}),
322
+ /* @__PURE__ */T(z,{style:Oa.headerBlock,children:[
323
+ /* @__PURE__ */W(rl,{iconUrl:Ze(c),gameName:c.game_name,height:y?24:32,chipColor:f.primary,textColor:f.text,iconColor:f.primaryText,accentColor:a.brand?.accent,compact:y}),w.subtitle?/* @__PURE__ */W(S,{style:[Oa.pickSubtitle,{color:f.textMuted}],children:w.subtitle}):null,B||w.heroTagline?/* @__PURE__ */W(S,{style:[Oa.tagline,{color:f.textMuted}],children:w.heroTagline??B}):null]}),
324
+ /* @__PURE__ */W(Zl,{}),x.length>0?/* @__PURE__ */W(z,{style:[Oa.cardList,b&&x.length>1&&Oa.cardGrid],children:x.map(e=>/* @__PURE__ */W(z,{style:b&&x.length>1?Oa.cardCell:void 0,children:/* @__PURE__ */W(La,{kind:C,option:e,onSelect:()=>k(e),renderDividends:i})},e.id))}):w.highlights&&w.highlights.length>0?/* @__PURE__ */W(Da,{kind:C,highlights:w.highlights,onSelect:()=>k(),accessibilityLabel:v}):null]})]})}var Oa=k.create({container:{flex:1},backRow:{paddingHorizontal:16,marginBottom:4},inner:{flex:1,paddingHorizontal:16,maxWidth:768,width:"100%",alignSelf:"center"},header:{marginBottom:8,paddingHorizontal:16},headerCompact:{paddingHorizontal:12},sectionTitle:{fontSize:12,fontWeight:"700",textTransform:"uppercase",letterSpacing:2.16,marginBottom:16},sectionTitleCompact:{fontSize:10,letterSpacing:1.4,marginBottom:12},sectionTitleInBody:{marginBottom:12},headerBlock:{alignItems:"center",marginBottom:24},pickSubtitle:{fontSize:13,marginTop:8},tagline:{fontSize:14,lineHeight:20,textAlign:"center",maxWidth:384,marginTop:12},cardList:{gap:12},cardGrid:{flexDirection:"row",flexWrap:"wrap",alignItems:"stretch"},cardCell:{flexBasis:"48%",flexGrow:1,minWidth:"45%"},card:{flexGrow:1,borderWidth:2,borderRadius:24,paddingHorizontal:16,paddingVertical:16},cardWide:{paddingHorizontal:20,paddingVertical:20},cardMain:{flexDirection:"row",alignItems:"flex-start",gap:14,flexGrow:1},cardText:{flex:1,minWidth:0,gap:5},cardTitle:{fontSize:19,fontWeight:"800",letterSpacing:-.3},statChip:{alignSelf:"flex-start",borderRadius:999,paddingHorizontal:8,paddingVertical:3},statChipText:{fontSize:9,fontWeight:"700",letterSpacing:.6},detailBlock:{minHeight:60,gap:2,justifyContent:"flex-start"},detailLine:{fontSize:13,lineHeight:18},dividendsWrap:{marginTop:12,paddingTop:12,borderTopWidth:1},dividends:{gap:5},dividendsCaption:{fontSize:9,fontWeight:"600",letterSpacing:1},dividendRow:{flexDirection:"row",alignItems:"baseline",justifyContent:"space-between",gap:12},dividendTierRow:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",gap:12},dividendLabelCol:{flexShrink:1,minWidth:0,gap:3},dividendLabel:{fontSize:13},tierLegs:{flexDirection:"row",alignItems:"center",gap:3},tierLegDot:{width:5,height:5,borderRadius:1.5,opacity:.85},tierLegBall:{width:7,height:7,borderRadius:999,marginLeft:2},dividendMult:{fontSize:15,fontWeight:"800",fontVariant:["tabular-nums"]},radio:{width:24,height:24,borderRadius:12,borderWidth:2,alignItems:"center",justifyContent:"center"},bulletRow:{flexDirection:"row",alignItems:"flex-start",gap:12},dot:{width:6,height:6,borderRadius:3,marginTop:7},bulletText:{flex:1,fontSize:15,lineHeight:21},footer:{flexDirection:"row",justifyContent:"flex-end",paddingTop:16,paddingHorizontal:16},smallBtn:{paddingHorizontal:20,paddingVertical:11,borderRadius:10},smallBtnText:{fontSize:14,fontWeight:"700"}});function Ia({onBack:e,hideActions:t}={}){const{theme:n,selectedGame:o}=or(),i=Ge(n),r=n.colors,{width:l}=F(),a=l<640;/* @__PURE__ */
325
+ return T(z,{style:[ja.header,a&&ja.headerCompact],children:[/* @__PURE__ */W(S,{style:[ja.sectionTitle,a&&ja.sectionTitleCompact,{color:r.primary,fontFamily:i}],children:"The fastest multi"}),/* @__PURE__ */W(pl,{onBack:e,hideActions:t,label:o?.game_name})]})}function Ea({onQuickPick:e,onPickYourOwn:t,onBack:n,hideTitle:o,config:i,backLabel:r="Games"}){const{theme:a,selectedGame:s,selectedPropositionCount:d,handlePropositionCountChange:h,setExpectedCorrect:u,setBetAmount:g,quickPickGame:f,goToSportSelection:p}=or(),y=a.colors,m=Ne(a),b=Ge(a),w=se(a),x=be(a),{width:k}=F(),v=k>=640,[A,R]=c(!1),L=l(()=>i??pi(s),[i,s]),[D,M]=c(()=>L?null!=d&&L.legOptions.includes(d)?d:L.defaultLegs:8),[P,H]=c(()=>L?.defaultStake??20);if(!s||!gi(s)||!L)/* @__PURE__ */return W(z,{style:[ja.container,{backgroundColor:y.background}],children:/* @__PURE__ */W(S,{style:{color:y.textMuted,fontFamily:m},children:"No game set available."})});const O=fi(P,D,{operatorMargin:L.operatorMargin,perLegProbability:L.perLegProbability}),I=P>=L.minStake,E=(e,t)=>/* @__PURE__ */T(z,{style:ja.controlLabelRow,children:[/* @__PURE__ */W(S,{style:[ja.controlLabelText,{color:y.textMuted}],children:e}),/* @__PURE__ */W(S,{style:[ja.controlValueText,{color:w}],children:t})]});/* @__PURE__ */
326
+ return T(z,{style:[ja.container,{backgroundColor:y.background}],children:[n?/* @__PURE__ */W(z,{style:ja.backRow,children:/* @__PURE__ */W(fl,{onBack:n,label:r})}):null,/* @__PURE__ */T(ut,{style:ja.inner,children:[
327
+ /* @__PURE__ */W(jl,{eyebrow:o?null:"The fastest multi",iconUrl:Ze(s),gameName:s.game_name,tagline:L.tagline}),
328
+ /* @__PURE__ */W(Zl,{}),
329
+ /* @__PURE__ */T(z,{style:[ja.ticket,v&&ja.ticketWide,{backgroundColor:x,borderColor:y.border,shadowColor:w,shadowOpacity:.14,shadowRadius:14,shadowOffset:{width:0,height:10},elevation:1}],children:[E("Legs",`${D} legs`),
330
+ /* @__PURE__ */W(z,{style:ja.chipRow,children:L.legOptions.map(e=>{const t=e===D;/* @__PURE__ */
331
+ return W(B,{onPress:()=>M(e),accessibilityRole:"radio",accessibilityState:{selected:t},activeOpacity:.8,style:[ja.chip,{backgroundColor:t?y.primary:"transparent",borderColor:t?y.primary:y.border}],children:/* @__PURE__ */W(S,{style:[ja.chipText,{color:t?y.primaryText:y.textMuted}],children:e})},e)})}),
332
+ /* @__PURE__ */T(z,{style:ja.hintRow,children:[/* @__PURE__ */W(S,{style:[ja.hintText,{color:y.textMuted}],children:"Easier to land"}),/* @__PURE__ */W(S,{style:[ja.hintText,{color:y.textMuted}],children:"Bigger prize"})]}),
333
+ /* @__PURE__ */T(z,{style:ja.stakeBlock,children:[E("Stake",$t(P)),
334
+ /* @__PURE__ */T(z,{style:[ja.inputWrap,{borderColor:A?y.borderFocus??y.primary:y.border,backgroundColor:y.backgroundAlt}],children:[/* @__PURE__ */W(S,{style:[ja.inputPrefix,{color:y.textMuted}],children:"$"}),/* @__PURE__ */W(C,{keyboardType:"decimal-pad",placeholder:"Enter stake",placeholderTextColor:y.textMuted,accessibilityLabel:"Stake amount",onFocus:()=>R(!0),onBlur:()=>R(!1),value:P?String(P):"",onChangeText:e=>{if(""===e)return void H(0);const t=Number(e);Number.isFinite(t)&&H((e=>{const t=Math.max(0,Math.round(100*e)/100);return null!==L.maxStake?Math.min(t,L.maxStake):t})(t))},style:[ja.input,{color:y.textAlt??y.text,fontFamily:m}]})]}),
335
+ /* @__PURE__ */W(z,{style:ja.chipRow,children:L.quickStakes.map(e=>{const t=e===P;/* @__PURE__ */
336
+ return W(B,{onPress:()=>H(e),activeOpacity:.8,style:[ja.stakeChip,{backgroundColor:t?y.primary:"transparent",borderColor:t?y.primary:y.border}],children:/* @__PURE__ */T(S,{style:[ja.chipText,{color:t?y.primaryText:y.textMuted}],children:["$",e]})},e)})}),!I&&P>0?/* @__PURE__ */T(S,{style:[ja.errorText,{color:y.error}],children:["Minimum stake is ",$t(L.minStake),"."]}):null]}),
337
+ /* @__PURE__ */T(z,{style:[ja.dividendBlock,{borderTopColor:Il(w,.08)}],children:[
338
+ /* @__PURE__ */T(z,{style:ja.dividendCaptionRow,children:[/* @__PURE__ */T(S,{style:[ja.dividendCaption,{color:y.textMuted}],children:["If all ",D," land"]}),/* @__PURE__ */T(S,{style:[ja.dividendCaption,{color:y.textMuted}],children:[$t(P)," returns"]})]}),
339
+ /* @__PURE__ */T(z,{style:ja.dividendMainRow,children:[/* @__PURE__ */T(z,{style:ja.dividendMainLeft,children:[/* @__PURE__ */W(S,{style:[ja.perfectTicket,{color:y.text}],children:"Perfect ticket"}),/* @__PURE__ */W(Ul,{legs:D})]}),/* @__PURE__ */W(S,{style:[ja.prize,v&&ja.prizeWide,{color:y.primary,fontFamily:b}],children:$t(O.prize)})]}),
340
+ /* @__PURE__ */T(S,{style:[ja.multipleLine,{color:y.textMuted}],children:[(j=O.multiple,`×${(Math.round(10*j)/10).toLocaleString("en-US",{maximumFractionDigits:1})}`)," your stake · total return, stake included"]}),
341
+ /* @__PURE__ */W(S,{style:[ja.allOrNothing,{color:y.textMuted}],children:"All or nothing. Miss a single leg and the ticket does not pay."})]})]}),
342
+ /* @__PURE__ */T(z,{style:[ja.modeCards,v&&ja.modeCardsWide],children:[/* @__PURE__ */W(z,{style:v?ja.modeCardCell:void 0,children:/* @__PURE__ */W(ql,{tile:/* @__PURE__ */W(El,{iconUrl:Ze(s),size:60}),label:"Pick my own",stat:"Your calls",detail:["A clean yes or no on every leg","You read the games, you make the calls"],onSelect:()=>{I&&(h(D),u(D),g(P),p(),t?.())}})}),/* @__PURE__ */W(z,{style:v?ja.modeCardCell:void 0,children:/* @__PURE__ */W(ql,{tile:/* @__PURE__ */W(El,{iconUrl:`${Ye}quickpick`,size:60}),label:"QuickPick for me",stat:"Fastest",detail:["We fill every leg for you","Straight to the bet slip"],onSelect:()=>{I&&(u(D),g(P),f(s,D,P),e?.())}})})]})]})]});var j}var ja=k.create({container:{flex:1},backRow:{paddingHorizontal:16},inner:{flex:1,paddingHorizontal:16,width:"100%"},header:{marginBottom:8,paddingHorizontal:16},headerCompact:{paddingHorizontal:12},sectionTitle:{fontSize:12,fontWeight:"700",textTransform:"uppercase",letterSpacing:2.16,marginBottom:16},sectionTitleCompact:{fontSize:10,letterSpacing:1.4,marginBottom:12},tagline:{fontSize:14,lineHeight:23,textAlign:"center",maxWidth:384,marginTop:12},taglineWide:{fontSize:15,lineHeight:24},ticket:{borderWidth:2,borderRadius:24,paddingHorizontal:16,paddingVertical:16},ticketWide:{paddingHorizontal:20,paddingVertical:20},controlLabelRow:{flexDirection:"row",alignItems:"baseline",justifyContent:"space-between",marginBottom:8},controlLabelText:{fontSize:10,fontWeight:"700",textTransform:"uppercase",letterSpacing:1},controlValueText:{fontSize:12,fontWeight:"600",fontVariant:["tabular-nums"]},chipRow:{flexDirection:"row",flexWrap:"wrap",gap:6},chip:{flexGrow:1,minWidth:40,borderWidth:1,borderRadius:8,paddingHorizontal:4,paddingVertical:8,alignItems:"center",justifyContent:"center"},stakeChip:{flexGrow:1,minWidth:48,borderWidth:1,borderRadius:8,paddingHorizontal:4,paddingVertical:8,alignItems:"center",justifyContent:"center"},chipText:{fontSize:14,fontWeight:"700"},hintRow:{flexDirection:"row",alignItems:"baseline",justifyContent:"space-between",marginTop:8},hintText:{fontSize:11,fontStyle:"italic"},stakeBlock:{marginTop:16},inputWrap:{flexDirection:"row",alignItems:"center",borderWidth:1,borderRadius:8,paddingHorizontal:12},inputPrefix:{fontSize:16,fontWeight:"700",marginRight:4},input:{flex:1,paddingVertical:12,fontSize:18,fontWeight:"600",fontVariant:["tabular-nums"]},errorText:{fontSize:12,marginTop:8},dividendBlock:{marginTop:16,paddingTop:12,borderTopWidth:1},dividendCaptionRow:{flexDirection:"row",alignItems:"baseline",justifyContent:"space-between"},dividendCaption:{fontSize:10,fontWeight:"600",textTransform:"uppercase",letterSpacing:1},dividendMainRow:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",gap:12,marginTop:6},dividendMainLeft:{flex:1,minWidth:0,gap:3},perfectTicket:{fontSize:13},prize:{fontSize:20,fontWeight:"800",fontVariant:["tabular-nums"]},prizeWide:{fontSize:24},multipleLine:{fontSize:11,marginTop:6,fontVariant:["tabular-nums"]},allOrNothing:{fontSize:11,fontStyle:"italic",marginTop:4},modeCards:{marginTop:16,gap:12},modeCardsWide:{marginTop:20,flexDirection:"row",flexWrap:"wrap",alignItems:"stretch"},modeCardCell:{flexBasis:"48%",flexGrow:1,minWidth:"45%"}});function Na({onBack:e,hideActions:t}={}){const{theme:n,selectedGame:o}=or(),i=Ge(n),r=n.colors;/* @__PURE__ */
343
+ return T(z,{style:Ya.titleWrap,children:[/* @__PURE__ */W(S,{style:[Ya.eyebrow,Ya.eyebrowLeft,{color:r.primary,fontFamily:i}],children:"The dividend is set"}),/* @__PURE__ */W(pl,{onBack:e,hideActions:t,label:o?.game_name})]})}function Ga({onQuickPick:e,onPickYourOwn:t,onBack:n,hideTitle:o,config:i,backLabel:r="Games"}){const{theme:a,selectedGame:s,selectedPropositionCount:d,handlePropositionCountChange:h,setExpectedCorrect:u,setBetAmount:g,quickPickGame:f,goToSportSelection:p}=or(),y=a.colors,m=Ne(a),b=Ge(a),w=se(a),x=be(a),{width:k}=F(),C=k>=640,[v,A]=c(null),[R,L]=c(null),D=l(()=>i??Vo(s),[i,s]),[M,P]=c(()=>D?.defaultDividend??1e4),[H,O]=c(()=>{const e=D?.dividends[0]?.rungs.map(e=>e.legs)??[];return null!=d&&e.includes(d)?d:D?.defaultLegs??9});if(!s||!jo(s)||!D)/* @__PURE__ */return W(z,{children:/* @__PURE__ */W(S,{style:{color:y.textMuted,fontFamily:m},children:"No dividend series available."})});const I=D.dividends.find(e=>e.dividend===M)??D.dividends[0],E=I.rungs.find(e=>e.legs===H)??I.rungs[0],j=Math.max(...I.rungs.map(e=>e.legs)),N=Math.min(...I.rungs.map(e=>e.legs));/* @__PURE__ */
344
+ return T(z,{style:Ya.container,children:[n?/* @__PURE__ */W(z,{style:Ya.backRow,children:/* @__PURE__ */W(fl,{onBack:n,label:r})}):null,/* @__PURE__ */T(ut,{style:Ya.inner,children:[
345
+ /* @__PURE__ */W(jl,{eyebrow:o?null:"Pick your dividend",iconUrl:Ze(s),gameName:s.game_name,tagline:D.tagline}),
346
+ /* @__PURE__ */W(Zl,{}),
347
+ /* @__PURE__ */T(z,{style:[Ya.ticket,C&&Ya.ticketWide,{backgroundColor:x,borderColor:y.border,shadowColor:w,shadowOpacity:.12,shadowRadius:12,shadowOffset:{width:0,height:8},elevation:1}],children:[(G=$t(I.dividend),/* @__PURE__ */T(z,{style:Ya.sectionLabelRow,children:[/* @__PURE__ */W(S,{style:[Ya.sectionLabelText,{color:y.textMuted}],children:"Set dividend"}),G?/* @__PURE__ */W(S,{style:[Ya.sectionValueText,{color:w}],children:G}):null]})),
348
+ /* @__PURE__ */W(Gl,{ariaLabel:"Set dividend",children:D.dividends.map(e=>{const t=e.dividend===M,n=v===e.dividend;/* @__PURE__ */
349
+ return T(B,{onPress:()=>P(e.dividend),activeOpacity:.85,accessibilityRole:"radio",accessibilityState:{selected:t},...rt(()=>A(e.dividend),()=>A(null)),style:[Ya.dividendTile,Yl(C),{backgroundColor:t?Il(y.primary,.08):"transparent",borderColor:t||n?y.primary:y.border}],children:[/* @__PURE__ */W(S,{style:[Ya.dividendValue,C&&Ya.dividendValueWide,{color:w,fontFamily:b}],children:$t(e.dividend)}),/* @__PURE__ */T(S,{style:[Ya.dividendFrom,{color:y.textMuted}],children:["from ",$t(e.rungs[0]?.stake??0)]})]},e.dividend)})}),
350
+ /* @__PURE__ */W(S,{style:[Ya.ticketNote,{color:y.textMuted}],children:"One set amount — it does not move, whatever you spend."}),
351
+ /* @__PURE__ */T(z,{style:[Ya.ladderDivider,{borderTopColor:Il(w,.08)}],children:[
352
+ /* @__PURE__ */T(z,{style:Ya.ladderHeaderRow,children:[/* @__PURE__ */W(S,{style:[Ya.ladderHeaderText,{color:y.textMuted}],children:"Legs to land"}),/* @__PURE__ */W(S,{style:[Ya.ladderHeaderText,{color:y.textMuted}],children:"Your stake"})]}),
353
+ /* @__PURE__ */W(z,{style:Ya.rungList,children:I.rungs.map(e=>{const t=e.legs===H,n=R===e.legs;/* @__PURE__ */
354
+ return T(B,{onPress:()=>O(e.legs),activeOpacity:.85,accessibilityRole:"radio",accessibilityState:{selected:t},...rt(()=>L(e.legs),()=>L(null)),style:[Ya.rungRow,{backgroundColor:t?Il(y.primary,.08):"transparent",borderColor:t||n?y.primary:y.border}],children:[/* @__PURE__ */T(z,{style:Ya.rungLeft,children:[/* @__PURE__ */T(S,{style:[Ya.rungLegs,{color:y.text}],children:[e.legs," legs",C?e.legs===j?" · the long climb":e.legs===N?" · the sprint":"":""]}),/* @__PURE__ */W(Ul,{legs:e.legs})]}),/* @__PURE__ */W(S,{style:[Ya.rungStake,C&&Ya.rungStakeWide,{color:y.primary,fontFamily:b}],children:$t(e.stake)})]},e.legs)})}),
355
+ /* @__PURE__ */W(S,{style:[Ya.ticketNote,{color:y.textMuted}],children:"Same dividend on every rung — a little for the long climb, more for the short one."})]})]}),
356
+ /* @__PURE__ */T(z,{style:[Ya.cardList,C&&Ya.cardListWide],children:[/* @__PURE__ */W(z,{style:C?Ya.cardCell:void 0,children:/* @__PURE__ */W(ql,{tile:/* @__PURE__ */W(El,{iconUrl:Ze(s),size:60}),label:"Pick my own",stat:"Your calls",detail:[`A clean yes or no on all ${E.legs} legs`,`${$t(E.stake)} chasing the ${$t(I.dividend)}`],onSelect:()=>{var e;h((e=E).legs),u(e.legs),g(e.stake),p(),t?.()}})}),/* @__PURE__ */W(z,{style:C?Ya.cardCell:void 0,children:/* @__PURE__ */W(ql,{tile:/* @__PURE__ */W(El,{iconUrl:`${Ye}quickpick`,size:60}),label:"QuickPick for me",stat:"Fastest",detail:[`We fill all ${E.legs} legs at ${$t(E.stake)}`,"Straight to the bet slip"],onSelect:()=>{u(E.legs),g(E.stake),f(s,E.legs,E.stake),e?.()}})})]})]})]});var G}var Ya=k.create({container:{flex:1},backRow:{paddingHorizontal:16},inner:{flex:1,paddingHorizontal:16,width:"100%"},titleWrap:{marginBottom:8,paddingHorizontal:16},eyebrow:{fontSize:12,fontWeight:"700",textTransform:"uppercase",letterSpacing:2.16,marginBottom:16},eyebrowLeft:{textAlign:"left"},eyebrowSectionWide:{marginBottom:20},tagline:{fontSize:14,lineHeight:23,textAlign:"center",maxWidth:384,marginTop:12},taglineWide:{fontSize:15,lineHeight:24},ticket:{borderWidth:2,borderRadius:24,paddingHorizontal:16,paddingVertical:16},ticketWide:{paddingHorizontal:20,paddingVertical:20},sectionLabelRow:{flexDirection:"row",alignItems:"baseline",justifyContent:"space-between",marginBottom:8},sectionLabelText:{fontSize:10,fontWeight:"700",textTransform:"uppercase",letterSpacing:1},sectionValueText:{fontSize:12,fontWeight:"600",fontVariant:["tabular-nums"]},dividendGrid:{flexDirection:"row",flexWrap:"wrap",gap:6},dividendTile:{borderWidth:1,borderRadius:12,paddingHorizontal:6,paddingVertical:10,alignItems:"center"},dividendValue:{fontSize:16,fontWeight:"800",letterSpacing:-.32,fontVariant:["tabular-nums"]},dividendValueWide:{fontSize:20,letterSpacing:-.4},dividendFrom:{fontSize:10,marginTop:4},ticketNote:{fontSize:11,fontStyle:"italic",marginTop:8},ladderDivider:{marginTop:16,paddingTop:12,borderTopWidth:1},ladderHeaderRow:{flexDirection:"row",alignItems:"baseline",justifyContent:"space-between"},ladderHeaderText:{fontSize:10,fontWeight:"600",textTransform:"uppercase",letterSpacing:1},rungList:{marginTop:6,gap:6},rungRow:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",gap:12,borderWidth:1,borderRadius:12,paddingHorizontal:12,paddingVertical:6},rungLeft:{flexShrink:1,minWidth:0,gap:3},rungLegs:{fontSize:13},rungStake:{fontSize:14,fontWeight:"800",fontVariant:["tabular-nums"]},rungStakeWide:{fontSize:16},cardList:{marginTop:16,gap:12},cardListWide:{marginTop:20,flexDirection:"row",flexWrap:"wrap",alignItems:"stretch"},cardCell:{flexBasis:"48%",flexGrow:1,minWidth:"45%"}});function Va({onBack:e,hideActions:t}={}){const{theme:n,selectedGame:o}=or(),i=Ge(n),r=n.colors;/* @__PURE__ */
357
+ return T(z,{style:qa.titleWrap,children:[/* @__PURE__ */W(S,{style:[qa.eyebrow,{color:r.primary,fontFamily:i}],children:"Every step pays"}),/* @__PURE__ */W(pl,{onBack:e,hideActions:t,label:o?.game_name})]})}function Ua({onQuickPick:e,onPickYourOwn:t,onBack:n,hideTitle:o,config:i,backLabel:r="Games"}){const{theme:a,selectedGame:s,selectedPropositionCount:d,handlePropositionCountChange:h,setExpectedCorrect:u,setBetAmount:g,quickPickGame:f,goToSportSelection:p,screenSize:y,bodyFont:m}=or(),b=a.colors,w="mobile"===y,x=Ge(a),k=se(a),C=fe(a),v=be(a),{width:A}=F(),R=A>=640,[L,D]=c(null),M=l(()=>i??Bi(s),[i,s]),[P,H]=c(()=>M?null!=d&&M.ladders.some(e=>e.legs===d)?d:M.defaultLegs:8),[O,I]=c(()=>M?.defaultStake??50),[E,j]=c(!1);if(!s||!wi(s)||!M)/* @__PURE__ */return W(z,{children:/* @__PURE__ */W(S,{style:{color:b.textMuted,fontFamily:m},children:"No ladders available."})});const N=M.ladders.find(e=>e.legs===P)??M.ladders[0],G=ki(N,O),Y=Si(N,O),V=[...G].reverse(),U=w&&V.length>4,q=U&&!E?V.slice(0,3):V,K=(e,t)=>/* @__PURE__ */T(z,{style:qa.sectionLabelRow,children:[/* @__PURE__ */W(S,{style:[qa.sectionLabelText,{color:b.textMuted}],children:e}),t?/* @__PURE__ */W(S,{style:[qa.sectionLabelValue,{color:k}],children:t}):null]});/* @__PURE__ */
358
+ return T(z,{style:[qa.container,{backgroundColor:b.background}],children:[n?/* @__PURE__ */W(z,{style:qa.backRow,children:/* @__PURE__ */W(fl,{onBack:n,label:r})}):null,/* @__PURE__ */T(ut,{style:qa.inner,children:[
359
+ /* @__PURE__ */W(jl,{eyebrow:o?null:"Climb the ladder. Stack the prizes.",iconUrl:Ze(s),gameName:s.game_name,tagline:M.tagline}),
360
+ /* @__PURE__ */W(Zl,{}),
361
+ /* @__PURE__ */T(z,{style:[qa.builder,R&&qa.builderWide,{backgroundColor:v,borderColor:b.border,shadowColor:k,shadowOpacity:.14,shadowRadius:14,shadowOffset:{width:0,height:10},elevation:1}],children:[K("Your bet",$t(O)),
362
+ /* @__PURE__ */W(z,{style:qa.betRow,children:M.stakes.map(e=>{const t=e===O;/* @__PURE__ */
363
+ return W(B,{onPress:()=>I(e),activeOpacity:.85,accessibilityRole:"radio",accessibilityState:{selected:t},style:[qa.betChip,{backgroundColor:t?b.primary:"transparent",borderColor:t?b.primary:b.border}],children:/* @__PURE__ */T(S,{style:[qa.betChipText,{color:t?b.primaryText:b.textMuted}],children:["$",e]})},e)})}),
364
+ /* @__PURE__ */W(S,{style:[qa.betNote,{color:b.textMuted}],children:"Every prize scales with your bet."}),
365
+ /* @__PURE__ */T(z,{style:qa.laddersBlock,children:[K(`${M.ladders.length} ladders to choose from`),/* @__PURE__ */W(Gl,{ariaLabel:"Ladder",children:M.ladders.map(e=>{const t=e.legs===P,n=L===e.legs;/* @__PURE__ */
366
+ return T(B,{onPress:()=>H(e.legs),activeOpacity:.85,accessibilityRole:"radio",accessibilityState:{selected:t},...rt(()=>D(e.legs),()=>D(null)),style:[qa.ladderTile,Yl(R,"17%"),{backgroundColor:t?Il(b.primary,.08):"transparent",borderColor:t||n?b.primary:b.border}],children:[
367
+ /* @__PURE__ */T(S,{style:[qa.ladderTileLabel,{color:b.primary}],children:["Ladder ",e.legs]}),
368
+ /* @__PURE__ */W(S,{style:[qa.ladderTilePrize,{color:k,fontFamily:x}],children:$t(Si(e,O))}),
369
+ /* @__PURE__ */T(S,{style:[qa.ladderTileNote,{color:b.textMuted}],children:["Win from ",e.firstPayingTier," right"]})]},e.legs)})})]}),
370
+ /* @__PURE__ */T(z,{style:[qa.stackTable,{borderTopColor:Il(k,.08)}],children:[
371
+ /* @__PURE__ */T(S,{style:[qa.stackIntro,{color:b.text}],children:["Ladder ",N.legs," wins from ",N.firstPayingTier," right — every tier stacks into the"," ",
371
372
  /* @__PURE__ */W(S,{style:{fontWeight:"700",color:k},children:$t(Y)})," Full Stack Prize."]}),
372
- /* @__PURE__ */T(z,{style:ja.rungHeader,children:[/* @__PURE__ */W(S,{style:[ja.rungHeaderCaption,{color:b.textMuted}],children:"Get right"}),/* @__PURE__ */T(z,{style:ja.rungHeaderRight,children:[/* @__PURE__ */W(S,{style:[ja.rungHeaderCaption,ja.rungColPrize,{color:b.textMuted}],children:"Tier pays"}),/* @__PURE__ */W(S,{style:[ja.rungHeaderCaption,ja.rungColTotal,{color:b.textMuted}],children:"You collect"})]})]}),
373
- /* @__PURE__ */W(z,{style:ja.rungList,children:q.map(e=>{const t=e.atLeast===N.legs;/* @__PURE__ */
374
- return T(z,{style:ja.rungRow,children:[/* @__PURE__ */T(z,{style:ja.rungLeft,children:[/* @__PURE__ */T(z,{style:ja.rungLabelRow,children:[/* @__PURE__ */T(S,{style:[ja.rungLabel,{color:b.text}],children:[e.atLeast," of ",N.legs]}),t&&R?/* @__PURE__ */W(z,{style:[ja.fullStackChip,{backgroundColor:Dl(C,.35)}],children:/* @__PURE__ */W(S,{style:[ja.fullStackChipText,{color:k}],children:"Full stack"})}):null]}),/* @__PURE__ */W(jl,{legs:e.atLeast,prizeBall:t})]}),/* @__PURE__ */T(z,{style:ja.rungRight,children:[/* @__PURE__ */W(S,{style:[ja.rungPrize,ja.rungColPrice,{color:b.textMuted}],children:$t(e.prize)}),/* @__PURE__ */W(S,{style:[ja.rungCumulative,ja.rungColTotal,R&&ja.rungCumulativeWide,{color:b.primary,fontFamily:x}],children:$t(e.cumulative)})]})]},e.atLeast)})}),U?/* @__PURE__ */W(B,{onPress:()=>j(e=>!e),accessibilityRole:"button",accessibilityState:{expanded:E},style:[ja.tierToggle,{borderColor:b.border}],children:/* @__PURE__ */W(S,{style:[ja.tierToggleText,{color:b.primary}],children:E?"Show fewer tiers":`Show all ${V.length} tiers`})}):null,
375
- /* @__PURE__ */T(S,{style:[ja.stackNote,{color:b.textMuted}],children:["Land below ",N.firstPayingTier," right and the ticket does not pay."]})]})]}),
376
- /* @__PURE__ */T(z,{style:[ja.modeCards,R&&ja.modeCardsWide],children:[/* @__PURE__ */W(z,{style:R?ja.modeCardCell:void 0,children:/* @__PURE__ */W(Nl,{tile:/* @__PURE__ */W(Ml,{iconUrl:Ze(s),size:60}),label:"Pick my own",stat:"Your calls",detail:[`A clean yes or no on all ${N.legs} outcomes`,`Win from ${N.firstPayingTier} right — every tier stacks`],onSelect:()=>{h(N.legs),u(N.legs),g(O),p(),t?.()}})}),/* @__PURE__ */W(z,{style:R?ja.modeCardCell:void 0,children:/* @__PURE__ */W(Nl,{tile:/* @__PURE__ */W(Ml,{iconUrl:`${Ye}quickpick`,size:60}),label:"QuickPick for me",stat:"Fastest",detail:[`We fill all ${N.legs} legs at ${$t(O)}`,"Straight to the bet slip"],onSelect:()=>{u(N.legs),g(O),f(s,N.legs,O),e?.()}})})]})]})]})}var ja=k.create({container:{flex:1},inner:{flex:1,paddingHorizontal:16,width:"100%"},backRow:{paddingHorizontal:16},titleWrap:{marginBottom:8,paddingHorizontal:16},eyebrow:{fontSize:12,fontWeight:"700",textTransform:"uppercase",letterSpacing:2.16,marginBottom:16},pageTitle:{fontSize:12,fontWeight:"700",textTransform:"uppercase",letterSpacing:2.16,textAlign:"center",marginBottom:16},header:{alignItems:"center",marginBottom:24},headerWide:{marginBottom:28},tagline:{fontSize:14,lineHeight:23,textAlign:"center",maxWidth:384,marginTop:12},taglineWide:{fontSize:15,lineHeight:24},builder:{borderWidth:2,borderRadius:24,paddingHorizontal:16,paddingVertical:16},builderWide:{paddingHorizontal:20,paddingVertical:20},sectionLabelRow:{marginBottom:8,flexDirection:"row",alignItems:"baseline",justifyContent:"space-between"},sectionLabelText:{fontSize:10,fontWeight:"700",textTransform:"uppercase",letterSpacing:1},sectionLabelValue:{fontSize:12,fontWeight:"600",fontVariant:["tabular-nums"]},betRow:{flexDirection:"row",flexWrap:"wrap",gap:6},betChip:{flexGrow:1,flexBasis:52,minWidth:52,borderWidth:1,borderRadius:8,paddingHorizontal:4,paddingVertical:8,alignItems:"center",justifyContent:"center"},betChipText:{fontSize:14,fontWeight:"700"},betNote:{marginTop:8,fontSize:11,fontStyle:"italic"},laddersBlock:{marginTop:16},ladderGrid:{flexDirection:"row",flexWrap:"wrap",gap:8},ladderTile:{flexGrow:1,borderWidth:1,borderRadius:12,paddingHorizontal:8,paddingVertical:12,alignItems:"center",justifyContent:"center"},ladderTileLabel:{fontSize:10,fontWeight:"700",textTransform:"uppercase",letterSpacing:1},ladderTilePrize:{marginTop:4,fontSize:18,fontWeight:"800",letterSpacing:-.36,fontVariant:["tabular-nums"]},ladderTileNote:{marginTop:4,fontSize:10},stackTable:{marginTop:16,borderTopWidth:1,paddingTop:12},stackIntro:{marginBottom:8,fontSize:12,lineHeight:18},rungHeader:{flexDirection:"row",alignItems:"baseline",justifyContent:"space-between"},rungHeaderRight:{flexDirection:"row",gap:10},rungColPrice:{width:64,textAlign:"right"},rungColPrize:{width:64,textAlign:"right"},rungColTotal:{width:84,textAlign:"right"},rungHeaderCaption:{fontSize:10,fontWeight:"600",textTransform:"uppercase",letterSpacing:1},rungList:{marginTop:6,gap:6},rungRow:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",gap:12},rungLeft:{flex:1,minWidth:0,gap:3},rungLabelRow:{flexDirection:"row",alignItems:"center",gap:8,flexWrap:"wrap"},rungLabel:{fontSize:13},fullStackChip:{borderRadius:999,paddingHorizontal:8,paddingVertical:2},fullStackChipText:{fontSize:9,fontWeight:"700",textTransform:"uppercase",letterSpacing:.8},rungRight:{flexDirection:"row",alignItems:"baseline",gap:10,flexShrink:0},rungPrize:{fontSize:11,fontVariant:["tabular-nums"]},rungCumulative:{fontSize:14,fontWeight:"800",fontVariant:["tabular-nums"]},rungCumulativeWide:{fontSize:16},tierToggle:{marginTop:8,borderWidth:1,borderRadius:8,paddingVertical:8,alignItems:"center"},tierToggleText:{fontSize:11,fontWeight:"700"},stackNote:{marginTop:8,fontSize:11,fontStyle:"italic"},modeCards:{marginTop:16,gap:12},modeCardsWide:{marginTop:20,flexDirection:"row",flexWrap:"wrap",alignItems:"stretch"},modeCardCell:{flexBasis:"48%",flexGrow:1,minWidth:"45%"}});function Na({legs:e,right:t}){const{theme:n}=$i(),o=n.colors.primary,i=fe(n);/* @__PURE__ */
377
- return T(z,{style:{flexDirection:"row",alignItems:"center"},children:[Array.from({length:e}).map((e,n)=>/* @__PURE__ */W(z,{style:{width:5,height:5,borderRadius:1.5,marginRight:3,backgroundColor:t?o:"transparent",borderWidth:t?0:1,borderColor:t?void 0:Dl(o,.45),opacity:t?.85:1}},n)),/* @__PURE__ */W(z,{style:{width:7,height:7,borderRadius:999,backgroundColor:i,marginLeft:2}})]})}function Ga({onBack:e,hideActions:t}={}){const{theme:n,selectedGame:o}=$i(),i=Ge(n),r=n.colors;/* @__PURE__ */
378
- return T(z,{style:Va.header,children:[/* @__PURE__ */W(S,{style:[Va.eyebrow,{color:r.primary,fontFamily:i}],children:"All right, or all wrong"}),/* @__PURE__ */W(dl,{onBack:e,hideActions:t,label:o?.game_name})]})}function Ya({onQuickPick:e,onPickYourOwn:t,onBack:n,hideTitle:o,config:i,backLabel:r="Games"}){const{theme:a,selectedGame:s,selectedPropositionCount:d,handlePropositionCountChange:h,setExpectedCorrect:u,setBetAmount:g,quickPickGame:f,goToSportSelection:p}=$i(),y=a.colors,m=Ne(a),b=Ge(a),w=se(a),x=be(a),{width:k}=F(),v=k>=640,[A,R]=c(!1),L=l(()=>i??Ai(s),[i,s]),[D,M]=c(()=>L?null!=d&&L.legOptions.includes(d)?d:L.defaultLegs:8),[P,H]=c(()=>L?.defaultStake??20);if(!s||!Wi(s)||!L)/* @__PURE__ */return W(z,{children:/* @__PURE__ */W(S,{style:{color:y.textMuted,fontFamily:m},children:"No mirror available."})});const O=Ti(P,D,{operatorMargin:L.operatorMargin,perLegProbability:L.perLegProbability}),I=P>=L.minStake,E=(e,t)=>/* @__PURE__ */T(z,{style:Va.controlLabel,children:[/* @__PURE__ */W(S,{style:[Va.controlLabelText,{color:y.textMuted}],children:e}),/* @__PURE__ */W(S,{style:[Va.controlValueText,{color:w}],children:t})]}),j=e=>/* @__PURE__ */T(z,{style:Va.winRow,children:[/* @__PURE__ */T(z,{style:Va.winRowLeft,children:[/* @__PURE__ */W(S,{style:[Va.winRowLabel,{color:y.text}],children:e?`All ${D} right`:`All ${D} wrong`}),/* @__PURE__ */W(Na,{legs:D,right:e})]}),/* @__PURE__ */W(S,{style:[Va.winRowPrize,v&&Va.winRowPrizeWide,{color:y.primary,fontFamily:b}],children:$t(O.prize)})]});/* @__PURE__ */
379
- return T(z,{style:Va.container,children:[n?/* @__PURE__ */W(z,{style:Va.backRow,children:/* @__PURE__ */W(sl,{onBack:n,label:r})}):null,/* @__PURE__ */T(ut,{style:Va.inner,children:[
380
- /* @__PURE__ */W(Pl,{eyebrow:o?null:"All right, or all wrong",iconUrl:Ze(s),gameName:s.game_name,tagline:L.tagline}),
381
- /* @__PURE__ */W(Yl,{}),
382
- /* @__PURE__ */T(z,{style:[Va.ticket,v&&Va.ticketWide,{backgroundColor:x,borderColor:y.border,shadowColor:w,shadowOpacity:.14,shadowRadius:14,shadowOffset:{width:0,height:10},elevation:1}],children:[E("Legs",`${D} legs`),
383
- /* @__PURE__ */W(z,{style:Va.chipRow,children:L.legOptions.map(e=>{const t=e===D;/* @__PURE__ */
384
- return W(B,{onPress:()=>M(e),accessibilityRole:"radio",accessibilityState:{selected:t},style:[Va.legChip,{backgroundColor:t?y.primary:"transparent",borderColor:t?y.primary:y.border}],children:/* @__PURE__ */W(S,{style:[Va.chipText,{color:t?y.primaryText:y.textMuted}],children:e})},e)})}),
385
- /* @__PURE__ */T(z,{style:Va.hintRow,children:[/* @__PURE__ */W(S,{style:[Va.hintText,{color:y.textMuted}],children:"Easier to sweep"}),/* @__PURE__ */W(S,{style:[Va.hintText,{color:y.textMuted}],children:"Bigger prize"})]}),
386
- /* @__PURE__ */T(z,{style:Va.stakeBlock,children:[E("Stake",$t(P)),
387
- /* @__PURE__ */T(z,{style:[Va.inputWrap,{borderColor:A?y.borderFocus??y.primary:y.border,backgroundColor:y.backgroundAlt}],children:[/* @__PURE__ */W(S,{style:[Va.inputPrefix,{color:y.textMuted}],children:"$"}),/* @__PURE__ */W(C,{keyboardType:"numeric",placeholder:"Enter stake",placeholderTextColor:y.textMuted,accessibilityLabel:"Stake amount",onFocus:()=>R(!0),onBlur:()=>R(!1),value:P?String(P):"",onChangeText:e=>{if(""===e)return void H(0);const t=Number(e);Number.isFinite(t)&&H((e=>{const t=Math.max(0,Math.round(100*e)/100);return null!==L.maxStake?Math.min(t,L.maxStake):t})(t))},style:[Va.input,{color:y.textAlt??y.text,fontFamily:m}]})]}),
388
- /* @__PURE__ */W(z,{style:Va.quickStakeRow,children:L.quickStakes.map(e=>{const t=e===P;/* @__PURE__ */
389
- return W(B,{onPress:()=>H(e),style:[Va.stakeChip,{backgroundColor:t?y.primary:"transparent",borderColor:t?y.primary:y.border}],children:/* @__PURE__ */W(S,{style:[Va.chipText,{color:t?y.primaryText:y.textMuted}],children:`$${e}`})},e)})}),!I&&P>0?/* @__PURE__ */W(S,{style:[Va.errorText,{color:y.error}],children:`Minimum stake is ${$t(L.minStake)}.`}):null]}),
390
- /* @__PURE__ */T(z,{style:[Va.winSection,{borderTopColor:Dl(w,.08)}],children:[
391
- /* @__PURE__ */T(z,{style:Va.winHeader,children:[/* @__PURE__ */W(S,{style:[Va.winHeaderText,{color:y.textMuted}],children:"Two ways to win"}),/* @__PURE__ */W(S,{style:[Va.winHeaderText,{color:y.textMuted}],children:`${$t(P)} pays each`})]}),
392
- /* @__PURE__ */T(z,{style:Va.winRows,children:[j(!0),j(!1)]}),
393
- /* @__PURE__ */W(S,{style:[Va.splitNote,{color:y.textMuted}],children:"Anything in between — a split card — does not pay."})]})]}),
394
- /* @__PURE__ */T(z,{style:[Va.cardList,v&&Va.cardListWide],children:[/* @__PURE__ */W(z,{style:v?Va.cardCell:void 0,children:/* @__PURE__ */W(Nl,{tile:/* @__PURE__ */W(Ml,{iconUrl:Ze(s),size:60}),label:"Pick my own",stat:"Your calls",detail:["A clean yes or no on every leg","Aim for the sweep — either direction pays"],onSelect:()=>{I&&(h(D),u(D),g(P),p(),t?.())}})}),/* @__PURE__ */W(z,{style:v?Va.cardCell:void 0,children:/* @__PURE__ */W(Nl,{tile:/* @__PURE__ */W(Ml,{iconUrl:`${Ye}quickpick`,size:60}),label:"QuickPick for me",stat:"Fastest",detail:["We fill every leg for you","Straight to the bet slip"],onSelect:()=>{I&&(u(D),g(P),f(s,D,P),e?.())}})})]})]})]})}var Va=k.create({container:{flex:1,width:"100%"},header:{marginBottom:8,paddingHorizontal:16},eyebrow:{fontSize:12,fontWeight:"700",textTransform:"uppercase",letterSpacing:2.16,marginBottom:16},backRow:{paddingHorizontal:16},inner:{flex:1,paddingHorizontal:16,width:"100%"},tagline:{marginTop:12,fontSize:14,lineHeight:23,textAlign:"center",maxWidth:384},taglineWide:{fontSize:15,lineHeight:24},ticket:{borderWidth:2,borderRadius:24,paddingHorizontal:16,paddingVertical:16},ticketWide:{paddingHorizontal:20,paddingVertical:20},controlLabel:{marginBottom:8,flexDirection:"row",alignItems:"baseline",justifyContent:"space-between"},controlLabelText:{fontSize:10,fontWeight:"700",textTransform:"uppercase",letterSpacing:1},controlValueText:{fontSize:12,fontWeight:"600",fontVariant:["tabular-nums"]},chipRow:{flexDirection:"row",flexWrap:"wrap",gap:6},legChip:{minWidth:40,flexGrow:1,flexBasis:40,borderWidth:1,borderRadius:8,paddingHorizontal:4,paddingVertical:8,alignItems:"center",justifyContent:"center"},chipText:{fontSize:14,fontWeight:"700"},hintRow:{marginTop:8,flexDirection:"row",alignItems:"baseline",justifyContent:"space-between"},hintText:{fontSize:11,fontStyle:"italic"},stakeBlock:{marginTop:16},inputWrap:{flexDirection:"row",alignItems:"center",borderWidth:1,borderRadius:8,paddingHorizontal:12},inputPrefix:{fontSize:16,fontWeight:"700",marginRight:4},input:{flex:1,paddingVertical:12,fontSize:18,fontWeight:"600",fontVariant:["tabular-nums"]},quickStakeRow:{marginTop:8,flexDirection:"row",flexWrap:"wrap",gap:6},stakeChip:{minWidth:48,flexGrow:1,flexBasis:48,borderWidth:1,borderRadius:8,paddingHorizontal:4,paddingVertical:8,alignItems:"center",justifyContent:"center"},errorText:{marginTop:8,fontSize:12},winSection:{marginTop:16,borderTopWidth:1,paddingTop:12},winHeader:{flexDirection:"row",alignItems:"baseline",justifyContent:"space-between"},winHeaderText:{fontSize:10,fontWeight:"600",textTransform:"uppercase",letterSpacing:1},winRows:{marginTop:6,gap:8},winRow:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",gap:12},winRowLeft:{flex:1,minWidth:0,gap:3},winRowLabel:{fontSize:13},winRowPrize:{fontSize:18,fontWeight:"800",fontVariant:["tabular-nums"]},winRowPrizeWide:{fontSize:20},splitNote:{marginTop:8,fontSize:11,fontStyle:"italic"},cardList:{marginTop:16,gap:12},cardListWide:{marginTop:20,flexDirection:"row",flexWrap:"wrap",alignItems:"stretch"},cardCell:{flexBasis:"48%",flexGrow:1,minWidth:"45%"}});function Ua({onBack:e,hideActions:t}={}){const{theme:n,selectedGame:o}=$i(),i=Ge(n),r=n.colors,{width:l}=F(),a=l<640;/* @__PURE__ */
395
- return T(z,{style:[Ka.header,a&&Ka.headerCompact],children:[/* @__PURE__ */W(S,{style:[Ka.sectionTitle,a&&Ka.sectionTitleCompact,{color:r.primary,fontFamily:i}],children:"Choose your safety net"}),/* @__PURE__ */W(dl,{onBack:e,hideActions:t,label:o?.game_name})]})}function qa({onQuickPick:e,onPickYourOwn:t,onBack:n,hideTitle:o,config:i,backLabel:r="Games"}){const{theme:a,selectedGame:s,selectedPropositionCount:d,handlePropositionCountChange:h,setExpectedCorrect:u,setBetAmount:g,setSelectedRuleId:f,quickPickGame:p,goToSportSelection:y}=$i(),m=a.colors,b=Ne(a),w=Ge(a),x=se(a),k=be(a),{width:v}=F(),A=v>=640,[R,L]=c(!1),D=l(()=>i??Lo(s),[i,s]),[M,P]=c(()=>D?.defaultModeId??"extra_shot"),[H,O]=c(()=>{const e=D?.modes.find(e=>e.id===(D?.defaultModeId??"extra_shot"));return e?null!=d&&e.legOptions.includes(d)?d:e.defaultLegs:8}),[I,E]=c(()=>D?.defaultStake??20);if(!s||!So(s)||!D)/* @__PURE__ */return W(z,{style:[Ka.container,{backgroundColor:m.background}],children:/* @__PURE__ */W(S,{style:{color:m.textMuted,fontFamily:b},children:"No safety net available."})});const j=D.modes.find(e=>e.id===M)??D.modes[0],N=Fo(I,H,j.allowedMisses,D.pricing),G=e=>{const t=Math.max(0,Math.round(100*e)/100);return null!==D.maxStake?Math.min(t,D.maxStake):t},Y=I>=D.minStake,V=(e,t)=>/* @__PURE__ */T(z,{style:Ka.controlLabelRow,children:[/* @__PURE__ */W(S,{style:[Ka.controlLabelText,{color:m.textMuted}],children:e}),/* @__PURE__ */W(S,{style:[Ka.controlValueText,{color:x}],children:t})]}),U=(e,t,n,o)=>/* @__PURE__ */W(B,{onPress:o,accessibilityRole:"radio",accessibilityState:{selected:n},activeOpacity:.8,style:[Ka.chip,{backgroundColor:n?m.primary:"transparent",borderColor:n?m.primary:m.border}],children:/* @__PURE__ */W(S,{style:[Ka.chipText,{color:n?m.primaryText:m.textMuted}],children:t})},e),q=[{label:"Perfect",amount:N.perfect},...N.nearMiss.map((e,t)=>({label:`All but ${t+1}`,amount:e}))];/* @__PURE__ */
396
- return T(z,{style:[Ka.container,{backgroundColor:m.background}],children:[n?/* @__PURE__ */W(z,{style:Ka.backRow,children:/* @__PURE__ */W(sl,{onBack:n,label:r})}):null,/* @__PURE__ */T(ut,{style:Ka.inner,children:[
397
- /* @__PURE__ */W(Pl,{eyebrow:o?null:"Choose your safety net",iconUrl:Ze(s),gameName:s.game_name,tagline:D.tagline}),
398
- /* @__PURE__ */W(Yl,{}),
399
- /* @__PURE__ */T(z,{style:[Ka.ticket,A&&Ka.ticketWide,{backgroundColor:k,borderColor:m.border,shadowColor:x,shadowOpacity:.14,shadowRadius:14,shadowOffset:{width:0,height:10},elevation:1}],children:[V("Safety net",j.label),
400
- /* @__PURE__ */W(z,{style:Ka.chipRow,children:D.modes.map(e=>U(e.id,e.label,e.id===j.id,()=>(e=>{const t=D.modes.find(t=>t.id===e);t&&(P(e),f(t.ruleId),t.legOptions.includes(H)||O(t.legOptions.reduce((e,t)=>Math.abs(t-H)<Math.abs(e-H)?t:e,t.legOptions[0])))})(e.id)))}),
401
- /* @__PURE__ */W(S,{style:[Ka.modeExplain,A&&Ka.modeExplainWide,{color:m.textMuted}],children:j.explain}),
402
- /* @__PURE__ */T(z,{style:Ka.legsBlock,children:[V("Legs",`${H} legs`),
403
- /* @__PURE__ */W(z,{style:Ka.chipRow,children:j.legOptions.map(e=>U(e,String(e),e===H,()=>O(e)))}),
404
- /* @__PURE__ */T(z,{style:Ka.hintRow,children:[/* @__PURE__ */W(S,{style:[Ka.hintText,{color:m.textMuted}],children:"Easier to land"}),/* @__PURE__ */W(S,{style:[Ka.hintText,{color:m.textMuted}],children:"Bigger prizes"})]})]}),
405
- /* @__PURE__ */T(z,{style:Ka.stakeBlock,children:[V("Stake",$t(I)),
406
- /* @__PURE__ */T(z,{style:[Ka.inputWrap,{borderColor:R?m.borderFocus??m.primary:m.border,backgroundColor:m.backgroundAlt}],children:[/* @__PURE__ */W(S,{style:[Ka.inputPrefix,{color:m.textMuted}],children:"$"}),/* @__PURE__ */W(C,{keyboardType:"decimal-pad",placeholder:"Enter stake",placeholderTextColor:m.textMuted,accessibilityLabel:"Stake amount",onFocus:()=>L(!0),onBlur:()=>L(!1),value:I?String(I):"",onChangeText:e=>{if(""===e)return void E(0);const t=Number(e);Number.isFinite(t)&&E(G(t))},style:[Ka.input,{color:m.textAlt??m.text,fontFamily:b}]})]}),
407
- /* @__PURE__ */W(z,{style:Ka.chipRow,children:D.quickAdds.map(e=>/* @__PURE__ */W(B,{onPress:()=>E(G((I||0)+e)),activeOpacity:.8,style:[Ka.stakeChip,{backgroundColor:"transparent",borderColor:m.border}],children:/* @__PURE__ */T(S,{style:[Ka.chipText,{color:m.textMuted}],children:["+$",e]})},e))}),!Y&&I>0?/* @__PURE__ */T(S,{style:[Ka.errorText,{color:m.error}],children:["Minimum stake is ",$t(D.minStake),"."]}):null]}),
408
- /* @__PURE__ */T(z,{style:[Ka.prizeBlock,{borderTopColor:Dl(x,.08)}],children:[
409
- /* @__PURE__ */T(z,{style:Ka.prizeCaptionRow,children:[/* @__PURE__ */W(S,{style:[Ka.prizeCaption,{color:m.textMuted}],children:"What you can win"}),/* @__PURE__ */T(S,{style:[Ka.prizeCaption,{color:m.textMuted}],children:[$t(I)," returns"]})]}),
410
- /* @__PURE__ */T(z,{style:Ka.prizeRows,children:[q.map(e=>/* @__PURE__ */T(z,{style:Ka.prizeRow,children:[/* @__PURE__ */W(S,{style:[Ka.prizeRowLabel,A&&Ka.prizeRowLabelWide,{color:m.text}],children:e.label}),/* @__PURE__ */W(S,{style:[Ka.prizeRowAmount,A&&Ka.prizeRowAmountWide,{color:m.primary,fontFamily:w}],children:$t(Math.round(e.amount))})]},e.label)),/* @__PURE__ */T(z,{style:[Ka.sweepRow,{backgroundColor:m.primary}],children:[/* @__PURE__ */T(z,{style:Ka.sweepLeft,children:[/* @__PURE__ */W(S,{style:[Ka.sweepLabel,A&&Ka.sweepLabelWide,{color:m.primaryText,fontFamily:w}],children:"Clean sweep"}),/* @__PURE__ */W(S,{style:[Ka.sweepSub,{color:m.primaryText}],children:"every leg right — all prizes"})]}),/* @__PURE__ */W(S,{style:[Ka.sweepAmount,A&&Ka.sweepAmountWide,{color:m.primaryText,fontFamily:w}],children:$t(Math.round(N.sweep))})]})]}),
411
- /* @__PURE__ */W(S,{style:[Ka.stakeNote,{color:m.textMuted}],children:"Total returns, stake included."}),
412
- /* @__PURE__ */T(S,{style:[Ka.missNote,{color:m.textMuted}],children:["Miss ",1===j.allowedMisses?"two":"three"," or more and the ticket does not pay."]})]})]}),
413
- /* @__PURE__ */T(z,{style:[Ka.modeCards,A&&Ka.modeCardsWide],children:[/* @__PURE__ */W(z,{style:A?Ka.modeCardCell:void 0,children:/* @__PURE__ */W(Nl,{tile:/* @__PURE__ */W(Ml,{iconUrl:Ze(s),size:60}),label:"Pick my own",stat:"Your calls",detail:["A clean yes or no on every leg","You read the games, you make the calls"],onSelect:()=>{Y&&(f(j.ruleId),h(H),u(H-j.allowedMisses),g(I),y(),t?.())}})}),/* @__PURE__ */W(z,{style:A?Ka.modeCardCell:void 0,children:/* @__PURE__ */W(Nl,{tile:/* @__PURE__ */W(Ml,{iconUrl:`${Ye}quickpick`,size:60}),label:"QuickPick for me",stat:"Fastest",detail:["We fill every leg for you","Straight to the bet slip"],onSelect:()=>{Y&&(f(j.ruleId),u(H-j.allowedMisses),g(I),p(s,H,I),e?.())}})})]})]})]})}var Ka=k.create({container:{flex:1},backRow:{paddingHorizontal:16},inner:{flex:1,paddingHorizontal:16,width:"100%"},header:{marginBottom:8,paddingHorizontal:16},headerCompact:{paddingHorizontal:12},sectionTitle:{fontSize:12,fontWeight:"700",textTransform:"uppercase",letterSpacing:2.16,marginBottom:16},sectionTitleCompact:{fontSize:10,letterSpacing:1.4,marginBottom:12},tagline:{fontSize:14,lineHeight:23,textAlign:"center",maxWidth:384,marginTop:12},taglineWide:{fontSize:15,lineHeight:24},ticket:{borderWidth:2,borderRadius:24,paddingHorizontal:16,paddingVertical:16},ticketWide:{paddingHorizontal:20,paddingVertical:20},controlLabelRow:{flexDirection:"row",alignItems:"baseline",justifyContent:"space-between",marginBottom:8},controlLabelText:{fontSize:10,fontWeight:"700",textTransform:"uppercase",letterSpacing:1},controlValueText:{fontSize:12,fontWeight:"600",fontVariant:["tabular-nums"]},chipRow:{flexDirection:"row",flexWrap:"wrap",gap:6},chip:{flexGrow:1,minWidth:40,borderWidth:1,borderRadius:8,paddingHorizontal:4,paddingVertical:8,alignItems:"center",justifyContent:"center"},stakeChip:{flexGrow:1,minWidth:48,borderWidth:1,borderRadius:8,paddingHorizontal:4,paddingVertical:8,alignItems:"center",justifyContent:"center"},chipText:{fontSize:14,fontWeight:"700"},modeExplain:{fontSize:12,lineHeight:17,marginTop:8},modeExplainWide:{fontSize:13,lineHeight:18},legsBlock:{marginTop:16},hintRow:{flexDirection:"row",alignItems:"baseline",justifyContent:"space-between",marginTop:8},hintText:{fontSize:11,fontStyle:"italic"},stakeBlock:{marginTop:16},inputWrap:{flexDirection:"row",alignItems:"center",borderWidth:1,borderRadius:8,paddingHorizontal:12,marginBottom:8},inputPrefix:{fontSize:16,fontWeight:"700",marginRight:4},input:{flex:1,paddingVertical:12,fontSize:18,fontWeight:"600",fontVariant:["tabular-nums"]},errorText:{fontSize:12,marginTop:8},prizeBlock:{marginTop:16,paddingTop:12,borderTopWidth:1},prizeCaptionRow:{flexDirection:"row",alignItems:"baseline",justifyContent:"space-between"},prizeCaption:{fontSize:10,fontWeight:"600",textTransform:"uppercase",letterSpacing:1},prizeRows:{marginTop:6,gap:6},prizeRow:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",gap:12},prizeRowLabel:{fontSize:12},prizeRowLabelWide:{fontSize:13},prizeRowAmount:{fontSize:14,fontWeight:"800",fontVariant:["tabular-nums"]},prizeRowAmountWide:{fontSize:16},sweepRow:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",gap:12,borderRadius:12,paddingHorizontal:12,paddingVertical:10,marginTop:4},sweepLeft:{flex:1,minWidth:0,gap:2},sweepLabel:{fontSize:14,fontWeight:"800"},sweepLabelWide:{fontSize:15},sweepSub:{fontSize:10,fontWeight:"600",textTransform:"uppercase",letterSpacing:.6,opacity:.75},sweepAmount:{fontSize:20,fontWeight:"800",fontVariant:["tabular-nums"]},sweepAmountWide:{fontSize:24},stakeNote:{fontSize:11,marginTop:6},missNote:{fontSize:11,fontStyle:"italic",marginTop:4},modeCards:{marginTop:16,gap:12},modeCardsWide:{marginTop:20,flexDirection:"row",flexWrap:"wrap",alignItems:"stretch"},modeCardCell:{flexBasis:"48%",flexGrow:1,minWidth:"45%"}});function Za({onBack:e,hideActions:t}={}){const{theme:n,selectedGame:o}=$i(),i=Ge(n),r=n.colors,{width:l}=F(),a=l<640;/* @__PURE__ */
414
- return T(z,{style:[Qa.header,a&&Qa.headerCompact],children:[/* @__PURE__ */W(S,{style:[Qa.sectionTitle,a&&Qa.sectionTitleCompact,{color:r.primary,fontFamily:i}],children:"Set your play"}),/* @__PURE__ */W(dl,{onBack:e,hideActions:t,label:o?.game_name})]})}function Xa({onQuickPick:e,onPickYourOwn:t,onBack:n,hideTitle:o,config:i,backLabel:r="Games"}){const{theme:a,selectedGame:s,handlePropositionCountChange:d,setExpectedCorrect:h,setBetAmount:u,setSelectedRuleId:g,quickPickGame:f,goToSportSelection:p}=$i(),y=a.colors,m=Ne(a),b=Ge(a),w=se(a),x=be(a),{width:k}=F(),C=k>=640,v=l(()=>i??Gi(s),[i,s]),[A,R]=c(()=>v?.defaultUnit??10),[L,D]=c(Oi);if(!s||!Hi(s)||!v)/* @__PURE__ */return W(z,{style:[Qa.container,{backgroundColor:y.background}],children:/* @__PURE__ */W(S,{style:{color:y.textMuted,fontFamily:m},children:"No card available."})});const M=Ii(A,L,v),P=1*A,H=A>v.unitMin,O=A<v.unitMax,I=e=>R(t=>Math.min(v.unitMax,Math.max(v.unitMin,t+e*v.unitStep))),E=()=>{g(M.ruleId),h(M.lowestWinningCount),u(M.stake)},j=(e,t)=>/* @__PURE__ */T(z,{style:Qa.controlLabelRow,children:[/* @__PURE__ */W(S,{style:[Qa.controlLabelText,{color:y.textMuted}],children:e}),/* @__PURE__ */W(S,{style:[Qa.controlValueText,{color:w}],children:t})]}),N=(e,t,n,o)=>/* @__PURE__ */W(B,{onPress:n,disabled:!t,accessibilityRole:"button",accessibilityLabel:o,activeOpacity:.8,style:[Qa.stepButton,{backgroundColor:y.primary,opacity:t?1:.35}],children:/* @__PURE__ */W(S,{style:[Qa.stepButtonText,{color:y.primaryText}],children:e})}),G={golden_point:`Go for the decider. Doubles a winning card to ${$t(A*v.baseMultiple*v.goldenPointFactor)}.`,captains_challenge:`Collect ${$t(A*v.challengeMultiple)} whenever you land ${v.legs-v.challengeMisses} or ${v.legs} of ${v.legs}. Stacks on a winning card.`};/* @__PURE__ */
415
- return T(z,{style:[Qa.container,{backgroundColor:y.background}],children:[n?/* @__PURE__ */W(z,{style:Qa.backRow,children:/* @__PURE__ */W(sl,{onBack:n,label:r})}):null,/* @__PURE__ */T(ut,{style:Qa.inner,children:[
416
- /* @__PURE__ */W(Pl,{eyebrow:o?null:"Set your play",iconUrl:Ze(s),gameName:s.game_name,tagline:v.tagline}),
417
- /* @__PURE__ */W(Yl,{}),
418
- /* @__PURE__ */T(z,{style:[Qa.ticket,C&&Qa.ticketWide,{backgroundColor:x,borderColor:y.border,shadowColor:w,shadowOpacity:.14,shadowRadius:14,shadowOffset:{width:0,height:10},elevation:1}],children:[j("Your play",`steps of ${$t(v.unitStep)}`),
419
- /* @__PURE__ */T(z,{style:Qa.stepRow,children:[N("−",H,()=>I(-1),"Lower stake"),
420
- /* @__PURE__ */T(z,{style:Qa.stepMid,children:[/* @__PURE__ */W(S,{style:[Qa.stepValue,{color:w,fontFamily:b}],children:$t(A)}),/* @__PURE__ */W(S,{style:[Qa.stepCaption,{color:y.textMuted}],children:"per play"})]}),N("+",O,()=>I(1),"Raise stake")]}),
421
- /* @__PURE__ */T(z,{style:Qa.boostBlock,children:[j("Boost your card",`${$t(P)} each`),/* @__PURE__ */W(z,{style:Qa.boostRows,children:v.boosts.map(e=>{const t=L[e.id];/* @__PURE__ */
422
- return T(B,{onPress:()=>{return t=e.id,D(e=>({...e,[t]:!e[t]}));var t},accessibilityRole:"switch",accessibilityState:{checked:t},activeOpacity:.85,style:[Qa.boostRow,{backgroundColor:t?Dl(y.primary,.08):"transparent",borderColor:t?y.primary:y.border}],children:[/* @__PURE__ */T(z,{style:Qa.boostBody,children:[/* @__PURE__ */T(z,{style:Qa.boostTitleRow,children:[/* @__PURE__ */W(S,{style:[Qa.boostLabel,C&&Qa.boostLabelWide,{color:w,fontFamily:b}],children:e.label}),/* @__PURE__ */W(z,{style:[Qa.boostAmt,{backgroundColor:Dl(y.primary,.12)}],children:/* @__PURE__ */T(S,{style:[Qa.boostAmtText,{color:y.primary}],children:["+",$t(P*e.costUnits)]})})]}),/* @__PURE__ */W(S,{style:[Qa.boostSub,C&&Qa.boostSubWide,{color:y.textMuted}],children:G[e.id]})]}),/* @__PURE__ */W(z,{style:[Qa.toggle,{backgroundColor:t?y.primary:y.border}],children:/* @__PURE__ */W(z,{style:[Qa.toggleKnob,{backgroundColor:y.background,transform:[{translateX:t?20:0}]}]})})]},e.id)})})]}),
423
- /* @__PURE__ */T(z,{style:[Qa.prizeBlock,{borderTopColor:Dl(w,.08)}],children:[
424
- /* @__PURE__ */T(z,{style:Qa.prizeCaptionRow,children:[/* @__PURE__ */W(S,{style:[Qa.prizeCaption,{color:y.textMuted}],children:"What you can win"}),/* @__PURE__ */T(S,{style:[Qa.prizeCaption,{color:y.textMuted}],children:[$t(M.stake)," total wager"]})]}),M.challenge>0?/* @__PURE__ */T(z,{style:Qa.prizeRow,children:[/* @__PURE__ */T(S,{style:[Qa.prizeRowLabel,C&&Qa.prizeRowLabelWide,{color:y.text}],children:[v.legs-v.challengeMisses," of ",v.legs]}),/* @__PURE__ */W(S,{style:[Qa.prizeRowAmount,C&&Qa.prizeRowAmountWide,{color:y.primary,fontFamily:b}],children:$t(M.challenge)})]}):null,
425
- /* @__PURE__ */T(z,{style:[Qa.sweepRow,{backgroundColor:y.primary}],children:[/* @__PURE__ */T(z,{style:Qa.sweepLeft,children:[/* @__PURE__ */T(S,{style:[Qa.sweepLabel,C&&Qa.sweepLabelWide,{color:y.primaryText,fontFamily:b}],children:[v.legs," of ",v.legs]}),/* @__PURE__ */W(S,{style:[Qa.sweepSub,{color:y.primaryText}],children:M.challenge>0?"every call right — both prizes":"every call right"})]}),/* @__PURE__ */W(S,{style:[Qa.sweepAmount,C&&Qa.sweepAmountWide,{color:y.primaryText,fontFamily:b}],children:$t(M.perfect)})]}),
426
- /* @__PURE__ */W(S,{style:[Qa.missNote,{color:y.textMuted}],children:M.challenge>0?`Fewer than ${v.legs-v.challengeMisses} right and the card does not pay.`:"Every call has to land — one miss and the card does not pay."})]})]}),
427
- /* @__PURE__ */T(z,{style:[Qa.modeCards,C&&Qa.modeCardsWide],children:[/* @__PURE__ */W(z,{style:C?Qa.modeCardCell:void 0,children:/* @__PURE__ */W(Nl,{tile:/* @__PURE__ */W(Ml,{iconUrl:Ze(s),size:60}),label:`Pick my ${v.legs}`,stat:"Your calls",detail:["A clean yes or no on every call","You read the games, you make the calls"],onSelect:()=>{E(),d(v.legs),p(),t?.()}})}),/* @__PURE__ */W(z,{style:C?Qa.modeCardCell:void 0,children:/* @__PURE__ */W(Nl,{tile:/* @__PURE__ */W(Ml,{iconUrl:`${Ye}quickpick`,size:60}),label:"QuickPick for me",stat:"Fastest",detail:[`We fill all ${v.legs} calls for you`,"Straight to the bet slip"],onSelect:()=>{E(),f(s,v.legs,M.stake),e?.()}})})]})]})]})}var Qa=k.create({container:{flex:1},backRow:{paddingHorizontal:16},inner:{flex:1,paddingHorizontal:16,width:"100%"},header:{marginBottom:8,paddingHorizontal:16},headerCompact:{paddingHorizontal:12},sectionTitle:{fontSize:12,fontWeight:"700",textTransform:"uppercase",letterSpacing:2.16,marginBottom:16},sectionTitleCompact:{fontSize:10,letterSpacing:1.4,marginBottom:12},ticket:{borderWidth:2,borderRadius:24,paddingHorizontal:16,paddingVertical:16},ticketWide:{paddingHorizontal:20,paddingVertical:20},controlLabelRow:{flexDirection:"row",alignItems:"baseline",justifyContent:"space-between",marginBottom:8},controlLabelText:{fontSize:10,fontWeight:"700",textTransform:"uppercase",letterSpacing:1},controlValueText:{fontSize:12,fontWeight:"600",fontVariant:["tabular-nums"]},stepRow:{flexDirection:"row",alignItems:"center",gap:12},stepButton:{width:44,height:44,borderRadius:12,alignItems:"center",justifyContent:"center"},stepButtonText:{fontSize:24,fontWeight:"800",lineHeight:26},stepMid:{flex:1,alignItems:"center"},stepValue:{fontSize:24,fontWeight:"800",fontVariant:["tabular-nums"]},stepCaption:{fontSize:10,fontWeight:"700",textTransform:"uppercase",letterSpacing:.8},boostBlock:{marginTop:16},boostRows:{gap:8},boostRow:{flexDirection:"row",alignItems:"center",gap:12,borderWidth:1,borderRadius:16,paddingHorizontal:12,paddingVertical:12},boostBody:{flex:1,minWidth:0},boostTitleRow:{flexDirection:"row",alignItems:"center",gap:8},boostLabel:{fontSize:14,fontWeight:"800"},boostLabelWide:{fontSize:15},boostAmt:{borderRadius:6,paddingHorizontal:6,paddingVertical:2},boostAmtText:{fontSize:10,fontWeight:"800",fontVariant:["tabular-nums"]},boostSub:{fontSize:11,lineHeight:15,marginTop:4},boostSubWide:{fontSize:12,lineHeight:16},toggle:{width:48,height:28,borderRadius:999,justifyContent:"center",paddingHorizontal:3},toggleKnob:{width:22,height:22,borderRadius:11},prizeBlock:{marginTop:16,paddingTop:12,borderTopWidth:1},prizeCaptionRow:{flexDirection:"row",alignItems:"baseline",justifyContent:"space-between"},prizeCaption:{fontSize:10,fontWeight:"600",textTransform:"uppercase",letterSpacing:1},prizeRow:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",gap:12,marginTop:6},prizeRowLabel:{fontSize:12},prizeRowLabelWide:{fontSize:13},prizeRowAmount:{fontSize:14,fontWeight:"800",fontVariant:["tabular-nums"]},prizeRowAmountWide:{fontSize:16},sweepRow:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",gap:12,borderRadius:12,paddingHorizontal:12,paddingVertical:10,marginTop:6},sweepLeft:{flex:1,minWidth:0,gap:2},sweepLabel:{fontSize:14,fontWeight:"800"},sweepLabelWide:{fontSize:15},sweepSub:{fontSize:10,fontWeight:"600",textTransform:"uppercase",letterSpacing:.6,opacity:.75},sweepAmount:{fontSize:20,fontWeight:"800",fontVariant:["tabular-nums"]},sweepAmountWide:{fontSize:24},missNote:{fontSize:11,fontStyle:"italic",marginTop:6},modeCards:{marginTop:16,gap:12},modeCardsWide:{marginTop:20,flexDirection:"row",flexWrap:"wrap",alignItems:"stretch"},modeCardCell:{flexBasis:"48%",flexGrow:1,minWidth:"45%"}});function Ja({onBack:e,hideActions:t}={}){const{theme:n,selectedGame:o}=$i(),i=Ge(n),r=n.colors;/* @__PURE__ */
428
- return T(z,{style:_a.header,children:[/* @__PURE__ */W(S,{style:[_a.eyebrow,{color:r.primary,fontFamily:i}],children:"All or nothing"}),/* @__PURE__ */W(dl,{onBack:e,hideActions:t,label:o?.game_name})]})}function $a({onQuickPick:e,onPickYourOwn:t,onBack:n,hideTitle:o,backLabel:i="Games"}){const{theme:r,selectedGame:a,selectedPropositionCount:s,handlePropositionCountChange:d,setExpectedCorrect:h,quickPickGame:u,goToSportSelection:g}=$i(),f=r.colors,p=Ne(r),{width:y}=F(),m=y>=640,b=l(()=>{if(!a)return[];if(a.allowed_propositions&&a.allowed_propositions.length>0)return[...a.allowed_propositions].sort((e,t)=>e-t);const{min:e,max:t}=dn(a);return Ln(e,t)},[a]),w=Ui(a),x=b[0]??0,k=b[b.length-1]??0,[C]=c(()=>null!=s&&b.includes(s)?s:k),B=l(()=>Ho(a,C||void 0),[a,C]);if(!a||0===b.length||"exact"!==B?.kind)/* @__PURE__ */return W(z,{children:/* @__PURE__ */W(S,{style:{color:f.textMuted,fontFamily:p},children:"No setup available."})});const v=w?["Any yes/no props in the pool",`Pick ${x}–${k} legs — all must land`]:["A clean yes or no on every leg",`All ${C} have to land`],A=w?[`We fill ${C} legs across any markets`,"Straight to the bet slip"]:[`We fill all ${C} legs for you`,"Straight to the bet slip"];/* @__PURE__ */
429
- return T(z,{style:_a.container,children:[n?/* @__PURE__ */W(z,{style:_a.backRow,children:/* @__PURE__ */W(sl,{onBack:n,label:i})}):null,/* @__PURE__ */T(ut,{style:_a.inner,children:[
430
- /* @__PURE__ */W(Pl,{eyebrow:o?null:B.title,iconUrl:Ze(a),gameName:a.game_name,tagline:B.heroTagline}),
431
- /* @__PURE__ */W(Yl,{}),
432
- /* @__PURE__ */T(z,{style:[_a.cardList,m&&_a.cardListWide],children:[/* @__PURE__ */W(z,{style:m?_a.cardCell:void 0,children:/* @__PURE__ */W(Nl,{tile:/* @__PURE__ */W(Ml,{iconUrl:Ze(a),size:60}),label:"Pick my own",stat:"Your calls",detail:v,onSelect:()=>{w||(d(C),h(C)),g(),t?.()}})}),/* @__PURE__ */W(z,{style:m?_a.cardCell:void 0,children:/* @__PURE__ */W(Nl,{tile:/* @__PURE__ */W(Ml,{iconUrl:`${Ye}quickpick`,size:60}),label:"QuickPick for me",stat:"Fastest",detail:A,onSelect:()=>{h(C),u(a,C),e?.()}})})]})]})]})}var _a=k.create({container:{flex:1,width:"100%"},header:{marginBottom:8,paddingHorizontal:16},eyebrow:{fontSize:12,fontWeight:"700",textTransform:"uppercase",letterSpacing:2.16,marginBottom:16},backRow:{paddingHorizontal:16},inner:{flex:1,paddingHorizontal:16,width:"100%"},tagline:{fontSize:14,lineHeight:23,textAlign:"center",maxWidth:384,marginTop:12},taglineWide:{fontSize:15,lineHeight:24},cardList:{gap:12},cardListWide:{flexDirection:"row",flexWrap:"wrap",alignItems:"stretch"},cardCell:{flexBasis:"48%",flexGrow:1,minWidth:"45%"}});function ec({onPickYourOwn:e,onQuickPick:t,onBack:n,hideTitle:o,backLabel:i="Games"}){const{theme:r,selectedGame:l,goToSportSelection:a,bodyFont:c}=$i(),s={onPickYourOwn:e,onQuickPick:t,onBack:n,hideTitle:o,backLabel:i};switch(Yi(l)){case"game_set":/* @__PURE__ */return W(Da,{...s});case"pick_your_dividend":/* @__PURE__ */return W(Ha,{...s});case"ladder":/* @__PURE__ */return W(Ea,{...s});case"mirror":/* @__PURE__ */return W(Ya,{...s});case"safety_net":/* @__PURE__ */return W(qa,{...s});case"six_again":/* @__PURE__ */return W(Xa,{...s});case"rule_setup":return"exact"===Ho(l)?.kind?/* @__PURE__ */W($a,{...s}):/* @__PURE__ */W(Aa,{onBack:n,hideTitle:o,backLabel:i,onContinue:()=>{a(),e?.()}});default:/* @__PURE__ */return W(z,{children:/* @__PURE__ */W(S,{style:{color:r.colors.textMuted,fontFamily:c},children:"No setup required — this game goes straight to picks."})})}}function tc({iconUrl:e,gameName:t,nameLines:n,height:o=56,showTrademark:i=!0}){const{theme:r}=$i(),l=se(r),a=fe(r),c=r.colors.primaryHover??function(e){const t=/^#([0-9a-f]{6})$/i.exec((e??"").trim());if(!t)return e;const n=parseInt(t[1],16);return`rgba(${n>>16&255}, ${n>>8&255}, ${255&n}, 0.7)`}(l),s=Ge(r)??"Manrope, Poppins, sans-serif",d=n&&n.length>0?n:t.split(/\s+/),h=.72*o,u=.5*o,g=Math.min(.62*o/d.length,.3*o);/* @__PURE__ */
373
+ /* @__PURE__ */T(z,{style:qa.rungHeader,children:[/* @__PURE__ */W(S,{style:[qa.rungHeaderCaption,{color:b.textMuted}],children:"Get right"}),/* @__PURE__ */T(z,{style:qa.rungHeaderRight,children:[/* @__PURE__ */W(S,{style:[qa.rungHeaderCaption,qa.rungColPrize,{color:b.textMuted}],children:"Tier pays"}),/* @__PURE__ */W(S,{style:[qa.rungHeaderCaption,qa.rungColTotal,{color:b.textMuted}],children:"You collect"})]})]}),
374
+ /* @__PURE__ */W(z,{style:qa.rungList,children:q.map(e=>{const t=e.atLeast===N.legs;/* @__PURE__ */
375
+ return T(z,{style:qa.rungRow,children:[/* @__PURE__ */T(z,{style:qa.rungLeft,children:[/* @__PURE__ */T(z,{style:qa.rungLabelRow,children:[/* @__PURE__ */T(S,{style:[qa.rungLabel,{color:b.text}],children:[e.atLeast," of ",N.legs]}),t&&R?/* @__PURE__ */W(z,{style:[qa.fullStackChip,{backgroundColor:Il(C,.35)}],children:/* @__PURE__ */W(S,{style:[qa.fullStackChipText,{color:k}],children:"Full stack"})}):null]}),/* @__PURE__ */W(Ul,{legs:e.atLeast,prizeBall:t})]}),/* @__PURE__ */T(z,{style:qa.rungRight,children:[/* @__PURE__ */W(S,{style:[qa.rungPrize,qa.rungColPrice,{color:b.textMuted}],children:$t(e.prize)}),/* @__PURE__ */W(S,{style:[qa.rungCumulative,qa.rungColTotal,R&&qa.rungCumulativeWide,{color:b.primary,fontFamily:x}],children:$t(e.cumulative)})]})]},e.atLeast)})}),U?/* @__PURE__ */W(B,{onPress:()=>j(e=>!e),accessibilityRole:"button",accessibilityState:{expanded:E},style:[qa.tierToggle,{borderColor:b.border}],children:/* @__PURE__ */W(S,{style:[qa.tierToggleText,{color:b.primary}],children:E?"Show fewer tiers":`Show all ${V.length} tiers`})}):null,
376
+ /* @__PURE__ */T(S,{style:[qa.stackNote,{color:b.textMuted}],children:["Land below ",N.firstPayingTier," right and the ticket does not pay."]})]})]}),
377
+ /* @__PURE__ */T(z,{style:[qa.modeCards,R&&qa.modeCardsWide],children:[/* @__PURE__ */W(z,{style:R?qa.modeCardCell:void 0,children:/* @__PURE__ */W(ql,{tile:/* @__PURE__ */W(El,{iconUrl:Ze(s),size:60}),label:"Pick my own",stat:"Your calls",detail:[`A clean yes or no on all ${N.legs} outcomes`,`Win from ${N.firstPayingTier} right — every tier stacks`],onSelect:()=>{h(N.legs),u(N.legs),g(O),p(),t?.()}})}),/* @__PURE__ */W(z,{style:R?qa.modeCardCell:void 0,children:/* @__PURE__ */W(ql,{tile:/* @__PURE__ */W(El,{iconUrl:`${Ye}quickpick`,size:60}),label:"QuickPick for me",stat:"Fastest",detail:[`We fill all ${N.legs} legs at ${$t(O)}`,"Straight to the bet slip"],onSelect:()=>{u(N.legs),g(O),f(s,N.legs,O),e?.()}})})]})]})]})}var qa=k.create({container:{flex:1},inner:{flex:1,paddingHorizontal:16,width:"100%"},backRow:{paddingHorizontal:16},titleWrap:{marginBottom:8,paddingHorizontal:16},eyebrow:{fontSize:12,fontWeight:"700",textTransform:"uppercase",letterSpacing:2.16,marginBottom:16},pageTitle:{fontSize:12,fontWeight:"700",textTransform:"uppercase",letterSpacing:2.16,textAlign:"center",marginBottom:16},header:{alignItems:"center",marginBottom:24},headerWide:{marginBottom:28},tagline:{fontSize:14,lineHeight:23,textAlign:"center",maxWidth:384,marginTop:12},taglineWide:{fontSize:15,lineHeight:24},builder:{borderWidth:2,borderRadius:24,paddingHorizontal:16,paddingVertical:16},builderWide:{paddingHorizontal:20,paddingVertical:20},sectionLabelRow:{marginBottom:8,flexDirection:"row",alignItems:"baseline",justifyContent:"space-between"},sectionLabelText:{fontSize:10,fontWeight:"700",textTransform:"uppercase",letterSpacing:1},sectionLabelValue:{fontSize:12,fontWeight:"600",fontVariant:["tabular-nums"]},betRow:{flexDirection:"row",flexWrap:"wrap",gap:6},betChip:{flexGrow:1,flexBasis:52,minWidth:52,borderWidth:1,borderRadius:8,paddingHorizontal:4,paddingVertical:8,alignItems:"center",justifyContent:"center"},betChipText:{fontSize:14,fontWeight:"700"},betNote:{marginTop:8,fontSize:11,fontStyle:"italic"},laddersBlock:{marginTop:16},ladderGrid:{flexDirection:"row",flexWrap:"wrap",gap:8},ladderTile:{flexGrow:1,borderWidth:1,borderRadius:12,paddingHorizontal:8,paddingVertical:12,alignItems:"center",justifyContent:"center"},ladderTileLabel:{fontSize:10,fontWeight:"700",textTransform:"uppercase",letterSpacing:1},ladderTilePrize:{marginTop:4,fontSize:18,fontWeight:"800",letterSpacing:-.36,fontVariant:["tabular-nums"]},ladderTileNote:{marginTop:4,fontSize:10},stackTable:{marginTop:16,borderTopWidth:1,paddingTop:12},stackIntro:{marginBottom:8,fontSize:12,lineHeight:18},rungHeader:{flexDirection:"row",alignItems:"baseline",justifyContent:"space-between"},rungHeaderRight:{flexDirection:"row",gap:10},rungColPrice:{width:64,textAlign:"right"},rungColPrize:{width:64,textAlign:"right"},rungColTotal:{width:84,textAlign:"right"},rungHeaderCaption:{fontSize:10,fontWeight:"600",textTransform:"uppercase",letterSpacing:1},rungList:{marginTop:6,gap:6},rungRow:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",gap:12},rungLeft:{flex:1,minWidth:0,gap:3},rungLabelRow:{flexDirection:"row",alignItems:"center",gap:8,flexWrap:"wrap"},rungLabel:{fontSize:13},fullStackChip:{borderRadius:999,paddingHorizontal:8,paddingVertical:2},fullStackChipText:{fontSize:9,fontWeight:"700",textTransform:"uppercase",letterSpacing:.8},rungRight:{flexDirection:"row",alignItems:"baseline",gap:10,flexShrink:0},rungPrize:{fontSize:11,fontVariant:["tabular-nums"]},rungCumulative:{fontSize:14,fontWeight:"800",fontVariant:["tabular-nums"]},rungCumulativeWide:{fontSize:16},tierToggle:{marginTop:8,borderWidth:1,borderRadius:8,paddingVertical:8,alignItems:"center"},tierToggleText:{fontSize:11,fontWeight:"700"},stackNote:{marginTop:8,fontSize:11,fontStyle:"italic"},modeCards:{marginTop:16,gap:12},modeCardsWide:{marginTop:20,flexDirection:"row",flexWrap:"wrap",alignItems:"stretch"},modeCardCell:{flexBasis:"48%",flexGrow:1,minWidth:"45%"}});function Ka({depth:e,theme:t}){const n=t.colors,o=fe(t);/* @__PURE__ */
378
+ return W(z,{style:Ja.variantEdgeBar,children:Array.from({length:9}).map((t,i)=>{const r=Math.min(i,8-i)<e;/* @__PURE__ */
379
+ return W(z,{style:[Ja.variantEdgeSlot,r?{backgroundColor:i<4.5?n.primary:o}:{borderWidth:1,borderColor:n.border}]},i)})})}function Za({legs:e,right:t}){const{theme:n}=or(),o=n.colors.primary,i=fe(n);/* @__PURE__ */
380
+ return T(z,{style:{flexDirection:"row",alignItems:"center"},children:[Array.from({length:e}).map((e,n)=>/* @__PURE__ */W(z,{style:{width:5,height:5,borderRadius:1.5,marginRight:3,backgroundColor:t?o:"transparent",borderWidth:t?0:1,borderColor:t?void 0:Il(o,.45),opacity:t?.85:1}},n)),/* @__PURE__ */W(z,{style:{width:7,height:7,borderRadius:999,backgroundColor:i,marginLeft:2}})]})}function Xa({onBack:e,hideActions:t}={}){const{theme:n,selectedGame:o}=or(),i=Ge(n),r=n.colors;/* @__PURE__ */
381
+ return T(z,{style:Ja.header,children:[/* @__PURE__ */W(S,{style:[Ja.eyebrow,{color:r.primary,fontFamily:i}],children:"All right, or all wrong"}),/* @__PURE__ */W(pl,{onBack:e,hideActions:t,label:o?.game_name})]})}function Qa({onQuickPick:e,onPickYourOwn:t,onBack:n,hideTitle:o,config:i,backLabel:r="Games"}){const{theme:a,selectedGame:s,selectedPropositionCount:d,handlePropositionCountChange:h,setExpectedCorrect:u,setBetAmount:g,quickPickGame:f,goToSportSelection:p}=or(),y=a.colors,m=Ne(a),b=Ge(a),w=se(a),x=be(a),{width:k}=F(),v=k>=640,[A,R]=c(!1),L=l(()=>i??Li(s),[i,s]),[D,M]=c(()=>L?null!=d&&L.legOptions.includes(d)?d:L.defaultLegs:8),[P,H]=c(()=>L?.defaultStake??20);if(!s||!Ai(s)||!L)/* @__PURE__ */return W(z,{children:/* @__PURE__ */W(S,{style:{color:y.textMuted,fontFamily:m},children:"No mirror available."})});const O=L.variant,I=L.legOptions,E=I.includes(D)?D:I[0],j=function(e,t,n,o){const i=Mi(e),r=t*(1-(o?.operatorMargin??.21875)),l=Math.round(Math.pow(2,n)),a=[];let c=0;for(let s=0;s<i.depth;s++){const e=Pi(n,s),t=n-s===s?e:2*e;c+=t,a.push({distance:s,label:i.tierNames[s]??`Tier ${s+1}`,correctCounts:n-s===s?[s]:[n-s,s],prize:Math.round(r/i.depth*l/(2*e)*100)/100,outcomes:t})}return{variant:i.id,legs:n,stake:t,tiers:a,totalOutcomes:l,winningOutcomes:c,oddsOneIn:Math.round(l/c*1e4)/1e4}}(O.id,P,E,{operatorMargin:L.operatorMargin}),N=E-(O.depth-1),G=P>=L.minStake,Y=(e,t)=>/* @__PURE__ */T(z,{style:Ja.controlLabel,children:[/* @__PURE__ */W(S,{style:[Ja.controlLabelText,{color:y.textMuted}],children:e}),/* @__PURE__ */W(S,{style:[Ja.controlValueText,{color:w}],children:t})]});/* @__PURE__ */
382
+ return T(z,{style:Ja.container,children:[n?/* @__PURE__ */W(z,{style:Ja.backRow,children:/* @__PURE__ */W(fl,{onBack:n,label:r})}):null,/* @__PURE__ */T(ut,{style:Ja.inner,children:[
383
+ /* @__PURE__ */W(jl,{eyebrow:o?null:"All right, or all wrong",iconUrl:Ze(s),gameName:s.game_name,tagline:L.tagline}),
384
+ /* @__PURE__ */W(Zl,{}),
385
+ /* @__PURE__ */T(z,{style:Ja.variantBlock,children:[Y(O.name,O.waysToWin),
386
+ /* @__PURE__ */W(Ka,{depth:O.depth,theme:a}),
387
+ /* @__PURE__ */T(z,{style:Ja.variantEdgeLabels,children:[
388
+ /* @__PURE__ */W(S,{style:[Ja.variantEdgeText,{color:y.textMuted}],children:"All wrong"}),
389
+ /* @__PURE__ */W(S,{style:[Ja.variantEdgeText,{color:y.textMuted}],children:`${I[0]}–${I[I.length-1]} legs`}),
390
+ /* @__PURE__ */W(S,{style:[Ja.variantEdgeText,{color:y.textMuted}],children:"All right"})]})]}),
391
+ /* @__PURE__ */T(z,{style:[Ja.ticket,v&&Ja.ticketWide,{backgroundColor:x,borderColor:y.border,shadowColor:w,shadowOpacity:.14,shadowRadius:14,shadowOffset:{width:0,height:10},elevation:1}],children:[Y("Legs",`${E} legs`),
392
+ /* @__PURE__ */W(z,{style:Ja.chipRow,children:I.map(e=>{const t=e===E;/* @__PURE__ */
393
+ return W(B,{onPress:()=>M(e),accessibilityRole:"radio",accessibilityState:{selected:t},style:[Ja.legChip,{backgroundColor:t?y.primary:"transparent",borderColor:t?y.primary:y.border}],children:/* @__PURE__ */W(S,{style:[Ja.chipText,{color:t?y.primaryText:y.textMuted}],children:e})},e)})}),
394
+ /* @__PURE__ */T(z,{style:Ja.hintRow,children:[/* @__PURE__ */W(S,{style:[Ja.hintText,{color:y.textMuted}],children:"Easier to sweep"}),/* @__PURE__ */W(S,{style:[Ja.hintText,{color:y.textMuted}],children:"Bigger prize"})]}),
395
+ /* @__PURE__ */T(z,{style:Ja.stakeBlock,children:[Y("Stake",$t(P)),
396
+ /* @__PURE__ */T(z,{style:[Ja.inputWrap,{borderColor:A?y.borderFocus??y.primary:y.border,backgroundColor:y.backgroundAlt}],children:[/* @__PURE__ */W(S,{style:[Ja.inputPrefix,{color:y.textMuted}],children:"$"}),/* @__PURE__ */W(C,{keyboardType:"numeric",placeholder:"Enter stake",placeholderTextColor:y.textMuted,accessibilityLabel:"Stake amount",onFocus:()=>R(!0),onBlur:()=>R(!1),value:P?String(P):"",onChangeText:e=>{if(""===e)return void H(0);const t=Number(e);Number.isFinite(t)&&H((e=>{const t=Math.max(0,Math.round(100*e)/100);return null!==L.maxStake?Math.min(t,L.maxStake):t})(t))},style:[Ja.input,{color:y.textAlt??y.text,fontFamily:m}]})]}),
397
+ /* @__PURE__ */W(z,{style:Ja.quickStakeRow,children:L.quickStakes.map(e=>{const t=e===P;/* @__PURE__ */
398
+ return W(B,{onPress:()=>H(e),style:[Ja.stakeChip,{backgroundColor:t?y.primary:"transparent",borderColor:t?y.primary:y.border}],children:/* @__PURE__ */W(S,{style:[Ja.chipText,{color:t?y.primaryText:y.textMuted}],children:`$${e}`})},e)})}),!G&&P>0?/* @__PURE__ */W(S,{style:[Ja.errorText,{color:y.error}],children:`Minimum stake is ${$t(L.minStake)}.`}):null]}),
399
+ /* @__PURE__ */T(z,{style:[Ja.winSection,{borderTopColor:Il(w,.08)}],children:[
400
+ /* @__PURE__ */T(z,{style:Ja.winHeader,children:[/* @__PURE__ */W(S,{style:[Ja.winHeaderText,{color:y.textMuted}],children:"What it pays"}),/* @__PURE__ */W(S,{style:[Ja.winHeaderText,{color:y.textMuted}],children:O.waysToWin})]}),
401
+ /* @__PURE__ */W(z,{style:Ja.winRows,children:j.tiers.map(e=>/* @__PURE__ */T(z,{style:Ja.winRow,children:[/* @__PURE__ */T(z,{style:Ja.winRowLeft,children:[/* @__PURE__ */W(S,{style:[Ja.winRowLabel,{color:y.text}],children:`${e.correctCounts.join(" or ")} of ${E} right`}),/* @__PURE__ */W(Za,{legs:E,right:0===e.distance})]}),/* @__PURE__ */W(S,{style:[Ja.winRowPrize,v&&Ja.winRowPrizeWide,{color:y.primary,fontFamily:b}],children:$t(e.prize)})]},e.distance))}),
402
+ /* @__PURE__ */W(S,{style:[Ja.splitNote,{color:y.textMuted}],children:"Anything in between — a split card — does not pay."})]})]}),
403
+ /* @__PURE__ */T(z,{style:[Ja.cardList,v&&Ja.cardListWide],children:[/* @__PURE__ */W(z,{style:v?Ja.cardCell:void 0,children:/* @__PURE__ */W(ql,{tile:/* @__PURE__ */W(El,{iconUrl:Ze(s),size:60}),label:"Pick my own",stat:"Your calls",detail:["A clean yes or no on every leg","Aim for the sweep — either direction pays"],onSelect:()=>{G&&(h(E),u(N),g(P),p(),t?.())}})}),/* @__PURE__ */W(z,{style:v?Ja.cardCell:void 0,children:/* @__PURE__ */W(ql,{tile:/* @__PURE__ */W(El,{iconUrl:`${Ye}quickpick`,size:60}),label:"QuickPick for me",stat:"Fastest",detail:["We fill every leg for you","Straight to the bet slip"],onSelect:()=>{G&&(u(N),g(P),f(s,E,P),e?.())}})})]})]})]})}var Ja=k.create({container:{flex:1,width:"100%"},header:{marginBottom:8,paddingHorizontal:16},eyebrow:{fontSize:12,fontWeight:"700",textTransform:"uppercase",letterSpacing:2.16,marginBottom:16},backRow:{paddingHorizontal:16},inner:{flex:1,paddingHorizontal:16,width:"100%"},tagline:{marginTop:12,fontSize:14,lineHeight:23,textAlign:"center",maxWidth:384},taglineWide:{fontSize:15,lineHeight:24},ticket:{borderWidth:2,borderRadius:24,paddingHorizontal:16,paddingVertical:16},ticketWide:{paddingHorizontal:20,paddingVertical:20},variantBlock:{marginBottom:12},variantEdgeBar:{marginTop:8,flexDirection:"row",gap:3},variantEdgeSlot:{flex:1,height:14,borderRadius:4},variantEdgeLabels:{marginTop:4,flexDirection:"row",alignItems:"baseline",justifyContent:"space-between"},variantEdgeText:{fontSize:9,fontWeight:"700",textTransform:"uppercase",letterSpacing:1},controlLabel:{marginBottom:8,flexDirection:"row",alignItems:"baseline",justifyContent:"space-between"},controlLabelText:{fontSize:10,fontWeight:"700",textTransform:"uppercase",letterSpacing:1},controlValueText:{fontSize:12,fontWeight:"600",fontVariant:["tabular-nums"]},chipRow:{flexDirection:"row",flexWrap:"wrap",gap:6},legChip:{minWidth:40,flexGrow:1,flexBasis:40,borderWidth:1,borderRadius:8,paddingHorizontal:4,paddingVertical:8,alignItems:"center",justifyContent:"center"},chipText:{fontSize:14,fontWeight:"700"},hintRow:{marginTop:8,flexDirection:"row",alignItems:"baseline",justifyContent:"space-between"},hintText:{fontSize:11,fontStyle:"italic"},stakeBlock:{marginTop:16},inputWrap:{flexDirection:"row",alignItems:"center",borderWidth:1,borderRadius:8,paddingHorizontal:12},inputPrefix:{fontSize:16,fontWeight:"700",marginRight:4},input:{flex:1,paddingVertical:12,fontSize:18,fontWeight:"600",fontVariant:["tabular-nums"]},quickStakeRow:{marginTop:8,flexDirection:"row",flexWrap:"wrap",gap:6},stakeChip:{minWidth:48,flexGrow:1,flexBasis:48,borderWidth:1,borderRadius:8,paddingHorizontal:4,paddingVertical:8,alignItems:"center",justifyContent:"center"},errorText:{marginTop:8,fontSize:12},winSection:{marginTop:16,borderTopWidth:1,paddingTop:12},winHeader:{flexDirection:"row",alignItems:"baseline",justifyContent:"space-between"},winHeaderText:{fontSize:10,fontWeight:"600",textTransform:"uppercase",letterSpacing:1},winRows:{marginTop:6,gap:8},winRow:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",gap:12},winRowLeft:{flex:1,minWidth:0,gap:3},winRowLabel:{fontSize:13},winRowPrize:{fontSize:18,fontWeight:"800",fontVariant:["tabular-nums"]},winRowPrizeWide:{fontSize:20},splitNote:{marginTop:8,fontSize:11,fontStyle:"italic"},cardList:{marginTop:16,gap:12},cardListWide:{marginTop:20,flexDirection:"row",flexWrap:"wrap",alignItems:"stretch"},cardCell:{flexBasis:"48%",flexGrow:1,minWidth:"45%"}});function $a({onBack:e,hideActions:t}={}){const{theme:n,selectedGame:o}=or(),i=Ge(n),r=n.colors,{width:l}=F(),a=l<640;/* @__PURE__ */
404
+ return T(z,{style:[ec.header,a&&ec.headerCompact],children:[/* @__PURE__ */W(S,{style:[ec.sectionTitle,a&&ec.sectionTitleCompact,{color:r.primary,fontFamily:i}],children:"Choose your safety net"}),/* @__PURE__ */W(pl,{onBack:e,hideActions:t,label:o?.game_name})]})}function _a({onQuickPick:e,onPickYourOwn:t,onBack:n,hideTitle:o,config:i,backLabel:r="Games"}){const{theme:a,selectedGame:s,selectedPropositionCount:d,handlePropositionCountChange:h,setExpectedCorrect:u,setBetAmount:g,setSelectedRuleId:f,quickPickGame:p,goToSportSelection:y}=or(),m=a.colors,b=Ne(a),w=Ge(a),x=se(a),k=be(a),{width:v}=F(),A=v>=640,[R,L]=c(!1),D=l(()=>i??Lo(s),[i,s]),[M,P]=c(()=>D?.defaultModeId??"extra_shot"),[H,O]=c(()=>{const e=D?.modes.find(e=>e.id===(D?.defaultModeId??"extra_shot"));return e?null!=d&&e.legOptions.includes(d)?d:e.defaultLegs:8}),[I,E]=c(()=>D?.defaultStake??20);if(!s||!So(s)||!D)/* @__PURE__ */return W(z,{style:[ec.container,{backgroundColor:m.background}],children:/* @__PURE__ */W(S,{style:{color:m.textMuted,fontFamily:b},children:"No safety net available."})});const j=D.modes.find(e=>e.id===M)??D.modes[0],N=Fo(I,H,j.allowedMisses,D.pricing),G=e=>{const t=Math.max(0,Math.round(100*e)/100);return null!==D.maxStake?Math.min(t,D.maxStake):t},Y=I>=D.minStake,V=(e,t)=>/* @__PURE__ */T(z,{style:ec.controlLabelRow,children:[/* @__PURE__ */W(S,{style:[ec.controlLabelText,{color:m.textMuted}],children:e}),/* @__PURE__ */W(S,{style:[ec.controlValueText,{color:x}],children:t})]}),U=(e,t,n,o)=>/* @__PURE__ */W(B,{onPress:o,accessibilityRole:"radio",accessibilityState:{selected:n},activeOpacity:.8,style:[ec.chip,{backgroundColor:n?m.primary:"transparent",borderColor:n?m.primary:m.border}],children:/* @__PURE__ */W(S,{style:[ec.chipText,{color:n?m.primaryText:m.textMuted}],children:t})},e),q=[{label:"Perfect",amount:N.perfect},...N.nearMiss.map((e,t)=>({label:`All but ${t+1}`,amount:e}))];/* @__PURE__ */
405
+ return T(z,{style:[ec.container,{backgroundColor:m.background}],children:[n?/* @__PURE__ */W(z,{style:ec.backRow,children:/* @__PURE__ */W(fl,{onBack:n,label:r})}):null,/* @__PURE__ */T(ut,{style:ec.inner,children:[
406
+ /* @__PURE__ */W(jl,{eyebrow:o?null:"Choose your safety net",iconUrl:Ze(s),gameName:s.game_name,tagline:D.tagline}),
407
+ /* @__PURE__ */W(Zl,{}),
408
+ /* @__PURE__ */T(z,{style:[ec.ticket,A&&ec.ticketWide,{backgroundColor:k,borderColor:m.border,shadowColor:x,shadowOpacity:.14,shadowRadius:14,shadowOffset:{width:0,height:10},elevation:1}],children:[V("Safety net",j.label),
409
+ /* @__PURE__ */W(z,{style:ec.chipRow,children:D.modes.map(e=>U(e.id,e.label,e.id===j.id,()=>(e=>{const t=D.modes.find(t=>t.id===e);t&&(P(e),f(t.ruleId),t.legOptions.includes(H)||O(t.legOptions.reduce((e,t)=>Math.abs(t-H)<Math.abs(e-H)?t:e,t.legOptions[0])))})(e.id)))}),
410
+ /* @__PURE__ */W(S,{style:[ec.modeExplain,A&&ec.modeExplainWide,{color:m.textMuted}],children:j.explain}),
411
+ /* @__PURE__ */T(z,{style:ec.legsBlock,children:[V("Legs",`${H} legs`),
412
+ /* @__PURE__ */W(z,{style:ec.chipRow,children:j.legOptions.map(e=>U(e,String(e),e===H,()=>O(e)))}),
413
+ /* @__PURE__ */T(z,{style:ec.hintRow,children:[/* @__PURE__ */W(S,{style:[ec.hintText,{color:m.textMuted}],children:"Easier to land"}),/* @__PURE__ */W(S,{style:[ec.hintText,{color:m.textMuted}],children:"Bigger prizes"})]})]}),
414
+ /* @__PURE__ */T(z,{style:ec.stakeBlock,children:[V("Stake",$t(I)),
415
+ /* @__PURE__ */T(z,{style:[ec.inputWrap,{borderColor:R?m.borderFocus??m.primary:m.border,backgroundColor:m.backgroundAlt}],children:[/* @__PURE__ */W(S,{style:[ec.inputPrefix,{color:m.textMuted}],children:"$"}),/* @__PURE__ */W(C,{keyboardType:"decimal-pad",placeholder:"Enter stake",placeholderTextColor:m.textMuted,accessibilityLabel:"Stake amount",onFocus:()=>L(!0),onBlur:()=>L(!1),value:I?String(I):"",onChangeText:e=>{if(""===e)return void E(0);const t=Number(e);Number.isFinite(t)&&E(G(t))},style:[ec.input,{color:m.textAlt??m.text,fontFamily:b}]})]}),
416
+ /* @__PURE__ */W(z,{style:ec.chipRow,children:D.quickAdds.map(e=>/* @__PURE__ */W(B,{onPress:()=>E(G((I||0)+e)),activeOpacity:.8,style:[ec.stakeChip,{backgroundColor:"transparent",borderColor:m.border}],children:/* @__PURE__ */T(S,{style:[ec.chipText,{color:m.textMuted}],children:["+$",e]})},e))}),!Y&&I>0?/* @__PURE__ */T(S,{style:[ec.errorText,{color:m.error}],children:["Minimum stake is ",$t(D.minStake),"."]}):null]}),
417
+ /* @__PURE__ */T(z,{style:[ec.prizeBlock,{borderTopColor:Il(x,.08)}],children:[
418
+ /* @__PURE__ */T(z,{style:ec.prizeCaptionRow,children:[/* @__PURE__ */W(S,{style:[ec.prizeCaption,{color:m.textMuted}],children:"What you can win"}),/* @__PURE__ */T(S,{style:[ec.prizeCaption,{color:m.textMuted}],children:[$t(I)," returns"]})]}),
419
+ /* @__PURE__ */T(z,{style:ec.prizeRows,children:[q.map(e=>/* @__PURE__ */T(z,{style:ec.prizeRow,children:[/* @__PURE__ */W(S,{style:[ec.prizeRowLabel,A&&ec.prizeRowLabelWide,{color:m.text}],children:e.label}),/* @__PURE__ */W(S,{style:[ec.prizeRowAmount,A&&ec.prizeRowAmountWide,{color:m.primary,fontFamily:w}],children:$t(Math.round(e.amount))})]},e.label)),/* @__PURE__ */T(z,{style:[ec.sweepRow,{backgroundColor:m.primary}],children:[/* @__PURE__ */T(z,{style:ec.sweepLeft,children:[/* @__PURE__ */W(S,{style:[ec.sweepLabel,A&&ec.sweepLabelWide,{color:m.primaryText,fontFamily:w}],children:"Clean sweep"}),/* @__PURE__ */W(S,{style:[ec.sweepSub,{color:m.primaryText}],children:"every leg right — all prizes"})]}),/* @__PURE__ */W(S,{style:[ec.sweepAmount,A&&ec.sweepAmountWide,{color:m.primaryText,fontFamily:w}],children:$t(Math.round(N.sweep))})]})]}),
420
+ /* @__PURE__ */W(S,{style:[ec.stakeNote,{color:m.textMuted}],children:"Total returns, stake included."}),
421
+ /* @__PURE__ */T(S,{style:[ec.missNote,{color:m.textMuted}],children:["Miss ",1===j.allowedMisses?"two":"three"," or more and the ticket does not pay."]})]})]}),
422
+ /* @__PURE__ */T(z,{style:[ec.modeCards,A&&ec.modeCardsWide],children:[/* @__PURE__ */W(z,{style:A?ec.modeCardCell:void 0,children:/* @__PURE__ */W(ql,{tile:/* @__PURE__ */W(El,{iconUrl:Ze(s),size:60}),label:"Pick my own",stat:"Your calls",detail:["A clean yes or no on every leg","You read the games, you make the calls"],onSelect:()=>{Y&&(f(j.ruleId),h(H),u(H-j.allowedMisses),g(I),y(),t?.())}})}),/* @__PURE__ */W(z,{style:A?ec.modeCardCell:void 0,children:/* @__PURE__ */W(ql,{tile:/* @__PURE__ */W(El,{iconUrl:`${Ye}quickpick`,size:60}),label:"QuickPick for me",stat:"Fastest",detail:["We fill every leg for you","Straight to the bet slip"],onSelect:()=>{Y&&(f(j.ruleId),u(H-j.allowedMisses),g(I),p(s,H,I),e?.())}})})]})]})]})}var ec=k.create({container:{flex:1},backRow:{paddingHorizontal:16},inner:{flex:1,paddingHorizontal:16,width:"100%"},header:{marginBottom:8,paddingHorizontal:16},headerCompact:{paddingHorizontal:12},sectionTitle:{fontSize:12,fontWeight:"700",textTransform:"uppercase",letterSpacing:2.16,marginBottom:16},sectionTitleCompact:{fontSize:10,letterSpacing:1.4,marginBottom:12},tagline:{fontSize:14,lineHeight:23,textAlign:"center",maxWidth:384,marginTop:12},taglineWide:{fontSize:15,lineHeight:24},ticket:{borderWidth:2,borderRadius:24,paddingHorizontal:16,paddingVertical:16},ticketWide:{paddingHorizontal:20,paddingVertical:20},controlLabelRow:{flexDirection:"row",alignItems:"baseline",justifyContent:"space-between",marginBottom:8},controlLabelText:{fontSize:10,fontWeight:"700",textTransform:"uppercase",letterSpacing:1},controlValueText:{fontSize:12,fontWeight:"600",fontVariant:["tabular-nums"]},chipRow:{flexDirection:"row",flexWrap:"wrap",gap:6},chip:{flexGrow:1,minWidth:40,borderWidth:1,borderRadius:8,paddingHorizontal:4,paddingVertical:8,alignItems:"center",justifyContent:"center"},stakeChip:{flexGrow:1,minWidth:48,borderWidth:1,borderRadius:8,paddingHorizontal:4,paddingVertical:8,alignItems:"center",justifyContent:"center"},chipText:{fontSize:14,fontWeight:"700"},modeExplain:{fontSize:12,lineHeight:17,marginTop:8},modeExplainWide:{fontSize:13,lineHeight:18},legsBlock:{marginTop:16},hintRow:{flexDirection:"row",alignItems:"baseline",justifyContent:"space-between",marginTop:8},hintText:{fontSize:11,fontStyle:"italic"},stakeBlock:{marginTop:16},inputWrap:{flexDirection:"row",alignItems:"center",borderWidth:1,borderRadius:8,paddingHorizontal:12,marginBottom:8},inputPrefix:{fontSize:16,fontWeight:"700",marginRight:4},input:{flex:1,paddingVertical:12,fontSize:18,fontWeight:"600",fontVariant:["tabular-nums"]},errorText:{fontSize:12,marginTop:8},prizeBlock:{marginTop:16,paddingTop:12,borderTopWidth:1},prizeCaptionRow:{flexDirection:"row",alignItems:"baseline",justifyContent:"space-between"},prizeCaption:{fontSize:10,fontWeight:"600",textTransform:"uppercase",letterSpacing:1},prizeRows:{marginTop:6,gap:6},prizeRow:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",gap:12},prizeRowLabel:{fontSize:12},prizeRowLabelWide:{fontSize:13},prizeRowAmount:{fontSize:14,fontWeight:"800",fontVariant:["tabular-nums"]},prizeRowAmountWide:{fontSize:16},sweepRow:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",gap:12,borderRadius:12,paddingHorizontal:12,paddingVertical:10,marginTop:4},sweepLeft:{flex:1,minWidth:0,gap:2},sweepLabel:{fontSize:14,fontWeight:"800"},sweepLabelWide:{fontSize:15},sweepSub:{fontSize:10,fontWeight:"600",textTransform:"uppercase",letterSpacing:.6,opacity:.75},sweepAmount:{fontSize:20,fontWeight:"800",fontVariant:["tabular-nums"]},sweepAmountWide:{fontSize:24},stakeNote:{fontSize:11,marginTop:6},missNote:{fontSize:11,fontStyle:"italic",marginTop:4},modeCards:{marginTop:16,gap:12},modeCardsWide:{marginTop:20,flexDirection:"row",flexWrap:"wrap",alignItems:"stretch"},modeCardCell:{flexBasis:"48%",flexGrow:1,minWidth:"45%"}});function tc({onBack:e,hideActions:t}={}){const{theme:n,selectedGame:o}=or(),i=Ge(n),r=n.colors,{width:l}=F(),a=l<640;/* @__PURE__ */
423
+ return T(z,{style:[oc.header,a&&oc.headerCompact],children:[/* @__PURE__ */W(S,{style:[oc.sectionTitle,a&&oc.sectionTitleCompact,{color:r.primary,fontFamily:i}],children:"Set your play"}),/* @__PURE__ */W(pl,{onBack:e,hideActions:t,label:o?.game_name})]})}function nc({onQuickPick:e,onPickYourOwn:t,onBack:n,hideTitle:o,config:i,backLabel:r="Games"}){const{theme:a,selectedGame:s,handlePropositionCountChange:d,setExpectedCorrect:h,setBetAmount:u,setSelectedRuleId:g,quickPickGame:f,goToSportSelection:p}=or(),y=a.colors,m=Ne(a),b=Ge(a),w=se(a),x=be(a),k=pe(y.primary,fe(a),y.primaryText),{width:C}=F(),v=C>=640,A=l(()=>i??Ki(s),[i,s]),[R,L]=c(()=>A?.defaultUnit??10),[D,M]=c(Gi);if(!s||!Ni(s)||!A)/* @__PURE__ */return W(z,{style:[oc.container,{backgroundColor:y.background}],children:/* @__PURE__ */W(S,{style:{color:y.textMuted,fontFamily:m},children:"No card available."})});const P=Yi(R,D,A),H=1*R,O=R>A.unitMin,I=R<A.unitMax,E=e=>L(t=>Math.min(A.unitMax,Math.max(A.unitMin,t+e*A.unitStep))),j=()=>{g(P.ruleId),h(P.lowestWinningCount),u(P.stake)},N=(e,t)=>/* @__PURE__ */T(z,{style:oc.controlLabelRow,children:[/* @__PURE__ */W(S,{style:[oc.controlLabelText,{color:y.textMuted}],children:e}),/* @__PURE__ */W(S,{style:[oc.controlValueText,{color:w}],children:t})]}),G=(e,t,n,o)=>/* @__PURE__ */W(B,{onPress:n,disabled:!t,accessibilityRole:"button",accessibilityLabel:o,activeOpacity:.8,style:[oc.stepButton,{backgroundColor:y.primary,opacity:t?1:.35}],children:/* @__PURE__ */W(S,{style:[oc.stepButtonText,{color:y.primaryText}],children:e})}),Y={golden_point:`Go for the decider. Double your win to ${$t(R*A.baseMultiple*A.goldenPointFactor)}.`,captains_challenge:`Collect ${$t(R*A.challengeMultiple)} whenever you land ${A.legs-A.challengeMisses} or ${A.legs} of ${A.legs}. Stacks on a winning slip.`};/* @__PURE__ */
424
+ return T(z,{style:[oc.container,{backgroundColor:y.background}],children:[n?/* @__PURE__ */W(z,{style:oc.backRow,children:/* @__PURE__ */W(fl,{onBack:n,label:r})}):null,/* @__PURE__ */T(ut,{style:oc.inner,children:[
425
+ /* @__PURE__ */W(jl,{eyebrow:o?null:"Set your play",iconUrl:Ze(s),gameName:s.game_name,tagline:A.tagline}),
426
+ /* @__PURE__ */W(Zl,{}),
427
+ /* @__PURE__ */T(z,{style:[oc.ticket,v&&oc.ticketWide,{backgroundColor:x,borderColor:y.border,shadowColor:w,shadowOpacity:.14,shadowRadius:14,shadowOffset:{width:0,height:10},elevation:1}],children:[
428
+ /* @__PURE__ */T(z,{style:[oc.playCard,{backgroundColor:y.primary}],children:[/* @__PURE__ */T(z,{style:oc.playCardSide,children:[/* @__PURE__ */W(S,{style:[oc.playCardKey,{color:y.primaryText}],children:"Total stake"}),/* @__PURE__ */W(S,{style:[oc.playCardStake,{color:y.primaryText,fontFamily:b}],children:$t(P.stake)})]}),/* @__PURE__ */T(z,{style:[oc.playCardSide,oc.playCardRight],children:[/* @__PURE__ */W(S,{style:[oc.playCardKey,{color:y.primaryText}],children:"To win"}),/* @__PURE__ */T(z,{style:oc.playCardWinRow,children:[/* @__PURE__ */W(S,{style:[oc.playCardWin,{color:k,fontFamily:b}],children:$t(P.base)}),P.challenge>0?/* @__PURE__ */T(S,{style:[oc.playCardChip,{backgroundColor:k,color:w}],children:["+",$t(P.challenge)]}):null]})]})]}),
429
+ /* @__PURE__ */T(z,{style:oc.stakeBlock,children:[N("Your stake",`steps of ${$t(A.unitStep)}`),/* @__PURE__ */T(z,{style:oc.stepRow,children:[G("−",O,()=>E(-1),"Lower stake"),
430
+ /* @__PURE__ */T(z,{style:oc.stepMid,children:[/* @__PURE__ */W(S,{style:[oc.stepValue,{color:w,fontFamily:b}],children:$t(R)}),/* @__PURE__ */W(S,{style:[oc.stepCaption,{color:y.textMuted}],children:"per play"})]}),G("+",I,()=>E(1),"Raise stake")]})]}),
431
+ /* @__PURE__ */W(S,{style:[oc.playNote,{color:y.primary}],children:P.challenge>0?`Captain's Challenge pays ${$t(P.challenge)} on ${A.legs-A.challengeMisses} or ${A.legs} of ${A.legs}.`:""}),
432
+ /* @__PURE__ */T(z,{style:oc.boostBlock,children:[N("Boost your card",`${$t(H)} each`),/* @__PURE__ */W(z,{style:oc.boostRows,children:A.boosts.map(e=>{const t=D[e.id];/* @__PURE__ */
433
+ return T(B,{onPress:()=>{return t=e.id,M(e=>({...e,[t]:!e[t]}));var t},accessibilityRole:"switch",accessibilityState:{checked:t},activeOpacity:.85,style:[oc.boostRow,{backgroundColor:t?Il(y.primary,.08):"transparent",borderColor:t?y.primary:y.border}],children:[/* @__PURE__ */T(z,{style:oc.boostBody,children:[/* @__PURE__ */T(z,{style:oc.boostTitleRow,children:[/* @__PURE__ */W(S,{style:[oc.boostLabel,v&&oc.boostLabelWide,{color:w,fontFamily:b}],children:e.label}),/* @__PURE__ */W(z,{style:[oc.boostAmt,{backgroundColor:Il(y.primary,.12)}],children:/* @__PURE__ */T(S,{style:[oc.boostAmtText,{color:y.primary}],children:["+",$t(H*e.costUnits)]})})]}),/* @__PURE__ */W(S,{style:[oc.boostSub,v&&oc.boostSubWide,{color:y.textMuted}],children:Y[e.id]})]}),/* @__PURE__ */W(z,{style:[oc.toggle,{backgroundColor:t?y.primary:y.border}],children:/* @__PURE__ */W(z,{style:[oc.toggleKnob,{backgroundColor:y.background,transform:[{translateX:t?20:0}]}]})})]},e.id)})})]})]}),
434
+ /* @__PURE__ */T(z,{style:[oc.modeCards,v&&oc.modeCardsWide],children:[/* @__PURE__ */W(z,{style:v?oc.modeCardCell:void 0,children:/* @__PURE__ */W(ql,{tile:/* @__PURE__ */W(El,{iconUrl:Ze(s),size:60}),label:`Pick my ${A.legs}`,stat:"Your calls",detail:["A clean yes or no on every call","You read the games, you make the calls"],onSelect:()=>{j(),d(A.legs),p(),t?.()}})}),/* @__PURE__ */W(z,{style:v?oc.modeCardCell:void 0,children:/* @__PURE__ */W(ql,{tile:/* @__PURE__ */W(El,{iconUrl:`${Ye}quickpick`,size:60}),label:"QuickPick for me",stat:"Fastest",detail:[`We fill all ${A.legs} calls for you`,"Straight to the bet slip"],onSelect:()=>{j(),f(s,A.legs,P.stake),e?.()}})})]})]})]})}var oc=k.create({container:{flex:1},backRow:{paddingHorizontal:16},inner:{flex:1,paddingHorizontal:16,width:"100%"},header:{marginBottom:8,paddingHorizontal:16},headerCompact:{paddingHorizontal:12},sectionTitle:{fontSize:12,fontWeight:"700",textTransform:"uppercase",letterSpacing:2.16,marginBottom:16},sectionTitleCompact:{fontSize:10,letterSpacing:1.4,marginBottom:12},ticket:{borderWidth:2,borderRadius:24,paddingHorizontal:16,paddingVertical:16},ticketWide:{paddingHorizontal:20,paddingVertical:20},playCard:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",gap:12,borderRadius:16,paddingHorizontal:16,paddingVertical:14},playCardSide:{minWidth:0,flexShrink:1},playCardRight:{alignItems:"flex-end"},playCardKey:{fontSize:11,fontWeight:"600",opacity:.72},playCardStake:{fontSize:24,fontWeight:"800"},playCardWinRow:{flexDirection:"row",alignItems:"baseline",gap:6},playCardWin:{fontSize:26,fontWeight:"800",lineHeight:28},playCardChip:{fontSize:11,fontWeight:"800",borderRadius:6,paddingHorizontal:6,paddingVertical:2,overflow:"hidden"},stakeBlock:{marginTop:12},playNote:{marginTop:8,minHeight:16,fontSize:11,fontWeight:"700",textAlign:"center"},controlLabelRow:{flexDirection:"row",alignItems:"baseline",justifyContent:"space-between",marginBottom:8},controlLabelText:{fontSize:10,fontWeight:"700",textTransform:"uppercase",letterSpacing:1},controlValueText:{fontSize:12,fontWeight:"600",fontVariant:["tabular-nums"]},stepRow:{flexDirection:"row",alignItems:"center",gap:12},stepButton:{width:44,height:44,borderRadius:12,alignItems:"center",justifyContent:"center"},stepButtonText:{fontSize:24,fontWeight:"800",lineHeight:26},stepMid:{flex:1,alignItems:"center"},stepValue:{fontSize:24,fontWeight:"800",fontVariant:["tabular-nums"]},stepCaption:{fontSize:10,fontWeight:"700",textTransform:"uppercase",letterSpacing:.8},boostBlock:{marginTop:16},boostRows:{gap:8},boostRow:{flexDirection:"row",alignItems:"center",gap:12,borderWidth:1,borderRadius:16,paddingHorizontal:12,paddingVertical:12},boostBody:{flex:1,minWidth:0},boostTitleRow:{flexDirection:"row",alignItems:"center",gap:8},boostLabel:{fontSize:14,fontWeight:"800"},boostLabelWide:{fontSize:15},boostAmt:{borderRadius:6,paddingHorizontal:6,paddingVertical:2},boostAmtText:{fontSize:10,fontWeight:"800",fontVariant:["tabular-nums"]},boostSub:{fontSize:11,lineHeight:15,marginTop:4},boostSubWide:{fontSize:12,lineHeight:16},toggle:{width:48,height:28,borderRadius:999,justifyContent:"center",paddingHorizontal:3},toggleKnob:{width:22,height:22,borderRadius:11},modeCards:{marginTop:16,gap:12},modeCardsWide:{marginTop:20,flexDirection:"row",flexWrap:"wrap",alignItems:"stretch"},modeCardCell:{flexBasis:"48%",flexGrow:1,minWidth:"45%"}});function ic({onBack:e,hideActions:t}={}){const{theme:n,selectedGame:o}=or(),i=Ge(n),r=n.colors;/* @__PURE__ */
435
+ return T(z,{style:lc.header,children:[/* @__PURE__ */W(S,{style:[lc.eyebrow,{color:r.primary,fontFamily:i}],children:"All or nothing"}),/* @__PURE__ */W(pl,{onBack:e,hideActions:t,label:o?.game_name})]})}function rc({onQuickPick:e,onPickYourOwn:t,onBack:n,hideTitle:o,backLabel:i="Games"}){const{theme:r,selectedGame:a,selectedPropositionCount:s,handlePropositionCountChange:d,setExpectedCorrect:h,quickPickGame:u,goToSportSelection:g}=or(),f=r.colors,p=Ne(r),{width:y}=F(),m=y>=640,b=l(()=>{if(!a)return[];if(a.allowed_propositions&&a.allowed_propositions.length>0)return[...a.allowed_propositions].sort((e,t)=>e-t);const{min:e,max:t}=dn(a);return Ln(e,t)},[a]),w=Qi(a),x=b[0]??0,k=b[b.length-1]??0,[C]=c(()=>null!=s&&b.includes(s)?s:k),B=l(()=>Ho(a,C||void 0),[a,C]);if(!a||0===b.length||"exact"!==B?.kind)/* @__PURE__ */return W(z,{children:/* @__PURE__ */W(S,{style:{color:f.textMuted,fontFamily:p},children:"No setup available."})});const v=w?["Any yes/no props in the pool",`Pick ${x}–${k} legs — all must land`]:["A clean yes or no on every leg",`All ${C} have to land`],A=w?[`We fill ${C} legs across any markets`,"Straight to the bet slip"]:[`We fill all ${C} legs for you`,"Straight to the bet slip"];/* @__PURE__ */
436
+ return T(z,{style:lc.container,children:[n?/* @__PURE__ */W(z,{style:lc.backRow,children:/* @__PURE__ */W(fl,{onBack:n,label:i})}):null,/* @__PURE__ */T(ut,{style:lc.inner,children:[
437
+ /* @__PURE__ */W(jl,{eyebrow:o?null:B.title,iconUrl:Ze(a),gameName:a.game_name,tagline:B.heroTagline}),
438
+ /* @__PURE__ */W(Zl,{}),
439
+ /* @__PURE__ */T(z,{style:[lc.cardList,m&&lc.cardListWide],children:[/* @__PURE__ */W(z,{style:m?lc.cardCell:void 0,children:/* @__PURE__ */W(ql,{tile:/* @__PURE__ */W(El,{iconUrl:Ze(a),size:60}),label:"Pick my own",stat:"Your calls",detail:v,onSelect:()=>{w||(d(C),h(C)),g(),t?.()}})}),/* @__PURE__ */W(z,{style:m?lc.cardCell:void 0,children:/* @__PURE__ */W(ql,{tile:/* @__PURE__ */W(El,{iconUrl:`${Ye}quickpick`,size:60}),label:"QuickPick for me",stat:"Fastest",detail:A,onSelect:()=>{h(C),u(a,C),e?.()}})})]})]})]})}var lc=k.create({container:{flex:1,width:"100%"},header:{marginBottom:8,paddingHorizontal:16},eyebrow:{fontSize:12,fontWeight:"700",textTransform:"uppercase",letterSpacing:2.16,marginBottom:16},backRow:{paddingHorizontal:16},inner:{flex:1,paddingHorizontal:16,width:"100%"},tagline:{fontSize:14,lineHeight:23,textAlign:"center",maxWidth:384,marginTop:12},taglineWide:{fontSize:15,lineHeight:24},cardList:{gap:12},cardListWide:{flexDirection:"row",flexWrap:"wrap",alignItems:"stretch"},cardCell:{flexBasis:"48%",flexGrow:1,minWidth:"45%"}});function ac({onPickYourOwn:e,onQuickPick:t,onBack:n,hideTitle:o,backLabel:i="Games"}){const{theme:r,selectedGame:l,goToSportSelection:a,bodyFont:c}=or(),s={onPickYourOwn:e,onQuickPick:t,onBack:n,hideTitle:o,backLabel:i};switch(Zi(l)){case"game_set":/* @__PURE__ */return W(Ea,{...s});case"pick_your_dividend":/* @__PURE__ */return W(Ga,{...s});case"ladder":/* @__PURE__ */return W(Ua,{...s});case"mirror":/* @__PURE__ */return W(Qa,{...s});case"safety_net":/* @__PURE__ */return W(_a,{...s});case"six_again":/* @__PURE__ */return W(nc,{...s});case"rule_setup":return"exact"===Ho(l)?.kind?/* @__PURE__ */W(rc,{...s}):/* @__PURE__ */W(Ha,{onBack:n,hideTitle:o,backLabel:i,onContinue:()=>{a(),e?.()}});default:/* @__PURE__ */return W(z,{children:/* @__PURE__ */W(S,{style:{color:r.colors.textMuted,fontFamily:c},children:"No setup required — this game goes straight to picks."})})}}function cc({iconUrl:e,gameName:t,nameLines:n,height:o=56,showTrademark:i=!0}){const{theme:r}=or(),l=se(r),a=fe(r),c=r.colors.primaryHover??function(e){const t=/^#([0-9a-f]{6})$/i.exec((e??"").trim());if(!t)return e;const n=parseInt(t[1],16);return`rgba(${n>>16&255}, ${n>>8&255}, ${255&n}, 0.7)`}(l),s=Ge(r)??"Manrope, Poppins, sans-serif",d=n&&n.length>0?n:t.split(/\s+/),h=.72*o,u=.5*o,g=Math.min(.62*o/d.length,.3*o);/* @__PURE__ */
433
440
  return T(z,{accessible:!0,accessibilityRole:"image",accessibilityLabel:`YESNO ${t}`,style:{flexDirection:"row",alignItems:"center",gap:.22*o},children:[
434
441
  /* @__PURE__ */W(On,{iconUrl:e,width:h,height:h,iconColor:l,accentColor:a}),
435
442
  /* @__PURE__ */T(S,{style:{fontFamily:s,fontSize:u,letterSpacing:.045*-u,lineHeight:u,color:l,includeFontPadding:!1},children:[/* @__PURE__ */W(S,{style:{fontWeight:"800"},children:"YES"}),/* @__PURE__ */W(S,{style:{fontWeight:"600"},children:"NO"})]}),
436
443
  /* @__PURE__ */W(z,{style:{width:Math.max(2,Math.round(.045*o)),height:.78*o,backgroundColor:c}}),
437
- /* @__PURE__ */W(z,{style:{flexDirection:"column"},children:d.map((e,t)=>/* @__PURE__ */T(z,{style:{flexDirection:"row",alignItems:"flex-start"},children:[/* @__PURE__ */W(S,{style:{fontFamily:s,fontSize:g,fontWeight:"500",letterSpacing:.012*-g,lineHeight:1.14*g,color:l,includeFontPadding:!1},children:e}),i&&t===d.length-1?/* @__PURE__ */W(S,{style:{fontFamily:s,fontSize:.36*g,fontWeight:"500",color:l,marginLeft:1},children:"™"}):null]},`${e}-${t}`))})]})}export{ei as BladeApiClient,tc as BrandLockup,Mi as CHALLENGE_MISSES,Di as CHALLENGE_MULTIPLE,Bt as CategoryIcon,ml as CategoryPickerPage,yl as CategoryPickerPageActions,pl as CategoryPickerPageTitle,zt as ChevronRightIcon,ia as ConfirmPage,oa as ConfirmPageActions,na as ConfirmPageTitle,wo as DOUBLE_SHOT_MIN_LEGS,bo as EXTRA_SHOT_MIN_LEGS,ua as EntriesPage,ha as EntriesPageTitle,Zr as EntrySubmission,ll as EventFilterBanner,kl as EventPickerPage,br as EventSwipeModal,Dt as FilterChipCarousel,Mt as FilterChipRow,uo as GAME_TIER_LEVEL,go as GAME_TIER_TABS,Pi as GOLDEN_POINT_FACTOR,ol as GameEntries,Fl as GameLogo,gl as GamePage,ul as GamePageActions,hl as GamePageTitle,$o as GameSelector,Da as GameSetBetPage,La as GameSetBetPageTitle,ec as GameSetupPage,St as HowToPlayButton,yt as HowToPlayPanel,bi as LADDER_FAMILY,yi as LADDER_REFERENCE_BET,mi as LADDER_STAKES,Ea as LadderPage,Ia as LadderPageTitle,Ft as LockIcon,zi as MIRROR_STANDARD_MARGIN,Ya as MirrorPage,Ga as MirrorPageTitle,Oi as NO_BOOSTS,Eo as PYD_LEG_RUNGS,Io as PYD_RETAIL_DIVIDENDS,$r as PayoutCircles,$a as PerfectPickPage,Ja as PerfectPickPageTitle,Ha as PickYourDividendPage,Pa as PickYourDividendPageTitle,_i as PlaceEntryProvider,er as QuickPickButton,Aa as RuleSetupPage,Ta as RuleSetupPageActions,Wa as RuleSetupPageTitle,xr as SELECTION_VARIANTS,Li as SIX_AGAIN_LEGS,Ri as SIX_AGAIN_MARGIN,qa as SafetyNetPage,Ua as SafetyNetPageTitle,Rt as ScrollShelf,qr as SelectionReview,Wr as SelectionVariantList,Jl as SelectionsPage,Zl as SelectionsPageActions,ql as SelectionsPageTitle,Xa as SixAgainPage,Za as SixAgainPageTitle,ya as SportPickerPage,pa as SportPickerPageActions,fa as SportPickerPageTitle,Al as SportRail,At as StarIcon,sa as SuccessPage,ca as SuccessPageActions,aa as SuccessPageTitle,fr as SwipeCard,pr as SwipeCardFace,yr as SwipeDeck,nr as VISIBLE_DEPTH,Wt as YesNoCategoryLabel,yo as availableGameTierTabs,Tn as contrastTextColour,Fe as darkTheme,mo as defaultGameTierId,Be as defaultTheme,Le as defaultThemeSet,po as filterGamesByTierLevel,so as filterPropositionsToEvent,$t as formatCurrency,_t as formatDate,eo as formatSameGameMultiEventLabel,Si as fullStackPrize,Oo as gameNeedsRuleSetup,fi as gameSetPrize,qi as getConfirmBoostCopy,Yi as getGameFlow,pi as getGameSetBetConfig,hn as getJackpotInfo,Bi as getLadderConfig,Ai as getMirrorConfig,Vo as getPickYourDividendConfig,oo as getPropositionEventId,Ho as getRuleSetupConfig,Lo as getSafetyNetConfig,Co as getSafetyNetPricing,Gi as getSixAgainConfig,gn as getSportDisplayName,He as getTheme,Oe as getThemeSet,Te as goldLightTheme,ve as goldTheme,Me as goldThemeSet,We as greenLightTheme,ze as greenTheme,De as greenThemeSet,en as groupPropositionsBySport,io as groupSameGameMultiEvents,Fr as groupSelectionDays,Vi as isFixedCardExactGame,gi as isGameSetBetGame,wi as isLadderGame,Wi as isMirrorGame,Ui as isOpenExactMultiGame,jo as isPickYourDividendGame,So as isSafetyNetGame,no as isSameGameMultiGame,co as isSelectableSameGameMultiProposition,Hi as isSixAgainGame,Ce as isThemeSet,sn as isValidSelectionCount,Ci as ladderCollectAt,ki as ladderTiers,Ti as mirrorPrize,ho as propositionsBelongToEvent,Yo as pydLadder,Go as pydRung,pn as resolveCategoryDisplayName,fo as resolveGameTierLevel,Xt as resolvePrice,fn as resolveSportDisplayName,Se as resolveTheme,Bo as roundDividendAmount,vo as safetyNetCollect,Fo as safetyNetTicket,Ei as sixAgainRuleId,ji as sixAgainStakeMultiples,Ii as sixAgainTicket,fe as themeAccent,Ne as themeBodyFont,se as themeHeading,Ge as themeHeadingFont,de as themeLabel,Ee as themeSets,ye as themeTextAlt,me as themeTextAltMuted,he as themeValue,Ie as themes,si as useCalculatePayout,li as useCreateGameEntry,di as useEntryPreview,ci as useEvaluateRule,ii as useGameEntries,ri as useGameMaxPayouts,ti as useGames,$i as usePlaceEntry,ai as usePlaceEntryFlow,ni as usePropositions,je as useResolvedTheme,oi as useSports,ir as useSwipeDeck};
444
+ /* @__PURE__ */W(z,{style:{flexDirection:"column"},children:d.map((e,t)=>/* @__PURE__ */T(z,{style:{flexDirection:"row",alignItems:"flex-start"},children:[/* @__PURE__ */W(S,{style:{fontFamily:s,fontSize:g,fontWeight:"500",letterSpacing:.012*-g,lineHeight:1.14*g,color:l,includeFontPadding:!1},children:e}),i&&t===d.length-1?/* @__PURE__ */W(S,{style:{fontFamily:s,fontSize:.36*g,fontWeight:"500",color:l,marginLeft:1},children:"™"}):null]},`${e}-${t}`))})]})}export{ei as BladeApiClient,cc as BrandLockup,Ei as CHALLENGE_MISSES,Ii as CHALLENGE_MULTIPLE,Bt as CategoryIcon,Sl as CategoryPickerPage,kl as CategoryPickerPageActions,xl as CategoryPickerPageTitle,zt as ChevronRightIcon,da as ConfirmPage,sa as ConfirmPageActions,ca as ConfirmPageTitle,wo as DOUBLE_SHOT_MIN_LEGS,bo as EXTRA_SHOT_MIN_LEGS,ba as EntriesPage,ma as EntriesPageTitle,_r as EntrySubmission,hl as EventFilterBanner,Fl as EventPickerPage,Cr as EventSwipeModal,Dt as FilterChipCarousel,Mt as FilterChipRow,uo as GAME_TIER_LEVEL,go as GAME_TIER_TABS,ji as GOLDEN_POINT_FACTOR,cl as GameEntries,Rl as GameLogo,bl as GamePage,ml as GamePageActions,yl as GamePageTitle,$o as GameSelector,Ea as GameSetBetPage,Ia as GameSetBetPageTitle,ac as GameSetupPage,St as HowToPlayButton,yt as HowToPlayPanel,bi as LADDER_FAMILY,yi as LADDER_REFERENCE_BET,mi as LADDER_STAKES,Ua as LadderPage,Va as LadderPageTitle,Ft as LockIcon,zi as MIRROR_STANDARD_MARGIN,Qa as MirrorPage,Xa as MirrorPageTitle,Gi as NO_BOOSTS,Eo as PYD_LEG_RUNGS,Io as PYD_RETAIL_DIVIDENDS,ol as PayoutCircles,rc as PerfectPickPage,ic as PerfectPickPageTitle,Ga as PickYourDividendPage,Na as PickYourDividendPageTitle,ir as PlaceEntryProvider,rr as QuickPickButton,Ha as RuleSetupPage,Pa as RuleSetupPageActions,Ma as RuleSetupPageTitle,zr as SELECTION_VARIANTS,Oi as SIX_AGAIN_LEGS,Hi as SIX_AGAIN_MARGIN,_a as SafetyNetPage,$a as SafetyNetPageTitle,Rt as ScrollShelf,Jr as SelectionReview,Dr as SelectionVariantList,oa as SelectionsPage,ea as SelectionsPageActions,$l as SelectionsPageTitle,nc as SixAgainPage,tc as SixAgainPageTitle,Sa as SportPickerPage,ka as SportPickerPageActions,xa as SportPickerPageTitle,Pl as SportRail,At as StarIcon,pa as SuccessPage,fa as SuccessPageActions,ga as SuccessPageTitle,wr as SwipeCard,xr as SwipeCardFace,kr as SwipeDeck,ar as VISIBLE_DEPTH,Wt as YesNoCategoryLabel,yo as availableGameTierTabs,Tn as contrastTextColour,Fe as darkTheme,mo as defaultGameTierId,Be as defaultTheme,Le as defaultThemeSet,po as filterGamesByTierLevel,so as filterPropositionsToEvent,$t as formatCurrency,_t as formatDate,eo as formatSameGameMultiEventLabel,Si as fullStackPrize,Oo as gameNeedsRuleSetup,fi as gameSetPrize,Ji as getConfirmBoostCopy,Zi as getGameFlow,pi as getGameSetBetConfig,hn as getJackpotInfo,Bi as getLadderConfig,Li as getMirrorConfig,Vo as getPickYourDividendConfig,oo as getPropositionEventId,Ho as getRuleSetupConfig,Lo as getSafetyNetConfig,Co as getSafetyNetPricing,Ki as getSixAgainConfig,gn as getSportDisplayName,He as getTheme,Oe as getThemeSet,Te as goldLightTheme,ve as goldTheme,Me as goldThemeSet,We as greenLightTheme,ze as greenTheme,De as greenThemeSet,en as groupPropositionsBySport,io as groupSameGameMultiEvents,Rr as groupSelectionDays,Xi as isFixedCardExactGame,gi as isGameSetBetGame,wi as isLadderGame,Ai as isMirrorGame,Qi as isOpenExactMultiGame,jo as isPickYourDividendGame,So as isSafetyNetGame,no as isSameGameMultiGame,co as isSelectableSameGameMultiProposition,Ni as isSixAgainGame,Ce as isThemeSet,sn as isValidSelectionCount,Ci as ladderCollectAt,ki as ladderTiers,Ri as mirrorPrize,ho as propositionsBelongToEvent,Yo as pydLadder,Go as pydRung,pn as resolveCategoryDisplayName,fo as resolveGameTierLevel,Xt as resolvePrice,fn as resolveSportDisplayName,Se as resolveTheme,Bo as roundDividendAmount,vo as safetyNetCollect,Fo as safetyNetTicket,Vi as sixAgainRuleId,Ui as sixAgainStakeMultiples,Yi as sixAgainTicket,fe as themeAccent,Ne as themeBodyFont,se as themeHeading,Ge as themeHeadingFont,de as themeLabel,Ee as themeSets,ye as themeTextAlt,me as themeTextAltMuted,he as themeValue,Ie as themes,si as useCalculatePayout,li as useCreateGameEntry,di as useEntryPreview,ci as useEvaluateRule,ii as useGameEntries,ri as useGameMaxPayouts,ti as useGames,or as usePlaceEntry,ai as usePlaceEntryFlow,ni as usePropositions,je as useResolvedTheme,oi as useSports,sr as useSwipeDeck};