@simple-parlay/components 2.0.0 → 2.0.1

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.
@@ -8,38 +8,38 @@ return U(x,{accessibilityRole:"button",accessibilityState:{selected:n,disabled:r
8
8
  /* @__PURE__ */E(fi,{style:g.label,children:i}),c.caption&&n&&/* @__PURE__ */E(fi,{accessibilityElementsHidden:!0,importantForAccessibility:"no",style:{fontSize:9,color:t.colors.primaryText},children:"Selected"})]})}function Hi({theme:e,value:t,onYes:n,onNo:i,size:o="md",stretch:r,disabled:l,yesDisabled:a,noDisabled:s,yesLabel:c,noLabel:d,style:h}){const u=Fi(),f=oi().yesNo,g=(n,i,l,a,s)=>/* @__PURE__ */E(Di,{theme:e,selected:t===n,label:i,fill:l,off:a,onPress:s,size:o,stretch:r,spec:f});/* @__PURE__ */
9
9
  return U(W,{style:[{flexDirection:"row",gap:8,flexShrink:0},r?{alignSelf:"stretch"}:null,h],children:[g("yes",c??u.yes,gn(e),!(!l&&!a),n),g("no",d??u.no,pn(e),!(!l&&!s),i)]})}function Mi({theme:e,value:t,size:n="md",style:i}){const o=cn(e),r=Fi(),l="sentence"!==oi().yesNo.tagCase,a="sm"===n?12:13,s="yes"===t?gn(e):pn(e);/* @__PURE__ */
10
10
  return E(W,{style:[{alignSelf:"flex-start",flexDirection:"row",alignItems:"center",paddingVertical:"sm"===n?2:3,paddingHorizontal:"sm"===n?8:10,borderRadius:o.radius.sm,backgroundColor:s},i],children:/* @__PURE__ */E(fi,{style:{fontSize:a,fontWeight:l?"700":"800",letterSpacing:l?.04*a:0,textTransform:l?"uppercase":"none",color:yn(s)},children:"yes"===t?r.yes:r.no})})}function Li({delay:t=0,style:n,children:i}){const{transform:o}=function(t=0){const n=e.useRef(new f.Value(0)).current;return e.useEffect(()=>{let e=!1;const i=i=>{e||(i?n.setValue(1):f.timing(n,{toValue:1,duration:500,delay:t,easing:p.bezier(.2,.8,.2,1),useNativeDriver:"web"!==w.OS}).start())},o=h.isReduceMotionEnabled?.();o&&"function"==typeof o.then?o.then(i).catch(()=>i(!1)):i(!1);const r=h.addEventListener?.("reduceMotionChanged",e=>{e&&n.setValue(1)});return()=>{e=!0,r?.remove?.()}},[t,n]),{opacity:n,transform:[{translateY:n.interpolate({inputRange:[0,1],outputRange:[14,0]})}]}}(t);/* @__PURE__ */
11
- return E(f.View,{style:[n,{transform:o}],children:i})}var Ri=4,Ii=6,Oi=[4,12],ji=[5,10,20,50];function Ei(e){return!!e&&!e.quick_pick_only&&"safety_net"===(e.rule??"").trim().toLowerCase()}function Ui(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 Gi(e,t){return t>0&&e>=t?Math.round(e/t)*t:Math.round(e)}function Vi(e,t){if(t<0||t>e)return 0;let n=1;for(let i=0;i<t;i+=1)n=n*(e-i)/(i+1);return Math.round(n)}function Yi(e,t,n,i){const o=Math.max(0,Math.min(n,t)),r=e*i.perfectMultiple*Math.pow(2,t-i.perfectBaseLegs),l=o>0?e*(1-i.margin)*i.nearMissBudgetFraction/o:0,a=Math.pow(1/i.perLegProbability,t),s=[];let c=Vi(t,0);for(let d=1;d<=o;d+=1)c+=Vi(t,d),s.push(Gi(l*a/c,i.roundTo));return{legs:t,stake:e,allowedMisses:o,perfect:r,nearMiss:s,sweep:r+s.reduce((e,t)=>e+t,0)}}function Ni(e,t){if(t<0||t>e.allowedMisses)return 0;let n=0===t?e.perfect:0;for(let i=Math.max(1,t);i<=e.nearMiss.length;i+=1)n+=e.nearMiss[i-1];return n}function Xi(e){return e.includes(8)?8:e[Math.floor(e.length/2)]}function qi(e){return e.toLowerCase().replace(/[^a-z]+/g," ").trim()}function Ki(e,t){const n=qi(t);return e.permitted_rules?.find(e=>qi(e.name??"").includes(n))??null}function Qi(e,t,n){const i=t?.min_propositions??n,o=t?.max_propositions??null;return e.filter(e=>e>=i&&(null==o||e<=o))}function Ji(e){if(!Ei(e)||!e)return null;const t=e.min_propositions??e.allowed_propositions?.[0]??Oi[0],n=e.max_propositions??e.allowed_propositions?.[e.allowed_propositions.length-1]??Oi[1],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),o=Ki(e,"Extra Shot"),r=Ki(e,"Double Shot"),l=Qi(i,o,4).filter(e=>e>1),a=Qi(i,r,6).filter(e=>e>2);if(0===l.length)return null;const s=[{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:Xi(l),ruleId:o?.id??null}],c=!e.permitted_rules?.length||!!r;a.length>0&&c&&s.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:Xi(a),ruleId:r?.id??null});const d=Math.max(e.min_bet??5,.01),h=e.max_bet??null,u=ji.filter(e=>null===h||e<=h);return{modes:s,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:Ui(e)}}function Zi(e){return[{id:`target-${e}`,label:"Perfect pick",stat:"Top payout",detail:["Get every pick right","nothing else pays"],emphasis:!0,expectedCorrect:e}]}function $i(e,t,n){const i=Math.max(0,e-t),o=Yi(20,e,i,n),r=[];for(let l=0;l<=i;l+=1){const t=Math.round(Ni(o,l));r.push({misses:l,label:`${e-l}/${e}`,multiplier:t/20,payout20:t})}return r}function _i(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:$i(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:$i(e,e-2,t),expectedCorrect:e-2}]}function eo(e,t){if(!e||e.quick_pick_only)return null;const n=function(e){return(e??"").trim().toLowerCase()}(e.rule),i=t??e.num_propositions??e.min_propositions??e.allowed_propositions?.[0]??0;return"safety_net"===n&&i>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:_i(t,Ui(e)),continueLabel:"Continue to picks"}}(e,i):"exact"===n&&i>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:Zi(t),continueLabel:"Continue to picks"}}(0,i):"pick"===n&&i>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,i):null}function to(e){return null!=eo(e)}var no=[1,5,10,20,50,100],io=[4,12];function oo(e){return!!e&&!e.quick_pick_only&&"game_set"===(e.rule??"").trim().toLowerCase()}function ro(e,t,n){const i=n?.operatorMargin??.2,o=n?.perLegProbability??.5,r=Math.round(Math.pow(1/o,t)),l=(1-i)*Math.pow(1/o,t);return{legs:t,stake:e,prize:Math.round(e*l*100)/100,multiple:l,oddsOneIn:r}}function lo(e){if(!oo(e)||!e)return null;const t=e.min_propositions??e.allowed_propositions?.[0]??io[0],n=e.max_propositions??e.allowed_propositions?.[e.allowed_propositions.length-1]??io[1],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);if(0===i.length)return null;const o=Math.max(e.min_bet??1,.01),r=e.max_bet??null,l=no.filter(e=>e>=o&&(null===r||e<=r));return{legOptions:i,defaultLegs:i.includes(8)?8:i[Math.floor(i.length/2)],defaultStake:Math.min(Math.max(20,o),r??20),minStake:o,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 ao=[500,1e3,2500,5e3,7500,1e4,12500,15e3],so=[12,11,10,9,8,7,6];function co(e){return!!e&&!e.quick_pick_only&&"pick_your_dividend"===(e.rule??"").trim().toLowerCase()}function ho(e){return Math.round(100*e)/100}function uo(e,t,n=.21875){const i=Math.pow(2,t),o=e/(1-n)/i,r=Number.isInteger(o),l=ho(o),a=r?o:ho(.96*o);return{legs:t,exactStake:l,stake:a,margin:1-e/(a*i),multiple:e/a,oddsOneIn:i,discounted:!r}}function fo(e,t=so){return{dividend:e,rungs:t.map(t=>uo(e,t))}}function go(e,t){if(!co(e)||!e)return null;const n=e.min_propositions??6,i=e.max_propositions??12,o=so.filter(e=>e>=n&&e<=i);if(0===o.length)return null;const r=t?.dividends??ao;return{dividends:r.map(e=>fo(e,o)),defaultDividend:r.includes(1e4)?1e4:r[Math.floor(r.length/2)],defaultLegs:o.includes(9)?9:o[Math.floor(o.length/2)],tagline:"The dividend is set. The win is yours to build."}}var po=50,yo=[25,50,75,100],mo=[{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 bo(e){return!!e&&!e.quick_pick_only&&"ladder"===(e.rule??"").trim().toLowerCase()}function wo(e,t){return Math.round(e*t/50)}function xo(e,t){let n=0;return e.tiers50.map(([e,i])=>(n+=i,{atLeast:e,prize:wo(i,t),cumulative:wo(n,t)}))}function vo(e,t){return wo(e.tiers50.reduce((e,[,t])=>e+t,0),t)}function ko(e,t,n){return wo(e.tiers50.reduce((e,[n,i])=>n<=t?e+i:e,0),n)}function Bo(e){if(!bo(e)||!e)return null;const t=e.allowed_propositions,n=e.min_propositions??4,i=e.max_propositions??10,o=mo.filter(e=>t&&t.length>0?t.includes(e.legs):e.legs>=n&&e.legs<=i);if(0===o.length)return null;const r=e.min_bet??yo[0],l=e.max_bet??yo[yo.length-1],a=yo.filter(e=>e>=r&&e<=l);return{ladders:o,defaultLegs:o.some(e=>8===e.legs)?8:o[Math.floor(o.length/2)].legs,defaultStake:a.includes(50)?50:a[0]??50,stakes:a.length>0?a:yo,tagline:"Climb the ladder. Every step pays its own prize, and every prize stacks on the one before."}}var Co={signature:1,premier:2,exclusive:3},So=[{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 zo(e){return"number"==typeof e.tier&&Number.isFinite(e.tier)?e.tier:1}function Wo(e,t){return e.filter(e=>zo(e)===t)}function Fo(e){const t=new Set(e.map(zo));return So.filter(e=>t.has(e.level))}function Ao(e){return Fo(e)[0]?.id??"signature"}var Po=.21875;function To(e){return null==e||Math.abs(e-.21875)<5e-5?Po:e}var Do=[1,5,10,20,50],Ho=[4,12];function Mo(e){return(e??"").trim().toLowerCase()}var Lo={straight:"mirror",double:"double_mirror",triple:"triple_mirror"};function Ro(e){if(!e||e.quick_pick_only)return!1;const t=Mo(e.rule);return Object.values(Lo).includes(t)}function Io(e){const t=Mo(e?.rule);return Object.keys(Lo).find(e=>Lo[e]===t)??"straight"}function Oo(e,t,n){const i=To(n?.operatorMargin),o=n?.perLegProbability??.5,r=Math.round(Math.pow(2,t)),l=Math.pow(o,t)+Math.pow(1-o,t),a=Math.round(1/l),s=(1-i)*Math.pow(2,t-1);return{legs:t,stake:e,prize:Math.round(e*s),multiple:s,totalOutcomes:r,winningOutcomes:2,oddsOneIn:a}}function jo(e){if(!Ro(e)||!e)return null;const t=e.min_propositions??e.allowed_propositions?.[0]??Ho[0],n=e.max_propositions??e.allowed_propositions?.[e.allowed_propositions.length-1]??Ho[1],i=Uo(Io(e)),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)).filter(e=>e>=i.minLegs);if(0===o.length)return null;const r=Math.max(e.min_bet??1,.01),l=e.max_bet??null,a=Do.filter(e=>e>=r&&(null===l||e<=l));return{variant:i,legOptions:o,defaultLegs:o.includes(8)?8:o[Math.floor(o.length/2)],defaultStake:Math.min(Math.max(20,r),l??20),minStake:r,maxStake:l,quickStakes:a,tagline:i.tagline,operatorMargin:To(e.operator_margin),perLegProbability:e.payout_structure?.per_leg_probability??.5}}var Eo=[{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 Uo(e){return Eo.find(t=>t.id===e)??Eo[0]}function Go(e,t){if(t<0||t>e)return 0;const n=Math.min(t,e-t);let i=1;for(let o=0;o<n;o++)i=i*(e-o)/(o+1);return Math.round(i)}function Vo(e,t,n,i){const o=Uo(e),r=t*(1-To(i?.operatorMargin)),l=Math.round(Math.pow(2,n)),a=[];let s=0;for(let c=0;c<o.depth;c++){const e=Go(n,c),t=n-c===c?e:2*e;s+=t,a.push({distance:c,label:o.tierNames[c]??`Tier ${c+1}`,correctCounts:n-c===c?[c]:[n-c,c],prize:Math.round(r/o.depth*l/(2*e)),outcomes:t})}return{variant:o.id,legs:n,stake:t,tiers:a,totalOutcomes:l,winningOutcomes:s,oddsOneIn:Math.round(l/s*1e4)/1e4}}var Yo="✓",No="✕";function Xo(e){const{legs:t}=e;return e.tiers.flatMap(e=>e.correctCounts.map(n=>({correct:n,label:n===t?`All ${t} right`:0===n?`All ${t} wrong`:`${n} of ${t} right`,prize:e.prize})))}function qo(e,t){if(!t)return[];const n=zo(t);return n<Co.premier?[]:Eo.flatMap(t=>{const i=e.find(e=>Ro(e)&&Mo(e.rule)===Lo[t.id]&&zo(e)===n);return i?[{variant:t,game:i}]:[]})}function Ko(e){const t=new Set(e.filter(e=>Ro(e)&&Mo(e.rule)===Lo.straight).map(zo));return e.filter(e=>!(Ro(e)&&Mo(e.rule)!==Lo.straight&&t.has(zo(e))))}var Qo=.21875,Jo=6,Zo=5,$o=1,_o=2;function er(e){return!!e&&!e.quick_pick_only&&"six_again"===(e.rule??"").trim().toLowerCase()}var tr={golden_point:!1,captains_challenge:!1};function nr(e,t,n){const i=1+(t.golden_point?1:0)+(t.captains_challenge?1:0),o=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*i,base:o,challenge:r,perfect:o+r,lowestWinningCount:n.legs-(t.captains_challenge?n.challengeMisses:0),ruleId:ir(t,n)}}function ir(e,t){return e.captains_challenge?e.golden_point?t.ruleIds.goldenChallenge:t.ruleIds.challenge:t.ruleIds.base}function or(e,t){const n=nr(1,e,t);return{perfect:n.perfect/n.stake,challenge:n.challenge/n.stake}}function rr(e,t){return e.permitted_rules?.find(e=>t((e.name??"").toLowerCase().replace(/[^a-z]+/g," ").trim()))??null}function lr(e){if(!er(e)||!e)return null;const t=e.num_propositions??e.min_propositions??6;if(t<2)return null;const n=e.operator_margin??.21875,i=Math.max(e.min_bet??10,.01),o=null!=e.max_bet?Math.max(i,Math.floor(e.max_bet/3/i)*i):Math.max(i,100),r=rr(e,e=>e.includes("challenge")&&!e.includes("golden")),l=rr(e,e=>e.includes("challenge")&&e.includes("golden")),a=rr(e,e=>!e.includes("challenge"))??null;return{legs:t,unitMin:i,unitStep:i,unitMax:o,defaultUnit:i,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 ar(e){return e?.quick_pick_only?"quick_pick":oo(e)?"game_set":co(e)?"pick_your_dividend":bo(e)?"ladder":Ro(e)?"mirror":Ei(e)?"safety_net":er(e)?"six_again":be(e)?"selections":to(e)?"rule_setup":"selections"}function sr(e){if(!e||e.quick_pick_only)return!1;if("exact"!==(e.rule??"").trim().toLowerCase())return!1;if(be(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 cr(e){return!(!e||e.quick_pick_only||"exact"!==(e.rule??"").trim().toLowerCase()||be(e)||sr(e))}function dr(e){switch(ar(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 hr(e,t,n){const i=[...new Set((e??[]).filter(e=>Number.isFinite(e)))].sort((e,t)=>t-e);if(i.length<2||t<=0)return[];const o=i.map(e=>({count:e,label:e===t?`Get all ${t}`:0===e?`All ${t} wrong`:`Get ${e}`,prize:n?.[e]??0}));return o.every(e=>e.prize>0)?o:[]}function ur(e,t){return fr(e)&&t&&t>0?t:null}function fr(e){switch(ar(e)){case"game_set":case"pick_your_dividend":case"ladder":case"mirror":case"safety_net":case"six_again":return!0;default:return sr(e)}}function gr(e,t,n){if(!e||!function(e){return!!e&&("game_set"===ar(e)||!fr(e)||sr(e))}(e))return[];const{min:i,max:o}=Wt(e,void 0,t),r=(t?.allowed_propositions??e.allowed_propositions)?.filter(e=>e>=i&&e<=o);return(r&&r.length>0?[...r].sort((e,t)=>e-t):en(i,o)).filter(e=>e>0&&e<=n)}function pr(e,t,n,i){if(e.length>1){const n=e.find(e=>e>=i)??e[e.length-1];return{kind:"menu",counts:[...e],hint:"Choose how many",randomise:t>0?{label:`Randomise all ${n}`,count:n}:void 0}}if(0===t)return{kind:"button",mode:"fill",hint:`Fill all ${n} for me`};if(t>=n)return{kind:"button",mode:"replace",hint:`Randomise all ${n}`};const o=n-t;return{kind:"menu",counts:[],hint:`Fill ${o} for me`,fillLabel:`Fill the other ${o}`,randomise:{label:`Randomise all ${n}`,count:n}}}function yr(e){const t=ar(e);return"six_again"===t||"pick_your_dividend"===t}function mr(e){return"six_again"===ar(e)?"Set by your ticket and boosts.":"Set by your dividend ladder rung."}function br(e,t,n,i){if(!e||t<=0||n<=0)return 0;switch(ar(e)){case"game_set":return wr(ro(n,t,{operatorMargin:e.operator_margin??void 0,perLegProbability:e.payout_structure?.per_leg_probability??void 0}).prize,e);case"mirror":return wr(Vo(Io(e),n,t,{operatorMargin:e.operator_margin??void 0}).tiers[0]?.prize??0,e);case"pick_your_dividend":return function(e,t,n=ao){if(!(e>0&&t>0))return 0;for(const i of n)if(Math.abs(uo(i,e).stake-t)<.005)return i;return 0}(t,n);case"ladder":{const i=mo.find(e=>e.legs===t);return i?wr(vo(i,n),e):0}case"safety_net":{const o=null!=i?.expectedCorrect&&i.expectedCorrect>0?Math.min(2,Math.max(0,t-i.expectedCorrect)):1;return wr(Yi(n,t,o,Ui(e)).sweep,e)}default:{if("exact"!==(e.rule??"").trim().toLowerCase())return 0;const i=function(e,t,n){const i=e.payout_structure;if(!i)return 0;const o=i.results??i.values;if(!o)return 0;const r=o[String(t)];return void 0!==r?r*n:0}(e,t,n);if(i>0)return wr(i,e);const o=e.payout_structure?.expression??e.payout_structure?.formula??"";return/2\s*\^/.test(o)?wr(ro(n,t,{operatorMargin:e.operator_margin??void 0,perLegProbability:e.payout_structure?.per_leg_probability??void 0}).prize,e):0}}}function wr(e,t){return!1===t?.round_payouts?e:Gi(e,t?.payout_structure?.round_to??1)}var xr=e=>"any"===e?.sgm_mode;function vr(e,t,n){const i=JSON.stringify(n),o=JSON.stringify([n.candidate_ids,n.event_id]),r=c(null),[a,h]=d(0),[u,f]=d(null);l(()=>{if(!e||null==t)return;const n=new AbortController,l=setTimeout(()=>{e.getCorrelationSuggestions(t,JSON.parse(i),n.signal).then(l=>{n.signal.aborted||(r.current={client:e,gameId:t,scope:o,rows:l.propositions??[]},f({key:i,client:e,gameId:t,data:l}))}).catch(()=>{n.signal.aborted||f({key:i,client:e,gameId:t,error:"Unable to price these selections. Retry or remove a selection."})})},50);return()=>{clearTimeout(l),n.abort()}},[e,t,i,a,o]);const g=u?.key===i&&u.client===e&&u.gameId===t?u:null,p=s(()=>new Map(g?.data?.choices.map(e=>[e.id,e.answers])??[]),[g]);return{data:g?.data??null,displayPropositions:r.current?.client===e&&r.current.gameId===t&&r.current.scope===o?r.current.rows:null,loading:null!=t&&null!=e&&null==g,error:null==t||e?g?.error??null:"Correlation pricing requires a live API connection.",answers:p,retry:()=>{f(null),h(e=>e+1)}}}var kr="Recalculating your multi…";function Br(e,t){if(e.loading)return"Dev · Calculating multi odds…";if(e.error)return"Dev · Multi odds unavailable";const n=e.data?.card?.resultant_price;if(null==n||!Number.isFinite(n)||n<=0)return"Dev · Select a proposition to calculate multi odds";const i=2**t,o=100*(n/i-1),r=e.data?.target_price_range,l=r?` · Allowed: ${r[0].toFixed(2)}–${r[1].toFixed(2)}x`:"";return`Dev · Multi fair odds: ${n.toFixed(3)}x · P(all win): ${(100/n).toFixed(3)}% · Final target: ${i}x · Deviation: ${o>=0?"+":""}${o.toFixed(1)}%${l} · ${e.data?.can_submit?"Ready":"Incomplete / outside range"}`}var Cr=Object.freeze([]),Sr=["perfect-pick","h2h","total-points","quick-pick"];function zr(e){if((e=>["any","limited","limited_2p"].includes(e?.sgm_mode??""))(e)||be(e))return;const t=ar({...e,quick_pick_only:!1});return"rule_setup"!==t&&"selections"!==t||e.rule&&"exact"!==e.rule?void 0:/total[ _-]*points/i.test(e.game_name??e.game_name_template??"")?"total-points":e.quick_pick_only||/quick[ _-]*pick/i.test(e.game_name??e.game_name_template??"")?"quick-pick":sr(e)?"h2h":"perfect-pick"}function Wr(e,t){if(!e)return;const n=zr(e);return t.find(t=>(!n||t.overrideBase)&&t.matches?.(e))}function Fr(e,t){return Boolean(zr(e)||Ei(e)||Wr(e,t))}var Ar=class{constructor(e){this.inflight=/* @__PURE__ */new Map,this.cache=/* @__PURE__ */new Map,this.apiUrl=e.apiUrl.replace(/\/+$/,""),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 i=`${this.apiUrl}${e}`,o=(t?.method??"GET").toUpperCase(),r="GET"===o,l=r,a=!r&&!n?.idempotent,s=`${o} ${i}`;if(l){const t=this.cache.get(s),n="/games"===e.split("?")[0]||"/propositions/sports"===e?6e4:5e3;if(t&&Date.now()-t.at<n)return t.value;const i=this.inflight.get(s);if(i)return i}const c=l?this.cache.get(s):void 0,d=(async()=>{let e;try{const n=this.getAuthHeaders?await this.getAuthHeaders():void 0;e=await this.fetchImpl(i,{...t,headers:{"Content-Type":"application/json",...this.apiKey?{"X-API-Key":this.apiKey}:{},...n??{},...c?.etag?{"If-None-Match":c.etag}:{},...t?.headers}})}catch(o){throw o}if(304===e.status&&c)return l&&this.cache.set(s,{at:Date.now(),value:c.value,etag:c.etag}),c.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(s,{at:Date.now(),value:n,etag:t})}return n})();return l?(this.inflight.set(s,d),d.catch(()=>{}).finally(()=>{this.inflight.delete(s)})):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(),i=n?`/games?${n}`:"/games",o=await this.request(i);return{games:o.payload||[],howToPlayMarkdown:o.how_to_play_markdown??null}}async getGame(e){return(await this.request(`/games/${e}`)).payload}async getPropositions(e){const t=new URLSearchParams({binary_only:"true"});e?.event_id&&t.append("event_id",e.event_id),e?.sport&&t.append("sport",e.sport),e?.category&&t.append("category","fantasy"===e.category?"sports":e.category);const n=t.toString(),i=n?`/propositions?${n}`:"/propositions",o=(await this.request(i)).payload||[];return"fantasy"===e?.category?o.filter(e=>"fantasy"===vt(e)):o}async getSports(){const e=await this.request("/propositions/sports");return e.sports??(e.payload??[]).map(e=>({key:e,label:"",games_today:0,active_props:0}))}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(),i=n?`/game-entries?${n}`:"/game-entries";return((await this.request(i)).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)),null==t.winning&&null!=t.win_amount&&(t.winning=Number(t.win_amount)),(!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 i=(await this.request("/game-entries",{method:"POST",body:JSON.stringify(n)})).payload;return null!=i.stake&&null==i.bet_amount&&(i.bet_amount=Number(i.stake)),i}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 i=await this.request(`/games/max-payouts?${n.toString()}`),o={};for(const[r,l]of Object.entries(i.payload||{}))o[Number(r)]=l;return o}async getCorrelationSuggestions(e,t,n){return(await this.request(`/games/${e}/suggestions`,{method:"POST",body:JSON.stringify(t),signal:n},{idempotent:!0})).payload}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 Pr(e,t,n,i){const[r,a]=d(),s=c(0),h=o(async()=>{const e=++s.current;if(!n){a(e=>({read:t,data:e?.read===t?e.data:void 0,loading:!0,error:null}));try{const n=await t();s.current===e&&a({read:t,data:n,loading:!1,error:null})}catch(o){s.current===e&&a({read:t,loading:!1,error:o instanceof Error?o.message:i})}}},[t,n,i]);l(()=>(h(),()=>{s.current++}),[h]);const u=o(async()=>{e.invalidate(),await h()},[e,h]),f=r?.read===t?r:void 0;return{data:n?void 0:f?.data,loading:!n&&(f?.loading??!0),error:n?null:f?.error??null,refetch:u}}var Tr=[],Dr=[],Hr=[];function Mr(e,t,n){const{category:i,jurisdiction:r,sport:l}=t??{},{data:a,...s}=Pr(e,o(()=>e.getGames({category:i,jurisdiction:r,sport:l}),[e,i,r,l]),n?.skip??!1,"Failed to fetch games");return{games:a?.games??Tr,howToPlayMarkdown:a?.howToPlayMarkdown??null,...s}}function Lr(e,t,n){const{category:i,sport:r,event_id:l}=t??{},{data:a,...s}=Pr(e,o(()=>e.getPropositions({category:i,sport:r,event_id:l}),[e,i,r,l]),n?.skip??!1,"Failed to fetch propositions");return{propositions:a??Dr,...s}}function Rr(e,t){const{data:n,...i}=Pr(e,o(()=>e.getSports(),[e]),t?.skip??!1,"Failed to fetch sports");return{sports:n??Hr,...i}}function Ir(e,t,n){const[i,r]=d([]),[a,s]=d(!n?.skip),[h,u]=d(null),f=n?.skip??!1,g=t?`${t.user_id??""}_${t.pending??""}`:"",p=c(t);p.current=t;const y=o(async(t=!1)=>{if(!f)try{t||s(!0),u(null);const n=await e.getGameEntries(p.current);r(n)}catch(n){t||u(n instanceof Error?n.message:"Failed to fetch entries")}finally{s(!1)}},[e,g,f]);l(()=>{y()},[y]);const m=i.some(e=>e.propositions?.some(e=>e.live));return l(()=>{if(!m)return;const t=setInterval(()=>{e.invalidate(),y(!0)},3e4);return()=>clearInterval(t)},[m,e,y]),{entries:i,loading:a,error:h,refetch:o(async()=>{e.invalidate(),await y()},[e,y])}}function Or(e,t,n){const[i,r]=d({}),[a,s]=d(!1),h=n?.skip??!1,u=n?.betAmount,f=c(/* @__PURE__ */new Set);return l(()=>{if(h||0===t.length)return;const n=t.filter(e=>!(e.id in i)&&!f.current.has(e.id));if(0===n.length)return;for(const e of n)f.current.add(e.id);let o=!1;return s(!0),(async()=>{try{const t=await e.getGamesMaxPayouts(n.map(e=>e.id),u);o||r(e=>({...e,...t}))}catch{}finally{o||s(!1)}})(),()=>{o=!0}},[e,t.map(e=>e.id).join(","),h,u]),{maxPayouts:i,loading:a,refetchGame:o(async(t,n)=>{if(!h)try{const i=await e.getGamesMaxPayouts([t],n??u);i[t]&&r(e=>({...e,[t]:i[t]}))}catch{}},[e,h,u])}}function jr(e){const[t,n]=d(!1),[i,r]=d(null),[l,a]=d(null);return{createEntry:async t=>{try{n(!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(i),t()},i=setTimeout(n,e);window.addEventListener("online",n)})}();const i=await e.createGameEntry(t);return a(i),i}catch(i){const e=i instanceof Error?i.message:"Failed to create entry";throw r(e),new Error(e)}finally{n(!1)}},loading:t,error:i,entry:l,clearSubmitError:o(()=>r(null),[])}}function Er(e){const[t,n]=d(e?"sport":"game"),[i,o]=d(null),[r,l]=d({}),[a,s]=d(null);return{step:t,selectedGame:i,selections:r,placedEntry:a,setGameOnly:e=>{i?.id!==e.id&&l({}),o(e)},clearSelectedGame:()=>{o(null),l({})},goToSportSelection:e=>{e&&o(e),n("sport")},goToConfirmation:()=>{n("confirm")},goToSuccess:e=>{s(e),n("success")},goBack:()=>{"confirm"===t?n("sport"):"sport"===t&&(n("game"),o(null),l({}))},reset:()=>{n("game"),o(null),l({}),s(null)},toggleSelection:(e,t)=>{l(n=>{const i={...n};return i[e]===t?delete i[e]:i[e]=t,i})}}}function Ur(e){const[t,n]=d(!1),[i,r]=d(null),[l,a]=d(null);return{evaluate:o(async(t,i)=>{try{n(!0),r(null);const o=await e.evaluateRule(t,i);return a(o),o}catch(o){const e=o instanceof Error?o.message:"Failed to evaluate rule";throw r(e),new Error(e)}finally{n(!1)}},[e]),loading:t,error:i,result:l}}function Gr(e){const[t,n]=d(!1),[i,r]=d(null),[l,a]=d(null);return{calculate:o(async(t,i)=>{try{n(!0),r(null);const o=await e.calculatePayout(t,i);return a(o),o}catch(o){const e=o instanceof Error?o.message:"Failed to calculate payout";throw r(e),new Error(e)}finally{n(!1)}},[e]),loading:t,error:i,result:l}}function Vr(e){const[t,n]=d(!1),[i,r]=d(null),[l,a]=d(null);return{preview:o(async(t,i)=>{try{n(!0),r(null);const o=await e.getEntryPreview(t,i);return a(o),o}catch(o){const e=o instanceof Error?o.message:"Failed to preview entry";throw r(e),new Error(e)}finally{n(!1)}},[e]),loading:t,error:i,result:l}}function Yr(e){return e.fonts?.body??"System"}function Nr(e){return e.fonts?.heading??e.fonts?.body??"System"}var Xr="Your stake",qr="Remove",Kr="Clear picks",Qr=["M2 18h1.4c1.3 0 2.5-.6 3.3-1.7l6.1-8.6c.7-1.1 2-1.7 3.3-1.7H22","m18 2 4 4-4 4","M2 6h1.9c1.5 0 2.9.9 3.6 2.2","M22 18h-5.9c-1.3 0-2.6-.7-3.3-1.8l-.5-.8","m18 14 4 4-4 4"],Jr=e=>`${e} pick${1===e?"":"s"}`;function Zr(e){return`Filled ${Jr(e)}`}var $r=e=>e??"other",_r={spread:{label:"The line",noun:"line"},totals:{label:"The total",noun:"total"},player:{label:"Players",caption:"Hit their numbers",noun:"player"},other:{label:"More",noun:"pick"}},el=e=>_r[$r(e)],tl={spread:["M2.5 6 11 12l-8.5 6 2.5-6z","M21.5 6 13 12l8.5 6-2.5-6z"],totals:["M5 3h14v3.5H9.5l5 5.5-5 5.5H19V21H5l7-9z"],player:["M8.5 3 3 6l2 5 2.5-1v11h9V10l2.5 1 2-5-5.5-3c-.3 1.7-1.7 2.8-3.5 2.8S8.8 4.7 8.5 3z"],other:["M12 5v14","M5 12h14"]},nl=e=>tl[$r(e)];function il(e,t){return t?`${e} of ${e}`:`Pick ${e}`}function ol(e,t){const{noun:n}=el(t);return`${e} other ${n}${1===e?"":"s"}`}function rl(e){return 1===e?"One per match. Picking another swaps it.":`${2===e?"Two":e} per match. Picking another swaps one.`}function ll(e,t=400,n=12){return Math.max(1,Math.floor((e+n)/(t+n)))}function al(e){const t=[];return e.forEach((e,n)=>{const i=e.date?e.date.toLocaleDateString("en-AU",{weekday:"short",day:"numeric",month:"short"}):"",o=t.find(e=>e.label===i);o?o.items.push({event:e,index:n}):t.push({label:i,items:[{event:e,index:n}]})}),t}function sl(e,t,n){const i=e<0?"Previous":"Next";return t>1?`${i} ${t} ${n.endsWith("ch")?`${n}es`:`${n}s`}`:`${i} ${n}`}function cl(e,t){return[...Object.entries(e).filter(([e])=>!(e in t)),...Object.entries(t).filter(([t,n])=>e[Number(t)]!==n)].map(([e,t])=>[Number(e),t])}var dl="One sport per bet.",hl="Swipe";function ul(e,t){const n=Object.keys(t).map(Number),i=new Set(n),o=e.filter(e=>i.has(e)),r=n.filter(e=>!o.includes(e)).sort((e,t)=>e-t);return 0===r.length&&o.length===e.length?e:[...o,...r]}function fl(e,t,n){const i=n?.stake&&n.stake>0?n.stake:20;if(co(n?.game)){const e=br(n?.game??null,t,i);if(e>0)return e/i*20}const o=e?.top_payouts?.find(e=>Number(e.proposition_count)===t),r=o?.bet_amount&&o.bet_amount>0?o.bet_amount:20,l=Number(o?.net_payout);return o&&Number.isFinite(l)&&l>0?l/r*20:br(n?.game??null,t,i,{expectedCorrect:n?.expectedCorrect})/i*20}var gl=t(null),pl={};function yl(){const e=r(gl);if(!e)throw new Error("usePlaceEntry must be used within a <PlaceEntryProvider>");return e}function ml({gameLibrary:t=Cr,showCorrelationDebug:n=!1,apiUrl:i,apiKey:r,fetchImpl:a,getAuthHeaders:h,userId:u,getUserBalance:f,children:g,theme:p,colorScheme:y,demoGames:m,demoPropositions:b,demoEntries:w,demoMaxPayouts:x,gameCategory:v,jurisdiction:k,initialGameId:B,filterSport:C,initialSport:S,initialEventId:z,initialEventLabel:W,sportBaseKey:F,disableQuickPick:A=!1,renderTeamLogo:P,renderPropositionSilk:T,uiVariant:D="default",selectionVariant:H,gameVariant:M,disableEventSwipe:L,swipeVariant:R,enableSportFavourites:I,yesNoLabels:O,onEntryPlaced:j,onBeforeSubmit:U,entryReference:G,onCancel:V,onShare:Y,onRecharge:N,onClearEventFilter:X,screenSize:q="desktop",howToPlayMarkdown:K,sportDisplayNames:Q,categoryDisplayNames:J}){const Z=Yn(p,y),$=Yr(Z),_=Nr(Z),ee=!(!m||!b),te=s(()=>new Ar({apiUrl:i,apiKey:r,fetchImpl:a,getAuthHeaders:h}),[i,r,a,h]),[ne,ie]=d(0),le=c(0),[ae,se]=d(0),[ce,de]=d([]),[he,ge]=d({}),[pe,ye]=d({}),[me,we]=d(void 0),[ve,ke]=d(null),[Be,Ce]=d(void 0),We=e.useCallback(async()=>{if(f)try{const e=await f();"number"==typeof e&&Number.isFinite(e)&&Ce(e)}catch(e){}},[f]);l(()=>{f?We():Ce(void 0)},[f,We]);const Fe=c(null),Ae=c(null),[Pe,Te]=d(null),[De,He]=d(S??null),[Me,Le]=d(z??null);l(()=>{S&&He(S)},[S]),l(()=>{Le(z??null)},[z]);const[Re,Ie]=d(z),Oe=c(!1);l(()=>{if(!z)return Ie(void 0),void(Oe.current=!1);Oe.current||Ie(z)},[z]);const je=v??Pe??void 0,Ee=C??S??void 0,Ue=Ht(De??Ee,F),Ve=Ht(C,F)??C,Ye=De??void 0,{games:qe,howToPlayMarkdown:Ke,loading:Qe,error:Je}=Mr(te,{category:je,jurisdiction:k,sport:Ue},{skip:ee}),{propositions:Ze,loading:$e,error:_e}=Lr(te,{category:je,sport:Ve,event_id:Re},{skip:ee}),{sports:et,loading:tt}=Rr(te,{skip:ee}),{createEntry:nt,loading:it,error:ot,clearSubmitError:rt}=jr(te),{preview:lt}=Vr(te),at=o((e,t)=>te.getEntryPreview(e,t),[te]),st=s(()=>Gt((ee?m:qe)??[],{category:je,sport:Ue??Ye,sportBaseKey:F}),[ee,m,qe,je,Ue,Ye,F]),ct=K??Ke??null,{maxPayouts:dt,refetchGame:ht}=Or(te,st??[],{skip:ee,betAmount:20}),ut=ee?x??pl:dt,ft=ee?b:Ze,gt=s(()=>C?(ft??[]).filter(e=>e.sport===C):ft,[ft,C]),yt=!v&&!!Pe,[mt,bt]=d(null);l(()=>{ee||yt||$e||!gt||bt(gt)},[ee,yt,$e,gt]);const kt=s(()=>(ee||!yt?gt:mt??gt)??[],[ee,yt,gt,mt]),Ct=s(()=>Bt(gt??[]),[gt]),Ft=s(()=>je||(1===Ct.length?Ct[0]:void 0),[je,Ct]),At=s(()=>{const e=gt??[];return Ft?It(e,{category:Ft,sportBaseKey:F}):e},[gt,Ft,F]),Pt=s(()=>Ye?It(At,{sport:Ye,sportBaseKey:F}):At,[At,Ye,F]),Lt=s(()=>({category:Ft,sport:Ye,sportBaseKey:F}),[Ft,Ye,F]),Rt=s(()=>{const e=(st??[]).filter(e=>e.active&&Fr(e,t));if(!Ft&&Ct.length>1)return[];const n=Ft?Gt(e,Lt):e;return Ft||Ye?function(e,t,n){return n?.category||n?.sport?e.filter(e=>Ut(e,t,n)):e}(n,Pt,Lt):n},[t,st,Pt,Lt,Ft,Ye,Ct.length]),{step:Et,selectedGame:Vt,selections:Nt,placedEntry:Xt,setGameOnly:qt,clearSelectedGame:Kt,goToSportSelection:Qt,goToConfirmation:Jt,goToSuccess:Zt,goBack:$t,reset:_t,toggleSelection:en}=Er(B),tn=e.useCallback(()=>{Oe.current=!0,Ie(void 0),_t(),X?.()},[_t,X]),nn=!!Re,on=nn?W:void 0,rn=!ee&&((Vt?tt:Qe)||$e),ln=ee?null:Vt?Je||_e:Je,an=s(()=>Vt?Yt(Pt,Vt,F):Pt,[Vt,Pt,F]),sn=s(()=>{const e=Vt?Yt(At,Vt,F):At,t=Vt?.allowed_sports,n=/* @__PURE__ */new Map;for(const i of e){const o=wt(i,e);"Other"!==o&&(t?.length&&!t.includes(o)||n.set(o,(n.get(o)??0)+1))}return Array.from(n.entries()).sort((e,t)=>t[1]-e[1]).map(([e,t])=>({key:e,count:t}))},[Vt,At,F]),cn=s(()=>sn.map(e=>e.key),[sn]),dn=s(()=>v?At:kt,[v,At,kt]),{games:hn}=Mr(te,{jurisdiction:k,sport:Ht(Ee,F)},{skip:ee||!!v}),un=s(()=>{if(v)return[v];const e=((ee?m:hn)??[]).filter(e=>e.active&&Fr(e,t));return xt.filter(t=>e.some(e=>Ot(e)===t))},[v,ee,m,hn,t]),fn=s(()=>It(kt,{category:Ft??"sports"}),[kt,Ft]),gn=s(()=>{const e=new Set(cn);return et.filter(t=>e.has(t.key))},[et,cn]),pn=s(()=>It(an,{category:Ft,sport:De}),[an,Ft,De]),yn=s(()=>{if(!Vt||!be(Vt))return[];const{min:e}=Wt(Vt,me),t=me??e;return xe(pn).filter(e=>xr(Vt)||e.propositionCount>=t)},[Vt,me,pn]),mn=s(()=>be(Vt)?Se(pn,Me):pn,[Vt,pn,Me]),bn=function(e,t){const[n,i]=d([]),o=c(/* @__PURE__ */new Set),r=s(()=>{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]),a=s(()=>e?function(e){const t=/* @__PURE__ */new Set;for(const n of e)if(ue(n))for(const e of fe(n))t.add(e);return[...t]}(t).filter(e=>!r.has(e)):[],[e,t,r]);return l(()=>{if(!e||0===a.length)return;const t=a.filter(e=>!o.current.has(e));if(0===t.length)return;for(const e of t)o.current.add(e);let n=!1;return e.getPropositionsByIds(t).then(e=>{!n&&e.length>0&&i(t=>[...t,...e])}).catch(()=>{}),()=>{n=!0}},[e,a]),r}(ee?null:te,s(()=>[...gt??[],...mn],[gt,mn])),wn=xr(Vt),xn=Vt?Wt(Vt,void 0,zt(Vt,ve)):{min:2,max:12},vn=me??Math.min(xn.max,20),kn=vr(te,wn?Vt.id:null,{selections:Nt,candidate_ids:mn.map(e=>e.id).slice(0,2e3),target_count:vn,rule_id:ve??void 0,stake:ae>0?ae:Vt?.min_bet??1,event_id:be(Vt)?Me??void 0:void 0}),[Bn,Cn]=d({gameId:void 0,client:null,rows:[]}),Sn=Bn.gameId===Vt?.id&&Bn.client===te?Bn.rows:[],zn=o((e,t)=>!wn||Nt[e]===t||!(e in Nt)&&!!kn.answers.get(e)?.[t],[wn,Nt,kn.answers]),Wn=s(()=>{const e=kn.data?.propositions??(kn.loading?kn.displayPropositions??mn:mn.filter(e=>kn.answers.has(e.id)));return[...new Map([...e,...Sn.filter(e=>e.id in Nt),...mn.filter(e=>e.id in Nt)].map(e=>[e.id,e])).values()]},[kn.data,kn.loading,kn.displayPropositions,kn.answers,mn,Sn,Nt]),[Fn,An]=d(null);l(()=>{Fn&&cl(Nt,Fn.after).length>0&&An(null)},[Nt,Fn]);const[Pn,Tn]=d({}),Dn=s(()=>Object.keys(Pn).map(Number).filter(e=>Nt[e]===Pn[e]),[Pn,Nt]),Hn=s(()=>Ge(an,Nt,bn,Vt),[an,Nt,bn,Vt]),Mn=o((e,t)=>{const n=()=>{An(null),Tn(t=>{if(!(e in t))return t;const n={...t};return delete n[e],n}),en(e,t)};if(wn){if(Nt[e]===t)return void n();if(!kn.answers.get(e)?.[t]||e in Nt)return;return Ln(e),void n()}if(!(e in Nt)){const t=an.find(t=>t.id===e);if(t&&Hn.isCapped(t))return}n()},[wn,kn.answers,kn.data,Vt?.id,te,Nt,an,Hn,en]);function Ln(e){const t=kn.data?.propositions?.find(t=>t.id===e);t&&Cn(n=>({gameId:Vt?.id,client:te,rows:[...n.gameId===Vt?.id&&n.client===te?n.rows.filter(t=>t.id!==e):[],t]}))}const Rn=(e,t,n)=>{const i={...Nt};for(const o of n)delete i[o];i[e]=t,wn&&Ln(e);for(const[o,r]of cl(Nt,i))en(o,r);An({message:"Swapped your pick",kind:"swap",before:Nt,after:i})},In=Object.keys(Nt).map(Number),On=In.length,jn=c([]);jn.current=ul(jn.current,Nt);const En=jn.current,Un=s(()=>[...new Map([...pn,...wn?Sn:[]].map(e=>[e.id,e])).values()].filter(e=>In.includes(e.id)),[pn,In,wn,Sn]);l(()=>{v||Pe||1===Ct.length&&Te(Ct[0])},[v,Pe,Ct]),l(()=>{if(!Vt)return;const e=an,t=new Set(e.map(vt));let n=Pe;n&&t.has(n)||(n=1===t.size?Array.from(t)[0]:null,n!==Pe&&Te(n));const i=n?e.filter(e=>vt(e)===n):e,o=new Set(function(e){const t=/* @__PURE__ */new Set;for(const n of e){const i=wt(n,e);"Other"!==i&&t.add(i)}return[...t]}(i)),r=Vt.allowed_sports;He(e=>e&&o.has(e)&&(!r?.length||r.includes(e))?e:1===r?.length&&o.has(r[0])?r[0]:1===o.size?Array.from(o)[0]:(()=>{const e=/* @__PURE__ */new Map;for(const o of i){const t=wt(o,i);"Other"!==t&&(r?.length&&!r.includes(t)||e.set(t,(e.get(t)??0)+1))}let t=null,n=0;for(const[i,o]of e)o>n&&(t=i,n=o);return t})())},[Vt?.id,an,Pe]),l(()=>{rt()},[Vt?.id,Et,rt]),l(()=>{Vt&&Ft&&(jt(Vt,Ft)||Kt())},[Vt,Ft,Kt]),l(()=>{Vt&&(Ut(Vt,Pt,{category:Ft,sport:De,sportBaseKey:F})||Kt())},[Vt,Ft,De,F,Pt,Kt]),l(()=>{if(Vt){const e=Fe.current,t=Ae.current!==Vt.id;if(Ae.current=Vt.id,null!=e?.stake&&e.stake>0?se(e.stake):t&&se(Math.max(20,Vt.min_bet??0)),e){const{count:t}=e;return Fe.current=null,we(t),void ie(t)}if(!t)return;if(Vt.allowed_propositions&&Vt.allowed_propositions.length>0){const e=me;null!=e&&Vt.allowed_propositions.includes(e)?ie(e):(we(void 0),ie(0))}else we(void 0),ie(Vt.num_propositions||Vt.max_propositions||0)}},[Vt]);const Gn=(e,t,n)=>{const i=(st??[]).find(t=>t.id===e)??(Vt?.id===e?Vt:null),o=(ut[e]?.top_payouts??[]).find(e=>e.proposition_count===t),r=o&&o.bet_amount&&o.bet_amount>0?o.bet_amount:20,l=o&&r>0?wr(o.net_payout/r*n,i):0;return l>0?l:br(i,t,n)};l(()=>{if("sport"!==Et&&"confirm"!==Et||!Vt||ee)return;const e=be(Vt)&&Me?mn.length:Number.MAX_SAFE_INTEGER;let t;if(Vt.allowed_propositions&&Vt.allowed_propositions.length>0){const n=Vt.allowed_propositions?[...Vt.allowed_propositions].filter(t=>t<=e).sort((e,t)=>e-t):[];if(0===n.length)return void ye({});const i=me??n[0],o=n.filter(e=>e>i);if(0===o.length)return void ye({});t=[i,...o]}else{const{min:n,max:i}=Wt(Vt),o=Math.min(i,e);if(n<=0||o<=n)return void ye({});t=Array.from({length:o-n+1},(e,t)=>n+t)}const n={};for(const i of t)n[i]=Gn(Vt.id,i,20);ye(n)},[Et,Vt,me,Me,mn.length,ee,ut]),l(()=>{if("confirm"!==Et||!Vt)return;const e=In.length;if(0===e)return;let t=!1;const n={};for(let o=0;o<=e;o++)n[o]=Gn(Vt.id,o,ae);if(ge(n),e!==le.current?(le.current=e,ie(e)):(ne>e||ne<=0&&e>0)&&ie(e),ee)return;const i=ae>0?ae:Math.max(Vt.min_bet??20,.01);return(async()=>{try{const n=await lt(Vt.id,{actual:ne,predicted:ne,total:e,bet_amount:i,rule_id:ve});if(t)return;if(de(n.winning_counts),ae>0&&n.payouts){const e={};for(const[t,i]of Object.entries(n.payouts)){const n=Number(t);e[n]=i>0?wr(i,Vt):Gn(Vt.id,n,ae)}ge(e)}}catch{t||de([])}})(),()=>{t=!0}},[Et,Vt,In.length,ne,ae,lt,ut,ve,ee]);const Vn=s(()=>zt(Vt,ve),[Vt,ve]),Nn=!be(Vt)||ze(Un,Me),Xn=Vt?Wt(Vt,void 0,Vn):null,qn=wn?Boolean(kn.data?.can_submit&&Nn):!(!Vt||!Nn)&&(Vt.allowed_propositions&&Vt.allowed_propositions.length>0?null!=me&&On===me&&St(On,Xn?.min,Xn?.max):St(On,Xn?.min,Xn?.max)),Kn=Vt?.min_bet??0,Qn=Math.max(Kn,.01),Zn=null==Be||ae<=Be,$n=!it&&ae>=Qn&&qn&&Zn,[_n,ei]=d(!1);l(()=>{ei(!1)},[Et,Vt,Nt,ae,ne]);const ti=e=>{if(we(e),ie(e),e!==me)for(const t of Object.keys(Nt))en(Number(t),Nt[Number(t)])},ni=e=>{we(e),ie(e)},ii=e=>{Fr(e,t)&&(e.id!==Vt?.id&&ke(null),Le(be(e)?z??null:null),qt(e))},oi=e=>{if(e!==Me){for(const e of Object.keys(Nt)){const t=Number(e);en(t,Nt[t])}Le(e)}},ri=(e,t="fill")=>{if(wn)return 0;const n=function({selections:e,pickOrder:t,propositions:n,count:i,mode:o,componentById:r,game:l,coin:a=()=>Math.random()<.5?"yes":"no"}){const s=Math.max(0,i),c=[...t.filter(t=>t in e),...Object.keys(e).map(Number).filter(e=>!t.includes(e))];if("fill"===o&&c.length>s){const t={};for(const n of c.slice(0,s))t[n]=e[n];return{next:t,added:{},removed:c.length-s,kept:s}}const d="replace"===o?{}:{...e},h=n.filter(e=>e.id in d),u=Xe(Ne(n.filter(e=>!(e.id in d))),s-h.length,r,l,h),f={};for(const g of u)f[g.id]=a();return{next:{...d,...f},added:f,removed:0,kept:h.length}}({selections:Nt,pickOrder:En,propositions:mn,count:e,mode:t,componentById:bn,game:Vt}),i=Object.keys(n.added).length;if(0===n.removed&&0===i&&"fill"===t)return n.kept;for(const[l,a]of cl(Nt,n.next))en(l,a);const o=n.removed?(r=n.removed,`Removed your last ${Jr(r)}`):"replace"===t?function(e){return`Randomised all ${Jr(e)}`}(i):Zr(i);var r;return An({message:o,kind:"quickpick",before:Nt,after:n.next}),Tn(e=>"replace"===t?n.added:n.removed?Object.fromEntries(Object.entries(e).filter(([e])=>Number(e)in n.next)):{...e,...n.added}),n.kept+i},li=()=>{if(0!==On){for(const[e,t]of cl(Nt,{}))en(e,t);var e;An({message:(e=On,`Cleared ${Jr(e)}`),kind:"clear",before:Nt,after:{}})}},ai=()=>{if(Fn){for(const[e,t]of cl(Nt,Fn.before))en(e,t);An(null)}},si=(e,n,i)=>{if(!Fr(e,t))return;if(xr(e))return void ii(e);const o=e.allowed_sports??[];let r=null;De&&(0===o.length||o.some(e=>Mt(De,e,F)))?r=De:1===o.length&&(r=o[0]);const l=It(Yt(gt??[],e,F),{category:Ft,sportBaseKey:F});if(0===l.length)return;const a=t=>Xe(Ne(t?It(l,{sport:t,sportBaseKey:F}):l),Math.max(0,n),bn,e),s=/* @__PURE__ */new Map;for(const t of l){const e=wt(t,l);"Other"!==e&&s.set(e,(s.get(e)??0)+1)}const c=[...s.keys()].sort((e,t)=>(s.get(t)??0)-(s.get(e)??0));let d=r??c[0]??null,h=a(d);for(const t of c){if(h.length>=n)break;if(t===d)continue;const e=a(t);e.length>h.length&&(h=e,d=t)}r=d;const u=Vt?.id===e.id;u||ke(null),Fe.current=u?null:{count:n,stake:i},qt(e),ht(e.id),He(r),u&&(we(n),ie(n),null!=i&&i>0&&se(i));for(const t of Object.keys(Nt)){const e=Number(t);en(e,Nt[e])}const f={};for(const t of h)f[t.id]=Math.random()<.5?"yes":"no",en(t.id,f[t.id]);Tn(f),An({message:Zr(h.length),kind:"quickpick",before:u?Nt:{},after:f}),Jt()},ci=c(!1),di=async()=>{if(!Vt||!qn||ci.current)return!1;if(!_n)return ei(!0),!1;if(ei(!1),ee){const e={id:Math.floor(1e4*Math.random()),game_id:Vt.id,user_id:u,proposition_ids:In,selections:Nt,pending:!0,expected_correct:ne,bet_amount:ae};return j?.(e),Zt(e),We(),!0}ci.current=!0;try{U&&await U(ae);const e=await nt({game_id:Vt.id,user_id:u,proposition_ids:In,selections:Nt,stake:ae,rule_id:Vn?.id??null});return j?.(e),Zt(e),We(),!0}catch(e){return!1}finally{ci.current=!1}},hi=o(e=>function(e,t){const{overrides:n,summaryLabel:i,sportBaseKey:o}=t,r=n?.[e];return r||(o&&e.startsWith(`${o}_`)?Tt(e,void 0,o):i||Tt(e,void 0,o))}(e,{overrides:Q,summaryLabel:gn.find(t=>t.key===e)?.label,sportBaseKey:F}),[Q,gn,F]),fi=o(e=>Dt(e,J),[J]),gi=o(()=>{qn&&Jt()},[qn,Jt]);l(()=>{Vt&&!Fr(Vt,t)&&Kt()},[Vt,t,Kt]);const pi=s(()=>({gameLibrary:t,getGameFlow:e=>function(e,t){if(e?.quick_pick_only)return"quick_pick";const n=Wr(e,t);return n?.flow?n.flow:e&&zr(e)?"selections":ar(e)}(e,t),theme:Z,bodyFont:$,headingFont:_,games:Rt,propositions:wn?Wn:mn,compositeComponentById:bn,propositionsForCategoryPicker:dn,availableCategories:un,sportsForSelectedGame:cn,sportOptions:sn,propositionsForSportPicker:fn,sportSummaries:gn,loading:rn,error:ln,step:Et,selectedGame:Vt,selections:Nt,placedEntry:Xt,selectedPropositionIds:In,selectedPropositions:Un,selectionValid:qn,selectedRuleId:ve,setSelectedRuleId:ke,selectedRule:Vn,answeredCount:On,pickOrder:En,betAmount:ae,setBetAmount:se,expectedCorrect:ne,setExpectedCorrect:ie,selectedPropositionCount:me,handlePropositionCountChange:ti,upgradePropositionCount:ni,previewCallPayouts:ee?void 0:at,winningCounts:ce,payouts:he,overloadPayouts:pe,submitting:it,submitError:ot,canSubmit:$n,gamePrice:Kn,userBalance:Be,hasSufficientBalance:Zn,refreshUserBalance:We,handleSubmit:di,confirmPending:_n,entryReference:G,selectGame:ii,goToSportSelection:Qt,goToConfirmation:wn?gi:Jt,goBack:$t,reset:_t,clearSelectedGame:Kt,correlation:kn,correlationTargetCount:vn,showCorrelationDebug:n,canSelectAnswer:zn,toggleSelection:Mn,quickPickGame:si,quickPickSelections:ri,quickPickedIds:Dn,clearSelections:li,swapSelection:Rn,selectionUndo:Fn,undoSelectionChange:ai,dismissSelectionUndo:()=>An(null),selectedCategory:Pe,setSelectedCategory:Te,selectedSport:De,setSelectedSport:He,selectedEventId:Me,sameGameMultiEvents:yn,selectSameGameMultiEvent:oi,apiUrl:i,apiKey:r,fetchImpl:a,getAuthHeaders:h,userId:u,disableQuickPick:A,renderTeamLogo:P,renderPropositionSilk:T,uiVariant:D,selectionVariant:H,gameVariant:M,disableEventSwipe:L,swipeVariant:R,enableSportFavourites:I,filterSport:C,initialSport:S,initialEventId:z,sportBaseKey:F,gameCategory:v,eventFilterActive:nn,eventFilterLabel:on,clearEventFilter:tn,screenSize:q,displaySportName:hi,displayCategoryName:fi,maxPayouts:ut??{},howToPlayMarkdown:ct,onEntryPlaced:j,onCancel:V,onShare:Y,onRecharge:N,demoEntries:w,demoGames:m,demoPropositions:b}),[t,Z,$,_,Rt,mn,bn,dn,un,fn,cn,sn,gn,rn,ln,kn,vn,n,zn,wn,Wn,gi,Et,Vt,Nt,Xt,In,Un,qn,On,En,Dn,Fn,ae,ne,me,ve,Vn,at,ee,ce,he,pe,it,ot,$n,_n,G,Kn,i,r,u,Be,a,h,A,P,T,D,H,M,L,R,I,C,S,z,F,v,q,nn,on,tn,Pe,De,Me,yn,ut,ct,j,V,Y,N,X,w,m,b,ti,hi,fi]),yi=e.useMemo(()=>({yes:O?.yes??pt.yes,no:O?.no??pt.no}),[O?.yes,O?.no]),mi=s(()=>oe(...t.map(e=>e.artwork)),[t]);/* @__PURE__ */
12
- return E(gl.Provider,{value:pi,children:/* @__PURE__ */E(Wi,{value:yi,children:/* @__PURE__ */E(Jn.Provider,{value:D,children:/* @__PURE__ */E(re.Provider,{value:mi,children:/* @__PURE__ */E(ui,{theme:Z,children:g})})})})})}var bl=12,wl=16,xl=44,vl=44,kl=52,Bl=16,Cl=12,Sl=8,zl=6,Wl=3,Fl=4,Al=16,Pl=26;function Tl(e){const t=r(gl);return e??t?.theme??Fn}function Dl(e,t){const n="dark"===e.colorScheme;return t?{shadowColor:"#000",shadowOpacity:n?.5:.14,shadowRadius:24,shadowOffset:{width:0,height:12},elevation:6}:{shadowColor:"#000",shadowOpacity:n?.4:.08,shadowRadius:12,shadowOffset:{width:0,height:6},elevation:2}}function Hl({theme:e,padded:t=!0,style:n,...i}){const o=Tl(e);/* @__PURE__ */
13
- return E(W,{...i,style:[{backgroundColor:kn(o),borderWidth:1,borderColor:o.colors.border,borderRadius:sn(o,wl),padding:t?Bl:0},Dl(o,!1),n]})}function Ml({theme:e,style:t,...n}){const i=Tl(e);/* @__PURE__ */
14
- return E(W,{...n,style:[{gap:Sl,padding:Cl,backgroundColor:kn(i),borderWidth:1,borderColor:i.colors.border,borderRadius:sn(i,wl)},Dl(i,!0),t]})}function Ll({theme:e,selected:t,sub:n,disabled:i,onPress:o,accessibilityLabel:r,accessibilityRole:l="button",testID:a,style:s,children:c}){const d=Tl(e),{hovered:h,pressed:u,handlers:f}=wi(),g=di(d,t,{hovered:h,pressed:u,disabled:i}),p=Yr(d);/* @__PURE__ */
15
- return U(z,{...f,accessibilityRole:l,accessibilityLabel:r,accessibilityState:{selected:t,disabled:!!i},disabled:i,onPress:o,testID:a,activeOpacity:1,style:[{minHeight:null!=n?kl:vl,paddingHorizontal:12,paddingVertical:6,borderRadius:sn(d,bl),borderWidth:1,borderColor:g.borderColor,backgroundColor:g.background,alignItems:"center",justifyContent:"center",opacity:g.opacity},xi(u,i),s],children:["string"==typeof c?/* @__PURE__ */E(fi,{style:{color:g.color,fontFamily:p,fontSize:14,fontWeight:"700"},children:c}):c,null!=n?/* @__PURE__ */E(fi,{style:{color:g.color,fontFamily:p,fontSize:12,fontWeight:"600",opacity:.8},children:n}):null]})}function Rl({theme:e,states:t,label:n,style:i}){const o=Tl(e).colors;/* @__PURE__ */
16
- return E(W,{accessible:!!n,accessibilityRole:n?"image":void 0,accessibilityLabel:n,style:[{flexDirection:"row",gap:Fl},i],children:t.map((e,t)=>/* @__PURE__ */E(W,{style:{flex:1,height:zl,borderRadius:Wl,backgroundColor:"right"===e?o.primary:"miss"===e?o.background:o.border,borderWidth:"miss"===e?1.5:0,borderColor:"miss"===e?o.textMuted:void 0}},t))})}function Il({drawn:e,frame:t,dim:n=!1}){const i=t.size,o=e=>({position:"absolute",left:e.left*i,top:e.top*i,width:e.size*i,height:e.size*i}),r={position:"absolute",top:0,left:0,right:0,bottom:0};/* @__PURE__ */
17
- return U(W,{pointerEvents:"none",accessibilityElementsHidden:!0,importantForAccessibility:"no-hide-descendants",style:{...r,opacity:n?.55:1},children:[e.pattern?/* @__PURE__ */E(W,{style:r,children:/* @__PURE__ */E(I,{xml:e.pattern,width:"100%",height:"100%"})}):null,/* @__PURE__ */U(W,{style:{position:"absolute",left:t.left,right:t.right,top:t.top,width:i,height:i},children:[e.tiles.map((e,t)=>/* @__PURE__ */E(W,{style:{...o(e),borderRadius:e.radius*i,backgroundColor:e.color,opacity:e.opacity}},`tile-${t}`)),e.layers.map((e,t)=>/* @__PURE__ */E(W,{style:{...o(e),opacity:e.opacity??1},children:/* @__PURE__ */E(I,{xml:e.xml,width:"100%",height:"100%"})},t))]})]})}function Ol({ring:e,radius:t,lit:n,children:i,style:o,...r}){const{hovered:l,pressed:a,handlers:s}=wi();/* @__PURE__ */
18
- return U(z,{accessibilityRole:"button",...r,...s,activeOpacity:1,style:[o,xi(a)],children:[i,(n||l)&&/* @__PURE__ */E(W,{pointerEvents:"none",style:{position:"absolute",top:0,right:0,bottom:0,left:0,borderWidth:3,borderColor:e,borderRadius:t}})]})}var jl="#C9CDD2";function El(e){const t=e.trim();if(!t)return null;const n=t.split(/\t+|\s{2,}/).map(e=>e.trim()).filter(Boolean);if(n.length<3)return null;const i=n[n.length-1];return"YES"!==n[n.length-2].toUpperCase()||"NO"!==i.toUpperCase()?null:{question:n.slice(0,-2).join(" ")}}function Ul(e){return`<table class="props">\n${e.map(e=>{return`<tr><td class="q">${t=e.question,t.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;")}</td><td class="yes">YES</td><td class="no">NO</td></tr>`;var t}).join("\n")}\n</table>`}var Gl='\n :root {\n --blue: #1F4E79;\n --ink: #1A1A1A;\n --grey: #5A5A5A;\n --green: #166534;\n --red: #991B1B;\n --fill-q: #F9FAFB;\n --fill-yes: #DCFCE7;\n --fill-no: #FEE2E2;\n --rule: #D0D7DE;\n }\n * { box-sizing: border-box; }\n html, body {\n margin: 0;\n padding: 0;\n background: #FFFFFF;\n color: var(--ink);\n font-family: "Aptos", "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;\n font-size: 16px;\n line-height: 1.5;\n -webkit-font-smoothing: antialiased;\n }\n .page {\n max-width: 720px;\n margin: 0 auto;\n padding: 32px 24px 56px;\n }\n p { margin: 0 0 14px; }\n\n .masthead { text-align: center; margin-bottom: 8px; }\n .kicker {\n color: var(--blue);\n font-weight: 700;\n letter-spacing: 0.16em;\n font-size: 15px;\n margin-bottom: 6px;\n }\n .logo {\n display: block;\n width: 280px;\n max-width: 72%;\n height: auto;\n margin: 0 auto 12px;\n }\n .headline {\n color: var(--ink);\n font-weight: 700;\n font-size: 34px;\n line-height: 1.15;\n margin: 0 0 4px;\n }\n .headline.lg { font-size: 44px; }\n .subhead {\n color: var(--grey);\n font-weight: 700;\n letter-spacing: 0.12em;\n font-size: 15px;\n margin-top: 6px;\n }\n .lede {\n color: var(--blue);\n font-style: italic;\n font-size: 20px;\n text-align: center;\n margin: 18px 0 22px;\n }\n .rule {\n border: 0;\n border-bottom: 2.5px solid var(--blue);\n margin: 14px 0 22px;\n }\n\n h2.cap {\n color: var(--blue);\n font-weight: 700;\n letter-spacing: 0.06em;\n font-size: 16px;\n text-transform: uppercase;\n margin: 30px 0 12px;\n }\n h3.sub {\n color: var(--ink);\n font-weight: 700;\n font-size: 18px;\n margin: 26px 0 10px;\n }\n\n .step {\n font-weight: 700;\n font-size: 18px;\n margin: 22px 0 8px;\n }\n .step .num { color: var(--blue); }\n .step .label { color: var(--ink); }\n\n .props {\n width: 100%;\n border-collapse: collapse;\n margin: 8px 0 18px;\n }\n .props td {\n border: 1px solid #C9CDD2;\n padding: 11px 14px;\n font-size: 15px;\n }\n .props .q { background: var(--fill-q); width: 64%; }\n .props .yes {\n background: var(--fill-yes);\n color: var(--green);\n font-weight: 700;\n text-align: center;\n letter-spacing: 0.04em;\n }\n .props .no {\n background: var(--fill-no);\n color: var(--red);\n font-weight: 700;\n text-align: center;\n letter-spacing: 0.04em;\n }\n\n .divider {\n border: 0;\n border-top: 1px solid var(--rule);\n margin: 48px 0;\n }\n\n .footnote {\n color: var(--grey);\n font-style: italic;\n font-size: 13px;\n border-top: 1px solid var(--rule);\n padding-top: 14px;\n margin-top: 30px;\n }\n\n @media (max-width: 480px) {\n .page { padding: 24px 18px 44px; }\n .headline { font-size: 28px; }\n .headline.lg { font-size: 34px; }\n .lede { font-size: 18px; }\n }\n'.trim();function Vl(e){let t=e.trim();for(;;){const e=t.match(/^<!--[\s\S]*?-->\s*/);if(!e)break;t=t.slice(e[0].length).trimStart()}return t}var Yl=/^<(main|section|article|div|style|table|h[1-6]|p|ul|ol|hr)\b/i,Nl=/<(section|article|main|div\s+class=["']masthead|h[12]\s+class=["'](?:cap|headline)|h3\s+class=["']sub|table\s+class=["']props|hr\s+class=["']divider)\b/i;function Xl(e){return/^<!DOCTYPE\s+html/i.test(e)||/^<html[\s>]/i.test(e)}function ql(e,t){const n=e.trim();if(!n)return"";if(Xl(n))return n;const i=function(e,t){if(!t)return e;if(/class=["']logo["']/i.test(e))return e;const n=`<img class="logo" src="${t.replace(/&/g,"&amp;").replace(/"/g,"&quot;")}" alt="YESNO Multi" />`;return/<div class=["']masthead["']>/i.test(e)?e.replace(/(<div class=["']masthead["']>)/i,`$1\n ${n}`):e}(function(e){return/<table\s+class=["']props["']/i.test(e)?e:function(e){const t=e.replace(/\r\n/g,"\n").split("\n"),n=[];let i=0;for(;i<t.length;){const e=El(t[i]);if(e){const o=[e];let r=i+1;for(;r<t.length;){const e=El(t[r]);if(!e)break;o.push(e),r+=1}n.push(Ul(o)),i=r;continue}n.push(t[i]),i+=1}return n.join("\n")}(function(e){const t=/<p(?:\s[^>]*)?>([\s\S]*?)<\/p>/gi;let n,i="",o=0;const r=[],l=()=>{0!==r.length&&(i+=Ul([...r]),r.length=0)};for(;null!==(n=t.exec(e));){i+=e.slice(o,n.index);const a=n[1].replace(/<br\s*\/?>/gi,"\n").trim().split("\n").map(e=>e.trim()).filter(Boolean).map(e=>El(e));a.length>0&&a.every(e=>null!==e)?r.push(...a):(l(),i+=n[0]),o=t.lastIndex}return l(),i+=e.slice(o),i}(e))}(function(e){const t=Vl(e),n=t.match(/^<main[^>]*>([\s\S]*)<\/main>$/i);return n?n[1].trim():t}(n)),t);return`<!DOCTYPE html>\n<html lang="en-AU">\n<head>\n<meta charset="UTF-8">\n<meta name="viewport" content="width=device-width, initial-scale=1.0">\n<title>YES NO - How to Play</title>\n<style>${Gl}</style>\n</head>\n<body>\n<main class="page">\n${i}\n</main>\n</body>\n</html>`}var Kl=/^(#{1,3})\s+(.+)$/,Ql=/^[-*]\s+(.+)$/,Jl=/^-{3,}$/,Zl=/\b(YES|NO)\b/;function $l(e,t,n){return e.split(Zl).map((e,i)=>"YES"===e||"NO"===e?/* @__PURE__ */E(Mi,{theme:t,value:"YES"===e?"yes":"no",size:"sm"},`${n}-${i}`):/* @__PURE__ */E(fi,{children:e},`${n}-${i}`))}function _l({segments:e,theme:t,bodyFont:n}){/* @__PURE__ */
19
- return E(fi,{style:[na.summary,{color:t.colors.text,fontFamily:n}],children:e.map((e,n)=>"string"==typeof e?/* @__PURE__ */E(fi,{children:$l(e,t,n)},n):/* @__PURE__ */E(Mi,{theme:t,value:e.tone,size:"sm"},n))})}function ea({theme:e,font:t,active:n,onSelect:i,children:o}){const r=e.colors,{hovered:l,pressed:a,handlers:s}=wi(),c=n?null:ai(r.primary,{hovered:l,pressed:a});/* @__PURE__ */
20
- return E(z,{...s,onPress:i,accessibilityRole:"tab",accessibilityState:{selected:n},activeOpacity:1,style:[na.segment,{borderRadius:sn(e,8),borderColor:c?.borderColor??"transparent",backgroundColor:n?r.primary:c?.background??"transparent"},xi(a)],children:/* @__PURE__ */E(fi,{style:[na.segmentText,{color:n?r.primaryText:r.textMuted,fontFamily:t}],children:o})})}function ta({panel:e,theme:t,dividends:n,bodyFont:i,headingFont:o}){const r=t.colors,l=t.brand?.accent??r.primaryText,a=kn(t),[s,c]=d("learn"),[h,u]=d(()=>e.demoLegs.map(()=>null)),[f,g]=d(!1),p=e.demoLegs.length,y=h.filter(e=>null!=e).length,m=y===p,b=e.demoLegs.filter((e,t)=>h[t]===e.outcome).length,w=function(e,t,n){const i=t===n,o=`${t} of ${n}`;switch(e){case"mirror":return i?{won:!0,message:`All ${n} right — that is the sweep, the card pays.`}:0===t?{won:!0,message:`All ${n} wrong — a full mirror sweep pays the same as perfect.`}:{won:!1,message:`${o} is a split card. Mirror pays all right or all wrong — nothing in between.`};case"ladder":return i?{won:!0,message:`Top rung — all ${n} right stacks every prize on the ladder into one payout.`}:t>=n-1?{won:!0,message:`${o} reaches a rung — it pays, and every extra leg right stacks the next prize on top.`}:{won:!1,message:`${o} does not reach the first rung — the climb starts at ${n-1} right.`};case"safety_net":return i?{won:!0,message:`Clean sweep — all ${n} right takes the full prize.`}:t===n-1?{won:!0,message:"One miss — the net catches it and the entry still pays."}:{won:!1,message:`${o} is more than the net holds — one miss is covered, two is not.`};case"six_again":return i?{won:!0,message:`All ${n} right — the card pays, and Golden Point doubles it.`}:t===n-1?{won:!1,message:`${o} — one call away. The Captain’s Challenge is the boost that collects on this card.`}:{won:!1,message:`${o} — every call has to land. Flip the misses and the card pays.`};case"game_set":return i?{won:!0,message:`Game, set, bet — all ${n} legs landed and the card pays.`}:{won:!1,message:`${o} — every leg has to land. Flip the misses and it is straight sets.`};case"pick_your_dividend":return i?{won:!0,message:`All ${n} right — the entry pays the dividend you picked.`}:{won:!1,message:`${o} — every leg has to land to collect your dividend.`};default:return i?{won:!0,message:`Perfect card — all ${n} legs landed, the prize is yours.`}:{won:!1,message:`${o} — one miss breaks a perfect card. Flip the misses and it pays.`}}}(e.id,b,p),x=(e,t)=>{f||u(n=>n.map((n,i)=>i===e?t:n))},v=f?"Settled":`${y} of ${p} called`,k=!f&&m;/* @__PURE__ */
11
+ return E(f.View,{style:[n,{transform:o}],children:i})}var Ri=4,Ii=6,Oi=[4,12],ji=[5,10,20,50];function Ei(e){return!!e&&!e.quick_pick_only&&"safety_net"===(e.rule??"").trim().toLowerCase()}function Ui(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 Gi(e,t){return t>0&&e>=t?Math.round(e/t)*t:Math.round(e)}function Vi(e,t){if(t<0||t>e)return 0;let n=1;for(let i=0;i<t;i+=1)n=n*(e-i)/(i+1);return Math.round(n)}function Yi(e,t,n,i){const o=Math.max(0,Math.min(n,t)),r=e*i.perfectMultiple*Math.pow(2,t-i.perfectBaseLegs),l=o>0?e*(1-i.margin)*i.nearMissBudgetFraction/o:0,a=Math.pow(1/i.perLegProbability,t),s=[];let c=Vi(t,0);for(let d=1;d<=o;d+=1)c+=Vi(t,d),s.push(Gi(l*a/c,i.roundTo));return{legs:t,stake:e,allowedMisses:o,perfect:r,nearMiss:s,sweep:r+s.reduce((e,t)=>e+t,0)}}function Ni(e,t){if(t<0||t>e.allowedMisses)return 0;let n=0===t?e.perfect:0;for(let i=Math.max(1,t);i<=e.nearMiss.length;i+=1)n+=e.nearMiss[i-1];return n}function Xi(e){return e.includes(8)?8:e[Math.floor(e.length/2)]}function qi(e){return e.toLowerCase().replace(/[^a-z]+/g," ").trim()}function Ki(e,t){const n=qi(t);return e.permitted_rules?.find(e=>qi(e.name??"").includes(n))??null}function Qi(e,t,n){const i=t?.min_propositions??n,o=t?.max_propositions??null;return e.filter(e=>e>=i&&(null==o||e<=o))}function Ji(e){if(!Ei(e)||!e)return null;const t=e.min_propositions??e.allowed_propositions?.[0]??Oi[0],n=e.max_propositions??e.allowed_propositions?.[e.allowed_propositions.length-1]??Oi[1],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),o=Ki(e,"Extra Shot"),r=Ki(e,"Double Shot"),l=Qi(i,o,4).filter(e=>e>1),a=Qi(i,r,6).filter(e=>e>2);if(0===l.length)return null;const s=[{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:Xi(l),ruleId:o?.id??null}],c=!e.permitted_rules?.length||!!r;a.length>0&&c&&s.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:Xi(a),ruleId:r?.id??null});const d=Math.max(e.min_bet??5,.01),h=e.max_bet??null,u=ji.filter(e=>null===h||e<=h);return{modes:s,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:Ui(e)}}function Zi(e){return[{id:`target-${e}`,label:"Perfect pick",stat:"Top payout",detail:["Get every pick right","nothing else pays"],emphasis:!0,expectedCorrect:e}]}function $i(e,t,n){const i=Math.max(0,e-t),o=Yi(20,e,i,n),r=[];for(let l=0;l<=i;l+=1){const t=Math.round(Ni(o,l));r.push({misses:l,label:`${e-l}/${e}`,multiplier:t/20,payout20:t})}return r}function _i(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:$i(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:$i(e,e-2,t),expectedCorrect:e-2}]}function eo(e,t){if(!e||e.quick_pick_only)return null;const n=function(e){return(e??"").trim().toLowerCase()}(e.rule),i=t??e.num_propositions??e.min_propositions??e.allowed_propositions?.[0]??0;return"safety_net"===n&&i>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:_i(t,Ui(e)),continueLabel:"Continue to picks"}}(e,i):"exact"===n&&i>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:Zi(t),continueLabel:"Continue to picks"}}(0,i):"pick"===n&&i>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,i):null}function to(e){return null!=eo(e)}var no=[1,5,10,20,50,100],io=[4,12];function oo(e){return!!e&&!e.quick_pick_only&&"game_set"===(e.rule??"").trim().toLowerCase()}function ro(e,t,n){const i=n?.operatorMargin??.2,o=n?.perLegProbability??.5,r=Math.round(Math.pow(1/o,t)),l=(1-i)*Math.pow(1/o,t);return{legs:t,stake:e,prize:Math.round(e*l*100)/100,multiple:l,oddsOneIn:r}}function lo(e){if(!oo(e)||!e)return null;const t=e.min_propositions??e.allowed_propositions?.[0]??io[0],n=e.max_propositions??e.allowed_propositions?.[e.allowed_propositions.length-1]??io[1],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);if(0===i.length)return null;const o=Math.max(e.min_bet??1,.01),r=e.max_bet??null,l=no.filter(e=>e>=o&&(null===r||e<=r));return{legOptions:i,defaultLegs:i.includes(8)?8:i[Math.floor(i.length/2)],defaultStake:Math.min(Math.max(20,o),r??20),minStake:o,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 ao=[500,1e3,2500,5e3,7500,1e4,12500,15e3],so=[12,11,10,9,8,7,6];function co(e){return!!e&&!e.quick_pick_only&&"pick_your_dividend"===(e.rule??"").trim().toLowerCase()}function ho(e){return Math.round(100*e)/100}function uo(e,t,n=.21875){const i=Math.pow(2,t),o=e/(1-n)/i,r=Number.isInteger(o),l=ho(o),a=r?o:ho(.96*o);return{legs:t,exactStake:l,stake:a,margin:1-e/(a*i),multiple:e/a,oddsOneIn:i,discounted:!r}}function fo(e,t=so){return{dividend:e,rungs:t.map(t=>uo(e,t))}}function go(e,t){if(!co(e)||!e)return null;const n=e.min_propositions??6,i=e.max_propositions??12,o=so.filter(e=>e>=n&&e<=i);if(0===o.length)return null;const r=t?.dividends??ao;return{dividends:r.map(e=>fo(e,o)),defaultDividend:r.includes(1e4)?1e4:r[Math.floor(r.length/2)],defaultLegs:o.includes(9)?9:o[Math.floor(o.length/2)],tagline:"The dividend is set. The win is yours to build."}}var po=50,yo=[25,50,75,100],mo=[{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 bo(e){return!!e&&!e.quick_pick_only&&"ladder"===(e.rule??"").trim().toLowerCase()}function wo(e,t){return Math.round(e*t/50)}function xo(e,t){let n=0;return e.tiers50.map(([e,i])=>(n+=i,{atLeast:e,prize:wo(i,t),cumulative:wo(n,t)}))}function vo(e,t){return wo(e.tiers50.reduce((e,[,t])=>e+t,0),t)}function ko(e,t,n){return wo(e.tiers50.reduce((e,[n,i])=>n<=t?e+i:e,0),n)}function Bo(e){if(!bo(e)||!e)return null;const t=e.allowed_propositions,n=e.min_propositions??4,i=e.max_propositions??10,o=mo.filter(e=>t&&t.length>0?t.includes(e.legs):e.legs>=n&&e.legs<=i);if(0===o.length)return null;const r=e.min_bet??yo[0],l=e.max_bet??yo[yo.length-1],a=yo.filter(e=>e>=r&&e<=l);return{ladders:o,defaultLegs:o.some(e=>8===e.legs)?8:o[Math.floor(o.length/2)].legs,defaultStake:a.includes(50)?50:a[0]??50,stakes:a.length>0?a:yo,tagline:"Climb the ladder. Every step pays its own prize, and every prize stacks on the one before."}}var Co={signature:1,premier:2,exclusive:3},So=[{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 zo(e){return"number"==typeof e.tier&&Number.isFinite(e.tier)?e.tier:1}function Wo(e,t){return e.filter(e=>zo(e)===t)}function Fo(e){const t=new Set(e.map(zo));return So.filter(e=>t.has(e.level))}function Ao(e){return Fo(e)[0]?.id??"signature"}var Po=.21875;function To(e){return null==e||Math.abs(e-.21875)<5e-5?Po:e}var Do=[1,5,10,20,50],Ho=[4,12];function Mo(e){return(e??"").trim().toLowerCase()}var Lo={straight:"mirror",double:"double_mirror",triple:"triple_mirror"};function Ro(e){if(!e||e.quick_pick_only)return!1;const t=Mo(e.rule);return Object.values(Lo).includes(t)}function Io(e){const t=Mo(e?.rule);return Object.keys(Lo).find(e=>Lo[e]===t)??"straight"}function Oo(e,t,n){const i=To(n?.operatorMargin),o=n?.perLegProbability??.5,r=Math.round(Math.pow(2,t)),l=Math.pow(o,t)+Math.pow(1-o,t),a=Math.round(1/l),s=(1-i)*Math.pow(2,t-1);return{legs:t,stake:e,prize:Math.round(e*s),multiple:s,totalOutcomes:r,winningOutcomes:2,oddsOneIn:a}}function jo(e){if(!Ro(e)||!e)return null;const t=e.min_propositions??e.allowed_propositions?.[0]??Ho[0],n=e.max_propositions??e.allowed_propositions?.[e.allowed_propositions.length-1]??Ho[1],i=Uo(Io(e)),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)).filter(e=>e>=i.minLegs);if(0===o.length)return null;const r=Math.max(e.min_bet??1,.01),l=e.max_bet??null,a=Do.filter(e=>e>=r&&(null===l||e<=l));return{variant:i,legOptions:o,defaultLegs:o.includes(8)?8:o[Math.floor(o.length/2)],defaultStake:Math.min(Math.max(20,r),l??20),minStake:r,maxStake:l,quickStakes:a,tagline:i.tagline,operatorMargin:To(e.operator_margin),perLegProbability:e.payout_structure?.per_leg_probability??.5}}var Eo=[{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 Uo(e){return Eo.find(t=>t.id===e)??Eo[0]}function Go(e,t){if(t<0||t>e)return 0;const n=Math.min(t,e-t);let i=1;for(let o=0;o<n;o++)i=i*(e-o)/(o+1);return Math.round(i)}function Vo(e,t,n,i){const o=Uo(e),r=t*(1-To(i?.operatorMargin)),l=Math.round(Math.pow(2,n)),a=[];let s=0;for(let c=0;c<o.depth;c++){const e=Go(n,c),t=n-c===c?e:2*e;s+=t,a.push({distance:c,label:o.tierNames[c]??`Tier ${c+1}`,correctCounts:n-c===c?[c]:[n-c,c],prize:Math.round(r/o.depth*l/(2*e)),outcomes:t})}return{variant:o.id,legs:n,stake:t,tiers:a,totalOutcomes:l,winningOutcomes:s,oddsOneIn:Math.round(l/s*1e4)/1e4}}var Yo="✓",No="✕";function Xo(e){const{legs:t}=e;return e.tiers.flatMap(e=>e.correctCounts.map(n=>({correct:n,label:n===t?`All ${t} right`:0===n?`All ${t} wrong`:`${n} of ${t} right`,prize:e.prize})))}function qo(e,t){if(!t)return[];const n=zo(t);return n<Co.premier?[]:Eo.flatMap(t=>{const i=e.find(e=>Ro(e)&&Mo(e.rule)===Lo[t.id]&&zo(e)===n);return i?[{variant:t,game:i}]:[]})}function Ko(e){const t=new Set(e.filter(e=>Ro(e)&&Mo(e.rule)===Lo.straight).map(zo));return e.filter(e=>!(Ro(e)&&Mo(e.rule)!==Lo.straight&&t.has(zo(e))))}var Qo=.21875,Jo=6,Zo=5,$o=1,_o=2;function er(e){return!!e&&!e.quick_pick_only&&"six_again"===(e.rule??"").trim().toLowerCase()}var tr={golden_point:!1,captains_challenge:!1};function nr(e,t,n){const i=1+(t.golden_point?1:0)+(t.captains_challenge?1:0),o=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*i,base:o,challenge:r,perfect:o+r,lowestWinningCount:n.legs-(t.captains_challenge?n.challengeMisses:0),ruleId:ir(t,n)}}function ir(e,t){return e.captains_challenge?e.golden_point?t.ruleIds.goldenChallenge:t.ruleIds.challenge:t.ruleIds.base}function or(e,t){const n=nr(1,e,t);return{perfect:n.perfect/n.stake,challenge:n.challenge/n.stake}}function rr(e,t){return e.permitted_rules?.find(e=>t((e.name??"").toLowerCase().replace(/[^a-z]+/g," ").trim()))??null}function lr(e){if(!er(e)||!e)return null;const t=e.num_propositions??e.min_propositions??6;if(t<2)return null;const n=e.operator_margin??.21875,i=Math.max(e.min_bet??10,.01),o=null!=e.max_bet?Math.max(i,Math.floor(e.max_bet/3/i)*i):Math.max(i,100),r=rr(e,e=>e.includes("challenge")&&!e.includes("golden")),l=rr(e,e=>e.includes("challenge")&&e.includes("golden")),a=rr(e,e=>!e.includes("challenge"))??null;return{legs:t,unitMin:i,unitStep:i,unitMax:o,defaultUnit:i,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 ar(e){return e?.quick_pick_only?"quick_pick":oo(e)?"game_set":co(e)?"pick_your_dividend":bo(e)?"ladder":Ro(e)?"mirror":Ei(e)?"safety_net":er(e)?"six_again":be(e)?"selections":to(e)?"rule_setup":"selections"}function sr(e){if(!e||e.quick_pick_only)return!1;if("exact"!==(e.rule??"").trim().toLowerCase())return!1;if(be(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 cr(e){return!(!e||e.quick_pick_only||"exact"!==(e.rule??"").trim().toLowerCase()||be(e)||sr(e))}function dr(e){switch(ar(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 hr(e,t,n){const i=[...new Set((e??[]).filter(e=>Number.isFinite(e)))].sort((e,t)=>t-e);if(i.length<2||t<=0)return[];const o=i.map(e=>({count:e,label:e===t?`Get all ${t}`:0===e?`All ${t} wrong`:`Get ${e}`,prize:n?.[e]??0}));return o.every(e=>e.prize>0)?o:[]}function ur(e,t){return fr(e)&&t&&t>0?t:null}function fr(e){switch(ar(e)){case"game_set":case"pick_your_dividend":case"ladder":case"mirror":case"safety_net":case"six_again":return!0;default:return sr(e)}}function gr(e,t,n){if(!e||!function(e){return!!e&&("game_set"===ar(e)||!fr(e)||sr(e))}(e))return[];const{min:i,max:o}=Wt(e,void 0,t),r=(t?.allowed_propositions??e.allowed_propositions)?.filter(e=>e>=i&&e<=o);return(r&&r.length>0?[...r].sort((e,t)=>e-t):en(i,o)).filter(e=>e>0&&e<=n)}function pr(e,t,n,i){if(e.length>1){const n=e.find(e=>e>=i)??e[e.length-1];return{kind:"menu",counts:[...e],hint:"Choose how many",randomise:t>0?{label:`Randomise all ${n}`,count:n}:void 0}}if(0===t)return{kind:"button",mode:"fill",hint:`Fill all ${n} for me`};if(t>=n)return{kind:"button",mode:"replace",hint:`Randomise all ${n}`};const o=n-t;return{kind:"menu",counts:[],hint:`Fill ${o} for me`,fillLabel:`Fill the other ${o}`,randomise:{label:`Randomise all ${n}`,count:n}}}function yr(e){const t=ar(e);return"six_again"===t||"pick_your_dividend"===t}function mr(e){return"six_again"===ar(e)?"Set by your ticket and boosts.":"Set by your dividend ladder rung."}function br(e,t,n,i){if(!e||t<=0||n<=0)return 0;switch(ar(e)){case"game_set":return wr(ro(n,t,{operatorMargin:e.operator_margin??void 0,perLegProbability:e.payout_structure?.per_leg_probability??void 0}).prize,e);case"mirror":return wr(Vo(Io(e),n,t,{operatorMargin:e.operator_margin??void 0}).tiers[0]?.prize??0,e);case"pick_your_dividend":return function(e,t,n=ao){if(!(e>0&&t>0))return 0;for(const i of n)if(Math.abs(uo(i,e).stake-t)<.005)return i;return 0}(t,n);case"ladder":{const i=mo.find(e=>e.legs===t);return i?wr(vo(i,n),e):0}case"safety_net":{const o=null!=i?.expectedCorrect&&i.expectedCorrect>0?Math.min(2,Math.max(0,t-i.expectedCorrect)):1;return wr(Yi(n,t,o,Ui(e)).sweep,e)}default:{if("exact"!==(e.rule??"").trim().toLowerCase())return 0;const i=function(e,t,n){const i=e.payout_structure;if(!i)return 0;const o=i.results??i.values;if(!o)return 0;const r=o[String(t)];return void 0!==r?r*n:0}(e,t,n);if(i>0)return wr(i,e);const o=e.payout_structure?.expression??e.payout_structure?.formula??"";return/2\s*\^/.test(o)?wr(ro(n,t,{operatorMargin:e.operator_margin??void 0,perLegProbability:e.payout_structure?.per_leg_probability??void 0}).prize,e):0}}}function wr(e,t){return!1===t?.round_payouts?e:Gi(e,t?.payout_structure?.round_to??1)}var xr=e=>"any"===e?.sgm_mode;function vr(e,t,n){const i=JSON.stringify(n),o=JSON.stringify([n.candidate_ids,n.event_id]),r=c(null),[a,h]=d(0),[u,f]=d(null);l(()=>{if(!e||null==t)return;const n=new AbortController,l=setTimeout(()=>{e.getCorrelationSuggestions(t,JSON.parse(i),n.signal).then(l=>{n.signal.aborted||(r.current={client:e,gameId:t,scope:o,rows:l.propositions??[]},f({key:i,client:e,gameId:t,data:l}))}).catch(()=>{n.signal.aborted||f({key:i,client:e,gameId:t,error:"Unable to price these selections. Retry or remove a selection."})})},50);return()=>{clearTimeout(l),n.abort()}},[e,t,i,a,o]);const g=u?.key===i&&u.client===e&&u.gameId===t?u:null,p=s(()=>new Map(g?.data?.choices.map(e=>[e.id,e.answers])??[]),[g]);return{data:g?.data??null,displayPropositions:r.current?.client===e&&r.current.gameId===t&&r.current.scope===o?r.current.rows:null,loading:null!=t&&null!=e&&null==g,error:null==t||e?g?.error??null:"Correlation pricing requires a live API connection.",answers:p,retry:()=>{f(null),h(e=>e+1)}}}var kr="Recalculating your multi…";function Br(e,t){if(e.loading)return"Dev · Calculating multi odds…";if(e.error)return"Dev · Multi odds unavailable";const n=e.data?.card?.resultant_price;if(null==n||!Number.isFinite(n)||n<=0)return"Dev · Select a proposition to calculate multi odds";const i=2**t,o=100*(n/i-1),r=e.data?.target_price_range,l=r?` · Allowed: ${r[0].toFixed(2)}–${r[1].toFixed(2)}x`:"";return`Dev · Multi fair odds: ${n.toFixed(3)}x · P(all win): ${(100/n).toFixed(3)}% · Final target: ${i}x · Deviation: ${o>=0?"+":""}${o.toFixed(1)}%${l} · ${e.data?.can_submit?"Ready":"Incomplete / outside range"}`}var Cr=Object.freeze([]),Sr=["perfect-pick","h2h","total-points","quick-pick"];function zr(e){if((e=>["any","limited","limited_2p"].includes(e?.sgm_mode??""))(e)||be(e))return;const t=ar({...e,quick_pick_only:!1});return"rule_setup"!==t&&"selections"!==t||e.rule&&"exact"!==e.rule?void 0:/total[ _-]*points/i.test(e.game_name??e.game_name_template??"")?"total-points":e.quick_pick_only||/quick[ _-]*pick/i.test(e.game_name??e.game_name_template??"")?"quick-pick":sr(e)?"h2h":"perfect-pick"}function Wr(e,t){if(!e)return;const n=zr(e);return t.find(t=>(!n||t.overrideBase)&&t.matches?.(e))}function Fr(e,t){return Boolean(zr(e)||Ei(e)||Wr(e,t))}var Ar=class{constructor(e){this.inflight=/* @__PURE__ */new Map,this.cache=/* @__PURE__ */new Map,this.apiUrl=e.apiUrl.replace(/\/+$/,""),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 i=`${this.apiUrl}${e}`,o=(t?.method??"GET").toUpperCase(),r="GET"===o,l=r,a=!r&&!n?.idempotent,s=`${o} ${i}`;if(l){const t=this.cache.get(s),n="/games"===e.split("?")[0]||"/propositions/sports"===e?6e4:5e3;if(t&&Date.now()-t.at<n)return t.value;const i=this.inflight.get(s);if(i)return i}const c=l?this.cache.get(s):void 0,d=(async()=>{let e;try{const n=this.getAuthHeaders?await this.getAuthHeaders():void 0;e=await this.fetchImpl(i,{...t,headers:{"Content-Type":"application/json",...this.apiKey?{"X-API-Key":this.apiKey}:{},...n??{},...c?.etag?{"If-None-Match":c.etag}:{},...t?.headers}})}catch(o){throw o}if(304===e.status&&c)return l&&this.cache.set(s,{at:Date.now(),value:c.value,etag:c.etag}),c.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(s,{at:Date.now(),value:n,etag:t})}return n})();return l?(this.inflight.set(s,d),d.catch(()=>{}).finally(()=>{this.inflight.delete(s)})):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(),i=n?`/games?${n}`:"/games",o=await this.request(i);return{games:o.payload||[],howToPlayMarkdown:o.how_to_play_markdown??null}}async getGame(e){return(await this.request(`/games/${e}`)).payload}async getPropositions(e){const t=new URLSearchParams({binary_only:"true"});e?.event_id&&t.append("event_id",e.event_id),e?.sport&&t.append("sport",e.sport),e?.category&&t.append("category","fantasy"===e.category?"sports":e.category);const n=t.toString(),i=n?`/propositions?${n}`:"/propositions",o=(await this.request(i)).payload||[];return"fantasy"===e?.category?o.filter(e=>"fantasy"===vt(e)):o}async getSports(){const e=await this.request("/propositions/sports");return e.sports??(e.payload??[]).map(e=>({key:e,label:"",games_today:0,active_props:0}))}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(),i=n?`/game-entries?${n}`:"/game-entries";return((await this.request(i)).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)),null==t.winning&&null!=t.win_amount&&(t.winning=Number(t.win_amount)),(!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 i=(await this.request("/game-entries",{method:"POST",body:JSON.stringify(n)})).payload;return null!=i.stake&&null==i.bet_amount&&(i.bet_amount=Number(i.stake)),i}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 i=await this.request(`/games/max-payouts?${n.toString()}`),o={};for(const[r,l]of Object.entries(i.payload||{}))o[Number(r)]=l;return o}async getCorrelationSuggestions(e,t,n){return(await this.request(`/games/${e}/suggestions`,{method:"POST",body:JSON.stringify(t),signal:n},{idempotent:!0})).payload}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 Pr(e,t,n,i){const[r,a]=d(),s=c(0),h=o(async()=>{const e=++s.current;if(!n){a(e=>({read:t,data:e?.read===t?e.data:void 0,loading:!0,error:null}));try{const n=await t();s.current===e&&a({read:t,data:n,loading:!1,error:null})}catch(o){s.current===e&&a({read:t,loading:!1,error:o instanceof Error?o.message:i})}}},[t,n,i]);l(()=>(h(),()=>{s.current++}),[h]);const u=o(async()=>{e.invalidate(),await h()},[e,h]),f=r?.read===t?r:void 0;return{data:n?void 0:f?.data,loading:!n&&(f?.loading??!0),error:n?null:f?.error??null,refetch:u}}var Tr=[],Dr=[],Hr=[];function Mr(e,t,n){const{category:i,jurisdiction:r,sport:l}=t??{},{data:a,...s}=Pr(e,o(()=>e.getGames({category:i,jurisdiction:r,sport:l}),[e,i,r,l]),n?.skip??!1,"Failed to fetch games");return{games:a?.games??Tr,howToPlayMarkdown:a?.howToPlayMarkdown??null,...s}}function Lr(e,t,n){const{category:i,sport:r,event_id:l}=t??{},{data:a,...s}=Pr(e,o(()=>e.getPropositions({category:i,sport:r,event_id:l}),[e,i,r,l]),n?.skip??!1,"Failed to fetch propositions");return{propositions:a??Dr,...s}}function Rr(e,t){const{data:n,...i}=Pr(e,o(()=>e.getSports(),[e]),t?.skip??!1,"Failed to fetch sports");return{sports:n??Hr,...i}}function Ir(e,t,n){const[i,r]=d([]),[a,s]=d(!n?.skip),[h,u]=d(null),f=n?.skip??!1,g=t?`${t.user_id??""}_${t.pending??""}`:"",p=c(t);p.current=t;const y=o(async(t=!1)=>{if(!f)try{t||s(!0),u(null);const n=await e.getGameEntries(p.current);r(n)}catch(n){t||u(n instanceof Error?n.message:"Failed to fetch entries")}finally{s(!1)}},[e,g,f]);l(()=>{y()},[y]);const m=i.some(e=>e.propositions?.some(e=>e.live));return l(()=>{if(!m)return;const t=setInterval(()=>{e.invalidate(),y(!0)},3e4);return()=>clearInterval(t)},[m,e,y]),{entries:i,loading:a,error:h,refetch:o(async()=>{e.invalidate(),await y()},[e,y])}}function Or(e,t,n){const[i,r]=d({}),[a,s]=d(!1),h=n?.skip??!1,u=n?.betAmount,f=c(/* @__PURE__ */new Set);return l(()=>{if(h||0===t.length)return;const n=t.filter(e=>!(e.id in i)&&!f.current.has(e.id));if(0===n.length)return;for(const e of n)f.current.add(e.id);let o=!1;return s(!0),(async()=>{try{const t=await e.getGamesMaxPayouts(n.map(e=>e.id),u);o||r(e=>({...e,...t}))}catch{}finally{o||s(!1)}})(),()=>{o=!0}},[e,t.map(e=>e.id).join(","),h,u]),{maxPayouts:i,loading:a,refetchGame:o(async(t,n)=>{if(!h)try{const i=await e.getGamesMaxPayouts([t],n??u);i[t]&&r(e=>({...e,[t]:i[t]}))}catch{}},[e,h,u])}}function jr(e){const[t,n]=d(!1),[i,r]=d(null),[l,a]=d(null);return{createEntry:async t=>{try{n(!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(i),t()},i=setTimeout(n,e);window.addEventListener("online",n)})}();const i=await e.createGameEntry(t);return a(i),i}catch(i){const e=i instanceof Error?i.message:"Failed to create entry";throw r(e),new Error(e)}finally{n(!1)}},loading:t,error:i,entry:l,clearSubmitError:o(()=>r(null),[])}}function Er(e){const[t,n]=d(e?"sport":"game"),[i,o]=d(null),[r,l]=d({}),[a,s]=d(null);return{step:t,selectedGame:i,selections:r,placedEntry:a,setGameOnly:e=>{i?.id!==e.id&&l({}),o(e)},clearSelectedGame:()=>{o(null),l({})},goToSportSelection:e=>{e&&o(e),n("sport")},goToConfirmation:()=>{n("confirm")},goToSuccess:e=>{s(e),n("success")},goBack:()=>{"confirm"===t?n("sport"):"sport"===t&&(n("game"),o(null),l({}))},reset:()=>{n("game"),o(null),l({}),s(null)},toggleSelection:(e,t)=>{l(n=>{const i={...n};return i[e]===t?delete i[e]:i[e]=t,i})}}}function Ur(e){const[t,n]=d(!1),[i,r]=d(null),[l,a]=d(null);return{evaluate:o(async(t,i)=>{try{n(!0),r(null);const o=await e.evaluateRule(t,i);return a(o),o}catch(o){const e=o instanceof Error?o.message:"Failed to evaluate rule";throw r(e),new Error(e)}finally{n(!1)}},[e]),loading:t,error:i,result:l}}function Gr(e){const[t,n]=d(!1),[i,r]=d(null),[l,a]=d(null);return{calculate:o(async(t,i)=>{try{n(!0),r(null);const o=await e.calculatePayout(t,i);return a(o),o}catch(o){const e=o instanceof Error?o.message:"Failed to calculate payout";throw r(e),new Error(e)}finally{n(!1)}},[e]),loading:t,error:i,result:l}}function Vr(e){const[t,n]=d(!1),[i,r]=d(null),[l,a]=d(null);return{preview:o(async(t,i)=>{try{n(!0),r(null);const o=await e.getEntryPreview(t,i);return a(o),o}catch(o){const e=o instanceof Error?o.message:"Failed to preview entry";throw r(e),new Error(e)}finally{n(!1)}},[e]),loading:t,error:i,result:l}}function Yr(e){return e.fonts?.body??"System"}function Nr(e){return e.fonts?.heading??e.fonts?.body??"System"}var Xr="Your stake",qr="Potential dividend",Kr="Remove",Qr="Clear picks",Jr=["M2 18h1.4c1.3 0 2.5-.6 3.3-1.7l6.1-8.6c.7-1.1 2-1.7 3.3-1.7H22","m18 2 4 4-4 4","M2 6h1.9c1.5 0 2.9.9 3.6 2.2","M22 18h-5.9c-1.3 0-2.6-.7-3.3-1.8l-.5-.8","m18 14 4 4-4 4"],Zr=e=>`${e} pick${1===e?"":"s"}`;function $r(e){return`Filled ${Zr(e)}`}var _r=e=>e??"other",el={spread:{label:"The line",noun:"line"},totals:{label:"The total",noun:"total"},player:{label:"Players",caption:"Hit their numbers",noun:"player"},other:{label:"More",noun:"pick"}},tl=e=>el[_r(e)],nl={spread:["M2.5 6 11 12l-8.5 6 2.5-6z","M21.5 6 13 12l8.5 6-2.5-6z"],totals:["M5 3h14v3.5H9.5l5 5.5-5 5.5H19V21H5l7-9z"],player:["M8.5 3 3 6l2 5 2.5-1v11h9V10l2.5 1 2-5-5.5-3c-.3 1.7-1.7 2.8-3.5 2.8S8.8 4.7 8.5 3z"],other:["M12 5v14","M5 12h14"]},il=e=>nl[_r(e)];function ol(e,t){return t?`${e} of ${e}`:`Pick ${e}`}function rl(e,t){const{noun:n}=tl(t);return`${e} other ${n}${1===e?"":"s"}`}function ll(e){return 1===e?"One per match. Picking another swaps it.":`${2===e?"Two":e} per match. Picking another swaps one.`}function al(e,t=400,n=12){return Math.max(1,Math.floor((e+n)/(t+n)))}function sl(e){const t=[];return e.forEach((e,n)=>{const i=e.date?e.date.toLocaleDateString("en-AU",{weekday:"short",day:"numeric",month:"short"}):"",o=t.find(e=>e.label===i);o?o.items.push({event:e,index:n}):t.push({label:i,items:[{event:e,index:n}]})}),t}function cl(e,t,n){const i=e<0?"Previous":"Next";return t>1?`${i} ${t} ${n.endsWith("ch")?`${n}es`:`${n}s`}`:`${i} ${n}`}function dl(e,t){return[...Object.entries(e).filter(([e])=>!(e in t)),...Object.entries(t).filter(([t,n])=>e[Number(t)]!==n)].map(([e,t])=>[Number(e),t])}var hl="One sport per bet.",ul="Swipe";function fl(e,t){const n=Object.keys(t).map(Number),i=new Set(n),o=e.filter(e=>i.has(e)),r=n.filter(e=>!o.includes(e)).sort((e,t)=>e-t);return 0===r.length&&o.length===e.length?e:[...o,...r]}function gl(e,t,n){const i=n?.stake&&n.stake>0?n.stake:20;if(co(n?.game)){const e=br(n?.game??null,t,i);if(e>0)return e/i*20}const o=e?.top_payouts?.find(e=>Number(e.proposition_count)===t),r=o?.bet_amount&&o.bet_amount>0?o.bet_amount:20,l=Number(o?.net_payout);return o&&Number.isFinite(l)&&l>0?l/r*20:br(n?.game??null,t,i,{expectedCorrect:n?.expectedCorrect})/i*20}var pl=t(null),yl={};function ml(){const e=r(pl);if(!e)throw new Error("usePlaceEntry must be used within a <PlaceEntryProvider>");return e}function bl({gameLibrary:t=Cr,showCorrelationDebug:n=!1,apiUrl:i,apiKey:r,fetchImpl:a,getAuthHeaders:h,userId:u,getUserBalance:f,children:g,theme:p,colorScheme:y,demoGames:m,demoPropositions:b,demoEntries:w,demoMaxPayouts:x,gameCategory:v,jurisdiction:k,initialGameId:B,filterSport:C,initialSport:S,initialEventId:z,initialEventLabel:W,sportBaseKey:F,disableQuickPick:A=!1,renderTeamLogo:P,renderPropositionSilk:T,uiVariant:D="default",selectionVariant:H,gameVariant:M,disableEventSwipe:L,swipeVariant:R,enableSportFavourites:I,yesNoLabels:O,onEntryPlaced:j,onBeforeSubmit:U,entryReference:G,onCancel:V,onShare:Y,onRecharge:N,onClearEventFilter:X,screenSize:q="desktop",howToPlayMarkdown:K,sportDisplayNames:Q,categoryDisplayNames:J}){const Z=Yn(p,y),$=Yr(Z),_=Nr(Z),ee=!(!m||!b),te=s(()=>new Ar({apiUrl:i,apiKey:r,fetchImpl:a,getAuthHeaders:h}),[i,r,a,h]),[ne,ie]=d(0),le=c(0),[ae,se]=d(0),[ce,de]=d([]),[he,ge]=d({}),[pe,ye]=d({}),[me,we]=d(void 0),[ve,ke]=d(null),[Be,Ce]=d(void 0),We=e.useCallback(async()=>{if(f)try{const e=await f();"number"==typeof e&&Number.isFinite(e)&&Ce(e)}catch(e){}},[f]);l(()=>{f?We():Ce(void 0)},[f,We]);const Fe=c(null),Ae=c(null),[Pe,Te]=d(null),[De,He]=d(S??null),[Me,Le]=d(z??null);l(()=>{S&&He(S)},[S]),l(()=>{Le(z??null)},[z]);const[Re,Ie]=d(z),Oe=c(!1);l(()=>{if(!z)return Ie(void 0),void(Oe.current=!1);Oe.current||Ie(z)},[z]);const je=v??Pe??void 0,Ee=C??S??void 0,Ue=Ht(De??Ee,F),Ve=Ht(C,F)??C,Ye=De??void 0,{games:qe,howToPlayMarkdown:Ke,loading:Qe,error:Je}=Mr(te,{category:je,jurisdiction:k,sport:Ue},{skip:ee}),{propositions:Ze,loading:$e,error:_e}=Lr(te,{category:je,sport:Ve,event_id:Re},{skip:ee}),{sports:et,loading:tt}=Rr(te,{skip:ee}),{createEntry:nt,loading:it,error:ot,clearSubmitError:rt}=jr(te),{preview:lt}=Vr(te),at=o((e,t)=>te.getEntryPreview(e,t),[te]),st=s(()=>Gt((ee?m:qe)??[],{category:je,sport:Ue??Ye,sportBaseKey:F}),[ee,m,qe,je,Ue,Ye,F]),ct=K??Ke??null,{maxPayouts:dt,refetchGame:ht}=Or(te,st??[],{skip:ee,betAmount:20}),ut=ee?x??yl:dt,ft=ee?b:Ze,gt=s(()=>C?(ft??[]).filter(e=>e.sport===C):ft,[ft,C]),yt=!v&&!!Pe,[mt,bt]=d(null);l(()=>{ee||yt||$e||!gt||bt(gt)},[ee,yt,$e,gt]);const kt=s(()=>(ee||!yt?gt:mt??gt)??[],[ee,yt,gt,mt]),Ct=s(()=>Bt(gt??[]),[gt]),Ft=s(()=>je||(1===Ct.length?Ct[0]:void 0),[je,Ct]),At=s(()=>{const e=gt??[];return Ft?It(e,{category:Ft,sportBaseKey:F}):e},[gt,Ft,F]),Pt=s(()=>Ye?It(At,{sport:Ye,sportBaseKey:F}):At,[At,Ye,F]),Lt=s(()=>({category:Ft,sport:Ye,sportBaseKey:F}),[Ft,Ye,F]),Rt=s(()=>{const e=(st??[]).filter(e=>e.active&&Fr(e,t));if(!Ft&&Ct.length>1)return[];const n=Ft?Gt(e,Lt):e;return Ft||Ye?function(e,t,n){return n?.category||n?.sport?e.filter(e=>Ut(e,t,n)):e}(n,Pt,Lt):n},[t,st,Pt,Lt,Ft,Ye,Ct.length]),{step:Et,selectedGame:Vt,selections:Nt,placedEntry:Xt,setGameOnly:qt,clearSelectedGame:Kt,goToSportSelection:Qt,goToConfirmation:Jt,goToSuccess:Zt,goBack:$t,reset:_t,toggleSelection:en}=Er(B),tn=e.useCallback(()=>{Oe.current=!0,Ie(void 0),_t(),X?.()},[_t,X]),nn=!!Re,on=nn?W:void 0,rn=!ee&&((Vt?tt:Qe)||$e),ln=ee?null:Vt?Je||_e:Je,an=s(()=>Vt?Yt(Pt,Vt,F):Pt,[Vt,Pt,F]),sn=s(()=>{const e=Vt?Yt(At,Vt,F):At,t=Vt?.allowed_sports,n=/* @__PURE__ */new Map;for(const i of e){const o=wt(i,e);"Other"!==o&&(t?.length&&!t.includes(o)||n.set(o,(n.get(o)??0)+1))}return Array.from(n.entries()).sort((e,t)=>t[1]-e[1]).map(([e,t])=>({key:e,count:t}))},[Vt,At,F]),cn=s(()=>sn.map(e=>e.key),[sn]),dn=s(()=>v?At:kt,[v,At,kt]),{games:hn}=Mr(te,{jurisdiction:k,sport:Ht(Ee,F)},{skip:ee||!!v}),un=s(()=>{if(v)return[v];const e=((ee?m:hn)??[]).filter(e=>e.active&&Fr(e,t));return xt.filter(t=>e.some(e=>Ot(e)===t))},[v,ee,m,hn,t]),fn=s(()=>It(kt,{category:Ft??"sports"}),[kt,Ft]),gn=s(()=>{const e=new Set(cn);return et.filter(t=>e.has(t.key))},[et,cn]),pn=s(()=>It(an,{category:Ft,sport:De}),[an,Ft,De]),yn=s(()=>{if(!Vt||!be(Vt))return[];const{min:e}=Wt(Vt,me),t=me??e;return xe(pn).filter(e=>xr(Vt)||e.propositionCount>=t)},[Vt,me,pn]),mn=s(()=>be(Vt)?Se(pn,Me):pn,[Vt,pn,Me]),bn=function(e,t){const[n,i]=d([]),o=c(/* @__PURE__ */new Set),r=s(()=>{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]),a=s(()=>e?function(e){const t=/* @__PURE__ */new Set;for(const n of e)if(ue(n))for(const e of fe(n))t.add(e);return[...t]}(t).filter(e=>!r.has(e)):[],[e,t,r]);return l(()=>{if(!e||0===a.length)return;const t=a.filter(e=>!o.current.has(e));if(0===t.length)return;for(const e of t)o.current.add(e);let n=!1;return e.getPropositionsByIds(t).then(e=>{!n&&e.length>0&&i(t=>[...t,...e])}).catch(()=>{}),()=>{n=!0}},[e,a]),r}(ee?null:te,s(()=>[...gt??[],...mn],[gt,mn])),wn=xr(Vt),xn=Vt?Wt(Vt,void 0,zt(Vt,ve)):{min:2,max:12},vn=me??Math.min(xn.max,20),kn=vr(te,wn?Vt.id:null,{selections:Nt,candidate_ids:mn.map(e=>e.id).slice(0,2e3),target_count:vn,rule_id:ve??void 0,stake:ae>0?ae:Vt?.min_bet??1,event_id:be(Vt)?Me??void 0:void 0}),[Bn,Cn]=d({gameId:void 0,client:null,rows:[]}),Sn=Bn.gameId===Vt?.id&&Bn.client===te?Bn.rows:[],zn=o((e,t)=>!wn||Nt[e]===t||!(e in Nt)&&!!kn.answers.get(e)?.[t],[wn,Nt,kn.answers]),Wn=s(()=>{const e=kn.data?.propositions??(kn.loading?kn.displayPropositions??mn:mn.filter(e=>kn.answers.has(e.id)));return[...new Map([...e,...Sn.filter(e=>e.id in Nt),...mn.filter(e=>e.id in Nt)].map(e=>[e.id,e])).values()]},[kn.data,kn.loading,kn.displayPropositions,kn.answers,mn,Sn,Nt]),[Fn,An]=d(null);l(()=>{Fn&&dl(Nt,Fn.after).length>0&&An(null)},[Nt,Fn]);const[Pn,Tn]=d({}),Dn=s(()=>Object.keys(Pn).map(Number).filter(e=>Nt[e]===Pn[e]),[Pn,Nt]),Hn=s(()=>Ge(an,Nt,bn,Vt),[an,Nt,bn,Vt]),Mn=o((e,t)=>{const n=()=>{An(null),Tn(t=>{if(!(e in t))return t;const n={...t};return delete n[e],n}),en(e,t)};if(wn){if(Nt[e]===t)return void n();if(!kn.answers.get(e)?.[t]||e in Nt)return;return Ln(e),void n()}if(!(e in Nt)){const t=an.find(t=>t.id===e);if(t&&Hn.isCapped(t))return}n()},[wn,kn.answers,kn.data,Vt?.id,te,Nt,an,Hn,en]);function Ln(e){const t=kn.data?.propositions?.find(t=>t.id===e);t&&Cn(n=>({gameId:Vt?.id,client:te,rows:[...n.gameId===Vt?.id&&n.client===te?n.rows.filter(t=>t.id!==e):[],t]}))}const Rn=(e,t,n)=>{const i={...Nt};for(const o of n)delete i[o];i[e]=t,wn&&Ln(e);for(const[o,r]of dl(Nt,i))en(o,r);An({message:"Swapped your pick",kind:"swap",before:Nt,after:i})},In=Object.keys(Nt).map(Number),On=In.length,jn=c([]);jn.current=fl(jn.current,Nt);const En=jn.current,Un=s(()=>[...new Map([...pn,...wn?Sn:[]].map(e=>[e.id,e])).values()].filter(e=>In.includes(e.id)),[pn,In,wn,Sn]);l(()=>{v||Pe||1===Ct.length&&Te(Ct[0])},[v,Pe,Ct]),l(()=>{if(!Vt)return;const e=an,t=new Set(e.map(vt));let n=Pe;n&&t.has(n)||(n=1===t.size?Array.from(t)[0]:null,n!==Pe&&Te(n));const i=n?e.filter(e=>vt(e)===n):e,o=new Set(function(e){const t=/* @__PURE__ */new Set;for(const n of e){const i=wt(n,e);"Other"!==i&&t.add(i)}return[...t]}(i)),r=Vt.allowed_sports;He(e=>e&&o.has(e)&&(!r?.length||r.includes(e))?e:1===r?.length&&o.has(r[0])?r[0]:1===o.size?Array.from(o)[0]:(()=>{const e=/* @__PURE__ */new Map;for(const o of i){const t=wt(o,i);"Other"!==t&&(r?.length&&!r.includes(t)||e.set(t,(e.get(t)??0)+1))}let t=null,n=0;for(const[i,o]of e)o>n&&(t=i,n=o);return t})())},[Vt?.id,an,Pe]),l(()=>{rt()},[Vt?.id,Et,rt]),l(()=>{Vt&&Ft&&(jt(Vt,Ft)||Kt())},[Vt,Ft,Kt]),l(()=>{Vt&&(Ut(Vt,Pt,{category:Ft,sport:De,sportBaseKey:F})||Kt())},[Vt,Ft,De,F,Pt,Kt]),l(()=>{if(Vt){const e=Fe.current,t=Ae.current!==Vt.id;if(Ae.current=Vt.id,null!=e?.stake&&e.stake>0?se(e.stake):t&&se(Math.max(20,Vt.min_bet??0)),e){const{count:t}=e;return Fe.current=null,we(t),void ie(t)}if(!t)return;if(Vt.allowed_propositions&&Vt.allowed_propositions.length>0){const e=me;null!=e&&Vt.allowed_propositions.includes(e)?ie(e):(we(void 0),ie(0))}else we(void 0),ie(Vt.num_propositions||Vt.max_propositions||0)}},[Vt]);const Gn=(e,t,n)=>{const i=(st??[]).find(t=>t.id===e)??(Vt?.id===e?Vt:null),o=(ut[e]?.top_payouts??[]).find(e=>e.proposition_count===t),r=o&&o.bet_amount&&o.bet_amount>0?o.bet_amount:20,l=o&&r>0?wr(o.net_payout/r*n,i):0;return l>0?l:br(i,t,n)};l(()=>{if("sport"!==Et&&"confirm"!==Et||!Vt||ee)return;const e=be(Vt)&&Me?mn.length:Number.MAX_SAFE_INTEGER;let t;if(Vt.allowed_propositions&&Vt.allowed_propositions.length>0){const n=Vt.allowed_propositions?[...Vt.allowed_propositions].filter(t=>t<=e).sort((e,t)=>e-t):[];if(0===n.length)return void ye({});const i=me??n[0],o=n.filter(e=>e>i);if(0===o.length)return void ye({});t=[i,...o]}else{const{min:n,max:i}=Wt(Vt),o=Math.min(i,e);if(n<=0||o<=n)return void ye({});t=Array.from({length:o-n+1},(e,t)=>n+t)}const n={};for(const i of t)n[i]=Gn(Vt.id,i,20);ye(n)},[Et,Vt,me,Me,mn.length,ee,ut]),l(()=>{if("confirm"!==Et||!Vt)return;const e=In.length;if(0===e)return;let t=!1;const n={};for(let o=0;o<=e;o++)n[o]=Gn(Vt.id,o,ae);if(ge(n),e!==le.current?(le.current=e,ie(e)):(ne>e||ne<=0&&e>0)&&ie(e),ee)return;const i=ae>0?ae:Math.max(Vt.min_bet??20,.01);return(async()=>{try{const n=await lt(Vt.id,{actual:ne,predicted:ne,total:e,bet_amount:i,rule_id:ve});if(t)return;if(de(n.winning_counts),ae>0&&n.payouts){const e={};for(const[t,i]of Object.entries(n.payouts)){const n=Number(t);e[n]=i>0?wr(i,Vt):Gn(Vt.id,n,ae)}ge(e)}}catch{t||de([])}})(),()=>{t=!0}},[Et,Vt,In.length,ne,ae,lt,ut,ve,ee]);const Vn=s(()=>zt(Vt,ve),[Vt,ve]),Nn=!be(Vt)||ze(Un,Me),Xn=Vt?Wt(Vt,void 0,Vn):null,qn=wn?Boolean(kn.data?.can_submit&&Nn):!(!Vt||!Nn)&&(Vt.allowed_propositions&&Vt.allowed_propositions.length>0?null!=me&&On===me&&St(On,Xn?.min,Xn?.max):St(On,Xn?.min,Xn?.max)),Kn=Vt?.min_bet??0,Qn=Math.max(Kn,.01),Zn=null==Be||ae<=Be,$n=!it&&ae>=Qn&&qn&&Zn,[_n,ei]=d(!1);l(()=>{ei(!1)},[Et,Vt,Nt,ae,ne]);const ti=e=>{if(we(e),ie(e),e!==me)for(const t of Object.keys(Nt))en(Number(t),Nt[Number(t)])},ni=e=>{we(e),ie(e)},ii=e=>{Fr(e,t)&&(e.id!==Vt?.id&&ke(null),Le(be(e)?z??null:null),qt(e))},oi=e=>{if(e!==Me){for(const e of Object.keys(Nt)){const t=Number(e);en(t,Nt[t])}Le(e)}},ri=(e,t="fill")=>{if(wn)return 0;const n=function({selections:e,pickOrder:t,propositions:n,count:i,mode:o,componentById:r,game:l,coin:a=()=>Math.random()<.5?"yes":"no"}){const s=Math.max(0,i),c=[...t.filter(t=>t in e),...Object.keys(e).map(Number).filter(e=>!t.includes(e))];if("fill"===o&&c.length>s){const t={};for(const n of c.slice(0,s))t[n]=e[n];return{next:t,added:{},removed:c.length-s,kept:s}}const d="replace"===o?{}:{...e},h=n.filter(e=>e.id in d),u=Xe(Ne(n.filter(e=>!(e.id in d))),s-h.length,r,l,h),f={};for(const g of u)f[g.id]=a();return{next:{...d,...f},added:f,removed:0,kept:h.length}}({selections:Nt,pickOrder:En,propositions:mn,count:e,mode:t,componentById:bn,game:Vt}),i=Object.keys(n.added).length;if(0===n.removed&&0===i&&"fill"===t)return n.kept;for(const[l,a]of dl(Nt,n.next))en(l,a);const o=n.removed?(r=n.removed,`Removed your last ${Zr(r)}`):"replace"===t?function(e){return`Randomised all ${Zr(e)}`}(i):$r(i);var r;return An({message:o,kind:"quickpick",before:Nt,after:n.next}),Tn(e=>"replace"===t?n.added:n.removed?Object.fromEntries(Object.entries(e).filter(([e])=>Number(e)in n.next)):{...e,...n.added}),n.kept+i},li=()=>{if(0!==On){for(const[e,t]of dl(Nt,{}))en(e,t);var e;An({message:(e=On,`Cleared ${Zr(e)}`),kind:"clear",before:Nt,after:{}})}},ai=()=>{if(Fn){for(const[e,t]of dl(Nt,Fn.before))en(e,t);An(null)}},si=(e,n,i)=>{if(!Fr(e,t))return;if(xr(e))return void ii(e);const o=e.allowed_sports??[];let r=null;De&&(0===o.length||o.some(e=>Mt(De,e,F)))?r=De:1===o.length&&(r=o[0]);const l=It(Yt(gt??[],e,F),{category:Ft,sportBaseKey:F});if(0===l.length)return;const a=t=>Xe(Ne(t?It(l,{sport:t,sportBaseKey:F}):l),Math.max(0,n),bn,e),s=/* @__PURE__ */new Map;for(const t of l){const e=wt(t,l);"Other"!==e&&s.set(e,(s.get(e)??0)+1)}const c=[...s.keys()].sort((e,t)=>(s.get(t)??0)-(s.get(e)??0));let d=r??c[0]??null,h=a(d);for(const t of c){if(h.length>=n)break;if(t===d)continue;const e=a(t);e.length>h.length&&(h=e,d=t)}r=d;const u=Vt?.id===e.id;u||ke(null),Fe.current=u?null:{count:n,stake:i},qt(e),ht(e.id),He(r),u&&(we(n),ie(n),null!=i&&i>0&&se(i));for(const t of Object.keys(Nt)){const e=Number(t);en(e,Nt[e])}const f={};for(const t of h)f[t.id]=Math.random()<.5?"yes":"no",en(t.id,f[t.id]);Tn(f),An({message:$r(h.length),kind:"quickpick",before:u?Nt:{},after:f}),Jt()},ci=c(!1),di=async()=>{if(!Vt||!qn||ci.current)return!1;if(!_n)return ei(!0),!1;if(ei(!1),ee){const e={id:Math.floor(1e4*Math.random()),game_id:Vt.id,user_id:u,proposition_ids:In,selections:Nt,pending:!0,expected_correct:ne,bet_amount:ae};return j?.(e),Zt(e),We(),!0}ci.current=!0;try{U&&await U(ae);const e=await nt({game_id:Vt.id,user_id:u,proposition_ids:In,selections:Nt,stake:ae,rule_id:Vn?.id??null});return j?.(e),Zt(e),We(),!0}catch(e){return!1}finally{ci.current=!1}},hi=o(e=>function(e,t){const{overrides:n,summaryLabel:i,sportBaseKey:o}=t,r=n?.[e];return r||(o&&e.startsWith(`${o}_`)?Tt(e,void 0,o):i||Tt(e,void 0,o))}(e,{overrides:Q,summaryLabel:gn.find(t=>t.key===e)?.label,sportBaseKey:F}),[Q,gn,F]),fi=o(e=>Dt(e,J),[J]),gi=o(()=>{qn&&Jt()},[qn,Jt]);l(()=>{Vt&&!Fr(Vt,t)&&Kt()},[Vt,t,Kt]);const pi=s(()=>({gameLibrary:t,getGameFlow:e=>function(e,t){if(e?.quick_pick_only)return"quick_pick";const n=Wr(e,t);return n?.flow?n.flow:e&&zr(e)?"selections":ar(e)}(e,t),theme:Z,bodyFont:$,headingFont:_,games:Rt,propositions:wn?Wn:mn,compositeComponentById:bn,propositionsForCategoryPicker:dn,availableCategories:un,sportsForSelectedGame:cn,sportOptions:sn,propositionsForSportPicker:fn,sportSummaries:gn,loading:rn,error:ln,step:Et,selectedGame:Vt,selections:Nt,placedEntry:Xt,selectedPropositionIds:In,selectedPropositions:Un,selectionValid:qn,selectedRuleId:ve,setSelectedRuleId:ke,selectedRule:Vn,answeredCount:On,pickOrder:En,betAmount:ae,setBetAmount:se,expectedCorrect:ne,setExpectedCorrect:ie,selectedPropositionCount:me,handlePropositionCountChange:ti,upgradePropositionCount:ni,previewCallPayouts:ee?void 0:at,winningCounts:ce,payouts:he,overloadPayouts:pe,submitting:it,submitError:ot,canSubmit:$n,gamePrice:Kn,userBalance:Be,hasSufficientBalance:Zn,refreshUserBalance:We,handleSubmit:di,confirmPending:_n,entryReference:G,selectGame:ii,goToSportSelection:Qt,goToConfirmation:wn?gi:Jt,goBack:$t,reset:_t,clearSelectedGame:Kt,correlation:kn,correlationTargetCount:vn,showCorrelationDebug:n,canSelectAnswer:zn,toggleSelection:Mn,quickPickGame:si,quickPickSelections:ri,quickPickedIds:Dn,clearSelections:li,swapSelection:Rn,selectionUndo:Fn,undoSelectionChange:ai,dismissSelectionUndo:()=>An(null),selectedCategory:Pe,setSelectedCategory:Te,selectedSport:De,setSelectedSport:He,selectedEventId:Me,sameGameMultiEvents:yn,selectSameGameMultiEvent:oi,apiUrl:i,apiKey:r,fetchImpl:a,getAuthHeaders:h,userId:u,disableQuickPick:A,renderTeamLogo:P,renderPropositionSilk:T,uiVariant:D,selectionVariant:H,gameVariant:M,disableEventSwipe:L,swipeVariant:R,enableSportFavourites:I,filterSport:C,initialSport:S,initialEventId:z,sportBaseKey:F,gameCategory:v,eventFilterActive:nn,eventFilterLabel:on,clearEventFilter:tn,screenSize:q,displaySportName:hi,displayCategoryName:fi,maxPayouts:ut??{},howToPlayMarkdown:ct,onEntryPlaced:j,onCancel:V,onShare:Y,onRecharge:N,demoEntries:w,demoGames:m,demoPropositions:b}),[t,Z,$,_,Rt,mn,bn,dn,un,fn,cn,sn,gn,rn,ln,kn,vn,n,zn,wn,Wn,gi,Et,Vt,Nt,Xt,In,Un,qn,On,En,Dn,Fn,ae,ne,me,ve,Vn,at,ee,ce,he,pe,it,ot,$n,_n,G,Kn,i,r,u,Be,a,h,A,P,T,D,H,M,L,R,I,C,S,z,F,v,q,nn,on,tn,Pe,De,Me,yn,ut,ct,j,V,Y,N,X,w,m,b,ti,hi,fi]),yi=e.useMemo(()=>({yes:O?.yes??pt.yes,no:O?.no??pt.no}),[O?.yes,O?.no]),mi=s(()=>oe(...t.map(e=>e.artwork)),[t]);/* @__PURE__ */
12
+ return E(pl.Provider,{value:pi,children:/* @__PURE__ */E(Wi,{value:yi,children:/* @__PURE__ */E(Jn.Provider,{value:D,children:/* @__PURE__ */E(re.Provider,{value:mi,children:/* @__PURE__ */E(ui,{theme:Z,children:g})})})})})}var wl=12,xl=16,vl=44,kl=44,Bl=52,Cl=16,Sl=12,zl=8,Wl=6,Fl=3,Al=4,Pl=16,Tl=26;function Dl(e){const t=r(pl);return e??t?.theme??Fn}function Hl(e,t){const n="dark"===e.colorScheme;return t?{shadowColor:"#000",shadowOpacity:n?.5:.14,shadowRadius:24,shadowOffset:{width:0,height:12},elevation:6}:{shadowColor:"#000",shadowOpacity:n?.4:.08,shadowRadius:12,shadowOffset:{width:0,height:6},elevation:2}}function Ml({theme:e,padded:t=!0,style:n,...i}){const o=Dl(e);/* @__PURE__ */
13
+ return E(W,{...i,style:[{backgroundColor:kn(o),borderWidth:1,borderColor:o.colors.border,borderRadius:sn(o,xl),padding:t?Cl:0},Hl(o,!1),n]})}function Ll({theme:e,style:t,...n}){const i=Dl(e);/* @__PURE__ */
14
+ return E(W,{...n,style:[{gap:zl,padding:Sl,backgroundColor:kn(i),borderWidth:1,borderColor:i.colors.border,borderRadius:sn(i,xl)},Hl(i,!0),t]})}function Rl({theme:e,selected:t,sub:n,disabled:i,onPress:o,accessibilityLabel:r,accessibilityRole:l="button",testID:a,style:s,children:c}){const d=Dl(e),{hovered:h,pressed:u,handlers:f}=wi(),g=di(d,t,{hovered:h,pressed:u,disabled:i}),p=Yr(d);/* @__PURE__ */
15
+ return U(z,{...f,accessibilityRole:l,accessibilityLabel:r,accessibilityState:{selected:t,disabled:!!i},disabled:i,onPress:o,testID:a,activeOpacity:1,style:[{minHeight:null!=n?Bl:kl,paddingHorizontal:12,paddingVertical:6,borderRadius:sn(d,wl),borderWidth:1,borderColor:g.borderColor,backgroundColor:g.background,alignItems:"center",justifyContent:"center",opacity:g.opacity},xi(u,i),s],children:["string"==typeof c?/* @__PURE__ */E(fi,{style:{color:g.color,fontFamily:p,fontSize:14,fontWeight:"700"},children:c}):c,null!=n?/* @__PURE__ */E(fi,{style:{color:g.color,fontFamily:p,fontSize:12,fontWeight:"600",opacity:.8},children:n}):null]})}function Il({theme:e,states:t,label:n,style:i}){const o=Dl(e).colors;/* @__PURE__ */
16
+ return E(W,{accessible:!!n,accessibilityRole:n?"image":void 0,accessibilityLabel:n,style:[{flexDirection:"row",gap:Al},i],children:t.map((e,t)=>/* @__PURE__ */E(W,{style:{flex:1,height:Wl,borderRadius:Fl,backgroundColor:"right"===e?o.primary:"miss"===e?o.background:o.border,borderWidth:"miss"===e?1.5:0,borderColor:"miss"===e?o.textMuted:void 0}},t))})}function Ol({drawn:e,frame:t,dim:n=!1}){const i=t.size,o=e=>({position:"absolute",left:e.left*i,top:e.top*i,width:e.size*i,height:e.size*i}),r={position:"absolute",top:0,left:0,right:0,bottom:0};/* @__PURE__ */
17
+ return U(W,{pointerEvents:"none",accessibilityElementsHidden:!0,importantForAccessibility:"no-hide-descendants",style:{...r,opacity:n?.55:1},children:[e.pattern?/* @__PURE__ */E(W,{style:r,children:/* @__PURE__ */E(I,{xml:e.pattern,width:"100%",height:"100%"})}):null,/* @__PURE__ */U(W,{style:{position:"absolute",left:t.left,right:t.right,top:t.top,width:i,height:i},children:[e.tiles.map((e,t)=>/* @__PURE__ */E(W,{style:{...o(e),borderRadius:e.radius*i,backgroundColor:e.color,opacity:e.opacity}},`tile-${t}`)),e.layers.map((e,t)=>/* @__PURE__ */E(W,{style:{...o(e),opacity:e.opacity??1},children:/* @__PURE__ */E(I,{xml:e.xml,width:"100%",height:"100%"})},t))]})]})}function jl({ring:e,radius:t,lit:n,children:i,style:o,...r}){const{hovered:l,pressed:a,handlers:s}=wi();/* @__PURE__ */
18
+ return U(z,{accessibilityRole:"button",...r,...s,activeOpacity:1,style:[o,xi(a)],children:[i,(n||l)&&/* @__PURE__ */E(W,{pointerEvents:"none",style:{position:"absolute",top:0,right:0,bottom:0,left:0,borderWidth:3,borderColor:e,borderRadius:t}})]})}var El="#C9CDD2";function Ul(e){const t=e.trim();if(!t)return null;const n=t.split(/\t+|\s{2,}/).map(e=>e.trim()).filter(Boolean);if(n.length<3)return null;const i=n[n.length-1];return"YES"!==n[n.length-2].toUpperCase()||"NO"!==i.toUpperCase()?null:{question:n.slice(0,-2).join(" ")}}function Gl(e){return`<table class="props">\n${e.map(e=>{return`<tr><td class="q">${t=e.question,t.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;")}</td><td class="yes">YES</td><td class="no">NO</td></tr>`;var t}).join("\n")}\n</table>`}var Vl='\n :root {\n --blue: #1F4E79;\n --ink: #1A1A1A;\n --grey: #5A5A5A;\n --green: #166534;\n --red: #991B1B;\n --fill-q: #F9FAFB;\n --fill-yes: #DCFCE7;\n --fill-no: #FEE2E2;\n --rule: #D0D7DE;\n }\n * { box-sizing: border-box; }\n html, body {\n margin: 0;\n padding: 0;\n background: #FFFFFF;\n color: var(--ink);\n font-family: "Aptos", "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;\n font-size: 16px;\n line-height: 1.5;\n -webkit-font-smoothing: antialiased;\n }\n .page {\n max-width: 720px;\n margin: 0 auto;\n padding: 32px 24px 56px;\n }\n p { margin: 0 0 14px; }\n\n .masthead { text-align: center; margin-bottom: 8px; }\n .kicker {\n color: var(--blue);\n font-weight: 700;\n letter-spacing: 0.16em;\n font-size: 15px;\n margin-bottom: 6px;\n }\n .logo {\n display: block;\n width: 280px;\n max-width: 72%;\n height: auto;\n margin: 0 auto 12px;\n }\n .headline {\n color: var(--ink);\n font-weight: 700;\n font-size: 34px;\n line-height: 1.15;\n margin: 0 0 4px;\n }\n .headline.lg { font-size: 44px; }\n .subhead {\n color: var(--grey);\n font-weight: 700;\n letter-spacing: 0.12em;\n font-size: 15px;\n margin-top: 6px;\n }\n .lede {\n color: var(--blue);\n font-style: italic;\n font-size: 20px;\n text-align: center;\n margin: 18px 0 22px;\n }\n .rule {\n border: 0;\n border-bottom: 2.5px solid var(--blue);\n margin: 14px 0 22px;\n }\n\n h2.cap {\n color: var(--blue);\n font-weight: 700;\n letter-spacing: 0.06em;\n font-size: 16px;\n text-transform: uppercase;\n margin: 30px 0 12px;\n }\n h3.sub {\n color: var(--ink);\n font-weight: 700;\n font-size: 18px;\n margin: 26px 0 10px;\n }\n\n .step {\n font-weight: 700;\n font-size: 18px;\n margin: 22px 0 8px;\n }\n .step .num { color: var(--blue); }\n .step .label { color: var(--ink); }\n\n .props {\n width: 100%;\n border-collapse: collapse;\n margin: 8px 0 18px;\n }\n .props td {\n border: 1px solid #C9CDD2;\n padding: 11px 14px;\n font-size: 15px;\n }\n .props .q { background: var(--fill-q); width: 64%; }\n .props .yes {\n background: var(--fill-yes);\n color: var(--green);\n font-weight: 700;\n text-align: center;\n letter-spacing: 0.04em;\n }\n .props .no {\n background: var(--fill-no);\n color: var(--red);\n font-weight: 700;\n text-align: center;\n letter-spacing: 0.04em;\n }\n\n .divider {\n border: 0;\n border-top: 1px solid var(--rule);\n margin: 48px 0;\n }\n\n .footnote {\n color: var(--grey);\n font-style: italic;\n font-size: 13px;\n border-top: 1px solid var(--rule);\n padding-top: 14px;\n margin-top: 30px;\n }\n\n @media (max-width: 480px) {\n .page { padding: 24px 18px 44px; }\n .headline { font-size: 28px; }\n .headline.lg { font-size: 34px; }\n .lede { font-size: 18px; }\n }\n'.trim();function Yl(e){let t=e.trim();for(;;){const e=t.match(/^<!--[\s\S]*?-->\s*/);if(!e)break;t=t.slice(e[0].length).trimStart()}return t}var Nl=/^<(main|section|article|div|style|table|h[1-6]|p|ul|ol|hr)\b/i,Xl=/<(section|article|main|div\s+class=["']masthead|h[12]\s+class=["'](?:cap|headline)|h3\s+class=["']sub|table\s+class=["']props|hr\s+class=["']divider)\b/i;function ql(e){return/^<!DOCTYPE\s+html/i.test(e)||/^<html[\s>]/i.test(e)}function Kl(e,t){const n=e.trim();if(!n)return"";if(ql(n))return n;const i=function(e,t){if(!t)return e;if(/class=["']logo["']/i.test(e))return e;const n=`<img class="logo" src="${t.replace(/&/g,"&amp;").replace(/"/g,"&quot;")}" alt="YESNO Multi" />`;return/<div class=["']masthead["']>/i.test(e)?e.replace(/(<div class=["']masthead["']>)/i,`$1\n ${n}`):e}(function(e){return/<table\s+class=["']props["']/i.test(e)?e:function(e){const t=e.replace(/\r\n/g,"\n").split("\n"),n=[];let i=0;for(;i<t.length;){const e=Ul(t[i]);if(e){const o=[e];let r=i+1;for(;r<t.length;){const e=Ul(t[r]);if(!e)break;o.push(e),r+=1}n.push(Gl(o)),i=r;continue}n.push(t[i]),i+=1}return n.join("\n")}(function(e){const t=/<p(?:\s[^>]*)?>([\s\S]*?)<\/p>/gi;let n,i="",o=0;const r=[],l=()=>{0!==r.length&&(i+=Gl([...r]),r.length=0)};for(;null!==(n=t.exec(e));){i+=e.slice(o,n.index);const a=n[1].replace(/<br\s*\/?>/gi,"\n").trim().split("\n").map(e=>e.trim()).filter(Boolean).map(e=>Ul(e));a.length>0&&a.every(e=>null!==e)?r.push(...a):(l(),i+=n[0]),o=t.lastIndex}return l(),i+=e.slice(o),i}(e))}(function(e){const t=Yl(e),n=t.match(/^<main[^>]*>([\s\S]*)<\/main>$/i);return n?n[1].trim():t}(n)),t);return`<!DOCTYPE html>\n<html lang="en-AU">\n<head>\n<meta charset="UTF-8">\n<meta name="viewport" content="width=device-width, initial-scale=1.0">\n<title>YES NO - How to Play</title>\n<style>${Vl}</style>\n</head>\n<body>\n<main class="page">\n${i}\n</main>\n</body>\n</html>`}var Ql=/^(#{1,3})\s+(.+)$/,Jl=/^[-*]\s+(.+)$/,Zl=/^-{3,}$/,$l=/\b(YES|NO)\b/;function _l(e,t,n){return e.split($l).map((e,i)=>"YES"===e||"NO"===e?/* @__PURE__ */E(Mi,{theme:t,value:"YES"===e?"yes":"no",size:"sm"},`${n}-${i}`):/* @__PURE__ */E(fi,{children:e},`${n}-${i}`))}function ea({segments:e,theme:t,bodyFont:n}){/* @__PURE__ */
19
+ return E(fi,{style:[ia.summary,{color:t.colors.text,fontFamily:n}],children:e.map((e,n)=>"string"==typeof e?/* @__PURE__ */E(fi,{children:_l(e,t,n)},n):/* @__PURE__ */E(Mi,{theme:t,value:e.tone,size:"sm"},n))})}function ta({theme:e,font:t,active:n,onSelect:i,children:o}){const r=e.colors,{hovered:l,pressed:a,handlers:s}=wi(),c=n?null:ai(r.primary,{hovered:l,pressed:a});/* @__PURE__ */
20
+ return E(z,{...s,onPress:i,accessibilityRole:"tab",accessibilityState:{selected:n},activeOpacity:1,style:[ia.segment,{borderRadius:sn(e,8),borderColor:c?.borderColor??"transparent",backgroundColor:n?r.primary:c?.background??"transparent"},xi(a)],children:/* @__PURE__ */E(fi,{style:[ia.segmentText,{color:n?r.primaryText:r.textMuted,fontFamily:t}],children:o})})}function na({panel:e,theme:t,dividends:n,bodyFont:i,headingFont:o}){const r=t.colors,l=t.brand?.accent??r.primaryText,a=kn(t),[s,c]=d("learn"),[h,u]=d(()=>e.demoLegs.map(()=>null)),[f,g]=d(!1),p=e.demoLegs.length,y=h.filter(e=>null!=e).length,m=y===p,b=e.demoLegs.filter((e,t)=>h[t]===e.outcome).length,w=function(e,t,n){const i=t===n,o=`${t} of ${n}`;switch(e){case"mirror":return i?{won:!0,message:`All ${n} right — that is the sweep, the card pays.`}:0===t?{won:!0,message:`All ${n} wrong — a full mirror sweep pays the same as perfect.`}:{won:!1,message:`${o} is a split card. Mirror pays all right or all wrong — nothing in between.`};case"ladder":return i?{won:!0,message:`Top rung — all ${n} right stacks every prize on the ladder into one payout.`}:t>=n-1?{won:!0,message:`${o} reaches a rung — it pays, and every extra leg right stacks the next prize on top.`}:{won:!1,message:`${o} does not reach the first rung — the climb starts at ${n-1} right.`};case"safety_net":return i?{won:!0,message:`Clean sweep — all ${n} right takes the full prize.`}:t===n-1?{won:!0,message:"One miss — the net catches it and the entry still pays."}:{won:!1,message:`${o} is more than the net holds — one miss is covered, two is not.`};case"six_again":return i?{won:!0,message:`All ${n} right — the card pays, and Golden Point doubles it.`}:t===n-1?{won:!1,message:`${o} — one call away. The Captain’s Challenge is the boost that collects on this card.`}:{won:!1,message:`${o} — every call has to land. Flip the misses and the card pays.`};case"game_set":return i?{won:!0,message:`Game, set, bet — all ${n} legs landed and the card pays.`}:{won:!1,message:`${o} — every leg has to land. Flip the misses and it is straight sets.`};case"pick_your_dividend":return i?{won:!0,message:`All ${n} right — the entry pays the dividend you picked.`}:{won:!1,message:`${o} — every leg has to land to collect your dividend.`};default:return i?{won:!0,message:`Perfect card — all ${n} legs landed, the prize is yours.`}:{won:!1,message:`${o} — one miss breaks a perfect card. Flip the misses and it pays.`}}}(e.id,b,p),x=(e,t)=>{f||u(n=>n.map((n,i)=>i===e?t:n))},v=f?"Settled":`${y} of ${p} called`,k=!f&&m;/* @__PURE__ */
21
21
  return U(W,{children:[
22
- /* @__PURE__ */U(W,{style:[na.segments,{borderRadius:sn(t,10),borderColor:r.border,backgroundColor:r.backgroundAlt}],children:[
23
- /* @__PURE__ */E(ea,{theme:t,font:o,active:"learn"===s,onSelect:()=>c("learn"),children:"How it works"}),
24
- /* @__PURE__ */E(ea,{theme:t,font:o,active:"try"===s,onSelect:()=>c("try"),children:"Quick demo"}),n?/* @__PURE__ */E(ea,{theme:t,font:o,active:"pay"===s,onSelect:()=>c("pay"),children:"Dividends"}):null]}),"pay"===s?n:null,"learn"===s&&/* @__PURE__ */U(W,{children:[
25
- /* @__PURE__ */E(_l,{segments:e.summary,theme:t,bodyFont:i}),
26
- /* @__PURE__ */U(W,{style:[na.steps,na.stepsSpaced],children:[/* @__PURE__ */E(W,{pointerEvents:"none",style:[na.rail,{backgroundColor:tn(r.primary,.25)}]}),e.steps.map((e,n)=>/* @__PURE__ */U(W,{style:na.step,children:[/* @__PURE__ */E(W,{style:[na.stepTile,{borderRadius:sn(t,10),backgroundColor:r.primary}],children:/* @__PURE__ */E(fi,{style:[na.stepTileText,{color:l,fontFamily:o}],children:n+1})}),/* @__PURE__ */U(W,{style:na.stepText,children:[/* @__PURE__ */E(fi,{style:[na.stepTitle,{color:r.primary,fontFamily:o}],children:e.title}),/* @__PURE__ */E(fi,{style:[na.stepDetail,{color:r.textMuted,fontFamily:i}],children:$l(e.detail,t,n)})]})]},e.title))]}),
27
- /* @__PURE__ */E(vi,{theme:t,variant:"quiet",onPress:()=>c("try"),style:{alignSelf:"flex-start",marginTop:6,marginLeft:50},children:"Try a quick demo →"})]}),"try"===s&&/* @__PURE__ */U(W,{style:[na.slip,na.slipFlush,{borderRadius:sn(t,12),borderColor:r.border,backgroundColor:a}],children:[
28
- /* @__PURE__ */E(W,{style:na.slipHead,children:/* @__PURE__ */U(W,{style:na.slipHeadRow,children:[/* @__PURE__ */E(fi,{style:[na.prompt,na.promptGrow,{color:r.textMuted,fontFamily:i}],children:f?"Here is how it settled.":e.demoPrompt}),/* @__PURE__ */E(W,{style:[na.counter,{borderRadius:sn(t,999)},k?{borderColor:r.primary,backgroundColor:r.primary}:{borderColor:tn(r.border,.9),backgroundColor:"transparent"}],children:/* @__PURE__ */E(fi,{style:[na.counterText,{color:k?r.primaryText:r.textMuted,fontFamily:i}],children:v})})]})}),
29
- /* @__PURE__ */E(W,{style:na.legs,children:e.demoLegs.map((e,n)=>{const o=h[n]===e.outcome;/* @__PURE__ */
30
- return U(W,{style:[na.leg,n>0&&{borderTopWidth:1,borderTopColor:tn(r.border,.7)}],children:[/* @__PURE__ */U(W,{style:na.legMain,children:[/* @__PURE__ */E(W,{style:[na.pip,f?{backgroundColor:o?r.success:r.error}:{borderWidth:1.5,borderColor:h[n]?r.primary:r.border}],children:/* @__PURE__ */E(fi,{style:[na.pipText,{color:f?"#fff":h[n]?r.primary:r.textMuted}],children:f?o?"✓":"✗":n+1})}),/* @__PURE__ */E(W,{style:na.legText,children:/* @__PURE__ */E(fi,{style:[na.legQuestion,{color:r.text,fontFamily:i}],children:e.question})})]}),f?/* @__PURE__ */E(Mi,{theme:t,size:"sm",value:e.outcome}):/* @__PURE__ */E(Hi,{theme:t,size:"sm",value:h[n],onYes:()=>x(n,"yes"),onNo:()=>x(n,"no")})]},e.question)})}),
31
- /* @__PURE__ */E(W,{style:[na.perforation,{borderTopColor:tn(r.border,.9)}]}),
32
- /* @__PURE__ */E(W,{style:na.slipFoot,children:f?/* @__PURE__ */U(W,{children:[/* @__PURE__ */U(W,{style:[na.verdict,{borderRadius:sn(t,8),backgroundColor:w.won?r.successBg:r.errorBg}],children:[/* @__PURE__ */E(W,{style:[na.stamp,{borderRadius:sn(t,6),borderColor:w.won?r.successText:r.errorText}],children:/* @__PURE__ */E(fi,{style:[na.stampText,{color:w.won?r.successText:r.errorText,fontFamily:o}],children:w.won?"Winner":"No win"})}),/* @__PURE__ */E(fi,{style:[na.verdictText,{color:w.won?r.successText:r.errorText,fontFamily:i}],children:w.message})]}),/* @__PURE__ */E(vi,{theme:t,variant:"quiet",onPress:()=>{u(e.demoLegs.map(()=>null)),g(!1)},style:{alignSelf:"flex-start",marginTop:8},children:"↺ Try again"})]}):/* @__PURE__ */E(vi,{theme:t,block:!0,disabled:!m,onPress:()=>g(!0),children:"Run the demo"})})]})]})}var na=B.create({summary:{fontSize:15,lineHeight:23},segments:{flexDirection:"row",gap:2,borderWidth:1,padding:2,marginBottom:14},segment:{flex:1,paddingVertical:5,borderWidth:1,alignItems:"center"},segmentText:{fontSize:11,fontWeight:"800",textTransform:"uppercase",letterSpacing:1.1},stepsSpaced:{marginTop:12},slipFlush:{marginTop:0},promptGrow:{flex:1,minWidth:0,marginTop:0},steps:{position:"relative"},rail:{position:"absolute",left:17,top:16,bottom:16,width:1},step:{justifyContent:"center",gap:2,paddingVertical:8,paddingLeft:50,minHeight:52},stepTile:{position:"absolute",left:0,top:"50%",marginTop:-18,width:36,height:36,alignItems:"center",justifyContent:"center"},stepTileText:{fontSize:16,fontWeight:"800"},stepText:{gap:2},stepTitle:{fontSize:14.5,fontWeight:"700",lineHeight:19},stepDetail:{fontSize:13,lineHeight:18},slip:{marginTop:16,borderWidth:1,overflow:"hidden"},slipHead:{paddingHorizontal:14,paddingTop:12},slipHeadRow:{flexDirection:"row",alignItems:"flex-start",justifyContent:"space-between",gap:10},counter:{borderWidth:1,paddingHorizontal:8,paddingVertical:2},counterText:{fontSize:10,fontWeight:"800",textTransform:"uppercase",letterSpacing:1,fontVariant:["tabular-nums"]},prompt:{fontSize:12.5,marginTop:4},legs:{paddingHorizontal:14,marginTop:6},leg:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",gap:12,paddingVertical:10},legMain:{flexDirection:"row",alignItems:"flex-start",gap:10,flex:1,minWidth:0},pip:{marginTop:2,width:18,height:18,borderRadius:9,alignItems:"center",justifyContent:"center"},pipText:{fontSize:10,fontWeight:"800",lineHeight:13},legText:{flex:1,minWidth:0},legQuestion:{fontSize:13,fontWeight:"600",lineHeight:18},perforation:{marginHorizontal:14,borderTopWidth:1.5,borderStyle:"dashed"},slipFoot:{paddingHorizontal:14,paddingTop:12,paddingBottom:14},verdict:{flexDirection:"row",alignItems:"center",gap:12,paddingHorizontal:12,paddingVertical:10},stamp:{borderWidth:2,paddingHorizontal:6,paddingVertical:2,transform:[{rotate:"-3deg"}],flexShrink:0},stampText:{fontSize:10,fontWeight:"800",textTransform:"uppercase",letterSpacing:1.4},verdictText:{flex:1,fontSize:12.5,fontWeight:"600",lineHeight:17}}),ia=t(!1);function oa({children:e}){return n(ia.Provider,{value:!0},e)}function ra(e){return r(ia)||!e?e:function(e){const t=e.colors;if(!t.canvas)return e;const n=mn.get(e);if(n)return n;const i=t.onCanvas??Kt(t.canvas,"#ffffff",t.text),o=t.onCanvasMuted??tn(i,.72),r=e.brand?.accent??i,l=Kt(r,"#ffffff",t.canvas),a={...e,colors:{...t,text:i,heading:i,label:i,value:i,textAlt:i,textMuted:o,textAltMuted:o,primary:r,primaryHover:r,primaryText:l,border:tn(i,.28),borderSubtle:tn(i,.16),background:t.canvas,backgroundAlt:tn(i,.08),buttonSecondary:tn(i,.14),buttonSecondaryHover:tn(i,.22),buttonSecondaryText:i,selectionCard:tn(i,.08)}};return mn.set(e,a),a}(e)}function la({text:e,colors:t}){const n=function(e){const t=[],n=/\*\*(.+?)\*\*/g;let i,o=0;for(;null!==(i=n.exec(e));)i.index>o&&t.push({text:e.slice(o,i.index),bold:!1}),t.push({text:i[1],bold:!0}),o=i.index+i[0].length;return o<e.length&&t.push({text:e.slice(o),bold:!1}),0===t.length&&t.push({text:e,bold:!1}),t}(e);/* @__PURE__ */
33
- return E(fi,{children:n.map((e,n)=>/* @__PURE__ */E(fi,{style:{fontWeight:e.bold?"700":"400",color:e.bold?t.text:t.textMuted},children:e.text},n))})}function aa({content:e,colors:t}){const n=ql(e,le().guideLogo);let i=null;try{i=V("react-native-webview").WebView}catch{i=null}return i?/* @__PURE__ */E(i,{source:{html:n},style:{minHeight:420,width:"100%"},originWhitelist:["*"],scrollEnabled:!0}):/* @__PURE__ */E(fi,{style:{fontSize:14,lineHeight:22,color:t.textMuted},children:"This guide uses HTML. Install react-native-webview in the host app to display it on native."})}function sa({rows:e}){/* @__PURE__ */
34
- return E(W,{style:{gap:0,marginVertical:6},children:e.map((e,t)=>/* @__PURE__ */U(W,{style:{flexDirection:"row",borderWidth:1,borderColor:jl,borderTopWidth:0===t?1:0},children:[
35
- /* @__PURE__ */E(W,{style:{flex:2.2,backgroundColor:"#F9FAFB",paddingVertical:11,paddingHorizontal:14,borderRightWidth:1,borderRightColor:jl},children:/* @__PURE__ */E(fi,{style:{fontSize:15,color:"#1A1A1A"},children:e.question})}),
36
- /* @__PURE__ */E(W,{style:{flex:.65,backgroundColor:"#DCFCE7",paddingVertical:11,paddingHorizontal:8,alignItems:"center",justifyContent:"center",borderRightWidth:1,borderRightColor:jl},children:/* @__PURE__ */E(fi,{style:{fontSize:15,fontWeight:"700",color:"#166534"},children:"YES"})}),
37
- /* @__PURE__ */E(W,{style:{flex:.65,backgroundColor:"#FEE2E2",paddingVertical:11,paddingHorizontal:8,alignItems:"center",justifyContent:"center"},children:/* @__PURE__ */E(fi,{style:{fontSize:15,fontWeight:"700",color:"#991B1B"},children:"NO"})})]},t))})}function ca({content:e,colors:t,bodyFont:n,headingFont:i}){const o=function(e){const t=e.replace(/\r\n/g,"\n").split("\n"),n=[];let i=[],o=[];const r=()=>{const e=i.map(e=>e.trim()).filter(Boolean);if(e.length>0){const t=e.map(e=>El(e));if(t.every(e=>null!==e))return n.push({type:"propsTable",rows:t}),void(i=[])}const t=i.join(" ").trim();t&&n.push({type:"paragraph",text:t}),i=[]},l=()=>{o.length>0&&(n.push({type:"list",items:[...o]}),o=[])};for(const a of t){const e=a.trim();if(!e){l(),r();continue}const t=e.match(Kl);if(t){l(),r(),n.push({type:"heading",level:Math.min(t[1].length,3),text:t[2].trim()});continue}if(Jl.test(e)){l(),r(),n.push({type:"hr"});continue}const s=e.match(Ql);s?(r(),o.push(s[1].trim())):(l(),i.push(e))}return l(),r(),n}(e);/* @__PURE__ */
38
- return E(W,{style:{gap:14},children:o.map((e,o)=>"heading"===e.type?/* @__PURE__ */E(fi,{style:{fontSize:{1:20,2:18,3:16}[e.level],fontWeight:"800",color:t.text,textTransform:1===e.level?"uppercase":"none",fontFamily:i??n},children:/* @__PURE__ */E(la,{text:e.text,colors:t})},o):"paragraph"===e.type?/* @__PURE__ */E(fi,{style:{fontSize:14,lineHeight:22,color:t.textMuted,fontFamily:n},children:/* @__PURE__ */E(la,{text:e.text,colors:t})},o):"list"===e.type?/* @__PURE__ */E(W,{style:{gap:6,paddingLeft:8},children:e.items.map((e,i)=>/* @__PURE__ */U(fi,{style:{fontSize:14,lineHeight:22,color:t.textMuted,fontFamily:n},children:["• ",/* @__PURE__ */E(la,{text:e,colors:t})]},i))},o):"propsTable"===e.type?/* @__PURE__ */E(sa,{rows:e.rows},o):/* @__PURE__ */E(W,{style:{height:1,backgroundColor:t.border,marginVertical:4}},o))})}function da({content:e,panel:t,theme:n,extra:i,title:o="How to Play",label:r="How to Play",variant:l="pill",touchSize:a,colors:s,bodyFont:c,headingFont:h}){const[u,f]=d(!1),g=ra(n),{width:p}=F(),y=p>=640,b=!(!t||!n),w=Tl(g),C={color:ki(w,"quiet"),fontSize:li.fontSize.md,fontWeight:"800"};if(!e?.trim()&&!b&&!i)return null;const S=!b&&!!e&&function(e){const t=e.trim();if(!t)return!1;if(Xl(t))return!0;const n=Vl(t);return!!Yl.test(n)||Nl.test(t)}(e);/* @__PURE__ */
39
- return U(j,{children:["link"===l?/* @__PURE__ */E(vi,{theme:w,variant:"quiet",onPress:()=>f(!0),accessibilityLabel:r,style:{alignSelf:"flex-start"},children:"How to play"}):"icon"===l?/* @__PURE__ */E(Ci,{theme:w,size:a??28,onPress:()=>f(!0),accessibilityLabel:r,children:/* @__PURE__ */E(fi,{style:{color:Si(w),fontSize:14,fontWeight:"800",lineHeight:17},children:"?"})}):/* @__PURE__ */U(vi,{theme:w,variant:"quiet",onPress:()=>f(!0),accessibilityLabel:r,style:{alignSelf:"flex-start"},children:[/* @__PURE__ */E(fi,{style:C,children:r}),/* @__PURE__ */E(fi,{style:C,children:"?"})]}),/* @__PURE__ */E(m,{visible:u,animationType:"none",transparent:!0,onRequestClose:()=>f(!1),children:/* @__PURE__ */U(W,{style:[ha.overlay,y?{justifyContent:"center",alignItems:"center",padding:16}:{justifyContent:"flex-end"}],children:[/* @__PURE__ */E(x,{style:B.absoluteFill,onPress:()=>f(!1)}),/* @__PURE__ */U(W,{style:[ha.sheet,y?{maxWidth:672,maxHeight:"85%",borderRadius:sn(n,16)}:{maxHeight:"88%",borderTopLeftRadius:sn(n,16),borderTopRightRadius:sn(n,16)},{backgroundColor:s.background,borderColor:s.border}],children:[
40
- /* @__PURE__ */U(W,{style:[ha.header,{paddingHorizontal:y?24:16}],children:[/* @__PURE__ */E(fi,{style:[ha.title,{color:s.text,fontFamily:h??c}],children:o}),/* @__PURE__ */E(Ci,{theme:w,size:32,onPress:()=>f(!1),accessibilityLabel:"Close",children:/* @__PURE__ */E(fi,{style:{fontSize:16,color:Si(w)},children:"×"})})]}),
41
- /* @__PURE__ */E(k,{contentContainerStyle:S?void 0:{paddingHorizontal:y?24:16,paddingVertical:20},children:b?/* @__PURE__ */E(ta,{panel:t,theme:n,dividends:i,bodyFont:c,headingFont:h}):/* @__PURE__ */U(j,{children:[S?/* @__PURE__ */E(aa,{content:e,colors:s}):/* @__PURE__ */E(ca,{content:e??"",colors:s,bodyFont:c,headingFont:h}),i?/* @__PURE__ */E(W,{style:S?{paddingHorizontal:y?24:16,paddingBottom:20}:{marginTop:16},children:i}):null]})}),
42
- /* @__PURE__ */E(v,{style:[ha.footer,{borderTopColor:s.border,backgroundColor:s.backgroundAlt}],children:/* @__PURE__ */E(W,{style:{paddingVertical:16,paddingHorizontal:y?24:16},children:/* @__PURE__ */E(vi,{theme:w,size:"lg",block:!0,onPress:()=>f(!1),children:"Got it"})})})]})]})})]})}var ha=B.create({overlay:{flex:1,backgroundColor:"rgba(0,0,0,0.55)"},sheet:{width:"100%",borderWidth:1,overflow:"hidden",shadowColor:"#000",shadowOffset:{width:0,height:25},shadowOpacity:.25,shadowRadius:25,elevation:24},header:{flexDirection:"row",alignItems:"center",gap:8,paddingTop:10,paddingBottom:6},title:{flex:1,fontSize:18,fontWeight:"800"},footer:{borderTopWidth:1}});function ua({category:e,size:t=14,color:n="currentColor"}){const i=n,o=2.25;switch(e){case"casino":/* @__PURE__ */return U(A,{width:t,height:t,viewBox:"0 0 24 24",fill:"none",children:[
22
+ /* @__PURE__ */U(W,{style:[ia.segments,{borderRadius:sn(t,10),borderColor:r.border,backgroundColor:r.backgroundAlt}],children:[
23
+ /* @__PURE__ */E(ta,{theme:t,font:o,active:"learn"===s,onSelect:()=>c("learn"),children:"How it works"}),
24
+ /* @__PURE__ */E(ta,{theme:t,font:o,active:"try"===s,onSelect:()=>c("try"),children:"Quick demo"}),n?/* @__PURE__ */E(ta,{theme:t,font:o,active:"pay"===s,onSelect:()=>c("pay"),children:"Dividends"}):null]}),"pay"===s?n:null,"learn"===s&&/* @__PURE__ */U(W,{children:[
25
+ /* @__PURE__ */E(ea,{segments:e.summary,theme:t,bodyFont:i}),
26
+ /* @__PURE__ */U(W,{style:[ia.steps,ia.stepsSpaced],children:[/* @__PURE__ */E(W,{pointerEvents:"none",style:[ia.rail,{backgroundColor:tn(r.primary,.25)}]}),e.steps.map((e,n)=>/* @__PURE__ */U(W,{style:ia.step,children:[/* @__PURE__ */E(W,{style:[ia.stepTile,{borderRadius:sn(t,10),backgroundColor:r.primary}],children:/* @__PURE__ */E(fi,{style:[ia.stepTileText,{color:l,fontFamily:o}],children:n+1})}),/* @__PURE__ */U(W,{style:ia.stepText,children:[/* @__PURE__ */E(fi,{style:[ia.stepTitle,{color:r.primary,fontFamily:o}],children:e.title}),/* @__PURE__ */E(fi,{style:[ia.stepDetail,{color:r.textMuted,fontFamily:i}],children:_l(e.detail,t,n)})]})]},e.title))]}),
27
+ /* @__PURE__ */E(vi,{theme:t,variant:"quiet",onPress:()=>c("try"),style:{alignSelf:"flex-start",marginTop:6,marginLeft:50},children:"Try a quick demo →"})]}),"try"===s&&/* @__PURE__ */U(W,{style:[ia.slip,ia.slipFlush,{borderRadius:sn(t,12),borderColor:r.border,backgroundColor:a}],children:[
28
+ /* @__PURE__ */E(W,{style:ia.slipHead,children:/* @__PURE__ */U(W,{style:ia.slipHeadRow,children:[/* @__PURE__ */E(fi,{style:[ia.prompt,ia.promptGrow,{color:r.textMuted,fontFamily:i}],children:f?"Here is how it settled.":e.demoPrompt}),/* @__PURE__ */E(W,{style:[ia.counter,{borderRadius:sn(t,999)},k?{borderColor:r.primary,backgroundColor:r.primary}:{borderColor:tn(r.border,.9),backgroundColor:"transparent"}],children:/* @__PURE__ */E(fi,{style:[ia.counterText,{color:k?r.primaryText:r.textMuted,fontFamily:i}],children:v})})]})}),
29
+ /* @__PURE__ */E(W,{style:ia.legs,children:e.demoLegs.map((e,n)=>{const o=h[n]===e.outcome;/* @__PURE__ */
30
+ return U(W,{style:[ia.leg,n>0&&{borderTopWidth:1,borderTopColor:tn(r.border,.7)}],children:[/* @__PURE__ */U(W,{style:ia.legMain,children:[/* @__PURE__ */E(W,{style:[ia.pip,f?{backgroundColor:o?r.success:r.error}:{borderWidth:1.5,borderColor:h[n]?r.primary:r.border}],children:/* @__PURE__ */E(fi,{style:[ia.pipText,{color:f?"#fff":h[n]?r.primary:r.textMuted}],children:f?o?"✓":"✗":n+1})}),/* @__PURE__ */E(W,{style:ia.legText,children:/* @__PURE__ */E(fi,{style:[ia.legQuestion,{color:r.text,fontFamily:i}],children:e.question})})]}),f?/* @__PURE__ */E(Mi,{theme:t,size:"sm",value:e.outcome}):/* @__PURE__ */E(Hi,{theme:t,size:"sm",value:h[n],onYes:()=>x(n,"yes"),onNo:()=>x(n,"no")})]},e.question)})}),
31
+ /* @__PURE__ */E(W,{style:[ia.perforation,{borderTopColor:tn(r.border,.9)}]}),
32
+ /* @__PURE__ */E(W,{style:ia.slipFoot,children:f?/* @__PURE__ */U(W,{children:[/* @__PURE__ */U(W,{style:[ia.verdict,{borderRadius:sn(t,8),backgroundColor:w.won?r.successBg:r.errorBg}],children:[/* @__PURE__ */E(W,{style:[ia.stamp,{borderRadius:sn(t,6),borderColor:w.won?r.successText:r.errorText}],children:/* @__PURE__ */E(fi,{style:[ia.stampText,{color:w.won?r.successText:r.errorText,fontFamily:o}],children:w.won?"Winner":"No win"})}),/* @__PURE__ */E(fi,{style:[ia.verdictText,{color:w.won?r.successText:r.errorText,fontFamily:i}],children:w.message})]}),/* @__PURE__ */E(vi,{theme:t,variant:"quiet",onPress:()=>{u(e.demoLegs.map(()=>null)),g(!1)},style:{alignSelf:"flex-start",marginTop:8},children:"↺ Try again"})]}):/* @__PURE__ */E(vi,{theme:t,block:!0,disabled:!m,onPress:()=>g(!0),children:"Run the demo"})})]})]})}var ia=B.create({summary:{fontSize:15,lineHeight:23},segments:{flexDirection:"row",gap:2,borderWidth:1,padding:2,marginBottom:14},segment:{flex:1,paddingVertical:5,borderWidth:1,alignItems:"center"},segmentText:{fontSize:11,fontWeight:"800",textTransform:"uppercase",letterSpacing:1.1},stepsSpaced:{marginTop:12},slipFlush:{marginTop:0},promptGrow:{flex:1,minWidth:0,marginTop:0},steps:{position:"relative"},rail:{position:"absolute",left:17,top:16,bottom:16,width:1},step:{justifyContent:"center",gap:2,paddingVertical:8,paddingLeft:50,minHeight:52},stepTile:{position:"absolute",left:0,top:"50%",marginTop:-18,width:36,height:36,alignItems:"center",justifyContent:"center"},stepTileText:{fontSize:16,fontWeight:"800"},stepText:{gap:2},stepTitle:{fontSize:14.5,fontWeight:"700",lineHeight:19},stepDetail:{fontSize:13,lineHeight:18},slip:{marginTop:16,borderWidth:1,overflow:"hidden"},slipHead:{paddingHorizontal:14,paddingTop:12},slipHeadRow:{flexDirection:"row",alignItems:"flex-start",justifyContent:"space-between",gap:10},counter:{borderWidth:1,paddingHorizontal:8,paddingVertical:2},counterText:{fontSize:10,fontWeight:"800",textTransform:"uppercase",letterSpacing:1,fontVariant:["tabular-nums"]},prompt:{fontSize:12.5,marginTop:4},legs:{paddingHorizontal:14,marginTop:6},leg:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",gap:12,paddingVertical:10},legMain:{flexDirection:"row",alignItems:"flex-start",gap:10,flex:1,minWidth:0},pip:{marginTop:2,width:18,height:18,borderRadius:9,alignItems:"center",justifyContent:"center"},pipText:{fontSize:10,fontWeight:"800",lineHeight:13},legText:{flex:1,minWidth:0},legQuestion:{fontSize:13,fontWeight:"600",lineHeight:18},perforation:{marginHorizontal:14,borderTopWidth:1.5,borderStyle:"dashed"},slipFoot:{paddingHorizontal:14,paddingTop:12,paddingBottom:14},verdict:{flexDirection:"row",alignItems:"center",gap:12,paddingHorizontal:12,paddingVertical:10},stamp:{borderWidth:2,paddingHorizontal:6,paddingVertical:2,transform:[{rotate:"-3deg"}],flexShrink:0},stampText:{fontSize:10,fontWeight:"800",textTransform:"uppercase",letterSpacing:1.4},verdictText:{flex:1,fontSize:12.5,fontWeight:"600",lineHeight:17}}),oa=t(!1);function ra({children:e}){return n(oa.Provider,{value:!0},e)}function la(e){return r(oa)||!e?e:function(e){const t=e.colors;if(!t.canvas)return e;const n=mn.get(e);if(n)return n;const i=t.onCanvas??Kt(t.canvas,"#ffffff",t.text),o=t.onCanvasMuted??tn(i,.72),r=e.brand?.accent??i,l=Kt(r,"#ffffff",t.canvas),a={...e,colors:{...t,text:i,heading:i,label:i,value:i,textAlt:i,textMuted:o,textAltMuted:o,primary:r,primaryHover:r,primaryText:l,border:tn(i,.28),borderSubtle:tn(i,.16),background:t.canvas,backgroundAlt:tn(i,.08),buttonSecondary:tn(i,.14),buttonSecondaryHover:tn(i,.22),buttonSecondaryText:i,selectionCard:tn(i,.08)}};return mn.set(e,a),a}(e)}function aa({text:e,colors:t}){const n=function(e){const t=[],n=/\*\*(.+?)\*\*/g;let i,o=0;for(;null!==(i=n.exec(e));)i.index>o&&t.push({text:e.slice(o,i.index),bold:!1}),t.push({text:i[1],bold:!0}),o=i.index+i[0].length;return o<e.length&&t.push({text:e.slice(o),bold:!1}),0===t.length&&t.push({text:e,bold:!1}),t}(e);/* @__PURE__ */
33
+ return E(fi,{children:n.map((e,n)=>/* @__PURE__ */E(fi,{style:{fontWeight:e.bold?"700":"400",color:e.bold?t.text:t.textMuted},children:e.text},n))})}function sa({content:e,colors:t}){const n=Kl(e,le().guideLogo);let i=null;try{i=V("react-native-webview").WebView}catch{i=null}return i?/* @__PURE__ */E(i,{source:{html:n},style:{minHeight:420,width:"100%"},originWhitelist:["*"],scrollEnabled:!0}):/* @__PURE__ */E(fi,{style:{fontSize:14,lineHeight:22,color:t.textMuted},children:"This guide uses HTML. Install react-native-webview in the host app to display it on native."})}function ca({rows:e}){/* @__PURE__ */
34
+ return E(W,{style:{gap:0,marginVertical:6},children:e.map((e,t)=>/* @__PURE__ */U(W,{style:{flexDirection:"row",borderWidth:1,borderColor:El,borderTopWidth:0===t?1:0},children:[
35
+ /* @__PURE__ */E(W,{style:{flex:2.2,backgroundColor:"#F9FAFB",paddingVertical:11,paddingHorizontal:14,borderRightWidth:1,borderRightColor:El},children:/* @__PURE__ */E(fi,{style:{fontSize:15,color:"#1A1A1A"},children:e.question})}),
36
+ /* @__PURE__ */E(W,{style:{flex:.65,backgroundColor:"#DCFCE7",paddingVertical:11,paddingHorizontal:8,alignItems:"center",justifyContent:"center",borderRightWidth:1,borderRightColor:El},children:/* @__PURE__ */E(fi,{style:{fontSize:15,fontWeight:"700",color:"#166534"},children:"YES"})}),
37
+ /* @__PURE__ */E(W,{style:{flex:.65,backgroundColor:"#FEE2E2",paddingVertical:11,paddingHorizontal:8,alignItems:"center",justifyContent:"center"},children:/* @__PURE__ */E(fi,{style:{fontSize:15,fontWeight:"700",color:"#991B1B"},children:"NO"})})]},t))})}function da({content:e,colors:t,bodyFont:n,headingFont:i}){const o=function(e){const t=e.replace(/\r\n/g,"\n").split("\n"),n=[];let i=[],o=[];const r=()=>{const e=i.map(e=>e.trim()).filter(Boolean);if(e.length>0){const t=e.map(e=>Ul(e));if(t.every(e=>null!==e))return n.push({type:"propsTable",rows:t}),void(i=[])}const t=i.join(" ").trim();t&&n.push({type:"paragraph",text:t}),i=[]},l=()=>{o.length>0&&(n.push({type:"list",items:[...o]}),o=[])};for(const a of t){const e=a.trim();if(!e){l(),r();continue}const t=e.match(Ql);if(t){l(),r(),n.push({type:"heading",level:Math.min(t[1].length,3),text:t[2].trim()});continue}if(Zl.test(e)){l(),r(),n.push({type:"hr"});continue}const s=e.match(Jl);s?(r(),o.push(s[1].trim())):(l(),i.push(e))}return l(),r(),n}(e);/* @__PURE__ */
38
+ return E(W,{style:{gap:14},children:o.map((e,o)=>"heading"===e.type?/* @__PURE__ */E(fi,{style:{fontSize:{1:20,2:18,3:16}[e.level],fontWeight:"800",color:t.text,textTransform:1===e.level?"uppercase":"none",fontFamily:i??n},children:/* @__PURE__ */E(aa,{text:e.text,colors:t})},o):"paragraph"===e.type?/* @__PURE__ */E(fi,{style:{fontSize:14,lineHeight:22,color:t.textMuted,fontFamily:n},children:/* @__PURE__ */E(aa,{text:e.text,colors:t})},o):"list"===e.type?/* @__PURE__ */E(W,{style:{gap:6,paddingLeft:8},children:e.items.map((e,i)=>/* @__PURE__ */U(fi,{style:{fontSize:14,lineHeight:22,color:t.textMuted,fontFamily:n},children:["• ",/* @__PURE__ */E(aa,{text:e,colors:t})]},i))},o):"propsTable"===e.type?/* @__PURE__ */E(ca,{rows:e.rows},o):/* @__PURE__ */E(W,{style:{height:1,backgroundColor:t.border,marginVertical:4}},o))})}function ha({content:e,panel:t,theme:n,extra:i,title:o="How to Play",label:r="How to Play",variant:l="pill",touchSize:a,colors:s,bodyFont:c,headingFont:h}){const[u,f]=d(!1),g=la(n),{width:p}=F(),y=p>=640,b=!(!t||!n),w=Dl(g),C={color:ki(w,"quiet"),fontSize:li.fontSize.md,fontWeight:"800"};if(!e?.trim()&&!b&&!i)return null;const S=!b&&!!e&&function(e){const t=e.trim();if(!t)return!1;if(ql(t))return!0;const n=Yl(t);return!!Nl.test(n)||Xl.test(t)}(e);/* @__PURE__ */
39
+ return U(j,{children:["link"===l?/* @__PURE__ */E(vi,{theme:w,variant:"quiet",onPress:()=>f(!0),accessibilityLabel:r,style:{alignSelf:"flex-start"},children:"How to play"}):"icon"===l?/* @__PURE__ */E(Ci,{theme:w,size:a??28,onPress:()=>f(!0),accessibilityLabel:r,children:/* @__PURE__ */E(fi,{style:{color:Si(w),fontSize:14,fontWeight:"800",lineHeight:17},children:"?"})}):/* @__PURE__ */U(vi,{theme:w,variant:"quiet",onPress:()=>f(!0),accessibilityLabel:r,style:{alignSelf:"flex-start"},children:[/* @__PURE__ */E(fi,{style:C,children:r}),/* @__PURE__ */E(fi,{style:C,children:"?"})]}),/* @__PURE__ */E(m,{visible:u,animationType:"none",transparent:!0,onRequestClose:()=>f(!1),children:/* @__PURE__ */U(W,{style:[ua.overlay,y?{justifyContent:"center",alignItems:"center",padding:16}:{justifyContent:"flex-end"}],children:[/* @__PURE__ */E(x,{style:B.absoluteFill,onPress:()=>f(!1)}),/* @__PURE__ */U(W,{style:[ua.sheet,y?{maxWidth:672,maxHeight:"85%",borderRadius:sn(n,16)}:{maxHeight:"88%",borderTopLeftRadius:sn(n,16),borderTopRightRadius:sn(n,16)},{backgroundColor:s.background,borderColor:s.border}],children:[
40
+ /* @__PURE__ */U(W,{style:[ua.header,{paddingHorizontal:y?24:16}],children:[/* @__PURE__ */E(fi,{style:[ua.title,{color:s.text,fontFamily:h??c}],children:o}),/* @__PURE__ */E(Ci,{theme:w,size:32,onPress:()=>f(!1),accessibilityLabel:"Close",children:/* @__PURE__ */E(fi,{style:{fontSize:16,color:Si(w)},children:"×"})})]}),
41
+ /* @__PURE__ */E(k,{contentContainerStyle:S?void 0:{paddingHorizontal:y?24:16,paddingVertical:20},children:b?/* @__PURE__ */E(na,{panel:t,theme:n,dividends:i,bodyFont:c,headingFont:h}):/* @__PURE__ */U(j,{children:[S?/* @__PURE__ */E(sa,{content:e,colors:s}):/* @__PURE__ */E(da,{content:e??"",colors:s,bodyFont:c,headingFont:h}),i?/* @__PURE__ */E(W,{style:S?{paddingHorizontal:y?24:16,paddingBottom:20}:{marginTop:16},children:i}):null]})}),
42
+ /* @__PURE__ */E(v,{style:[ua.footer,{borderTopColor:s.border,backgroundColor:s.backgroundAlt}],children:/* @__PURE__ */E(W,{style:{paddingVertical:16,paddingHorizontal:y?24:16},children:/* @__PURE__ */E(vi,{theme:w,size:"lg",block:!0,onPress:()=>f(!1),children:"Got it"})})})]})]})})]})}var ua=B.create({overlay:{flex:1,backgroundColor:"rgba(0,0,0,0.55)"},sheet:{width:"100%",borderWidth:1,overflow:"hidden",shadowColor:"#000",shadowOffset:{width:0,height:25},shadowOpacity:.25,shadowRadius:25,elevation:24},header:{flexDirection:"row",alignItems:"center",gap:8,paddingTop:10,paddingBottom:6},title:{flex:1,fontSize:18,fontWeight:"800"},footer:{borderTopWidth:1}});function fa({category:e,size:t=14,color:n="currentColor"}){const i=n,o=2.25;switch(e){case"casino":/* @__PURE__ */return U(A,{width:t,height:t,viewBox:"0 0 24 24",fill:"none",children:[
43
43
  /* @__PURE__ */E(H,{d:"M10.348 3.169l-7.15 3.113a2 2 0 0 0 -1.03 2.608l4.92 11.895a1.96 1.96 0 0 0 2.59 1.063l7.142 -3.11a2.002 2.002 0 0 0 1.036 -2.611l-4.92 -11.894a1.96 1.96 0 0 0 -2.588 -1.064z",fill:n}),
44
44
  /* @__PURE__ */E(H,{d:"M16 3a2 2 0 0 1 1.995 1.85l.005 .15v3.5a1 1 0 0 1 -1.993 .117l-.007 -.117v-3.5h-1a1 1 0 0 1 -.117 -1.993l.117 -.007h1z",fill:n}),
45
45
  /* @__PURE__ */E(H,{d:"M19.08 5.61a1 1 0 0 1 1.31 -.53c.257 .108 .505 .21 .769 .314a2 2 0 0 1 1.114 2.479l-.056 .146l-2.298 5.374a1 1 0 0 1 -1.878 -.676l.04 -.11l2.296 -5.371l-.366 -.148l-.402 -.167a1 1 0 0 1 -.53 -1.312z",fill:n})]});case"racing":/* @__PURE__ */return U(A,{width:t,height:t,viewBox:"0 0 24 24",fill:"none",children:[/* @__PURE__ */E(H,{d:"M7 10l-.85 8.507a1.357 1.357 0 0 0 1.35 1.493h.146a2 2 0 0 0 1.857 -1.257l.994 -2.486a2 2 0 0 1 1.857 -1.257h1.292a2 2 0 0 1 1.857 1.257l.994 2.486a2 2 0 0 0 1.857 1.257h.146a1.37 1.37 0 0 0 1.364 -1.494l-.864 -9.506h-8c0 -3 -3 -5 -6 -5l-3 6l2 2l3 -2",stroke:i,strokeWidth:o,strokeLinecap:"round",strokeLinejoin:"round"}),/* @__PURE__ */E(H,{d:"M22 14v-2a3 3 0 0 0 -3 -3",stroke:i,strokeWidth:o,strokeLinecap:"round",strokeLinejoin:"round"})]});case"women":/* @__PURE__ */return U(A,{width:t,height:t,viewBox:"0 0 24 24",fill:"none",children:[
@@ -48,306 +48,306 @@ return U(j,{children:["link"===l?/* @__PURE__ */E(vi,{theme:w,variant:"quiet",on
48
48
  /* @__PURE__ */E(H,{d:"M9 18h6",stroke:i,strokeWidth:o,strokeLinecap:"round",strokeLinejoin:"round"})]});default:/* @__PURE__ */return U(A,{width:t,height:t,viewBox:"0 0 24 24",fill:"none",children:[
49
49
  /* @__PURE__ */E(H,{d:"M3 12a9 9 0 1 0 18 0a9 9 0 1 0 -18 0",stroke:i,strokeWidth:o,strokeLinecap:"round",strokeLinejoin:"round"}),
50
50
  /* @__PURE__ */E(H,{d:"M12 7l4.76 3.45l-1.76 5.55h-6l-1.76 -5.55l4.76 -3.45",stroke:i,strokeWidth:o,strokeLinecap:"round",strokeLinejoin:"round"}),
51
- /* @__PURE__ */E(H,{d:"M12 7v-4m3 13l2.5 3m-.74 -8.55l3.74 -1.45m-11.44 7.05l-2.56 2.95m.74 -8.55l-3.74 -1.45",stroke:i,strokeWidth:o,strokeLinecap:"round",strokeLinejoin:"round"})]})}}function fa({size:e=20,color:t="currentColor"}){/* @__PURE__ */
52
- return E(A,{width:e,height:e,viewBox:"0 0 24 24",fill:"none",children:/* @__PURE__ */E(H,{d:"m9 6 6 6-6 6",stroke:t,strokeWidth:2.25,strokeLinecap:"round",strokeLinejoin:"round"})})}function ga({size:e=20,color:t="currentColor"}){/* @__PURE__ */
53
- return U(A,{width:e,height:e,viewBox:"0 0 24 24",fill:"none",children:[/* @__PURE__ */E(H,{d:"M5 11h14a2 2 0 0 1 2 2v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-6a2 2 0 0 1 2-2z",stroke:t,strokeWidth:2.25,strokeLinecap:"round",strokeLinejoin:"round"}),/* @__PURE__ */E(H,{d:"M8 11V7a4 4 0 1 1 8 0v4",stroke:t,strokeWidth:2.25,strokeLinecap:"round",strokeLinejoin:"round"})]})}function pa({label:e,category:t,icon:n,theme:i,disabled:o=!1}){const r=i.colors,l=Nr(i),{width:a}=F(),s=a>=480?20:a>=400?18:16,c=o?r.textMuted:r.textAlt??r.text,d=o?r.border:i.brand?.chip??r.primary,h=o?r.textMuted:i.brand?.icon??r.primaryText??r.buttonPrimaryText;/* @__PURE__ */
54
- return U(W,{style:[ya.row,{gap:.25*s}],children:[
55
- /* @__PURE__ */U(fi,{accessibilityLabel:"YESNO",style:{fontSize:s,lineHeight:1.15*s,letterSpacing:-1,color:c,fontFamily:l},children:[/* @__PURE__ */E(fi,{style:ya.yes,children:"YES"}),/* @__PURE__ */E(fi,{style:ya.no,children:"NO"})]}),
56
- /* @__PURE__ */E(W,{accessible:!0,accessibilityRole:"image",accessibilityLabel:e,style:[ya.pill,{width:1.6*s,height:.85*s,borderRadius:.425*s,backgroundColor:d,transform:[{translateY:.02*-s}]}],children:n??/* @__PURE__ */E(ua,{category:t,size:.6*s,color:h})}),
57
- /* @__PURE__ */U(W,{style:{flexDirection:"row",alignItems:"flex-start",flexShrink:1,minWidth:0},children:[/* @__PURE__ */E(fi,{style:{fontWeight:"500",fontSize:s,lineHeight:1.15*s,flexShrink:1,minWidth:0,color:c,fontFamily:l,includeFontPadding:!1},children:e}),/* @__PURE__ */E(fi,{style:{fontSize:.3*s,lineHeight:.3*s,fontWeight:"600",marginLeft:.06*s,color:c,fontFamily:l,includeFontPadding:!1},children:"TM"})]})]})}var ya=B.create({row:{flexDirection:"row",alignItems:"center",flexWrap:"wrap",maxWidth:"100%"},yes:{fontWeight:"900"},no:{fontWeight:"300"},pill:{alignItems:"center",justifyContent:"center",flexShrink:0}});function ma({size:e=20,color:t="currentColor",filled:n=!1}){/* @__PURE__ */
58
- return E(A,{width:e,height:e,viewBox:"0 0 24 24",fill:"none",children:/* @__PURE__ */E(H,{d:"M12 3.6l2.6 5.28 5.83.85-4.22 4.11.997 5.8L12 16.9l-5.2 2.74.99-5.8L3.57 9.73l5.83-.85L12 3.6z",fill:n?t:"none",stroke:t,strokeWidth:2.25,strokeLinecap:"round",strokeLinejoin:"round"})})}function ba({theme:e,contentContainerStyle:t,hideArrows:n=!1,onMetrics:i,style:o,children:r}){const l=e.colors,a=c(null),s=c(0),h=c(0),u=c(0),[f,g]=d(!1),[p,y]=d(!1),m=()=>{i?.({viewport:h.current,content:u.current});const e=u.current-h.current;g(e>2&&s.current>2),y(s.current<e-2)},b=l.background??"#fff",w=t=>/* @__PURE__ */U(W,{style:[wa.nav,t<0?wa.navLeft:wa.navRight],children:[/* @__PURE__ */E(W,{style:[wa.navBacking,{backgroundColor:b}]}),/* @__PURE__ */E(Ci,{theme:e,size:28,accessibilityLabel:t<0?"Scroll left":"Scroll right",onPress:()=>(e=>{const t=Math.max(0,s.current+e*Math.round(.7*h.current));pi(a,t)})(t),children:/* @__PURE__ */E(W,{style:t<0?wa.navFlip:void 0,children:/* @__PURE__ */E(fa,{size:14,color:Si(e)})})})]});/* @__PURE__ */
59
- return U(W,{style:[wa.wrap,o],children:[
60
- /* @__PURE__ */E(k,{ref:a,horizontal:!0,showsHorizontalScrollIndicator:!1,onScroll:e=>{s.current=e.nativeEvent.contentOffset.x,m()},onLayout:e=>{h.current=e.nativeEvent.layout.width,m()},onContentSizeChange:e=>{u.current=e,m()},scrollEventThrottle:32,contentContainerStyle:[wa.content,t],children:r}),f&&!n&&w(-1),p&&!n&&w(1)]})}var wa=B.create({wrap:{position:"relative",minWidth:0},content:{flexDirection:"row",alignItems:"center",gap:8,paddingHorizontal:2,paddingVertical:2},nav:{position:"absolute",top:"50%",marginTop:-22,width:44,height:44,alignItems:"center",justifyContent:"center"},navLeft:{left:-10},navRight:{right:-10},navBacking:{position:"absolute",top:8,left:8,width:28,height:28,borderRadius:14},navFlip:{transform:[{rotate:"180deg"}]}});function xa({groups:t,theme:n,bodyFont:i}){const o=n.colors;return 0===t.length?null:/* @__PURE__ */E(ba,{theme:n,contentContainerStyle:{gap:6},children:t.map((t,r)=>/* @__PURE__ */U(e.Fragment,{children:[r>0&&/* @__PURE__ */E(W,{style:[ka.divider,{backgroundColor:o.border}]}),t.label?/* @__PURE__ */E(fi,{style:[ka.groupLabel,{color:o.textMuted,fontFamily:i}],children:t.label}):null,t.options.map(e=>{const i=(o=t.value,r=e.value,Array.isArray(o)?null==r?0===o.length:o.includes(r):r===o);var o,r;/* @__PURE__ */
61
- return E(Ll,{theme:n,selected:i,onPress:()=>t.onChange(e.value),style:ka.chip,children:e.label},e.value??"__all")})]},t.label??r))})}function va({label:e,options:t,value:n,onChange:i,theme:o,bodyFont:r}){/* @__PURE__ */
62
- return E(xa,{groups:[{label:e,options:t,value:n,onChange:i}],theme:o,bodyFont:r})}var ka=B.create({groupLabel:{fontSize:9,fontWeight:"800",textTransform:"uppercase",letterSpacing:1.1,flexShrink:0},divider:{width:1,height:16,flexShrink:0},chip:{flexShrink:0}}),Ba=qe,Ca=Ke,Sa=Ke,za="#FAFAF7",Wa=Qe,Fa={perfect_pick:"#4fd6a6",safety_net:"#c2a2f7",head_to_head:"#ff9142",total_points:"#7bb0ff",game_set:"#d2e345",six_again:"#c2a2f7",mirror:"#f4a9c4",mirror_double:"#f4a9c4",mirror_triple:"#f4a9c4",ladder:"#4fd6a6",pick_your_dividend:"#ff9142",quickpick:"#7bb0ff",same_game_multi:"#f4a9c4",first_past_the_post:"#d2e345"},Aa={sports:"#4fd6a6",casino:"#ff9142",racing:"#c2a2f7",prediction:"#7bb0ff",fantasy:"#f4a9c4"},Pa="#fafaf7";function Ta(e,t,n,{outline:i}={}){const o=e.replace(/<\?xml[^?]*\?>/g,"").replace(/<!--[\s\S]*?-->/g,"").replace(/currentColor/g,t).replace(/var\(\s*--icon-accent\s*(?:,[^)]*)?\)/g,n);return i?o.replace(/<svg\b([^>]*)>/,`<svg$1 stroke="${i}" stroke-width="3" stroke-linejoin="round" paint-order="stroke">`):o}function Da(e,t,n,i="down"){const o="down"===i?'x1="0" y1="0" x2="0" y2="1"><stop offset="0.45" stop-color="#fff"/><stop offset="0.7" stop-color="#fff" stop-opacity="0"/>':'x1="1" y1="0" x2="0" y2="0"><stop offset="0.2" stop-color="#fff"/><stop offset="0.55" stop-color="#fff" stop-opacity="0"/>';return`<svg xmlns="http://www.w3.org/2000/svg" width="100%" height="100%"><defs><pattern id="${n}" width="34" height="34" patternUnits="userSpaceOnUse" patternTransform="rotate(-14)"><g transform="translate(4 4) scale(0.26)">${r=Ta(e,t,t),r.replace(/^[\s\S]*?<svg\b[^>]*>/,"").replace(/<\/svg>\s*$/,"")}</g></pattern><linearGradient id="${n}-f" ${o}</linearGradient><mask id="${n}-m"><rect width="100%" height="100%" fill="url(#${n}-f)"/></mask></defs><rect width="100%" height="100%" fill="url(#${n})" mask="url(#${n}-m)" opacity="0.12"/></svg>`;var r}function Ha(e,t,{ink:n,ground:i,id:o,fade:r}){const l={left:.31,top:.22,size:.38},a={left:0,top:0,size:1,xml:Ta(t,n,Pa,{outline:n})};if("stacked"===e)return{box:l,tiles:[],layers:[{left:.05,top:.05,size:1,opacity:.35,xml:Ta(t,n,n,{outline:n})},a]};if("tile"===e){const e=(e,t)=>({left:e,top:e,size:1,radius:.25,color:n,opacity:t});return{box:{left:.33,top:.22,size:.34},pattern:Da(t,n,o,r),tiles:[e(.06,.3),e(0,1)],layers:[{left:.125,top:.125,size:.75,xml:Ta(t,i,Pa)}]}}return{box:l,tiles:[],layers:[a]}}function Ma(e,t=za,n=Wa){const i=220/270,o=25/270,r=(e,t)=>({left:e*o,top:e*o,size:i,radius:44/270,color:Sa,opacity:t});return{box:{left:.32,top:.22,size:.36},tiles:[r(2,.3),r(1,.55),r(0,1)],layers:[{left:.1074074074074074,top:.1074074074074074,size:.6,xml:Ta(e,t,n)}]}}function La(e,t){const n=e.allowed_propositions&&e.allowed_propositions.length>0?e.allowed_propositions.map(Number):[],i=e.min_propositions??e.num_propositions??null,o=e.max_propositions??e.num_propositions??null,r=0===n.length&&null!==i&&null!==o&&o>0,l=n.length>0?n:r?en(i,o):[],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 s=Array.from(a.values()).sort((e,t)=>e.count-t.count),c=l.length>0?Math.max(...l.map(Number)):0,d=co(e)?go(e):null,h=d?d.dividends.map(e=>({dividend:e.dividend,stakeFrom:Math.min(...e.rungs.map(e=>e.stake))})):void 0,u=d?[]:s.map(t=>({count:t.count,payout20:t.payout>0&&t.betAmount>0?wr(t.payout/t.betAmount*20,e):br(e,t.count,20)})),f=eo(e,c),g="safety_net"===f?.kind?(f.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:c,tiers:u,modes:g,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 Ra(e){switch(ar(e)){case"ladder":return"Prizes stack at each paying tier";case"safety_net":return"Choose cover for one or two misses";case"mirror":return"Win at either end of the card";case"pick_your_dividend":return"Choose your dividend first";case"six_again":return"Six picks, with optional boosts";case"game_set":return"Set your picks and stake first";case"quick_pick":return"Let Quick Pick fill your card";default:return"exact"===e.rule?"Get every pick right":e.call_to_action||e.description||"Explore the rules and payouts"}}function Ia(e,t){return Bo(e)?.defaultLegs??Ji(e)?.modes.find(t=>t.id===Ji(e)?.defaultModeId)?.defaultLegs??(t.length?Math.max(...t):e.num_propositions??0)}function Oa(e,t){return{heading:"What you get back",aside:`Includes your ${yt(e.stake)} stake`,note:"",rows:(n=e.legs,i=e.nearMiss.length,o=t=>Ni(e,t),[...Array.from({length:i+1},(e,t)=>({label:t?`${n-t} right, ${t} ${t>1?"misses":"miss"}`:`All ${n} right`,amount:o(t),correct:n-t})),{label:`${i+1} or more misses`,amount:0}])};var n,i,o}function ja(e,t,n,i){const o=Bo(e)?.ladders.find(e=>e.legs===t);if(o)return{heading:`${t} legs · total payout`,note:"Each reached tier adds to your total. Amounts include your stake.",rows:[{label:`0–${o.firstPayingTier-1} correct`,amount:0},...xo(o,n).map(e=>({label:`${e.atLeast} of ${t} correct`,amount:e.cumulative,added:e.prize,correct:e.atLeast}))]};const r=Ji(e);if(r){const e=r.modes.find(e=>t-(i??-1)===e.allowedMisses)??r.modes.find(e=>e.id===r.defaultModeId)??r.modes[0];return Oa(Yi(n,t,e.allowedMisses,r.pricing),e.label)}return null}function Ea(e,t,n){if(xr(e)||!["rule_setup","selections","game_set","quick_pick"].includes(ar(e))||"exact"!==e.rule)return null;const i=La(e,n);return i.hasGenericDividends?{heading:"Legs · potential payout",note:"All correct to win. Amounts include your stake.",rows:i.tiers.filter(e=>e.payout20>0).map(e=>({label:`${e.count} legs`,amount:e.payout20*t/20}))}:null}function Ua(e){return e.allowed_propositions&&e.allowed_propositions.length>0&&e.game_name.replace(/\s+\d+\s*$/,"").trim()||e.game_name}function Ga(e){switch(Q(e)){case"perfect_pick":return"Every pick right wins the dividend";case"head_to_head":return"Back a side, one pick each";case"total_points":return"Over or under, every match";default:return Ra(e)}}function Va(e,t,n=20){const{legOptions:i}=La(e,t),o=Ia(e,i);if(!o)return null;const r=fl(t,o,{game:e,stake:n})*n/20;return r>0?{amount:r,count:o,stake:n}:null}function Ya(e){const t=zo(e),n=So.find(e=>e.level===t)??So[0];return{id:n.id,label:n.shortLabel}}var Na=["perfect_pick","safety_net","head_to_head","total_points","mirror","ladder"],Xa={perfect_pick:"#77e8be",safety_net:"#bd91f7",head_to_head:"#ff9b4a",total_points:"#438ffe",mirror:"#f8cddd",ladder:"#f6f1e1"},qa={signature:"#77e8be",premier:"#bd91f7",exclusive:"#ff9b4a"};function Ka(e,t=[]){const n=se(e,t);if(n)return{title:n.tag,description:n.description};switch(Q(e)){case"perfect_pick":return{title:"Every call. All correct.",description:"Build your multi and get every selection right."};case"safety_net":return{title:"Room for a missed call.",description:"Choose cover for one or two misses. See the rules for eligible outcomes."};case"head_to_head":return{title:"Make the match-up calls.",description:"Choose your answers across a card of Head to Head propositions."};case"total_points":return{title:"Call the totals.",description:"Make your calls on whether the totals reach the line."};case"mirror":return{title:"Both sides of the story.",description:"Get every call right, or every call wrong. Explore the Mirror rules."};case"ladder":return{title:"A prize at each step.",description:"Build your selections and explore the paying tiers."};default:return{title:e.game_name,description:e.call_to_action||Ra(e)}}}function Qa(e){const t=e.colors;return{canvas:t.primary,onCanvas:t.primaryText,surface:t.background,text:t.text,muted:t.textMuted,accent:t.infoText,button:t.buttonPrimary,buttonText:t.buttonPrimaryText,coverText:"#111b36",...e.shelf,coverColors:{...Xa,...e.shelf?.coverColors},tierColors:{...qa,...e.shelf?.tierColors},categoryColors:{sports:"#61fac0",casino:"#fcad6f",racing:"#c1a8fc",prediction:"#18acfe",fantasy:"#fdbcd0",...e.shelf?.categoryColors}}}var Ja=12;function Za(e,t,n=ie){const i=se(e,n.presets),o=Q(e);return i&&void 0!==t.shelf?.artwork?.[i.id]?t.shelf.artwork[i.id]:void 0!==t.shelf?.artwork?.[o]?t.shelf.artwork[o]:(i?n.presetCovers[i.id]:void 0)??n.covers[o]}function $a(e,t,n={}){const i=Qa(t),o=t.shelf?.coverStyle??"brand";if("art"===o){const o=t.shelf?.categoryArtwork?.[e];return{ground:i.categoryColors[e],ink:i.coverText,art:void 0!==o?o:n.categoryCovers?.[e]}}const r=n.categoryIcons?.[e]??n.categoryIcons?.sports;if("brand"===o)return{ground:t.shelf?.categoryColors?.[e]??Ba,ink:t.shelf?.coverText??Ca,drawn:r?Ma(r):void 0};const l=t.shelf?.categoryColors?.[e]??Aa[e]??i.categoryColors[e];return{ground:l,ink:i.coverText,drawn:r?Ha(o,r,{ink:i.coverText,ground:l,id:`gs-category-${e}`,fade:"left"}):void 0}}function _a(e,t=[]){return se(e,t)?.name??e.game_name}function es({size:e=20,color:t}){/* @__PURE__ */
63
- return E(A,{width:e,height:e,viewBox:"0 0 24 24",children:Qr.map(e=>/* @__PURE__ */E(H,{d:e,fill:"none",stroke:t,strokeWidth:2.4,strokeLinecap:"round",strokeLinejoin:"round"},e))})}function ts({onPress:e,onDoubleClick:t,hint:n,tone:i="solid",theme:o,menu:l=!1,expanded:a=!1,disabled:s=!1,style:d}){const h=r(gl),u=o??h?.theme??Fn,f=u.colors,g=Yr(u),{hovered:p,pressed:y,handlers:m}=wi(),b=c(0),w="solid"===i,{width:x}=F(),v=w&&x<640,k=ci(u,"secondary",{hovered:p,pressed:y,disabled:s}),B=w?40:36,C=w?wn(f.primary,bn(u),f.primaryText):bn(u),S=w?f.primaryText:k.color,P=(e,t)=>/* @__PURE__ */E(W,{pointerEvents:"none",style:{position:"absolute",left:e,top:e,right:-e,bottom:-e,borderRadius:sn(u,12),backgroundColor:tn(f.primary,t)}});/* @__PURE__ */
51
+ /* @__PURE__ */E(H,{d:"M12 7v-4m3 13l2.5 3m-.74 -8.55l3.74 -1.45m-11.44 7.05l-2.56 2.95m.74 -8.55l-3.74 -1.45",stroke:i,strokeWidth:o,strokeLinecap:"round",strokeLinejoin:"round"})]})}}function ga({size:e=20,color:t="currentColor"}){/* @__PURE__ */
52
+ return E(A,{width:e,height:e,viewBox:"0 0 24 24",fill:"none",children:/* @__PURE__ */E(H,{d:"m9 6 6 6-6 6",stroke:t,strokeWidth:2.25,strokeLinecap:"round",strokeLinejoin:"round"})})}function pa({size:e=20,color:t="currentColor"}){/* @__PURE__ */
53
+ return U(A,{width:e,height:e,viewBox:"0 0 24 24",fill:"none",children:[/* @__PURE__ */E(H,{d:"M5 11h14a2 2 0 0 1 2 2v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-6a2 2 0 0 1 2-2z",stroke:t,strokeWidth:2.25,strokeLinecap:"round",strokeLinejoin:"round"}),/* @__PURE__ */E(H,{d:"M8 11V7a4 4 0 1 1 8 0v4",stroke:t,strokeWidth:2.25,strokeLinecap:"round",strokeLinejoin:"round"})]})}function ya({label:e,category:t,icon:n,theme:i,disabled:o=!1}){const r=i.colors,l=Nr(i),{width:a}=F(),s=a>=480?20:a>=400?18:16,c=o?r.textMuted:r.textAlt??r.text,d=o?r.border:i.brand?.chip??r.primary,h=o?r.textMuted:i.brand?.icon??r.primaryText??r.buttonPrimaryText;/* @__PURE__ */
54
+ return U(W,{style:[ma.row,{gap:.25*s}],children:[
55
+ /* @__PURE__ */U(fi,{accessibilityLabel:"YESNO",style:{fontSize:s,lineHeight:1.15*s,letterSpacing:-1,color:c,fontFamily:l},children:[/* @__PURE__ */E(fi,{style:ma.yes,children:"YES"}),/* @__PURE__ */E(fi,{style:ma.no,children:"NO"})]}),
56
+ /* @__PURE__ */E(W,{accessible:!0,accessibilityRole:"image",accessibilityLabel:e,style:[ma.pill,{width:1.6*s,height:.85*s,borderRadius:.425*s,backgroundColor:d,transform:[{translateY:.02*-s}]}],children:n??/* @__PURE__ */E(fa,{category:t,size:.6*s,color:h})}),
57
+ /* @__PURE__ */U(W,{style:{flexDirection:"row",alignItems:"flex-start",flexShrink:1,minWidth:0},children:[/* @__PURE__ */E(fi,{style:{fontWeight:"500",fontSize:s,lineHeight:1.15*s,flexShrink:1,minWidth:0,color:c,fontFamily:l,includeFontPadding:!1},children:e}),/* @__PURE__ */E(fi,{style:{fontSize:.3*s,lineHeight:.3*s,fontWeight:"600",marginLeft:.06*s,color:c,fontFamily:l,includeFontPadding:!1},children:"TM"})]})]})}var ma=B.create({row:{flexDirection:"row",alignItems:"center",flexWrap:"wrap",maxWidth:"100%"},yes:{fontWeight:"900"},no:{fontWeight:"300"},pill:{alignItems:"center",justifyContent:"center",flexShrink:0}});function ba({size:e=20,color:t="currentColor",filled:n=!1}){/* @__PURE__ */
58
+ return E(A,{width:e,height:e,viewBox:"0 0 24 24",fill:"none",children:/* @__PURE__ */E(H,{d:"M12 3.6l2.6 5.28 5.83.85-4.22 4.11.997 5.8L12 16.9l-5.2 2.74.99-5.8L3.57 9.73l5.83-.85L12 3.6z",fill:n?t:"none",stroke:t,strokeWidth:2.25,strokeLinecap:"round",strokeLinejoin:"round"})})}function wa({theme:e,contentContainerStyle:t,hideArrows:n=!1,onMetrics:i,style:o,children:r}){const l=e.colors,a=c(null),s=c(0),h=c(0),u=c(0),[f,g]=d(!1),[p,y]=d(!1),m=()=>{i?.({viewport:h.current,content:u.current});const e=u.current-h.current;g(e>2&&s.current>2),y(s.current<e-2)},b=l.background??"#fff",w=t=>/* @__PURE__ */U(W,{style:[xa.nav,t<0?xa.navLeft:xa.navRight],children:[/* @__PURE__ */E(W,{style:[xa.navBacking,{backgroundColor:b}]}),/* @__PURE__ */E(Ci,{theme:e,size:28,accessibilityLabel:t<0?"Scroll left":"Scroll right",onPress:()=>(e=>{const t=Math.max(0,s.current+e*Math.round(.7*h.current));pi(a,t)})(t),children:/* @__PURE__ */E(W,{style:t<0?xa.navFlip:void 0,children:/* @__PURE__ */E(ga,{size:14,color:Si(e)})})})]});/* @__PURE__ */
59
+ return U(W,{style:[xa.wrap,o],children:[
60
+ /* @__PURE__ */E(k,{ref:a,horizontal:!0,showsHorizontalScrollIndicator:!1,onScroll:e=>{s.current=e.nativeEvent.contentOffset.x,m()},onLayout:e=>{h.current=e.nativeEvent.layout.width,m()},onContentSizeChange:e=>{u.current=e,m()},scrollEventThrottle:32,contentContainerStyle:[xa.content,t],children:r}),f&&!n&&w(-1),p&&!n&&w(1)]})}var xa=B.create({wrap:{position:"relative",minWidth:0},content:{flexDirection:"row",alignItems:"center",gap:8,paddingHorizontal:2,paddingVertical:2},nav:{position:"absolute",top:"50%",marginTop:-22,width:44,height:44,alignItems:"center",justifyContent:"center"},navLeft:{left:-10},navRight:{right:-10},navBacking:{position:"absolute",top:8,left:8,width:28,height:28,borderRadius:14},navFlip:{transform:[{rotate:"180deg"}]}});function va({groups:t,theme:n,bodyFont:i}){const o=n.colors;return 0===t.length?null:/* @__PURE__ */E(wa,{theme:n,contentContainerStyle:{gap:6},children:t.map((t,r)=>/* @__PURE__ */U(e.Fragment,{children:[r>0&&/* @__PURE__ */E(W,{style:[Ba.divider,{backgroundColor:o.border}]}),t.label?/* @__PURE__ */E(fi,{style:[Ba.groupLabel,{color:o.textMuted,fontFamily:i}],children:t.label}):null,t.options.map(e=>{const i=(o=t.value,r=e.value,Array.isArray(o)?null==r?0===o.length:o.includes(r):r===o);var o,r;/* @__PURE__ */
61
+ return E(Rl,{theme:n,selected:i,onPress:()=>t.onChange(e.value),style:Ba.chip,children:e.label},e.value??"__all")})]},t.label??r))})}function ka({label:e,options:t,value:n,onChange:i,theme:o,bodyFont:r}){/* @__PURE__ */
62
+ return E(va,{groups:[{label:e,options:t,value:n,onChange:i}],theme:o,bodyFont:r})}var Ba=B.create({groupLabel:{fontSize:9,fontWeight:"800",textTransform:"uppercase",letterSpacing:1.1,flexShrink:0},divider:{width:1,height:16,flexShrink:0},chip:{flexShrink:0}}),Ca=qe,Sa=Ke,za=Ke,Wa="#FAFAF7",Fa=Qe,Aa={perfect_pick:"#4fd6a6",safety_net:"#c2a2f7",head_to_head:"#ff9142",total_points:"#7bb0ff",game_set:"#d2e345",six_again:"#c2a2f7",mirror:"#f4a9c4",mirror_double:"#f4a9c4",mirror_triple:"#f4a9c4",ladder:"#4fd6a6",pick_your_dividend:"#ff9142",quickpick:"#7bb0ff",same_game_multi:"#f4a9c4",first_past_the_post:"#d2e345"},Pa={sports:"#4fd6a6",casino:"#ff9142",racing:"#c2a2f7",prediction:"#7bb0ff",fantasy:"#f4a9c4"},Ta="#fafaf7";function Da(e,t,n,{outline:i}={}){const o=e.replace(/<\?xml[^?]*\?>/g,"").replace(/<!--[\s\S]*?-->/g,"").replace(/currentColor/g,t).replace(/var\(\s*--icon-accent\s*(?:,[^)]*)?\)/g,n);return i?o.replace(/<svg\b([^>]*)>/,`<svg$1 stroke="${i}" stroke-width="3" stroke-linejoin="round" paint-order="stroke">`):o}function Ha(e,t,n,i="down"){const o="down"===i?'x1="0" y1="0" x2="0" y2="1"><stop offset="0.45" stop-color="#fff"/><stop offset="0.7" stop-color="#fff" stop-opacity="0"/>':'x1="1" y1="0" x2="0" y2="0"><stop offset="0.2" stop-color="#fff"/><stop offset="0.55" stop-color="#fff" stop-opacity="0"/>';return`<svg xmlns="http://www.w3.org/2000/svg" width="100%" height="100%"><defs><pattern id="${n}" width="34" height="34" patternUnits="userSpaceOnUse" patternTransform="rotate(-14)"><g transform="translate(4 4) scale(0.26)">${r=Da(e,t,t),r.replace(/^[\s\S]*?<svg\b[^>]*>/,"").replace(/<\/svg>\s*$/,"")}</g></pattern><linearGradient id="${n}-f" ${o}</linearGradient><mask id="${n}-m"><rect width="100%" height="100%" fill="url(#${n}-f)"/></mask></defs><rect width="100%" height="100%" fill="url(#${n})" mask="url(#${n}-m)" opacity="0.12"/></svg>`;var r}function Ma(e,t,{ink:n,ground:i,id:o,fade:r}){const l={left:.31,top:.22,size:.38},a={left:0,top:0,size:1,xml:Da(t,n,Ta,{outline:n})};if("stacked"===e)return{box:l,tiles:[],layers:[{left:.05,top:.05,size:1,opacity:.35,xml:Da(t,n,n,{outline:n})},a]};if("tile"===e){const e=(e,t)=>({left:e,top:e,size:1,radius:.25,color:n,opacity:t});return{box:{left:.33,top:.22,size:.34},pattern:Ha(t,n,o,r),tiles:[e(.06,.3),e(0,1)],layers:[{left:.125,top:.125,size:.75,xml:Da(t,i,Ta)}]}}return{box:l,tiles:[],layers:[a]}}function La(e,t=Wa,n=Fa){const i=220/270,o=25/270,r=(e,t)=>({left:e*o,top:e*o,size:i,radius:44/270,color:za,opacity:t});return{box:{left:.32,top:.22,size:.36},tiles:[r(2,.3),r(1,.55),r(0,1)],layers:[{left:.1074074074074074,top:.1074074074074074,size:.6,xml:Da(e,t,n)}]}}function Ra(e,t){const n=e.allowed_propositions&&e.allowed_propositions.length>0?e.allowed_propositions.map(Number):[],i=e.min_propositions??e.num_propositions??null,o=e.max_propositions??e.num_propositions??null,r=0===n.length&&null!==i&&null!==o&&o>0,l=n.length>0?n:r?en(i,o):[],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 s=Array.from(a.values()).sort((e,t)=>e.count-t.count),c=l.length>0?Math.max(...l.map(Number)):0,d=co(e)?go(e):null,h=d?d.dividends.map(e=>({dividend:e.dividend,stakeFrom:Math.min(...e.rungs.map(e=>e.stake))})):void 0,u=d?[]:s.map(t=>({count:t.count,payout20:t.payout>0&&t.betAmount>0?wr(t.payout/t.betAmount*20,e):br(e,t.count,20)})),f=eo(e,c),g="safety_net"===f?.kind?(f.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:c,tiers:u,modes:g,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 Ia(e){switch(ar(e)){case"ladder":return"Prizes stack at each paying tier";case"safety_net":return"Choose cover for one or two misses";case"mirror":return"Win at either end of the card";case"pick_your_dividend":return"Choose your dividend first";case"six_again":return"Six picks, with optional boosts";case"game_set":return"Set your picks and stake first";case"quick_pick":return"Let Quick Pick fill your card";default:return"exact"===e.rule?"Get every pick right":e.call_to_action||e.description||"Explore the rules and payouts"}}function Oa(e,t){return Bo(e)?.defaultLegs??Ji(e)?.modes.find(t=>t.id===Ji(e)?.defaultModeId)?.defaultLegs??(t.length?Math.max(...t):e.num_propositions??0)}function ja(e,t){return{heading:"What you get back",aside:`Includes your ${yt(e.stake)} stake`,note:"",rows:(n=e.legs,i=e.nearMiss.length,o=t=>Ni(e,t),[...Array.from({length:i+1},(e,t)=>({label:t?`${n-t} right, ${t} ${t>1?"misses":"miss"}`:`All ${n} right`,amount:o(t),correct:n-t})),{label:`${i+1} or more misses`,amount:0}])};var n,i,o}function Ea(e,t,n,i){const o=Bo(e)?.ladders.find(e=>e.legs===t);if(o)return{heading:`${t} legs · total payout`,note:"Each reached tier adds to your total. Amounts include your stake.",rows:[{label:`0–${o.firstPayingTier-1} correct`,amount:0},...xo(o,n).map(e=>({label:`${e.atLeast} of ${t} correct`,amount:e.cumulative,added:e.prize,correct:e.atLeast}))]};const r=Ji(e);if(r){const e=r.modes.find(e=>t-(i??-1)===e.allowedMisses)??r.modes.find(e=>e.id===r.defaultModeId)??r.modes[0];return ja(Yi(n,t,e.allowedMisses,r.pricing),e.label)}return null}function Ua(e,t,n){if(xr(e)||!["rule_setup","selections","game_set","quick_pick"].includes(ar(e))||"exact"!==e.rule)return null;const i=Ra(e,n);return i.hasGenericDividends?{heading:"Legs · potential payout",note:"All correct to win. Amounts include your stake.",rows:i.tiers.filter(e=>e.payout20>0).map(e=>({label:`${e.count} legs`,amount:e.payout20*t/20}))}:null}function Ga(e){return e.allowed_propositions&&e.allowed_propositions.length>0&&e.game_name.replace(/\s+\d+\s*$/,"").trim()||e.game_name}function Va(e){switch(Q(e)){case"perfect_pick":return"Every pick right wins the dividend";case"head_to_head":return"Back a side, one pick each";case"total_points":return"Over or under, every match";default:return Ia(e)}}function Ya(e,t,n=20){const{legOptions:i}=Ra(e,t),o=Oa(e,i);if(!o)return null;const r=gl(t,o,{game:e,stake:n})*n/20;return r>0?{amount:r,count:o,stake:n}:null}function Na(e){const t=zo(e),n=So.find(e=>e.level===t)??So[0];return{id:n.id,label:n.shortLabel}}var Xa=["perfect_pick","safety_net","head_to_head","total_points","mirror","ladder"],qa={perfect_pick:"#77e8be",safety_net:"#bd91f7",head_to_head:"#ff9b4a",total_points:"#438ffe",mirror:"#f8cddd",ladder:"#f6f1e1"},Ka={signature:"#77e8be",premier:"#bd91f7",exclusive:"#ff9b4a"};function Qa(e,t=[]){const n=se(e,t);if(n)return{title:n.tag,description:n.description};switch(Q(e)){case"perfect_pick":return{title:"Every call. All correct.",description:"Build your multi and get every selection right."};case"safety_net":return{title:"Room for a missed call.",description:"Choose cover for one or two misses. See the rules for eligible outcomes."};case"head_to_head":return{title:"Make the match-up calls.",description:"Choose your answers across a card of Head to Head propositions."};case"total_points":return{title:"Call the totals.",description:"Make your calls on whether the totals reach the line."};case"mirror":return{title:"Both sides of the story.",description:"Get every call right, or every call wrong. Explore the Mirror rules."};case"ladder":return{title:"A prize at each step.",description:"Build your selections and explore the paying tiers."};default:return{title:e.game_name,description:e.call_to_action||Ia(e)}}}function Ja(e){const t=e.colors;return{canvas:t.primary,onCanvas:t.primaryText,surface:t.background,text:t.text,muted:t.textMuted,accent:t.infoText,button:t.buttonPrimary,buttonText:t.buttonPrimaryText,coverText:"#111b36",...e.shelf,coverColors:{...qa,...e.shelf?.coverColors},tierColors:{...Ka,...e.shelf?.tierColors},categoryColors:{sports:"#61fac0",casino:"#fcad6f",racing:"#c1a8fc",prediction:"#18acfe",fantasy:"#fdbcd0",...e.shelf?.categoryColors}}}var Za=12;function $a(e,t,n=ie){const i=se(e,n.presets),o=Q(e);return i&&void 0!==t.shelf?.artwork?.[i.id]?t.shelf.artwork[i.id]:void 0!==t.shelf?.artwork?.[o]?t.shelf.artwork[o]:(i?n.presetCovers[i.id]:void 0)??n.covers[o]}function _a(e,t,n={}){const i=Ja(t),o=t.shelf?.coverStyle??"brand";if("art"===o){const o=t.shelf?.categoryArtwork?.[e];return{ground:i.categoryColors[e],ink:i.coverText,art:void 0!==o?o:n.categoryCovers?.[e]}}const r=n.categoryIcons?.[e]??n.categoryIcons?.sports;if("brand"===o)return{ground:t.shelf?.categoryColors?.[e]??Ca,ink:t.shelf?.coverText??Sa,drawn:r?La(r):void 0};const l=t.shelf?.categoryColors?.[e]??Pa[e]??i.categoryColors[e];return{ground:l,ink:i.coverText,drawn:r?Ma(o,r,{ink:i.coverText,ground:l,id:`gs-category-${e}`,fade:"left"}):void 0}}function es(e,t=[]){return se(e,t)?.name??e.game_name}function ts({size:e=20,color:t}){/* @__PURE__ */
63
+ return E(A,{width:e,height:e,viewBox:"0 0 24 24",children:Jr.map(e=>/* @__PURE__ */E(H,{d:e,fill:"none",stroke:t,strokeWidth:2.4,strokeLinecap:"round",strokeLinejoin:"round"},e))})}function ns({onPress:e,onDoubleClick:t,hint:n,tone:i="solid",theme:o,menu:l=!1,expanded:a=!1,disabled:s=!1,style:d}){const h=r(pl),u=o??h?.theme??Fn,f=u.colors,g=Yr(u),{hovered:p,pressed:y,handlers:m}=wi(),b=c(0),w="solid"===i,{width:x}=F(),v=w&&x<640,k=ci(u,"secondary",{hovered:p,pressed:y,disabled:s}),B=w?40:36,C=w?wn(f.primary,bn(u),f.primaryText):bn(u),S=w?f.primaryText:k.color,P=(e,t)=>/* @__PURE__ */E(W,{pointerEvents:"none",style:{position:"absolute",left:e,top:e,right:-e,bottom:-e,borderRadius:sn(u,12),backgroundColor:tn(f.primary,t)}});/* @__PURE__ */
64
64
  return U(W,{style:[{marginRight:8,marginBottom:w?8:0,overflow:"visible"},d],children:[y||s?null:P(8,w?.17:.1),y||s?null:P(4,w?.42:.22),
65
65
  /* @__PURE__ */U(z,{...m,accessibilityRole:"button",accessibilityLabel:"QuickPick",accessibilityHint:n,accessibilityState:{disabled:s,...l?{expanded:a}:null},activeOpacity:1,disabled:s,onPress:()=>{if(e(),!t)return;const n=Date.now();n-b.current<300?(b.current=0,t()):b.current=n},style:[{flexDirection:"row",alignItems:"center",gap:w?10:8,minHeight:52,paddingLeft:v?6:7,paddingRight:v?6:w?14:10,borderRadius:sn(u,12),backgroundColor:w?f.primary:k.background,opacity:s?.5:1},xi(y,s)],children:[
66
- /* @__PURE__ */E(W,{style:{width:B,height:B,borderRadius:sn(u,10),backgroundColor:C,borderWidth:w?0:1.5,borderColor:f.primary,alignItems:"center",justifyContent:"center"},children:/* @__PURE__ */E(es,{color:C===f.primaryText?f.primary:Kt(C,f.primaryText,f.primary)})}),v?null:/* @__PURE__ */U(W,{style:{flexShrink:1},children:[/* @__PURE__ */E(fi,{style:{color:S,fontFamily:g,fontSize:15,fontWeight:"800"},children:"QuickPick"}),n?/* @__PURE__ */E(fi,{style:{color:tn(w?f.primaryText:k.color,.8),fontFamily:g,fontSize:12,fontWeight:"600"},children:n}):null]}),l&&!v?/* @__PURE__ */E(W,{style:{transform:[{rotate:a?"180deg":"0deg"}]},children:/* @__PURE__ */E(A,{width:14,height:14,viewBox:"0 0 24 24",fill:"none",children:/* @__PURE__ */E(H,{d:"m6 9 6 6 6-6",stroke:S,strokeWidth:2.5,strokeLinecap:"round",strokeLinejoin:"round"})})}):null]})]})}function ns({onPress:e,onDoubleClick:t,label:n="QUICKPICK",size:i,yesColor:o,noColor:l,theme:a,menu:s=!1,expanded:d=!1,hint:h}){const u=r(gl),f=oi(),g=f.quickPick,p=ra(a??u?.theme??Fn),y=cn(p),m=p.colors,b=Fi(),w=o??gn(p),x=l??pn(p),v="sm"===(i??("inline"===f.pageHeader.layout?"sm":"md")),k=v?y.space.xs:y.space.sm,C=v?5:8,S=y.fontSize.md,F=v?9.5:10,{hovered:P,pressed:D,handlers:L}=wi(),R=ai(m.primary,{hovered:P,pressed:D}),I=c(0),O=()=>{if(e(),t){const e=Date.now();e-I.current<300?(I.current=0,t()):I.current=e}};if("deck"===g)/* @__PURE__ */return E(ts,{onPress:e,onDoubleClick:t,hint:h,theme:p,menu:s,expanded:d});if("solid"===g){const e=ki(p);/* @__PURE__ */
67
- return E(vi,{theme:p,accessibilityLabel:"QuickPick",accessibilityState:s?{expanded:d}:void 0,onPress:O,icon:/* @__PURE__ */E(es,{size:16,color:e}),children:s?/* @__PURE__ */U(j,{children:[/* @__PURE__ */E(fi,{style:{color:e,fontSize:li.fontSize.md,fontWeight:"800"},children:"QuickPick"}),/* @__PURE__ */E(W,{style:{transform:[{rotate:d?"180deg":"0deg"}]},children:/* @__PURE__ */E(A,{width:14,height:14,viewBox:"0 0 24 24",fill:"none",children:/* @__PURE__ */E(H,{d:"m6 9 6 6 6-6",stroke:e,strokeWidth:2.5,strokeLinecap:"round",strokeLinejoin:"round"})})})]}):"QuickPick"})}/* @__PURE__ */
68
- return U(z,{...L,onPress:O,activeOpacity:1,accessibilityRole:"button",accessibilityLabel:n,style:[is.container,{borderColor:R?.borderColor??tn(m.border,.6),borderRadius:y.radius.sm,minHeight:y.touchTarget.min},xi(D)],children:[/* @__PURE__ */U(W,{style:is.topRow,children:[
66
+ /* @__PURE__ */E(W,{style:{width:B,height:B,borderRadius:sn(u,10),backgroundColor:C,borderWidth:w?0:1.5,borderColor:f.primary,alignItems:"center",justifyContent:"center"},children:/* @__PURE__ */E(ts,{color:C===f.primaryText?f.primary:Kt(C,f.primaryText,f.primary)})}),v?null:/* @__PURE__ */U(W,{style:{flexShrink:1},children:[/* @__PURE__ */E(fi,{style:{color:S,fontFamily:g,fontSize:15,fontWeight:"800"},children:"QuickPick"}),n?/* @__PURE__ */E(fi,{style:{color:tn(w?f.primaryText:k.color,.8),fontFamily:g,fontSize:12,fontWeight:"600"},children:n}):null]}),l&&!v?/* @__PURE__ */E(W,{style:{transform:[{rotate:a?"180deg":"0deg"}]},children:/* @__PURE__ */E(A,{width:14,height:14,viewBox:"0 0 24 24",fill:"none",children:/* @__PURE__ */E(H,{d:"m6 9 6 6 6-6",stroke:S,strokeWidth:2.5,strokeLinecap:"round",strokeLinejoin:"round"})})}):null]})]})}function is({onPress:e,onDoubleClick:t,label:n="QUICKPICK",size:i,yesColor:o,noColor:l,theme:a,menu:s=!1,expanded:d=!1,hint:h}){const u=r(pl),f=oi(),g=f.quickPick,p=la(a??u?.theme??Fn),y=cn(p),m=p.colors,b=Fi(),w=o??gn(p),x=l??pn(p),v="sm"===(i??("inline"===f.pageHeader.layout?"sm":"md")),k=v?y.space.xs:y.space.sm,C=v?5:8,S=y.fontSize.md,F=v?9.5:10,{hovered:P,pressed:D,handlers:L}=wi(),R=ai(m.primary,{hovered:P,pressed:D}),I=c(0),O=()=>{if(e(),t){const e=Date.now();e-I.current<300?(I.current=0,t()):I.current=e}};if("deck"===g)/* @__PURE__ */return E(ns,{onPress:e,onDoubleClick:t,hint:h,theme:p,menu:s,expanded:d});if("solid"===g){const e=ki(p);/* @__PURE__ */
67
+ return E(vi,{theme:p,accessibilityLabel:"QuickPick",accessibilityState:s?{expanded:d}:void 0,onPress:O,icon:/* @__PURE__ */E(ts,{size:16,color:e}),children:s?/* @__PURE__ */U(j,{children:[/* @__PURE__ */E(fi,{style:{color:e,fontSize:li.fontSize.md,fontWeight:"800"},children:"QuickPick"}),/* @__PURE__ */E(W,{style:{transform:[{rotate:d?"180deg":"0deg"}]},children:/* @__PURE__ */E(A,{width:14,height:14,viewBox:"0 0 24 24",fill:"none",children:/* @__PURE__ */E(H,{d:"m6 9 6 6 6-6",stroke:e,strokeWidth:2.5,strokeLinecap:"round",strokeLinejoin:"round"})})})]}):"QuickPick"})}/* @__PURE__ */
68
+ return U(z,{...L,onPress:O,activeOpacity:1,accessibilityRole:"button",accessibilityLabel:n,style:[os.container,{borderColor:R?.borderColor??tn(m.border,.6),borderRadius:y.radius.sm,minHeight:y.touchTarget.min},xi(D)],children:[/* @__PURE__ */U(W,{style:os.topRow,children:[
69
69
  /* @__PURE__ */U(A,{style:B.absoluteFill,viewBox:"0 0 100 100",preserveAspectRatio:"none",children:[
70
70
  /* @__PURE__ */E(M,{points:"0,0 53,0 47,100 0,100",fill:w}),
71
71
  /* @__PURE__ */E(M,{points:"53,0 100,0 100,100 47,100",fill:x}),
72
72
  /* @__PURE__ */E(T,{x1:"53",y1:"0",x2:"47",y2:"100",stroke:"rgba(255,255,255,0.85)",strokeWidth:"1.5",vectorEffect:"non-scaling-stroke"})]}),
73
- /* @__PURE__ */E(W,{style:[is.half,{paddingHorizontal:k,paddingVertical:C}],children:/* @__PURE__ */E(fi,{style:[is.halfLabel,{fontSize:S,color:yn(w)}],numberOfLines:1,children:b.yes})}),
74
- /* @__PURE__ */E(W,{style:[is.half,{paddingHorizontal:k,paddingVertical:C}],children:/* @__PURE__ */E(fi,{style:[is.halfLabel,{fontSize:S,color:yn(x)}],numberOfLines:1,children:b.no})})]}),/* @__PURE__ */E(W,{style:[is.labelRow,{backgroundColor:m.buttonSecondary},v&&{paddingTop:2,paddingBottom:3}],children:/* @__PURE__ */E(fi,{style:[is.labelText,{color:m.buttonSecondaryText,fontSize:F,letterSpacing:.14*F,fontFamily:p.fonts?.mono??Yr(p)}],numberOfLines:1,children:n})})]})}var is=B.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:{fontWeight:"600",letterSpacing:.2,flexShrink:0,textAlign:"center"},labelRow:{paddingTop:3,paddingBottom:4,alignItems:"center",justifyContent:"center"},labelText:{fontWeight:"700",textAlign:"center",flexShrink:0}});function os({visible:e,anchor:t,onClose:n,flipUp:i=!1,align:o="left",gap:r=6,children:l}){if(!e||!t)return null;const a=g.get("window"),s=i?{bottom:Math.max(0,a.height-t.y+r)}:{top:t.y+t.height+r},c="right"===o?{right:Math.max(0,a.width-(t.x+t.width))}:{left:Math.max(0,t.x)};/* @__PURE__ */
75
- return U(m,{transparent:!0,visible:!0,animationType:"none",onRequestClose:n,children:[/* @__PURE__ */E(x,{style:B.absoluteFill,onPress:n}),/* @__PURE__ */E(W,{style:{position:"absolute",...s,...c},onStartShouldSetResponder:()=>!0,children:l})]})}function rs({theme:e,style:t,...n}){const i=Tl(e),{hovered:o,pressed:r,handlers:l}=wi();/* @__PURE__ */
76
- return E(z,{...n,...l,activeOpacity:1,style:[t,{backgroundColor:si(i,{hovered:o,pressed:r})??"transparent"}]})}function ls({counts:e,current:t,onPick:n,onDoubleAction:i,colors:o,align:r="right",direction:s="down",menuShadow:h="0 1px 0 rgba(255,255,255,0.6) inset, 0 20px 50px -24px rgba(15,23,42,0.22)",theme:u,hint:f,onFill:p,fillLabel:y="Fill the empty picks",onRandomise:m,randomiseLabel:b="Randomise all"}){const x=Tl(u),v=[p&&{label:y,run:p},m&&{label:b,run:m}].filter(Boolean),[k,B]=d(!1),[C,S]=d(!1),z=c(0),F=c(null),A=c(null),[P,T]=d(null),[D,H]=d(null),M="web"===w.OS,L="deck"===oi().quickPick,R=L?24+(e.length?30+Math.ceil(e.length/4)*(vl+6):0)+v.length*(xl+8):36+36*(e.length+v.length)+12,I="up"===s||C?"up":"down";a(()=>{if(!k||!M)return void T(null);const e=F.current;if(!e||"function"!=typeof e.getBoundingClientRect)return;const t=e=>{const t=A.current;if(!t)return e;const n=t.offsetHeight-t.clientHeight,i=t.firstElementChild?.getBoundingClientRect().height??0,o=t.querySelector('[role="menuitem"]')?.getBoundingClientRect().height??0,r=Math.floor((e-n-i)/o);return o>0&&r>=1?n+i+r*o:e},n=yi(e),i=mi(e),o=()=>{const o=A.current;T(function({trigger:e,viewport:t,wanted:n,width:i,align:o,direction:r,snap:l}){const{height:a,width:s}=t,c=a-Math.max(e.bottom,0)-6-8,d=Math.min(e.top,a)-6-8,h="up"===r||n>c&&d>c,u=h?d:c,f=Math.max(a-16,132),g=n<=u?n:Math.min(n,l?l(f):f),p=h?e.top-6-g:e.bottom+6,y="left"===o?e.left:e.right-i;return{top:Math.max(8,Math.min(p,a-8-g)),left:Math.max(8,Math.min(y,s-8-i)),maxHeight:g}}({trigger:e.getBoundingClientRect(),viewport:{width:n.documentElement.clientWidth||i.innerWidth,height:n.documentElement.clientHeight||i.innerHeight},wanted:o?o.scrollHeight+o.offsetHeight-o.clientHeight:R,width:o?.offsetWidth??160,align:r,direction:s,snap:L?void 0:t}))};o();const l=requestAnimationFrame(o);return i.addEventListener("resize",o),i.addEventListener("scroll",o,!0),()=>{cancelAnimationFrame(l),i.removeEventListener("resize",o),i.removeEventListener("scroll",o,!0)}},[k,M,R,r,s]),l(()=>{if(!k)return void(M||S(!1));if(M){const e=e=>{const t=F.current,n=e.target;t&&"function"==typeof t.contains&&t.contains(n)||A.current&&A.current.contains(n)||B(!1)},t=yi(F.current);return t.addEventListener("mousedown",e),()=>{t.removeEventListener("mousedown",e)}}const e=F.current;e&&"function"==typeof e.measureInWindow&&e.measureInWindow((e,t,n,i)=>{const o=g.get("window").height-(t+i);S(o<R&&t>o),H({x:e,y:t,width:n,height:i})})},[k,M,R]);const O=L?/* @__PURE__ */U(W,{style:{width:232,padding:12,gap:12},children:[e.length>0?/* @__PURE__ */U(W,{children:[/* @__PURE__ */E(fi,{style:{marginBottom:10,fontSize:14,fontWeight:"800",color:o.text},children:"How many picks?"}),/* @__PURE__ */E(W,{style:{flexDirection:"row",flexWrap:"wrap",gap:6},children:e.map(e=>/* @__PURE__ */E(Ll,{accessibilityRole:"menuitem",accessibilityLabel:`${e} picks`,selected:e===t,onPress:()=>{n(e),B(!1)},style:{width:47.5,paddingHorizontal:0},children:String(e)},e))})]}):null,v.length>0?/* @__PURE__ */E(W,{style:{gap:8},children:v.map(e=>/* @__PURE__ */E(vi,{theme:x,accessibilityRole:"menuitem",variant:"secondary",onPress:()=>{e.run(),B(!1)},children:e.label},e.label))}):null]}):/* @__PURE__ */U(j,{children:[
77
- /* @__PURE__ */E(W,{style:{paddingHorizontal:12,paddingVertical:6,borderBottomWidth:1,borderBottomColor:o.border},children:/* @__PURE__ */E(fi,{style:{fontSize:10,fontWeight:"700",color:o.text,opacity:.55,letterSpacing:.5,textTransform:"uppercase"},children:e.length?"How many picks?":"QuickPick"})}),e.map(e=>/* @__PURE__ */U(rs,{theme:x,onPress:()=>{n(e),B(!1)},accessibilityRole:"menuitem",style:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",paddingHorizontal:12,paddingVertical:8,borderTopWidth:1,borderTopColor:o.border},children:[/* @__PURE__ */U(fi,{style:{fontSize:14,fontWeight:"600",color:o.text},children:[e," picks"]}),/* @__PURE__ */E(W,{style:{backgroundColor:o.backgroundAlt,paddingHorizontal:6,paddingVertical:2,borderRadius:sn(u,4)},children:/* @__PURE__ */E(fi,{style:{color:o.text,fontSize:10,fontWeight:"700",letterSpacing:.5},children:"QP"})})]},e)),v.map(e=>/* @__PURE__ */E(rs,{theme:x,onPress:()=>{e.run(),B(!1)},accessibilityRole:"menuitem",style:{paddingHorizontal:12,paddingVertical:8,borderTopWidth:1,borderTopColor:o.border},children:/* @__PURE__ */E(fi,{style:{fontSize:14,fontWeight:"600",color:o.text},children:e.label})},e.label))]});/* @__PURE__ */
73
+ /* @__PURE__ */E(W,{style:[os.half,{paddingHorizontal:k,paddingVertical:C}],children:/* @__PURE__ */E(fi,{style:[os.halfLabel,{fontSize:S,color:yn(w)}],numberOfLines:1,children:b.yes})}),
74
+ /* @__PURE__ */E(W,{style:[os.half,{paddingHorizontal:k,paddingVertical:C}],children:/* @__PURE__ */E(fi,{style:[os.halfLabel,{fontSize:S,color:yn(x)}],numberOfLines:1,children:b.no})})]}),/* @__PURE__ */E(W,{style:[os.labelRow,{backgroundColor:m.buttonSecondary},v&&{paddingTop:2,paddingBottom:3}],children:/* @__PURE__ */E(fi,{style:[os.labelText,{color:m.buttonSecondaryText,fontSize:F,letterSpacing:.14*F,fontFamily:p.fonts?.mono??Yr(p)}],numberOfLines:1,children:n})})]})}var os=B.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:{fontWeight:"600",letterSpacing:.2,flexShrink:0,textAlign:"center"},labelRow:{paddingTop:3,paddingBottom:4,alignItems:"center",justifyContent:"center"},labelText:{fontWeight:"700",textAlign:"center",flexShrink:0}});function rs({visible:e,anchor:t,onClose:n,flipUp:i=!1,align:o="left",gap:r=6,children:l}){if(!e||!t)return null;const a=g.get("window"),s=i?{bottom:Math.max(0,a.height-t.y+r)}:{top:t.y+t.height+r},c="right"===o?{right:Math.max(0,a.width-(t.x+t.width))}:{left:Math.max(0,t.x)};/* @__PURE__ */
75
+ return U(m,{transparent:!0,visible:!0,animationType:"none",onRequestClose:n,children:[/* @__PURE__ */E(x,{style:B.absoluteFill,onPress:n}),/* @__PURE__ */E(W,{style:{position:"absolute",...s,...c},onStartShouldSetResponder:()=>!0,children:l})]})}function ls({theme:e,style:t,...n}){const i=Dl(e),{hovered:o,pressed:r,handlers:l}=wi();/* @__PURE__ */
76
+ return E(z,{...n,...l,activeOpacity:1,style:[t,{backgroundColor:si(i,{hovered:o,pressed:r})??"transparent"}]})}function as({counts:e,current:t,onPick:n,onDoubleAction:i,colors:o,align:r="right",direction:s="down",menuShadow:h="0 1px 0 rgba(255,255,255,0.6) inset, 0 20px 50px -24px rgba(15,23,42,0.22)",theme:u,hint:f,onFill:p,fillLabel:y="Fill the empty picks",onRandomise:m,randomiseLabel:b="Randomise all"}){const x=Dl(u),v=[p&&{label:y,run:p},m&&{label:b,run:m}].filter(Boolean),[k,B]=d(!1),[C,S]=d(!1),z=c(0),F=c(null),A=c(null),[P,T]=d(null),[D,H]=d(null),M="web"===w.OS,L="deck"===oi().quickPick,R=L?24+(e.length?30+Math.ceil(e.length/4)*(kl+6):0)+v.length*(vl+8):36+36*(e.length+v.length)+12,I="up"===s||C?"up":"down";a(()=>{if(!k||!M)return void T(null);const e=F.current;if(!e||"function"!=typeof e.getBoundingClientRect)return;const t=e=>{const t=A.current;if(!t)return e;const n=t.offsetHeight-t.clientHeight,i=t.firstElementChild?.getBoundingClientRect().height??0,o=t.querySelector('[role="menuitem"]')?.getBoundingClientRect().height??0,r=Math.floor((e-n-i)/o);return o>0&&r>=1?n+i+r*o:e},n=yi(e),i=mi(e),o=()=>{const o=A.current;T(function({trigger:e,viewport:t,wanted:n,width:i,align:o,direction:r,snap:l}){const{height:a,width:s}=t,c=a-Math.max(e.bottom,0)-6-8,d=Math.min(e.top,a)-6-8,h="up"===r||n>c&&d>c,u=h?d:c,f=Math.max(a-16,132),g=n<=u?n:Math.min(n,l?l(f):f),p=h?e.top-6-g:e.bottom+6,y="left"===o?e.left:e.right-i;return{top:Math.max(8,Math.min(p,a-8-g)),left:Math.max(8,Math.min(y,s-8-i)),maxHeight:g}}({trigger:e.getBoundingClientRect(),viewport:{width:n.documentElement.clientWidth||i.innerWidth,height:n.documentElement.clientHeight||i.innerHeight},wanted:o?o.scrollHeight+o.offsetHeight-o.clientHeight:R,width:o?.offsetWidth??160,align:r,direction:s,snap:L?void 0:t}))};o();const l=requestAnimationFrame(o);return i.addEventListener("resize",o),i.addEventListener("scroll",o,!0),()=>{cancelAnimationFrame(l),i.removeEventListener("resize",o),i.removeEventListener("scroll",o,!0)}},[k,M,R,r,s]),l(()=>{if(!k)return void(M||S(!1));if(M){const e=e=>{const t=F.current,n=e.target;t&&"function"==typeof t.contains&&t.contains(n)||A.current&&A.current.contains(n)||B(!1)},t=yi(F.current);return t.addEventListener("mousedown",e),()=>{t.removeEventListener("mousedown",e)}}const e=F.current;e&&"function"==typeof e.measureInWindow&&e.measureInWindow((e,t,n,i)=>{const o=g.get("window").height-(t+i);S(o<R&&t>o),H({x:e,y:t,width:n,height:i})})},[k,M,R]);const O=L?/* @__PURE__ */U(W,{style:{width:232,padding:12,gap:12},children:[e.length>0?/* @__PURE__ */U(W,{children:[/* @__PURE__ */E(fi,{style:{marginBottom:10,fontSize:14,fontWeight:"800",color:o.text},children:"How many picks?"}),/* @__PURE__ */E(W,{style:{flexDirection:"row",flexWrap:"wrap",gap:6},children:e.map(e=>/* @__PURE__ */E(Rl,{accessibilityRole:"menuitem",accessibilityLabel:`${e} picks`,selected:e===t,onPress:()=>{n(e),B(!1)},style:{width:47.5,paddingHorizontal:0},children:String(e)},e))})]}):null,v.length>0?/* @__PURE__ */E(W,{style:{gap:8},children:v.map(e=>/* @__PURE__ */E(vi,{theme:x,accessibilityRole:"menuitem",variant:"secondary",onPress:()=>{e.run(),B(!1)},children:e.label},e.label))}):null]}):/* @__PURE__ */U(j,{children:[
77
+ /* @__PURE__ */E(W,{style:{paddingHorizontal:12,paddingVertical:6,borderBottomWidth:1,borderBottomColor:o.border},children:/* @__PURE__ */E(fi,{style:{fontSize:10,fontWeight:"700",color:o.text,opacity:.55,letterSpacing:.5,textTransform:"uppercase"},children:e.length?"How many picks?":"QuickPick"})}),e.map(e=>/* @__PURE__ */U(ls,{theme:x,onPress:()=>{n(e),B(!1)},accessibilityRole:"menuitem",style:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",paddingHorizontal:12,paddingVertical:8,borderTopWidth:1,borderTopColor:o.border},children:[/* @__PURE__ */U(fi,{style:{fontSize:14,fontWeight:"600",color:o.text},children:[e," picks"]}),/* @__PURE__ */E(W,{style:{backgroundColor:o.backgroundAlt,paddingHorizontal:6,paddingVertical:2,borderRadius:sn(u,4)},children:/* @__PURE__ */E(fi,{style:{color:o.text,fontSize:10,fontWeight:"700",letterSpacing:.5},children:"QP"})})]},e)),v.map(e=>/* @__PURE__ */E(ls,{theme:x,onPress:()=>{e.run(),B(!1)},accessibilityRole:"menuitem",style:{paddingHorizontal:12,paddingVertical:8,borderTopWidth:1,borderTopColor:o.border},children:/* @__PURE__ */E(fi,{style:{fontSize:14,fontWeight:"600",color:o.text},children:e.label})},e.label))]});/* @__PURE__ */
78
78
  return U(W,{ref:F,style:{position:"relative",flexShrink:0},children:[
79
- /* @__PURE__ */E(ns,{menu:!0,expanded:k,hint:f,onPress:()=>{if(!i)return void B(e=>!e);const e=Date.now();if(e-z.current<280)return z.current=0,B(!1),void i();z.current=e,setTimeout(()=>{z.current&&Date.now()-z.current>=270&&(z.current=0,B(e=>!e))},290)}}),k&&M&&"undefined"!=typeof document&&G(/* @__PURE__ */E("div",{ref:A,role:"menu",style:{position:"fixed",top:P?.top??0,left:P?.left??0,maxHeight:P?.maxHeight,visibility:P?"visible":"hidden",zIndex:20,backgroundColor:o.background,border:`1px solid ${o.border}`,borderRadius:sn(u,L?wl:8),minWidth:160,boxShadow:h,overflowX:"hidden",overflowY:"auto",overscrollBehavior:"contain"},children:O}),yi(F.current).body),
80
- /* @__PURE__ */E(os,{visible:k&&!M,anchor:D,onClose:()=>B(!1),flipUp:"up"===I,align:r,children:/* @__PURE__ */E(W,{accessibilityRole:"menu",style:{elevation:8,backgroundColor:o.background,borderRadius:sn(u,L?wl:8),borderWidth:1,borderColor:o.border,minWidth:160,shadowColor:"#000",shadowOffset:{width:0,height:6},shadowOpacity:.18,shadowRadius:12,overflow:"hidden"},children:O})})]})}var as=/* @__PURE__ */new Map,ss=/* @__PURE__ */new Map;function cs(e,t,n){let i=e;return t&&(i=i.replace(/currentColor/g,t)),n?i=i.replace(/var\(\s*--icon-accent\s*(?:,[^)]*)?\)/g,n):(i=i.replace(/var\(\s*--icon-accent\s*,\s*([^)]+)\)/g,"$1"),i=i.replace(/var\(\s*--icon-accent\s*\)/g,"currentColor")),i}function ds({iconUrl:t,width:n,height:i,iconColor:o,accentColor:r,accessibilityLabel:l}){const{icons:a}=le(),s=ee(t,a),[c,d]=e.useState(()=>s??as.get(t)??null);return e.useEffect(()=>{const e=ee(t,a);if(e)return void d(e);if(_(t))return void d(null);if(as.has(t))return void d(as.get(t));let n=!1;return function(e){const t=as.get(e);if(void 0!==t)return Promise.resolve(t);const n=ss.get(e);if(n)return n;const i=fetch(e).then(e=>{if(!e.ok)throw new Error(`SVG fetch failed: ${e.status}`);return e.text()}).then(t=>(as.set(e,t),ss.delete(e),t)).catch(t=>{throw ss.delete(e),t});return ss.set(e,i),i}(t).then(e=>{n||d(e)}).catch(()=>{n||d(null)}),()=>{n=!0}},[t,a]),c?/* @__PURE__ */E(I,{xml:cs(c,o,r),width:n,height:i,accessibilityLabel:l}):_(t)?/* @__PURE__ */E(W,{style:{width:n,height:i},accessibilityLabel:l}):/* @__PURE__ */E(y,{source:{uri:t},style:{width:n,height:i},resizeMode:"contain",accessibilityLabel:l})}function hs({tiers:e,modes:t,pydDividends:n,onPlayCount:i,minBet:o=1,maxBet:r=null,colors:l,bodyFont:a,headingFont:s,theme:c}){const h=e=>Math.min(Math.max(e,o),r??1/0),[u,f]=d(()=>String(h(20))),g=parseFloat(u),p=h(Number.isFinite(g)&&g>0?g:20),y=p/20,m=!!(t?.length||n?.length||e.some(e=>e.payout20>0)),b=!!t?.length;if(!m)return null;const w=/* @__PURE__ */U(W,{style:{marginBottom:8,flexDirection:"row",alignItems:"center",gap:4,flexWrap:"wrap"},children:[
79
+ /* @__PURE__ */E(is,{menu:!0,expanded:k,hint:f,onPress:()=>{if(!i)return void B(e=>!e);const e=Date.now();if(e-z.current<280)return z.current=0,B(!1),void i();z.current=e,setTimeout(()=>{z.current&&Date.now()-z.current>=270&&(z.current=0,B(e=>!e))},290)}}),k&&M&&"undefined"!=typeof document&&G(/* @__PURE__ */E("div",{ref:A,role:"menu",style:{position:"fixed",top:P?.top??0,left:P?.left??0,maxHeight:P?.maxHeight,visibility:P?"visible":"hidden",zIndex:20,backgroundColor:o.background,border:`1px solid ${o.border}`,borderRadius:sn(u,L?xl:8),minWidth:160,boxShadow:h,overflowX:"hidden",overflowY:"auto",overscrollBehavior:"contain"},children:O}),yi(F.current).body),
80
+ /* @__PURE__ */E(rs,{visible:k&&!M,anchor:D,onClose:()=>B(!1),flipUp:"up"===I,align:r,children:/* @__PURE__ */E(W,{accessibilityRole:"menu",style:{elevation:8,backgroundColor:o.background,borderRadius:sn(u,L?xl:8),borderWidth:1,borderColor:o.border,minWidth:160,shadowColor:"#000",shadowOffset:{width:0,height:6},shadowOpacity:.18,shadowRadius:12,overflow:"hidden"},children:O})})]})}var ss=/* @__PURE__ */new Map,cs=/* @__PURE__ */new Map;function ds(e,t,n){let i=e;return t&&(i=i.replace(/currentColor/g,t)),n?i=i.replace(/var\(\s*--icon-accent\s*(?:,[^)]*)?\)/g,n):(i=i.replace(/var\(\s*--icon-accent\s*,\s*([^)]+)\)/g,"$1"),i=i.replace(/var\(\s*--icon-accent\s*\)/g,"currentColor")),i}function hs({iconUrl:t,width:n,height:i,iconColor:o,accentColor:r,accessibilityLabel:l}){const{icons:a}=le(),s=ee(t,a),[c,d]=e.useState(()=>s??ss.get(t)??null);return e.useEffect(()=>{const e=ee(t,a);if(e)return void d(e);if(_(t))return void d(null);if(ss.has(t))return void d(ss.get(t));let n=!1;return function(e){const t=ss.get(e);if(void 0!==t)return Promise.resolve(t);const n=cs.get(e);if(n)return n;const i=fetch(e).then(e=>{if(!e.ok)throw new Error(`SVG fetch failed: ${e.status}`);return e.text()}).then(t=>(ss.set(e,t),cs.delete(e),t)).catch(t=>{throw cs.delete(e),t});return cs.set(e,i),i}(t).then(e=>{n||d(e)}).catch(()=>{n||d(null)}),()=>{n=!0}},[t,a]),c?/* @__PURE__ */E(I,{xml:ds(c,o,r),width:n,height:i,accessibilityLabel:l}):_(t)?/* @__PURE__ */E(W,{style:{width:n,height:i},accessibilityLabel:l}):/* @__PURE__ */E(y,{source:{uri:t},style:{width:n,height:i},resizeMode:"contain",accessibilityLabel:l})}function us({tiers:e,modes:t,pydDividends:n,onPlayCount:i,minBet:o=1,maxBet:r=null,colors:l,bodyFont:a,headingFont:s,theme:c}){const h=e=>Math.min(Math.max(e,o),r??1/0),[u,f]=d(()=>String(h(20))),g=parseFloat(u),p=h(Number.isFinite(g)&&g>0?g:20),y=p/20,m=!!(t?.length||n?.length||e.some(e=>e.payout20>0)),b=!!t?.length;if(!m)return null;const w=/* @__PURE__ */U(W,{style:{marginBottom:8,flexDirection:"row",alignItems:"center",gap:4,flexWrap:"wrap"},children:[
81
81
  /* @__PURE__ */E(fi,{style:{fontSize:10,fontStyle:"italic",color:l.textMuted,fontFamily:a},children:"Example values for a"}),
82
82
  /* @__PURE__ */E(fi,{style:{fontSize:11,fontWeight:"700",color:l.textMuted,fontFamily:a},children:"$"}),
83
83
  /* @__PURE__ */E(S,{value:u,onChangeText:f,onBlur:()=>f(String(p)),keyboardType:"numeric",accessibilityLabel:"Example bet amount",style:{width:64,paddingVertical:2,paddingHorizontal:5,borderRadius:sn(c,6),borderWidth:1,borderColor:l.border,backgroundColor:l.background??"#fff",color:l.text,fontSize:11,fontWeight:"600",fontFamily:a}}),
84
84
  /* @__PURE__ */U(fi,{style:{fontSize:10,fontStyle:"italic",color:l.textMuted,fontFamily:a},children:["bet",null!=r?` (${yt(o)}–${yt(r)})`:` (min ${yt(o)})`,"."]})]});/* @__PURE__ */
85
85
  return U(W,{style:{width:"100%"},children:[b?/* @__PURE__ */E(fi,{style:{fontSize:11,fontWeight:"700",letterSpacing:1.4,textTransform:"uppercase",color:l.textMuted,fontFamily:a,marginBottom:6},children:"Compare dividends"}):null,/* @__PURE__ */U(W,{style:{paddingHorizontal:14,paddingVertical:12},children:[n?.length?null:w,t?.length?t.map((e,t)=>/* @__PURE__ */U(W,{style:{borderTopWidth:0===t?0:1,borderTopColor:l.border,paddingTop:0===t?0:8,marginTop:0===t?0:8},children:[/* @__PURE__ */E(fi,{style:{fontSize:11,fontWeight:"700",marginBottom:4,color:l.text,fontFamily:s},children:e.label}),e.tiers.map(e=>/* @__PURE__ */U(W,{style:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",paddingVertical:4,gap:14},children:[/* @__PURE__ */U(fi,{style:{color:l.textMuted,fontSize:11,flex:1,fontFamily:a},children:[e.label," correct"]}),/* @__PURE__ */E(fi,{style:{fontWeight:"700",color:l.heading??l.text,fontSize:12,fontFamily:a},children:yt(e.payout20*y)})]},e.label))]},e.id)):/* @__PURE__ */U(j,n?.length?{children:[
86
86
  /* @__PURE__ */U(W,{style:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",paddingBottom:4,marginBottom:4,borderBottomWidth:1,borderBottomColor:l.border},children:[/* @__PURE__ */E(fi,{style:{fontSize:10.5,fontWeight:"700",textTransform:"uppercase",letterSpacing:.4,color:l.primary,fontFamily:a},children:"Dividend"}),/* @__PURE__ */E(fi,{style:{fontSize:10.5,fontWeight:"700",textTransform:"uppercase",letterSpacing:.4,color:l.primary,fontFamily:a},children:"Stake from"})]}),n.map(e=>/* @__PURE__ */U(W,{style:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",paddingVertical:4},children:[/* @__PURE__ */E(fi,{style:{fontWeight:"700",color:l.heading??l.text,fontSize:12,fontFamily:a},children:yt(e.dividend)}),/* @__PURE__ */E(fi,{style:{fontWeight:"600",color:l.text,fontSize:12,fontFamily:a},children:yt(e.stakeFrom)})]},e.dividend)),
87
- /* @__PURE__ */E(fi,{style:{marginTop:8,fontSize:10,fontStyle:"italic",color:l.textMuted,fontFamily:a},children:"You set the dividend before kick-off. Longer climbs start from a smaller stake."})]}:{children:[/* @__PURE__ */U(W,{style:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",paddingBottom:4,marginBottom:4,borderBottomWidth:1,borderBottomColor:l.border},children:[/* @__PURE__ */E(fi,{style:{fontSize:10.5,fontWeight:"700",textTransform:"uppercase",letterSpacing:.4,color:l.primary,fontFamily:a},children:"Legs played"}),/* @__PURE__ */E(fi,{style:{fontSize:10.5,fontWeight:"700",textTransform:"uppercase",letterSpacing:.4,color:l.primary,fontFamily:a},children:"Payout"})]}),e.map(e=>{const t={flexDirection:"row",alignItems:"center",justifyContent:"space-between",paddingVertical:i?6:4},n=/* @__PURE__ */U(j,{children:[/* @__PURE__ */U(fi,{style:{fontWeight:"600",color:i?l.primary:l.text,fontSize:12,fontFamily:a},children:[e.count," legs"]}),/* @__PURE__ */E(fi,{style:{fontWeight:"600",color:e.payout20>0?l.text:l.textMuted,fontSize:12,fontFamily:a},children:e.payout20>0?yt(e.payout20*y):"—"})]});return i?/* @__PURE__ */E(rs,{theme:c,accessibilityRole:"button",onPress:()=>i(e.count),style:t,children:n},e.count):/* @__PURE__ */E(W,{style:t,children:n},e.count)})]})]})]})}function us({iconUrl:e,size:t,brandColor:n,iconColor:i,accentColor:o}){/* @__PURE__ */
87
+ /* @__PURE__ */E(fi,{style:{marginTop:8,fontSize:10,fontStyle:"italic",color:l.textMuted,fontFamily:a},children:"You set the dividend before kick-off. Longer climbs start from a smaller stake."})]}:{children:[/* @__PURE__ */U(W,{style:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",paddingBottom:4,marginBottom:4,borderBottomWidth:1,borderBottomColor:l.border},children:[/* @__PURE__ */E(fi,{style:{fontSize:10.5,fontWeight:"700",textTransform:"uppercase",letterSpacing:.4,color:l.primary,fontFamily:a},children:"Legs played"}),/* @__PURE__ */E(fi,{style:{fontSize:10.5,fontWeight:"700",textTransform:"uppercase",letterSpacing:.4,color:l.primary,fontFamily:a},children:"Payout"})]}),e.map(e=>{const t={flexDirection:"row",alignItems:"center",justifyContent:"space-between",paddingVertical:i?6:4},n=/* @__PURE__ */U(j,{children:[/* @__PURE__ */U(fi,{style:{fontWeight:"600",color:i?l.primary:l.text,fontSize:12,fontFamily:a},children:[e.count," legs"]}),/* @__PURE__ */E(fi,{style:{fontWeight:"600",color:e.payout20>0?l.text:l.textMuted,fontSize:12,fontFamily:a},children:e.payout20>0?yt(e.payout20*y):"—"})]});return i?/* @__PURE__ */E(ls,{theme:c,accessibilityRole:"button",onPress:()=>i(e.count),style:t,children:n},e.count):/* @__PURE__ */E(W,{style:t,children:n},e.count)})]})]})]})}function fs({iconUrl:e,size:t,brandColor:n,iconColor:i,accentColor:o}){/* @__PURE__ */
88
88
  return U(W,{style:{position:"relative",width:t,height:t},children:[/* @__PURE__ */U(A,{viewBox:"30 -5 280 280",width:t,height:t,children:[
89
89
  /* @__PURE__ */E(L,{x:90,y:55,width:210,height:210,rx:42,fill:n,opacity:.3}),
90
90
  /* @__PURE__ */E(L,{x:65,y:30,width:210,height:210,rx:42,fill:n,opacity:.55}),
91
- /* @__PURE__ */E(L,{x:40,y:5,width:210,height:210,rx:42,fill:n})]}),/* @__PURE__ */E(W,{pointerEvents:"none",style:{position:"absolute",left:.107*t,top:.107*t,width:.607*t,height:.607*t},children:/* @__PURE__ */E(ds,{iconUrl:e,width:.607*t,height:.607*t,iconColor:i,accentColor:o})})]})}function fs({games:e,selectedGame:t,theme:n,onPlay:i,maxPayouts:o,quickPickLoading:r}){const l=Qa(n),a=ra(n),[s,c]=d(t?.id??null),[h,u]=d({}),[f,g]=d(0),[p,b]=d("all"),[w,x]=d(!1),v=le(),B=function(e){const t=e=>{const t=Na.indexOf(Q(e));return t<0?Na.length:t};return So.map(n=>({id:n.id,label:n.shortLabel,games:e.filter(e=>zo(e)===n.level).sort((e,n)=>t(e)-t(n))})).filter(e=>e.games.length>0)}(e),C="all"===p?B:B.filter(e=>e.id===p),S=(C.length?C:B).flatMap(e=>e.games),F=S.find(e=>e.id===s)??S[0],A=Yr(n),P=Nr(n),T={...n.colors,primary:l.button,primaryText:l.buttonText,text:l.text,textMuted:l.muted,background:l.surface},D={color:T.text,fontFamily:A,fontSize:15};if(!F)/* @__PURE__ */return E(fi,{style:{...D,color:a.colors.text},children:"No games available"});const H=La(F,o?.[F.id]),M=H.legOptions.includes(h[F.id])?h[F.id]:Ia(F,H.legOptions),L=Nt(F),R=!(!F.quick_pick_only||!r),I=f>=700,O=Ya(F),j=f||358,G=I?14:12,V=I?Math.max(2,Math.floor((j+G)/(180+G))):2,Y=Math.max(100,(j-G*(V-1))/V),N=/* @__PURE__ */U(W,{style:{backgroundColor:l.surface,padding:22,gap:10},children:[
91
+ /* @__PURE__ */E(L,{x:40,y:5,width:210,height:210,rx:42,fill:n})]}),/* @__PURE__ */E(W,{pointerEvents:"none",style:{position:"absolute",left:.107*t,top:.107*t,width:.607*t,height:.607*t},children:/* @__PURE__ */E(hs,{iconUrl:e,width:.607*t,height:.607*t,iconColor:i,accentColor:o})})]})}function gs({games:e,selectedGame:t,theme:n,onPlay:i,maxPayouts:o,quickPickLoading:r}){const l=Ja(n),a=la(n),[s,c]=d(t?.id??null),[h,u]=d({}),[f,g]=d(0),[p,b]=d("all"),[w,x]=d(!1),v=le(),B=function(e){const t=e=>{const t=Xa.indexOf(Q(e));return t<0?Xa.length:t};return So.map(n=>({id:n.id,label:n.shortLabel,games:e.filter(e=>zo(e)===n.level).sort((e,n)=>t(e)-t(n))})).filter(e=>e.games.length>0)}(e),C="all"===p?B:B.filter(e=>e.id===p),S=(C.length?C:B).flatMap(e=>e.games),F=S.find(e=>e.id===s)??S[0],A=Yr(n),P=Nr(n),T={...n.colors,primary:l.button,primaryText:l.buttonText,text:l.text,textMuted:l.muted,background:l.surface},D={color:T.text,fontFamily:A,fontSize:15};if(!F)/* @__PURE__ */return E(fi,{style:{...D,color:a.colors.text},children:"No games available"});const H=Ra(F,o?.[F.id]),M=H.legOptions.includes(h[F.id])?h[F.id]:Oa(F,H.legOptions),L=Nt(F),R=!(!F.quick_pick_only||!r),I=f>=700,O=Na(F),j=f||358,G=I?14:12,V=I?Math.max(2,Math.floor((j+G)/(180+G))):2,Y=Math.max(100,(j-G*(V-1))/V),N=/* @__PURE__ */U(W,{style:{backgroundColor:l.surface,padding:22,gap:10},children:[
92
92
  /* @__PURE__ */E(fi,{style:{...D,color:l.accent,fontSize:11,fontWeight:"800",letterSpacing:1.5,textTransform:"uppercase"},children:O.label}),
93
- /* @__PURE__ */E(fi,{accessibilityRole:"header",style:{...D,flexShrink:1,fontFamily:P,fontSize:28,fontWeight:"800",letterSpacing:-1.26},children:_a(F,v.presets)}),
94
- /* @__PURE__ */E(fi,{style:{...D,color:l.muted,lineHeight:23},children:Ga(F)}),
95
- /* @__PURE__ */E(da,{variant:"link",theme:{...n,colors:T},panel:ht(F),content:F.description||F.rule,title:_a(F,v.presets),label:`How to play ${_a(F,v.presets)}`,colors:T,bodyFont:A,headingFont:P,extra:/* @__PURE__ */E(hs,{tiers:H.hasGenericDividends?H.tiers:[],modes:H.modes,pydDividends:H.pydDividends,minBet:H.minBet,maxBet:H.maxBet,colors:T,bodyFont:A,headingFont:P,theme:n})}),F.quick_pick_only&&H.legOptions.length>1&&/* @__PURE__ */U(W,{style:{gap:8},children:[/* @__PURE__ */E(fi,{style:D,children:"Quick Pick selections"}),/* @__PURE__ */E(W,{style:{flexDirection:"row",flexWrap:"wrap",gap:8},children:H.legOptions.map(e=>/* @__PURE__ */E(Ll,{theme:n,selected:e===M,accessibilityLabel:`${e} selections`,disabled:R||!L,onPress:()=>u(t=>({...t,[F.id]:e})),style:{minWidth:44},children:String(e)},e))})]}),!L&&/* @__PURE__ */U(fi,{style:D,children:["Available ",qt(F)]}),
96
- /* @__PURE__ */E(vi,{size:"lg",theme:n,block:!0,disabled:R||!L,onPress:()=>{L&&!R&&i(F,M)},children:R?"Building your picks…":L?`Choose ${_a(F,v.presets)}`:"Currently unavailable"})]});/* @__PURE__ */
93
+ /* @__PURE__ */E(fi,{accessibilityRole:"header",style:{...D,flexShrink:1,fontFamily:P,fontSize:28,fontWeight:"800",letterSpacing:-1.26},children:es(F,v.presets)}),
94
+ /* @__PURE__ */E(fi,{style:{...D,color:l.muted,lineHeight:23},children:Va(F)}),
95
+ /* @__PURE__ */E(ha,{variant:"link",theme:{...n,colors:T},panel:ht(F),content:F.description||F.rule,title:es(F,v.presets),label:`How to play ${es(F,v.presets)}`,colors:T,bodyFont:A,headingFont:P,extra:/* @__PURE__ */E(us,{tiers:H.hasGenericDividends?H.tiers:[],modes:H.modes,pydDividends:H.pydDividends,minBet:H.minBet,maxBet:H.maxBet,colors:T,bodyFont:A,headingFont:P,theme:n})}),F.quick_pick_only&&H.legOptions.length>1&&/* @__PURE__ */U(W,{style:{gap:8},children:[/* @__PURE__ */E(fi,{style:D,children:"Quick Pick selections"}),/* @__PURE__ */E(W,{style:{flexDirection:"row",flexWrap:"wrap",gap:8},children:H.legOptions.map(e=>/* @__PURE__ */E(Rl,{theme:n,selected:e===M,accessibilityLabel:`${e} selections`,disabled:R||!L,onPress:()=>u(t=>({...t,[F.id]:e})),style:{minWidth:44},children:String(e)},e))})]}),!L&&/* @__PURE__ */U(fi,{style:D,children:["Available ",qt(F)]}),
96
+ /* @__PURE__ */E(vi,{size:"lg",theme:n,block:!0,disabled:R||!L,onPress:()=>{L&&!R&&i(F,M)},children:R?"Building your picks…":L?`Choose ${es(F,v.presets)}`:"Currently unavailable"})]});/* @__PURE__ */
97
97
  return U(W,{onLayout:e=>g(e.nativeEvent.layout.width),style:{gap:12},children:[
98
- /* @__PURE__ */E(W,{accessibilityLabel:"Game tiers",style:{flexDirection:"row",gap:6,maxWidth:I?460:void 0},children:[{id:"all",label:"All",games:e},...B].map(e=>/* @__PURE__ */E(Ll,{theme:a,selected:p===e.id,sub:`${e.games.length} games`,onPress:()=>b(e.id),style:{flex:1,paddingHorizontal:4},children:/* @__PURE__ */E(fi,{style:{fontFamily:A,fontSize:13,fontWeight:"700",color:p===e.id?a.colors.primaryText:a.colors.text},children:e.label})},e.id))}),
99
- /* @__PURE__ */E(W,{accessibilityLabel:"Available games",style:{flexDirection:"row",flexWrap:"wrap",gap:G},children:S.map(e=>{const{ground:t,ink:i,art:o,drawn:r}=function(e,t,n=ie){const i=Qa(t),o=t.shelf?.coverStyle??"brand",r=$(e),l=r.slice(10).replace(Z,""),a="art"===o?Za(e,t,n):null;if(a)return{ground:i.coverColors[l]??i.tierColors[Ya(e).id],ink:i.coverText,art:a};const s=ee(r,n.icons)??n.icons.unknown??"";if("art"===o||"brand"===o)return{ground:t.shelf?.coverColors?.[l]??Ba,ink:t.shelf?.coverText??Ca,drawn:Ma(s)};const c=t.shelf?.coverColors?.[l]??Fa[l]??i.tierColors[Ya(e).id];return{ground:c,ink:i.coverText,drawn:Ha(o,s,{ink:i.coverText,ground:c,id:`gs-cover-${l}`})}}(e,n,v);/* @__PURE__ */
100
- return E(Ol,{ring:a.colors.primary,radius:sn(n,12),lit:e.id===F.id,accessibilityLabel:`Explore ${_a(e,v.presets)}`,accessibilityState:{selected:e.id===F.id},onPress:()=>{c(e.id),x(!0)},style:{width:Y},children:/* @__PURE__ */U(W,{style:{width:"100%",aspectRatio:1.06,backgroundColor:t,borderRadius:sn(n,12),overflow:"hidden"},children:[o?/* @__PURE__ */E(y,{accessible:!1,source:{uri:o},resizeMode:"cover",style:{width:"100%",height:"100%",opacity:Nt(e)?1:.55}}):r?/* @__PURE__ */E(Il,{drawn:r,dim:!Nt(e),frame:{left:r.box.left*Y,top:r.box.top*Y,size:r.box.size*Y}}):null,
101
- /* @__PURE__ */E(fi,{style:{position:"absolute",top:8,right:8,fontSize:9,fontWeight:"700",padding:4,borderRadius:sn(n,5),backgroundColor:"#ffffffde",color:"#111b36"},children:Ya(e).label}),
102
- /* @__PURE__ */E(W,{style:{position:"absolute",left:10,right:8,bottom:10,alignItems:"flex-start",gap:5},children:/* @__PURE__ */E(fi,{style:{...D,color:i,fontSize:18,fontWeight:"800",letterSpacing:-.6},children:_a(e,v.presets)})}),!Nt(e)&&/* @__PURE__ */E(fi,{style:{...D,position:"absolute",top:8,left:8,fontSize:10,paddingHorizontal:7,paddingVertical:3,borderRadius:sn(n,4),overflow:"hidden",backgroundColor:l.text,color:l.surface},children:"Scheduled"})]})},e.id)})}),
103
- /* @__PURE__ */E(m,{visible:w,transparent:!0,animationType:I?"fade":"slide",onRequestClose:()=>x(!1),children:/* @__PURE__ */U(W,{style:{flex:1,justifyContent:I?"center":"flex-end",alignItems:I?"center":"stretch",padding:I?24:0,backgroundColor:"#0008"},children:[/* @__PURE__ */E(z,{accessibilityRole:"button",accessibilityLabel:"Dismiss game details",onPress:()=>x(!1),style:{position:"absolute",top:0,right:0,bottom:0,left:0}}),/* @__PURE__ */E(W,{accessibilityViewIsModal:!0,style:{maxHeight:"85%",width:I?"100%":void 0,maxWidth:I?520:void 0,backgroundColor:l.surface,borderRadius:I?24:0,borderTopLeftRadius:sn(n,24),borderTopRightRadius:sn(n,24),overflow:"hidden"},children:/* @__PURE__ */U(oa,{children:[/* @__PURE__ */E(Ci,{theme:n,size:32,onPress:()=>x(!1),accessibilityLabel:"Close",style:{alignSelf:"flex-end",marginTop:4,marginRight:18},children:/* @__PURE__ */E(fi,{style:{fontSize:16,color:Si(n)},children:"×"})}),/* @__PURE__ */E(k,{children:N})]})})]})})]})}function gs({iconUrl:t,gameName:n,onPress:i,size:o=120,brandColor:r="#0F4C5C",cardColor:l="#DDD9D2",iconColor:a,accentColor:s,captionColor:c="#14687C",accessibilityLabel:d}){const[h,u]=e.useState(!1),[g,p]=e.useState(!1),y=(n||"").toUpperCase(),m=170,b=o/360,v=a??l,k=wn(r,s,v),B=e.useRef(new f.Value(0)).current,C=e=>({position:"absolute",left:40*b,top:5*b,width:210*b,height:210*b,borderRadius:42*b,backgroundColor:r,opacity:e}),S=e=>({transform:[{translateX:B.interpolate({inputRange:[0,1],outputRange:[e*b,0]})},{translateY:B.interpolate({inputRange:[0,1],outputRange:[e*b,0]})}]}),z=!!i&&(h||g);e.useEffect(()=>{f.timing(B,{toValue:z?1:0,duration:220,useNativeDriver:"web"!==w.OS}).start()},[z,B]);const F=()=>/* @__PURE__ */U(W,{style:[ps.container,{width:o,height:o}],children:[
98
+ /* @__PURE__ */E(W,{accessibilityLabel:"Game tiers",style:{flexDirection:"row",gap:6,maxWidth:I?460:void 0},children:[{id:"all",label:"All",games:e},...B].map(e=>/* @__PURE__ */E(Rl,{theme:a,selected:p===e.id,sub:`${e.games.length} games`,onPress:()=>b(e.id),style:{flex:1,paddingHorizontal:4},children:/* @__PURE__ */E(fi,{style:{fontFamily:A,fontSize:13,fontWeight:"700",color:p===e.id?a.colors.primaryText:a.colors.text},children:e.label})},e.id))}),
99
+ /* @__PURE__ */E(W,{accessibilityLabel:"Available games",style:{flexDirection:"row",flexWrap:"wrap",gap:G},children:S.map(e=>{const{ground:t,ink:i,art:o,drawn:r}=function(e,t,n=ie){const i=Ja(t),o=t.shelf?.coverStyle??"brand",r=$(e),l=r.slice(10).replace(Z,""),a="art"===o?$a(e,t,n):null;if(a)return{ground:i.coverColors[l]??i.tierColors[Na(e).id],ink:i.coverText,art:a};const s=ee(r,n.icons)??n.icons.unknown??"";if("art"===o||"brand"===o)return{ground:t.shelf?.coverColors?.[l]??Ca,ink:t.shelf?.coverText??Sa,drawn:La(s)};const c=t.shelf?.coverColors?.[l]??Aa[l]??i.tierColors[Na(e).id];return{ground:c,ink:i.coverText,drawn:Ma(o,s,{ink:i.coverText,ground:c,id:`gs-cover-${l}`})}}(e,n,v);/* @__PURE__ */
100
+ return E(jl,{ring:a.colors.primary,radius:sn(n,12),lit:e.id===F.id,accessibilityLabel:`Explore ${es(e,v.presets)}`,accessibilityState:{selected:e.id===F.id},onPress:()=>{c(e.id),x(!0)},style:{width:Y},children:/* @__PURE__ */U(W,{style:{width:"100%",aspectRatio:1.06,backgroundColor:t,borderRadius:sn(n,12),overflow:"hidden"},children:[o?/* @__PURE__ */E(y,{accessible:!1,source:{uri:o},resizeMode:"cover",style:{width:"100%",height:"100%",opacity:Nt(e)?1:.55}}):r?/* @__PURE__ */E(Ol,{drawn:r,dim:!Nt(e),frame:{left:r.box.left*Y,top:r.box.top*Y,size:r.box.size*Y}}):null,
101
+ /* @__PURE__ */E(fi,{style:{position:"absolute",top:8,right:8,fontSize:9,fontWeight:"700",padding:4,borderRadius:sn(n,5),backgroundColor:"#ffffffde",color:"#111b36"},children:Na(e).label}),
102
+ /* @__PURE__ */E(W,{style:{position:"absolute",left:10,right:8,bottom:10,alignItems:"flex-start",gap:5},children:/* @__PURE__ */E(fi,{style:{...D,color:i,fontSize:18,fontWeight:"800",letterSpacing:-.6},children:es(e,v.presets)})}),!Nt(e)&&/* @__PURE__ */E(fi,{style:{...D,position:"absolute",top:8,left:8,fontSize:10,paddingHorizontal:7,paddingVertical:3,borderRadius:sn(n,4),overflow:"hidden",backgroundColor:l.text,color:l.surface},children:"Scheduled"})]})},e.id)})}),
103
+ /* @__PURE__ */E(m,{visible:w,transparent:!0,animationType:I?"fade":"slide",onRequestClose:()=>x(!1),children:/* @__PURE__ */U(W,{style:{flex:1,justifyContent:I?"center":"flex-end",alignItems:I?"center":"stretch",padding:I?24:0,backgroundColor:"#0008"},children:[/* @__PURE__ */E(z,{accessibilityRole:"button",accessibilityLabel:"Dismiss game details",onPress:()=>x(!1),style:{position:"absolute",top:0,right:0,bottom:0,left:0}}),/* @__PURE__ */E(W,{accessibilityViewIsModal:!0,style:{maxHeight:"85%",width:I?"100%":void 0,maxWidth:I?520:void 0,backgroundColor:l.surface,borderRadius:I?24:0,borderTopLeftRadius:sn(n,24),borderTopRightRadius:sn(n,24),overflow:"hidden"},children:/* @__PURE__ */U(ra,{children:[/* @__PURE__ */E(Ci,{theme:n,size:32,onPress:()=>x(!1),accessibilityLabel:"Close",style:{alignSelf:"flex-end",marginTop:4,marginRight:18},children:/* @__PURE__ */E(fi,{style:{fontSize:16,color:Si(n)},children:"×"})}),/* @__PURE__ */E(k,{children:N})]})})]})})]})}function ps({iconUrl:t,gameName:n,onPress:i,size:o=120,brandColor:r="#0F4C5C",cardColor:l="#DDD9D2",iconColor:a,accentColor:s,captionColor:c="#14687C",accessibilityLabel:d}){const[h,u]=e.useState(!1),f=(n||"").toUpperCase(),g=170,p=o/360,y=a??l,m=wn(r,s,y),b=(e,t)=>({position:"absolute",left:(40+t)*p,top:(5+t)*p,width:210*p,height:210*p,borderRadius:42*p,backgroundColor:r,opacity:e}),w=()=>/* @__PURE__ */U(W,{style:[ys.container,{width:o,height:o}],children:[
104
104
  /* @__PURE__ */U(A,{viewBox:"0 0 360 360",width:o,height:o,children:[
105
105
  /* @__PURE__ */E(L,{x:2,y:2,width:356,height:356,rx:78,fill:l,stroke:r,strokeWidth:4}),
106
106
  /* @__PURE__ */E(O,{x:180,y:305,fontFamily:"Manrope, Poppins, sans-serif",fontSize:32,letterSpacing:1.5,fontWeight:"800",textAnchor:"middle",fill:r,children:"PRESS TO PLAY"}),
107
- /* @__PURE__ */E(O,{x:180,y:338,fontFamily:"Manrope, Poppins, sans-serif",fontSize:18,letterSpacing:2,fontWeight:"500",textAnchor:"middle",fill:c,children:y})]}),
108
- /* @__PURE__ */E(f.View,{pointerEvents:"none",style:[C(.3),S(50)]}),
109
- /* @__PURE__ */E(f.View,{pointerEvents:"none",style:[C(.55),S(25)]}),
110
- /* @__PURE__ */E(W,{pointerEvents:"none",style:C(1)}),
111
- /* @__PURE__ */E(W,{pointerEvents:"none",style:{position:"absolute",left:60*b,top:25*b,width:m*b,height:m*b},children:/* @__PURE__ */E(ds,{iconUrl:t,width:m*b,height:m*b,iconColor:v,accentColor:k})})]});return i?/* @__PURE__ */E(x,{onPress:i,onPressIn:()=>p(!0),onPressOut:()=>p(!1),onHoverIn:"web"===w.OS?()=>u(!0):void 0,onHoverOut:"web"===w.OS?()=>u(!1):void 0,accessibilityRole:"button",accessibilityLabel:d??`Press to play ${n}`,style:{width:o,height:o,borderRadius:o/360*78,transform:[{scale:g?.96:1}]},children:F()}):F()}var ps=B.create({container:{position:"relative"}});function ys({theme:e,active:t,onPress:n,children:i}){const o=e.colors,{hovered:r,pressed:l,handlers:a}=wi(),s=t?null:ai(o.primary,{hovered:r,pressed:l});/* @__PURE__ */
112
- return E(z,{...a,accessibilityRole:"button",accessibilityState:{selected:t},onPress:n,activeOpacity:1,style:[{flexDirection:"row",alignItems:"center",gap:6,minWidth:44,paddingHorizontal:13,borderRadius:sn(e,999),borderWidth:1,borderColor:s?.borderColor??"transparent",backgroundColor:t?o.primary:s?.background??"transparent",justifyContent:"center"},xi(l)],children:i})}function ms({items:e,value:t,onChange:n,label:i,theme:o,small:r}){const l=o.colors;/* @__PURE__ */
107
+ /* @__PURE__ */E(O,{x:180,y:338,fontFamily:"Manrope, Poppins, sans-serif",fontSize:18,letterSpacing:2,fontWeight:"500",textAnchor:"middle",fill:c,children:f})]}),
108
+ /* @__PURE__ */E(W,{pointerEvents:"none",style:b(.3,50)}),
109
+ /* @__PURE__ */E(W,{pointerEvents:"none",style:b(.55,25)}),
110
+ /* @__PURE__ */E(W,{pointerEvents:"none",style:b(1,0)}),
111
+ /* @__PURE__ */E(W,{pointerEvents:"none",style:{position:"absolute",left:60*p,top:25*p,width:g*p,height:g*p},children:/* @__PURE__ */E(hs,{iconUrl:t,width:g*p,height:g*p,iconColor:y,accentColor:m})})]});return i?/* @__PURE__ */E(x,{onPress:i,onPressIn:()=>u(!0),onPressOut:()=>u(!1),accessibilityRole:"button",accessibilityLabel:d??`Press to play ${n}`,style:{width:o,height:o,borderRadius:o/360*78,transform:[{scale:h?.96:1}]},children:w()}):w()}var ys=B.create({container:{position:"relative"}});function ms({theme:e,active:t,onPress:n,children:i}){const o=e.colors,{hovered:r,pressed:l,handlers:a}=wi(),s=t?null:ai(o.primary,{hovered:r,pressed:l});/* @__PURE__ */
112
+ return E(z,{...a,accessibilityRole:"button",accessibilityState:{selected:t},onPress:n,activeOpacity:1,style:[{flexDirection:"row",alignItems:"center",gap:6,minWidth:44,paddingHorizontal:13,borderRadius:sn(e,999),borderWidth:1,borderColor:s?.borderColor??"transparent",backgroundColor:t?o.primary:s?.background??"transparent",justifyContent:"center"},xi(l)],children:i})}function bs({items:e,value:t,onChange:n,label:i,theme:o,small:r}){const l=o.colors;/* @__PURE__ */
113
113
  return E(k,{horizontal:!0,showsHorizontalScrollIndicator:!1,accessibilityLabel:i,style:{alignSelf:"flex-start",maxWidth:"100%",borderRadius:sn(o,999),backgroundColor:l.backgroundAlt,borderWidth:1,borderColor:l.border},contentContainerStyle:{gap:2,padding:r?3:4,minHeight:r?36:44},children:e.map(e=>{const i=e.id===t;/* @__PURE__ */
114
- return U(ys,{theme:o,active:i,onPress:()=>n(e.id),children:[/* @__PURE__ */E(fi,{style:{fontSize:r?13:14,fontWeight:"700",color:i?l.primaryText:l.textMuted},children:e.label}),null!=e.count&&/* @__PURE__ */E(fi,{style:{height:18,lineHeight:18,paddingHorizontal:6,borderRadius:sn(o,999),overflow:"hidden",fontSize:11,fontWeight:"600",backgroundColor:i?tn(l.primaryText,.18):tn(l.primary,.12),color:i?l.primaryText:l.textMuted},children:e.count})]},String(e.id))})})}function bs({games:e,selectedGame:t,theme:n,onPlay:i,maxPayouts:o,quickPickLoading:r}){const l=n.colors,a=ra(n),s=a.colors,c=hn(n),h=Nr(n),u=Yr(n),f=bn(n),g=function(e){const t=So.map(t=>({id:t.id,label:t.shortLabel,count:e.filter(e=>zo(e)===t.level).length})).filter(e=>e.count>0);return t.length>1?[{id:"all",label:"All",count:e.length},...t]:[]}(e),[p,y]=d("all"),[m,b]=d(t?.id??null),[w,x]=d({}),[v,k]=d(0),B=function(e,t){return"all"===t?[...e]:e.filter(e=>Ya(e).id===t)}(e,p),C=e.find(e=>e.id===m)??B[0]??e[0];if(!C)/* @__PURE__ */return E(fi,{accessibilityRole:"text",style:{color:s.textMuted,fontFamily:u},children:"No games available"});const S=Ua(C),z=La(C,o?.[C.id]),F=Va(C,o?.[C.id]),A=Nt(C),P=!(!C.quick_pick_only||!r),T=z.legOptions.includes(w[C.id])?w[C.id]:F?.count??z.maxLegCount,D=e=>{A&&!P&&i(C,e)},H=v>=720?4:2,M=v>0?(v-12*(H-1))/H:void 0,L=g.find(e=>e.id===p)?.label??"All",R={fontFamily:u,color:l.text};/* @__PURE__ */
114
+ return U(ms,{theme:o,active:i,onPress:()=>n(e.id),children:[/* @__PURE__ */E(fi,{style:{fontSize:r?13:14,fontWeight:"700",color:i?l.primaryText:l.textMuted},children:e.label}),null!=e.count&&/* @__PURE__ */E(fi,{style:{height:18,lineHeight:18,paddingHorizontal:6,borderRadius:sn(o,999),overflow:"hidden",fontSize:11,fontWeight:"600",backgroundColor:i?tn(l.primaryText,.18):tn(l.primary,.12),color:i?l.primaryText:l.textMuted},children:e.count})]},String(e.id))})})}function ws({games:e,selectedGame:t,theme:n,onPlay:i,maxPayouts:o,quickPickLoading:r}){const l=n.colors,a=la(n),s=a.colors,c=hn(n),h=Nr(n),u=Yr(n),f=bn(n),g=function(e){const t=So.map(t=>({id:t.id,label:t.shortLabel,count:e.filter(e=>zo(e)===t.level).length})).filter(e=>e.count>0);return t.length>1?[{id:"all",label:"All",count:e.length},...t]:[]}(e),[p,y]=d("all"),[m,b]=d(t?.id??null),[w,x]=d({}),[v,k]=d(0),B=function(e,t){return"all"===t?[...e]:e.filter(e=>Na(e).id===t)}(e,p),C=e.find(e=>e.id===m)??B[0]??e[0];if(!C)/* @__PURE__ */return E(fi,{accessibilityRole:"text",style:{color:s.textMuted,fontFamily:u},children:"No games available"});const S=Ga(C),z=Ra(C,o?.[C.id]),F=Ya(C,o?.[C.id]),A=Nt(C),P=!(!C.quick_pick_only||!r),T=z.legOptions.includes(w[C.id])?w[C.id]:F?.count??z.maxLegCount,D=e=>{A&&!P&&i(C,e)},H=v>=720?4:2,M=v>0?(v-12*(H-1))/H:void 0,L=g.find(e=>e.id===p)?.label??"All",R={fontFamily:u,color:l.text};/* @__PURE__ */
115
115
  return U(W,{onLayout:e=>k(e.nativeEvent.layout.width),style:{gap:12},children:[
116
- /* @__PURE__ */U(W,{accessibilityLabel:`Featured game: ${S}`,style:{flexDirection:"row",alignItems:"center",gap:16,padding:16,borderRadius:sn(n,24),borderWidth:1,borderColor:l.border,backgroundColor:l.background,minHeight:148,shadowColor:c,shadowOpacity:.14,shadowRadius:14,shadowOffset:{width:0,height:8},elevation:3},children:[/* @__PURE__ */E(W,P?{accessibilityRole:"progressbar",style:{width:112,height:112,alignItems:"center",justifyContent:"center"},children:/* @__PURE__ */E(fi,{style:{...R,fontSize:13,color:l.textMuted},children:"Loading selections…"})}:{pointerEvents:A?"auto":"none",style:{opacity:A?1:.5},children:/* @__PURE__ */E(gs,{iconUrl:$(C),gameName:S,onPress:()=>D(T),size:112,brandColor:l.primary,cardColor:l.backgroundAlt,iconColor:l.primaryText,accentColor:f,captionColor:l.primary})}),/* @__PURE__ */U(Li,{style:{flex:1,minWidth:0,gap:4},children:[
117
- /* @__PURE__ */U(W,{style:{flexDirection:"row",alignItems:"center",flexWrap:"wrap",gap:6},children:[/* @__PURE__ */E(fi,{accessibilityRole:"header",style:{fontFamily:h,fontSize:v>=480?28:24,lineHeight:v>=480?32:28,fontWeight:"800",letterSpacing:-.56,color:c,flexShrink:1},children:S}),/* @__PURE__ */E(oa,{children:/* @__PURE__ */E(da,{variant:"icon",panel:ht(C),content:C.description||C.rule||"Pick outcomes and land the payout for this game.",theme:n,title:S,label:`How to play ${S}`,colors:l,bodyFont:u,headingFont:h,extra:/* @__PURE__ */E(hs,{tiers:z.hasGenericDividends?z.tiers:[],modes:z.modes,pydDividends:z.pydDividends,onPlayCount:A&&!P&&z.legOptions.length>1?D:void 0,minBet:z.minBet,maxBet:z.maxBet,colors:l,bodyFont:u,headingFont:h,theme:n})})})]}),
118
- /* @__PURE__ */E(fi,{style:{...R,fontSize:13,lineHeight:18,fontWeight:"700",color:l.primary},children:C.call_to_action?.trim()||Ga(C)}),F&&/* @__PURE__ */U(W,{style:{flexDirection:"row",alignItems:"baseline",flexWrap:"wrap",gap:6,marginTop:2},children:[
116
+ /* @__PURE__ */U(W,{accessibilityLabel:`Featured game: ${S}`,style:{flexDirection:"row",alignItems:"center",gap:16,padding:16,borderRadius:sn(n,24),borderWidth:1,borderColor:l.border,backgroundColor:l.background,minHeight:148,shadowColor:c,shadowOpacity:.14,shadowRadius:14,shadowOffset:{width:0,height:8},elevation:3},children:[/* @__PURE__ */E(W,P?{accessibilityRole:"progressbar",style:{width:112,height:112,alignItems:"center",justifyContent:"center"},children:/* @__PURE__ */E(fi,{style:{...R,fontSize:13,color:l.textMuted},children:"Loading selections…"})}:{pointerEvents:A?"auto":"none",style:{opacity:A?1:.5},children:/* @__PURE__ */E(ps,{iconUrl:$(C),gameName:S,onPress:()=>D(T),size:112,brandColor:l.primary,cardColor:l.backgroundAlt,iconColor:l.primaryText,accentColor:f,captionColor:l.primary})}),/* @__PURE__ */U(Li,{style:{flex:1,minWidth:0,gap:4},children:[
117
+ /* @__PURE__ */U(W,{style:{flexDirection:"row",alignItems:"center",flexWrap:"wrap",gap:6},children:[/* @__PURE__ */E(fi,{accessibilityRole:"header",style:{fontFamily:h,fontSize:v>=480?28:24,lineHeight:v>=480?32:28,fontWeight:"800",letterSpacing:-.56,color:c,flexShrink:1},children:S}),/* @__PURE__ */E(ra,{children:/* @__PURE__ */E(ha,{variant:"icon",panel:ht(C),content:C.description||C.rule||"Pick outcomes and land the payout for this game.",theme:n,title:S,label:`How to play ${S}`,colors:l,bodyFont:u,headingFont:h,extra:/* @__PURE__ */E(us,{tiers:z.hasGenericDividends?z.tiers:[],modes:z.modes,pydDividends:z.pydDividends,onPlayCount:A&&!P&&z.legOptions.length>1?D:void 0,minBet:z.minBet,maxBet:z.maxBet,colors:l,bodyFont:u,headingFont:h,theme:n})})})]}),
118
+ /* @__PURE__ */E(fi,{style:{...R,fontSize:13,lineHeight:18,fontWeight:"700",color:l.primary},children:C.call_to_action?.trim()||Va(C)}),F&&/* @__PURE__ */U(W,{style:{flexDirection:"row",alignItems:"baseline",flexWrap:"wrap",gap:6,marginTop:2},children:[
119
119
  /* @__PURE__ */E(fi,{style:{...R,fontSize:12,lineHeight:16,color:l.textMuted},children:"Win up to"}),
120
120
  /* @__PURE__ */E(fi,{style:{fontFamily:h,fontSize:18,lineHeight:22,fontWeight:"800",letterSpacing:-.18,color:l.value??c,fontVariant:["tabular-nums"]},children:yt(F.amount)}),
121
- /* @__PURE__ */U(fi,{style:{...R,fontSize:12,lineHeight:16,color:l.textMuted},children:["· ",F.count," right at ",yt(F.stake)]})]}),C.quick_pick_only&&z.legOptions.length>1&&/* @__PURE__ */E(W,{style:{marginTop:6},children:/* @__PURE__ */E(ms,{small:!0,theme:n,label:`Number of calls for ${S}`,value:T,onChange:e=>x(t=>({...t,[C.id]:e})),items:z.legOptions.map(e=>({id:e,label:`${e} calls`}))})}),!A&&/* @__PURE__ */U(fi,{style:{...R,marginTop:4,fontSize:12,fontWeight:"600"},children:["Available ",qt(C)]})]},C.id)]}),g.length>0&&/* @__PURE__ */E(ms,{small:!0,theme:a,label:"Game tier",value:p,onChange:y,items:g}),
121
+ /* @__PURE__ */U(fi,{style:{...R,fontSize:12,lineHeight:16,color:l.textMuted},children:["· ",F.count," right at ",yt(F.stake)]})]}),C.quick_pick_only&&z.legOptions.length>1&&/* @__PURE__ */E(W,{style:{marginTop:6},children:/* @__PURE__ */E(bs,{small:!0,theme:n,label:`Number of calls for ${S}`,value:T,onChange:e=>x(t=>({...t,[C.id]:e})),items:z.legOptions.map(e=>({id:e,label:`${e} calls`}))})}),!A&&/* @__PURE__ */U(fi,{style:{...R,marginTop:4,fontSize:12,fontWeight:"600"},children:["Available ",qt(C)]})]},C.id)]}),g.length>0&&/* @__PURE__ */E(bs,{small:!0,theme:a,label:"Game tier",value:p,onChange:y,items:g}),
122
122
  /* @__PURE__ */U(W,{style:{flexDirection:"row",alignItems:"center",gap:8},children:[/* @__PURE__ */U(fi,{style:{...R,fontSize:12,fontWeight:"500",letterSpacing:2.16,textTransform:"uppercase",color:s.textMuted},children:[L," games · ",B.length]}),/* @__PURE__ */E(W,{style:{flex:1,borderTopWidth:1,borderTopColor:tn(s.primary,.08)}})]}),
123
- /* @__PURE__ */E(W,{accessibilityLabel:"All games",style:{flexDirection:"row",flexWrap:"wrap",gap:12},children:B.map(e=>{const t=Ua(e),i=Va(e,o?.[e.id]),r=Nt(e),a=e.id===C.id;/* @__PURE__ */
123
+ /* @__PURE__ */E(W,{accessibilityLabel:"All games",style:{flexDirection:"row",flexWrap:"wrap",gap:12},children:B.map(e=>{const t=Ga(e),i=Ya(e,o?.[e.id]),r=Nt(e),a=e.id===C.id;/* @__PURE__ */
124
124
  return E(Bi,{theme:n,lit:a,accessibilityState:{selected:a},accessibilityLabel:`Explore ${t}`,onPress:()=>(e=>b(e.id))(e),style:{width:M??"48%",minHeight:172,padding:12,gap:8,borderRadius:sn(n,16),borderWidth:1,backgroundColor:a?l.infoBg??l.backgroundAlt:l.background,shadowColor:c,shadowOpacity:a?.14:.08,shadowRadius:a?14:8,shadowOffset:{width:0,height:a?8:4},elevation:a?3:1},children:/* @__PURE__ */U(W,{style:{flexGrow:1,gap:8,opacity:r?1:.55},children:[
125
- /* @__PURE__ */U(W,{style:{flexDirection:"row",alignItems:"flex-start",justifyContent:"space-between",gap:8},children:[/* @__PURE__ */E(us,{iconUrl:$(e),size:48,brandColor:n.brand?.chip??l.primary,iconColor:n.brand?.icon??l.primaryText,accentColor:f}),/* @__PURE__ */E(fi,{numberOfLines:1,style:{flexShrink:0,height:18,lineHeight:18,paddingHorizontal:7,borderRadius:sn(n,999),overflow:"hidden",fontSize:10,fontWeight:"700",letterSpacing:1,textTransform:"uppercase",backgroundColor:tn(l.primary,.12),color:c},children:Ya(e).label})]}),
125
+ /* @__PURE__ */U(W,{style:{flexDirection:"row",alignItems:"flex-start",justifyContent:"space-between",gap:8},children:[/* @__PURE__ */E(fs,{iconUrl:$(e),size:48,brandColor:n.brand?.chip??l.primary,iconColor:n.brand?.icon??l.primaryText,accentColor:f}),/* @__PURE__ */E(fi,{numberOfLines:1,style:{flexShrink:0,height:18,lineHeight:18,paddingHorizontal:7,borderRadius:sn(n,999),overflow:"hidden",fontSize:10,fontWeight:"700",letterSpacing:1,textTransform:"uppercase",backgroundColor:tn(l.primary,.12),color:c},children:Na(e).label})]}),
126
126
  /* @__PURE__ */E(fi,{style:{fontFamily:h,fontSize:18,lineHeight:22,fontWeight:"700",letterSpacing:-.27,color:c},children:t}),
127
- /* @__PURE__ */E(fi,{numberOfLines:2,style:{...R,fontSize:13,lineHeight:18,color:l.textMuted},children:Ga(e)}),
128
- /* @__PURE__ */E(fi,{style:{...R,marginTop:"auto",fontSize:13,lineHeight:18,fontWeight:"600",color:c,fontVariant:["tabular-nums"]},children:r?i?`${i.count} right → ${yt(i.amount)}`:"See rules & payouts":`Available ${qt(e)}`})]})},e.id)})})]})}function ws(e,t,n,i,o,r,a){const[s,c]=d(null),h=!!e&&!!t&&!!a&&n>0&&i>0,u=JSON.stringify([t?.id,n,i,o,r]);l(()=>{if(!h||!e||!t)return;let l=!1;const a=setTimeout(()=>{e(t.id,{total:n,bet_amount:i,actual:o,predicted:o,rule_id:r}).then(t=>{l||c({key:u,source:e,data:t})}).catch(()=>{l||c({key:u,source:e,error:!0})})},150);return()=>{l=!0,clearTimeout(a)}},[h,e,t?.id,u]);const f=s?.key===u&&s.source===e?s:null;if(!a||!h)return{view:a,estimated:!1};const g=f?.data?.payouts;if(!g||!a.rows.every(e=>null==e.correct||Number.isFinite(g[String(e.correct)])))return{estimated:!0,view:{...a,heading:`${a.heading} · estimate`,note:f?.error?"Estimate only. The payout preview is unavailable; review confirms the final amounts.":"Updating payout preview…"}};const p=a.rows.map(e=>({...e,amount:null==e.correct?e.amount:wr(g[String(e.correct)],t)}));return{estimated:!1,view:{...a,rows:p.map((e,t)=>null==e.added?e:{...e,added:e.amount-(p[t-1]?.amount??0)})}}}var xs=16;function vs({onBack:e,title:t="Go back",label:n,ariaLabel:i,color:o,labelStyle:r,labelLines:l,style:a}){const s=ra(yl().theme).colors,{hovered:c,pressed:d,handlers:h}=wi(),u=c?s.primary:o??s.textMuted;/* @__PURE__ */
129
- return U(z,{...h,onPress:e,accessibilityRole:"button",accessibilityLabel:i??(null==n||"string"!=typeof n?t:n),activeOpacity:1,style:[{flexDirection:"row",alignItems:"center",gap:6,minWidth:0,flexShrink:1,alignSelf:"flex-start",padding:14,margin:-14},xi(d),a],children:[/* @__PURE__ */E(A,{width:xs,height:xs,viewBox:"0 0 24 24",fill:"none",children:/* @__PURE__ */E(H,{d:"M19 12H5 M12 19l-7-7 7-7",stroke:u,strokeWidth:2.5,strokeLinecap:"round",strokeLinejoin:"round"})}),null!=n?/* @__PURE__ */E(fi,{numberOfLines:l,style:[{flexShrink:1,color:u},r],children:n}):null]})}function ks({color:e,testID:t}){/* @__PURE__ */
130
- return E(W,{testID:t,accessibilityElementsHidden:!0,importantForAccessibility:"no-hide-descendants",style:{width:xs,height:xs,flexShrink:0},children:/* @__PURE__ */E(A,{width:xs,height:xs,viewBox:"0 0 24 24",fill:"none",children:/* @__PURE__ */E(H,{d:"M5 12.5l4.5 4.5L19 7.5",stroke:e,strokeWidth:3,strokeLinecap:"round",strokeLinejoin:"round"})})})}function Bs({onBack:e,label:t="Games"}){/* @__PURE__ */
131
- return E(vs,{onBack:e,label:t,labelStyle:{fontSize:14,fontWeight:"600"},style:{marginBottom:12}})}function Cs({title:e,onBack:t,backLabel:n,actions:i,children:o,leading:r}){const{theme:l,headingFont:a}=yl(),s=ra(l),c=oi().pageHeader,d=s.colors,{width:h}=F(),u=c.size[h>=640?1:0],f=/* @__PURE__ */E(fi,{accessibilityRole:"header",style:{flexShrink:1,fontSize:u,lineHeight:Math.round(u*c.lineHeight),letterSpacing:c.tracking*u,fontWeight:800===c.weight?"800":"700",color:hn(s),fontFamily:a},children:e}),g=i?/* @__PURE__ */E(W,{style:{flexShrink:0},children:i}):null;if("bar"===c.layout)/* @__PURE__ */return U(W,{style:{flexDirection:"row",alignItems:"center",gap:10,minHeight:56,paddingHorizontal:12,paddingVertical:4,borderBottomWidth:1,borderColor:d.border},children:[r??(t?/* @__PURE__ */E(vs,{onBack:t}):null),
132
- /* @__PURE__ */U(W,{style:{flex:1,minWidth:0},children:[f,null!=n?/* @__PURE__ */E(fi,{style:{fontSize:12,color:d.textMuted},children:n}):null]}),o,g]});if("inline"===c.layout)/* @__PURE__ */return U(W,{style:{flexDirection:"row",alignItems:"center",gap:10,minHeight:44,paddingLeft:8,paddingBottom:8},children:[r??(t?/* @__PURE__ */E(vs,{onBack:t,title:"string"==typeof n?`Back to ${n}`:void 0,style:{alignSelf:"center"}}):null),f,o,i?/* @__PURE__ */E(W,{style:{flexShrink:0,marginLeft:"auto"},children:i}):null]});if("toolbar"===c.layout){const e=Qa(s).accent,i={fontSize:11,fontWeight:"800",letterSpacing:1.76,textTransform:"uppercase"};/* @__PURE__ */
133
- return U(W,{style:{gap:8},children:[t||r||null!=n||o?/* @__PURE__ */U(W,{style:{flexDirection:"row",alignItems:"center",gap:10,minWidth:0,minHeight:xs},children:[r??null,!r&&t?/* @__PURE__ */E(vs,{onBack:t,label:n,ariaLabel:"string"==typeof n?`Back to ${n}`:void 0,color:e,labelStyle:i,labelLines:1,style:{alignSelf:"center"}}):null!=n?/* @__PURE__ */E(fi,{numberOfLines:1,style:[i,{flexShrink:1,color:e}],children:n}):null,o]}):null,/* @__PURE__ */U(W,{style:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",gap:12},children:[f,g]})]})}/* @__PURE__ */
134
- return U(W,{style:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",gap:12,paddingLeft:8},children:[/* @__PURE__ */U(W,{style:{flexDirection:"row",alignItems:"center",gap:10,flexShrink:1,minWidth:0},children:[r,/* @__PURE__ */U(W,{style:{flexShrink:1,minWidth:0},children:[f,/* @__PURE__ */E(Ss,{onBack:t,label:n,children:o})]})]}),g]})}function Ss({onBack:e,hideActions:t,label:n,children:i}){const o=ra(yl().theme).colors,{width:r}=F(),l=r>=640;return e||null!=n||i?/* @__PURE__ */U(W,{style:{flexDirection:"row",alignItems:"center",gap:6,marginTop:2},children:[e?/* @__PURE__ */E(vs,{onBack:e,label:n,labelStyle:{fontSize:l?14:12},style:{alignSelf:"center"}}):null,!e&&null!=n&&(a=o.textMuted,/* @__PURE__ */E(fi,{style:{fontSize:l?14:12,flexShrink:1,color:a},children:n})),i]}):null;var a}function zs(e){const t=e.colors;return{text:{color:t.text,fontFamily:Yr(e),fontSize:14},muted:{color:t.textMuted,fontFamily:Yr(e),fontSize:12},row:{flexDirection:"row",alignItems:"center",gap:8},field:{minHeight:44,paddingVertical:8,paddingHorizontal:12,borderRadius:sn(e,8),borderWidth:1,borderColor:t.border,justifyContent:"center",backgroundColor:t.backgroundAlt}}}function Ws({view:e,theme:t,compact:n=!1}){const i=zs(t),o=t.colors;/* @__PURE__ */
135
- return U(W,n?{style:{paddingHorizontal:12,paddingBottom:8},children:[/* @__PURE__ */U(fi,{style:i.muted,children:["Total return",e.rows.some(e=>null!=e.added)?" · prizes stack":"",e.heading.includes("estimate")?" · estimate":""]}),/* @__PURE__ */E(k,{horizontal:!0,contentContainerStyle:{flexGrow:1},style:{marginTop:6,borderWidth:1,borderColor:o.border,borderRadius:sn(t,8)},children:e.rows.slice(1).map(t=>/* @__PURE__ */U(W,{style:{flex:1,minWidth:62,padding:7,borderRightWidth:1,borderColor:o.border,alignItems:"center"},children:[/* @__PURE__ */E(fi,{style:i.muted,children:e.rows.some(e=>null!=e.added)?t.correct??t.label.replace(" correct",""):t.label.replace(" or more wrong","+ wrong").replace(" or more misses","+ misses")}),/* @__PURE__ */E(fi,{style:{...i.text,fontWeight:"800",marginTop:3},children:yt(t.amount)})]},t.label))})]}:{children:[e.rows.map(e=>/* @__PURE__ */U(W,{style:{...i.row,justifyContent:"space-between",minHeight:48,borderTopWidth:1,borderColor:o.border},children:[/* @__PURE__ */U(W,{style:{flex:1},children:[/* @__PURE__ */E(fi,{style:i.text,children:e.label.replace(" or more wrong","+ wrong").replace(" or more misses","+ misses")}),null!=e.added&&/* @__PURE__ */U(fi,{style:i.muted,children:["Tier adds ",yt(e.added)]})]}),/* @__PURE__ */E(fi,{style:{...i.text,fontSize:22,fontWeight:"800"},children:yt(e.amount)})]},e.label)),!!e.note&&/* @__PURE__ */E(fi,{style:{...i.muted,marginVertical:10},children:e.note})]})}function Fs({actions:t}){const n=yl(),i=n.theme.colors,o=zs(n.theme),[r,l]=e.useState(!1),a=n.answeredCount>0;/* @__PURE__ */
127
+ /* @__PURE__ */E(fi,{numberOfLines:2,style:{...R,fontSize:13,lineHeight:18,color:l.textMuted},children:Va(e)}),
128
+ /* @__PURE__ */E(fi,{style:{...R,marginTop:"auto",fontSize:13,lineHeight:18,fontWeight:"600",color:c,fontVariant:["tabular-nums"]},children:r?i?`${i.count} right → ${yt(i.amount)}`:"See rules & payouts":`Available ${qt(e)}`})]})},e.id)})})]})}function xs(e,t,n,i,o,r,a){const[s,c]=d(null),h=!!e&&!!t&&!!a&&n>0&&i>0,u=JSON.stringify([t?.id,n,i,o,r]);l(()=>{if(!h||!e||!t)return;let l=!1;const a=setTimeout(()=>{e(t.id,{total:n,bet_amount:i,actual:o,predicted:o,rule_id:r}).then(t=>{l||c({key:u,source:e,data:t})}).catch(()=>{l||c({key:u,source:e,error:!0})})},150);return()=>{l=!0,clearTimeout(a)}},[h,e,t?.id,u]);const f=s?.key===u&&s.source===e?s:null;if(!a||!h)return{view:a,estimated:!1};const g=f?.data?.payouts;if(!g||!a.rows.every(e=>null==e.correct||Number.isFinite(g[String(e.correct)])))return{estimated:!0,view:{...a,heading:`${a.heading} · estimate`,note:f?.error?"Estimate only. The payout preview is unavailable; review confirms the final amounts.":"Updating payout preview…"}};const p=a.rows.map(e=>({...e,amount:null==e.correct?e.amount:wr(g[String(e.correct)],t)}));return{estimated:!1,view:{...a,rows:p.map((e,t)=>null==e.added?e:{...e,added:e.amount-(p[t-1]?.amount??0)})}}}var vs=16;function ks({onBack:e,title:t="Go back",label:n,ariaLabel:i,color:o,labelStyle:r,labelLines:l,style:a}){const s=la(ml().theme).colors,{hovered:c,pressed:d,handlers:h}=wi(),u=c?s.primary:o??s.textMuted;/* @__PURE__ */
129
+ return U(z,{...h,onPress:e,accessibilityRole:"button",accessibilityLabel:i??(null==n||"string"!=typeof n?t:n),activeOpacity:1,style:[{flexDirection:"row",alignItems:"center",gap:6,minWidth:0,flexShrink:1,alignSelf:"flex-start",padding:14,margin:-14},xi(d),a],children:[/* @__PURE__ */E(A,{width:vs,height:vs,viewBox:"0 0 24 24",fill:"none",children:/* @__PURE__ */E(H,{d:"M19 12H5 M12 19l-7-7 7-7",stroke:u,strokeWidth:2.5,strokeLinecap:"round",strokeLinejoin:"round"})}),null!=n?/* @__PURE__ */E(fi,{numberOfLines:l,style:[{flexShrink:1,color:u},r],children:n}):null]})}function Bs({color:e,testID:t}){/* @__PURE__ */
130
+ return E(W,{testID:t,accessibilityElementsHidden:!0,importantForAccessibility:"no-hide-descendants",style:{width:vs,height:vs,flexShrink:0},children:/* @__PURE__ */E(A,{width:vs,height:vs,viewBox:"0 0 24 24",fill:"none",children:/* @__PURE__ */E(H,{d:"M5 12.5l4.5 4.5L19 7.5",stroke:e,strokeWidth:3,strokeLinecap:"round",strokeLinejoin:"round"})})})}function Cs({onBack:e,label:t="Games"}){/* @__PURE__ */
131
+ return E(ks,{onBack:e,label:t,labelStyle:{fontSize:14,fontWeight:"600"},style:{marginBottom:12}})}function Ss({title:e,onBack:t,backLabel:n,actions:i,children:o,leading:r}){const{theme:l,headingFont:a}=ml(),s=la(l),c=oi().pageHeader,d=s.colors,{width:h}=F(),u=c.size[h>=640?1:0],f=/* @__PURE__ */E(fi,{accessibilityRole:"header",style:{flexShrink:1,fontSize:u,lineHeight:Math.round(u*c.lineHeight),letterSpacing:c.tracking*u,fontWeight:800===c.weight?"800":"700",color:hn(s),fontFamily:a},children:e}),g=i?/* @__PURE__ */E(W,{style:{flexShrink:0},children:i}):null;if("bar"===c.layout)/* @__PURE__ */return U(W,{style:{flexDirection:"row",alignItems:"center",gap:10,minHeight:56,paddingHorizontal:12,paddingVertical:4,borderBottomWidth:1,borderColor:d.border},children:[r??(t?/* @__PURE__ */E(ks,{onBack:t}):null),
132
+ /* @__PURE__ */U(W,{style:{flex:1,minWidth:0},children:[f,null!=n?/* @__PURE__ */E(fi,{style:{fontSize:12,color:d.textMuted},children:n}):null]}),o,g]});if("inline"===c.layout)/* @__PURE__ */return U(W,{style:{flexDirection:"row",alignItems:"center",gap:10,minHeight:44,paddingLeft:8,paddingBottom:8},children:[r??(t?/* @__PURE__ */E(ks,{onBack:t,title:"string"==typeof n?`Back to ${n}`:void 0,style:{alignSelf:"center"}}):null),f,o,i?/* @__PURE__ */E(W,{style:{flexShrink:0,marginLeft:"auto"},children:i}):null]});if("toolbar"===c.layout){const e=Ja(s).accent,i={fontSize:11,fontWeight:"800",letterSpacing:1.76,textTransform:"uppercase"};/* @__PURE__ */
133
+ return U(W,{style:{gap:8},children:[t||r||null!=n||o?/* @__PURE__ */U(W,{style:{flexDirection:"row",alignItems:"center",gap:10,minWidth:0,minHeight:vs},children:[r??null,!r&&t?/* @__PURE__ */E(ks,{onBack:t,label:n,ariaLabel:"string"==typeof n?`Back to ${n}`:void 0,color:e,labelStyle:i,labelLines:1,style:{alignSelf:"center"}}):null!=n?/* @__PURE__ */E(fi,{numberOfLines:1,style:[i,{flexShrink:1,color:e}],children:n}):null,o]}):null,/* @__PURE__ */U(W,{style:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",gap:12},children:[f,g]})]})}/* @__PURE__ */
134
+ return U(W,{style:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",gap:12,paddingLeft:8},children:[/* @__PURE__ */U(W,{style:{flexDirection:"row",alignItems:"center",gap:10,flexShrink:1,minWidth:0},children:[r,/* @__PURE__ */U(W,{style:{flexShrink:1,minWidth:0},children:[f,/* @__PURE__ */E(zs,{onBack:t,label:n,children:o})]})]}),g]})}function zs({onBack:e,hideActions:t,label:n,children:i}){const o=la(ml().theme).colors,{width:r}=F(),l=r>=640;return e||null!=n||i?/* @__PURE__ */U(W,{style:{flexDirection:"row",alignItems:"center",gap:6,marginTop:2},children:[e?/* @__PURE__ */E(ks,{onBack:e,label:n,labelStyle:{fontSize:l?14:12},style:{alignSelf:"center"}}):null,!e&&null!=n&&(a=o.textMuted,/* @__PURE__ */E(fi,{style:{fontSize:l?14:12,flexShrink:1,color:a},children:n})),i]}):null;var a}function Ws(e){const t=e.colors;return{text:{color:t.text,fontFamily:Yr(e),fontSize:14},muted:{color:t.textMuted,fontFamily:Yr(e),fontSize:12},row:{flexDirection:"row",alignItems:"center",gap:8},field:{minHeight:44,paddingVertical:8,paddingHorizontal:12,borderRadius:sn(e,8),borderWidth:1,borderColor:t.border,justifyContent:"center",backgroundColor:t.backgroundAlt}}}function Fs({view:e,theme:t,compact:n=!1}){const i=Ws(t),o=t.colors;/* @__PURE__ */
135
+ return U(W,n?{style:{paddingHorizontal:12,paddingBottom:8},children:[/* @__PURE__ */U(fi,{style:i.muted,children:["Total return",e.rows.some(e=>null!=e.added)?" · prizes stack":"",e.heading.includes("estimate")?" · estimate":""]}),/* @__PURE__ */E(k,{horizontal:!0,contentContainerStyle:{flexGrow:1},style:{marginTop:6,borderWidth:1,borderColor:o.border,borderRadius:sn(t,8)},children:e.rows.slice(1).map(t=>/* @__PURE__ */U(W,{style:{flex:1,minWidth:62,padding:7,borderRightWidth:1,borderColor:o.border,alignItems:"center"},children:[/* @__PURE__ */E(fi,{style:i.muted,children:e.rows.some(e=>null!=e.added)?t.correct??t.label.replace(" correct",""):t.label.replace(" or more wrong","+ wrong").replace(" or more misses","+ misses")}),/* @__PURE__ */E(fi,{style:{...i.text,fontWeight:"800",marginTop:3},children:yt(t.amount)})]},t.label))})]}:{children:[e.rows.map(e=>/* @__PURE__ */U(W,{style:{...i.row,justifyContent:"space-between",minHeight:48,borderTopWidth:1,borderColor:o.border},children:[/* @__PURE__ */U(W,{style:{flex:1},children:[/* @__PURE__ */E(fi,{style:i.text,children:e.label.replace(" or more wrong","+ wrong").replace(" or more misses","+ misses")}),null!=e.added&&/* @__PURE__ */U(fi,{style:i.muted,children:["Tier adds ",yt(e.added)]})]}),/* @__PURE__ */E(fi,{style:{...i.text,fontSize:22,fontWeight:"800"},children:yt(e.amount)})]},e.label)),!!e.note&&/* @__PURE__ */E(fi,{style:{...i.muted,marginVertical:10},children:e.note})]})}function As({actions:t}){const n=ml(),i=n.theme.colors,o=Ws(n.theme),[r,l]=e.useState(!1),a=n.answeredCount>0;/* @__PURE__ */
136
136
  return U(W,{style:{backgroundColor:i.background},children:[/* @__PURE__ */U(W,{style:{...o.row,minHeight:52,paddingHorizontal:12,borderBottomWidth:1,borderColor:i.border},children:[
137
- /* @__PURE__ */E(z,{accessibilityRole:"button",accessibilityLabel:"Choose sport",disabled:n.sportOptions.length<2||a,onPress:()=>l(!0),style:{flex:1,minHeight:44,justifyContent:"center"},children:/* @__PURE__ */E(fi,{style:{...o.text,fontWeight:"700"},children:n.selectedSport?n.displaySportName(n.selectedSport):"Choose sport"})}),a&&n.sportOptions.length>1&&/* @__PURE__ */E(vi,{theme:n.theme,variant:"quiet",onPress:()=>Object.entries(n.selections).forEach(([e,t])=>n.toggleSelection(Number(e),t)),children:"Clear to switch"}),t]}),/* @__PURE__ */E(m,{visible:r,transparent:!0,animationType:"slide",onRequestClose:()=>l(!1),children:/* @__PURE__ */E(W,{style:{flex:1,justifyContent:"flex-end",backgroundColor:"#0008"},children:/* @__PURE__ */U(W,{style:{backgroundColor:i.background,padding:16,gap:8},children:[/* @__PURE__ */E(vi,{theme:n.theme,variant:"quiet",onPress:()=>l(!1),children:"Close sports"}),n.sportOptions.map(e=>/* @__PURE__ */E(Ll,{theme:n.theme,selected:e.key===n.selectedSport,onPress:()=>{n.setSelectedSport(e.key),l(!1)},children:n.displaySportName(e.key)},e.key))]})})})]})}function As({onBack:e,title:t,children:n}){const i=yl(),o=i.selectedGame;/* @__PURE__ */
138
- return E(Cs,{title:t??o?.game_name??"",onBack:e,actions:o?/* @__PURE__ */E(da,{variant:"icon",touchSize:44,theme:i.theme,panel:ht(o),content:i.howToPlayMarkdown,title:o.game_name,colors:i.theme.colors}):null,children:n})}function Ps({onBack:e}){const t=yl(),n=zs(t.theme);/* @__PURE__ */
139
- return U(W,{style:{backgroundColor:t.theme.colors.background},children:[/* @__PURE__ */E(As,{onBack:e}),/* @__PURE__ */U(W,{style:{...n.row,padding:10},children:[
137
+ /* @__PURE__ */E(z,{accessibilityRole:"button",accessibilityLabel:"Choose sport",disabled:n.sportOptions.length<2||a,onPress:()=>l(!0),style:{flex:1,minHeight:44,justifyContent:"center"},children:/* @__PURE__ */E(fi,{style:{...o.text,fontWeight:"700"},children:n.selectedSport?n.displaySportName(n.selectedSport):"Choose sport"})}),a&&n.sportOptions.length>1&&/* @__PURE__ */E(vi,{theme:n.theme,variant:"quiet",onPress:()=>Object.entries(n.selections).forEach(([e,t])=>n.toggleSelection(Number(e),t)),children:"Clear to switch"}),t]}),/* @__PURE__ */E(m,{visible:r,transparent:!0,animationType:"slide",onRequestClose:()=>l(!1),children:/* @__PURE__ */E(W,{style:{flex:1,justifyContent:"flex-end",backgroundColor:"#0008"},children:/* @__PURE__ */U(W,{style:{backgroundColor:i.background,padding:16,gap:8},children:[/* @__PURE__ */E(vi,{theme:n.theme,variant:"quiet",onPress:()=>l(!1),children:"Close sports"}),n.sportOptions.map(e=>/* @__PURE__ */E(Rl,{theme:n.theme,selected:e.key===n.selectedSport,onPress:()=>{n.setSelectedSport(e.key),l(!1)},children:n.displaySportName(e.key)},e.key))]})})})]})}function Ps({onBack:e,title:t,children:n}){const i=ml(),o=i.selectedGame;/* @__PURE__ */
138
+ return E(Ss,{title:t??o?.game_name??"",onBack:e,actions:o?/* @__PURE__ */E(ha,{variant:"icon",touchSize:44,theme:i.theme,panel:ht(o),content:i.howToPlayMarkdown,title:o.game_name,colors:i.theme.colors}):null,children:n})}function Ts({onBack:e}){const t=ml(),n=Ws(t.theme);/* @__PURE__ */
139
+ return U(W,{style:{backgroundColor:t.theme.colors.background},children:[/* @__PURE__ */E(Ps,{onBack:e}),/* @__PURE__ */U(W,{style:{...n.row,padding:10},children:[
140
140
  /* @__PURE__ */E(vi,{theme:t.theme,variant:"secondary",onPress:e,disabled:!e,style:{flexGrow:1},children:`${t.selectedPropositionCount??"Choose"} legs · Edit`}),
141
- /* @__PURE__ */E(fi,{style:n.muted,children:"Stake $"}),yr(t.selectedGame)?/* @__PURE__ */E(fi,{style:n.text,children:yt(t.betAmount)}):/* @__PURE__ */E(gi,{accessibilityLabel:"Ticket stake",keyboardType:"decimal-pad",value:t.betAmount,onChangeText:e=>t.setBetAmount(Math.max(0,Number(e)||0)),style:{...n.field,...n.text,width:96}})]})]})}function Ts(e){const t=yl(),n=zs(e.theme),i=e.theme.colors;/* @__PURE__ */
141
+ /* @__PURE__ */E(fi,{style:n.muted,children:"Stake $"}),yr(t.selectedGame)?/* @__PURE__ */E(fi,{style:n.text,children:yt(t.betAmount)}):/* @__PURE__ */E(gi,{accessibilityLabel:"Ticket stake",keyboardType:"decimal-pad",value:t.betAmount,onChangeText:e=>t.setBetAmount(Math.max(0,Number(e)||0)),style:{...n.field,...n.text,width:96}})]})]})}function Ds(e){const t=ml(),n=Ws(e.theme),i=e.theme.colors;/* @__PURE__ */
142
142
  return U(W,{style:{backgroundColor:i.background,maxWidth:620,width:"100%",alignSelf:"center"},children:[
143
- /* @__PURE__ */E(As,{onBack:e.onBack}),
144
- /* @__PURE__ */E(Fs,{}),
145
- /* @__PURE__ */U(W,{style:{padding:16,gap:12,..."matchbook"===t.uiVariant?{borderWidth:1,borderColor:i.border,borderTopLeftRadius:sn(e.theme,18),borderTopRightRadius:sn(e.theme,18),marginTop:12}:{}},children:["matchbook"===t.uiVariant&&/* @__PURE__ */U(fi,{accessibilityRole:"header",style:{...n.text,fontSize:22,fontWeight:"800"},children:["Set up ",e.game.game_name]}),e.modes&&/* @__PURE__ */E(W,{style:n.row,children:e.modes.map(t=>/* @__PURE__ */E(Ll,{theme:e.theme,selected:e.modeId===t.id,sub:t.detail,onPress:()=>e.onMode?.(t.id),style:{flex:1},children:t.label},t.id))}),
143
+ /* @__PURE__ */E(Ps,{onBack:e.onBack}),
144
+ /* @__PURE__ */E(As,{}),
145
+ /* @__PURE__ */U(W,{style:{padding:16,gap:12,..."matchbook"===t.uiVariant?{borderWidth:1,borderColor:i.border,borderTopLeftRadius:sn(e.theme,18),borderTopRightRadius:sn(e.theme,18),marginTop:12}:{}},children:["matchbook"===t.uiVariant&&/* @__PURE__ */U(fi,{accessibilityRole:"header",style:{...n.text,fontSize:22,fontWeight:"800"},children:["Set up ",e.game.game_name]}),e.modes&&/* @__PURE__ */E(W,{style:n.row,children:e.modes.map(t=>/* @__PURE__ */E(Rl,{theme:e.theme,selected:e.modeId===t.id,sub:t.detail,onPress:()=>e.onMode?.(t.id),style:{flex:1},children:t.label},t.id))}),
146
146
  /* @__PURE__ */E(fi,{style:{...n.text,fontWeight:"700"},children:"Legs"}),
147
- /* @__PURE__ */E(W,{style:{...n.row,flexWrap:"wrap"},children:e.legOptions.map(t=>/* @__PURE__ */E(Ll,{theme:e.theme,selected:e.legs===t,onPress:()=>e.onLegs(t),style:{flexGrow:1},children:String(t)},t))}),t.answeredCount>0&&e.legs!==t.selectedPropositionCount&&/* @__PURE__ */U(fi,{accessibilityLiveRegion:"polite",style:n.muted,children:["Changing legs clears your ",t.answeredCount," picks."]}),
148
- /* @__PURE__ */E(fi,{style:{...n.text,fontWeight:"700"},children:"Stake"}),e.stakes?/* @__PURE__ */E(W,{style:n.row,children:e.stakes.map(t=>/* @__PURE__ */E(Ll,{theme:e.theme,selected:e.stake===t,onPress:()=>e.onStake(t),style:{flexGrow:1},children:yt(t)},t))}):/* @__PURE__ */E(gi,{accessibilityLabel:"Stake",keyboardType:"decimal-pad",value:e.stake,onChangeText:t=>e.onStake(Number(t)||0),style:{...n.field,...n.text,fontSize:16}}),
147
+ /* @__PURE__ */E(W,{style:{...n.row,flexWrap:"wrap"},children:e.legOptions.map(t=>/* @__PURE__ */E(Rl,{theme:e.theme,selected:e.legs===t,onPress:()=>e.onLegs(t),style:{flexGrow:1},children:String(t)},t))}),t.answeredCount>0&&e.legs!==t.selectedPropositionCount&&/* @__PURE__ */U(fi,{accessibilityLiveRegion:"polite",style:n.muted,children:["Changing legs clears your ",t.answeredCount," picks."]}),
148
+ /* @__PURE__ */E(fi,{style:{...n.text,fontWeight:"700"},children:"Stake"}),e.stakes?/* @__PURE__ */E(W,{style:n.row,children:e.stakes.map(t=>/* @__PURE__ */E(Rl,{theme:e.theme,selected:e.stake===t,onPress:()=>e.onStake(t),style:{flexGrow:1},children:yt(t)},t))}):/* @__PURE__ */E(gi,{accessibilityLabel:"Stake",keyboardType:"decimal-pad",value:e.stake,onChangeText:t=>e.onStake(Number(t)||0),style:{...n.field,...n.text,fontSize:16}}),
149
149
  /* @__PURE__ */U(fi,{style:{...n.text,fontWeight:"700"},children:["Total return",e.quotedView.rows.some(e=>null!=e.added)?" · prizes stack":"",e.quotedView.heading.includes("estimate")?" · estimate":""]}),
150
- /* @__PURE__ */E(Ws,{view:e.quotedView,theme:e.theme}),!1===e.valid&&/* @__PURE__ */U(fi,{accessibilityRole:"alert",style:n.text,children:["Minimum stake ",yt(e.minStake??1),"."]}),
150
+ /* @__PURE__ */E(Fs,{view:e.quotedView,theme:e.theme}),!1===e.valid&&/* @__PURE__ */U(fi,{accessibilityRole:"alert",style:n.text,children:["Minimum stake ",yt(e.minStake??1),"."]}),
151
151
  /* @__PURE__ */E(vi,{theme:e.theme,size:"lg",block:!0,disabled:!1===e.valid,onPress:e.onPick,children:`Choose ${e.legs} questions`}),
152
- /* @__PURE__ */E(vi,{theme:e.theme,variant:"quiet",block:!0,disabled:!1===e.valid,onPress:e.onQuickPick,children:"QuickPick for me"})]})]})}function Ds(t){const n=yl(),i=zs(n.theme),o=n.theme.colors,[r,l]=e.useState(null),a=t.view?Math.max(...t.view.rows.map(e=>e.amount)):null,s=t.target>0?Math.min(100,t.count/t.target*100):0;/* @__PURE__ */
152
+ /* @__PURE__ */E(vi,{theme:e.theme,variant:"quiet",block:!0,disabled:!1===e.valid,onPress:e.onQuickPick,children:"QuickPick for me"})]})]})}function Hs(t){const n=ml(),i=Ws(n.theme),o=n.theme.colors,[r,l]=e.useState(null),a=t.view?Math.max(...t.view.rows.map(e=>e.amount)):null,s=t.target>0?Math.min(100,t.count/t.target*100):0;/* @__PURE__ */
153
153
  return U(W,{style:{paddingHorizontal:10,paddingBottom:10,gap:8,borderTopWidth:1,borderColor:o.border,backgroundColor:o.background},children:[
154
- /* @__PURE__ */E(W,{accessibilityElementsHidden:!0,importantForAccessibility:"no-hide-descendants",style:{height:3,backgroundColor:o.border,marginHorizontal:-10},children:/* @__PURE__ */E(W,{style:{height:3,width:`${s}%`,backgroundColor:o.primary}})}),r&&/* @__PURE__ */E(k,{style:{maxHeight:240},children:"returns"===r&&t.view?/* @__PURE__ */E(Ws,{view:t.view,theme:n.theme}):Object.entries(n.selections).map(([e,t],r)=>/* @__PURE__ */U(W,{style:{...i.row,borderTopWidth:1,borderColor:o.border,paddingVertical:8},children:[/* @__PURE__ */U(fi,{style:{...i.text,flex:1,fontSize:13},children:[r+1,". ",t.toUpperCase()," ·"," ",n.selectedPropositions.find(t=>t.id===Number(e))?.description??n.selectedPropositions.find(t=>t.id===Number(e))?.proposition]}),/* @__PURE__ */E(vi,{theme:n.theme,variant:"quiet",accessibilityLabel:`Remove pick ${r+1}`,onPress:()=>n.toggleSelection(Number(e),t),children:"Remove"})]},e))}),
154
+ /* @__PURE__ */E(W,{accessibilityElementsHidden:!0,importantForAccessibility:"no-hide-descendants",style:{height:3,backgroundColor:o.border,marginHorizontal:-10},children:/* @__PURE__ */E(W,{style:{height:3,width:`${s}%`,backgroundColor:o.primary}})}),r&&/* @__PURE__ */E(k,{style:{maxHeight:240},children:"returns"===r&&t.view?/* @__PURE__ */E(Fs,{view:t.view,theme:n.theme}):Object.entries(n.selections).map(([e,t],r)=>/* @__PURE__ */U(W,{style:{...i.row,borderTopWidth:1,borderColor:o.border,paddingVertical:8},children:[/* @__PURE__ */U(fi,{style:{...i.text,flex:1,fontSize:13},children:[r+1,". ",t.toUpperCase()," ·"," ",n.selectedPropositions.find(t=>t.id===Number(e))?.description??n.selectedPropositions.find(t=>t.id===Number(e))?.proposition]}),/* @__PURE__ */E(vi,{theme:n.theme,variant:"quiet",accessibilityLabel:`Remove pick ${r+1}`,onPress:()=>n.toggleSelection(Number(e),t),children:"Remove"})]},e))}),
155
155
  /* @__PURE__ */U(W,{style:i.row,children:[
156
156
  /* @__PURE__ */E(vi,{theme:n.theme,variant:"quiet",accessibilityState:{expanded:"picks"===r},onPress:()=>l("picks"===r?null:"picks"),children:`${t.count} / ${t.target} picked`}),t.view&&null!=a?/* @__PURE__ */E(vi,{theme:n.theme,variant:"quiet",accessibilityLabel:`Returns, top ${yt(a)}`,accessibilityState:{expanded:"returns"===r},onPress:()=>l("returns"===r?null:"returns"),children:`Top ${yt(a)}`}):/* @__PURE__ */E(fi,{style:i.muted,children:t.payoutText}),
157
- /* @__PURE__ */E(vi,{theme:n.theme,size:"lg",disabled:t.disabled,onPress:t.onNext,style:{flexGrow:1},children:t.disabled&&t.count<t.minimum?`Choose ${t.minimum-t.count} more`:t.label})]})]})}function Hs({theme:e,accessibilityLabel:t,selected:n,onPress:i,width:o,padding:r,cellStyle:l,children:a}){const{hovered:s,pressed:c,handlers:d}=wi();/* @__PURE__ */
158
- return E(z,{...d,activeOpacity:1,accessibilityRole:"button",accessibilityLabel:t,accessibilityState:{selected:n},onPress:i,style:[{width:o,padding:r},xi(c)],children:/* @__PURE__ */E(W,{style:[l,s&&{borderColor:e.colors.primary}],children:a})})}function Ms(t){const n=Zn(),i=e.useContext(gl),o=t.theme.colors,r=zs(t.theme),[l,a]=e.useState(""),[s,c]=e.useState(!1),[d,h]=e.useState(null),[u,f]=e.useState(null),[g,p]=e.useState(null),[y,m]=e.useState(390),b=t.games.find(e=>e.id===d)??("game-deck"===n?t.games.find(e=>"ladder"===ar(e))??t.games[0]:void 0),w=b?La(b,t.maxPayouts?.[b.id]):null,x=b&&w?null!=u&&w.legOptions.includes(u)?u:Ia(b,w.legOptions):0,v=b?Bo(b):null,k=b&&v?ja(b,x,v.defaultStake,x):null,B=ws(i?.previewCallPayouts,b??null,x,v?.defaultStake??0,x,null,k),C=t.games.filter(e=>(null==g||e.tier===g)&&[e.game_name,e.description,e.call_to_action,e.rule].some(e=>e?.toLowerCase().includes(l.trim().toLowerCase()))),z=[...new Set(t.games.map(e=>e.tier).filter(e=>null!=e))].sort(),F=i?i.gameCategory?[i.gameCategory]:["sports","racing"]:[],A="matchbook"===n?y>=700?4:2:"game-deck"===n?y<350?3:4:y>=700?6:3;/* @__PURE__ */
159
- return E(W,{accessibilityLabel:"Game catalogue",onLayout:e=>m(e.nativeEvent.layout.width),style:{backgroundColor:o.background},children:/* @__PURE__ */U(oa,{children:[
160
- /* @__PURE__ */U(W,{style:{...r.row,justifyContent:"space-between",paddingHorizontal:16,minHeight:54},children:[/* @__PURE__ */U(fi,{accessibilityLabel:"YESNO",style:{...r.text,fontWeight:"900",fontSize:27,letterSpacing:-1},children:["YES",/* @__PURE__ */E(fi,{style:{color:o.primary},children:"NO"})]}),/* @__PURE__ */E(vi,{theme:t.theme,variant:"quiet",accessibilityState:{expanded:s},onPress:()=>c(!s),children:"Search"})]}),F.length>1&&/* @__PURE__ */E(W,{style:{...r.row,paddingHorizontal:12,paddingVertical:6},children:F.map(e=>/* @__PURE__ */E(Ll,{theme:t.theme,selected:i?.selectedCategory===e,onPress:()=>{i?.setSelectedCategory(e),h(null),f(null),a("")},style:{flexGrow:1},children:i?.displayCategoryName(e)??e},e))}),s&&/* @__PURE__ */E(S,{accessibilityLabel:"Search games",autoFocus:!0,placeholder:"Search games or how they work",placeholderTextColor:o.textMuted,value:l,onChangeText:a,style:{...r.field,...r.text,margin:12,fontSize:16}}),t.showTier&&z.length>1&&/* @__PURE__ */E(W,{style:{...r.row,flexWrap:"wrap",padding:12},children:[null,...z].map(e=>/* @__PURE__ */E(Ll,{theme:t.theme,selected:g===e,onPress:()=>p(e),style:{flexGrow:1},children:null==e?"All tiers":`Tier ${e}`},e??"all"))}),
157
+ /* @__PURE__ */E(vi,{theme:n.theme,size:"lg",disabled:t.disabled,onPress:t.onNext,style:{flexGrow:1},children:t.disabled&&t.count<t.minimum?`Choose ${t.minimum-t.count} more`:t.label})]})]})}function Ms({theme:e,accessibilityLabel:t,selected:n,onPress:i,width:o,padding:r,cellStyle:l,children:a}){const{hovered:s,pressed:c,handlers:d}=wi();/* @__PURE__ */
158
+ return E(z,{...d,activeOpacity:1,accessibilityRole:"button",accessibilityLabel:t,accessibilityState:{selected:n},onPress:i,style:[{width:o,padding:r},xi(c)],children:/* @__PURE__ */E(W,{style:[l,s&&{borderColor:e.colors.primary}],children:a})})}function Ls(t){const n=Zn(),i=e.useContext(pl),o=t.theme.colors,r=Ws(t.theme),[l,a]=e.useState(""),[s,c]=e.useState(!1),[d,h]=e.useState(null),[u,f]=e.useState(null),[g,p]=e.useState(null),[y,m]=e.useState(390),b=t.games.find(e=>e.id===d)??("game-deck"===n?t.games.find(e=>"ladder"===ar(e))??t.games[0]:void 0),w=b?Ra(b,t.maxPayouts?.[b.id]):null,x=b&&w?null!=u&&w.legOptions.includes(u)?u:Oa(b,w.legOptions):0,v=b?Bo(b):null,k=b&&v?Ea(b,x,v.defaultStake,x):null,B=xs(i?.previewCallPayouts,b??null,x,v?.defaultStake??0,x,null,k),C=t.games.filter(e=>(null==g||e.tier===g)&&[e.game_name,e.description,e.call_to_action,e.rule].some(e=>e?.toLowerCase().includes(l.trim().toLowerCase()))),z=[...new Set(t.games.map(e=>e.tier).filter(e=>null!=e))].sort(),F=i?i.gameCategory?[i.gameCategory]:["sports","racing"]:[],A="matchbook"===n?y>=700?4:2:"game-deck"===n?y<350?3:4:y>=700?6:3;/* @__PURE__ */
159
+ return E(W,{accessibilityLabel:"Game catalogue",onLayout:e=>m(e.nativeEvent.layout.width),style:{backgroundColor:o.background},children:/* @__PURE__ */U(ra,{children:[
160
+ /* @__PURE__ */U(W,{style:{...r.row,justifyContent:"space-between",paddingHorizontal:16,minHeight:54},children:[/* @__PURE__ */U(fi,{accessibilityLabel:"YESNO",style:{...r.text,fontWeight:"900",fontSize:27,letterSpacing:-1},children:["YES",/* @__PURE__ */E(fi,{style:{color:o.primary},children:"NO"})]}),/* @__PURE__ */E(vi,{theme:t.theme,variant:"quiet",accessibilityState:{expanded:s},onPress:()=>c(!s),children:"Search"})]}),F.length>1&&/* @__PURE__ */E(W,{style:{...r.row,paddingHorizontal:12,paddingVertical:6},children:F.map(e=>/* @__PURE__ */E(Rl,{theme:t.theme,selected:i?.selectedCategory===e,onPress:()=>{i?.setSelectedCategory(e),h(null),f(null),a("")},style:{flexGrow:1},children:i?.displayCategoryName(e)??e},e))}),s&&/* @__PURE__ */E(S,{accessibilityLabel:"Search games",autoFocus:!0,placeholder:"Search games or how they work",placeholderTextColor:o.textMuted,value:l,onChangeText:a,style:{...r.field,...r.text,margin:12,fontSize:16}}),t.showTier&&z.length>1&&/* @__PURE__ */E(W,{style:{...r.row,flexWrap:"wrap",padding:12},children:[null,...z].map(e=>/* @__PURE__ */E(Rl,{theme:t.theme,selected:g===e,onPress:()=>p(e),style:{flexGrow:1},children:null==e?"All tiers":`Tier ${e}`},e??"all"))}),
161
161
  /* @__PURE__ */U(fi,{accessibilityLiveRegion:"polite",style:{...r.muted,padding:12},children:[l?"Search results":"All games"," · ",C.length]}),
162
- /* @__PURE__ */E(W,{style:{flexDirection:"row",flexWrap:"wrap",paddingHorizontal:"game-deck"===n?9:0},children:C.map(e=>{/* @__PURE__ */return U(Hs,{theme:t.theme,accessibilityLabel:`${"game-deck"===n||e.quick_pick_only?"Explore":"Choose"} ${e.game_name}`,selected:b?.id===e.id,onPress:()=>(e=>{h(e.id),f(null),"game-deck"!==n&&!e.quick_pick_only&&Nt(e)&&t.onPlay(e,Ia(e,La(e,t.maxPayouts?.[e.id]).legOptions))})(e),width:100/A+"%",padding:"game-deck"===n?3:0,cellStyle:{minHeight:"matchbook"===n?79:"game-deck"===n?100:112,flexDirection:"matchbook"===n?"row":"column",alignItems:"center",justifyContent:"matchbook"===n?"flex-start":"center",gap:9,paddingHorizontal:6,paddingVertical:10,borderWidth:"game-deck"===n?1:0,borderBottomWidth:1,borderRightWidth:1,borderColor:b?.id===e.id?o.primary:o.border,borderRadius:"game-deck"===n?8:0,backgroundColor:"game-deck"===n||b?.id===e.id?o.backgroundAlt:o.background},children:[/* @__PURE__ */E(W,{style:{width:"game-deck"===n?28:36,height:"game-deck"===n?28:36,alignItems:"center",justifyContent:"center",backgroundColor:o.backgroundAlt,borderRadius:sn(t.theme,8)},children:/* @__PURE__ */E(ds,{iconUrl:$(e),width:28,height:28,iconColor:o.primary})}),/* @__PURE__ */U(W,{style:{flexShrink:1},children:[
162
+ /* @__PURE__ */E(W,{style:{flexDirection:"row",flexWrap:"wrap",paddingHorizontal:"game-deck"===n?9:0},children:C.map(e=>{/* @__PURE__ */return U(Ms,{theme:t.theme,accessibilityLabel:`${"game-deck"===n||e.quick_pick_only?"Explore":"Choose"} ${e.game_name}`,selected:b?.id===e.id,onPress:()=>(e=>{h(e.id),f(null),"game-deck"!==n&&!e.quick_pick_only&&Nt(e)&&t.onPlay(e,Oa(e,Ra(e,t.maxPayouts?.[e.id]).legOptions))})(e),width:100/A+"%",padding:"game-deck"===n?3:0,cellStyle:{minHeight:"matchbook"===n?79:"game-deck"===n?100:112,flexDirection:"matchbook"===n?"row":"column",alignItems:"center",justifyContent:"matchbook"===n?"flex-start":"center",gap:9,paddingHorizontal:6,paddingVertical:10,borderWidth:"game-deck"===n?1:0,borderBottomWidth:1,borderRightWidth:1,borderColor:b?.id===e.id?o.primary:o.border,borderRadius:"game-deck"===n?8:0,backgroundColor:"game-deck"===n||b?.id===e.id?o.backgroundAlt:o.background},children:[/* @__PURE__ */E(W,{style:{width:"game-deck"===n?28:36,height:"game-deck"===n?28:36,alignItems:"center",justifyContent:"center",backgroundColor:o.backgroundAlt,borderRadius:sn(t.theme,8)},children:/* @__PURE__ */E(hs,{iconUrl:$(e),width:28,height:28,iconColor:o.primary})}),/* @__PURE__ */U(W,{style:{flexShrink:1},children:[
163
163
  /* @__PURE__ */E(fi,{style:{...r.text,fontWeight:"700",textAlign:"matchbook"===n?"left":"center"},children:e.game_name}),"matchbook"===n&&/* @__PURE__ */E(fi,{style:{...r.muted,marginTop:4},children:(i=ar(e),{ladder:"Prizes stack",safety_net:"Choose your cover",mirror:"Either end wins",pick_your_dividend:"Set your return",six_again:"Six questions",game_set:"Build your ticket",quick_pick:"Picks made for you"}[i]??"YES or NO")}),!Nt(e)&&/* @__PURE__ */E(fi,{style:r.muted,children:"Scheduled"})]})]},e.id);var i})}),!C.length&&/* @__PURE__ */U(W,{style:{padding:12,gap:12},children:[/* @__PURE__ */E(fi,{style:r.text,children:"No games match your search."}),/* @__PURE__ */E(vi,{theme:t.theme,variant:"quiet",onPress:()=>{a(""),p(null)},style:{alignSelf:"flex-start"},children:"Clear search"})]}),b&&("game-deck"===n||b.quick_pick_only||!Nt(b))&&/* @__PURE__ */U(W,{style:{padding:12,gap:10,borderTopWidth:1,borderColor:o.border},children:[
164
164
  /* @__PURE__ */U(W,{style:r.row,children:[
165
- /* @__PURE__ */E(ds,{iconUrl:$(b),width:32,height:32,iconColor:o.primary}),
165
+ /* @__PURE__ */E(hs,{iconUrl:$(b),width:32,height:32,iconColor:o.primary}),
166
166
  /* @__PURE__ */E(fi,{accessibilityRole:"header",style:{...r.text,fontSize:20,fontWeight:"800",flex:1},children:b.game_name}),
167
- /* @__PURE__ */E(da,{variant:"icon",touchSize:44,theme:t.theme,panel:ht(b),content:b.description||b.rule,title:b.game_name,colors:o})]}),
168
- /* @__PURE__ */E(fi,{style:r.muted,children:Ra(b)}),b.quick_pick_only&&w&&w.legOptions.length>1&&/* @__PURE__ */E(W,{style:{...r.row,flexWrap:"wrap"},children:w.legOptions.map(e=>/* @__PURE__ */E(Ll,{theme:t.theme,selected:e===x,onPress:()=>f(e),style:{flexGrow:1},children:`${e} picks`},e))}),k&&/* @__PURE__ */U(j,{children:[/* @__PURE__ */U(fi,{style:r.muted,children:["Example · ",x," legs · $",v?.defaultStake," stake"]}),/* @__PURE__ */E(Ws,{view:B.view??k,theme:t.theme,compact:!0})]}),!Nt(b)&&/* @__PURE__ */U(fi,{style:r.muted,children:["Available ",qt(b)||"on scheduled days","."]}),
169
- /* @__PURE__ */E(vi,{theme:t.theme,size:"lg",block:!0,accessibilityLabel:`Choose ${b.game_name}`,disabled:!Nt(b)||!(!b.quick_pick_only||!t.quickPickLoading),onPress:()=>t.onPlay(b,x),children:b.quick_pick_only&&t.quickPickLoading?"Loading…":`Play ${b.game_name}`})]})]})})}function Ls({games:e,theme:t,onPlay:n,maxPayouts:i,quickPickLoading:o,showTier:r}){const{catalogueImages:l={}}=le(),[a,s]=d(""),[c,h]=d(null),[u,f]=d(null),[g,p]=d({}),[m,b]=d(20),w=t.colors,x=Yr(t),v=Nr(t),k=ra(t),B=k.colors,C=a.trim().toLocaleLowerCase(),z=e.filter(e=>(null===c||e.tier===c)&&[e.game_name,e.call_to_action,e.description,e.rule].some(e=>e?.toLocaleLowerCase().includes(C))),F=e.find(e=>e.id===u),A=e.length>0&&e.every(e=>"racing"===e.category?.toLowerCase()),P=[...new Set(e.map(e=>e.tier).filter(e=>null!=e))].sort(),T={color:w.text,fontFamily:x,fontSize:14},D={...T,color:B.text},H={minHeight:44,padding:12,borderRadius:sn(t,10),borderWidth:1,borderColor:w.border,backgroundColor:w.background};if(!F)/* @__PURE__ */return U(W,{style:{gap:14},children:[
167
+ /* @__PURE__ */E(ha,{variant:"icon",touchSize:44,theme:t.theme,panel:ht(b),content:b.description||b.rule,title:b.game_name,colors:o})]}),
168
+ /* @__PURE__ */E(fi,{style:r.muted,children:Ia(b)}),b.quick_pick_only&&w&&w.legOptions.length>1&&/* @__PURE__ */E(W,{style:{...r.row,flexWrap:"wrap"},children:w.legOptions.map(e=>/* @__PURE__ */E(Rl,{theme:t.theme,selected:e===x,onPress:()=>f(e),style:{flexGrow:1},children:`${e} picks`},e))}),k&&/* @__PURE__ */U(j,{children:[/* @__PURE__ */U(fi,{style:r.muted,children:["Example · ",x," legs · $",v?.defaultStake," stake"]}),/* @__PURE__ */E(Fs,{view:B.view??k,theme:t.theme,compact:!0})]}),!Nt(b)&&/* @__PURE__ */U(fi,{style:r.muted,children:["Available ",qt(b)||"on scheduled days","."]}),
169
+ /* @__PURE__ */E(vi,{theme:t.theme,size:"lg",block:!0,accessibilityLabel:`Choose ${b.game_name}`,disabled:!Nt(b)||!(!b.quick_pick_only||!t.quickPickLoading),onPress:()=>t.onPlay(b,x),children:b.quick_pick_only&&t.quickPickLoading?"Loading…":`Play ${b.game_name}`})]})]})})}function Rs({games:e,theme:t,onPlay:n,maxPayouts:i,quickPickLoading:o,showTier:r}){const{catalogueImages:l={}}=le(),[a,s]=d(""),[c,h]=d(null),[u,f]=d(null),[g,p]=d({}),[m,b]=d(20),w=t.colors,x=Yr(t),v=Nr(t),k=la(t),B=k.colors,C=a.trim().toLocaleLowerCase(),z=e.filter(e=>(null===c||e.tier===c)&&[e.game_name,e.call_to_action,e.description,e.rule].some(e=>e?.toLocaleLowerCase().includes(C))),F=e.find(e=>e.id===u),A=e.length>0&&e.every(e=>"racing"===e.category?.toLowerCase()),P=[...new Set(e.map(e=>e.tier).filter(e=>null!=e))].sort(),T={color:w.text,fontFamily:x,fontSize:14},D={...T,color:B.text},H={minHeight:44,padding:12,borderRadius:sn(t,10),borderWidth:1,borderColor:w.border,backgroundColor:w.background};if(!F)/* @__PURE__ */return U(W,{style:{gap:14},children:[
170
170
  /* @__PURE__ */U(W,{style:{height:152,backgroundColor:"#07242c",borderRadius:sn(t,16),overflow:"hidden",padding:20,justifyContent:"space-between"},children:[l[A?"racing":"sports"]&&/* @__PURE__ */E(y,{source:{uri:l[A?"racing":"sports"]},resizeMode:"cover",accessible:!1,style:{position:"absolute",top:0,left:0,width:"100%",height:"100%",opacity:.65}}),
171
171
  /* @__PURE__ */E(fi,{style:{color:"#fff",fontSize:13,letterSpacing:2,fontWeight:"700"},children:A?"RACING":"YOUR GAME. YOUR CALL."}),
172
172
  /* @__PURE__ */U(W,{children:[/* @__PURE__ */E(fi,{style:{color:"#fff",fontFamily:v,fontSize:26,fontWeight:"800"},children:"Find your way to play."}),/* @__PURE__ */U(fi,{style:{color:"#fff",fontSize:14,marginTop:4},children:[e.length," games. One YES or NO."]})]})]}),
173
173
  /* @__PURE__ */E(fi,{style:{...D,fontWeight:"700"},children:"Find your game"}),
174
- /* @__PURE__ */E(S,{accessibilityLabel:"Find your game",value:a,onChangeText:s,placeholder:"Search games or how they work",placeholderTextColor:w.textMuted,style:{...H,...T}}),r&&P.length>1&&/* @__PURE__ */E(W,{style:{flexDirection:"row",flexWrap:"wrap",gap:6},children:[null,...P].map(e=>/* @__PURE__ */E(Ll,{theme:k,selected:c===e,onPress:()=>h(e),children:null===e?"All games":`Tier ${e}`},e??"all"))}),
174
+ /* @__PURE__ */E(S,{accessibilityLabel:"Find your game",value:a,onChangeText:s,placeholder:"Search games or how they work",placeholderTextColor:w.textMuted,style:{...H,...T}}),r&&P.length>1&&/* @__PURE__ */E(W,{style:{flexDirection:"row",flexWrap:"wrap",gap:6},children:[null,...P].map(e=>/* @__PURE__ */E(Rl,{theme:k,selected:c===e,onPress:()=>h(e),children:null===e?"All games":`Tier ${e}`},e??"all"))}),
175
175
  /* @__PURE__ */U(fi,{accessibilityLiveRegion:"polite",style:{...T,color:B.textMuted,fontSize:13},children:[z.length," games to explore"]}),
176
176
  /* @__PURE__ */E(W,{style:{flexDirection:"row",flexWrap:"wrap",gap:8},children:z.map(e=>/* @__PURE__ */U(Bi,{theme:t,accessibilityLabel:`Explore ${e.game_name}`,onPress:()=>{f(e.id),b(Math.min(e.max_bet??1/0,Math.max(20,e.min_bet??1)))},style:{...H,width:"31.3%",flexGrow:0,minHeight:104,alignItems:"center",gap:9,paddingHorizontal:5},children:[
177
- /* @__PURE__ */E(ds,{iconUrl:$(e),width:42,height:42,iconColor:w.primary}),
178
- /* @__PURE__ */E(fi,{style:{...T,fontWeight:"700",textAlign:"center"},children:e.game_name}),!Nt(e)&&/* @__PURE__ */E(fi,{style:{...T,fontSize:11,color:w.textMuted},children:"Scheduled"})]},e.id))}),0===z.length&&/* @__PURE__ */U(W,{style:{gap:12},children:[/* @__PURE__ */E(fi,{style:D,children:"No games match your search."}),/* @__PURE__ */E(vi,{theme:k,variant:"quiet",style:{alignSelf:"flex-start"},onPress:()=>{s(""),h(null)},children:"Clear search"})]})]});const M=La(F,i?.[F.id]),L=g[F.id]??Ia(F,M.legOptions),R=Ea(F,m,i?.[F.id]),I=Nt(F),O=!(!F.quick_pick_only||!o);/* @__PURE__ */
177
+ /* @__PURE__ */E(hs,{iconUrl:$(e),width:42,height:42,iconColor:w.primary}),
178
+ /* @__PURE__ */E(fi,{style:{...T,fontWeight:"700",textAlign:"center"},children:e.game_name}),!Nt(e)&&/* @__PURE__ */E(fi,{style:{...T,fontSize:11,color:w.textMuted},children:"Scheduled"})]},e.id))}),0===z.length&&/* @__PURE__ */U(W,{style:{gap:12},children:[/* @__PURE__ */E(fi,{style:D,children:"No games match your search."}),/* @__PURE__ */E(vi,{theme:k,variant:"quiet",style:{alignSelf:"flex-start"},onPress:()=>{s(""),h(null)},children:"Clear search"})]})]});const M=Ra(F,i?.[F.id]),L=g[F.id]??Oa(F,M.legOptions),R=Ua(F,m,i?.[F.id]),I=Nt(F),O=!(!F.quick_pick_only||!o);/* @__PURE__ */
179
179
  return U(W,{style:{gap:18},children:[
180
180
  /* @__PURE__ */E(vi,{theme:k,variant:"secondary",onPress:()=>f(null),style:{alignSelf:"flex-start"},children:"All games"}),
181
- /* @__PURE__ */U(W,{style:{flexDirection:"row",gap:14,alignItems:"center"},children:[/* @__PURE__ */E(ds,{iconUrl:$(F),width:52,height:52,iconColor:B.primary}),/* @__PURE__ */U(W,{style:{flex:1},children:[/* @__PURE__ */E(fi,{accessibilityRole:"header",style:{...D,fontFamily:v,fontSize:25,fontWeight:"800"},children:F.game_name}),/* @__PURE__ */E(fi,{style:{...T,marginTop:7,color:B.primary},children:Ra(F)})]})]}),
181
+ /* @__PURE__ */U(W,{style:{flexDirection:"row",gap:14,alignItems:"center"},children:[/* @__PURE__ */E(hs,{iconUrl:$(F),width:52,height:52,iconColor:B.primary}),/* @__PURE__ */U(W,{style:{flex:1},children:[/* @__PURE__ */E(fi,{accessibilityRole:"header",style:{...D,fontFamily:v,fontSize:25,fontWeight:"800"},children:F.game_name}),/* @__PURE__ */E(fi,{style:{...T,marginTop:7,color:B.primary},children:Ia(F)})]})]}),
182
182
  /* @__PURE__ */E(fi,{style:{...T,color:B.textMuted,lineHeight:22},children:F.description||F.call_to_action}),R&&/* @__PURE__ */U(W,{style:{borderTopWidth:1,borderColor:B.border,paddingTop:16,gap:12},children:[
183
183
  /* @__PURE__ */E(fi,{accessibilityRole:"header",style:{...D,fontSize:18,fontWeight:"800"},children:"Know your payout"}),
184
184
  /* @__PURE__ */U(W,{style:{flexDirection:"row",alignItems:"center",justifyContent:"space-between"},children:[/* @__PURE__ */E(fi,{style:D,children:"Example stake"}),/* @__PURE__ */E(gi,{accessibilityLabel:"Example stake",keyboardType:"decimal-pad",value:m,onChangeText:e=>b(Math.min(M.maxBet??1/0,Math.max(0,Number(e)||0))),style:{...H,...T,width:100}})]}),
185
185
  /* @__PURE__ */U(W,{style:{flexDirection:"row",justifyContent:"space-between"},children:[/* @__PURE__ */E(fi,{style:D,children:"Legs"}),/* @__PURE__ */E(fi,{style:D,children:"Potential payout"})]}),R.rows.map(e=>/* @__PURE__ */U(W,{style:{flexDirection:"row",justifyContent:"space-between",borderTopWidth:1,borderColor:B.border,paddingTop:10},children:[/* @__PURE__ */E(fi,{style:D,children:e.label}),/* @__PURE__ */E(fi,{style:{...D,fontWeight:"800"},children:yt(e.amount)})]},e.label)),
186
186
  /* @__PURE__ */U(fi,{style:{...T,fontSize:12,color:B.textMuted},children:[R.note," This example does not set your ticket stake."]})]}),
187
- /* @__PURE__ */E(da,{theme:t,panel:ht(F),content:F.description||F.rule,title:F.game_name,label:"Rules & payouts",colors:w,bodyFont:x,headingFont:v,extra:/* @__PURE__ */E(hs,{tiers:M.hasGenericDividends?M.tiers:[],modes:M.modes,pydDividends:M.pydDividends,minBet:M.minBet,maxBet:M.maxBet,colors:w,bodyFont:x,headingFont:v,theme:t})}),F.quick_pick_only&&M.legOptions.length>1&&/* @__PURE__ */E(W,{style:{flexDirection:"row",flexWrap:"wrap",gap:8},children:M.legOptions.map(e=>/* @__PURE__ */E(Ll,{theme:k,selected:L===e,accessibilityLabel:`${e} picks for ${F.game_name}`,disabled:O||!I,onPress:()=>p(t=>({...t,[F.id]:e})),children:`${e} picks`},e))}),!I&&/* @__PURE__ */U(fi,{style:D,children:["Available ",qt(F)||"on scheduled days"]}),
188
- /* @__PURE__ */E(vi,{theme:k,size:"lg",block:!0,accessibilityLabel:`Choose ${F.game_name}`,disabled:O||!I,onPress:()=>n(F,L),children:O?"Loading…":I?`Play ${F.game_name}`:"Unavailable"})]})}function Rs(e){return e.selectionCard??e.backgroundAlt}function Is({color:e,style:t}){/* @__PURE__ */
189
- return E(W,{style:[{backgroundColor:e,opacity:.35,borderRadius:6},t]})}function Os({colors:t,count:n=2,theme:i}){const{width:o}=F(),r=o>=400,l=o>=640,[a,s]=e.useState(0),c=r?a>0?(a-12)/2:"48%":"100%",d=Rs(t);/* @__PURE__ */
190
- return E(W,{onLayout:e=>s(e.nativeEvent.layout.width),style:{flexDirection:"row",flexWrap:"wrap",gap:12,width:"100%"},children:Array.from({length:n}).map((e,n)=>/* @__PURE__ */U(W,{style:{width:c,minHeight:l?140:112,borderRadius:sn(i,16),borderWidth:1,padding:l?20:14,gap:l?12:8,justifyContent:"center",alignItems:"flex-start",backgroundColor:d,borderColor:t.border},children:[/* @__PURE__ */E(Is,{color:t.textMuted,style:{height:20,width:176,maxWidth:"100%"}}),/* @__PURE__ */E(Is,{color:t.textMuted,style:{height:12,width:96,maxWidth:"70%"}})]},n))})}function js({colors:e,count:t=4,theme:n}){const{width:i}=F(),o=i>=640,r=Rs(e);/* @__PURE__ */
191
- return E(W,{style:{flexDirection:"row",flexWrap:"wrap",gap:12,width:"100%"},children:Array.from({length:t}).map((t,i)=>/* @__PURE__ */U(W,{style:{flexBasis:"48%",flexGrow:1,minWidth:0,flexDirection:"column",alignItems:"center",gap:8,borderRadius:sn(n,16),borderWidth:1,paddingHorizontal:o?12:8,paddingVertical:o?16:12,backgroundColor:r,borderColor:e.border},children:[/* @__PURE__ */E(Is,{color:e.textMuted,style:{height:o?64:56,width:o?64:56,borderRadius:sn(n,12)}}),/* @__PURE__ */U(W,{style:{minWidth:0,alignItems:"center",gap:6},children:[/* @__PURE__ */E(Is,{color:e.textMuted,style:{height:14,width:80}}),/* @__PURE__ */E(Is,{color:e.textMuted,style:{height:10,width:48}})]})]},i))})}function Es({colors:e,count:t=3,theme:n}){const i=Rs(e);/* @__PURE__ */
192
- return E(W,{style:{gap:10,width:"100%"},children:Array.from({length:t}).map((t,o)=>/* @__PURE__ */U(W,{style:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",gap:12,borderRadius:sn(n,16),borderWidth:1,paddingHorizontal:14,paddingVertical:14,backgroundColor:i,borderColor:e.border},children:[/* @__PURE__ */U(W,{style:{flex:1,minWidth:0},children:[/* @__PURE__ */E(W,{style:{borderRadius:sn(n,12),paddingHorizontal:12,paddingVertical:10,backgroundColor:e.backgroundAlt},children:/* @__PURE__ */E(Is,{color:e.textMuted,style:{height:16,width:176,maxWidth:"100%"}})}),/* @__PURE__ */E(Is,{color:e.textMuted,style:{height:12,width:160,maxWidth:"80%",marginTop:8}})]}),/* @__PURE__ */E(Is,{color:e.textMuted,style:{height:20,width:20,borderRadius:sn(n,6)}})]},o))})}function Us({colors:e,tileSize:t=116,width:n,theme:i}){/* @__PURE__ */
193
- return U(W,{style:{width:n??"100%",alignItems:"center",borderRadius:sn(i,18),borderWidth:1,paddingHorizontal:14,paddingTop:24,paddingBottom:20,gap:4,borderColor:e.border,backgroundColor:Rs(e)},children:[
194
- /* @__PURE__ */E(Is,{color:e.textMuted,style:{width:t,height:t,borderRadius:sn(i,16)}}),
195
- /* @__PURE__ */E(Is,{color:e.textMuted,style:{height:12,width:44,marginTop:4}}),
196
- /* @__PURE__ */E(Is,{color:e.textMuted,style:{height:17,width:128,maxWidth:"80%",marginTop:2}}),
197
- /* @__PURE__ */E(Is,{color:e.textMuted,style:{height:11,width:"75%",marginTop:10}})]})}function Gs({colors:e,theme:t}){/* @__PURE__ */
198
- return E(W,{style:{flexDirection:"row",gap:8,marginBottom:12,width:"100%"},children:[0,1,2].map(n=>/* @__PURE__ */E(Is,{color:e.textMuted,style:{height:38,flex:1,borderRadius:sn(t,999)}},n))})}function Vs({colors:t,count:n=3,tileSize:i=116,showTierTabs:o=!1,theme:r}){const[l,a]=e.useState(0),s=l>=420?(l-12)/2:"100%";/* @__PURE__ */
199
- return U(W,{style:{width:"100%"},onLayout:e=>a(e.nativeEvent.layout.width),children:[o&&/* @__PURE__ */E(Gs,{colors:t,theme:r}),/* @__PURE__ */E(W,{style:{flexDirection:"row",flexWrap:"wrap",gap:12,width:"100%"},children:Array.from({length:n}).map((e,n)=>/* @__PURE__ */E(Us,{colors:t,tileSize:i,width:s,theme:r},n))})]})}function Ys({colors:e,groups:t=2,rowsPerGroup:n=2,theme:i}){const{width:o}=F(),r=o>=640;/* @__PURE__ */
200
- return U(W,{style:{gap:r?24:16,paddingBottom:64,width:"100%"},children:[/* @__PURE__ */E(Is,{color:e.textMuted,style:{height:28,width:72,borderRadius:sn(i,999)}}),/* @__PURE__ */E(W,{style:{gap:16},children:Array.from({length:t}).map((t,o)=>/* @__PURE__ */U(W,{style:{borderRadius:sn(i,12),borderWidth:1,borderColor:e.border,backgroundColor:Rs(e),overflow:"hidden"},children:[/* @__PURE__ */U(W,{style:{paddingHorizontal:16,paddingVertical:12,gap:6,backgroundColor:e.backgroundAlt},children:[/* @__PURE__ */E(Is,{color:e.textMuted,style:{height:16,width:176,maxWidth:"80%"}}),/* @__PURE__ */E(Is,{color:e.textMuted,style:{height:12,width:96}})]}),Array.from({length:n}).map((t,n)=>/* @__PURE__ */U(W,{style:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",gap:12,paddingHorizontal:16,paddingVertical:r?14:12,borderTopWidth:1,borderTopColor:e.border},children:[/* @__PURE__ */E(Is,{color:e.textMuted,style:{height:16,flex:1,maxWidth:"58%"}}),/* @__PURE__ */U(W,{style:{flexDirection:"row",gap:6,flexShrink:0},children:[/* @__PURE__ */E(Is,{color:e.textMuted,style:{height:r?32:28,width:r?48:44,borderRadius:sn(i,8)}}),/* @__PURE__ */E(Is,{color:e.textMuted,style:{height:r?32:28,width:r?48:44,borderRadius:sn(i,8)}})]})]},n))]},o))})]})}function Ns({colors:e}){/* @__PURE__ */
201
- return E(W,{style:{flexDirection:"row",borderBottomWidth:1,borderBottomColor:e.border,marginBottom:16,width:"100%"},children:[0,1].map(t=>/* @__PURE__ */U(W,{style:{flexDirection:"row",alignItems:"center",gap:8,paddingHorizontal:16,paddingVertical:10},children:[/* @__PURE__ */E(Is,{color:e.textMuted,style:{height:14,width:68}}),/* @__PURE__ */E(Is,{color:e.textMuted,style:{height:20,width:20,borderRadius:999}})]},t))})}function Xs({colors:e,theme:t}){/* @__PURE__ */
202
- return U(W,{style:{borderRadius:sn(t,8),borderWidth:1,borderColor:e.border,backgroundColor:Rs(e),overflow:"hidden",width:"100%"},children:[/* @__PURE__ */U(W,{style:{width:"100%",paddingHorizontal:16,paddingVertical:12,flexDirection:"row",alignItems:"center",justifyContent:"space-between",gap:12},children:[/* @__PURE__ */U(W,{style:{flex:1,minWidth:0,gap:6},children:[/* @__PURE__ */E(Is,{color:e.textMuted,style:{height:18,width:160,maxWidth:"75%"}}),/* @__PURE__ */E(Is,{color:e.textMuted,style:{height:12,width:128,maxWidth:"65%"}})]}),/* @__PURE__ */U(W,{style:{flexDirection:"row",alignItems:"center",gap:12,flexShrink:0},children:[/* @__PURE__ */E(Is,{color:e.textMuted,style:{height:14,width:40}}),/* @__PURE__ */E(Is,{color:e.textMuted,style:{height:24,width:60,borderRadius:sn(t,999)}})]})]}),/* @__PURE__ */E(W,{style:{borderTopWidth:1,borderTopColor:e.border,width:"100%"},children:[0,1,2].map(n=>/* @__PURE__ */U(W,{style:{paddingHorizontal:16,paddingVertical:10,flexDirection:"row",alignItems:"center",justifyContent:"space-between",gap:12,borderTopWidth:0===n?0:1,borderTopColor:e.border},children:[/* @__PURE__ */U(W,{style:{flex:1,minWidth:0,gap:4},children:[/* @__PURE__ */E(Is,{color:e.textMuted,style:{height:14,width:"88%"}}),/* @__PURE__ */E(Is,{color:e.textMuted,style:{height:12,width:"70%"}})]}),/* @__PURE__ */E(Is,{color:e.textMuted,style:{height:20,width:40,borderRadius:sn(t,4)}})]},n))})]})}function qs({colors:e,rows:t=2,theme:n}){/* @__PURE__ */
203
- return U(W,{style:{width:"100%"},children:[/* @__PURE__ */E(Ns,{colors:e}),/* @__PURE__ */E(W,{style:{gap:12,width:"100%"},children:Array.from({length:t}).map((t,i)=>/* @__PURE__ */E(Xs,{colors:e,theme:n},i))})]})}function Ks({colors:e,bodyFont:t,message:n,variant:i="category",gameCardCount:o=3,categoryCount:r=2,showTierTabs:l=!1,theme:a}){const s=n?.trim()||"Loading",c=(()=>{switch(i){case"sport":/* @__PURE__ */return E(js,{colors:e,count:Math.max(r,2),theme:a});case"event":/* @__PURE__ */return E(Es,{colors:e,theme:a});case"games":/* @__PURE__ */return E(Vs,{colors:e,count:o,showTierTabs:l,theme:a});case"propositions":/* @__PURE__ */return E(Ys,{colors:e,theme:a});case"entries":/* @__PURE__ */return E(qs,{colors:e,rows:2,theme:a});default:/* @__PURE__ */return E(Os,{colors:e,count:r,theme:a})}})();/* @__PURE__ */
204
- return U(W,{accessibilityRole:"progressbar",accessibilityLabel:s,accessibilityLiveRegion:"polite",style:{width:"100%"},children:[n?.trim()?/* @__PURE__ */E(fi,{style:{fontSize:14,textAlign:"center",marginBottom:16,color:e.textMuted,fontFamily:t},children:n}):null,c]})}var Qs=e=>Array.from({length:e},(e,t)=>t),Js=e=>t=>e(t.nativeEvent.layout.width);function Zs({theme:e,count:t}){const n=e.colors,[i,o]=d(0),r=i>=700,l=i||358,a=r?14:12,s=r?Math.max(2,Math.floor((l+a)/(180+a))):2,c=Math.max(100,(l-a*(s-1))/s);/* @__PURE__ */
205
- return U(W,{testID:"skeleton-games-shelf","aria-hidden":!0,onLayout:Js(o),style:{gap:12},children:[/* @__PURE__ */E(W,{style:{flexDirection:"row",gap:6,maxWidth:r?460:void 0},children:Qs(4).map(t=>/* @__PURE__ */U(W,{style:{flex:1,height:52,borderRadius:sn(e,12),borderWidth:1,borderColor:n.border,backgroundColor:kn(e),alignItems:"center",justifyContent:"center",gap:5},children:[/* @__PURE__ */E(Is,{color:n.text,style:{width:26,height:10}}),/* @__PURE__ */E(Is,{color:n.textMuted,style:{width:40,maxWidth:"80%",height:8}})]},t))}),/* @__PURE__ */E(W,{style:{flexDirection:"row",flexWrap:"wrap",gap:a},children:Qs(t).map(t=>/* @__PURE__ */E(W,{style:{width:c,gap:6},children:/* @__PURE__ */E(Is,{color:n.textMuted,style:{width:"100%",aspectRatio:1.06,borderRadius:sn(e,12)}})},t))})]})}function $s({theme:e,count:t}){const n=e.colors,i=n.textMuted,o=hn(e),[r,l]=d(0),a=r>=720?4:2,s=r>0?(r-12*(a-1))/a:"48%";/* @__PURE__ */
206
- return U(W,{testID:"skeleton-games-playbook","aria-hidden":!0,onLayout:Js(l),style:{gap:12},children:[
207
- /* @__PURE__ */U(W,{style:{flexDirection:"row",alignItems:"center",gap:16,padding:16,borderRadius:sn(e,24),borderWidth:1,borderColor:n.border,backgroundColor:n.background,minHeight:148,shadowColor:o,shadowOpacity:.14,shadowRadius:14,shadowOffset:{width:0,height:8},elevation:3},children:[/* @__PURE__ */E(Is,{color:i,style:{width:112,height:112,borderRadius:sn(e,24)}}),/* @__PURE__ */U(W,{style:{flex:1,minWidth:0,gap:4},children:[
208
- /* @__PURE__ */E(Is,{color:i,style:{width:"70%",height:r>=480?26:22,marginVertical:3}}),
209
- /* @__PURE__ */E(Is,{color:i,style:{width:"85%",height:12,marginVertical:3}}),
210
- /* @__PURE__ */E(Is,{color:i,style:{width:"60%",height:18,marginTop:4,marginBottom:2}})]})]}),
211
- /* @__PURE__ */E(W,{style:{flexDirection:"row",alignSelf:"flex-start",maxWidth:"100%",overflow:"hidden",gap:2,padding:3,minHeight:36,borderRadius:sn(e,999),backgroundColor:n.backgroundAlt,borderWidth:1,borderColor:n.border},children:[74,120,104,110].map(t=>/* @__PURE__ */E(Is,{color:i,style:{width:t,height:28,borderRadius:sn(e,999)}},t))}),
212
- /* @__PURE__ */U(W,{style:{flexDirection:"row",alignItems:"center",gap:8,height:18},children:[/* @__PURE__ */E(Is,{color:i,style:{width:110,height:10}}),/* @__PURE__ */E(W,{style:{flex:1,borderTopWidth:1,borderTopColor:tn(n.primary,.08)}})]}),
213
- /* @__PURE__ */E(W,{style:{flexDirection:"row",flexWrap:"wrap",gap:12},children:Qs(t).map(t=>/* @__PURE__ */U(W,{style:{width:s,minHeight:172,padding:12,gap:8,borderRadius:sn(e,16),borderWidth:1,borderColor:n.border,backgroundColor:n.background,shadowColor:o,shadowOpacity:.08,shadowRadius:8,shadowOffset:{width:0,height:4},elevation:1},children:[
214
- /* @__PURE__ */U(W,{style:{flexDirection:"row",alignItems:"flex-start",justifyContent:"space-between",gap:8},children:[/* @__PURE__ */E(Is,{color:i,style:{width:48,height:48,borderRadius:sn(e,10)}}),/* @__PURE__ */E(Is,{color:i,style:{width:58,height:18,borderRadius:sn(e,999)}})]}),
215
- /* @__PURE__ */E(Is,{color:i,style:{width:"75%",height:16,marginVertical:3}}),
216
- /* @__PURE__ */U(W,{children:[/* @__PURE__ */E(Is,{color:i,style:{width:"100%",height:11,marginVertical:3.5}}),/* @__PURE__ */E(Is,{color:i,style:{width:"70%",height:11,marginVertical:3.5}})]}),
217
- /* @__PURE__ */E(Is,{color:i,style:{width:"65%",height:11,marginTop:"auto",marginBottom:3.5}})]},t))})]})}function _s({theme:e,count:t}){const n=e.colors,i=n.textMuted,o={minHeight:44,borderRadius:sn(e,10),borderWidth:1,borderColor:n.border,backgroundColor:n.background};/* @__PURE__ */
187
+ /* @__PURE__ */E(ha,{theme:t,panel:ht(F),content:F.description||F.rule,title:F.game_name,label:"Rules & payouts",colors:w,bodyFont:x,headingFont:v,extra:/* @__PURE__ */E(us,{tiers:M.hasGenericDividends?M.tiers:[],modes:M.modes,pydDividends:M.pydDividends,minBet:M.minBet,maxBet:M.maxBet,colors:w,bodyFont:x,headingFont:v,theme:t})}),F.quick_pick_only&&M.legOptions.length>1&&/* @__PURE__ */E(W,{style:{flexDirection:"row",flexWrap:"wrap",gap:8},children:M.legOptions.map(e=>/* @__PURE__ */E(Rl,{theme:k,selected:L===e,accessibilityLabel:`${e} picks for ${F.game_name}`,disabled:O||!I,onPress:()=>p(t=>({...t,[F.id]:e})),children:`${e} picks`},e))}),!I&&/* @__PURE__ */U(fi,{style:D,children:["Available ",qt(F)||"on scheduled days"]}),
188
+ /* @__PURE__ */E(vi,{theme:k,size:"lg",block:!0,accessibilityLabel:`Choose ${F.game_name}`,disabled:O||!I,onPress:()=>n(F,L),children:O?"Loading…":I?`Play ${F.game_name}`:"Unavailable"})]})}function Is(e){return e.selectionCard??e.backgroundAlt}function Os({color:e,style:t}){/* @__PURE__ */
189
+ return E(W,{style:[{backgroundColor:e,opacity:.35,borderRadius:6},t]})}function js({colors:t,count:n=2,theme:i}){const{width:o}=F(),r=o>=400,l=o>=640,[a,s]=e.useState(0),c=r?a>0?(a-12)/2:"48%":"100%",d=Is(t);/* @__PURE__ */
190
+ return E(W,{onLayout:e=>s(e.nativeEvent.layout.width),style:{flexDirection:"row",flexWrap:"wrap",gap:12,width:"100%"},children:Array.from({length:n}).map((e,n)=>/* @__PURE__ */U(W,{style:{width:c,minHeight:l?140:112,borderRadius:sn(i,16),borderWidth:1,padding:l?20:14,gap:l?12:8,justifyContent:"center",alignItems:"flex-start",backgroundColor:d,borderColor:t.border},children:[/* @__PURE__ */E(Os,{color:t.textMuted,style:{height:20,width:176,maxWidth:"100%"}}),/* @__PURE__ */E(Os,{color:t.textMuted,style:{height:12,width:96,maxWidth:"70%"}})]},n))})}function Es({colors:e,count:t=4,theme:n}){const{width:i}=F(),o=i>=640,r=Is(e);/* @__PURE__ */
191
+ return E(W,{style:{flexDirection:"row",flexWrap:"wrap",gap:12,width:"100%"},children:Array.from({length:t}).map((t,i)=>/* @__PURE__ */U(W,{style:{flexBasis:"48%",flexGrow:1,minWidth:0,flexDirection:"column",alignItems:"center",gap:8,borderRadius:sn(n,16),borderWidth:1,paddingHorizontal:o?12:8,paddingVertical:o?16:12,backgroundColor:r,borderColor:e.border},children:[/* @__PURE__ */E(Os,{color:e.textMuted,style:{height:o?64:56,width:o?64:56,borderRadius:sn(n,12)}}),/* @__PURE__ */U(W,{style:{minWidth:0,alignItems:"center",gap:6},children:[/* @__PURE__ */E(Os,{color:e.textMuted,style:{height:14,width:80}}),/* @__PURE__ */E(Os,{color:e.textMuted,style:{height:10,width:48}})]})]},i))})}function Us({colors:e,count:t=3,theme:n}){const i=Is(e);/* @__PURE__ */
192
+ return E(W,{style:{gap:10,width:"100%"},children:Array.from({length:t}).map((t,o)=>/* @__PURE__ */U(W,{style:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",gap:12,borderRadius:sn(n,16),borderWidth:1,paddingHorizontal:14,paddingVertical:14,backgroundColor:i,borderColor:e.border},children:[/* @__PURE__ */U(W,{style:{flex:1,minWidth:0},children:[/* @__PURE__ */E(W,{style:{borderRadius:sn(n,12),paddingHorizontal:12,paddingVertical:10,backgroundColor:e.backgroundAlt},children:/* @__PURE__ */E(Os,{color:e.textMuted,style:{height:16,width:176,maxWidth:"100%"}})}),/* @__PURE__ */E(Os,{color:e.textMuted,style:{height:12,width:160,maxWidth:"80%",marginTop:8}})]}),/* @__PURE__ */E(Os,{color:e.textMuted,style:{height:20,width:20,borderRadius:sn(n,6)}})]},o))})}function Gs({colors:e,tileSize:t=116,width:n,theme:i}){/* @__PURE__ */
193
+ return U(W,{style:{width:n??"100%",alignItems:"center",borderRadius:sn(i,18),borderWidth:1,paddingHorizontal:14,paddingTop:24,paddingBottom:20,gap:4,borderColor:e.border,backgroundColor:Is(e)},children:[
194
+ /* @__PURE__ */E(Os,{color:e.textMuted,style:{width:t,height:t,borderRadius:sn(i,16)}}),
195
+ /* @__PURE__ */E(Os,{color:e.textMuted,style:{height:12,width:44,marginTop:4}}),
196
+ /* @__PURE__ */E(Os,{color:e.textMuted,style:{height:17,width:128,maxWidth:"80%",marginTop:2}}),
197
+ /* @__PURE__ */E(Os,{color:e.textMuted,style:{height:11,width:"75%",marginTop:10}})]})}function Vs({colors:e,theme:t}){/* @__PURE__ */
198
+ return E(W,{style:{flexDirection:"row",gap:8,marginBottom:12,width:"100%"},children:[0,1,2].map(n=>/* @__PURE__ */E(Os,{color:e.textMuted,style:{height:38,flex:1,borderRadius:sn(t,999)}},n))})}function Ys({colors:t,count:n=3,tileSize:i=116,showTierTabs:o=!1,theme:r}){const[l,a]=e.useState(0),s=l>=420?(l-12)/2:"100%";/* @__PURE__ */
199
+ return U(W,{style:{width:"100%"},onLayout:e=>a(e.nativeEvent.layout.width),children:[o&&/* @__PURE__ */E(Vs,{colors:t,theme:r}),/* @__PURE__ */E(W,{style:{flexDirection:"row",flexWrap:"wrap",gap:12,width:"100%"},children:Array.from({length:n}).map((e,n)=>/* @__PURE__ */E(Gs,{colors:t,tileSize:i,width:s,theme:r},n))})]})}function Ns({colors:e,groups:t=2,rowsPerGroup:n=2,theme:i}){const{width:o}=F(),r=o>=640;/* @__PURE__ */
200
+ return U(W,{style:{gap:r?24:16,paddingBottom:64,width:"100%"},children:[/* @__PURE__ */E(Os,{color:e.textMuted,style:{height:28,width:72,borderRadius:sn(i,999)}}),/* @__PURE__ */E(W,{style:{gap:16},children:Array.from({length:t}).map((t,o)=>/* @__PURE__ */U(W,{style:{borderRadius:sn(i,12),borderWidth:1,borderColor:e.border,backgroundColor:Is(e),overflow:"hidden"},children:[/* @__PURE__ */U(W,{style:{paddingHorizontal:16,paddingVertical:12,gap:6,backgroundColor:e.backgroundAlt},children:[/* @__PURE__ */E(Os,{color:e.textMuted,style:{height:16,width:176,maxWidth:"80%"}}),/* @__PURE__ */E(Os,{color:e.textMuted,style:{height:12,width:96}})]}),Array.from({length:n}).map((t,n)=>/* @__PURE__ */U(W,{style:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",gap:12,paddingHorizontal:16,paddingVertical:r?14:12,borderTopWidth:1,borderTopColor:e.border},children:[/* @__PURE__ */E(Os,{color:e.textMuted,style:{height:16,flex:1,maxWidth:"58%"}}),/* @__PURE__ */U(W,{style:{flexDirection:"row",gap:6,flexShrink:0},children:[/* @__PURE__ */E(Os,{color:e.textMuted,style:{height:r?32:28,width:r?48:44,borderRadius:sn(i,8)}}),/* @__PURE__ */E(Os,{color:e.textMuted,style:{height:r?32:28,width:r?48:44,borderRadius:sn(i,8)}})]})]},n))]},o))})]})}function Xs({colors:e}){/* @__PURE__ */
201
+ return E(W,{style:{flexDirection:"row",borderBottomWidth:1,borderBottomColor:e.border,marginBottom:16,width:"100%"},children:[0,1].map(t=>/* @__PURE__ */U(W,{style:{flexDirection:"row",alignItems:"center",gap:8,paddingHorizontal:16,paddingVertical:10},children:[/* @__PURE__ */E(Os,{color:e.textMuted,style:{height:14,width:68}}),/* @__PURE__ */E(Os,{color:e.textMuted,style:{height:20,width:20,borderRadius:999}})]},t))})}function qs({colors:e,theme:t}){/* @__PURE__ */
202
+ return U(W,{style:{borderRadius:sn(t,8),borderWidth:1,borderColor:e.border,backgroundColor:Is(e),overflow:"hidden",width:"100%"},children:[/* @__PURE__ */U(W,{style:{width:"100%",paddingHorizontal:16,paddingVertical:12,flexDirection:"row",alignItems:"center",justifyContent:"space-between",gap:12},children:[/* @__PURE__ */U(W,{style:{flex:1,minWidth:0,gap:6},children:[/* @__PURE__ */E(Os,{color:e.textMuted,style:{height:18,width:160,maxWidth:"75%"}}),/* @__PURE__ */E(Os,{color:e.textMuted,style:{height:12,width:128,maxWidth:"65%"}})]}),/* @__PURE__ */U(W,{style:{flexDirection:"row",alignItems:"center",gap:12,flexShrink:0},children:[/* @__PURE__ */E(Os,{color:e.textMuted,style:{height:14,width:40}}),/* @__PURE__ */E(Os,{color:e.textMuted,style:{height:24,width:60,borderRadius:sn(t,999)}})]})]}),/* @__PURE__ */E(W,{style:{borderTopWidth:1,borderTopColor:e.border,width:"100%"},children:[0,1,2].map(n=>/* @__PURE__ */U(W,{style:{paddingHorizontal:16,paddingVertical:10,flexDirection:"row",alignItems:"center",justifyContent:"space-between",gap:12,borderTopWidth:0===n?0:1,borderTopColor:e.border},children:[/* @__PURE__ */U(W,{style:{flex:1,minWidth:0,gap:4},children:[/* @__PURE__ */E(Os,{color:e.textMuted,style:{height:14,width:"88%"}}),/* @__PURE__ */E(Os,{color:e.textMuted,style:{height:12,width:"70%"}})]}),/* @__PURE__ */E(Os,{color:e.textMuted,style:{height:20,width:40,borderRadius:sn(t,4)}})]},n))})]})}function Ks({colors:e,rows:t=2,theme:n}){/* @__PURE__ */
203
+ return U(W,{style:{width:"100%"},children:[/* @__PURE__ */E(Xs,{colors:e}),/* @__PURE__ */E(W,{style:{gap:12,width:"100%"},children:Array.from({length:t}).map((t,i)=>/* @__PURE__ */E(qs,{colors:e,theme:n},i))})]})}function Qs({colors:e,bodyFont:t,message:n,variant:i="category",gameCardCount:o=3,categoryCount:r=2,showTierTabs:l=!1,theme:a}){const s=n?.trim()||"Loading",c=(()=>{switch(i){case"sport":/* @__PURE__ */return E(Es,{colors:e,count:Math.max(r,2),theme:a});case"event":/* @__PURE__ */return E(Us,{colors:e,theme:a});case"games":/* @__PURE__ */return E(Ys,{colors:e,count:o,showTierTabs:l,theme:a});case"propositions":/* @__PURE__ */return E(Ns,{colors:e,theme:a});case"entries":/* @__PURE__ */return E(Ks,{colors:e,rows:2,theme:a});default:/* @__PURE__ */return E(js,{colors:e,count:r,theme:a})}})();/* @__PURE__ */
204
+ return U(W,{accessibilityRole:"progressbar",accessibilityLabel:s,accessibilityLiveRegion:"polite",style:{width:"100%"},children:[n?.trim()?/* @__PURE__ */E(fi,{style:{fontSize:14,textAlign:"center",marginBottom:16,color:e.textMuted,fontFamily:t},children:n}):null,c]})}var Js=e=>Array.from({length:e},(e,t)=>t),Zs=e=>t=>e(t.nativeEvent.layout.width);function $s({theme:e,count:t}){const n=e.colors,[i,o]=d(0),r=i>=700,l=i||358,a=r?14:12,s=r?Math.max(2,Math.floor((l+a)/(180+a))):2,c=Math.max(100,(l-a*(s-1))/s);/* @__PURE__ */
205
+ return U(W,{testID:"skeleton-games-shelf","aria-hidden":!0,onLayout:Zs(o),style:{gap:12},children:[/* @__PURE__ */E(W,{style:{flexDirection:"row",gap:6,maxWidth:r?460:void 0},children:Js(4).map(t=>/* @__PURE__ */U(W,{style:{flex:1,height:52,borderRadius:sn(e,12),borderWidth:1,borderColor:n.border,backgroundColor:kn(e),alignItems:"center",justifyContent:"center",gap:5},children:[/* @__PURE__ */E(Os,{color:n.text,style:{width:26,height:10}}),/* @__PURE__ */E(Os,{color:n.textMuted,style:{width:40,maxWidth:"80%",height:8}})]},t))}),/* @__PURE__ */E(W,{style:{flexDirection:"row",flexWrap:"wrap",gap:a},children:Js(t).map(t=>/* @__PURE__ */E(W,{style:{width:c,gap:6},children:/* @__PURE__ */E(Os,{color:n.textMuted,style:{width:"100%",aspectRatio:1.06,borderRadius:sn(e,12)}})},t))})]})}function _s({theme:e,count:t}){const n=e.colors,i=n.textMuted,o=hn(e),[r,l]=d(0),a=r>=720?4:2,s=r>0?(r-12*(a-1))/a:"48%";/* @__PURE__ */
206
+ return U(W,{testID:"skeleton-games-playbook","aria-hidden":!0,onLayout:Zs(l),style:{gap:12},children:[
207
+ /* @__PURE__ */U(W,{style:{flexDirection:"row",alignItems:"center",gap:16,padding:16,borderRadius:sn(e,24),borderWidth:1,borderColor:n.border,backgroundColor:n.background,minHeight:148,shadowColor:o,shadowOpacity:.14,shadowRadius:14,shadowOffset:{width:0,height:8},elevation:3},children:[/* @__PURE__ */E(Os,{color:i,style:{width:112,height:112,borderRadius:sn(e,24)}}),/* @__PURE__ */U(W,{style:{flex:1,minWidth:0,gap:4},children:[
208
+ /* @__PURE__ */E(Os,{color:i,style:{width:"70%",height:r>=480?26:22,marginVertical:3}}),
209
+ /* @__PURE__ */E(Os,{color:i,style:{width:"85%",height:12,marginVertical:3}}),
210
+ /* @__PURE__ */E(Os,{color:i,style:{width:"60%",height:18,marginTop:4,marginBottom:2}})]})]}),
211
+ /* @__PURE__ */E(W,{style:{flexDirection:"row",alignSelf:"flex-start",maxWidth:"100%",overflow:"hidden",gap:2,padding:3,minHeight:36,borderRadius:sn(e,999),backgroundColor:n.backgroundAlt,borderWidth:1,borderColor:n.border},children:[74,120,104,110].map(t=>/* @__PURE__ */E(Os,{color:i,style:{width:t,height:28,borderRadius:sn(e,999)}},t))}),
212
+ /* @__PURE__ */U(W,{style:{flexDirection:"row",alignItems:"center",gap:8,height:18},children:[/* @__PURE__ */E(Os,{color:i,style:{width:110,height:10}}),/* @__PURE__ */E(W,{style:{flex:1,borderTopWidth:1,borderTopColor:tn(n.primary,.08)}})]}),
213
+ /* @__PURE__ */E(W,{style:{flexDirection:"row",flexWrap:"wrap",gap:12},children:Js(t).map(t=>/* @__PURE__ */U(W,{style:{width:s,minHeight:172,padding:12,gap:8,borderRadius:sn(e,16),borderWidth:1,borderColor:n.border,backgroundColor:n.background,shadowColor:o,shadowOpacity:.08,shadowRadius:8,shadowOffset:{width:0,height:4},elevation:1},children:[
214
+ /* @__PURE__ */U(W,{style:{flexDirection:"row",alignItems:"flex-start",justifyContent:"space-between",gap:8},children:[/* @__PURE__ */E(Os,{color:i,style:{width:48,height:48,borderRadius:sn(e,10)}}),/* @__PURE__ */E(Os,{color:i,style:{width:58,height:18,borderRadius:sn(e,999)}})]}),
215
+ /* @__PURE__ */E(Os,{color:i,style:{width:"75%",height:16,marginVertical:3}}),
216
+ /* @__PURE__ */U(W,{children:[/* @__PURE__ */E(Os,{color:i,style:{width:"100%",height:11,marginVertical:3.5}}),/* @__PURE__ */E(Os,{color:i,style:{width:"70%",height:11,marginVertical:3.5}})]}),
217
+ /* @__PURE__ */E(Os,{color:i,style:{width:"65%",height:11,marginTop:"auto",marginBottom:3.5}})]},t))})]})}function ec({theme:e,count:t}){const n=e.colors,i=n.textMuted,o={minHeight:44,borderRadius:sn(e,10),borderWidth:1,borderColor:n.border,backgroundColor:n.background};/* @__PURE__ */
218
218
  return U(W,{testID:"skeleton-games-call","aria-hidden":!0,style:{gap:14},children:[
219
- /* @__PURE__ */U(W,{style:{height:152,backgroundColor:"#07242c",borderRadius:sn(e,16),overflow:"hidden",padding:20,justifyContent:"space-between"},children:[/* @__PURE__ */E(Is,{color:"#fff",style:{width:150,height:11,marginVertical:3}}),/* @__PURE__ */U(W,{children:[/* @__PURE__ */E(Is,{color:"#fff",style:{width:230,maxWidth:"80%",height:26,marginVertical:3}}),/* @__PURE__ */E(Is,{color:"#fff",style:{width:150,height:12,marginTop:8,marginBottom:3}})]})]}),
220
- /* @__PURE__ */E(Is,{color:i,style:{width:96,height:12,marginVertical:2}}),
219
+ /* @__PURE__ */U(W,{style:{height:152,backgroundColor:"#07242c",borderRadius:sn(e,16),overflow:"hidden",padding:20,justifyContent:"space-between"},children:[/* @__PURE__ */E(Os,{color:"#fff",style:{width:150,height:11,marginVertical:3}}),/* @__PURE__ */U(W,{children:[/* @__PURE__ */E(Os,{color:"#fff",style:{width:230,maxWidth:"80%",height:26,marginVertical:3}}),/* @__PURE__ */E(Os,{color:"#fff",style:{width:150,height:12,marginTop:8,marginBottom:3}})]})]}),
220
+ /* @__PURE__ */E(Os,{color:i,style:{width:96,height:12,marginVertical:2}}),
221
221
  /* @__PURE__ */E(W,{style:o}),
222
- /* @__PURE__ */E(Is,{color:i,style:{width:110,height:11,marginVertical:2}}),
223
- /* @__PURE__ */E(W,{style:{flexDirection:"row",flexWrap:"wrap",gap:8},children:Qs(t).map(t=>/* @__PURE__ */U(W,{style:{...o,width:"31.3%",minHeight:104,alignItems:"center",gap:9,paddingVertical:12,paddingHorizontal:5},children:[/* @__PURE__ */E(Is,{color:i,style:{width:42,height:42,borderRadius:sn(e,8)}}),/* @__PURE__ */E(Is,{color:i,style:{width:"70%",height:11,marginVertical:3}})]},t))})]})}function ec({theme:e,ui:t,count:n}){const i=e.colors,o=i.textMuted,l=r(gl),[a,s]=d(390),c="matchbook"===t,h="game-deck"===t,u=c?a>=700?4:2:h?a<350?3:4:a>=700?6:3,f={minHeight:44,borderRadius:sn(e,8),borderWidth:1,borderColor:i.border,backgroundColor:i.backgroundAlt,alignItems:"center",justifyContent:"center"};/* @__PURE__ */
224
- return U(W,{testID:"skeleton-games-dense","aria-hidden":!0,onLayout:Js(s),style:{backgroundColor:i.background},children:[
225
- /* @__PURE__ */U(W,{style:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",paddingHorizontal:16,minHeight:54},children:[/* @__PURE__ */E(Is,{color:o,style:{width:104,height:26}}),/* @__PURE__ */E(W,{style:{minHeight:44,justifyContent:"center"},children:/* @__PURE__ */E(Is,{color:o,style:{width:48,height:12}})})]}),l&&!l.gameCategory&&/* @__PURE__ */E(W,{style:{flexDirection:"row",gap:8,paddingHorizontal:12,paddingVertical:6},children:Qs(2).map(e=>/* @__PURE__ */E(W,{style:{...f,flexGrow:1},children:/* @__PURE__ */E(Is,{color:o,style:{width:52,height:12}})},e))}),
226
- /* @__PURE__ */E(W,{style:{padding:12},children:/* @__PURE__ */E(Is,{color:o,style:{width:84,height:10,marginVertical:3}})}),
227
- /* @__PURE__ */E(W,{style:{flexDirection:"row",flexWrap:"wrap",paddingHorizontal:h?9:0},children:Qs(n).map(t=>/* @__PURE__ */E(W,{style:{width:100/u+"%",padding:h?3:0},children:/* @__PURE__ */U(W,{style:{minHeight:c?79:h?100:112,flexDirection:c?"row":"column",alignItems:"center",justifyContent:c?"flex-start":"center",gap:9,paddingHorizontal:6,paddingVertical:10,borderWidth:h?1:0,borderBottomWidth:1,borderRightWidth:1,borderColor:i.border,borderRadius:h?8:0,backgroundColor:h?i.backgroundAlt:i.background},children:[/* @__PURE__ */E(Is,{color:o,style:{width:h?28:36,height:h?28:36,borderRadius:sn(e,8)}}),/* @__PURE__ */U(W,{style:{flexShrink:1,alignItems:c?"flex-start":"center",gap:7},children:[/* @__PURE__ */E(Is,{color:o,style:{width:64,height:12,marginVertical:2}}),c&&/* @__PURE__ */E(Is,{color:o,style:{width:80,height:10}})]})]})},t))}),h&&/* @__PURE__ */U(W,{style:{padding:12,gap:10,borderTopWidth:1,borderColor:i.border},children:[
222
+ /* @__PURE__ */E(Os,{color:i,style:{width:110,height:11,marginVertical:2}}),
223
+ /* @__PURE__ */E(W,{style:{flexDirection:"row",flexWrap:"wrap",gap:8},children:Js(t).map(t=>/* @__PURE__ */U(W,{style:{...o,width:"31.3%",minHeight:104,alignItems:"center",gap:9,paddingVertical:12,paddingHorizontal:5},children:[/* @__PURE__ */E(Os,{color:i,style:{width:42,height:42,borderRadius:sn(e,8)}}),/* @__PURE__ */E(Os,{color:i,style:{width:"70%",height:11,marginVertical:3}})]},t))})]})}function tc({theme:e,ui:t,count:n}){const i=e.colors,o=i.textMuted,l=r(pl),[a,s]=d(390),c="matchbook"===t,h="game-deck"===t,u=c?a>=700?4:2:h?a<350?3:4:a>=700?6:3,f={minHeight:44,borderRadius:sn(e,8),borderWidth:1,borderColor:i.border,backgroundColor:i.backgroundAlt,alignItems:"center",justifyContent:"center"};/* @__PURE__ */
224
+ return U(W,{testID:"skeleton-games-dense","aria-hidden":!0,onLayout:Zs(s),style:{backgroundColor:i.background},children:[
225
+ /* @__PURE__ */U(W,{style:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",paddingHorizontal:16,minHeight:54},children:[/* @__PURE__ */E(Os,{color:o,style:{width:104,height:26}}),/* @__PURE__ */E(W,{style:{minHeight:44,justifyContent:"center"},children:/* @__PURE__ */E(Os,{color:o,style:{width:48,height:12}})})]}),l&&!l.gameCategory&&/* @__PURE__ */E(W,{style:{flexDirection:"row",gap:8,paddingHorizontal:12,paddingVertical:6},children:Js(2).map(e=>/* @__PURE__ */E(W,{style:{...f,flexGrow:1},children:/* @__PURE__ */E(Os,{color:o,style:{width:52,height:12}})},e))}),
226
+ /* @__PURE__ */E(W,{style:{padding:12},children:/* @__PURE__ */E(Os,{color:o,style:{width:84,height:10,marginVertical:3}})}),
227
+ /* @__PURE__ */E(W,{style:{flexDirection:"row",flexWrap:"wrap",paddingHorizontal:h?9:0},children:Js(n).map(t=>/* @__PURE__ */E(W,{style:{width:100/u+"%",padding:h?3:0},children:/* @__PURE__ */U(W,{style:{minHeight:c?79:h?100:112,flexDirection:c?"row":"column",alignItems:"center",justifyContent:c?"flex-start":"center",gap:9,paddingHorizontal:6,paddingVertical:10,borderWidth:h?1:0,borderBottomWidth:1,borderRightWidth:1,borderColor:i.border,borderRadius:h?8:0,backgroundColor:h?i.backgroundAlt:i.background},children:[/* @__PURE__ */E(Os,{color:o,style:{width:h?28:36,height:h?28:36,borderRadius:sn(e,8)}}),/* @__PURE__ */U(W,{style:{flexShrink:1,alignItems:c?"flex-start":"center",gap:7},children:[/* @__PURE__ */E(Os,{color:o,style:{width:64,height:12,marginVertical:2}}),c&&/* @__PURE__ */E(Os,{color:o,style:{width:80,height:10}})]})]})},t))}),h&&/* @__PURE__ */U(W,{style:{padding:12,gap:10,borderTopWidth:1,borderColor:i.border},children:[
228
228
  /* @__PURE__ */U(W,{style:{flexDirection:"row",alignItems:"center",gap:8,minHeight:44},children:[
229
- /* @__PURE__ */E(Is,{color:o,style:{width:32,height:32,borderRadius:sn(e,8)}}),
230
- /* @__PURE__ */E(Is,{color:o,style:{width:140,height:18,marginRight:"auto"}}),
231
- /* @__PURE__ */E(Is,{color:o,style:{width:44,height:44,borderRadius:999}})]}),
232
- /* @__PURE__ */E(Is,{color:o,style:{width:"75%",height:10,marginVertical:3}}),
233
- /* @__PURE__ */E(Is,{color:o,style:{width:150,height:10,marginVertical:3}}),
234
- /* @__PURE__ */U(W,{style:{paddingHorizontal:12,paddingBottom:8},children:[/* @__PURE__ */E(Is,{color:o,style:{width:110,height:10,marginVertical:3}}),/* @__PURE__ */E(W,{style:{height:54,marginTop:6,borderWidth:1,borderColor:i.border,borderRadius:sn(e,8)}})]}),
235
- /* @__PURE__ */E(W,{style:f})]})]})}function tc({layout:e,uiVariant:t,theme:n,colors:i,count:o,showTierTabs:r=!1}){const l=e=>o||e,a=(()=>{switch(e){case"shelf":/* @__PURE__ */return E(Zs,{theme:n,count:l(4)});case"playbook":/* @__PURE__ */return E($s,{theme:n,count:l(4)});case"call":/* @__PURE__ */return E(_s,{theme:n,count:l(6)});case"dense":/* @__PURE__ */return E(ec,{theme:n,ui:t,count:l("game-deck"===t?8:6)});default:/* @__PURE__ */return E(W,{testID:"skeleton-games-kit",children:/* @__PURE__ */E(Vs,{colors:i,count:Math.min(Math.max(o,2),4),showTierTabs:r,theme:n})})}})();/* @__PURE__ */
236
- return E(W,{role:"status","aria-live":"polite","aria-label":"Loading games",style:{width:"100%"},children:a})}function nc({theme:e,colors:t,bodyFont:n,isActive:i,onPress:o,children:r}){const{hovered:l,pressed:a,handlers:s}=wi(),c=i?null:ai(t.primary,{hovered:l,pressed:a});/* @__PURE__ */
237
- return E(z,{...s,onPress:o,accessibilityRole:"button",accessibilityState:{selected:i},activeOpacity:1,style:[{flex:1,minWidth:0,borderRadius:sn(e,999),paddingHorizontal:4,paddingVertical:10,borderWidth:1,borderColor:i?t.primary:c?.borderColor??t.border,backgroundColor:i?t.primary:c?.background??t.background??"#fff",alignItems:"center",justifyContent:"center",shadowColor:i?t.primary:t.border,shadowOffset:{width:0,height:4},shadowOpacity:i?.35:.25,shadowRadius:i?6:5,elevation:i?4:2},xi(a)],children:/* @__PURE__ */E(fi,{numberOfLines:1,style:{fontFamily:n,fontSize:10,fontWeight:"700",letterSpacing:-.1,color:i?t.primaryText:t.primary},children:r})})}function ic({theme:e,active:t,available:n,width:i,onPress:o,children:r}){const{hovered:l,pressed:a,handlers:s}=wi();/* @__PURE__ */
238
- return E(z,{...s,accessibilityRole:"button",accessibilityState:{selected:t,disabled:!n},onPress:o,disabled:!n,activeOpacity:1,style:[{alignItems:"center",gap:4,paddingHorizontal:4,paddingVertical:6,borderRadius:sn(e,16),borderWidth:1,borderColor:t||n&&(l||a)?e.colors.primary:"transparent",opacity:n?1:.5,width:i},xi(a,!n)],children:r})}function oc({tabs:e,active:t,onChange:n,colors:i,bodyFont:o,useShortLabel:r,theme:l}){return e.length<=1?null:/* @__PURE__ */E(W,{style:{flexDirection:"row",gap:8,marginBottom:12},children:e.map(e=>{const a=e.id===t;/* @__PURE__ */
239
- return E(nc,{theme:l,colors:i,bodyFont:o,isActive:a,onPress:()=>n(e.id),children:r?e.shortLabel:e.label},e.id)})})}var rc={scrollSnapType:"x mandatory"},lc={scrollSnapAlign:"center"};function ac({iconUrl:e,gameName:t,size:n,brandColor:i,cardColor:o,iconColor:r,accentColor:s,captionColor:h,bodyFont:u,legOptions:f,onPick:p,colors:y,menuShadow:m,theme:b}){const[x,v]=d(!1),k=c(null),B=c(null),[C,S]=d(null),[z,F]=d(!1),[A,P]=d(null),T="web"===w.OS,D=40+40*f.length+12;a(()=>{if(!x||!T)return;const e=k.current;if(!e||"function"!=typeof e.getBoundingClientRect)return;const t=e.getBoundingClientRect(),n=mi(e),i=n.scrollX||0,o=n.scrollY||0,r=n.innerHeight-t.bottom,l=t.top,a=r<D&&l>r;S({top:t.top+o,bottom:t.bottom+o,right:t.right+i,flipUp:a})},[x,T,D]),l(()=>{if(!x)return;if(T){const e=e=>{const t=k.current,n=e.target;t&&"function"==typeof t.contains&&t.contains(n)||B.current&&B.current.contains(n)||v(!1)},t=yi(k.current);return t.addEventListener("mousedown",e),()=>t.removeEventListener("mousedown",e)}const e=k.current;e&&"function"==typeof e.measureInWindow&&e.measureInWindow((e,t,n,i)=>{const o=g.get("window").height-(t+i);F(o<D&&t>o),P({x:e,y:t,width:n,height:i})})},[x,T,D]);const H=/* @__PURE__ */U(j,{children:[/* @__PURE__ */E(W,{style:{paddingHorizontal:12,paddingVertical:6,borderBottomWidth:1,borderBottomColor:y.border},children:/* @__PURE__ */E(fi,{style:{fontSize:10,fontWeight:"700",color:y.text,opacity:.55,letterSpacing:.5,textTransform:"uppercase",fontFamily:u},children:"How many picks?"})}),f.map((e,t)=>/* @__PURE__ */U(rs,{theme:b,onPress:()=>{v(!1),p(e)},style:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",paddingHorizontal:12,paddingVertical:8,borderTopWidth:0===t?0:1,borderTopColor:y.border},children:[/* @__PURE__ */U(fi,{style:{fontSize:14,fontWeight:"600",color:y.text,fontFamily:u},children:[e," picks"]}),/* @__PURE__ */E(fi,{style:{backgroundColor:tn(y.primary,.14),color:y.primary,paddingVertical:2,paddingHorizontal:6,borderRadius:sn(b,4),fontSize:10,fontWeight:"700",letterSpacing:.5,overflow:"hidden",fontFamily:u},children:"QP"})]},e))]});/* @__PURE__ */
229
+ /* @__PURE__ */E(Os,{color:o,style:{width:32,height:32,borderRadius:sn(e,8)}}),
230
+ /* @__PURE__ */E(Os,{color:o,style:{width:140,height:18,marginRight:"auto"}}),
231
+ /* @__PURE__ */E(Os,{color:o,style:{width:44,height:44,borderRadius:999}})]}),
232
+ /* @__PURE__ */E(Os,{color:o,style:{width:"75%",height:10,marginVertical:3}}),
233
+ /* @__PURE__ */E(Os,{color:o,style:{width:150,height:10,marginVertical:3}}),
234
+ /* @__PURE__ */U(W,{style:{paddingHorizontal:12,paddingBottom:8},children:[/* @__PURE__ */E(Os,{color:o,style:{width:110,height:10,marginVertical:3}}),/* @__PURE__ */E(W,{style:{height:54,marginTop:6,borderWidth:1,borderColor:i.border,borderRadius:sn(e,8)}})]}),
235
+ /* @__PURE__ */E(W,{style:f})]})]})}function nc({layout:e,uiVariant:t,theme:n,colors:i,count:o,showTierTabs:r=!1}){const l=e=>o||e,a=(()=>{switch(e){case"shelf":/* @__PURE__ */return E($s,{theme:n,count:l(4)});case"playbook":/* @__PURE__ */return E(_s,{theme:n,count:l(4)});case"call":/* @__PURE__ */return E(ec,{theme:n,count:l(6)});case"dense":/* @__PURE__ */return E(tc,{theme:n,ui:t,count:l("game-deck"===t?8:6)});default:/* @__PURE__ */return E(W,{testID:"skeleton-games-kit",children:/* @__PURE__ */E(Ys,{colors:i,count:Math.min(Math.max(o,2),4),showTierTabs:r,theme:n})})}})();/* @__PURE__ */
236
+ return E(W,{role:"status","aria-live":"polite","aria-label":"Loading games",style:{width:"100%"},children:a})}function ic({theme:e,colors:t,bodyFont:n,isActive:i,onPress:o,children:r}){const{hovered:l,pressed:a,handlers:s}=wi(),c=i?null:ai(t.primary,{hovered:l,pressed:a});/* @__PURE__ */
237
+ return E(z,{...s,onPress:o,accessibilityRole:"button",accessibilityState:{selected:i},activeOpacity:1,style:[{flex:1,minWidth:0,borderRadius:sn(e,999),paddingHorizontal:4,paddingVertical:10,borderWidth:1,borderColor:i?t.primary:c?.borderColor??t.border,backgroundColor:i?t.primary:c?.background??t.background??"#fff",alignItems:"center",justifyContent:"center",shadowColor:i?t.primary:t.border,shadowOffset:{width:0,height:4},shadowOpacity:i?.35:.25,shadowRadius:i?6:5,elevation:i?4:2},xi(a)],children:/* @__PURE__ */E(fi,{numberOfLines:1,style:{fontFamily:n,fontSize:10,fontWeight:"700",letterSpacing:-.1,color:i?t.primaryText:t.primary},children:r})})}function oc({theme:e,active:t,available:n,width:i,onPress:o,children:r}){const{hovered:l,pressed:a,handlers:s}=wi();/* @__PURE__ */
238
+ return E(z,{...s,accessibilityRole:"button",accessibilityState:{selected:t,disabled:!n},onPress:o,disabled:!n,activeOpacity:1,style:[{alignItems:"center",gap:4,paddingHorizontal:4,paddingVertical:6,borderRadius:sn(e,16),borderWidth:1,borderColor:t||n&&(l||a)?e.colors.primary:"transparent",opacity:n?1:.5,width:i},xi(a,!n)],children:r})}function rc({tabs:e,active:t,onChange:n,colors:i,bodyFont:o,useShortLabel:r,theme:l}){return e.length<=1?null:/* @__PURE__ */E(W,{style:{flexDirection:"row",gap:8,marginBottom:12},children:e.map(e=>{const a=e.id===t;/* @__PURE__ */
239
+ return E(ic,{theme:l,colors:i,bodyFont:o,isActive:a,onPress:()=>n(e.id),children:r?e.shortLabel:e.label},e.id)})})}var lc={scrollSnapType:"x mandatory"},ac={scrollSnapAlign:"center"};function sc({iconUrl:e,gameName:t,size:n,brandColor:i,cardColor:o,iconColor:r,accentColor:s,captionColor:h,bodyFont:u,legOptions:f,onPick:p,colors:y,menuShadow:m,theme:b}){const[x,v]=d(!1),k=c(null),B=c(null),[C,S]=d(null),[z,F]=d(!1),[A,P]=d(null),T="web"===w.OS,D=40+40*f.length+12;a(()=>{if(!x||!T)return;const e=k.current;if(!e||"function"!=typeof e.getBoundingClientRect)return;const t=e.getBoundingClientRect(),n=mi(e),i=n.scrollX||0,o=n.scrollY||0,r=n.innerHeight-t.bottom,l=t.top,a=r<D&&l>r;S({top:t.top+o,bottom:t.bottom+o,right:t.right+i,flipUp:a})},[x,T,D]),l(()=>{if(!x)return;if(T){const e=e=>{const t=k.current,n=e.target;t&&"function"==typeof t.contains&&t.contains(n)||B.current&&B.current.contains(n)||v(!1)},t=yi(k.current);return t.addEventListener("mousedown",e),()=>t.removeEventListener("mousedown",e)}const e=k.current;e&&"function"==typeof e.measureInWindow&&e.measureInWindow((e,t,n,i)=>{const o=g.get("window").height-(t+i);F(o<D&&t>o),P({x:e,y:t,width:n,height:i})})},[x,T,D]);const H=/* @__PURE__ */U(j,{children:[/* @__PURE__ */E(W,{style:{paddingHorizontal:12,paddingVertical:6,borderBottomWidth:1,borderBottomColor:y.border},children:/* @__PURE__ */E(fi,{style:{fontSize:10,fontWeight:"700",color:y.text,opacity:.55,letterSpacing:.5,textTransform:"uppercase",fontFamily:u},children:"How many picks?"})}),f.map((e,t)=>/* @__PURE__ */U(ls,{theme:b,onPress:()=>{v(!1),p(e)},style:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",paddingHorizontal:12,paddingVertical:8,borderTopWidth:0===t?0:1,borderTopColor:y.border},children:[/* @__PURE__ */U(fi,{style:{fontSize:14,fontWeight:"600",color:y.text,fontFamily:u},children:[e," picks"]}),/* @__PURE__ */E(fi,{style:{backgroundColor:tn(y.primary,.14),color:y.primary,paddingVertical:2,paddingHorizontal:6,borderRadius:sn(b,4),fontSize:10,fontWeight:"700",letterSpacing:.5,overflow:"hidden",fontFamily:u},children:"QP"})]},e))]});/* @__PURE__ */
240
240
  return U(W,{ref:k,style:{position:"relative"},children:[
241
- /* @__PURE__ */E(gs,{iconUrl:e,gameName:t,onPress:()=>v(e=>!e),size:n,brandColor:i,cardColor:o,iconColor:r,accentColor:s,captionColor:h}),x&&T&&C&&"undefined"!=typeof document&&G(/* @__PURE__ */E("div",{ref:B,style:{position:"absolute",top:C.flipUp?void 0:C.bottom+6,bottom:C.flipUp?mi(k.current).innerHeight-C.top+6:void 0,left:C.right,transform:"translateX(-100%)",zIndex:20,backgroundColor:y.background,border:`1px solid ${y.border}`,borderRadius:sn(b,8),minWidth:180,boxShadow:m,overflow:"hidden",fontFamily:u},children:H}),yi(k.current).body),
242
- /* @__PURE__ */E(os,{visible:x&&!T,anchor:A,onClose:()=>v(!1),flipUp:z,align:"right",children:/* @__PURE__ */E(W,{style:{elevation:6,backgroundColor:y.background,borderRadius:sn(b,8),borderWidth:1,borderColor:y.border,minWidth:180,shadowColor:"#000",shadowOffset:{width:0,height:12},shadowOpacity:.16,shadowRadius:24,overflow:"hidden"},children:H})})]})}function sc({games:e,selectedGame:t,onSelectGame:n,loading:i,error:o,theme:r,colorScheme:a,uiVariant:h,gameVariant:u,showTier:f=!1,showCategory:g=!1,showTierFilter:p=!1,onPropositionCountChange:y,onPropositionCountSelected:m,onQuickPickGame:b,quickPickLoading:w=!1,maxPayouts:x}){const v=Zn(),B=h??v,C=Yn(r,a),S=C.colors,F=ra(C),A=F.colors,P=kn(C),T=Yr(C),D=Nr(C),H=hn(C),M=dn(C),L=bn(C),R="dark"===C.colorScheme,I=s(()=>Ko(e),[e]),O=s(()=>Fo(I),[I]),[G,V]=d(()=>Ao(I));l(()=>{0!==O.length&&(O.some(e=>e.id===G)||V(O[0].id))},[O,G]);const Y=s(()=>!p||O.length<=1?I:Wo(I,Co[G]),[I,p,O.length,G]),N=e=>e.allowed_propositions&&e.allowed_propositions.length>0&&e.game_name.replace(/\s+\d+\s*$/,"").trim()||e.game_name,X=(e,t)=>{e.quick_pick_only&&b&&t>0?b(e,t):(t>0&&!be(e)&&y?.(t),n(e),m?.())},[q,K]=d(0),Q=q>0&&q<400,J=Q?108:124,Z=q>0&&q<380,_=function(e,t){const n=t>0?Math.floor(t/68):e;return Math.max(2,Math.min(Math.ceil(e/2),n))}(Y.length,q),ee=q>0?(q-4*(_-1))/_:void 0,te=q>0?Math.min(.86*q,380):0,ne=te>0?Math.max((q-te)/2,4):4,ie=te+14,oe=Y.length>1,re=oe&&ne>=48,le=c(null),[ae,se]=d(0),ce=e=>{const t=Math.max(0,Math.min(e,Y.length-1));pi(le,t*ie),se(t)};l(()=>{pi(le,0,!1),se(0)},[G]);const de={shadowColor:"#000",shadowOpacity:R?.4:.12,shadowRadius:12,shadowOffset:{width:0,height:6},elevation:2};if(i)/* @__PURE__ */return E(tc,{layout:"shelf"===u?"shelf":ii(B).pages.games,uiVariant:B,theme:C,colors:Sn(C),count:I.length,showTierTabs:p&&O.length>1});if(o)/* @__PURE__ */return E(W,{style:cc.centerContainer,children:/* @__PURE__ */E(fi,{style:{color:S.error,fontFamily:T},children:o})});if(0===I.length)/* @__PURE__ */return E(W,{style:cc.centerContainer,children:/* @__PURE__ */E(fi,{style:{color:A.textMuted,fontFamily:T},children:"No games available"})});const he="shelf"===u?"shelf":ii(B).pages.games;return"shelf"===he?/* @__PURE__ */E(fs,{games:I,selectedGame:t,theme:C,onPlay:X,maxPayouts:x,quickPickLoading:w}):"playbook"===he?/* @__PURE__ */E(bs,{games:I,selectedGame:t,theme:C,onPlay:X,maxPayouts:x,quickPickLoading:w}):"dense"===he?/* @__PURE__ */E(Jn.Provider,{value:B,children:/* @__PURE__ */E(Ms,{games:I,selectedGame:t,theme:C,onPlay:X,maxPayouts:x,showTier:f||p,showCategory:g,quickPickLoading:w})}):"call"===he?/* @__PURE__ */E(Ls,{games:I,selectedGame:t,theme:C,onPlay:X,maxPayouts:x,showTier:f||p,showCategory:g,quickPickLoading:w,tierFilter:p?/* @__PURE__ */E(oc,{tabs:O,active:G,onChange:V,colors:A,bodyFont:T,useShortLabel:!0,theme:F}):void 0}):/* @__PURE__ */U(W,{style:{flexDirection:"column"},onLayout:e=>K(e.nativeEvent.layout.width),children:[p&&/* @__PURE__ */E(oc,{tabs:O,active:G,onChange:V,colors:A,bodyFont:T,useShortLabel:Z,theme:F}),0===Y.length?/* @__PURE__ */E(W,{style:cc.centerContainer,children:/* @__PURE__ */E(fi,{style:{color:A.textMuted,fontFamily:T},children:"No games in this collection"})}):/* @__PURE__ */U(W,{style:{position:"relative"},children:[/* @__PURE__ */E(k,{ref:le,horizontal:!0,showsHorizontalScrollIndicator:!1,decelerationRate:"fast",snapToInterval:ie>0?ie:void 0,snapToAlignment:"start",style:rc,scrollEventThrottle:16,onScroll:e=>{if(ie<=0)return;const t=Math.round(e.nativeEvent.contentOffset.x/ie);se(e=>e===t?e:t)},contentContainerStyle:{alignItems:"stretch",gap:14,paddingLeft:ne,paddingRight:ne,paddingBottom:8},children:Y.map(e=>{const i=Nt(e),o=qt(e),r=t?.id===e.id,l=String(e.id),a=Ft(e),s=e.description||e.rule,c=e.call_to_action?.trim()||null,{legOptions:d,maxLegCount:h,tiers:u,modes:p,pydDividends:y,hasGenericDividends:w,minBet:v,maxBet:k}=La(e,x?.[e.id]),B=$(e),z=!i&&o?`Available ${o}`:null;/* @__PURE__ */
243
- return E(W,{style:[cc.gameCard,lc,{borderRadius:sn(C,24),width:te||void 0,flexGrow:0,flexShrink:0,borderColor:r?S.primary:S.border,backgroundColor:r?S.infoBg:S.background??P},de],pointerEvents:i?"auto":"none",children:/* @__PURE__ */U(W,{style:{flexGrow:1,alignSelf:"stretch",alignItems:"center",opacity:i?1:.5},children:[e.quick_pick_only&&b&&d.length>1?/* @__PURE__ */E(ac,{iconUrl:B,gameName:N(e),size:J,brandColor:S.primary,cardColor:P,iconColor:S.primaryText,accentColor:L,captionColor:S.textMuted,bodyFont:T,legOptions:d.map(Number),onPick:t=>X(e,t),colors:S,menuShadow:M,theme:C}):/* @__PURE__ */E(gs,{iconUrl:B,gameName:N(e),onPress:()=>X(e,h),size:J,brandColor:S.primary,cardColor:P,iconColor:S.primaryText,accentColor:L,captionColor:S.primary}),
241
+ /* @__PURE__ */E(ps,{iconUrl:e,gameName:t,onPress:()=>v(e=>!e),size:n,brandColor:i,cardColor:o,iconColor:r,accentColor:s,captionColor:h}),x&&T&&C&&"undefined"!=typeof document&&G(/* @__PURE__ */E("div",{ref:B,style:{position:"absolute",top:C.flipUp?void 0:C.bottom+6,bottom:C.flipUp?mi(k.current).innerHeight-C.top+6:void 0,left:C.right,transform:"translateX(-100%)",zIndex:20,backgroundColor:y.background,border:`1px solid ${y.border}`,borderRadius:sn(b,8),minWidth:180,boxShadow:m,overflow:"hidden",fontFamily:u},children:H}),yi(k.current).body),
242
+ /* @__PURE__ */E(rs,{visible:x&&!T,anchor:A,onClose:()=>v(!1),flipUp:z,align:"right",children:/* @__PURE__ */E(W,{style:{elevation:6,backgroundColor:y.background,borderRadius:sn(b,8),borderWidth:1,borderColor:y.border,minWidth:180,shadowColor:"#000",shadowOffset:{width:0,height:12},shadowOpacity:.16,shadowRadius:24,overflow:"hidden"},children:H})})]})}function cc({games:e,selectedGame:t,onSelectGame:n,loading:i,error:o,theme:r,colorScheme:a,uiVariant:h,gameVariant:u,showTier:f=!1,showCategory:g=!1,showTierFilter:p=!1,onPropositionCountChange:y,onPropositionCountSelected:m,onQuickPickGame:b,quickPickLoading:w=!1,maxPayouts:x}){const v=Zn(),B=h??v,C=Yn(r,a),S=C.colors,F=la(C),A=F.colors,P=kn(C),T=Yr(C),D=Nr(C),H=hn(C),M=dn(C),L=bn(C),R="dark"===C.colorScheme,I=s(()=>Ko(e),[e]),O=s(()=>Fo(I),[I]),[G,V]=d(()=>Ao(I));l(()=>{0!==O.length&&(O.some(e=>e.id===G)||V(O[0].id))},[O,G]);const Y=s(()=>!p||O.length<=1?I:Wo(I,Co[G]),[I,p,O.length,G]),N=e=>e.allowed_propositions&&e.allowed_propositions.length>0&&e.game_name.replace(/\s+\d+\s*$/,"").trim()||e.game_name,X=(e,t)=>{e.quick_pick_only&&b&&t>0?b(e,t):(t>0&&!be(e)&&y?.(t),n(e),m?.())},[q,K]=d(0),Q=q>0&&q<400,J=Q?108:124,Z=q>0&&q<380,_=function(e,t){const n=t>0?Math.floor(t/68):e;return Math.max(2,Math.min(Math.ceil(e/2),n))}(Y.length,q),ee=q>0?(q-4*(_-1))/_:void 0,te=q>0?Math.min(.86*q,380):0,ne=te>0?Math.max((q-te)/2,4):4,ie=te+14,oe=Y.length>1,re=oe&&ne>=48,le=c(null),[ae,se]=d(0),ce=e=>{const t=Math.max(0,Math.min(e,Y.length-1));pi(le,t*ie),se(t)};l(()=>{pi(le,0,!1),se(0)},[G]);const de={shadowColor:"#000",shadowOpacity:R?.4:.12,shadowRadius:12,shadowOffset:{width:0,height:6},elevation:2};if(i)/* @__PURE__ */return E(nc,{layout:"shelf"===u?"shelf":ii(B).pages.games,uiVariant:B,theme:C,colors:Sn(C),count:I.length,showTierTabs:p&&O.length>1});if(o)/* @__PURE__ */return E(W,{style:dc.centerContainer,children:/* @__PURE__ */E(fi,{style:{color:S.error,fontFamily:T},children:o})});if(0===I.length)/* @__PURE__ */return E(W,{style:dc.centerContainer,children:/* @__PURE__ */E(fi,{style:{color:A.textMuted,fontFamily:T},children:"No games available"})});const he="shelf"===u?"shelf":ii(B).pages.games;return"shelf"===he?/* @__PURE__ */E(gs,{games:I,selectedGame:t,theme:C,onPlay:X,maxPayouts:x,quickPickLoading:w}):"playbook"===he?/* @__PURE__ */E(ws,{games:I,selectedGame:t,theme:C,onPlay:X,maxPayouts:x,quickPickLoading:w}):"dense"===he?/* @__PURE__ */E(Jn.Provider,{value:B,children:/* @__PURE__ */E(Ls,{games:I,selectedGame:t,theme:C,onPlay:X,maxPayouts:x,showTier:f||p,showCategory:g,quickPickLoading:w})}):"call"===he?/* @__PURE__ */E(Rs,{games:I,selectedGame:t,theme:C,onPlay:X,maxPayouts:x,showTier:f||p,showCategory:g,quickPickLoading:w,tierFilter:p?/* @__PURE__ */E(rc,{tabs:O,active:G,onChange:V,colors:A,bodyFont:T,useShortLabel:!0,theme:F}):void 0}):/* @__PURE__ */U(W,{style:{flexDirection:"column"},onLayout:e=>K(e.nativeEvent.layout.width),children:[p&&/* @__PURE__ */E(rc,{tabs:O,active:G,onChange:V,colors:A,bodyFont:T,useShortLabel:Z,theme:F}),0===Y.length?/* @__PURE__ */E(W,{style:dc.centerContainer,children:/* @__PURE__ */E(fi,{style:{color:A.textMuted,fontFamily:T},children:"No games in this collection"})}):/* @__PURE__ */U(W,{style:{position:"relative"},children:[/* @__PURE__ */E(k,{ref:le,horizontal:!0,showsHorizontalScrollIndicator:!1,decelerationRate:"fast",snapToInterval:ie>0?ie:void 0,snapToAlignment:"start",style:lc,scrollEventThrottle:16,onScroll:e=>{if(ie<=0)return;const t=Math.round(e.nativeEvent.contentOffset.x/ie);se(e=>e===t?e:t)},contentContainerStyle:{alignItems:"stretch",gap:14,paddingLeft:ne,paddingRight:ne,paddingBottom:8},children:Y.map(e=>{const i=Nt(e),o=qt(e),r=t?.id===e.id,l=String(e.id),a=Ft(e),s=e.description||e.rule,c=e.call_to_action?.trim()||null,{legOptions:d,maxLegCount:h,tiers:u,modes:p,pydDividends:y,hasGenericDividends:w,minBet:v,maxBet:k}=Ra(e,x?.[e.id]),B=$(e),z=!i&&o?`Available ${o}`:null;/* @__PURE__ */
243
+ return E(W,{style:[dc.gameCard,ac,{borderRadius:sn(C,24),width:te||void 0,flexGrow:0,flexShrink:0,borderColor:r?S.primary:S.border,backgroundColor:r?S.infoBg:S.background??P},de],pointerEvents:i?"auto":"none",children:/* @__PURE__ */U(W,{style:{flexGrow:1,alignSelf:"stretch",alignItems:"center",opacity:i?1:.5},children:[e.quick_pick_only&&b&&d.length>1?/* @__PURE__ */E(sc,{iconUrl:B,gameName:N(e),size:J,brandColor:S.primary,cardColor:P,iconColor:S.primaryText,accentColor:L,captionColor:S.textMuted,bodyFont:T,legOptions:d.map(Number),onPick:t=>X(e,t),colors:S,menuShadow:M,theme:C}):/* @__PURE__ */E(ps,{iconUrl:B,gameName:N(e),onPress:()=>X(e,h),size:J,brandColor:S.primary,cardColor:P,iconColor:S.primaryText,accentColor:L,captionColor:S.primary}),
244
244
  /* @__PURE__ */U(fi,{style:{marginTop:8,fontFamily:D,fontSize:13,letterSpacing:-.52,lineHeight:13},children:[/* @__PURE__ */E(fi,{style:{fontWeight:"800",color:S.primary},children:"YES"}),/* @__PURE__ */E(fi,{style:{fontWeight:"600",color:tn(S.primary,.85)},children:"NO"})]}),
245
- /* @__PURE__ */U(W,{style:{marginTop:2,flexDirection:"row",alignItems:"center",justifyContent:"center",gap:6},children:[/* @__PURE__ */E(fi,{style:{fontFamily:D,fontWeight:"600",fontSize:Q?19:21,color:H,letterSpacing:-.19,lineHeight:1.2*(Q?19:21),textAlign:"center",paddingHorizontal:4},children:N(e)}),/* @__PURE__ */E(oa,{children:/* @__PURE__ */E(da,{variant:"icon",panel:ht(e),content:s||"Pick outcomes and land the payout for this game.",theme:C,title:N(e),label:`How to play ${N(e)}`,extra:/* @__PURE__ */E(hs,{tiers:w?u:[],modes:p,pydDividends:y,onPlayCount:d.length>1?t=>X(e,t):void 0,minBet:v,maxBet:k,colors:S,bodyFont:T,headingFont:D,theme:C}),colors:S,bodyFont:T,headingFont:D})})]}),c?/* @__PURE__ */E(fi,{style:{marginTop:6,fontSize:13,lineHeight:17,fontWeight:"700",color:S.primary,textAlign:"center",fontFamily:T},children:c}):null,s?/* @__PURE__ */E(fi,{style:{marginTop:8,fontSize:12.5,lineHeight:18,color:S.textMuted,textAlign:"center",fontFamily:T},children:s}):null,a.enabled&&/* @__PURE__ */E(W,{style:[cc.jackpotBadge,{borderRadius:sn(C,999),backgroundColor:`${S.warning}15`,marginTop:8}],children:/* @__PURE__ */U(fi,{style:[cc.jackpotBadgeText,{color:S.warning,fontFamily:T}],children:["★ ",a.progressive?a.amount>0?yt(a.amount):a.limit>0?`Up to ${yt(a.limit)}`:"Jackpot":yt(a.amount)]})}),(g||f)&&/* @__PURE__ */U(W,{style:[cc.tagsRow,{justifyContent:"center",marginTop:8}],children:[g&&e.category&&/* @__PURE__ */E(W,{style:[cc.tag,{borderRadius:sn(C,4),backgroundColor:S.backgroundAlt}],children:/* @__PURE__ */E(fi,{style:[cc.tagText,{color:un(C),fontFamily:T}],children:e.category})}),g&&/* @__PURE__ */E(W,{style:[cc.tag,{borderRadius:sn(C,4),backgroundColor:S.backgroundAlt}],children:/* @__PURE__ */E(fi,{style:[cc.tagText,{color:un(C),fontFamily:T}],children:e.rule})}),g&&e.lotto_type&&/* @__PURE__ */E(W,{style:[cc.tag,{borderRadius:sn(C,4),backgroundColor:S.backgroundAlt}],children:/* @__PURE__ */E(fi,{style:[cc.tagText,{color:un(C),fontFamily:T}],children:e.lotto_type})}),f&&null!=e.tier&&/* @__PURE__ */E(W,{style:[cc.tag,{borderRadius:sn(C,4),backgroundColor:S.backgroundAlt}],children:/* @__PURE__ */U(fi,{style:[cc.tagText,{color:un(C),fontFamily:T}],children:["Tier ",e.tier]})})]}),0===d.length&&/* @__PURE__ */E(W,{style:{marginTop:8,width:"100%"},children:/* @__PURE__ */E(vi,{theme:C,onPress:()=>{n(e),m?.()},children:"Select game"})}),z?/* @__PURE__ */E(W,{style:{marginTop:"auto",width:"100%",paddingTop:12},children:/* @__PURE__ */E(fi,{style:{fontSize:11,lineHeight:15,fontWeight:"600",color:S.text,textAlign:"center",fontFamily:T},children:z})}):null]})},l)})}),re&&/* @__PURE__ */E(j,{children:[-1,1].map(e=>{const t=e<0?ae>0:ae<Y.length-1;/* @__PURE__ */
245
+ /* @__PURE__ */U(W,{style:{marginTop:2,flexDirection:"row",alignItems:"center",justifyContent:"center",gap:6},children:[/* @__PURE__ */E(fi,{style:{fontFamily:D,fontWeight:"600",fontSize:Q?19:21,color:H,letterSpacing:-.19,lineHeight:1.2*(Q?19:21),textAlign:"center",paddingHorizontal:4},children:N(e)}),/* @__PURE__ */E(ra,{children:/* @__PURE__ */E(ha,{variant:"icon",panel:ht(e),content:s||"Pick outcomes and land the payout for this game.",theme:C,title:N(e),label:`How to play ${N(e)}`,extra:/* @__PURE__ */E(us,{tiers:w?u:[],modes:p,pydDividends:y,onPlayCount:d.length>1?t=>X(e,t):void 0,minBet:v,maxBet:k,colors:S,bodyFont:T,headingFont:D,theme:C}),colors:S,bodyFont:T,headingFont:D})})]}),c?/* @__PURE__ */E(fi,{style:{marginTop:6,fontSize:13,lineHeight:17,fontWeight:"700",color:S.primary,textAlign:"center",fontFamily:T},children:c}):null,s?/* @__PURE__ */E(fi,{style:{marginTop:8,fontSize:12.5,lineHeight:18,color:S.textMuted,textAlign:"center",fontFamily:T},children:s}):null,a.enabled&&/* @__PURE__ */E(W,{style:[dc.jackpotBadge,{borderRadius:sn(C,999),backgroundColor:`${S.warning}15`,marginTop:8}],children:/* @__PURE__ */U(fi,{style:[dc.jackpotBadgeText,{color:S.warning,fontFamily:T}],children:["★ ",a.progressive?a.amount>0?yt(a.amount):a.limit>0?`Up to ${yt(a.limit)}`:"Jackpot":yt(a.amount)]})}),(g||f)&&/* @__PURE__ */U(W,{style:[dc.tagsRow,{justifyContent:"center",marginTop:8}],children:[g&&e.category&&/* @__PURE__ */E(W,{style:[dc.tag,{borderRadius:sn(C,4),backgroundColor:S.backgroundAlt}],children:/* @__PURE__ */E(fi,{style:[dc.tagText,{color:un(C),fontFamily:T}],children:e.category})}),g&&/* @__PURE__ */E(W,{style:[dc.tag,{borderRadius:sn(C,4),backgroundColor:S.backgroundAlt}],children:/* @__PURE__ */E(fi,{style:[dc.tagText,{color:un(C),fontFamily:T}],children:e.rule})}),g&&e.lotto_type&&/* @__PURE__ */E(W,{style:[dc.tag,{borderRadius:sn(C,4),backgroundColor:S.backgroundAlt}],children:/* @__PURE__ */E(fi,{style:[dc.tagText,{color:un(C),fontFamily:T}],children:e.lotto_type})}),f&&null!=e.tier&&/* @__PURE__ */E(W,{style:[dc.tag,{borderRadius:sn(C,4),backgroundColor:S.backgroundAlt}],children:/* @__PURE__ */U(fi,{style:[dc.tagText,{color:un(C),fontFamily:T}],children:["Tier ",e.tier]})})]}),0===d.length&&/* @__PURE__ */E(W,{style:{marginTop:8,width:"100%"},children:/* @__PURE__ */E(vi,{theme:C,onPress:()=>{n(e),m?.()},children:"Select game"})}),z?/* @__PURE__ */E(W,{style:{marginTop:"auto",width:"100%",paddingTop:12},children:/* @__PURE__ */E(fi,{style:{fontSize:11,lineHeight:15,fontWeight:"600",color:S.text,textAlign:"center",fontFamily:T},children:z})}):null]})},l)})}),re&&/* @__PURE__ */E(j,{children:[-1,1].map(e=>{const t=e<0?ae>0:ae<Y.length-1;/* @__PURE__ */
246
246
  return E(Ci,{theme:F,accessibilityLabel:e<0?"Previous game":"Next game",onPress:()=>ce(ae+e),disabled:!t,style:{position:"absolute",top:"38%",left:e<0?2:void 0,right:e>0?2:void 0,zIndex:1},children:/* @__PURE__ */E(fi,{style:{fontSize:18,lineHeight:20,color:Si(F)},children:e<0?"‹":"›"})},e)})})]}),Y.length>0&&oe&&/* @__PURE__ */E(W,{style:{flexDirection:"row",justifyContent:"center",flexWrap:"wrap",paddingTop:4,paddingBottom:8},children:Y.map((e,t)=>/* @__PURE__ */E(z,{accessibilityRole:"button",accessibilityLabel:`Go to ${N(e)}`,onPress:()=>ce(t),style:{paddingVertical:18.5,paddingHorizontal:5,marginVertical:-18.5,alignItems:"center",justifyContent:"center"},children:/* @__PURE__ */E(W,{style:{width:t===ae?22:7,height:7,borderRadius:sn(C,999),backgroundColor:t===ae?A.primary:tn(A.primary,.25)}})},e.id))}),Y.length>0&&oe&&/* @__PURE__ */U(W,{style:{borderTopWidth:1,borderTopColor:A.border,paddingTop:10,marginTop:2},children:[/* @__PURE__ */E(fi,{style:{fontSize:10,fontWeight:"700",textTransform:"uppercase",letterSpacing:1.6,color:A.textMuted,fontFamily:D,marginBottom:8},children:"All games"}),/* @__PURE__ */E(W,{style:{flexDirection:"row",flexWrap:"wrap",gap:4},children:Y.map((e,t)=>{const n=Nt(e);/* @__PURE__ */
247
- return U(ic,{theme:F,active:t===ae,available:n,width:ee,onPress:()=>(e=>{X(e,La(e,x?.[e.id]).maxLegCount)})(e),children:[/* @__PURE__ */E(us,{iconUrl:$(e),size:Q?44:52,brandColor:S.primary,iconColor:S.primaryText,accentColor:L}),/* @__PURE__ */E(fi,{numberOfLines:2,style:{fontSize:11,fontWeight:"700",lineHeight:13,textAlign:"center",letterSpacing:-.11,color:t===ae?A.primary:hn(F),fontFamily:D},children:N(e)})]},e.id)})})]})]})}var cc=B.create({centerContainer:{alignItems:"center",justifyContent:"center",padding:32,gap:8},gameCard:{flexDirection:"column",alignItems:"center",borderWidth:1,paddingHorizontal:20,paddingTop:22,paddingBottom:20},jackpotBadge:{alignSelf:"center",flexDirection:"row",alignItems:"center",gap:2,paddingHorizontal:8,paddingVertical:2},jackpotBadgeText:{fontSize:10,fontWeight:"700"},tagsRow:{flexDirection:"row",flexWrap:"wrap",gap:4},tag:{paddingHorizontal:6,paddingVertical:2},tagText:{fontSize:12}});function dc(e,t,n){if(!t||(i=n)&&i.split(" vs ").length>1)return null;var i;const o=e.outcome||e.description;return o?t(o):null}function hc({label:e,colors:t,onOpenChange:n,theme:i}){const o="OR"===e?"If either wins, you win.":"Both must win for Yes.",[r,a]=d(!1);return l(()=>{n?.(r)},[r,n]),/* @__PURE__ */U(W,{style:{position:"relative",zIndex:r?9999:0,elevation:r?9999:0},children:[/* @__PURE__ */E(x,{onPress:()=>a(e=>!e),onHoverIn:()=>a(!0),onHoverOut:()=>a(!1),hitSlop:6,accessibilityLabel:o,accessibilityRole:"button",accessibilityState:{expanded:r},children:/* @__PURE__ */E(W,{style:{paddingHorizontal:8,paddingVertical:2,borderRadius:sn(i,6),backgroundColor:tn(t.primary,.14),borderWidth:1,borderColor:tn(t.primary,.45)},children:/* @__PURE__ */E(fi,{style:{color:t.primary,fontSize:10,fontWeight:"700",lineHeight:10,textTransform:"uppercase",letterSpacing:.25},children:e})})}),r&&/* @__PURE__ */E(W,{style:{position:"absolute",top:"100%",left:0,marginTop:4,minWidth:192,maxWidth:352,paddingHorizontal:10,paddingVertical:6,borderRadius:sn(i,6),backgroundColor:t.backgroundAlt??"#fff",borderWidth:1,borderColor:t.border??tn(t.primary,.3),shadowColor:"#000",shadowOffset:{width:0,height:2},shadowOpacity:.12,shadowRadius:4,elevation:9999},children:/* @__PURE__ */E(fi,{style:{color:t.text,fontSize:11,lineHeight:15},children:o})})]})}function uc({prop:t,colors:n,size:i="sm",componentById:o,textStyle:r,textColor:l,renderTeamLogo:a,theme:s}){const{width:c}=F(),h=c>=640,u=pe(t,o),f=t.description??t.proposition??"",g=r?.fontSize??("md"===i?h?16:14:h?14:12),p=r?.fontWeight??("md"===i?"500":"400"),y=r?.lineHeight,m=r?.textAlign,b=l??n.text,w=n.textMuted??n.textAltMuted??n.text,[x,v]=d(!1);if(!u)/* @__PURE__ */return E(fi,{style:{color:b,fontSize:g,fontWeight:p,lineHeight:y,textAlign:m,flex:1},children:f});const{operator:k,legs:B}=u;if(B.some(e=>e.eventLabel)){const t=n.backgroundAlt??"transparent";/* @__PURE__ */
247
+ return U(oc,{theme:F,active:t===ae,available:n,width:ee,onPress:()=>(e=>{X(e,Ra(e,x?.[e.id]).maxLegCount)})(e),children:[/* @__PURE__ */E(fs,{iconUrl:$(e),size:Q?44:52,brandColor:S.primary,iconColor:S.primaryText,accentColor:L}),/* @__PURE__ */E(fi,{numberOfLines:2,style:{fontSize:11,fontWeight:"700",lineHeight:13,textAlign:"center",letterSpacing:-.11,color:t===ae?A.primary:hn(F),fontFamily:D},children:N(e)})]},e.id)})})]})]})}var dc=B.create({centerContainer:{alignItems:"center",justifyContent:"center",padding:32,gap:8},gameCard:{flexDirection:"column",alignItems:"center",borderWidth:1,paddingHorizontal:20,paddingTop:22,paddingBottom:20},jackpotBadge:{alignSelf:"center",flexDirection:"row",alignItems:"center",gap:2,paddingHorizontal:8,paddingVertical:2},jackpotBadgeText:{fontSize:10,fontWeight:"700"},tagsRow:{flexDirection:"row",flexWrap:"wrap",gap:4},tag:{paddingHorizontal:6,paddingVertical:2},tagText:{fontSize:12}});function hc(e,t,n){if(!t||(i=n)&&i.split(" vs ").length>1)return null;var i;const o=e.outcome||e.description;return o?t(o):null}function uc({label:e,colors:t,onOpenChange:n,theme:i}){const o="OR"===e?"If either wins, you win.":"Both must win for Yes.",[r,a]=d(!1);return l(()=>{n?.(r)},[r,n]),/* @__PURE__ */U(W,{style:{position:"relative",zIndex:r?9999:0,elevation:r?9999:0},children:[/* @__PURE__ */E(x,{onPress:()=>a(e=>!e),onHoverIn:()=>a(!0),onHoverOut:()=>a(!1),hitSlop:6,accessibilityLabel:o,accessibilityRole:"button",accessibilityState:{expanded:r},children:/* @__PURE__ */E(W,{style:{paddingHorizontal:8,paddingVertical:2,borderRadius:sn(i,6),backgroundColor:tn(t.primary,.14),borderWidth:1,borderColor:tn(t.primary,.45)},children:/* @__PURE__ */E(fi,{style:{color:t.primary,fontSize:10,fontWeight:"700",lineHeight:10,textTransform:"uppercase",letterSpacing:.25},children:e})})}),r&&/* @__PURE__ */E(W,{style:{position:"absolute",top:"100%",left:0,marginTop:4,minWidth:192,maxWidth:352,paddingHorizontal:10,paddingVertical:6,borderRadius:sn(i,6),backgroundColor:t.backgroundAlt??"#fff",borderWidth:1,borderColor:t.border??tn(t.primary,.3),shadowColor:"#000",shadowOffset:{width:0,height:2},shadowOpacity:.12,shadowRadius:4,elevation:9999},children:/* @__PURE__ */E(fi,{style:{color:t.text,fontSize:11,lineHeight:15},children:o})})]})}function fc({prop:t,colors:n,size:i="sm",componentById:o,textStyle:r,textColor:l,renderTeamLogo:a,theme:s}){const{width:c}=F(),h=c>=640,u=pe(t,o),f=t.description??t.proposition??"",g=r?.fontSize??("md"===i?h?16:14:h?14:12),p=r?.fontWeight??("md"===i?"500":"400"),y=r?.lineHeight,m=r?.textAlign,b=l??n.text,w=n.textMuted??n.textAltMuted??n.text,[x,v]=d(!1);if(!u)/* @__PURE__ */return E(fi,{style:{color:b,fontSize:g,fontWeight:p,lineHeight:y,textAlign:m,flex:1},children:f});const{operator:k,legs:B}=u;if(B.some(e=>e.eventLabel)){const t=n.backgroundAlt??"transparent";/* @__PURE__ */
248
248
  return E(W,{style:{flex:1,minWidth:0,flexDirection:"row",flexWrap:"wrap",alignItems:"center",columnGap:4,rowGap:2,...x&&{zIndex:9999,elevation:9999,position:"relative"}},children:B.map((i,o)=>{const r=i.prop?.home_team?.trim(),l=i.prop?.away_team?.trim(),c=r?a?.(r,16)??null:null,d=l?a?.(l,16)??null:null,h=c||d?/* @__PURE__ */U(W,{style:{flexDirection:"row",alignItems:"center",gap:2,flexShrink:0,backgroundColor:t,borderWidth:1,borderColor:n.border??"transparent",borderRadius:sn(s,999),paddingHorizontal:4,paddingVertical:2},children:[c,c&&d?/* @__PURE__ */E(fi,{style:{color:w,fontSize:9,fontWeight:"600",textTransform:"uppercase"},children:"vs"}):null,d]}):null;/* @__PURE__ */
249
- return U(e.Fragment,{children:[o>0&&/* @__PURE__ */E(hc,{label:k,colors:n,onOpenChange:v,theme:s}),h,!h&&i.eventLabel&&/* @__PURE__ */E(fi,{style:{backgroundColor:t,color:w,fontSize:9,fontWeight:"700",textTransform:"uppercase",letterSpacing:.25,paddingHorizontal:3},children:i.eventLabel}),
249
+ return U(e.Fragment,{children:[o>0&&/* @__PURE__ */E(uc,{label:k,colors:n,onOpenChange:v,theme:s}),h,!h&&i.eventLabel&&/* @__PURE__ */E(fi,{style:{backgroundColor:t,color:w,fontSize:9,fontWeight:"700",textTransform:"uppercase",letterSpacing:.25,paddingHorizontal:3},children:i.eventLabel}),
250
250
  /* @__PURE__ */E(fi,{style:{flexShrink:1,color:b,fontSize:g,fontWeight:p,lineHeight:y,textAlign:m},children:i.text})]},o)})})}/* @__PURE__ */
251
- return E(W,{style:{flex:1,minWidth:0,...x&&{zIndex:9999,elevation:9999,position:"relative"}},children:/* @__PURE__ */E(W,{style:{flexDirection:"row",flexWrap:"wrap",alignItems:"center",columnGap:6,rowGap:4},children:B.map((t,i)=>/* @__PURE__ */U(e.Fragment,{children:[i>0&&/* @__PURE__ */E(hc,{label:k,colors:n,onOpenChange:v,theme:s}),/* @__PURE__ */E(fi,{style:{color:b,fontSize:g,fontWeight:p,lineHeight:y,textAlign:m},children:t.text})]},i))})})}function fc({id:t,kind:n,stretch:i,children:o}){const r=e.useContext(gl);if(!r||!xr(r.selectedGame))/* @__PURE__ */return E(j,{children:o});const l=r.correlation.loading&&!(t in r.selections),a={position:"relative",minWidth:0,flex:"text"===n?1:void 0,width:i?"100%":void 0};return l&&!r.correlation.displayPropositions?/* @__PURE__ */U(W,{testID:"text"===n?"correlation-prop-placeholder":"correlation-answer-placeholder",style:a,children:[/* @__PURE__ */E(W,{pointerEvents:"none",accessibilityElementsHidden:!0,importantForAccessibility:"no-hide-descendants",style:{opacity:0},children:o}),/* @__PURE__ */E(W,{pointerEvents:"none",accessibilityElementsHidden:!0,importantForAccessibility:"no-hide-descendants",style:{position:"absolute",top:0,bottom:0,left:0,right:0,flexDirection:"row",alignItems:"center",gap:8},children:("answers"===n?[0,1]:[0]).map(e=>/* @__PURE__ */E(W,{style:{flex:1,height:"text"===n?12:"100%",maxWidth:"text"===n?"92%":void 0,borderRadius:"text"===n?4:8,backgroundColor:r.theme.colors.textMuted,opacity:.2}},e))})]}):/* @__PURE__ */E(W,{accessibilityState:l?{busy:!0}:void 0,style:{...a,opacity:l&&"text"===n?.45:1},children:o})}var gc=[0,1,2];function pc({theme:e,variant:t,sports:n,actions:i=!1,headerBg:o,shadow:r,logos:l=!1,swipe:a=!0}){const s=function(e){return e?qn(e)?"dense":e:"kit"}(t),c=oi(),{width:d}=F(),h=d>=640,u=d<480,f=e.colors,g=Sn(e),p=g.textMuted,y=Rs(g),m=f.borderSubtle??f.border,b=Bn(e),w=c.yesNo.box,x=cn(e).radius.sm,v=c.matchRail.radius,k=e=>/* @__PURE__ */E(Is,{color:p,style:{flexShrink:0,...e}}),B=(e,t,n,i=0,o=0)=>{const r=(t-e)/2;/* @__PURE__ */
252
- return E(Is,{color:p,style:{height:e,width:n,maxWidth:"100%",marginTop:r+i,marginBottom:r+o}})},C=t=>l?k({width:t,height:t,borderRadius:sn(e,999)}):null,S=()=>a?k({width:58,height:28,borderRadius:sn(e,999)}):null,z=(e,t=!1)=>{const n="xs"===e?void 0:w,i={height:"xs"===e?21:n?.minHeight??44,borderRadius:w?.radius??x,...t?{flex:1}:{width:"xs"===e?40:n?.minWidth??("md"===e?62:56)}};/* @__PURE__ */
253
- return U(W,{style:[{flexDirection:"row",gap:8,flexShrink:0},t?{alignSelf:"stretch"}:null],children:[/* @__PURE__ */E(Is,{color:p,style:i}),/* @__PURE__ */E(Is,{color:p,style:i})]})},A=e=>/* @__PURE__ */U(W,{style:{flexDirection:"row",alignItems:"center",gap:6,minWidth:0,overflow:"hidden"},children:[k({width:44,height:44,borderRadius:v}),
254
- /* @__PURE__ */E(W,{style:{flex:1,flexDirection:"row",gap:8,overflow:"hidden"},children:e.map((e,t)=>/* @__PURE__ */E(Is,{color:p,style:{flexShrink:0,width:e,height:44,borderRadius:v}},t))}),k({width:44,height:44,borderRadius:v})]}),P=()=>i?/* @__PURE__ */E(W,{style:{flexDirection:"row",alignItems:"center",gap:8},children:k({width:96,height:li.height.md,borderRadius:sn(e,li.radius)})}):null,T=e=>/* @__PURE__ */E(W,{style:{paddingBottom:16},children:/* @__PURE__ */U(W,{children:[/* @__PURE__ */U(W,{style:{flexDirection:"row",alignItems:"center",gap:8,marginTop:16,marginBottom:8},children:[B(11,13,64),/* @__PURE__ */E(W,{style:{flex:1,height:1,backgroundColor:m}})]}),[0,1].map(e)]})}),D=t=>n=>/* @__PURE__ */U(W,{style:{flexDirection:"row",alignItems:"stretch",borderRadius:sn(e,16),borderWidth:1,overflow:"hidden",marginBottom:8,borderColor:f.border,backgroundColor:y},children:[/* @__PURE__ */U(W,{style:{width:80,alignItems:"center",justifyContent:"center",gap:6,borderRightWidth:1,paddingHorizontal:8,paddingVertical:12,borderColor:m,backgroundColor:b},children:[l?/* @__PURE__ */U(W,{style:{flexDirection:"row",alignItems:"center",gap:2},children:[C(24),C(24)]}):null,B(11.5,15,52),
251
+ return E(W,{style:{flex:1,minWidth:0,...x&&{zIndex:9999,elevation:9999,position:"relative"}},children:/* @__PURE__ */E(W,{style:{flexDirection:"row",flexWrap:"wrap",alignItems:"center",columnGap:6,rowGap:4},children:B.map((t,i)=>/* @__PURE__ */U(e.Fragment,{children:[i>0&&/* @__PURE__ */E(uc,{label:k,colors:n,onOpenChange:v,theme:s}),/* @__PURE__ */E(fi,{style:{color:b,fontSize:g,fontWeight:p,lineHeight:y,textAlign:m},children:t.text})]},i))})})}function gc({id:t,kind:n,stretch:i,children:o}){const r=e.useContext(pl);if(!r||!xr(r.selectedGame))/* @__PURE__ */return E(j,{children:o});const l=r.correlation.loading&&!(t in r.selections),a={position:"relative",minWidth:0,flex:"text"===n?1:void 0,width:i?"100%":void 0};return l&&!r.correlation.displayPropositions?/* @__PURE__ */U(W,{testID:"text"===n?"correlation-prop-placeholder":"correlation-answer-placeholder",style:a,children:[/* @__PURE__ */E(W,{pointerEvents:"none",accessibilityElementsHidden:!0,importantForAccessibility:"no-hide-descendants",style:{opacity:0},children:o}),/* @__PURE__ */E(W,{pointerEvents:"none",accessibilityElementsHidden:!0,importantForAccessibility:"no-hide-descendants",style:{position:"absolute",top:0,bottom:0,left:0,right:0,flexDirection:"row",alignItems:"center",gap:8},children:("answers"===n?[0,1]:[0]).map(e=>/* @__PURE__ */E(W,{style:{flex:1,height:"text"===n?12:"100%",maxWidth:"text"===n?"92%":void 0,borderRadius:"text"===n?4:8,backgroundColor:r.theme.colors.textMuted,opacity:.2}},e))})]}):/* @__PURE__ */E(W,{accessibilityState:l?{busy:!0}:void 0,style:{...a,opacity:l&&"text"===n?.45:1},children:o})}var pc=[0,1,2];function yc({theme:e,variant:t,sports:n,actions:i=!1,headerBg:o,shadow:r,logos:l=!1,swipe:a=!0}){const s=function(e){return e?qn(e)?"dense":e:"kit"}(t),c=oi(),{width:d}=F(),h=d>=640,u=d<480,f=e.colors,g=Sn(e),p=g.textMuted,y=Is(g),m=f.borderSubtle??f.border,b=Bn(e),w=c.yesNo.box,x=cn(e).radius.sm,v=c.matchRail.radius,k=e=>/* @__PURE__ */E(Os,{color:p,style:{flexShrink:0,...e}}),B=(e,t,n,i=0,o=0)=>{const r=(t-e)/2;/* @__PURE__ */
252
+ return E(Os,{color:p,style:{height:e,width:n,maxWidth:"100%",marginTop:r+i,marginBottom:r+o}})},C=t=>l?k({width:t,height:t,borderRadius:sn(e,999)}):null,S=()=>a?k({width:58,height:28,borderRadius:sn(e,999)}):null,z=(e,t=!1)=>{const n="xs"===e?void 0:w,i={height:"xs"===e?21:n?.minHeight??44,borderRadius:w?.radius??x,...t?{flex:1}:{width:"xs"===e?40:n?.minWidth??("md"===e?62:56)}};/* @__PURE__ */
253
+ return U(W,{style:[{flexDirection:"row",gap:8,flexShrink:0},t?{alignSelf:"stretch"}:null],children:[/* @__PURE__ */E(Os,{color:p,style:i}),/* @__PURE__ */E(Os,{color:p,style:i})]})},A=e=>/* @__PURE__ */U(W,{style:{flexDirection:"row",alignItems:"center",gap:6,minWidth:0,overflow:"hidden"},children:[k({width:44,height:44,borderRadius:v}),
254
+ /* @__PURE__ */E(W,{style:{flex:1,flexDirection:"row",gap:8,overflow:"hidden"},children:e.map((e,t)=>/* @__PURE__ */E(Os,{color:p,style:{flexShrink:0,width:e,height:44,borderRadius:v}},t))}),k({width:44,height:44,borderRadius:v})]}),P=()=>i?/* @__PURE__ */E(W,{style:{flexDirection:"row",alignItems:"center",gap:8},children:k({width:96,height:li.height.md,borderRadius:sn(e,li.radius)})}):null,T=e=>/* @__PURE__ */E(W,{style:{paddingBottom:16},children:/* @__PURE__ */U(W,{children:[/* @__PURE__ */U(W,{style:{flexDirection:"row",alignItems:"center",gap:8,marginTop:16,marginBottom:8},children:[B(11,13,64),/* @__PURE__ */E(W,{style:{flex:1,height:1,backgroundColor:m}})]}),[0,1].map(e)]})}),D=t=>n=>/* @__PURE__ */U(W,{style:{flexDirection:"row",alignItems:"stretch",borderRadius:sn(e,16),borderWidth:1,overflow:"hidden",marginBottom:8,borderColor:f.border,backgroundColor:y},children:[/* @__PURE__ */U(W,{style:{width:80,alignItems:"center",justifyContent:"center",gap:6,borderRightWidth:1,paddingHorizontal:8,paddingVertical:12,borderColor:m,backgroundColor:b},children:[l?/* @__PURE__ */U(W,{style:{flexDirection:"row",alignItems:"center",gap:2},children:[C(24),C(24)]}):null,B(11.5,15,52),
255
255
  /* @__PURE__ */U(W,{children:[B(9.5,11,52),B(9.5,11,36)]}),S()]}),/* @__PURE__ */U(W,{style:{flex:1,minWidth:0},children:[/* @__PURE__ */U(W,{style:{flexDirection:"row",alignItems:"center",gap:8,paddingHorizontal:12,paddingVertical:6,borderBottomWidth:1,borderBottomColor:m},children:[B(11,13,128),/* @__PURE__ */E(W,{style:{marginLeft:"auto"},children:k({width:24,height:24,borderRadius:999})})]}),/* @__PURE__ */E(W,{style:{justifyContent:"center",gap:12,paddingHorizontal:12,paddingVertical:10},children:[0,1].map(e=>/* @__PURE__ */U(W,{style:t?{flexDirection:"row",alignItems:"center",gap:10}:{flexDirection:"column",gap:10},children:[/* @__PURE__ */U(W,{style:{flex:1,minWidth:0},children:[B(13,18,"90%"),B(13,18,"60%")]}),t?z("xs"):z("sm",!0)]},e))})]})]},n),H=t=>/* @__PURE__ */U(W,{style:{borderRadius:sn(e,16),borderWidth:1,overflow:"hidden",marginBottom:8,borderColor:f.border,backgroundColor:y},children:[/* @__PURE__ */U(W,{style:{flexDirection:"row",alignItems:"center",gap:6,minWidth:0,paddingHorizontal:12,paddingVertical:8,backgroundColor:b},children:[C(18),B(11.5,15,60),C(18),B(9,11,72),
256
- /* @__PURE__ */E(W,{style:{marginLeft:"auto"},children:S()})]}),gc.map(e=>/* @__PURE__ */U(W,{style:{flexDirection:"row",alignItems:"center",gap:8,paddingHorizontal:12,paddingVertical:10,borderTopWidth:1,borderTopColor:m},children:[/* @__PURE__ */E(W,{style:{flex:1,minWidth:0},children:B(11,15,"80%")}),z("xs")]},e))]},t),M="game-deck"===t,L="matchbook"===t,R={kit:()=>/* @__PURE__ */E(W,{style:{gap:16},children:[0,1].map(t=>/* @__PURE__ */U(W,{style:[{borderRadius:sn(e,12),borderWidth:1,borderColor:f.border,backgroundColor:y},r],children:[/* @__PURE__ */E(W,{style:{flexDirection:"row",alignItems:"center",paddingHorizontal:16,paddingVertical:14,backgroundColor:o??b,borderTopLeftRadius:sn(e,12),borderTopRightRadius:sn(e,12)},children:/* @__PURE__ */U(W,{style:{flexDirection:"row",alignItems:"center",gap:8,flex:1,minWidth:0},children:[k({width:18,height:18,borderRadius:sn(e,4)}),/* @__PURE__ */U(W,{style:{flex:1,minWidth:0},children:[h?B(16,19,224):/* @__PURE__ */U(j,{children:[B(14,17,112),B(14,17,96)]}),B(12,14,96,2)]})]})}),[0,1].map(t=>/* @__PURE__ */E(W,{style:{paddingHorizontal:16,paddingVertical:h?14:12,backgroundColor:Cn(e),borderTopColor:f.border,borderTopWidth:0===t?0:1,borderBottomLeftRadius:1===t?12:0,borderBottomRightRadius:1===t?12:0},children:/* @__PURE__ */U(W,{style:{flexDirection:"row",flexWrap:"wrap",justifyContent:"space-between",alignItems:"flex-start",columnGap:h?16:8,rowGap:h?16:8},children:[/* @__PURE__ */U(W,{style:{flex:1,minWidth:128},children:[B(h?16:14,h?24:20,"85%"),u?B(14,20,"85%"):null,B(h?16:14,h?24:20,"55%")]}),z("sm")]})},t))]},t))}),split:()=>T(D(!1)),"split-inline":()=>T(D(!0)),compact:()=>T(H),shelf:()=>/* @__PURE__ */U(W,{style:{minWidth:0},children:[/* @__PURE__ */U(W,{style:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",gap:6,paddingTop:4,paddingBottom:12},children:[k({width:44,height:44,borderRadius:v}),B(13,16,170),k({width:44,height:44,borderRadius:v})]}),/* @__PURE__ */U(W,{style:{borderWidth:1,borderColor:f.border,borderRadius:sn(e,wl),backgroundColor:y,overflow:"hidden"},children:[/* @__PURE__ */U(W,{style:{flexDirection:"row",alignItems:"center",gap:10,padding:12},children:[C(22),
256
+ /* @__PURE__ */E(W,{style:{marginLeft:"auto"},children:S()})]}),pc.map(e=>/* @__PURE__ */U(W,{style:{flexDirection:"row",alignItems:"center",gap:8,paddingHorizontal:12,paddingVertical:10,borderTopWidth:1,borderTopColor:m},children:[/* @__PURE__ */E(W,{style:{flex:1,minWidth:0},children:B(11,15,"80%")}),z("xs")]},e))]},t),M="game-deck"===t,L="matchbook"===t,R={kit:()=>/* @__PURE__ */E(W,{style:{gap:16},children:[0,1].map(t=>/* @__PURE__ */U(W,{style:[{borderRadius:sn(e,12),borderWidth:1,borderColor:f.border,backgroundColor:y},r],children:[/* @__PURE__ */E(W,{style:{flexDirection:"row",alignItems:"center",paddingHorizontal:16,paddingVertical:14,backgroundColor:o??b,borderTopLeftRadius:sn(e,12),borderTopRightRadius:sn(e,12)},children:/* @__PURE__ */U(W,{style:{flexDirection:"row",alignItems:"center",gap:8,flex:1,minWidth:0},children:[k({width:18,height:18,borderRadius:sn(e,4)}),/* @__PURE__ */U(W,{style:{flex:1,minWidth:0},children:[h?B(16,19,224):/* @__PURE__ */U(j,{children:[B(14,17,112),B(14,17,96)]}),B(12,14,96,2)]})]})}),[0,1].map(t=>/* @__PURE__ */E(W,{style:{paddingHorizontal:16,paddingVertical:h?14:12,backgroundColor:Cn(e),borderTopColor:f.border,borderTopWidth:0===t?0:1,borderBottomLeftRadius:1===t?12:0,borderBottomRightRadius:1===t?12:0},children:/* @__PURE__ */U(W,{style:{flexDirection:"row",flexWrap:"wrap",justifyContent:"space-between",alignItems:"flex-start",columnGap:h?16:8,rowGap:h?16:8},children:[/* @__PURE__ */U(W,{style:{flex:1,minWidth:128},children:[B(h?16:14,h?24:20,"85%"),u?B(14,20,"85%"):null,B(h?16:14,h?24:20,"55%")]}),z("sm")]})},t))]},t))}),split:()=>T(D(!1)),"split-inline":()=>T(D(!0)),compact:()=>T(H),shelf:()=>/* @__PURE__ */U(W,{style:{minWidth:0},children:[/* @__PURE__ */U(W,{style:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",gap:6,paddingTop:4,paddingBottom:12},children:[k({width:44,height:44,borderRadius:v}),B(13,16,170),k({width:44,height:44,borderRadius:v})]}),/* @__PURE__ */U(W,{style:{borderWidth:1,borderColor:f.border,borderRadius:sn(e,xl),backgroundColor:y,overflow:"hidden"},children:[/* @__PURE__ */U(W,{style:{flexDirection:"row",alignItems:"center",gap:10,padding:12},children:[C(22),
257
257
  /* @__PURE__ */U(W,{style:{flexShrink:1,minWidth:0},children:[B(16,20,150),u?B(16,20,110):null,B(13,20,96,2)]}),C(22),
258
- /* @__PURE__ */E(W,{style:{marginLeft:"auto",flexShrink:0},children:a?k({width:82,height:xl,borderRadius:sn(e,bl)}):null})]}),/* @__PURE__ */U(W,{style:{flexDirection:"row",borderTopWidth:1,borderTopColor:f.border},children:[k({width:68,marginVertical:6,marginLeft:6,borderRadius:sn(e,10)}),/* @__PURE__ */E(W,{style:{flex:1,minWidth:0},children:gc.map((e,t)=>/* @__PURE__ */U(W,{style:{flexDirection:"row",alignItems:"center",gap:12,padding:12,borderTopWidth:t>0?1:0,borderTopColor:m},children:[/* @__PURE__ */U(W,{style:{flex:1,minWidth:0},children:[B(14,19,"85%"),u?B(14,19,"85%"):null,B(14,19,"50%")]}),z("sm")]},e))})]})]})]}),call:()=>/* @__PURE__ */U(W,{style:{gap:12},children:[/* @__PURE__ */E(W,{style:{minHeight:48,padding:12,borderWidth:1,borderColor:m,borderRadius:sn(e,10)},children:B(14,17,200)}),/* @__PURE__ */U(W,{style:{borderWidth:1,borderColor:m,borderRadius:sn(e,16),backgroundColor:y,marginBottom:20,overflow:"hidden"},children:[
258
+ /* @__PURE__ */E(W,{style:{marginLeft:"auto",flexShrink:0},children:a?k({width:82,height:vl,borderRadius:sn(e,wl)}):null})]}),/* @__PURE__ */U(W,{style:{flexDirection:"row",borderTopWidth:1,borderTopColor:f.border},children:[k({width:68,marginVertical:6,marginLeft:6,borderRadius:sn(e,10)}),/* @__PURE__ */E(W,{style:{flex:1,minWidth:0},children:pc.map((e,t)=>/* @__PURE__ */U(W,{style:{flexDirection:"row",alignItems:"center",gap:12,padding:12,borderTopWidth:t>0?1:0,borderTopColor:m},children:[/* @__PURE__ */U(W,{style:{flex:1,minWidth:0},children:[B(14,19,"85%"),u?B(14,19,"85%"):null,B(14,19,"50%")]}),z("sm")]},e))})]})]})]}),call:()=>/* @__PURE__ */U(W,{style:{gap:12},children:[/* @__PURE__ */E(W,{style:{minHeight:48,padding:12,borderWidth:1,borderColor:m,borderRadius:sn(e,10)},children:B(14,17,200)}),/* @__PURE__ */U(W,{style:{borderWidth:1,borderColor:m,borderRadius:sn(e,16),backgroundColor:y,marginBottom:20,overflow:"hidden"},children:[
259
259
  /* @__PURE__ */U(W,{style:{padding:14,backgroundColor:b,flexDirection:"row",alignItems:"center",flexWrap:"wrap",gap:12},children:[C(28),
260
260
  /* @__PURE__ */U(W,{style:{flex:1,minWidth:120,gap:4},children:[B(16,19,180),B(12,14,120)]}),C(28)]}),[0,1].map(e=>/* @__PURE__ */U(W,{style:{gap:14,padding:14,borderTopWidth:1,borderTopColor:m},children:[/* @__PURE__ */U(W,{children:[B(15,23,"90%"),B(15,23,"55%")]}),z("md",!0)]},e)),
261
261
  /* @__PURE__ */U(W,{style:{padding:12,borderTopWidth:1,borderTopColor:m,flexDirection:"row",flexWrap:"wrap",alignItems:"center",gap:10},children:[B(12,14,64),/* @__PURE__ */E(W,{style:{marginLeft:"auto"},children:S()})]})]})]}),dense:()=>/* @__PURE__ */U(W,{style:{backgroundColor:f.background},children:[void 0!==n?/* @__PURE__ */E(W,{style:{flexDirection:"row",alignItems:"center",gap:8,minHeight:52,paddingHorizontal:12,borderBottomWidth:1,borderColor:f.border},children:/* @__PURE__ */E(W,{style:{flex:1,minHeight:44,justifyContent:"center"},children:B(14,17,120)})}):null,void 0!==n&&i?/* @__PURE__ */E(W,{style:{paddingHorizontal:12,paddingVertical:4,borderBottomWidth:1,borderColor:f.border},children:P()}):null,
262
262
  /* @__PURE__ */E(W,{style:{paddingHorizontal:12,paddingVertical:8},children:A([148,92,92,92])}),
263
263
  /* @__PURE__ */U(W,{style:{padding:12,borderBottomWidth:1,borderColor:m},children:[B(15,18,180),B(12,14,120,3)]}),
264
- /* @__PURE__ */E(W,{style:{flexDirection:M?"row":"column",flexWrap:"wrap",padding:M?8:0},children:gc.map(e=>/* @__PURE__ */E(W,{style:{width:M?"50%":"100%",padding:M?4:0},children:/* @__PURE__ */U(W,{style:{flexDirection:L?"row":"column",alignItems:L?"center":void 0,gap:10,padding:12,minHeight:M?190:L?108:110,borderWidth:M?1:0,borderBottomWidth:1,borderColor:m,borderRadius:M?8:0,backgroundColor:M?f.backgroundAlt:f.background},children:[/* @__PURE__ */U(W,{style:{flex:1,minWidth:0},children:[B(12,14,72,0,4),B(16,22,"90%"),B(16,22,"55%")]}),/* @__PURE__ */E(W,{style:L?{width:116}:void 0,children:z("md",!0)})]})},e))}),
264
+ /* @__PURE__ */E(W,{style:{flexDirection:M?"row":"column",flexWrap:"wrap",padding:M?8:0},children:pc.map(e=>/* @__PURE__ */E(W,{style:{width:M?"50%":"100%",padding:M?4:0},children:/* @__PURE__ */U(W,{style:{flexDirection:L?"row":"column",alignItems:L?"center":void 0,gap:10,padding:12,minHeight:M?190:L?108:110,borderWidth:M?1:0,borderBottomWidth:1,borderColor:m,borderRadius:M?8:0,backgroundColor:M?f.backgroundAlt:f.background},children:[/* @__PURE__ */U(W,{style:{flex:1,minWidth:0},children:[B(12,14,72,0,4),B(16,22,"90%"),B(16,22,"55%")]}),/* @__PURE__ */E(W,{style:L?{width:116}:void 0,children:z("md",!0)})]})},e))}),
265
265
  /* @__PURE__ */U(W,{style:{flexDirection:"row",alignItems:"center",gap:10,padding:12},children:[/* @__PURE__ */E(W,{style:{flex:1,minHeight:44,justifyContent:"center",paddingHorizontal:14,borderWidth:1,borderColor:m,borderRadius:sn(e,8),backgroundColor:f.backgroundAlt},children:B(14,17,"60%")}),S()]})]})}[s]();/* @__PURE__ */
266
266
  return E(W,{testID:`skeleton-picks-${s}`,role:"status","aria-live":"polite","aria-label":"Loading picks",children:/* @__PURE__ */E(W,{"aria-hidden":!0,style:"dense"===s?void 0:{gap:h?24:16,paddingBottom:64},children:"dense"===s?R:/* @__PURE__ */U(j,{children:[(()=>{if(void 0===n)return null;if(n<2)return P();const t="shelf"===c.pages.picks,o=Math.min(n,5);/* @__PURE__ */
267
- return U(W,{style:{minWidth:0},children:[t?null:/* @__PURE__ */U(W,{style:{minWidth:0,maxWidth:"100%"},children:[B(14,17,112),B(12,16,96,0,6)]}),"chips"===c.sportRail?/* @__PURE__ */U(j,{children:[i?/* @__PURE__ */U(W,{style:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",gap:8,marginBottom:6},children:[B(12,16,104),k({width:li.height.md,height:li.height.md,borderRadius:sn(e,li.radius)})]}):null,A([104,60,60,60,60].slice(0,o))]}):/* @__PURE__ */E(W,{style:{borderWidth:1,borderRadius:sn(e,999),padding:5,backgroundColor:f.backgroundAlt??f.background??"#fff",borderColor:f.border},children:/* @__PURE__ */E(W,{style:{flexDirection:"row",gap:2},children:Array.from({length:o},(t,n)=>/* @__PURE__ */E(Is,{color:p,style:{flexGrow:1,height:36,borderRadius:sn(e,999)}},n))})}),i&&"chips"!==c.sportRail?/* @__PURE__ */E(W,{style:{marginTop:10},children:P()}):null]})})(),R]})})})}var yc=3;function mc(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 i=[],o=[];for(const r of e){const e=r.eventId??r.event_id;(e&&n.has(e)?o:i).push(r)}return[...i,...o]}function bc(e,t,n,i){const[r,a]=d([]),[h,u]=d([]),[f,g]=d([]),[p,y]=d([]),[m,b]=d(null),w=s(()=>{const t=/* @__PURE__ */new Map;for(const n of e)t.set(n.id,n);return t},[e]),x=s(()=>e.filter(e=>null!=t[e.id]),[e,t]),v=s(()=>e.map(e=>e.id).join(","),[e]),k=c(null);l(()=>()=>{k.current=null},[]),l(()=>{if(k.current===v)return;k.current=v;const n=e.filter(e=>!(e.id in t)),i=e.filter(e=>null!=t[e.id]);a(n.map(e=>e.id)),u(mc(n,i).slice(0,3).map(e=>e.id)),g([]),y([]),b(null)},[v,e,t]);const B=s(()=>i?new Set(e.filter(e=>i(e)).map(e=>e.id)):/* @__PURE__ */new Set,[e,i]),C=s(()=>{const e=new Set(f);return[...mc(r.map(e=>w.get(e)).filter(e=>!!e&&!B.has(e.id)).filter(t=>!e.has(t.id)),x).map(e=>e.id),...f.filter(e=>r.includes(e)&&!B.has(e))]},[r,w,x,f,B]);l(()=>{u(e=>{const t=new Set(r),n=e.filter(e=>t.has(e)&&!B.has(e));if(0===p.length&&!m){const t=C.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 i=[...n];for(const o of C){if(i.length>=3)break;i.includes(o)||i.push(o)}return i})},[r,C,p,m,B]);const S=s(()=>h.map(e=>w.get(e)).filter(e=>Boolean(e)),[h,w]),z=o((e,t)=>{b(null),t&&n(e,t),y(n=>[...n,{id:e,answer:t}]),u(t=>t.filter(t=>t!==e)),g(n=>{const i=n.filter(t=>t!==e);return t?i:[...i,e]}),a(n=>{const i=n.filter(t=>t!==e);return t?i:[...i,e]})},[n]),W=o(()=>{const e=p[p.length-1];e&&(e.answer&&n(e.id,e.answer),b({id:e.id,from:"yes"===e.answer?"right":"no"===e.answer?"left":"up"}),y(e=>e.slice(0,-1)),g(t=>t.filter(t=>t!==e.id)),a(t=>[e.id,...t.filter(t=>t!==e.id)]),u(t=>[e.id,...t.filter(t=>t!==e.id)].slice(0,3)))},[p,n]),F=o(e=>null!=t[e]&&w.has(e),[w,t]),A=o(e=>{const i=t[e];i&&w.has(e)&&(n(e,i),b({id:e,from:"yes"===i?"right":"left"}),y(t=>t.filter(t=>t.id!==e)),g(t=>t.filter(t=>t!==e)),a(t=>[e,...t.filter(t=>t!==e)]),u(t=>[e,...t.filter(t=>t!==e)].slice(0,3)))},[w,t,n]);return{visible:S,canSkip:r.filter(e=>!B.has(e)).length>1,canUndo:p.length>0,restored:m,resolve:z,undo:W,canRecall:F,recall:A}}function wc({view:e}){const{theme:t}=yl(),n=t.colors;/* @__PURE__ */
268
- return U(W,{testID:"correlation-loading",accessibilityLiveRegion:"polite",accessibilityLabel:"Updating available choices",children:[/* @__PURE__ */E(fi,{style:{color:n.textMuted,fontSize:12,marginBottom:12},children:"Updating available choices…"}),"list"===e?/* @__PURE__ */E(W,{style:{gap:12},children:[0,1,2].map(e=>/* @__PURE__ */U(W,{style:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",gap:12,padding:16,borderWidth:1,borderColor:n.border,borderRadius:sn(t,12),backgroundColor:n.selectionCard??n.backgroundAlt},children:[/* @__PURE__ */E(Is,{color:n.textMuted,style:{height:16,flex:1,maxWidth:"58%",borderRadius:sn(t,4)}}),/* @__PURE__ */E(W,{style:{flexDirection:"row",gap:8},children:[0,1].map(e=>/* @__PURE__ */E(Is,{color:n.textMuted,style:{height:32,width:48,borderRadius:sn(t,8)}},e))})]},e))}):/* @__PURE__ */U(W,{style:{width:"100%",maxWidth:384,alignSelf:"center",height:300,borderWidth:1,borderColor:n.border,backgroundColor:n.backgroundAlt,borderRadius:sn(t,16),padding:20,gap:16},children:[
269
- /* @__PURE__ */E(Is,{color:n.textMuted,style:{height:16,width:"65%",borderRadius:sn(t,4)}}),
270
- /* @__PURE__ */E(Is,{color:n.textMuted,style:{height:128,borderRadius:sn(t,12)}}),
271
- /* @__PURE__ */E(Is,{color:n.textMuted,style:{height:20,borderRadius:sn(t,4)}})]})]})}var xc=p.bezier(.32,0,.67,0),vc=p.bezier(.22,1,.36,1),kc={stiffness:420,damping:34},Bc={stiffness:280,damping:28},Cc=(e,t)=>"web"===w.OS?{userSelect:"none",cursor:e?"grabbing":"grab",touchAction:t?"none":"pan-y"}:null;function Sc(e){return"up"===e?{x:0,y:-720}:{x:"right"===e?640:-640,y:70}}function zc(e,t,n){return n&&-t>Math.abs(e)}function Wc({prop:e,theme:t,depth:n=0,enterFrom:i,canSkip:a=!1,variant:h="stack",onResolve:u,registerApi:g,onDragStateChange:p,claimTouchStart:y=!1,children:m}){const w=r(gl),x=t??w?.theme??Fn,v=c(w?.canSelectAnswer);v.current=w?.canSelectAnswer;const k=Nr(x),C=Fi(),S=gn(x),z=pn(x),F=0===n,A="run"===h,[P,T]=d(!1),D=c(!1),H=c({x:0,y:0}),M=c({x:0,y:0}),L=c(null),R=c(0),I=c(null),O=c(null),G=c(null),V=c(a);V.current=a;const Y=c(y);Y.current=y;const N=c(p);N.current=p;const X=c(new f.ValueXY({x:0,y:0})).current,q=c(new f.Value(0)).current,K=o(()=>{X.setValue({x:H.current.x,y:H.current.y}),q.setValue(zc(H.current.x,H.current.y,V.current)?1:0)},[q,X]),Q=o(()=>{null!=I.current&&(cancelAnimationFrame(I.current),I.current=null),O.current&&(O.current.stop(),O.current=null)},[]),J=o(e=>{Q();let t=null;const n=i=>{const o=Math.min(null==t?1/60:(i-t)/1e3,1/30);t=i;const r=H.current,l=M.current;if(l.x+=(-e.stiffness*r.x-e.damping*l.x)*o,l.y+=(-e.stiffness*r.y-e.damping*l.y)*o,r.x+=l.x*o,r.y+=l.y*o,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,K(),void(I.current=null);K(),I.current=requestAnimationFrame(n)};I.current=requestAnimationFrame(n)},[K,Q]),Z=o(t=>{if(D.current)return;if("up"===t&&!V.current)return;const n="right"===t?"yes":"left"===t?"no":null;if(n&&v.current&&!v.current(e.id,n))return void J(kc);D.current=!0,Q();const i="right"===t?"yes":"left"===t?"no":null,o=Sc(t);H.current={...o},q.setValue("up"===t?1:0),O.current=f.timing(X,{toValue:o,duration:260,easing:xc,useNativeDriver:!1}),O.current.start(),G.current=setTimeout(()=>{if(i&&v.current&&!v.current(e.id,i))return D.current=!1,void J(kc);u(e.id,i)},260)},[u,e.id,Q,q,X,J]);l(()=>()=>{G.current&&clearTimeout(G.current),null!=I.current&&cancelAnimationFrame(I.current),O.current?.stop(),L.current&&N.current?.(!1)},[]),l(()=>{if(!i)return Q(),H.current={x:0,y:0},M.current={x:0,y:0},void K();const e=Sc(i);H.current={x:e.x,y:e.y},M.current={x:0,y:0},K(),J(Bc)},[i,K,J,Q]),l(()=>{if(F&&g)return g({fly:Z}),()=>g(null)},[Z,F,g]);const $=s(()=>b.create({onStartShouldSetPanResponder:()=>Y.current&&!D.current,onMoveShouldSetPanResponder:(e,t)=>!D.current&&(Math.abs(t.dx)>2&&Math.abs(t.dx)>Math.abs(t.dy)||V.current&&-t.dy>2&&-t.dy>Math.abs(t.dx)),onPanResponderGrant:()=>{Q(),L.current={x:H.current.x,y:H.current.y},M.current={x:0,y:0},R.current=Date.now(),T(!0),N.current?.(!0)},onPanResponderMove:(e,t)=>{if(D.current||!L.current)return;if(t.numberActiveTouches>1)return;const n=L.current.x+t.dx,i=Math.min(L.current.y+t.dy,0),o=e.nativeEvent.timestamp??Date.now(),r=o-R.current;if(r>0){const e=1-Math.exp(-r/40);M.current.x+=((n-H.current.x)/r*1e3-M.current.x)*e,M.current.y+=((i-H.current.y)/r*1e3-M.current.y)*e,R.current=o}H.current.x=n,H.current.y=i,K()},onPanResponderRelease:e=>{if(!L.current)return;if(L.current=null,T(!1),N.current?.(!1),D.current)return;(e.nativeEvent.timestamp??Date.now())-R.current>90&&(M.current={x:0,y:0});const t=H.current,n=M.current;if(zc(t.x,t.y,V.current)){if(t.y<-110||n.y<-620)return Z("up")}else{if(t.x>110||n.x>620)return Z("right");if(t.x<-110||n.x<-620)return Z("left")}J(kc)},onPanResponderTerminate:()=>{L.current=null,M.current={x:0,y:0},T(!1),N.current?.(!1),D.current||J(kc)},onPanResponderTerminationRequest:()=>!1,onShouldBlockNativeResponder:()=>!0}),[Z,K,J,Q]),_=X.x.interpolate({inputRange:[-260,0,260],outputRange:["-16deg","0deg","16deg"],extrapolate:"clamp"}),ee=f.subtract(1,q),te=f.multiply(ee,X.x.interpolate({inputRange:[24,132],outputRange:[0,1],extrapolate:"clamp"})),ne=f.multiply(ee,X.x.interpolate({inputRange:[-132,-24],outputRange:[1,0],extrapolate:"clamp"})),ie=f.multiply(q,X.y.interpolate({inputRange:[-120,-30],outputRange:[1,0],extrapolate:"clamp"})),oe=X.x.interpolate({inputRange:[-640,-200,0,200,640],outputRange:[0,.5,1,.5,0],extrapolate:"clamp"}),re=c(new f.Value(n)).current;l(()=>{const e=f.timing(re,{toValue:n,duration:240,easing:vc,useNativeDriver:!1});return e.start(),()=>e.stop()},[n,re]);const le=re.interpolate({inputRange:[0,3],outputRange:[0,36]}),ae=re.interpolate({inputRange:[0,3],outputRange:[1,.88]}),se={opacity:re.interpolate({inputRange:[0,1],outputRange:[1,0],extrapolate:"clamp"}),transform:[{translateY:re.interpolate({inputRange:[0,1],outputRange:[0,30],extrapolate:"clamp"})},{scale:re.interpolate({inputRange:[0,1],outputRange:[1,.97],extrapolate:"clamp"})}]};/* @__PURE__ */
272
- return E(f.View,{style:[B.absoluteFill,{zIndex:3-n},A?se:{transform:[{translateY:le},{scale:ae}]}],pointerEvents:F?"auto":"none",children:/* @__PURE__ */U(f.View,{style:[{flex:1,transform:[{translateX:X.x},{translateY:X.y},{rotate:_}]},A&&{opacity:oe},F&&Cc(P,a)],...F?$.panHandlers:{},children:[m,F&&!A&&/* @__PURE__ */U(j,{children:[
273
- /* @__PURE__ */E(f.View,{pointerEvents:"none",style:[Mc.stamp,Mc.stampLeft,{borderRadius:sn(x,12),opacity:te,borderColor:S,transform:[{rotate:"-12deg"}]}],children:/* @__PURE__ */E(fi,{style:[Mc.stampText,{color:S,fontFamily:k}],children:C.yes})}),
274
- /* @__PURE__ */E(f.View,{pointerEvents:"none",style:[Mc.stamp,Mc.stampRight,{borderRadius:sn(x,12),opacity:ne,borderColor:z,transform:[{rotate:"12deg"}]}],children:/* @__PURE__ */E(fi,{style:[Mc.stampText,{color:z,fontFamily:k}],children:C.no})}),a&&/* @__PURE__ */E(f.View,{pointerEvents:"none",style:[Mc.skipPillWrap,{opacity:ie}],children:/* @__PURE__ */E(W,{style:[Mc.skipPill,{borderRadius:sn(x,999),borderColor:x.colors.border,backgroundColor:x.colors.background}],children:/* @__PURE__ */E(fi,{style:[Mc.skipPillText,{color:x.colors.primary}],children:"Skip"})})})]})]})})}function Fc({prop:e}){const{theme:t,headingFont:n,renderTeamLogo:i,renderPropositionSilk:o,displaySportName:r,gameCategory:l,compositeComponentById:a}=yl(),s=t.colors,{height:c}=F(),d=c<700?12:24,h=pe(e,a),u=ce(e),f=("racing"===l?[e.away_team?.trim()||e.home_team?.trim()]:[e.home_team?.trim(),e.away_team?.trim()]).filter(Boolean),g=(t,n)=>t&&o?.(t,n)||dc(t??e,i,f.join(" vs "))||null;/* @__PURE__ */
275
- return U(W,{style:[Mc.face,{borderRadius:sn(t,24),backgroundColor:kn(t),borderColor:s.border}],children:[
276
- /* @__PURE__ */E(W,{style:[Mc.matchupBand,{backgroundColor:Bn(t)}],children:f.length>0?/* @__PURE__ */E(W,{style:Mc.matchupClip,children:/* @__PURE__ */E(W,{style:Mc.matchupRow,children:f.map((e,n)=>/* @__PURE__ */U(W,{style:Mc.matchupTeam,children:[
277
- /* @__PURE__ */E(fi,{style:[Mc.matchupVs,{color:vn(t)}],children:n>0?"vs":""}),i?.(e),
278
- /* @__PURE__ */E(fi,{style:[Mc.matchupName,{color:xn(t)}],children:e})]},`${e}-${n}`))})}):/* @__PURE__ */E(fi,{style:[Mc.matchupName,{color:xn(t)}],children:e.league??r(e.sport??"")})}),
279
- /* @__PURE__ */E(W,{style:[Mc.faceBody,{paddingVertical:d,gap:12===d?12:16}],children:/* @__PURE__ */U(W,{style:Mc.propositionRow,children:[!h&&g(e,32),h?/* @__PURE__ */U(W,{style:{flex:1,gap:12},children:[/* @__PURE__ */U(fi,{style:[Mc.compositeLabel,{color:un(t)}],children:["All ","OR"===h.operator?"or any of these":"of these"]}),/* @__PURE__ */E(W,{style:{gap:8},children:h.legs.map((e,i)=>/* @__PURE__ */U(W,{style:Mc.compositeLeg,children:[
267
+ return U(W,{style:{minWidth:0},children:[t?null:/* @__PURE__ */U(W,{style:{minWidth:0,maxWidth:"100%"},children:[B(14,17,112),B(12,16,96,0,6)]}),"chips"===c.sportRail?/* @__PURE__ */U(j,{children:[i?/* @__PURE__ */U(W,{style:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",gap:8,marginBottom:6},children:[B(12,16,104),k({width:li.height.md,height:li.height.md,borderRadius:sn(e,li.radius)})]}):null,A([104,60,60,60,60].slice(0,o))]}):/* @__PURE__ */E(W,{style:{borderWidth:1,borderRadius:sn(e,999),padding:5,backgroundColor:f.backgroundAlt??f.background??"#fff",borderColor:f.border},children:/* @__PURE__ */E(W,{style:{flexDirection:"row",gap:2},children:Array.from({length:o},(t,n)=>/* @__PURE__ */E(Os,{color:p,style:{flexGrow:1,height:36,borderRadius:sn(e,999)}},n))})}),i&&"chips"!==c.sportRail?/* @__PURE__ */E(W,{style:{marginTop:10},children:P()}):null]})})(),R]})})})}var mc=3;function bc(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 i=[],o=[];for(const r of e){const e=r.eventId??r.event_id;(e&&n.has(e)?o:i).push(r)}return[...i,...o]}function wc(e,t,n,i){const[r,a]=d([]),[h,u]=d([]),[f,g]=d([]),[p,y]=d([]),[m,b]=d(null),w=s(()=>{const t=/* @__PURE__ */new Map;for(const n of e)t.set(n.id,n);return t},[e]),x=s(()=>e.filter(e=>null!=t[e.id]),[e,t]),v=s(()=>e.map(e=>e.id).join(","),[e]),k=c(null);l(()=>()=>{k.current=null},[]),l(()=>{if(k.current===v)return;k.current=v;const n=e.filter(e=>!(e.id in t)),i=e.filter(e=>null!=t[e.id]);a(n.map(e=>e.id)),u(bc(n,i).slice(0,3).map(e=>e.id)),g([]),y([]),b(null)},[v,e,t]);const B=s(()=>i?new Set(e.filter(e=>i(e)).map(e=>e.id)):/* @__PURE__ */new Set,[e,i]),C=s(()=>{const e=new Set(f);return[...bc(r.map(e=>w.get(e)).filter(e=>!!e&&!B.has(e.id)).filter(t=>!e.has(t.id)),x).map(e=>e.id),...f.filter(e=>r.includes(e)&&!B.has(e))]},[r,w,x,f,B]);l(()=>{u(e=>{const t=new Set(r),n=e.filter(e=>t.has(e)&&!B.has(e));if(0===p.length&&!m){const t=C.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 i=[...n];for(const o of C){if(i.length>=3)break;i.includes(o)||i.push(o)}return i})},[r,C,p,m,B]);const S=s(()=>h.map(e=>w.get(e)).filter(e=>Boolean(e)),[h,w]),z=o((e,t)=>{b(null),t&&n(e,t),y(n=>[...n,{id:e,answer:t}]),u(t=>t.filter(t=>t!==e)),g(n=>{const i=n.filter(t=>t!==e);return t?i:[...i,e]}),a(n=>{const i=n.filter(t=>t!==e);return t?i:[...i,e]})},[n]),W=o(()=>{const e=p[p.length-1];e&&(e.answer&&n(e.id,e.answer),b({id:e.id,from:"yes"===e.answer?"right":"no"===e.answer?"left":"up"}),y(e=>e.slice(0,-1)),g(t=>t.filter(t=>t!==e.id)),a(t=>[e.id,...t.filter(t=>t!==e.id)]),u(t=>[e.id,...t.filter(t=>t!==e.id)].slice(0,3)))},[p,n]),F=o(e=>null!=t[e]&&w.has(e),[w,t]),A=o(e=>{const i=t[e];i&&w.has(e)&&(n(e,i),b({id:e,from:"yes"===i?"right":"left"}),y(t=>t.filter(t=>t.id!==e)),g(t=>t.filter(t=>t!==e)),a(t=>[e,...t.filter(t=>t!==e)]),u(t=>[e,...t.filter(t=>t!==e)].slice(0,3)))},[w,t,n]);return{visible:S,canSkip:r.filter(e=>!B.has(e)).length>1,canUndo:p.length>0,restored:m,resolve:z,undo:W,canRecall:F,recall:A}}function xc({view:e}){const{theme:t}=ml(),n=t.colors;/* @__PURE__ */
268
+ return U(W,{testID:"correlation-loading",accessibilityLiveRegion:"polite",accessibilityLabel:"Updating available choices",children:[/* @__PURE__ */E(fi,{style:{color:n.textMuted,fontSize:12,marginBottom:12},children:"Updating available choices…"}),"list"===e?/* @__PURE__ */E(W,{style:{gap:12},children:[0,1,2].map(e=>/* @__PURE__ */U(W,{style:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",gap:12,padding:16,borderWidth:1,borderColor:n.border,borderRadius:sn(t,12),backgroundColor:n.selectionCard??n.backgroundAlt},children:[/* @__PURE__ */E(Os,{color:n.textMuted,style:{height:16,flex:1,maxWidth:"58%",borderRadius:sn(t,4)}}),/* @__PURE__ */E(W,{style:{flexDirection:"row",gap:8},children:[0,1].map(e=>/* @__PURE__ */E(Os,{color:n.textMuted,style:{height:32,width:48,borderRadius:sn(t,8)}},e))})]},e))}):/* @__PURE__ */U(W,{style:{width:"100%",maxWidth:384,alignSelf:"center",height:300,borderWidth:1,borderColor:n.border,backgroundColor:n.backgroundAlt,borderRadius:sn(t,16),padding:20,gap:16},children:[
269
+ /* @__PURE__ */E(Os,{color:n.textMuted,style:{height:16,width:"65%",borderRadius:sn(t,4)}}),
270
+ /* @__PURE__ */E(Os,{color:n.textMuted,style:{height:128,borderRadius:sn(t,12)}}),
271
+ /* @__PURE__ */E(Os,{color:n.textMuted,style:{height:20,borderRadius:sn(t,4)}})]})]})}var vc=p.bezier(.32,0,.67,0),kc=p.bezier(.22,1,.36,1),Bc={stiffness:420,damping:34},Cc={stiffness:280,damping:28},Sc=(e,t)=>"web"===w.OS?{userSelect:"none",cursor:e?"grabbing":"grab",touchAction:t?"none":"pan-y"}:null;function zc(e){return"up"===e?{x:0,y:-720}:{x:"right"===e?640:-640,y:70}}function Wc(e,t,n){return n&&-t>Math.abs(e)}function Fc({prop:e,theme:t,depth:n=0,enterFrom:i,canSkip:a=!1,variant:h="stack",onResolve:u,registerApi:g,onDragStateChange:p,claimTouchStart:y=!1,children:m}){const w=r(pl),x=t??w?.theme??Fn,v=c(w?.canSelectAnswer);v.current=w?.canSelectAnswer;const k=Nr(x),C=Fi(),S=gn(x),z=pn(x),F=0===n,A="run"===h,[P,T]=d(!1),D=c(!1),H=c({x:0,y:0}),M=c({x:0,y:0}),L=c(null),R=c(0),I=c(null),O=c(null),G=c(null),V=c(a);V.current=a;const Y=c(y);Y.current=y;const N=c(p);N.current=p;const X=c(new f.ValueXY({x:0,y:0})).current,q=c(new f.Value(0)).current,K=o(()=>{X.setValue({x:H.current.x,y:H.current.y}),q.setValue(Wc(H.current.x,H.current.y,V.current)?1:0)},[q,X]),Q=o(()=>{null!=I.current&&(cancelAnimationFrame(I.current),I.current=null),O.current&&(O.current.stop(),O.current=null)},[]),J=o(e=>{Q();let t=null;const n=i=>{const o=Math.min(null==t?1/60:(i-t)/1e3,1/30);t=i;const r=H.current,l=M.current;if(l.x+=(-e.stiffness*r.x-e.damping*l.x)*o,l.y+=(-e.stiffness*r.y-e.damping*l.y)*o,r.x+=l.x*o,r.y+=l.y*o,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,K(),void(I.current=null);K(),I.current=requestAnimationFrame(n)};I.current=requestAnimationFrame(n)},[K,Q]),Z=o(t=>{if(D.current)return;if("up"===t&&!V.current)return;const n="right"===t?"yes":"left"===t?"no":null;if(n&&v.current&&!v.current(e.id,n))return void J(Bc);D.current=!0,Q();const i="right"===t?"yes":"left"===t?"no":null,o=zc(t);H.current={...o},q.setValue("up"===t?1:0),O.current=f.timing(X,{toValue:o,duration:260,easing:vc,useNativeDriver:!1}),O.current.start(),G.current=setTimeout(()=>{if(i&&v.current&&!v.current(e.id,i))return D.current=!1,void J(Bc);u(e.id,i)},260)},[u,e.id,Q,q,X,J]);l(()=>()=>{G.current&&clearTimeout(G.current),null!=I.current&&cancelAnimationFrame(I.current),O.current?.stop(),L.current&&N.current?.(!1)},[]),l(()=>{if(!i)return Q(),H.current={x:0,y:0},M.current={x:0,y:0},void K();const e=zc(i);H.current={x:e.x,y:e.y},M.current={x:0,y:0},K(),J(Cc)},[i,K,J,Q]),l(()=>{if(F&&g)return g({fly:Z}),()=>g(null)},[Z,F,g]);const $=s(()=>b.create({onStartShouldSetPanResponder:()=>Y.current&&!D.current,onMoveShouldSetPanResponder:(e,t)=>!D.current&&(Math.abs(t.dx)>2&&Math.abs(t.dx)>Math.abs(t.dy)||V.current&&-t.dy>2&&-t.dy>Math.abs(t.dx)),onPanResponderGrant:()=>{Q(),L.current={x:H.current.x,y:H.current.y},M.current={x:0,y:0},R.current=Date.now(),T(!0),N.current?.(!0)},onPanResponderMove:(e,t)=>{if(D.current||!L.current)return;if(t.numberActiveTouches>1)return;const n=L.current.x+t.dx,i=Math.min(L.current.y+t.dy,0),o=e.nativeEvent.timestamp??Date.now(),r=o-R.current;if(r>0){const e=1-Math.exp(-r/40);M.current.x+=((n-H.current.x)/r*1e3-M.current.x)*e,M.current.y+=((i-H.current.y)/r*1e3-M.current.y)*e,R.current=o}H.current.x=n,H.current.y=i,K()},onPanResponderRelease:e=>{if(!L.current)return;if(L.current=null,T(!1),N.current?.(!1),D.current)return;(e.nativeEvent.timestamp??Date.now())-R.current>90&&(M.current={x:0,y:0});const t=H.current,n=M.current;if(Wc(t.x,t.y,V.current)){if(t.y<-110||n.y<-620)return Z("up")}else{if(t.x>110||n.x>620)return Z("right");if(t.x<-110||n.x<-620)return Z("left")}J(Bc)},onPanResponderTerminate:()=>{L.current=null,M.current={x:0,y:0},T(!1),N.current?.(!1),D.current||J(Bc)},onPanResponderTerminationRequest:()=>!1,onShouldBlockNativeResponder:()=>!0}),[Z,K,J,Q]),_=X.x.interpolate({inputRange:[-260,0,260],outputRange:["-16deg","0deg","16deg"],extrapolate:"clamp"}),ee=f.subtract(1,q),te=f.multiply(ee,X.x.interpolate({inputRange:[24,132],outputRange:[0,1],extrapolate:"clamp"})),ne=f.multiply(ee,X.x.interpolate({inputRange:[-132,-24],outputRange:[1,0],extrapolate:"clamp"})),ie=f.multiply(q,X.y.interpolate({inputRange:[-120,-30],outputRange:[1,0],extrapolate:"clamp"})),oe=X.x.interpolate({inputRange:[-640,-200,0,200,640],outputRange:[0,.5,1,.5,0],extrapolate:"clamp"}),re=c(new f.Value(n)).current;l(()=>{const e=f.timing(re,{toValue:n,duration:240,easing:kc,useNativeDriver:!1});return e.start(),()=>e.stop()},[n,re]);const le=re.interpolate({inputRange:[0,3],outputRange:[0,36]}),ae=re.interpolate({inputRange:[0,3],outputRange:[1,.88]}),se={opacity:re.interpolate({inputRange:[0,1],outputRange:[1,0],extrapolate:"clamp"}),transform:[{translateY:re.interpolate({inputRange:[0,1],outputRange:[0,30],extrapolate:"clamp"})},{scale:re.interpolate({inputRange:[0,1],outputRange:[1,.97],extrapolate:"clamp"})}]};/* @__PURE__ */
272
+ return E(f.View,{style:[B.absoluteFill,{zIndex:3-n},A?se:{transform:[{translateY:le},{scale:ae}]}],pointerEvents:F?"auto":"none",children:/* @__PURE__ */U(f.View,{style:[{flex:1,transform:[{translateX:X.x},{translateY:X.y},{rotate:_}]},A&&{opacity:oe},F&&Sc(P,a)],...F?$.panHandlers:{},children:[m,F&&!A&&/* @__PURE__ */U(j,{children:[
273
+ /* @__PURE__ */E(f.View,{pointerEvents:"none",style:[Lc.stamp,Lc.stampLeft,{borderRadius:sn(x,12),opacity:te,borderColor:S,transform:[{rotate:"-12deg"}]}],children:/* @__PURE__ */E(fi,{style:[Lc.stampText,{color:S,fontFamily:k}],children:C.yes})}),
274
+ /* @__PURE__ */E(f.View,{pointerEvents:"none",style:[Lc.stamp,Lc.stampRight,{borderRadius:sn(x,12),opacity:ne,borderColor:z,transform:[{rotate:"12deg"}]}],children:/* @__PURE__ */E(fi,{style:[Lc.stampText,{color:z,fontFamily:k}],children:C.no})}),a&&/* @__PURE__ */E(f.View,{pointerEvents:"none",style:[Lc.skipPillWrap,{opacity:ie}],children:/* @__PURE__ */E(W,{style:[Lc.skipPill,{borderRadius:sn(x,999),borderColor:x.colors.border,backgroundColor:x.colors.background}],children:/* @__PURE__ */E(fi,{style:[Lc.skipPillText,{color:x.colors.primary}],children:"Skip"})})})]})]})})}function Ac({prop:e}){const{theme:t,headingFont:n,renderTeamLogo:i,renderPropositionSilk:o,displaySportName:r,gameCategory:l,compositeComponentById:a}=ml(),s=t.colors,{height:c}=F(),d=c<700?12:24,h=pe(e,a),u=ce(e),f=("racing"===l?[e.away_team?.trim()||e.home_team?.trim()]:[e.home_team?.trim(),e.away_team?.trim()]).filter(Boolean),g=(t,n)=>t&&o?.(t,n)||hc(t??e,i,f.join(" vs "))||null;/* @__PURE__ */
275
+ return U(W,{style:[Lc.face,{borderRadius:sn(t,24),backgroundColor:kn(t),borderColor:s.border}],children:[
276
+ /* @__PURE__ */E(W,{style:[Lc.matchupBand,{backgroundColor:Bn(t)}],children:f.length>0?/* @__PURE__ */E(W,{style:Lc.matchupClip,children:/* @__PURE__ */E(W,{style:Lc.matchupRow,children:f.map((e,n)=>/* @__PURE__ */U(W,{style:Lc.matchupTeam,children:[
277
+ /* @__PURE__ */E(fi,{style:[Lc.matchupVs,{color:vn(t)}],children:n>0?"vs":""}),i?.(e),
278
+ /* @__PURE__ */E(fi,{style:[Lc.matchupName,{color:xn(t)}],children:e})]},`${e}-${n}`))})}):/* @__PURE__ */E(fi,{style:[Lc.matchupName,{color:xn(t)}],children:e.league??r(e.sport??"")})}),
279
+ /* @__PURE__ */E(W,{style:[Lc.faceBody,{paddingVertical:d,gap:12===d?12:16}],children:/* @__PURE__ */U(W,{style:Lc.propositionRow,children:[!h&&g(e,32),h?/* @__PURE__ */U(W,{style:{flex:1,gap:12},children:[/* @__PURE__ */U(fi,{style:[Lc.compositeLabel,{color:un(t)}],children:["All ","OR"===h.operator?"or any of these":"of these"]}),/* @__PURE__ */E(W,{style:{gap:8},children:h.legs.map((e,i)=>/* @__PURE__ */U(W,{style:Lc.compositeLeg,children:[
280
280
  /* @__PURE__ */E(fi,{style:{color:s.primary,fontWeight:"700"},children:"OR"===h.operator?"/":"+"}),g(e.prop,24),
281
- /* @__PURE__ */U(W,{style:Mc.compositeLegBody,children:[e.eventLabel?/* @__PURE__ */E(fi,{style:[Mc.compositeLegEvent,{color:s.textMuted}],children:e.eventLabel}):null,/* @__PURE__ */E(fi,{style:[Mc.compositeLegText,{color:fn(t),fontFamily:n}],children:e.text})]})]},i))})]}):/* @__PURE__ */E(fi,{style:[Mc.proposition,{flex:1,color:fn(t),fontFamily:n}],children:e.description??e.proposition})]})}),
282
- /* @__PURE__ */U(W,{style:[Mc.faceFooter,{borderTopColor:s.borderSubtle??s.border}],children:[e.sport?/* @__PURE__ */E(W,{style:[Mc.sportChip,{borderRadius:sn(t,999),backgroundColor:s.infoBg}],children:/* @__PURE__ */E(fi,{style:[Mc.sportChipText,{color:s.infoText}],children:r(e.sport)})}):null,u?/* @__PURE__ */E(fi,{style:[Mc.footerMeta,{color:s.textMuted}],children:u.replace(/[_-]+/g," ").toUpperCase()}):null,e.commence_time?/* @__PURE__ */E(fi,{style:[Mc.footerMeta,Mc.footerDate,{color:s.textMuted}],children:mt(e.commence_time)}):null]})]})}function Ac({number:e,color:t,answer:n,launch:i,onRecall:o,theme:r}){const a=Fi(),s=c(null),h=c(new f.Value(i?1:0)).current,[u,g]=d(!!i);return l(()=>{const o=s.current&&i?.current?.(n,s.current,{number:e,color:t},()=>g(!1));if(o)return o;g(!1),h.setValue(0);const r=f.timing(h,{toValue:1,duration:450,easing:p.bezier(.3,1.4,.5,1),useNativeDriver:"web"!==w.OS});return r.start(),()=>r.stop()},[h]),/* @__PURE__ */E(f.View,{ref:s,style:[Mc.pickTile,{borderRadius:sn(r,7),backgroundColor:t,opacity:u?0:h.interpolate({inputRange:[0,1],outputRange:[0,1],extrapolate:"clamp"}),transform:[{translateY:h.interpolate({inputRange:[0,1],outputRange:[-40,0]})},{scale:h.interpolate({inputRange:[0,1],outputRange:[.6,1]})}]}],children:/* @__PURE__ */E(z,{onPress:o,disabled:!o,accessibilityRole:"button",accessibilityLabel:`Change pick ${e}, ${"yes"===n?a.yes:a.no}`,style:Mc.pickTileHit,children:/* @__PURE__ */E(fi,{style:[Mc.pickTileText,{color:yn(t)}],children:e})})})}function Pc({launch:e,onRecall:t,canRecall:n}){const{selections:i,theme:o,pickOrder:r}=yl(),a=ra(o),s=c(!1);return l(()=>{s.current=!0},[]),/* @__PURE__ */U(W,{accessibilityLabel:"Your picks",style:Mc.pickStack,children:[0===r.length&&/* @__PURE__ */E(fi,{style:[Mc.pickStackCap,{color:a.colors.textMuted}],children:"YOUR STACK"}),r.map((o,r)=>/* @__PURE__ */E(Ac,{number:r+1,answer:"yes"===i[o]?"yes":"no",color:"yes"===i[o]?gn(a):pn(a),launch:s.current?e??null:null,onRecall:t&&n?.(o)?()=>t(o):void 0,theme:a},o))]})}function Tc({flight:e,onLand:t,theme:n}){const i=c(new f.Value(0)).current;l(()=>{const n=f.timing(i,{toValue:1,duration:520,easing:p.bezier(.45,.05,.3,1),useNativeDriver:"web"!==w.OS});return n.start(({finished:n})=>{n&&t(e)}),()=>n.stop()},[e,t,i]);const o=e=>i.interpolate({inputRange:[0,.55,1],outputRange:e});/* @__PURE__ */
283
- return E(f.View,{pointerEvents:"none",style:[Mc.pickTile,Mc.flyer,{borderRadius:sn(n,7),left:e.x,top:e.y,width:e.width,height:e.height,backgroundColor:e.color,transform:[{translateX:o([0,.6*e.dx,e.dx])},{translateY:o([0,.5*e.dy-60,e.dy])},{scale:o([1.4,1.1,1])},{rotate:o(["0deg","10deg","0deg"])}]}],children:/* @__PURE__ */E(fi,{style:[Mc.pickTileText,{color:yn(e.color)}],children:e.number})})}function Dc({onFly:e,onUndo:t,canUndo:n,canSkip:i,canAnswer:r,launch:a}){const{theme:s,headingFont:u}=yl(),f=ra(s),g=Fi(),p=c(null),y=c(null),m=c(null),[b,w]=d([]),x=c(!1);l(()=>{h.isReduceMotionEnabled?.()?.then(e=>{x.current=e}).catch(()=>{})},[]),l(()=>{if(!a)return;let e=0;return a.current=(t,n,i,o)=>{const r=("yes"===t?y:m).current,l=p.current;if(x.current||!r||!l||"function"!=typeof n.measureInWindow)return null;const a=e++;let s=!1;return l.measureInWindow((e,t)=>r.measureInWindow((r,l,c,d)=>n.measureInWindow((n,h,u,f)=>{if(s)return;const g=r+c/2-u/2,p=l+d/2-f/2;w(r=>[...r,{key:a,x:g-e,y:p-t,dx:n-g,dy:h-p,width:u,height:f,...i,land:o}])}))),()=>{s=!0,w(e=>e.filter(e=>e.key!==a))}},()=>{a.current=null}},[a]);const v=o(e=>{w(t=>t.filter(t=>t.key!==e.key)),e.land()},[]),k=t=>{const n="yes"===t,i=!r(t);/* @__PURE__ */
284
- return U(z,{ref:n?y:m,onPress:()=>e(n?"right":"left"),disabled:i,accessibilityRole:"button",accessibilityLabel:n?g.yes:g.no,style:[Mc.pad,{borderRadius:sn(s,20),backgroundColor:n?gn(s):pn(s)},i&&Mc.disabled],children:[/* @__PURE__ */E(fi,{style:[Mc.padText,{color:yn(n?gn(s):pn(s)),fontFamily:u}],children:n?g.yes:g.no}),/* @__PURE__ */E(fi,{style:[Mc.padHint,{color:yn(n?gn(s):pn(s))}],children:n?"SWIPE RIGHT":"SWIPE LEFT"})]})},B=(e,t,n,i)=>/* @__PURE__ */E(vi,{theme:f,variant:"quiet",onPress:n,disabled:i,accessibilityLabel:t,children:e});/* @__PURE__ */
281
+ /* @__PURE__ */U(W,{style:Lc.compositeLegBody,children:[e.eventLabel?/* @__PURE__ */E(fi,{style:[Lc.compositeLegEvent,{color:s.textMuted}],children:e.eventLabel}):null,/* @__PURE__ */E(fi,{style:[Lc.compositeLegText,{color:fn(t),fontFamily:n}],children:e.text})]})]},i))})]}):/* @__PURE__ */E(fi,{style:[Lc.proposition,{flex:1,color:fn(t),fontFamily:n}],children:e.description??e.proposition})]})}),
282
+ /* @__PURE__ */U(W,{style:[Lc.faceFooter,{borderTopColor:s.borderSubtle??s.border}],children:[e.sport?/* @__PURE__ */E(W,{style:[Lc.sportChip,{borderRadius:sn(t,999),backgroundColor:s.infoBg}],children:/* @__PURE__ */E(fi,{style:[Lc.sportChipText,{color:s.infoText}],children:r(e.sport)})}):null,u?/* @__PURE__ */E(fi,{style:[Lc.footerMeta,{color:s.textMuted}],children:u.replace(/[_-]+/g," ").toUpperCase()}):null,e.commence_time?/* @__PURE__ */E(fi,{style:[Lc.footerMeta,Lc.footerDate,{color:s.textMuted}],children:mt(e.commence_time)}):null]})]})}function Pc({number:e,color:t,answer:n,launch:i,onRecall:o,theme:r}){const a=Fi(),s=c(null),h=c(new f.Value(i?1:0)).current,[u,g]=d(!!i);return l(()=>{const o=s.current&&i?.current?.(n,s.current,{number:e,color:t},()=>g(!1));if(o)return o;g(!1),h.setValue(0);const r=f.timing(h,{toValue:1,duration:450,easing:p.bezier(.3,1.4,.5,1),useNativeDriver:"web"!==w.OS});return r.start(),()=>r.stop()},[h]),/* @__PURE__ */E(f.View,{ref:s,style:[Lc.pickTile,{borderRadius:sn(r,7),backgroundColor:t,opacity:u?0:h.interpolate({inputRange:[0,1],outputRange:[0,1],extrapolate:"clamp"}),transform:[{translateY:h.interpolate({inputRange:[0,1],outputRange:[-40,0]})},{scale:h.interpolate({inputRange:[0,1],outputRange:[.6,1]})}]}],children:/* @__PURE__ */E(z,{onPress:o,disabled:!o,accessibilityRole:"button",accessibilityLabel:`Change pick ${e}, ${"yes"===n?a.yes:a.no}`,style:Lc.pickTileHit,children:/* @__PURE__ */E(fi,{style:[Lc.pickTileText,{color:yn(t)}],children:e})})})}function Tc({launch:e,onRecall:t,canRecall:n}){const{selections:i,theme:o,pickOrder:r}=ml(),a=la(o),s=c(!1);return l(()=>{s.current=!0},[]),/* @__PURE__ */U(W,{accessibilityLabel:"Your picks",style:Lc.pickStack,children:[0===r.length&&/* @__PURE__ */E(fi,{style:[Lc.pickStackCap,{color:a.colors.textMuted}],children:"YOUR STACK"}),r.map((o,r)=>/* @__PURE__ */E(Pc,{number:r+1,answer:"yes"===i[o]?"yes":"no",color:"yes"===i[o]?gn(a):pn(a),launch:s.current?e??null:null,onRecall:t&&n?.(o)?()=>t(o):void 0,theme:a},o))]})}function Dc({flight:e,onLand:t,theme:n}){const i=c(new f.Value(0)).current;l(()=>{const n=f.timing(i,{toValue:1,duration:520,easing:p.bezier(.45,.05,.3,1),useNativeDriver:"web"!==w.OS});return n.start(({finished:n})=>{n&&t(e)}),()=>n.stop()},[e,t,i]);const o=e=>i.interpolate({inputRange:[0,.55,1],outputRange:e});/* @__PURE__ */
283
+ return E(f.View,{pointerEvents:"none",style:[Lc.pickTile,Lc.flyer,{borderRadius:sn(n,7),left:e.x,top:e.y,width:e.width,height:e.height,backgroundColor:e.color,transform:[{translateX:o([0,.6*e.dx,e.dx])},{translateY:o([0,.5*e.dy-60,e.dy])},{scale:o([1.4,1.1,1])},{rotate:o(["0deg","10deg","0deg"])}]}],children:/* @__PURE__ */E(fi,{style:[Lc.pickTileText,{color:yn(e.color)}],children:e.number})})}function Hc({onFly:e,onUndo:t,canUndo:n,canSkip:i,canAnswer:r,launch:a}){const{theme:s,headingFont:u}=ml(),f=la(s),g=Fi(),p=c(null),y=c(null),m=c(null),[b,w]=d([]),x=c(!1);l(()=>{h.isReduceMotionEnabled?.()?.then(e=>{x.current=e}).catch(()=>{})},[]),l(()=>{if(!a)return;let e=0;return a.current=(t,n,i,o)=>{const r=("yes"===t?y:m).current,l=p.current;if(x.current||!r||!l||"function"!=typeof n.measureInWindow)return null;const a=e++;let s=!1;return l.measureInWindow((e,t)=>r.measureInWindow((r,l,c,d)=>n.measureInWindow((n,h,u,f)=>{if(s)return;const g=r+c/2-u/2,p=l+d/2-f/2;w(r=>[...r,{key:a,x:g-e,y:p-t,dx:n-g,dy:h-p,width:u,height:f,...i,land:o}])}))),()=>{s=!0,w(e=>e.filter(e=>e.key!==a))}},()=>{a.current=null}},[a]);const v=o(e=>{w(t=>t.filter(t=>t.key!==e.key)),e.land()},[]),k=t=>{const n="yes"===t,i=!r(t);/* @__PURE__ */
284
+ return U(z,{ref:n?y:m,onPress:()=>e(n?"right":"left"),disabled:i,accessibilityRole:"button",accessibilityLabel:n?g.yes:g.no,style:[Lc.pad,{borderRadius:sn(s,20),backgroundColor:n?gn(s):pn(s)},i&&Lc.disabled],children:[/* @__PURE__ */E(fi,{style:[Lc.padText,{color:yn(n?gn(s):pn(s)),fontFamily:u}],children:n?g.yes:g.no}),/* @__PURE__ */E(fi,{style:[Lc.padHint,{color:yn(n?gn(s):pn(s))}],children:n?"SWIPE RIGHT":"SWIPE LEFT"})]})},B=(e,t,n,i)=>/* @__PURE__ */E(vi,{theme:f,variant:"quiet",onPress:n,disabled:i,accessibilityLabel:t,children:e});/* @__PURE__ */
285
285
  return U(W,{ref:p,children:[
286
- /* @__PURE__ */U(W,{style:Mc.padRow,children:[k("no"),k("yes")]}),
287
- /* @__PURE__ */U(W,{style:Mc.runActions,children:[B("↺ Undo","Undo last swipe",t,!n),B("Skip ↑","Skip this proposition",()=>e("up"),!i)]}),b.map(e=>/* @__PURE__ */E(Tc,{flight:e,onLand:v,theme:s},e.key))]})}function Hc({onBack:e,onNext:t,viewSwitch:n,onDragStateChange:i}){const{theme:r,headingFont:a,propositions:d,selections:h,toggleSelection:u,selectedGame:f,selectedPropositionCount:g,answeredCount:p,selectionValid:y,goToConfirmation:m,goToSportSelection:b,loading:w,error:x,selectedRule:v,compositeComponentById:k,canSelectAnswer:C,correlationTargetCount:S,correlation:A,swipeVariant:P="stack"}=yl(),T="run"===P,D=r.colors,H=ra(r).colors.textMuted,M=Fi(),L=gn(r),R=pn(r),{height:I}=F(),O=Math.max(224,Math.min(.44*I,416)),G=c(null),V=c(null);l(()=>{f||(b(),e?.())},[b,e,f]);const Y=s(()=>Ge(d,h,k,f),[d,h,k,f]),N=o(e=>!xr(f)&&Y.isCapped(e),[Y,f]),{visible:X,canSkip:q,canUndo:K,restored:Q,resolve:J,undo:Z,canRecall:$,recall:_}=bc(d,h,u,N),ee=f?Wt(f,g??void 0,v):{min:0,max:0},te=xr(f)?S:ee.max,ne=te>0&&p>=te,ie=f?ee.min>0&&ee.min===ee.max?ee.min:ur(f,g)??(te>0?te:null):null,oe=c(p);l(()=>{const e=oe.current;if(oe.current=p,xr(f)||null==ie||e>=ie||p!==ie)return;const n=setTimeout(()=>{m(),t?.()},420);return()=>clearTimeout(n)},[p,m,t,ie]);const re=!ne&&X.length>0,le=o(e=>{G.current=e},[]);if(!f)return null;const ae=e=>!re||!(!X[0]||!C||C(X[0].id,e)),se=/* @__PURE__ */U(W,{style:[Mc.emptyState,{borderRadius:sn(r,24),backgroundColor:kn(r),borderColor:D.border}],children:[
288
- /* @__PURE__ */E(fi,{style:[Mc.emptyTitle,{color:hn(r),fontFamily:a}],children:ne?"Card full":"That’s the last one"}),
289
- /* @__PURE__ */E(fi,{style:[Mc.emptyBody,{color:D.textMuted}],children:ne?`You've picked all ${te} legs for ${f.game_name}. ${T?"Tap a pick":"Undo a swipe"} to change one, or lock it in.`:y?"You've been through every proposition. Lock your card in, or undo to revisit a pick.":`No propositions left to answer${ee.min>0?` — this game needs at least ${ee.min}`:""}. Undo a swipe or head back to widen the pool.`}),K&&/* @__PURE__ */E(vi,{theme:r,variant:"quiet",onPress:Z,children:"Undo last swipe"})]}),ce=(e,t,n,i)=>/* @__PURE__ */E(Ci,{theme:r,onPress:n,disabled:i,accessibilityLabel:e,children:/* @__PURE__ */E(fi,{style:{fontSize:18,color:Si(r)},children:t})});/* @__PURE__ */
290
- return U(W,{style:Mc.container,children:[n?/* @__PURE__ */E(W,{style:Mc.viewSwitchRow,children:n}):null,w?/* @__PURE__ */E(fi,{style:[Mc.loadingText,{color:H}],children:"Loading…"}):x?/* @__PURE__ */E(W,{style:[Mc.errorBox,{borderRadius:sn(r,12),backgroundColor:D.errorBg,borderColor:D.error}],children:/* @__PURE__ */E(fi,{style:{fontSize:14,color:D.errorText??D.error,textAlign:"center"},children:x})}):/* @__PURE__ */U(j,{children:[/* @__PURE__ */E(W,{style:Mc.deckArea,children:xr(f)&&A.loading?/* @__PURE__ */E(wc,{view:"swipe"}):re||T?/* @__PURE__ */U(W,{style:[Mc.deck,{height:O},T&&{maxWidth:void 0}],children:[/* @__PURE__ */U(W,{style:[B.absoluteFill,T&&{right:48}],children:[!re&&/* @__PURE__ */E(W,{style:Mc.emptyWrap,children:se}),re&&X.map((e,t)=>/* @__PURE__ */E(Wc,{prop:e,depth:t,canSkip:q,variant:P,enterFrom:Q?.id===e.id?Q.from:null,onResolve:J,registerApi:0===t?le:void 0,onDragStateChange:0===t?i:void 0,children:/* @__PURE__ */E(Fc,{prop:e})},e.id))]}),T&&/* @__PURE__ */E(Pc,{launch:V,onRecall:_,canRecall:$})]}):se}),T?/* @__PURE__ */E(Dc,{onFly:e=>G.current?.fly(e),onUndo:Z,canUndo:K,canSkip:re&&q,canAnswer:e=>!ae(e),launch:V}):/* @__PURE__ */U(W,{style:[Mc.buttonArea,{borderRadius:sn(r,16),backgroundColor:kn(r),borderColor:D.border}],children:[/* @__PURE__ */U(W,{style:Mc.buttonRow,children:[ce("Undo last swipe","↺",Z,!K),
291
- /* @__PURE__ */E(z,{onPress:()=>G.current?.fly("left"),disabled:ae("no"),style:[Mc.answerButton,{borderRadius:sn(r,999),backgroundColor:R},!re&&Mc.disabled],children:/* @__PURE__ */E(fi,{style:[Mc.answerButtonText,{color:yn(R),fontFamily:a}],children:M.no})}),
292
- /* @__PURE__ */E(z,{onPress:()=>G.current?.fly("right"),disabled:ae("yes"),style:[Mc.answerButton,{borderRadius:sn(r,999),backgroundColor:L},!re&&Mc.disabled],children:/* @__PURE__ */E(fi,{style:[Mc.answerButtonText,{color:yn(L),fontFamily:a}],children:M.yes})}),ce("Skip this proposition","↑",()=>G.current?.fly("up"),!re||!q)]}),/* @__PURE__ */E(fi,{style:[Mc.gestureHint,{color:D.textMuted}],children:`Swipe right for ${M.yes}, left for ${M.no}${q?" · ↑ to skip":""}`})]})]})]})}var Mc=B.create({container:{flex:1},viewSwitchRow:{flexDirection:"row",justifyContent:"flex-end",paddingBottom:12},loadingText:{paddingVertical:40,textAlign:"center",fontSize:14},errorBox:{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,borderWidth:1,overflow:"hidden",shadowColor:"#0A1416",shadowOpacity:.25,shadowRadius:20,shadowOffset:{width:0,height:12},elevation:8},matchupBand:{paddingHorizontal:20,paddingVertical:12},matchupClip:{overflow:"hidden"},matchupRow:{flexDirection:"row",flexWrap:"wrap",alignItems:"center",columnGap:6,rowGap:4,marginLeft:-26},matchupTeam:{flexDirection:"row",alignItems:"center",gap:6},matchupVs:{width:20,fontSize:12,textAlign:"center"},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},faceFooter:{flexDirection:"row",flexWrap:"wrap",alignItems:"center",gap:8,borderTopWidth:1,paddingHorizontal:20,paddingVertical:12},sportChip:{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,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,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,borderWidth:1,borderStyle:"dashed",paddingHorizontal:24,paddingVertical:40},emptyWrap:{flex:1,justifyContent:"center"},emptyTitle:{fontSize:16,fontWeight:"800"},emptyBody:{fontSize:14,textAlign:"center",lineHeight:19},buttonArea:{flexShrink:0,borderWidth:1,paddingHorizontal:12,paddingTop:12,paddingBottom:10},buttonRow:{flexDirection:"row",alignItems:"center",justifyContent:"center",gap:12,width:"100%",maxWidth:384,alignSelf:"center"},answerButton:{flex:1,height:56,alignItems:"center",justifyContent:"center"},answerButtonText:{fontSize:18,fontWeight:"800",letterSpacing:1.5,textTransform:"uppercase",color:"#ffffff"},gestureHint:{marginTop:8,textAlign:"center",fontSize:11},disabled:{opacity:.35},pickStack:{position:"absolute",top:0,bottom:0,right:0,width:40,flexDirection:"column",alignItems:"center",gap:5,overflow:"hidden"},pickStackCap:{fontSize:8,fontWeight:"800",letterSpacing:1.1,opacity:.6,transform:[{rotate:"-90deg"}],width:80,textAlign:"center",marginTop:36},pickTile:{width:32,height:28,flexShrink:1,minHeight:0,alignItems:"center",justifyContent:"center",shadowColor:"#000",shadowOpacity:.18,shadowRadius:0,shadowOffset:{width:3,height:3},elevation:2},pickTileText:{fontSize:12,fontWeight:"800",color:"#ffffff"},pickTileHit:{flex:1,alignSelf:"stretch",alignItems:"center",justifyContent:"center"},flyer:{position:"absolute",zIndex:80},padRow:{flexDirection:"row",gap:10},pad:{flex:1,height:80,alignItems:"center",justifyContent:"center",gap:2,shadowColor:"#000",shadowOpacity:.25,shadowRadius:0,shadowOffset:{width:0,height:6},elevation:4},padText:{fontSize:28,fontWeight:"800",letterSpacing:.6,textTransform:"uppercase",color:"#ffffff"},padHint:{fontSize:10,fontWeight:"700",letterSpacing:1.4,color:"#ffffff",opacity:.85},runActions:{flexDirection:"row",justifyContent:"space-between",alignItems:"center",marginTop:4}});function Lc({size:e=16,color:t}){/* @__PURE__ */
293
- return U(A,{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:t,strokeWidth:2.2,strokeLinecap:"round",strokeLinejoin:"round",children:[/* @__PURE__ */E(L,{x:8,y:3,width:12,height:16,rx:2.5}),/* @__PURE__ */E(H,{d:"M5 7.5v10A3.5 3.5 0 0 0 8.5 21H15"})]})}function Rc({propositions:e,title:t,onClose:n}){const{theme:i,selections:r,toggleSelection:l,compositeComponentById:a,selectedGame:d,swipeVariant:h="stack"}=yl(),u=i.colors,f="run"===h,{height:g}=F(),p=s(()=>Ge(e,r,a,d),[e,r,a,d]),y=o(e=>p.isCapped(e),[p]),{visible:b,canSkip:w,canUndo:x,restored:v,resolve:k,undo:C,canRecall:S,recall:A}=bc(e,r,l,y),P=c(null),T=c(null),D=o(e=>{P.current=e},[]),H=Nr(i),M=b.length>0,L=kn(i),R=Math.max(224,Math.min(.44*g,416)),I=(e,t,n,o)=>/* @__PURE__ */E(Ci,{theme:i,onPress:n,disabled:o,accessibilityLabel:e,children:/* @__PURE__ */E(fi,{style:{fontSize:18,color:Si(i)},children:t})}),O=Fi(),G=(e,t,n)=>/* @__PURE__ */E(z,{onPress:()=>P.current?.fly(e),disabled:!M,style:[Ic.answer,{borderRadius:sn(i,999),backgroundColor:n},!M&&Ic.disabled],children:/* @__PURE__ */E(fi,{style:[Ic.answerText,{color:yn(n),fontFamily:H}],children:t.toUpperCase()})});/* @__PURE__ */
294
- return E(oa,{children:/* @__PURE__ */E(m,{visible:!0,transparent:!0,animationType:"fade",onRequestClose:n,children:/* @__PURE__ */E(W,{style:Ic.backdrop,children:/* @__PURE__ */U(W,{style:[Ic.panel,{borderRadius:sn(i,24),backgroundColor:L,borderColor:u.border}],children:[
295
- /* @__PURE__ */U(W,{style:Ic.header,children:[/* @__PURE__ */E(fi,{numberOfLines:1,style:[Ic.title,{color:xn(i),fontFamily:H}],children:t}),/* @__PURE__ */E(Ci,{theme:i,size:32,onPress:n,accessibilityLabel:"Close",children:/* @__PURE__ */E(fi,{style:{fontSize:16,color:Si(i)},children:"×"})})]}),
296
- /* @__PURE__ */E(W,{style:Ic.deckArea,children:/* @__PURE__ */U(W,M?{style:[Ic.deck,{height:R}],children:[/* @__PURE__ */E(W,{style:[B.absoluteFill,f&&{right:48}],children:b.map((e,t)=>/* @__PURE__ */E(Wc,{prop:e,depth:t,canSkip:w,variant:h,enterFrom:v?.id===e.id?v.from:null,onResolve:k,registerApi:0===t?D:void 0,claimTouchStart:!0,children:/* @__PURE__ */E(Fc,{prop:e})},e.id))}),f&&/* @__PURE__ */E(Pc,{launch:T,onRecall:A,canRecall:S})]}:{style:[Ic.empty,{borderRadius:sn(i,24),borderColor:u.border}],children:[/* @__PURE__ */E(fi,{style:[Ic.emptyTitle,{color:hn(i),fontFamily:H}],children:"That’s the last one"}),/* @__PURE__ */E(fi,{style:[Ic.emptyBody,{color:u.textMuted}],children:"You’ve been through every proposition on this fixture. Close to go back to the card, or undo to revisit a pick."})]})}),f?/* @__PURE__ */E(Dc,{onFly:e=>P.current?.fly(e),onUndo:C,canUndo:x,canSkip:M&&w,canAnswer:()=>M,launch:T}):/* @__PURE__ */U(j,{children:[/* @__PURE__ */U(W,{style:Ic.buttonRow,children:[I("Undo last swipe","↺",C,!x),G("left",O.no,pn(i)),G("right",O.yes,gn(i)),I("Skip this proposition","↑",()=>P.current?.fly("up"),!M||!w)]}),/* @__PURE__ */E(fi,{style:[Ic.hint,{color:u.textMuted}],children:`Swipe right for ${O.yes}, left for ${O.no}${w?" · ↑ to skip":""}`})]})]})})})})}var Ic=B.create({backdrop:{flex:1,backgroundColor:"rgba(0,0,0,0.6)",alignItems:"center",justifyContent:"center",padding:16},panel:{width:"100%",maxWidth:420,borderWidth:1,padding:16,overflow:"hidden"},header:{flexDirection:"row",alignItems:"center",gap:8,marginBottom:12},title:{flex:1,minWidth:0,fontSize:14,fontWeight:"700"},deckArea:{justifyContent:"center",paddingTop:4,paddingBottom:12},deck:{width:"100%",alignSelf:"center"},empty:{alignItems:"center",gap:12,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},answer:{flex:1,height:56,alignItems:"center",justifyContent:"center"},answerText:{fontSize:18,fontWeight:"800",letterSpacing:1.5,color:"#fff"},hint:{marginTop:8,fontSize:11,textAlign:"center"},disabled:{opacity:.35}}),Oc=["split","split-inline","compact"];function jc(e){return new Intl.DateTimeFormat("en-AU",{weekday:"short",day:"numeric",month:"short"}).format(e).replace(",","")}function Ec(e){return new Intl.DateTimeFormat("en-AU",{hour:"numeric",minute:"2-digit",hour12:!0}).format(e).replace(/\s/g,"").toLowerCase()}function Uc(e){const t=(e??"").trim().split(/\s+/).filter(Boolean);return(t[t.length-1]??"").slice(0,3).toUpperCase()}function Gc(e){return e.home&&e.away?`${Uc(e.home)} v ${Uc(e.away)}`:e.title||"All questions"}function Vc(e){return e.home&&e.away?`${e.home} v ${e.away}`:e.title||"All questions"}function Yc(e){if(!e.commence_time)return null;const t=new Date(e.commence_time);return Number.isNaN(t.getTime())?null:t}function Nc(e){const t=e?.trim();if(t&&"undefined"!==t&&"null"!==t)return t}function Xc(e,t){const[n,i]=t?[]:e.split(" vs ").map(Nc);return n&&i?{home:n,away:i}:{}}function qc(e,t=!1){const n=Object.entries(e).map(([e,n])=>function(e,t,n){const[i,o]=n?[]:e.split(" vs ").map(Nc),{home:r,away:l}=Xc(e,n),a=t.map(Yc).filter(e=>null!==e),s=a.length>0?new Date(Math.min(...a.map(e=>e.getTime()))):null;return{key:e,title:n?e:i?[i,o].filter(Boolean).join(" vs "):Nc(t[0]?.league??void 0)??"",home:r,away:l,racing:n,date:s,props:t}}(e,n,t)),i=n.filter(e=>null!==e.date).sort((e,t)=>e.date.getTime()-t.date.getTime()),o=n.filter(e=>null===e.date),r=/* @__PURE__ */new Map;for(const a of i){const e=a.date.toDateString(),t=r.get(e);t?t.events.push(a):r.set(e,{key:e,label:jc(a.date),events:[a]})}const l=[...r.values()];return o.length>0&&l.push({key:"undated",label:"",events:o}),l}function Kc({theme:e,on:t,style:n,disabled:i,...o}){const{hovered:r,pressed:l,handlers:a}=wi(),s=t?null:ai(e.colors.primary,{hovered:r,pressed:l,disabled:!!i});/* @__PURE__ */
297
- return E(z,{...o,...a,disabled:i,activeOpacity:1,style:[n,s&&{borderColor:s.borderColor,backgroundColor:s.background},xi(l,!!i)]})}function Qc({theme:e,dir:t,label:n,onPress:i}){const o=oi().matchRail,r=ra(e),l=r.colors;/* @__PURE__ */
298
- return E(Kc,{theme:r,on:!1,accessibilityRole:"button",accessibilityLabel:n,accessibilityState:{disabled:!i},disabled:!i,onPress:i,style:{width:44,height:44,alignItems:"center",justifyContent:"center",borderRadius:sn(r,o.radius),borderWidth:1,borderColor:l.border,backgroundColor:r===e?kn(r):l.backgroundAlt,opacity:i?1:.4},children:/* @__PURE__ */E(A,{width:18,height:18,viewBox:"0 0 24 24",fill:"none",children:/* @__PURE__ */E(H,{d:t<0?"m15 6-6 6 6 6":"m9 6 6 6-6 6",stroke:l.text,strokeWidth:2.25,strokeLinecap:"round",strokeLinejoin:"round"})})})}var Jc=e=>e.title||"Available picks";function Zc({theme:e,events:t,page:n,per:i,picked:o,onGo:r,renderTeamLogo:a,racing:s=!1}){const h=oi().matchRail,u=ra(e),f=u.colors,g=e.colors,p=kn(e),y="button"===h.fill?g.buttonPrimary:g.primary,b="button"===h.fill?g.buttonPrimaryText:g.primaryText,x=bn(e),v=x===y?{backgroundColor:p,borderColor:y}:{backgroundColor:x,borderColor:x},[B,C]=d(!1),[S,z]=d(0),F=Math.min(240,Math.max(140,.22*S)),P=ll(S,F,8),T=(S-8*(P-1))/P,{start:D,end:M,prev:L,next:R}=n,I=s?"race":"match",O=t.slice(D,M).map(Jc).join(" · "),G=c(null);l(()=>B&&"web"===w.OS?function(e){const{style:t}=e.body,n=t.overflow;return t.overflow="hidden",()=>{t.overflow=n}}(yi(G.current)):void 0,[B]);const V=(e,t)=>/* @__PURE__ */U(W,{style:{flexDirection:"row",alignItems:"flex-start",gap:6,minWidth:0},children:[a?.(e,18),/* @__PURE__ */E(fi,{numberOfLines:2,style:{flexShrink:1,fontSize:13,lineHeight:18,fontWeight:"700",color:t},children:e})]}),Y=t=>({event:n,index:i})=>{const l=i>=D&&i<M,a=o(n),s=n.date?Ec(n.date):"",c=l?b:g.text;/* @__PURE__ */
299
- return U(Kc,{theme:e,on:l,accessibilityRole:"button",accessibilityState:{selected:l},accessibilityLabel:[Jc(n),[t,s].filter(Boolean).join(" "),a>0&&`${a} picked`].filter(Boolean).join(", "),onPress:()=>{return e=i,C(!1),void r(e);var e},style:{width:S?T:"100%",minHeight:76,gap:5,padding:10,borderRadius:sn(e,12),borderWidth:1,borderColor:l?y:g.border,backgroundColor:l?y:p},children:[n.home&&n.away?/* @__PURE__ */U(j,{children:[V(n.home,c),V(n.away,c)]}):/* @__PURE__ */E(fi,{numberOfLines:2,style:{fontSize:13,fontWeight:"700",color:c},children:Jc(n)}),/* @__PURE__ */U(W,{style:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",gap:6,marginTop:"auto"},children:[/* @__PURE__ */E(fi,{style:{fontSize:12,fontWeight:"600",color:c,opacity:.75},children:s}),a>0?/* @__PURE__ */U(fi,{style:{...v,borderWidth:1,paddingVertical:1,paddingHorizontal:7,borderRadius:sn(e,999),overflow:"hidden",color:y,fontSize:11,fontWeight:"800"},children:[a," picked"]}):null]})]},n.key)};/* @__PURE__ */
286
+ /* @__PURE__ */U(W,{style:Lc.padRow,children:[k("no"),k("yes")]}),
287
+ /* @__PURE__ */U(W,{style:Lc.runActions,children:[B("↺ Undo","Undo last swipe",t,!n),B("Skip ↑","Skip this proposition",()=>e("up"),!i)]}),b.map(e=>/* @__PURE__ */E(Dc,{flight:e,onLand:v,theme:s},e.key))]})}function Mc({onBack:e,onNext:t,viewSwitch:n,onDragStateChange:i}){const{theme:r,headingFont:a,propositions:d,selections:h,toggleSelection:u,selectedGame:f,selectedPropositionCount:g,answeredCount:p,selectionValid:y,goToConfirmation:m,goToSportSelection:b,loading:w,error:x,selectedRule:v,compositeComponentById:k,canSelectAnswer:C,correlationTargetCount:S,correlation:A,swipeVariant:P="stack"}=ml(),T="run"===P,D=r.colors,H=la(r).colors.textMuted,M=Fi(),L=gn(r),R=pn(r),{height:I}=F(),O=Math.max(224,Math.min(.44*I,416)),G=c(null),V=c(null);l(()=>{f||(b(),e?.())},[b,e,f]);const Y=s(()=>Ge(d,h,k,f),[d,h,k,f]),N=o(e=>!xr(f)&&Y.isCapped(e),[Y,f]),{visible:X,canSkip:q,canUndo:K,restored:Q,resolve:J,undo:Z,canRecall:$,recall:_}=wc(d,h,u,N),ee=f?Wt(f,g??void 0,v):{min:0,max:0},te=xr(f)?S:ee.max,ne=te>0&&p>=te,ie=f?ee.min>0&&ee.min===ee.max?ee.min:ur(f,g)??(te>0?te:null):null,oe=c(p);l(()=>{const e=oe.current;if(oe.current=p,xr(f)||null==ie||e>=ie||p!==ie)return;const n=setTimeout(()=>{m(),t?.()},420);return()=>clearTimeout(n)},[p,m,t,ie]);const re=!ne&&X.length>0,le=o(e=>{G.current=e},[]);if(!f)return null;const ae=e=>!re||!(!X[0]||!C||C(X[0].id,e)),se=/* @__PURE__ */U(W,{style:[Lc.emptyState,{borderRadius:sn(r,24),backgroundColor:kn(r),borderColor:D.border}],children:[
288
+ /* @__PURE__ */E(fi,{style:[Lc.emptyTitle,{color:hn(r),fontFamily:a}],children:ne?"Card full":"That’s the last one"}),
289
+ /* @__PURE__ */E(fi,{style:[Lc.emptyBody,{color:D.textMuted}],children:ne?`You've picked all ${te} legs for ${f.game_name}. ${T?"Tap a pick":"Undo a swipe"} to change one, or lock it in.`:y?"You've been through every proposition. Lock your card in, or undo to revisit a pick.":`No propositions left to answer${ee.min>0?` — this game needs at least ${ee.min}`:""}. Undo a swipe or head back to widen the pool.`}),K&&/* @__PURE__ */E(vi,{theme:r,variant:"quiet",onPress:Z,children:"Undo last swipe"})]}),ce=(e,t,n,i)=>/* @__PURE__ */E(Ci,{theme:r,onPress:n,disabled:i,accessibilityLabel:e,children:/* @__PURE__ */E(fi,{style:{fontSize:18,color:Si(r)},children:t})});/* @__PURE__ */
290
+ return U(W,{style:Lc.container,children:[n?/* @__PURE__ */E(W,{style:Lc.viewSwitchRow,children:n}):null,w?/* @__PURE__ */E(fi,{style:[Lc.loadingText,{color:H}],children:"Loading…"}):x?/* @__PURE__ */E(W,{style:[Lc.errorBox,{borderRadius:sn(r,12),backgroundColor:D.errorBg,borderColor:D.error}],children:/* @__PURE__ */E(fi,{style:{fontSize:14,color:D.errorText??D.error,textAlign:"center"},children:x})}):/* @__PURE__ */U(j,{children:[/* @__PURE__ */E(W,{style:Lc.deckArea,children:xr(f)&&A.loading?/* @__PURE__ */E(xc,{view:"swipe"}):re||T?/* @__PURE__ */U(W,{style:[Lc.deck,{height:O},T&&{maxWidth:void 0}],children:[/* @__PURE__ */U(W,{style:[B.absoluteFill,T&&{right:48}],children:[!re&&/* @__PURE__ */E(W,{style:Lc.emptyWrap,children:se}),re&&X.map((e,t)=>/* @__PURE__ */E(Fc,{prop:e,depth:t,canSkip:q,variant:P,enterFrom:Q?.id===e.id?Q.from:null,onResolve:J,registerApi:0===t?le:void 0,onDragStateChange:0===t?i:void 0,children:/* @__PURE__ */E(Ac,{prop:e})},e.id))]}),T&&/* @__PURE__ */E(Tc,{launch:V,onRecall:_,canRecall:$})]}):se}),T?/* @__PURE__ */E(Hc,{onFly:e=>G.current?.fly(e),onUndo:Z,canUndo:K,canSkip:re&&q,canAnswer:e=>!ae(e),launch:V}):/* @__PURE__ */U(W,{style:[Lc.buttonArea,{borderRadius:sn(r,16),backgroundColor:kn(r),borderColor:D.border}],children:[/* @__PURE__ */U(W,{style:Lc.buttonRow,children:[ce("Undo last swipe","↺",Z,!K),
291
+ /* @__PURE__ */E(z,{onPress:()=>G.current?.fly("left"),disabled:ae("no"),style:[Lc.answerButton,{borderRadius:sn(r,999),backgroundColor:R},!re&&Lc.disabled],children:/* @__PURE__ */E(fi,{style:[Lc.answerButtonText,{color:yn(R),fontFamily:a}],children:M.no})}),
292
+ /* @__PURE__ */E(z,{onPress:()=>G.current?.fly("right"),disabled:ae("yes"),style:[Lc.answerButton,{borderRadius:sn(r,999),backgroundColor:L},!re&&Lc.disabled],children:/* @__PURE__ */E(fi,{style:[Lc.answerButtonText,{color:yn(L),fontFamily:a}],children:M.yes})}),ce("Skip this proposition","↑",()=>G.current?.fly("up"),!re||!q)]}),/* @__PURE__ */E(fi,{style:[Lc.gestureHint,{color:D.textMuted}],children:`Swipe right for ${M.yes}, left for ${M.no}${q?" · ↑ to skip":""}`})]})]})]})}var Lc=B.create({container:{flex:1},viewSwitchRow:{flexDirection:"row",justifyContent:"flex-end",paddingBottom:12},loadingText:{paddingVertical:40,textAlign:"center",fontSize:14},errorBox:{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,borderWidth:1,overflow:"hidden",shadowColor:"#0A1416",shadowOpacity:.25,shadowRadius:20,shadowOffset:{width:0,height:12},elevation:8},matchupBand:{paddingHorizontal:20,paddingVertical:12},matchupClip:{overflow:"hidden"},matchupRow:{flexDirection:"row",flexWrap:"wrap",alignItems:"center",columnGap:6,rowGap:4,marginLeft:-26},matchupTeam:{flexDirection:"row",alignItems:"center",gap:6},matchupVs:{width:20,fontSize:12,textAlign:"center"},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},faceFooter:{flexDirection:"row",flexWrap:"wrap",alignItems:"center",gap:8,borderTopWidth:1,paddingHorizontal:20,paddingVertical:12},sportChip:{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,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,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,borderWidth:1,borderStyle:"dashed",paddingHorizontal:24,paddingVertical:40},emptyWrap:{flex:1,justifyContent:"center"},emptyTitle:{fontSize:16,fontWeight:"800"},emptyBody:{fontSize:14,textAlign:"center",lineHeight:19},buttonArea:{flexShrink:0,borderWidth:1,paddingHorizontal:12,paddingTop:12,paddingBottom:10},buttonRow:{flexDirection:"row",alignItems:"center",justifyContent:"center",gap:12,width:"100%",maxWidth:384,alignSelf:"center"},answerButton:{flex:1,height:56,alignItems:"center",justifyContent:"center"},answerButtonText:{fontSize:18,fontWeight:"800",letterSpacing:1.5,textTransform:"uppercase",color:"#ffffff"},gestureHint:{marginTop:8,textAlign:"center",fontSize:11},disabled:{opacity:.35},pickStack:{position:"absolute",top:0,bottom:0,right:0,width:40,flexDirection:"column",alignItems:"center",gap:5,overflow:"hidden"},pickStackCap:{fontSize:8,fontWeight:"800",letterSpacing:1.1,opacity:.6,transform:[{rotate:"-90deg"}],width:80,textAlign:"center",marginTop:36},pickTile:{width:32,height:28,flexShrink:1,minHeight:0,alignItems:"center",justifyContent:"center",shadowColor:"#000",shadowOpacity:.18,shadowRadius:0,shadowOffset:{width:3,height:3},elevation:2},pickTileText:{fontSize:12,fontWeight:"800",color:"#ffffff"},pickTileHit:{flex:1,alignSelf:"stretch",alignItems:"center",justifyContent:"center"},flyer:{position:"absolute",zIndex:80},padRow:{flexDirection:"row",gap:10},pad:{flex:1,height:80,alignItems:"center",justifyContent:"center",gap:2,shadowColor:"#000",shadowOpacity:.25,shadowRadius:0,shadowOffset:{width:0,height:6},elevation:4},padText:{fontSize:28,fontWeight:"800",letterSpacing:.6,textTransform:"uppercase",color:"#ffffff"},padHint:{fontSize:10,fontWeight:"700",letterSpacing:1.4,color:"#ffffff",opacity:.85},runActions:{flexDirection:"row",justifyContent:"space-between",alignItems:"center",marginTop:4}});function Rc({size:e=16,color:t}){/* @__PURE__ */
293
+ return U(A,{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:t,strokeWidth:2.2,strokeLinecap:"round",strokeLinejoin:"round",children:[/* @__PURE__ */E(L,{x:8,y:3,width:12,height:16,rx:2.5}),/* @__PURE__ */E(H,{d:"M5 7.5v10A3.5 3.5 0 0 0 8.5 21H15"})]})}function Ic({propositions:e,title:t,onClose:n}){const{theme:i,selections:r,toggleSelection:l,compositeComponentById:a,selectedGame:d,swipeVariant:h="stack"}=ml(),u=i.colors,f="run"===h,{height:g}=F(),p=s(()=>Ge(e,r,a,d),[e,r,a,d]),y=o(e=>p.isCapped(e),[p]),{visible:b,canSkip:w,canUndo:x,restored:v,resolve:k,undo:C,canRecall:S,recall:A}=wc(e,r,l,y),P=c(null),T=c(null),D=o(e=>{P.current=e},[]),H=Nr(i),M=b.length>0,L=kn(i),R=Math.max(224,Math.min(.44*g,416)),I=(e,t,n,o)=>/* @__PURE__ */E(Ci,{theme:i,onPress:n,disabled:o,accessibilityLabel:e,children:/* @__PURE__ */E(fi,{style:{fontSize:18,color:Si(i)},children:t})}),O=Fi(),G=(e,t,n)=>/* @__PURE__ */E(z,{onPress:()=>P.current?.fly(e),disabled:!M,style:[Oc.answer,{borderRadius:sn(i,999),backgroundColor:n},!M&&Oc.disabled],children:/* @__PURE__ */E(fi,{style:[Oc.answerText,{color:yn(n),fontFamily:H}],children:t.toUpperCase()})});/* @__PURE__ */
294
+ return E(ra,{children:/* @__PURE__ */E(m,{visible:!0,transparent:!0,animationType:"fade",onRequestClose:n,children:/* @__PURE__ */E(W,{style:Oc.backdrop,children:/* @__PURE__ */U(W,{style:[Oc.panel,{borderRadius:sn(i,24),backgroundColor:L,borderColor:u.border}],children:[
295
+ /* @__PURE__ */U(W,{style:Oc.header,children:[/* @__PURE__ */E(fi,{numberOfLines:1,style:[Oc.title,{color:xn(i),fontFamily:H}],children:t}),/* @__PURE__ */E(Ci,{theme:i,size:32,onPress:n,accessibilityLabel:"Close",children:/* @__PURE__ */E(fi,{style:{fontSize:16,color:Si(i)},children:"×"})})]}),
296
+ /* @__PURE__ */E(W,{style:Oc.deckArea,children:/* @__PURE__ */U(W,M?{style:[Oc.deck,{height:R}],children:[/* @__PURE__ */E(W,{style:[B.absoluteFill,f&&{right:48}],children:b.map((e,t)=>/* @__PURE__ */E(Fc,{prop:e,depth:t,canSkip:w,variant:h,enterFrom:v?.id===e.id?v.from:null,onResolve:k,registerApi:0===t?D:void 0,claimTouchStart:!0,children:/* @__PURE__ */E(Ac,{prop:e})},e.id))}),f&&/* @__PURE__ */E(Tc,{launch:T,onRecall:A,canRecall:S})]}:{style:[Oc.empty,{borderRadius:sn(i,24),borderColor:u.border}],children:[/* @__PURE__ */E(fi,{style:[Oc.emptyTitle,{color:hn(i),fontFamily:H}],children:"That’s the last one"}),/* @__PURE__ */E(fi,{style:[Oc.emptyBody,{color:u.textMuted}],children:"You’ve been through every proposition on this fixture. Close to go back to the card, or undo to revisit a pick."})]})}),f?/* @__PURE__ */E(Hc,{onFly:e=>P.current?.fly(e),onUndo:C,canUndo:x,canSkip:M&&w,canAnswer:()=>M,launch:T}):/* @__PURE__ */U(j,{children:[/* @__PURE__ */U(W,{style:Oc.buttonRow,children:[I("Undo last swipe","↺",C,!x),G("left",O.no,pn(i)),G("right",O.yes,gn(i)),I("Skip this proposition","↑",()=>P.current?.fly("up"),!M||!w)]}),/* @__PURE__ */E(fi,{style:[Oc.hint,{color:u.textMuted}],children:`Swipe right for ${O.yes}, left for ${O.no}${w?" · ↑ to skip":""}`})]})]})})})})}var Oc=B.create({backdrop:{flex:1,backgroundColor:"rgba(0,0,0,0.6)",alignItems:"center",justifyContent:"center",padding:16},panel:{width:"100%",maxWidth:420,borderWidth:1,padding:16,overflow:"hidden"},header:{flexDirection:"row",alignItems:"center",gap:8,marginBottom:12},title:{flex:1,minWidth:0,fontSize:14,fontWeight:"700"},deckArea:{justifyContent:"center",paddingTop:4,paddingBottom:12},deck:{width:"100%",alignSelf:"center"},empty:{alignItems:"center",gap:12,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},answer:{flex:1,height:56,alignItems:"center",justifyContent:"center"},answerText:{fontSize:18,fontWeight:"800",letterSpacing:1.5,color:"#fff"},hint:{marginTop:8,fontSize:11,textAlign:"center"},disabled:{opacity:.35}}),jc=["split","split-inline","compact"];function Ec(e){return new Intl.DateTimeFormat("en-AU",{weekday:"short",day:"numeric",month:"short"}).format(e).replace(",","")}function Uc(e){return new Intl.DateTimeFormat("en-AU",{hour:"numeric",minute:"2-digit",hour12:!0}).format(e).replace(/\s/g,"").toLowerCase()}function Gc(e){const t=(e??"").trim().split(/\s+/).filter(Boolean);return(t[t.length-1]??"").slice(0,3).toUpperCase()}function Vc(e){return e.home&&e.away?`${Gc(e.home)} v ${Gc(e.away)}`:e.title||"All questions"}function Yc(e){return e.home&&e.away?`${e.home} v ${e.away}`:e.title||"All questions"}function Nc(e){if(!e.commence_time)return null;const t=new Date(e.commence_time);return Number.isNaN(t.getTime())?null:t}function Xc(e){const t=e?.trim();if(t&&"undefined"!==t&&"null"!==t)return t}function qc(e,t){const[n,i]=t?[]:e.split(" vs ").map(Xc);return n&&i?{home:n,away:i}:{}}function Kc(e,t=!1){const n=Object.entries(e).map(([e,n])=>function(e,t,n){const[i,o]=n?[]:e.split(" vs ").map(Xc),{home:r,away:l}=qc(e,n),a=t.map(Nc).filter(e=>null!==e),s=a.length>0?new Date(Math.min(...a.map(e=>e.getTime()))):null;return{key:e,title:n?e:i?[i,o].filter(Boolean).join(" vs "):Xc(t[0]?.league??void 0)??"",home:r,away:l,racing:n,date:s,props:t}}(e,n,t)),i=n.filter(e=>null!==e.date).sort((e,t)=>e.date.getTime()-t.date.getTime()),o=n.filter(e=>null===e.date),r=/* @__PURE__ */new Map;for(const a of i){const e=a.date.toDateString(),t=r.get(e);t?t.events.push(a):r.set(e,{key:e,label:Ec(a.date),events:[a]})}const l=[...r.values()];return o.length>0&&l.push({key:"undated",label:"",events:o}),l}function Qc({theme:e,on:t,style:n,disabled:i,...o}){const{hovered:r,pressed:l,handlers:a}=wi(),s=t?null:ai(e.colors.primary,{hovered:r,pressed:l,disabled:!!i});/* @__PURE__ */
297
+ return E(z,{...o,...a,disabled:i,activeOpacity:1,style:[n,s&&{borderColor:s.borderColor,backgroundColor:s.background},xi(l,!!i)]})}function Jc({theme:e,dir:t,label:n,onPress:i}){const o=oi().matchRail,r=la(e),l=r.colors;/* @__PURE__ */
298
+ return E(Qc,{theme:r,on:!1,accessibilityRole:"button",accessibilityLabel:n,accessibilityState:{disabled:!i},disabled:!i,onPress:i,style:{width:44,height:44,alignItems:"center",justifyContent:"center",borderRadius:sn(r,o.radius),borderWidth:1,borderColor:l.border,backgroundColor:r===e?kn(r):l.backgroundAlt,opacity:i?1:.4},children:/* @__PURE__ */E(A,{width:18,height:18,viewBox:"0 0 24 24",fill:"none",children:/* @__PURE__ */E(H,{d:t<0?"m15 6-6 6 6 6":"m9 6 6 6-6 6",stroke:l.text,strokeWidth:2.25,strokeLinecap:"round",strokeLinejoin:"round"})})})}var Zc=e=>e.title||"Available picks";function $c({theme:e,events:t,page:n,per:i,picked:o,onGo:r,renderTeamLogo:a,racing:s=!1}){const h=oi().matchRail,u=la(e),f=u.colors,g=e.colors,p=kn(e),y="button"===h.fill?g.buttonPrimary:g.primary,b="button"===h.fill?g.buttonPrimaryText:g.primaryText,x=bn(e),v=x===y?{backgroundColor:p,borderColor:y}:{backgroundColor:x,borderColor:x},[B,C]=d(!1),[S,z]=d(0),F=Math.min(240,Math.max(140,.22*S)),P=al(S,F,8),T=(S-8*(P-1))/P,{start:D,end:M,prev:L,next:R}=n,I=s?"race":"match",O=t.slice(D,M).map(Zc).join(" · "),G=c(null);l(()=>B&&"web"===w.OS?function(e){const{style:t}=e.body,n=t.overflow;return t.overflow="hidden",()=>{t.overflow=n}}(yi(G.current)):void 0,[B]);const V=(e,t)=>/* @__PURE__ */U(W,{style:{flexDirection:"row",alignItems:"flex-start",gap:6,minWidth:0},children:[a?.(e,18),/* @__PURE__ */E(fi,{numberOfLines:2,style:{flexShrink:1,fontSize:13,lineHeight:18,fontWeight:"700",color:t},children:e})]}),Y=t=>({event:n,index:i})=>{const l=i>=D&&i<M,a=o(n),s=n.date?Uc(n.date):"",c=l?b:g.text;/* @__PURE__ */
299
+ return U(Qc,{theme:e,on:l,accessibilityRole:"button",accessibilityState:{selected:l},accessibilityLabel:[Zc(n),[t,s].filter(Boolean).join(" "),a>0&&`${a} picked`].filter(Boolean).join(", "),onPress:()=>{return e=i,C(!1),void r(e);var e},style:{width:S?T:"100%",minHeight:76,gap:5,padding:10,borderRadius:sn(e,12),borderWidth:1,borderColor:l?y:g.border,backgroundColor:l?y:p},children:[n.home&&n.away?/* @__PURE__ */U(j,{children:[V(n.home,c),V(n.away,c)]}):/* @__PURE__ */E(fi,{numberOfLines:2,style:{fontSize:13,fontWeight:"700",color:c},children:Zc(n)}),/* @__PURE__ */U(W,{style:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",gap:6,marginTop:"auto"},children:[/* @__PURE__ */E(fi,{style:{fontSize:12,fontWeight:"600",color:c,opacity:.75},children:s}),a>0?/* @__PURE__ */U(fi,{style:{...v,borderWidth:1,paddingVertical:1,paddingHorizontal:7,borderRadius:sn(e,999),overflow:"hidden",color:y,fontSize:11,fontWeight:"800"},children:[a," picked"]}):null]})]},n.key)};/* @__PURE__ */
300
300
  return U(W,{ref:G,style:{gap:8},children:[/* @__PURE__ */U(W,{style:{flexDirection:"row",alignItems:"center",gap:6},children:[
301
- /* @__PURE__ */E(Qc,{theme:e,dir:-1,label:sl(-1,i,I),onPress:null===L?void 0:()=>r(L)}),
302
- /* @__PURE__ */U(Kc,{theme:u,on:!1,accessibilityRole:"button",accessibilityLabel:`${O}, choose a ${I}`,onPress:()=>C(!0),style:{flex:1,minWidth:0,minHeight:44,paddingVertical:4,paddingHorizontal:14,flexDirection:"row",alignItems:"center",justifyContent:"center",gap:6,borderRadius:sn(u,h.radius),borderWidth:1,borderColor:f.border,backgroundColor:u===e?p:f.backgroundAlt},children:[/* @__PURE__ */E(fi,{numberOfLines:2,accessibilityLiveRegion:"polite",style:{flexShrink:1,textAlign:"center",fontFamily:Nr(u),fontSize:13,lineHeight:16,fontWeight:"800",color:f.text},children:O}),/* @__PURE__ */E(A,{width:16,height:16,viewBox:"0 0 24 24",fill:"none",children:/* @__PURE__ */E(H,{d:"m6 9 6 6 6-6",stroke:f.text,strokeWidth:2.25,strokeLinecap:"round",strokeLinejoin:"round"})})]}),
303
- /* @__PURE__ */E(Qc,{theme:e,dir:1,label:sl(1,null===R?i:Math.min(t.length,R+i)-R,I),onPress:null===R?void 0:()=>r(R)})]}),/* @__PURE__ */E(oa,{children:/* @__PURE__ */E(m,{visible:B,transparent:!0,animationType:"fade",onRequestClose:()=>C(!1),children:/* @__PURE__ */E(W,{style:{flex:1,backgroundColor:"rgba(0,0,0,0.6)",alignItems:"center",justifyContent:"center",padding:12},children:/* @__PURE__ */U(W,{style:{width:"100%",maxWidth:720,maxHeight:"85%",gap:12,padding:12,backgroundColor:p,borderWidth:1,borderColor:g.border,borderRadius:sn(e,20)},children:[/* @__PURE__ */U(W,{style:{flexDirection:"row",alignItems:"center",gap:8},children:[/* @__PURE__ */E(fi,{accessibilityRole:"header",style:{flex:1,fontSize:16,fontWeight:"800",color:g.text,fontFamily:Nr(e)},children:s?"Choose a race":"Choose a match"}),/* @__PURE__ */E(Ci,{theme:e,size:32,onPress:()=>C(!1),accessibilityLabel:"Close",children:/* @__PURE__ */E(fi,{style:{fontSize:16,color:Si(e)},children:"×"})})]}),/* @__PURE__ */E(k,{style:{flexGrow:0},contentContainerStyle:{gap:14},children:al(t).map((t,n)=>/* @__PURE__ */U(W,{style:{gap:8},children:[t.label?/* @__PURE__ */E(fi,{accessibilityRole:"header",style:{fontSize:11,fontWeight:"800",letterSpacing:1.3,textTransform:"uppercase",color:g.textMuted,fontFamily:Nr(e)},children:t.label}):null,/* @__PURE__ */E(W,{onLayout:0===n?e=>z(e.nativeEvent.layout.width):void 0,style:{flexDirection:"row",flexWrap:"wrap",gap:8},children:t.items.map(Y(t.label))})]},t.label))})]})})})})]})}function $c({theme:e,items:t,activeKey:n,onSelect:i,noun:o,groupLabel:r}){const a=oi().matchRail,s=ra(e),h=s.colors,u=c(null),f=c({}),[g,p]=d(0),[y,m]=d(0),b=Math.max(0,t.findIndex(e=>e.key===n)),w=t[b],x=!g||!y||y<=g,v=()=>{const e=w&&f.current[w.key];if(!e||!g)return;const n=t.slice(0,b).reduce((e,t)=>e+(f.current[t.key]??0)+8,0);pi(u,Math.max(0,n-(g-e)/2))};l(v,[w?.key,g]);const B="button"===a.fill?h.buttonPrimary:h.primary,C="button"===a.fill?h.buttonPrimaryText:h.primaryText,S=s===e?kn(s):h.backgroundAlt,z=(e,t=!1)=>({flexDirection:"row",alignItems:"center",gap:6,minHeight:44,paddingVertical:8,paddingHorizontal:14,borderRadius:sn(s,a.radius),borderWidth:1,borderColor:e?B:h.border,backgroundColor:e?B:S,opacity:t?.45:1}),F=(e,t,n)=>/* @__PURE__ */U(j,{children:[e.leading?.(t),
301
+ /* @__PURE__ */E(Jc,{theme:e,dir:-1,label:cl(-1,i,I),onPress:null===L?void 0:()=>r(L)}),
302
+ /* @__PURE__ */U(Qc,{theme:u,on:!1,accessibilityRole:"button",accessibilityLabel:`${O}, choose a ${I}`,onPress:()=>C(!0),style:{flex:1,minWidth:0,minHeight:44,paddingVertical:4,paddingHorizontal:14,flexDirection:"row",alignItems:"center",justifyContent:"center",gap:6,borderRadius:sn(u,h.radius),borderWidth:1,borderColor:f.border,backgroundColor:u===e?p:f.backgroundAlt},children:[/* @__PURE__ */E(fi,{numberOfLines:2,accessibilityLiveRegion:"polite",style:{flexShrink:1,textAlign:"center",fontFamily:Nr(u),fontSize:13,lineHeight:16,fontWeight:"800",color:f.text},children:O}),/* @__PURE__ */E(A,{width:16,height:16,viewBox:"0 0 24 24",fill:"none",children:/* @__PURE__ */E(H,{d:"m6 9 6 6 6-6",stroke:f.text,strokeWidth:2.25,strokeLinecap:"round",strokeLinejoin:"round"})})]}),
303
+ /* @__PURE__ */E(Jc,{theme:e,dir:1,label:cl(1,null===R?i:Math.min(t.length,R+i)-R,I),onPress:null===R?void 0:()=>r(R)})]}),/* @__PURE__ */E(ra,{children:/* @__PURE__ */E(m,{visible:B,transparent:!0,animationType:"fade",onRequestClose:()=>C(!1),children:/* @__PURE__ */E(W,{style:{flex:1,backgroundColor:"rgba(0,0,0,0.6)",alignItems:"center",justifyContent:"center",padding:12},children:/* @__PURE__ */U(W,{style:{width:"100%",maxWidth:720,maxHeight:"85%",gap:12,padding:12,backgroundColor:p,borderWidth:1,borderColor:g.border,borderRadius:sn(e,20)},children:[/* @__PURE__ */U(W,{style:{flexDirection:"row",alignItems:"center",gap:8},children:[/* @__PURE__ */E(fi,{accessibilityRole:"header",style:{flex:1,fontSize:16,fontWeight:"800",color:g.text,fontFamily:Nr(e)},children:s?"Choose a race":"Choose a match"}),/* @__PURE__ */E(Ci,{theme:e,size:32,onPress:()=>C(!1),accessibilityLabel:"Close",children:/* @__PURE__ */E(fi,{style:{fontSize:16,color:Si(e)},children:"×"})})]}),/* @__PURE__ */E(k,{style:{flexGrow:0},contentContainerStyle:{gap:14},children:sl(t).map((t,n)=>/* @__PURE__ */U(W,{style:{gap:8},children:[t.label?/* @__PURE__ */E(fi,{accessibilityRole:"header",style:{fontSize:11,fontWeight:"800",letterSpacing:1.3,textTransform:"uppercase",color:g.textMuted,fontFamily:Nr(e)},children:t.label}):null,/* @__PURE__ */E(W,{onLayout:0===n?e=>z(e.nativeEvent.layout.width):void 0,style:{flexDirection:"row",flexWrap:"wrap",gap:8},children:t.items.map(Y(t.label))})]},t.label))})]})})})})]})}function _c({theme:e,items:t,activeKey:n,onSelect:i,noun:o,groupLabel:r}){const a=oi().matchRail,s=la(e),h=s.colors,u=c(null),f=c({}),[g,p]=d(0),[y,m]=d(0),b=Math.max(0,t.findIndex(e=>e.key===n)),w=t[b],x=!g||!y||y<=g,v=()=>{const e=w&&f.current[w.key];if(!e||!g)return;const n=t.slice(0,b).reduce((e,t)=>e+(f.current[t.key]??0)+8,0);pi(u,Math.max(0,n-(g-e)/2))};l(v,[w?.key,g]);const B="button"===a.fill?h.buttonPrimary:h.primary,C="button"===a.fill?h.buttonPrimaryText:h.primaryText,S=s===e?kn(s):h.backgroundAlt,z=(e,t=!1)=>({flexDirection:"row",alignItems:"center",gap:6,minHeight:44,paddingVertical:8,paddingHorizontal:14,borderRadius:sn(s,a.radius),borderWidth:1,borderColor:e?B:h.border,backgroundColor:e?B:S,opacity:t?.45:1}),F=(e,t,n)=>/* @__PURE__ */U(j,{children:[e.leading?.(t),
304
304
  /* @__PURE__ */E(fi,{style:{color:t?C:h.text,fontFamily:Nr(s),fontSize:13,fontWeight:"700"},children:n&&e.fullLabel?e.fullLabel:e.label}),e.count?"badge"===a.count?/* @__PURE__ */E(fi,{style:{fontSize:11,fontWeight:"700",paddingHorizontal:6,paddingVertical:3,borderRadius:sn(s,999),overflow:"hidden",backgroundColor:h.background,color:h.text},children:e.count}):/* @__PURE__ */U(fi,{style:{opacity:.8,color:t?C:h.text,fontSize:13,fontWeight:"700"},children:["· ",e.count]}):null,e.trailing?.(t)]}),A=n=>{const r=(e=>{for(let n=b+e;n>=0&&n<t.length;n+=e)if(!t[n].disabled)return t[n]})(n);/* @__PURE__ */
305
- return E(Qc,{theme:e,dir:n,label:sl(n,1,o),onPress:r&&(()=>i(r.key))})};/* @__PURE__ */
305
+ return E(Jc,{theme:e,dir:n,label:cl(n,1,o),onPress:r&&(()=>i(r.key))})};/* @__PURE__ */
306
306
  return U(W,{style:{flexDirection:"row",alignItems:"center",gap:6,minWidth:0,overflow:"hidden"},children:[A(-1),
307
307
  /* @__PURE__ */E(k,{ref:u,horizontal:!0,showsHorizontalScrollIndicator:!1,accessibilityLabel:r,onLayout:e=>p(e.nativeEvent.layout.width),style:{flex:1},contentContainerStyle:{gap:8},children:t.map((e,t)=>{const n=t===b;/* @__PURE__ */
308
- return E(Kc,{theme:s,on:n,accessibilityRole:"button",accessibilityState:{selected:n,disabled:!!e.disabled},accessibilityLabel:e.accessibilityLabel,disabled:e.disabled,onPress:()=>i(e.key),onLayout:n=>{f.current[e.key]=n.nativeEvent.layout.width,t===b&&v()},style:z(n,e.disabled),children:F(e,n,n&&x)},e.key)})}),A(1),w?.fullLabel?/* @__PURE__ */E(W,{pointerEvents:"none",accessibilityElementsHidden:!0,importantForAccessibility:"no-hide-descendants",style:{position:"absolute",left:0,top:0,width:2e3,flexDirection:"row",opacity:0},children:/* @__PURE__ */E(W,{onLayout:e=>m(e.nativeEvent.layout.width),style:z(!0),children:F(w,!0,!0)})}):null]})}function _c({theme:e,events:t,activeKey:n,picked:i,onSelect:o,racing:r=!1}){const l=t.map(e=>{const t=i(e);return{key:e.key,label:Gc(e),fullLabel:Vc(e),accessibilityLabel:`${e.title||"Available picks"}${t?`, ${t} picked`:""}`,count:t}});/* @__PURE__ */
309
- return E($c,{theme:e,items:l,activeKey:n,onSelect:o,noun:r?"race":"match",groupLabel:r?"Choose a race":"Change match"})}function ed({theme:e,title:t,home:n,away:i,racing:o,date:r,renderTeamLogo:l,trailing:a}){const s={fontSize:16,lineHeight:20,fontWeight:"800",color:hn(e),fontFamily:Nr(e)},c=!o&&n&&i&&l,d=(e,t,n)=>/* @__PURE__ */U(W,{style:{flexDirection:"row",alignItems:"flex-start",gap:8},children:[/* @__PURE__ */E(W,{"aria-hidden":!0,accessibilityElementsHidden:!0,importantForAccessibility:"no-hide-descendants",style:{flexShrink:0,width:37,height:20,paddingLeft:t,justifyContent:"center"},children:l?.(e,24)??null}),/* @__PURE__ */E(fi,{style:[s,{flexShrink:1}],children:n})]});/* @__PURE__ */
310
- return U(W,{style:{flexDirection:"row",alignItems:"center",gap:10,padding:12},children:[/* @__PURE__ */U(W,{style:{flexShrink:1,minWidth:0},children:[c?/* @__PURE__ */U(W,{accessibilityRole:"header",accessibilityLabel:t,children:[d(n,0,`${n} vs`),d(i,13,i)]}):/* @__PURE__ */E(fi,{accessibilityRole:"header",style:s,children:t||"Available picks"}),r&&/* @__PURE__ */U(fi,{style:{marginTop:2,marginLeft:c?45:0,fontSize:13,fontWeight:"500",color:e.colors.textMuted},children:[r.toLocaleDateString("en-AU",{weekday:"short",day:"numeric",month:"short"})," ",Ec(r)]})]}),a?/* @__PURE__ */E(W,{style:{marginLeft:"auto",flexShrink:0,flexDirection:"row",alignItems:"center",gap:8},children:a}):null]})}function td({paths:e,size:t,strokeWidth:n,color:i}){/* @__PURE__ */
311
- return E(A,{width:t,height:t,viewBox:"0 0 24 24",fill:"none",children:e.map(e=>/* @__PURE__ */E(H,{d:e,stroke:i,strokeWidth:n,strokeLinecap:"round",strokeLinejoin:"round"},e))})}function nd({open:t,children:n}){const i=e.useRef(new f.Value(t?1:0)).current,[o,r]=d(0),[l,a]=d(!1),s=e.useRef(t),c=t&&!l;return e.useLayoutEffect(()=>{if(s.current===t)return;s.current=t,a(!0);let e,n=!1;return Promise.resolve(h.isReduceMotionEnabled?.()).catch(()=>!1).then(o=>{n||(e=f.timing(i,{toValue:t?1:0,duration:o?0:320,easing:p.bezier(.2,.8,.2,1),useNativeDriver:!1}),e.start(({finished:e})=>{e&&a(!1)}))}),()=>{n=!0,e?.stop()}},[t,i]),/* @__PURE__ */E(f.View,{"aria-hidden":!t,pointerEvents:t?"auto":"none",style:c?void 0:{overflow:"hidden",opacity:i,height:i.interpolate({inputRange:[0,1],outputRange:[0,o]})},children:/* @__PURE__ */E(W,{style:c?void 0:{position:"absolute",top:0,left:0,right:0},onLayout:e=>r(e.nativeEvent.layout.height),children:n})})}function id({theme:e,open:t,onToggle:n,label:i,rule:o}){const{hovered:r,pressed:l,handlers:a}=wi(),s=ci(e,"quiet",{hovered:r,pressed:l});/* @__PURE__ */
312
- return U(z,{...a,activeOpacity:1,accessibilityRole:"button",accessibilityState:{expanded:t},onPress:n,style:[{marginHorizontal:6,marginBottom:6,flexDirection:"row",alignItems:"center",justifyContent:"space-between",gap:10,paddingVertical:10,paddingLeft:6,paddingRight:12,borderRadius:sn(e,10),backgroundColor:s.background},xi(l)],children:[/* @__PURE__ */U(W,{style:{flexShrink:1,minWidth:0,gap:2},children:[/* @__PURE__ */E(fi,{style:{fontSize:14,fontWeight:"800",color:s.color},children:i}),/* @__PURE__ */E(fi,{style:{fontSize:12,lineHeight:16,fontWeight:"600",color:s.color},children:o})]}),/* @__PURE__ */U(W,{style:{flexDirection:"row",alignItems:"center",gap:4},children:[/* @__PURE__ */E(fi,{style:{fontSize:14,fontWeight:"800",color:s.color},children:t?"Hide":"Show"}),/* @__PURE__ */E(td,{paths:[t?"m18 15-6-6-6 6":"m6 9 6 6 6-6"],size:16,strokeWidth:2.4,color:s.color})]})]})}function od({theme:e,group:t,selections:n,caps:i,game:o,pool:r,componentById:l,pickOrder:a,last:s=!1,renderRow:c}){const h=e.colors,[u,f]=d(!1),{family:g}=t,p=el(g),{cap:y,limited:m,full:b,blocked:w}=function({family:e,props:t},n,i,o){const r=e&&We(o)?Pe(o)[e]:0,l=r>0&&t.length>r,a=l&&i.filledFor(je(t[0])).has(e);return{cap:r,limited:l,full:a,blocked:new Set(a?t.filter(e=>!(e.id in n)&&i.isCapped(e)).map(e=>e.id):[])}}(t,n,i,o),x=ci(e,"quiet").background,v=bn(e)===h.primary?h.primaryText:bn(e);let k=!1;/* @__PURE__ */
308
+ return E(Qc,{theme:s,on:n,accessibilityRole:"button",accessibilityState:{selected:n,disabled:!!e.disabled},accessibilityLabel:e.accessibilityLabel,disabled:e.disabled,onPress:()=>i(e.key),onLayout:n=>{f.current[e.key]=n.nativeEvent.layout.width,t===b&&v()},style:z(n,e.disabled),children:F(e,n,n&&x)},e.key)})}),A(1),w?.fullLabel?/* @__PURE__ */E(W,{pointerEvents:"none",accessibilityElementsHidden:!0,importantForAccessibility:"no-hide-descendants",style:{position:"absolute",left:0,top:0,width:2e3,flexDirection:"row",opacity:0},children:/* @__PURE__ */E(W,{onLayout:e=>m(e.nativeEvent.layout.width),style:z(!0),children:F(w,!0,!0)})}):null]})}function ed({theme:e,events:t,activeKey:n,picked:i,onSelect:o,racing:r=!1}){const l=t.map(e=>{const t=i(e);return{key:e.key,label:Vc(e),fullLabel:Yc(e),accessibilityLabel:`${e.title||"Available picks"}${t?`, ${t} picked`:""}`,count:t}});/* @__PURE__ */
309
+ return E(_c,{theme:e,items:l,activeKey:n,onSelect:o,noun:r?"race":"match",groupLabel:r?"Choose a race":"Change match"})}function td({theme:e,title:t,home:n,away:i,racing:o,date:r,renderTeamLogo:l,trailing:a}){const s={fontSize:16,lineHeight:20,fontWeight:"800",color:hn(e),fontFamily:Nr(e)},c=!o&&n&&i&&l,d=(e,t,n)=>/* @__PURE__ */U(W,{style:{flexDirection:"row",alignItems:"flex-start",gap:8},children:[/* @__PURE__ */E(W,{"aria-hidden":!0,accessibilityElementsHidden:!0,importantForAccessibility:"no-hide-descendants",style:{flexShrink:0,width:37,height:20,paddingLeft:t,justifyContent:"center"},children:l?.(e,24)??null}),/* @__PURE__ */E(fi,{style:[s,{flexShrink:1}],children:n})]});/* @__PURE__ */
310
+ return U(W,{style:{flexDirection:"row",alignItems:"center",gap:10,padding:12},children:[/* @__PURE__ */U(W,{style:{flexShrink:1,minWidth:0},children:[c?/* @__PURE__ */U(W,{accessibilityRole:"header",accessibilityLabel:t,children:[d(n,0,`${n} vs`),d(i,13,i)]}):/* @__PURE__ */E(fi,{accessibilityRole:"header",style:s,children:t||"Available picks"}),r&&/* @__PURE__ */U(fi,{style:{marginTop:2,marginLeft:c?45:0,fontSize:13,fontWeight:"500",color:e.colors.textMuted},children:[r.toLocaleDateString("en-AU",{weekday:"short",day:"numeric",month:"short"})," ",Uc(r)]})]}),a?/* @__PURE__ */E(W,{style:{marginLeft:"auto",flexShrink:0,flexDirection:"row",alignItems:"center",gap:8},children:a}):null]})}function nd({paths:e,size:t,strokeWidth:n,color:i}){/* @__PURE__ */
311
+ return E(A,{width:t,height:t,viewBox:"0 0 24 24",fill:"none",children:e.map(e=>/* @__PURE__ */E(H,{d:e,stroke:i,strokeWidth:n,strokeLinecap:"round",strokeLinejoin:"round"},e))})}function id({open:t,children:n}){const i=e.useRef(new f.Value(t?1:0)).current,[o,r]=d(0),[l,a]=d(!1),s=e.useRef(t),c=t&&!l;return e.useLayoutEffect(()=>{if(s.current===t)return;s.current=t,a(!0);let e,n=!1;return Promise.resolve(h.isReduceMotionEnabled?.()).catch(()=>!1).then(o=>{n||(e=f.timing(i,{toValue:t?1:0,duration:o?0:320,easing:p.bezier(.2,.8,.2,1),useNativeDriver:!1}),e.start(({finished:e})=>{e&&a(!1)}))}),()=>{n=!0,e?.stop()}},[t,i]),/* @__PURE__ */E(f.View,{"aria-hidden":!t,pointerEvents:t?"auto":"none",style:c?void 0:{overflow:"hidden",opacity:i,height:i.interpolate({inputRange:[0,1],outputRange:[0,o]})},children:/* @__PURE__ */E(W,{style:c?void 0:{position:"absolute",top:0,left:0,right:0},onLayout:e=>r(e.nativeEvent.layout.height),children:n})})}function od({theme:e,open:t,onToggle:n,label:i,rule:o}){const{hovered:r,pressed:l,handlers:a}=wi(),s=ci(e,"quiet",{hovered:r,pressed:l});/* @__PURE__ */
312
+ return U(z,{...a,activeOpacity:1,accessibilityRole:"button",accessibilityState:{expanded:t},onPress:n,style:[{marginHorizontal:6,marginBottom:6,flexDirection:"row",alignItems:"center",justifyContent:"space-between",gap:10,paddingVertical:10,paddingLeft:6,paddingRight:12,borderRadius:sn(e,10),backgroundColor:s.background},xi(l)],children:[/* @__PURE__ */U(W,{style:{flexShrink:1,minWidth:0,gap:2},children:[/* @__PURE__ */E(fi,{style:{fontSize:14,fontWeight:"800",color:s.color},children:i}),/* @__PURE__ */E(fi,{style:{fontSize:12,lineHeight:16,fontWeight:"600",color:s.color},children:o})]}),/* @__PURE__ */U(W,{style:{flexDirection:"row",alignItems:"center",gap:4},children:[/* @__PURE__ */E(fi,{style:{fontSize:14,fontWeight:"800",color:s.color},children:t?"Hide":"Show"}),/* @__PURE__ */E(nd,{paths:[t?"m18 15-6-6-6 6":"m6 9 6 6 6-6"],size:16,strokeWidth:2.4,color:s.color})]})]})}function rd({theme:e,group:t,selections:n,caps:i,game:o,pool:r,componentById:l,pickOrder:a,last:s=!1,renderRow:c}){const h=e.colors,[u,f]=d(!1),{family:g}=t,p=tl(g),{cap:y,limited:m,full:b,blocked:w}=function({family:e,props:t},n,i,o){const r=e&&We(o)?Pe(o)[e]:0,l=r>0&&t.length>r,a=l&&i.filledFor(je(t[0])).has(e);return{cap:r,limited:l,full:a,blocked:new Set(a?t.filter(e=>!(e.id in n)&&i.isCapped(e)).map(e=>e.id):[])}}(t,n,i,o),x=ci(e,"quiet").background,v=bn(e)===h.primary?h.primaryText:bn(e);let k=!1;/* @__PURE__ */
313
313
  return U(W,{accessibilityLabel:p.label,style:{flexDirection:"row",borderTopWidth:1,borderTopColor:h.border,flexGrow:s?1:0},children:[/* @__PURE__ */U(W,{style:{width:68,marginVertical:6,marginLeft:6,borderRadius:sn(e,10),backgroundColor:x,alignItems:"center",gap:6,paddingVertical:10,paddingHorizontal:4},children:[
314
- /* @__PURE__ */E(W,{style:{width:32,height:32,borderRadius:sn(e,9),backgroundColor:h.primary,alignItems:"center",justifyContent:"center"},children:/* @__PURE__ */E(td,{paths:nl(g),size:18,strokeWidth:2,color:v})}),
315
- /* @__PURE__ */E(fi,{accessibilityRole:"header",style:{fontSize:10,lineHeight:13,fontWeight:"800",letterSpacing:1.2,textTransform:"uppercase",textAlign:"center",color:h.primary,fontFamily:Nr(e)},children:p.label}),p.caption?/* @__PURE__ */E(fi,{style:{fontSize:11,lineHeight:14,fontWeight:"600",textAlign:"center",color:h.primary},children:p.caption}):null,m?/* @__PURE__ */U(W,{style:{marginTop:2,flexDirection:"row",alignItems:"center",gap:3,paddingVertical:3,paddingHorizontal:7,borderRadius:sn(e,999),borderWidth:1,borderColor:h.primary,backgroundColor:b?h.primary:kn(e)},children:[b?/* @__PURE__ */E(td,{paths:["m5 12 5 5 9-10"],size:10,strokeWidth:3.5,color:v}):null,/* @__PURE__ */E(fi,{style:{fontSize:11,fontWeight:"800",color:b?h.primaryText:h.primary},children:il(y,b)})]}):null]}),/* @__PURE__ */U(W,{style:{flex:1,minWidth:0},children:[t.props.map(e=>{const t=w.has(e.id),i=k;return t&&!u||(k=!0),/* @__PURE__ */E(nd,{open:!t||u,children:c(e,{top:i,swap:t?()=>function(e,t,n,i,o,r){const l=je(e);if(!We(o)||!l)return[];const a=Pe(o),s=t.filter(t=>t.id!==e.id&&t.id in n&&je(t)===l),c=/* @__PURE__ */new Set;for(const d of Oe(e,i)){const t=s.filter(e=>!c.has(e.id)&&Oe(e,i).includes(d));if(!De(t,d,e,a[d]))continue;const n="player"===d?t.find(t=>Te(t)===Te(e)):void 0,o=r?t.reduce((e,t)=>r.indexOf(t.id)>r.indexOf(e.id)?t:e):t[t.length-1];c.add((n??o).id)}return[...c]}(e,r,n,l,o,a):void 0})},e.id)}),m?/* @__PURE__ */E(nd,{open:w.size>0,children:/* @__PURE__ */E(id,{theme:e,open:u,onToggle:()=>f(e=>!e),label:ol(Math.max(w.size,t.props.length-y),g),rule:rl(y)})}):null]})]})}var rd={split:{fontSize:13,fontWeight:"400",lineHeight:18},compact:{fontSize:11,fontWeight:"400",lineHeight:15},dense:{fontSize:16,fontWeight:"600",lineHeight:22},call:{fontSize:15,fontWeight:"600",lineHeight:23},shelf:{fontSize:14,fontWeight:"500",lineHeight:19}};function ld({variant:t,groups:n,racing:i,selections:o,onToggleSelection:r,atMax:l,theme:a,renderTeamLogo:h,componentById:u,disableEventSwipe:f=!1}){const g=a.colors,p=kn(a),y=Bn(a),m=g.borderSubtle??g.border,b=xn(a),w=vn(a),x=fn(a);hn(a);const v=Nr(a),B=ra(a),C=B.colors,S=C.borderSubtle??C.border,{width:A}=F(),[P,T]=d(null),[D,H]=d(/* @__PURE__ */new Set),[M,L]=d(null),R=c(null),[I,O]=d(0),[G,V]=d(!1),[Y,N]=d(/* @__PURE__ */new Set),X=e=>t=>e(e=>{const n=new Set(e);return n.delete(t)||n.add(t),n}),q=X(H),K=X(N),Q=s(()=>qc(n,i),[n,i]),{width:J}=F(),Z=e.useContext(gl),$=Z?.selectedGame,_=xr($),ee=s(()=>Object.values(n).flat(),[n]),te=s(()=>Ge(ee,o,u,$),[ee,o,u,$]),ne=e=>l&&!(e.id in o)||!_&&te.isCapped(e),ie=(e,t)=>{ne(e)||r(e.id,t)},oe=(e,t)=>e?h?.(e,t)??null:null,re=(e,t,n,i)=>/* @__PURE__ */E(fc,{id:e.id,kind:"answers",stretch:n,children:/* @__PURE__ */E(Hi,{yesDisabled:!(i||!Z?.canSelectAnswer||Z.canSelectAnswer(e.id,"yes")),noDisabled:!(i||!Z?.canSelectAnswer||Z.canSelectAnswer(e.id,"no")),theme:a,size:t,stretch:n,disabled:!i&&ne(e),value:o[e.id]??null,onYes:()=>i?Z?.swapSelection(e.id,"yes",i()):ie(e,"yes"),onNo:()=>i?Z?.swapSelection(e.id,"no",i()):ie(e,"no")})}),le=(e,t)=>/* @__PURE__ */U(W,{style:dd.question,children:[i?dc(e,h,null):null,/* @__PURE__ */E(fc,{id:e.id,kind:"text",children:/* @__PURE__ */E(uc,{prop:e,colors:g,componentById:u,renderTeamLogo:h,textStyle:rd[t],textColor:x,theme:a})})]}),ae=(e,t=!1)=>{if(f)return null;const n=e.props.filter(e=>!ne(e));if(0===n.length)return null;const i=`Swipe ${n.length} proposition${1===n.length?"":"s"}`;/* @__PURE__ */
316
- return E(vi,{theme:a,variant:"quiet",accessibilityLabel:i,icon:/* @__PURE__ */E(Lc,{color:a.colors.primary}),onPress:()=>T(e),style:{flexShrink:0,...t&&{width:li.height.md,paddingHorizontal:0}},children:t?void 0:"Swipe"})},se=(e,t)=>/* @__PURE__ */E(Ci,{theme:a,size:28,onPress:()=>q(e.key),accessibilityLabel:`${t?"Hide":"Show"} ${e.props.length} proposition${1===e.props.length?"":"s"}`,accessibilityState:{expanded:t},children:/* @__PURE__ */E(W,{style:{transform:[{rotate:t?"0deg":"-90deg"}]},children:/* @__PURE__ */E(cd,{color:Si(a)})})}),ce=e=>{if(!e.home&&!e.away)/* @__PURE__ */return E(fi,{numberOfLines:1,style:[dd.shortLabel,{color:b}],children:e.title});const t=[e.home,e.away].filter(Boolean).join(" v "),n=Y.has(e.key);/* @__PURE__ */
314
+ /* @__PURE__ */E(W,{style:{width:32,height:32,borderRadius:sn(e,9),backgroundColor:h.primary,alignItems:"center",justifyContent:"center"},children:/* @__PURE__ */E(nd,{paths:il(g),size:18,strokeWidth:2,color:v})}),
315
+ /* @__PURE__ */E(fi,{accessibilityRole:"header",style:{fontSize:10,lineHeight:13,fontWeight:"800",letterSpacing:1.2,textTransform:"uppercase",textAlign:"center",color:h.primary,fontFamily:Nr(e)},children:p.label}),p.caption?/* @__PURE__ */E(fi,{style:{fontSize:11,lineHeight:14,fontWeight:"600",textAlign:"center",color:h.primary},children:p.caption}):null,m?/* @__PURE__ */U(W,{style:{marginTop:2,flexDirection:"row",alignItems:"center",gap:3,paddingVertical:3,paddingHorizontal:7,borderRadius:sn(e,999),borderWidth:1,borderColor:h.primary,backgroundColor:b?h.primary:kn(e)},children:[b?/* @__PURE__ */E(nd,{paths:["m5 12 5 5 9-10"],size:10,strokeWidth:3.5,color:v}):null,/* @__PURE__ */E(fi,{style:{fontSize:11,fontWeight:"800",color:b?h.primaryText:h.primary},children:ol(y,b)})]}):null]}),/* @__PURE__ */U(W,{style:{flex:1,minWidth:0},children:[t.props.map(e=>{const t=w.has(e.id),i=k;return t&&!u||(k=!0),/* @__PURE__ */E(id,{open:!t||u,children:c(e,{top:i,swap:t?()=>function(e,t,n,i,o,r){const l=je(e);if(!We(o)||!l)return[];const a=Pe(o),s=t.filter(t=>t.id!==e.id&&t.id in n&&je(t)===l),c=/* @__PURE__ */new Set;for(const d of Oe(e,i)){const t=s.filter(e=>!c.has(e.id)&&Oe(e,i).includes(d));if(!De(t,d,e,a[d]))continue;const n="player"===d?t.find(t=>Te(t)===Te(e)):void 0,o=r?t.reduce((e,t)=>r.indexOf(t.id)>r.indexOf(e.id)?t:e):t[t.length-1];c.add((n??o).id)}return[...c]}(e,r,n,l,o,a):void 0})},e.id)}),m?/* @__PURE__ */E(id,{open:w.size>0,children:/* @__PURE__ */E(od,{theme:e,open:u,onToggle:()=>f(e=>!e),label:rl(Math.max(w.size,t.props.length-y),g),rule:ll(y)})}):null]})]})}var ld={split:{fontSize:13,fontWeight:"400",lineHeight:18},compact:{fontSize:11,fontWeight:"400",lineHeight:15},dense:{fontSize:16,fontWeight:"600",lineHeight:22},call:{fontSize:15,fontWeight:"600",lineHeight:23},shelf:{fontSize:14,fontWeight:"500",lineHeight:19}};function ad({variant:t,groups:n,racing:i,selections:o,onToggleSelection:r,atMax:l,theme:a,renderTeamLogo:h,componentById:u,disableEventSwipe:f=!1}){const g=a.colors,p=kn(a),y=Bn(a),m=g.borderSubtle??g.border,b=xn(a),w=vn(a),x=fn(a);hn(a);const v=Nr(a),B=la(a),C=B.colors,S=C.borderSubtle??C.border,{width:A}=F(),[P,T]=d(null),[D,H]=d(/* @__PURE__ */new Set),[M,L]=d(null),R=c(null),[I,O]=d(0),[G,V]=d(!1),[Y,N]=d(/* @__PURE__ */new Set),X=e=>t=>e(e=>{const n=new Set(e);return n.delete(t)||n.add(t),n}),q=X(H),K=X(N),Q=s(()=>Kc(n,i),[n,i]),{width:J}=F(),Z=e.useContext(pl),$=Z?.selectedGame,_=xr($),ee=s(()=>Object.values(n).flat(),[n]),te=s(()=>Ge(ee,o,u,$),[ee,o,u,$]),ne=e=>l&&!(e.id in o)||!_&&te.isCapped(e),ie=(e,t)=>{ne(e)||r(e.id,t)},oe=(e,t)=>e?h?.(e,t)??null:null,re=(e,t,n,i)=>/* @__PURE__ */E(gc,{id:e.id,kind:"answers",stretch:n,children:/* @__PURE__ */E(Hi,{yesDisabled:!(i||!Z?.canSelectAnswer||Z.canSelectAnswer(e.id,"yes")),noDisabled:!(i||!Z?.canSelectAnswer||Z.canSelectAnswer(e.id,"no")),theme:a,size:t,stretch:n,disabled:!i&&ne(e),value:o[e.id]??null,onYes:()=>i?Z?.swapSelection(e.id,"yes",i()):ie(e,"yes"),onNo:()=>i?Z?.swapSelection(e.id,"no",i()):ie(e,"no")})}),le=(e,t)=>/* @__PURE__ */U(W,{style:hd.question,children:[i?hc(e,h,null):null,/* @__PURE__ */E(gc,{id:e.id,kind:"text",children:/* @__PURE__ */E(fc,{prop:e,colors:g,componentById:u,renderTeamLogo:h,textStyle:ld[t],textColor:x,theme:a})})]}),ae=(e,t=!1)=>{if(f)return null;const n=e.props.filter(e=>!ne(e));if(0===n.length)return null;const i=`Swipe ${n.length} proposition${1===n.length?"":"s"}`;/* @__PURE__ */
316
+ return E(vi,{theme:a,variant:"quiet",accessibilityLabel:i,icon:/* @__PURE__ */E(Rc,{color:a.colors.primary}),onPress:()=>T(e),style:{flexShrink:0,...t&&{width:li.height.md,paddingHorizontal:0}},children:t?void 0:"Swipe"})},se=(e,t)=>/* @__PURE__ */E(Ci,{theme:a,size:28,onPress:()=>q(e.key),accessibilityLabel:`${t?"Hide":"Show"} ${e.props.length} proposition${1===e.props.length?"":"s"}`,accessibilityState:{expanded:t},children:/* @__PURE__ */E(W,{style:{transform:[{rotate:t?"0deg":"-90deg"}]},children:/* @__PURE__ */E(dd,{color:Si(a)})})}),ce=e=>{if(!e.home&&!e.away)/* @__PURE__ */return E(fi,{numberOfLines:1,style:[hd.shortLabel,{color:b}],children:e.title});const t=[e.home,e.away].filter(Boolean).join(" v "),n=Y.has(e.key);/* @__PURE__ */
317
317
  return U(z,{onPress:()=>K(e.key),accessibilityRole:"button",accessibilityLabel:t,accessibilityState:{selected:n},style:{minWidth:0,maxWidth:"100%",flexDirection:"row",alignItems:"center"},children:[
318
- /* @__PURE__ */E(fi,{style:[dd.shortLabel,{color:b,fontFamily:v}],children:n?e.home:Uc(e.home)}),
319
- /* @__PURE__ */E(fi,{style:[dd.vs,{color:w}],children:"v"}),
320
- /* @__PURE__ */E(fi,{style:[dd.shortLabel,{color:b,fontFamily:v}],children:n?e.away:Uc(e.away)})]})},de=e=>e.racing||!e.home?/* @__PURE__ */E(fi,{numberOfLines:1,style:[dd.shortLabel,{color:b,fontFamily:v}],children:e.title}):/* @__PURE__ */U(W,{style:{maxWidth:"100%",flexDirection:"row",alignItems:"center"},children:[
321
- /* @__PURE__ */E(fi,{numberOfLines:1,style:[dd.shortLabel,{color:b,fontFamily:v}],children:Uc(e.home)}),
322
- /* @__PURE__ */E(fi,{style:[dd.vs,{color:w}],children:"v"}),
323
- /* @__PURE__ */E(fi,{numberOfLines:1,style:[dd.shortLabel,{color:b,fontFamily:v}],children:Uc(e.away)})]}),he=(e,t)=>{const n=Ye(e.props);return n.some(e=>e.family)?n.map((i,o)=>ye(e,i,t,o===n.length-1)):e.props.map(e=>t(e,{top:!0}))},ue=ll(I),fe=(I-12*(ue-1))/ue,ge=fe<sd,pe=(e,{top:t,railed:n,swap:i})=>/* @__PURE__ */U(W,{accessibilityLabel:e.description||e.proposition,style:{flexDirection:n&&ge?"column":"row",alignItems:n&&ge?"stretch":"center",gap:12,padding:12,borderTopWidth:t?1:0,borderTopColor:m,borderLeftWidth:n?0:3,borderLeftColor:o[e.id]?g.buttonPrimary:"transparent",opacity:!i&&ne(e)?.5:1},children:[/* @__PURE__ */U(W,{style:{flex:1,minWidth:0,flexDirection:"row",gap:6},children:[Z?.quickPickedIds?.includes(e.id)?/* @__PURE__ */E(W,{accessible:!0,accessibilityRole:"image",accessibilityLabel:"Picked by QuickPick",style:{marginTop:3},children:/* @__PURE__ */E(es,{size:14,color:g.primary})}):null,/* @__PURE__ */E(W,{style:{flex:1,minWidth:0},children:le(e,"shelf")})]}),re(e,"sm",n&&ge,i)]},e.id),ye=(e,t,n,i=!1)=>/* @__PURE__ */E(od,{theme:a,group:t,selections:o,caps:te,game:$,pool:ee,componentById:u,pickOrder:Z?.pickOrder,last:i,renderRow:n},`${e.key}:${t.family}`),me=(e,t=!1)=>/* @__PURE__ */E(ed,{theme:a,title:e.title,home:e.home,away:e.away,racing:e.racing,date:e.date,renderTeamLogo:h,trailing:ae(e,t)}),be=e=>{const t=Ye(e.props),n=t.some(e=>e.family);/* @__PURE__ */
324
- return U(Hl,{theme:a,padded:!1,accessibilityLabel:e.title||"Available picks",style:{overflow:"hidden",flexGrow:1},children:[me(e,ge),n?t.map((n,i)=>ye(e,n,(e,{top:t,swap:n})=>pe(e,{top:t,railed:!0,swap:n}),i===t.length-1)):e.props.map(e=>pe(e,{top:!0,railed:!1}))]})},we=Q.flatMap(e=>e.events),xe=we.find(e=>e.key===M)??we[0],ve=e=>e.props.filter(e=>o[e.id]).length,ke=(e,{top:t,swap:n})=>{/* @__PURE__ */return U(W,{style:{gap:10,padding:12,borderTopWidth:t?1:0,borderColor:m,backgroundColor:g.background},children:[/* @__PURE__ */U(W,{style:{minWidth:0},children:[le(e,"dense"),!n&&!_&&te.isCapped(e)&&Ie(e)&&/* @__PURE__ */E(fi,{style:{fontSize:12,color:g.textMuted,marginTop:6},children:(i=Ie(e),`${He[i]} already picked for this match`)})]}),re(e,"md",!0,n)]},e.id);var i};if(qn(t)){const e=we[we.findIndex(e=>e.key===xe?.key)+1];/* @__PURE__ */
325
- return E(oa,{children:/* @__PURE__ */U(W,{style:{backgroundColor:g.background},children:[we.length>1&&/* @__PURE__ */E(W,{style:{paddingHorizontal:12,paddingVertical:8},children:/* @__PURE__ */E(_c,{theme:a,events:we,activeKey:xe?.key,picked:ve,onSelect:L,racing:i})}),xe&&/* @__PURE__ */E(W,{style:{borderBottomWidth:1,borderColor:m},children:me(xe)}),
326
- /* @__PURE__ */E(W,{children:he(xe,ke)}),e&&/* @__PURE__ */E(W,{style:{flexDirection:"row",alignItems:"center",gap:10,padding:12},children:e&&/* @__PURE__ */U(vi,{theme:a,variant:"secondary",onPress:()=>L(e.key),style:{flex:1,minWidth:0},children:[/* @__PURE__ */U(fi,{numberOfLines:1,style:{flexShrink:1,fontSize:14,fontWeight:"800",color:ki(a,"secondary")},children:["Next · ",e.title||"Available questions"]}),/* @__PURE__ */U(fi,{style:{fontSize:12,fontWeight:"600",color:g.textMuted},children:[we.indexOf(e)+1," / ",we.length]})]})}),P&&/* @__PURE__ */E(Rc,{propositions:P.props.filter(e=>!ne(e)),title:P.title,onClose:()=>T(null)})]})})}if("shelf"===t){const e=function(e,t,n){const i=Math.floor(Math.max(0,Math.min(t,e-1))/n)*n,o=Math.min(e,i+n);return{start:i,end:o,prev:i>0?i-n:null,next:o<e?o:null}}(we.length,we.indexOf(xe),ue),{start:t,end:n,next:o}=e,r=null===o?[]:we.slice(o,o+ue),l=(e,t=!1)=>{L(we[e].key),t&&R.current?.scrollIntoView?.({block:"start",behavior:"smooth"})};/* @__PURE__ */
327
- return U(W,{ref:R,style:{minWidth:0},children:[we.length>ue&&/* @__PURE__ */E(W,{style:{paddingTop:4,paddingBottom:12},children:/* @__PURE__ */E(Zc,{theme:a,events:we,page:e,per:ue,picked:ve,onGo:l,renderTeamLogo:h,racing:i})}),
328
- /* @__PURE__ */E(W,{onLayout:e=>O(e.nativeEvent.layout.width),style:{flexDirection:"row",flexWrap:"wrap",alignItems:"stretch",gap:12},children:we.slice(t,n).map(e=>/* @__PURE__ */E(W,{style:{width:ue>1?fe:"100%"},children:be(e)},e.key))}),null!==o&&/* @__PURE__ */U(vi,{theme:B,variant:"quiet",block:!0,accessibilityLabel:`Up next: ${r.map(e=>e.title||"Available picks").join(", ")}`,onPress:()=>l(o,!0),style:{marginTop:12,minHeight:60,paddingVertical:10,paddingHorizontal:14,justifyContent:"space-between"},children:[/* @__PURE__ */U(W,{style:{flexShrink:1,gap:2},children:[/* @__PURE__ */E(fi,{style:{fontSize:11,fontWeight:"800",letterSpacing:1.3,textTransform:"uppercase",opacity:.7,color:ki(B,"quiet")},children:"Up next"}),r.map(e=>/* @__PURE__ */E(fi,{style:{fontSize:14,fontWeight:"800",color:ki(B,"quiet")},children:e.title||"Available picks"},e.key))]}),/* @__PURE__ */E(td,{paths:["M5 12h14","m13 6 6 6-6 6"],size:20,strokeWidth:2.4,color:ki(B,"quiet")})]}),P&&/* @__PURE__ */E(Rc,{propositions:P.props.filter(e=>!ne(e)),title:P.title,onClose:()=>T(null)})]})}if("call"===t)/* @__PURE__ */return U(W,{style:{gap:12},children:[we.length>1&&/* @__PURE__ */E(vi,{theme:B,variant:"secondary",block:!0,accessibilityState:{expanded:G},onPress:()=>V(e=>!e),children:`${i?"Choose a race":"Change match"} · ${we.length} available`}),G&&/* @__PURE__ */E(k,{style:{maxHeight:250},children:we.map(e=>/* @__PURE__ */U(ad,{theme:a,selected:e.key===xe?.key,onPress:()=>{L(e.key),V(!1)},style:{minHeight:64,padding:12,borderBottomWidth:1,borderColor:m,backgroundColor:e.key===xe?.key?g.infoBg:p},children:[/* @__PURE__ */E(fi,{style:{fontSize:14,color:g.text,fontWeight:"700"},children:e.title||"Available picks"}),/* @__PURE__ */U(fi,{style:{fontSize:12,color:g.textMuted,marginTop:5},children:[e.props.filter(e=>o[e.id]).length," selected"]})]},e.key))}),xe?(Be=xe,/* @__PURE__ */U(W,{style:{borderWidth:1,borderColor:m,borderRadius:sn(a,16),backgroundColor:p,marginBottom:20,overflow:"hidden"},children:[
318
+ /* @__PURE__ */E(fi,{style:[hd.shortLabel,{color:b,fontFamily:v}],children:n?e.home:Gc(e.home)}),
319
+ /* @__PURE__ */E(fi,{style:[hd.vs,{color:w}],children:"v"}),
320
+ /* @__PURE__ */E(fi,{style:[hd.shortLabel,{color:b,fontFamily:v}],children:n?e.away:Gc(e.away)})]})},de=e=>e.racing||!e.home?/* @__PURE__ */E(fi,{numberOfLines:1,style:[hd.shortLabel,{color:b,fontFamily:v}],children:e.title}):/* @__PURE__ */U(W,{style:{maxWidth:"100%",flexDirection:"row",alignItems:"center"},children:[
321
+ /* @__PURE__ */E(fi,{numberOfLines:1,style:[hd.shortLabel,{color:b,fontFamily:v}],children:Gc(e.home)}),
322
+ /* @__PURE__ */E(fi,{style:[hd.vs,{color:w}],children:"v"}),
323
+ /* @__PURE__ */E(fi,{numberOfLines:1,style:[hd.shortLabel,{color:b,fontFamily:v}],children:Gc(e.away)})]}),he=(e,t)=>{const n=Ye(e.props);return n.some(e=>e.family)?n.map((i,o)=>ye(e,i,t,o===n.length-1)):e.props.map(e=>t(e,{top:!0}))},ue=al(I),fe=(I-12*(ue-1))/ue,ge=fe<cd,pe=(e,{top:t,railed:n,swap:i})=>/* @__PURE__ */U(W,{accessibilityLabel:e.description||e.proposition,style:{flexDirection:n&&ge?"column":"row",alignItems:n&&ge?"stretch":"center",gap:12,padding:12,borderTopWidth:t?1:0,borderTopColor:m,borderLeftWidth:n?0:3,borderLeftColor:o[e.id]?g.buttonPrimary:"transparent",opacity:!i&&ne(e)?.5:1},children:[/* @__PURE__ */U(W,{style:{flex:1,minWidth:0,flexDirection:"row",gap:6},children:[Z?.quickPickedIds?.includes(e.id)?/* @__PURE__ */E(W,{accessible:!0,accessibilityRole:"image",accessibilityLabel:"Picked by QuickPick",style:{marginTop:3},children:/* @__PURE__ */E(ts,{size:14,color:g.primary})}):null,/* @__PURE__ */E(W,{style:{flex:1,minWidth:0},children:le(e,"shelf")})]}),re(e,"sm",n&&ge,i)]},e.id),ye=(e,t,n,i=!1)=>/* @__PURE__ */E(rd,{theme:a,group:t,selections:o,caps:te,game:$,pool:ee,componentById:u,pickOrder:Z?.pickOrder,last:i,renderRow:n},`${e.key}:${t.family}`),me=(e,t=!1)=>/* @__PURE__ */E(td,{theme:a,title:e.title,home:e.home,away:e.away,racing:e.racing,date:e.date,renderTeamLogo:h,trailing:ae(e,t)}),be=e=>{const t=Ye(e.props),n=t.some(e=>e.family);/* @__PURE__ */
324
+ return U(Ml,{theme:a,padded:!1,accessibilityLabel:e.title||"Available picks",style:{overflow:"hidden",flexGrow:1},children:[me(e,ge),n?t.map((n,i)=>ye(e,n,(e,{top:t,swap:n})=>pe(e,{top:t,railed:!0,swap:n}),i===t.length-1)):e.props.map(e=>pe(e,{top:!0,railed:!1}))]})},we=Q.flatMap(e=>e.events),xe=we.find(e=>e.key===M)??we[0],ve=e=>e.props.filter(e=>o[e.id]).length,ke=(e,{top:t,swap:n})=>{/* @__PURE__ */return U(W,{style:{gap:10,padding:12,borderTopWidth:t?1:0,borderColor:m,backgroundColor:g.background},children:[/* @__PURE__ */U(W,{style:{minWidth:0},children:[le(e,"dense"),!n&&!_&&te.isCapped(e)&&Ie(e)&&/* @__PURE__ */E(fi,{style:{fontSize:12,color:g.textMuted,marginTop:6},children:(i=Ie(e),`${He[i]} already picked for this match`)})]}),re(e,"md",!0,n)]},e.id);var i};if(qn(t)){const e=we[we.findIndex(e=>e.key===xe?.key)+1];/* @__PURE__ */
325
+ return E(ra,{children:/* @__PURE__ */U(W,{style:{backgroundColor:g.background},children:[we.length>1&&/* @__PURE__ */E(W,{style:{paddingHorizontal:12,paddingVertical:8},children:/* @__PURE__ */E(ed,{theme:a,events:we,activeKey:xe?.key,picked:ve,onSelect:L,racing:i})}),xe&&/* @__PURE__ */E(W,{style:{borderBottomWidth:1,borderColor:m},children:me(xe)}),
326
+ /* @__PURE__ */E(W,{children:he(xe,ke)}),e&&/* @__PURE__ */E(W,{style:{flexDirection:"row",alignItems:"center",gap:10,padding:12},children:e&&/* @__PURE__ */U(vi,{theme:a,variant:"secondary",onPress:()=>L(e.key),style:{flex:1,minWidth:0},children:[/* @__PURE__ */U(fi,{numberOfLines:1,style:{flexShrink:1,fontSize:14,fontWeight:"800",color:ki(a,"secondary")},children:["Next · ",e.title||"Available questions"]}),/* @__PURE__ */U(fi,{style:{fontSize:12,fontWeight:"600",color:g.textMuted},children:[we.indexOf(e)+1," / ",we.length]})]})}),P&&/* @__PURE__ */E(Ic,{propositions:P.props.filter(e=>!ne(e)),title:P.title,onClose:()=>T(null)})]})})}if("shelf"===t){const e=function(e,t,n){const i=Math.floor(Math.max(0,Math.min(t,e-1))/n)*n,o=Math.min(e,i+n);return{start:i,end:o,prev:i>0?i-n:null,next:o<e?o:null}}(we.length,we.indexOf(xe),ue),{start:t,end:n,next:o}=e,r=null===o?[]:we.slice(o,o+ue),l=(e,t=!1)=>{L(we[e].key),t&&R.current?.scrollIntoView?.({block:"start",behavior:"smooth"})};/* @__PURE__ */
327
+ return U(W,{ref:R,style:{minWidth:0},children:[we.length>ue&&/* @__PURE__ */E(W,{style:{paddingTop:4,paddingBottom:12},children:/* @__PURE__ */E($c,{theme:a,events:we,page:e,per:ue,picked:ve,onGo:l,renderTeamLogo:h,racing:i})}),
328
+ /* @__PURE__ */E(W,{onLayout:e=>O(e.nativeEvent.layout.width),style:{flexDirection:"row",flexWrap:"wrap",alignItems:"stretch",gap:12},children:we.slice(t,n).map(e=>/* @__PURE__ */E(W,{style:{width:ue>1?fe:"100%"},children:be(e)},e.key))}),null!==o&&/* @__PURE__ */U(vi,{theme:B,variant:"quiet",block:!0,accessibilityLabel:`Up next: ${r.map(e=>e.title||"Available picks").join(", ")}`,onPress:()=>l(o,!0),style:{marginTop:12,minHeight:60,paddingVertical:10,paddingHorizontal:14,justifyContent:"space-between"},children:[/* @__PURE__ */U(W,{style:{flexShrink:1,gap:2},children:[/* @__PURE__ */E(fi,{style:{fontSize:11,fontWeight:"800",letterSpacing:1.3,textTransform:"uppercase",opacity:.7,color:ki(B,"quiet")},children:"Up next"}),r.map(e=>/* @__PURE__ */E(fi,{style:{fontSize:14,fontWeight:"800",color:ki(B,"quiet")},children:e.title||"Available picks"},e.key))]}),/* @__PURE__ */E(nd,{paths:["M5 12h14","m13 6 6 6-6 6"],size:20,strokeWidth:2.4,color:ki(B,"quiet")})]}),P&&/* @__PURE__ */E(Ic,{propositions:P.props.filter(e=>!ne(e)),title:P.title,onClose:()=>T(null)})]})}if("call"===t)/* @__PURE__ */return U(W,{style:{gap:12},children:[we.length>1&&/* @__PURE__ */E(vi,{theme:B,variant:"secondary",block:!0,accessibilityState:{expanded:G},onPress:()=>V(e=>!e),children:`${i?"Choose a race":"Change match"} · ${we.length} available`}),G&&/* @__PURE__ */E(k,{style:{maxHeight:250},children:we.map(e=>/* @__PURE__ */U(sd,{theme:a,selected:e.key===xe?.key,onPress:()=>{L(e.key),V(!1)},style:{minHeight:64,padding:12,borderBottomWidth:1,borderColor:m,backgroundColor:e.key===xe?.key?g.infoBg:p},children:[/* @__PURE__ */E(fi,{style:{fontSize:14,color:g.text,fontWeight:"700"},children:e.title||"Available picks"}),/* @__PURE__ */U(fi,{style:{fontSize:12,color:g.textMuted,marginTop:5},children:[e.props.filter(e=>o[e.id]).length," selected"]})]},e.key))}),xe?(Be=xe,/* @__PURE__ */U(W,{style:{borderWidth:1,borderColor:m,borderRadius:sn(a,16),backgroundColor:p,marginBottom:20,overflow:"hidden"},children:[
329
329
  /* @__PURE__ */E(W,{style:{backgroundColor:y},children:me(Be)}),he(Be,(e,{top:t,swap:n})=>/* @__PURE__ */U(W,{style:{gap:14,padding:14,borderTopWidth:t?1:0,borderTopColor:m,opacity:!n&&ne(e)?.5:1},children:[le(e,"call"),re(e,"md",!0,n)]},e.id)),
330
- /* @__PURE__ */E(W,{style:{padding:12,borderTopWidth:1,borderTopColor:m,flexDirection:"row",flexWrap:"wrap",alignItems:"center",gap:10},children:/* @__PURE__ */U(fi,{style:{fontSize:12,color:w},children:[Be.props.filter(e=>o[e.id]).length," selected"]})})]},Be.key)):null,P&&/* @__PURE__ */E(Rc,{propositions:P.props.filter(e=>!ne(e)),title:P.title,onClose:()=>T(null)})]});var Be;const Ce=e=>"compact"===t?(e=>/* @__PURE__ */U(W,{style:[dd.compactCard,{borderRadius:sn(a,16),borderColor:g.border,backgroundColor:p}],children:[/* @__PURE__ */U(W,{style:[dd.compactHeader,{backgroundColor:y}],children:[!e.racing&&oe(e.home,18),ce(e),!e.racing&&oe(e.away,18),e.date&&/* @__PURE__ */U(fi,{style:[dd.compactTime,{color:w}],children:[e.date.toLocaleDateString("en-AU",{weekday:"short",day:"numeric",month:"short"})," ",Ec(e.date)]}),
331
- /* @__PURE__ */E(W,{style:{marginLeft:"auto"},children:ae(e)})]}),e.props.map(e=>/* @__PURE__ */U(W,{style:[dd.compactRow,{borderTopColor:m,opacity:ne(e)?.45:1}],children:[/* @__PURE__ */E(W,{style:{flex:1,minWidth:0},children:le(e,"compact")}),re(e,"xs")]},e.id))]},e.key))(e):((e,t)=>{const n=!D.has(e.key),i=`${e.props.length} proposition${1===e.props.length?"":"s"}`;/* @__PURE__ */
332
- return U(W,n?{style:[dd.splitCard,{borderRadius:sn(a,16),borderColor:g.border,backgroundColor:p}],children:[/* @__PURE__ */U(W,{style:[dd.splitStub,{borderColor:m,backgroundColor:y}],children:[!e.racing&&/* @__PURE__ */U(W,{style:{flexDirection:"row",alignItems:"center",gap:2},children:[oe(e.home,24),oe(e.away,24)]}),de(e),e.date&&/* @__PURE__ */U(fi,{style:[dd.time,{color:w}],children:[e.date.toLocaleDateString("en-AU",{weekday:"short",day:"numeric",month:"short"})," ",Ec(e.date)]}),ae(e)]}),/* @__PURE__ */U(W,{style:{flex:1,minWidth:0},children:[/* @__PURE__ */U(W,{style:[dd.splitCountRow,{borderBottomColor:m}],children:[/* @__PURE__ */E(fi,{numberOfLines:1,style:[dd.splitTitle,{color:b,fontFamily:v}],children:e.title}),/* @__PURE__ */E(W,{style:{marginLeft:"auto",flexDirection:"row",alignItems:"center",gap:8},children:se(e,n)})]}),/* @__PURE__ */E(W,{style:dd.splitBody,children:e.props.map(e=>/* @__PURE__ */U(W,{style:[t?{flexDirection:"row",alignItems:"center",gap:10}:{flexDirection:"column",gap:10},{opacity:ne(e)?.45:1}],children:[/* @__PURE__ */E(W,{style:{flex:1,minWidth:0},children:le(e,"split")}),t?re(e,"xs"):re(e,"sm",!0)]},e.id))})]})]}:{style:[dd.foldedStrip,{borderRadius:sn(a,16),borderColor:g.border,backgroundColor:p}],children:[
333
- /* @__PURE__ */U(W,{style:[dd.foldedStub,{borderColor:m,backgroundColor:y}],children:[!e.racing&&/* @__PURE__ */U(j,{children:[oe(e.home,16),oe(e.away,16)]}),ce(e)]}),
334
- /* @__PURE__ */E(fi,{style:[dd.count,dd.foldedCount,{color:w}],children:i}),
330
+ /* @__PURE__ */E(W,{style:{padding:12,borderTopWidth:1,borderTopColor:m,flexDirection:"row",flexWrap:"wrap",alignItems:"center",gap:10},children:/* @__PURE__ */U(fi,{style:{fontSize:12,color:w},children:[Be.props.filter(e=>o[e.id]).length," selected"]})})]},Be.key)):null,P&&/* @__PURE__ */E(Ic,{propositions:P.props.filter(e=>!ne(e)),title:P.title,onClose:()=>T(null)})]});var Be;const Ce=e=>"compact"===t?(e=>/* @__PURE__ */U(W,{style:[hd.compactCard,{borderRadius:sn(a,16),borderColor:g.border,backgroundColor:p}],children:[/* @__PURE__ */U(W,{style:[hd.compactHeader,{backgroundColor:y}],children:[!e.racing&&oe(e.home,18),ce(e),!e.racing&&oe(e.away,18),e.date&&/* @__PURE__ */U(fi,{style:[hd.compactTime,{color:w}],children:[e.date.toLocaleDateString("en-AU",{weekday:"short",day:"numeric",month:"short"})," ",Uc(e.date)]}),
331
+ /* @__PURE__ */E(W,{style:{marginLeft:"auto"},children:ae(e)})]}),e.props.map(e=>/* @__PURE__ */U(W,{style:[hd.compactRow,{borderTopColor:m,opacity:ne(e)?.45:1}],children:[/* @__PURE__ */E(W,{style:{flex:1,minWidth:0},children:le(e,"compact")}),re(e,"xs")]},e.id))]},e.key))(e):((e,t)=>{const n=!D.has(e.key),i=`${e.props.length} proposition${1===e.props.length?"":"s"}`;/* @__PURE__ */
332
+ return U(W,n?{style:[hd.splitCard,{borderRadius:sn(a,16),borderColor:g.border,backgroundColor:p}],children:[/* @__PURE__ */U(W,{style:[hd.splitStub,{borderColor:m,backgroundColor:y}],children:[!e.racing&&/* @__PURE__ */U(W,{style:{flexDirection:"row",alignItems:"center",gap:2},children:[oe(e.home,24),oe(e.away,24)]}),de(e),e.date&&/* @__PURE__ */U(fi,{style:[hd.time,{color:w}],children:[e.date.toLocaleDateString("en-AU",{weekday:"short",day:"numeric",month:"short"})," ",Uc(e.date)]}),ae(e)]}),/* @__PURE__ */U(W,{style:{flex:1,minWidth:0},children:[/* @__PURE__ */U(W,{style:[hd.splitCountRow,{borderBottomColor:m}],children:[/* @__PURE__ */E(fi,{numberOfLines:1,style:[hd.splitTitle,{color:b,fontFamily:v}],children:e.title}),/* @__PURE__ */E(W,{style:{marginLeft:"auto",flexDirection:"row",alignItems:"center",gap:8},children:se(e,n)})]}),/* @__PURE__ */E(W,{style:hd.splitBody,children:e.props.map(e=>/* @__PURE__ */U(W,{style:[t?{flexDirection:"row",alignItems:"center",gap:10}:{flexDirection:"column",gap:10},{opacity:ne(e)?.45:1}],children:[/* @__PURE__ */E(W,{style:{flex:1,minWidth:0},children:le(e,"split")}),t?re(e,"xs"):re(e,"sm",!0)]},e.id))})]})]}:{style:[hd.foldedStrip,{borderRadius:sn(a,16),borderColor:g.border,backgroundColor:p}],children:[
333
+ /* @__PURE__ */U(W,{style:[hd.foldedStub,{borderColor:m,backgroundColor:y}],children:[!e.racing&&/* @__PURE__ */U(j,{children:[oe(e.home,16),oe(e.away,16)]}),ce(e)]}),
334
+ /* @__PURE__ */E(fi,{style:[hd.count,hd.foldedCount,{color:w}],children:i}),
335
335
  /* @__PURE__ */E(W,{style:{marginLeft:"auto",paddingRight:8},children:se(e,n)})]},e.key)})(e,"split-inline"===t);/* @__PURE__ */
336
- return U(W,{style:{paddingBottom:16},children:[Q.map(e=>{/* @__PURE__ */return U(W,{children:[e.label?(t=e.label,/* @__PURE__ */U(W,{style:dd.dayHeader,children:[/* @__PURE__ */E(fi,{style:[dd.dayLabel,{color:hn(B),fontFamily:v}],children:t}),/* @__PURE__ */E(W,{style:[dd.rule,{backgroundColor:S}]})]})):null,e.events.map(Ce)]},e.key);var t}),P&&/* @__PURE__ */E(Rc,{propositions:P.props.filter(e=>!ne(e)),title:P.title,onClose:()=>T(null)})]})}function ad({theme:e,selected:t,onPress:n,style:i,children:o}){const{hovered:r,pressed:l,handlers:a}=wi(),s=t?null:ai(e.colors.primary,{hovered:r,pressed:l});/* @__PURE__ */
337
- return E(z,{...a,activeOpacity:1,accessibilityRole:"button",accessibilityState:{selected:t},onPress:n,style:[i,s&&{backgroundColor:s.background},xi(l)],children:o})}var sd=440;function cd({color:e}){/* @__PURE__ */
338
- return E(A,{width:14,height:14,viewBox:"0 0 24 24",fill:"none",children:/* @__PURE__ */E(H,{d:"m6 9 6 6 6-6",stroke:e,strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})})}var dd=B.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},count:{fontSize:10,fontWeight:"600"},splitTitle:{fontSize:11,fontWeight:"700",flexShrink:1},slotChip:{borderWidth:1,paddingHorizontal:6,paddingVertical:1},slotChipText:{fontSize:8.5,fontWeight:"700",letterSpacing:.25,textTransform:"uppercase"},foldedCount:{fontSize:11,paddingHorizontal:12},time:{fontSize:9.5,fontWeight:"500"},foldedStrip:{flexDirection:"row",alignItems:"center",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",borderWidth:1,overflow:"hidden",marginBottom:8},splitStub:{width:96,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:{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}}),hd=12;function ud({matchup:e,renderTeamLogo:t,altText:n,mutedColor:i,size:o="sm"}){const{width:r}=F(),l=r>=640,[a,s=""]=e.split(" vs "),c=s.length>0,d="md"===o&&l?16:14;if(!c)/* @__PURE__ */return E(fi,{style:{color:n,fontSize:d,fontWeight:"600"},children:e});const h=e=>/* @__PURE__ */U(W,{style:gd.teamLogoRowWrap,children:[t?.(e),/* @__PURE__ */E(fi,{style:{color:n,fontSize:d,fontWeight:"600",flexShrink:1},children:e})]}),u=/* @__PURE__ */E(fi,{style:{color:i,fontSize:12,flexShrink:0},children:"vs"});/* @__PURE__ */
339
- return U(W,l?{style:gd.matchupTeamsRow,children:[h(a),u,h(s)]}:{style:gd.matchupTeamsStacked,children:[u,/* @__PURE__ */U(W,{style:{flexShrink:1,minWidth:0},children:[h(a),h(s)]})]})}function fd({game:t,propositions:n,selections:i,onToggleSelection:o,onNext:a,onBack:c,loading:h,error:f,theme:g,colorScheme:p,hideActions:y=!1,initialSport:m,renderTeamLogo:b,disableQuickPick:w=!1,selectedPropositionCount:x,onPropositionCountChange:v,gameCategory:k,headerExtra:B,railSlot:C,variant:P,disableEventSwipe:T}){const D=r(gl),M=xr(t),L=M&&D?function(e,t){if(e.loading)return"recalculating";const n=e.data;return n&&t>0&&!n.can_submit&&0===n.choices.length?"stuck":null}(D.correlation,Object.keys(i).length):null,R=function(e){const[t,n]=d(!1);return l(()=>{if(!e)return void n(!1);const t=setTimeout(()=>n(!0),200);return()=>clearTimeout(t)},[e,200]),e&&t}("recalculating"===L),I=D?.sportBaseKey,O=D?.compositeComponentById,G=P??D?.selectionVariant??("playbook"===D?.uiVariant?"shelf":D?.uiVariant&&"default"!==D.uiVariant?D.uiVariant:void 0),V=T??D?.disableEventSwipe??!1,Y=Yn(g,p),N=Y.colors,X=ra(Y).colors,q=kn(Y),K=Cn(Y),Q=N.matchupHeader??(t.color?tn(t.color,.14):Bn(Y)),J=N.textAlt??N.text;Nr(Y),Yr(Y),hn(Y);const{width:Z}=F(),$=Z>=640,_=function(e){return{shadowColor:"#000",shadowOpacity:"dark"===e.colorScheme?.4:.12,shadowRadius:12,shadowOffset:{width:0,height:6},elevation:2}}(Y),ee=!!(t.allowed_propositions&&t.allowed_propositions.length>0),{min:te,max:ne}=Wt(t,x),ie=te,oe=ne,[re,le]=e.useState(()=>new Set(Object.keys($t(n,k,I))));e.useEffect(()=>{const e=$t(n,k,I),t=Object.keys(e);t.length>0&&le(e=>t.every(t=>e.has(t))?e:new Set(t))},[n]);const ae=ie>0&&ie===oe,se=ie||1,ce=oe||n.length,de=oe||ie||n.length,[he,ue]=e.useState(de),fe=Object.keys(i).length,ge=oe>0&&fe>=oe,pe=ee?null!=x&&fe===x:St(fe,t.min_propositions,t.max_propositions);t.min_bet,oe>0?Math.max(2,2*oe):Math.max(2,2*fe);const ye=e.useRef(fe),me=ee?null!=x&&fe===x:oe>0&&fe===oe;l(()=>{!M&&me&&fe>ye.current&&a?.(),ye.current=fe},[fe,me]);const be=s(()=>Ge(n,i,O,t),[n,i,O,t]);s(()=>n.some(e=>null!==Ie(e)),[n]);const we=(e,t)=>{if(e in i)return void o(e,t);if(ge)return;const r=n.find(t=>t.id===e);r&&!M&&be.isCapped(r)||o(e,t)};l(()=>{const e=oe||n.length,t=ie||1;ue(n=>ae?oe:Math.max(t,Math.min(n,e)))},[n.length,ie,oe,ae]);const xe=s(()=>At(k,n,I),[k,n,I]),ve=s(()=>$t(n,k,I),[n,k,I]),ke=Object.keys(ve);if(h)/* @__PURE__ */return E(pc,{theme:Y,variant:G,sports:C?D?.sportOptions.length??0:void 0,actions:!!B,headerBg:Q,shadow:_,logos:!!b,swipe:!V});if(f)/* @__PURE__ */return E(W,{style:gd.centered,children:/* @__PURE__ */E(fi,{style:{color:N.error},children:f})});const Be=!w&&n.length>0;/* @__PURE__ */
340
- return U(W,{style:{gap:qn(D?.uiVariant)?0:$?24:16,paddingBottom:qn(D?.uiVariant)?0:64},children:[(()=>{const e=B?/* @__PURE__ */E(W,{style:gd.filterToggleRow,children:B}):null;return e||C?"function"==typeof C?C(e):/* @__PURE__ */U(W,{style:{gap:10},children:[C,e]}):null})(),Be&&/* @__PURE__ */E(W,{style:[gd.topBar,{justifyContent:"flex-end"}],children:/* @__PURE__ */U(W,{style:[gd.quickPickRow,{gap:$?8:6}],children:[!ae&&/* @__PURE__ */U(W,{style:gd.quickPickCountRow,children:[/* @__PURE__ */E(S,{keyboardType:"number-pad",accessibilityLabel:"QuickPick count",value:String(he),onChangeText:e=>{const t=parseInt(e,10);isNaN(t)||ue(Math.max(se,Math.min(ce,t)))},style:[gd.quickPickInput,{borderRadius:sn(Y,8),width:$?56:40,paddingHorizontal:$?8:4,paddingVertical:$?6:4,fontSize:$?14:12,color:X.textAlt??X.text,backgroundColor:X.backgroundAlt,borderColor:X.border}]}),/* @__PURE__ */U(fi,{style:{color:X.textMuted,fontSize:12},children:["/ ",n.length]})]}),/* @__PURE__ */E(ns,{onPress:()=>{const e=ae?oe:he;for(const n of Object.keys(i)){const e=Number(n);o(e,i[e])}const{yesPicks:t,noPicks:r}=function(e,t){const n=[...e].sort(()=>Math.random()-.5).slice(0,t),i=[],o=[];for(const r of n)Math.random()<.5?i.push(r):o.push(r);return{yesPicks:i,noPicks:o}}(n,e);for(const n of t)o(n.id,"yes");for(const n of r)o(n.id,"no");a?.()}})]})}),"recalculating"===L&&/* @__PURE__ */E(W,{testID:"correlation-loading",accessibilityLiveRegion:"polite",accessibilityLabel:kr,style:{height:0}}),R&&/* @__PURE__ */E(W,{testID:"correlation-overlay",pointerEvents:"none",style:{position:"absolute",top:0,bottom:0,left:0,right:0,zIndex:50,alignItems:"center",backgroundColor:"rgba(15, 23, 42, 0.28)"},children:/* @__PURE__ */U(W,{style:{marginTop:24,flexDirection:"row",alignItems:"center",gap:12,paddingHorizontal:24,paddingVertical:16,borderRadius:sn(Y,16),backgroundColor:q,shadowColor:"#000",shadowOpacity:.28,shadowRadius:24,shadowOffset:{width:0,height:16},elevation:12},children:[/* @__PURE__ */E(u,{size:"small",color:N.primary}),/* @__PURE__ */E(fi,{style:{color:N.text,fontSize:16,fontWeight:"600"},children:fe>0?kr:"Loading picks…"})]})}),"stuck"===L&&/* @__PURE__ */E(W,{pointerEvents:"none",style:{position:"absolute",top:16,left:16,right:16,zIndex:50,alignItems:"center"},children:/* @__PURE__ */E(W,{testID:"correlation-stuck",accessibilityLiveRegion:"polite",style:{maxWidth:360,paddingHorizontal:20,paddingVertical:12,borderRadius:sn(Y,16),borderWidth:1,borderColor:N.warning,backgroundColor:N.warningBg,elevation:10},children:/* @__PURE__ */E(fi,{style:{color:N.warningText,fontSize:14,fontWeight:"600",textAlign:"center"},children:"Nothing left can finish this multi. Remove a pick to keep going."})})}),n.length>0&&G?/* @__PURE__ */E(ld,{variant:G,groups:ve,racing:xe,selections:i,onToggleSelection:we,atMax:ge,theme:Y,renderTeamLogo:b,componentById:O,disableEventSwipe:V}):null,n.length>0&&!G&&/* @__PURE__ */E(W,{style:gd.matchupList,children:ke.every(e=>1===ve[e].length)?/* @__PURE__ */E(W,{style:[gd.matchupCard,{borderRadius:sn(Y,hd),borderColor:N.border,backgroundColor:q},_],children:ke.map((e,t)=>{const n=ve[e][0],o="yes"===i[n.id],r="no"===i[n.id],l=n.id in i,a=ge&&!l||!M&&be.isCapped(n),s=0===t,c=t===ke.length-1;/* @__PURE__ */
341
- return U(W,{style:{borderTopColor:N.border,borderTopWidth:s?0:1,opacity:a?.45:1},children:[/* @__PURE__ */U(W,{style:{paddingHorizontal:16,paddingVertical:$?12:10,backgroundColor:Q,borderTopLeftRadius:s?sn(Y,hd):0,borderTopRightRadius:s?sn(Y,hd):0},children:[/* @__PURE__ */E(W,{style:{minWidth:0},children:/* @__PURE__ */E(ud,{matchup:e,renderTeamLogo:b,altText:J,mutedColor:N.textAltMuted??N.textMuted??J})}),/* @__PURE__ */E(W,{style:{flexDirection:"row",alignItems:"center",gap:8,marginTop:2,minWidth:0},children:n.commence_time&&/* @__PURE__ */E(fi,{style:{color:N.textAltMuted??N.textMuted,fontSize:11,opacity:.7},children:mt(n.commence_time)})})]}),/* @__PURE__ */U(W,{style:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",gap:12,paddingHorizontal:16,paddingVertical:$?14:12,backgroundColor:K,borderTopWidth:1,borderTopColor:N.border,borderBottomLeftRadius:c?sn(Y,hd):0,borderBottomRightRadius:c?sn(Y,hd):0},children:[/* @__PURE__ */U(W,{style:{flex:1,minWidth:0,flexDirection:"row",alignItems:"flex-start",gap:8},children:[dc(n,b,e),/* @__PURE__ */E(fc,{id:n.id,kind:"text",children:/* @__PURE__ */E(uc,{prop:n,colors:N,componentById:O,renderTeamLogo:b,theme:Y})})]}),/* @__PURE__ */E(fc,{id:n.id,kind:"answers",children:/* @__PURE__ */E(Hi,{yesDisabled:!!D?.canSelectAnswer&&!D.canSelectAnswer(n.id,"yes"),noDisabled:!!D?.canSelectAnswer&&!D.canSelectAnswer(n.id,"no"),theme:Y,size:"sm",value:o?"yes":r?"no":null,onYes:()=>we(n.id,"yes"),onNo:()=>we(n.id,"no"),disabled:a})})]})]},n.id)})}):ke.map(e=>{const t=ve[e],o=re.has(e),r=t.filter(e=>e.id in i).length,l=t[0]?.commence_time;/* @__PURE__ */
342
- return U(W,{style:[gd.matchupCard,{borderRadius:sn(Y,hd),borderColor:N.border,backgroundColor:q},_],children:[/* @__PURE__ */E(z,{onPress:()=>{return t=e,le(e=>{const n=new Set(e);return n.has(t)?n.delete(t):n.add(t),n});var t},style:[gd.matchupHeader,{paddingHorizontal:0,paddingVertical:0},{backgroundColor:Q,borderTopLeftRadius:sn(Y,hd),borderTopRightRadius:sn(Y,hd),borderBottomLeftRadius:o?0:hd,borderBottomRightRadius:o?0:hd}],children:/* @__PURE__ */E(W,{style:{flex:1,minWidth:0},children:/* @__PURE__ */E(ed,{theme:Y,title:e,...Xc(e,xe),racing:xe,date:l?new Date(l):null,renderTeamLogo:b,trailing:/* @__PURE__ */U(j,{children:[r>0&&/* @__PURE__ */E(W,{style:[gd.answeredBadge,{borderRadius:sn(Y,999),backgroundColor:N.successBg}],children:/* @__PURE__ */U(fi,{style:{color:N.successText,fontSize:12,fontWeight:"500"},children:[r,"/",t.length]})}),/* @__PURE__ */E(A,{width:18,height:18,viewBox:"0 0 24 24",style:{flexShrink:0,transform:[{rotate:o?"180deg":"0deg"}]},children:/* @__PURE__ */E(H,{d:"m6 9 6 6 6-6",stroke:N.textAltMuted??N.textMuted,strokeWidth:2.5,strokeLinecap:"round",strokeLinejoin:"round",fill:"none"})})]})})})}),o&&/* @__PURE__ */E(W,{children:/* @__PURE__ */E(j,{children:(()=>{const o=(t,{top:n,swap:o},r=!1)=>{const l="yes"===i[t.id],a="no"===i[t.id],s=t.id in i,c=!o&&(ge&&!s||!M&&be.isCapped(t));/* @__PURE__ */
343
- return E(W,{style:{paddingHorizontal:16,paddingVertical:$?14:12,backgroundColor:K,borderTopColor:N.border,borderTopWidth:n?1:0,opacity:c?.45:1,borderBottomLeftRadius:r?sn(Y,hd):0,borderBottomRightRadius:r?sn(Y,hd):0},children:/* @__PURE__ */U(W,{style:{flexDirection:"row",flexWrap:"wrap",justifyContent:"space-between",alignItems:"flex-start",columnGap:$?16:8,rowGap:$?16:8},children:[/* @__PURE__ */U(W,{style:{flex:1,minWidth:128,flexDirection:"row",alignItems:"flex-start",gap:8},children:[dc(t,b,e),/* @__PURE__ */E(fc,{id:t.id,kind:"text",children:/* @__PURE__ */E(uc,{prop:t,colors:N,size:"md",componentById:O,renderTeamLogo:b,theme:Y})})]}),/* @__PURE__ */E(fc,{id:t.id,kind:"answers",children:/* @__PURE__ */E(Hi,{yesDisabled:!(o||!D?.canSelectAnswer||D.canSelectAnswer(t.id,"yes")),noDisabled:!(o||!D?.canSelectAnswer||D.canSelectAnswer(t.id,"no")),theme:Y,size:"sm",value:l?"yes":a?"no":null,onYes:()=>o?D?.swapSelection(t.id,"yes",o()):we(t.id,"yes"),onNo:()=>o?D?.swapSelection(t.id,"no",o()):we(t.id,"no"),disabled:c})})]})},t.id)},r=Ye(t);return r.some(e=>e.family)?r.map(e=>/* @__PURE__ */E(od,{theme:Y,group:e,selections:i,caps:be,game:D?.selectedGame,pool:n,componentById:O,pickOrder:D?.pickOrder,renderRow:o},e.family??"other")):t.map((e,n)=>o(e,{top:n>0},n===t.length-1))})()})})]},e)})}),0===n.length&&!(M&&D?.correlation.loading)&&/* @__PURE__ */E(W,{style:gd.centered,children:/* @__PURE__ */E(fi,{style:{color:X.textMuted},children:"No propositions available at this time"})}),!y&&/* @__PURE__ */U(W,{style:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",gap:12,borderTopWidth:1,borderTopColor:N.border,backgroundColor:q,marginHorizontal:$?-24:-16,paddingHorizontal:$?24:16,paddingVertical:$?16:12},children:[/* @__PURE__ */E(vi,{theme:Y,size:"lg",variant:"secondary",onPress:c,children:"Back"}),/* @__PURE__ */E(W,{style:{flexDirection:"row",alignItems:"center",gap:$?12:8},children:/* @__PURE__ */E(vi,{theme:Y,size:"lg",disabled:!pe,onPress:a,children:"Wager"})})]})]})}var gd=B.create({centered:{alignItems:"center",justifyContent:"center",padding:32,flexDirection:"row"},filterToggleRow:{flexDirection:"row",alignItems:"center",gap:8},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:{borderWidth:2,fontWeight:"600",textAlign:"center"},matchupList:{gap:16},matchupCard:{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},slotChip:{borderWidth:1,paddingHorizontal:6,paddingVertical:1},slotChipText:{fontSize:9,fontWeight:"700",letterSpacing:.25,textTransform:"uppercase"}});function pd({propositions:e,selections:t,onToggleSelection:n,onNext:i,onBack:o,theme:r,colorScheme:l,hideActions:a=!1,renderTeamLogo:s,allowAnswerToggle:c=!0,gameName:h,potentialPayout:u,defaultExpanded:f=!1,componentById:g,addMorePicks:p}){const y="shelf"===Zn(),m=Yn(r,l),b=m.colors,w=kn(m),x=Nr(m),v=hn(m),k=b.textAlt??b.text,{width:B}=F(),C=B>=640,S=function(e){return{shadowColor:"#000",shadowOpacity:"dark"===e.colorScheme?.4:.12,shadowRadius:12,shadowOffset:{width:0,height:6},elevation:2}}(m),[P,T]=d(f),D=e.filter(e=>e.id in t),M=D.length,L=_t(D),R=b.matchupHeader??Bn(m),I=Cn(m),O=C?16:12;/* @__PURE__ */
336
+ return U(W,{style:{paddingBottom:16},children:[Q.map(e=>{/* @__PURE__ */return U(W,{children:[e.label?(t=e.label,/* @__PURE__ */U(W,{style:hd.dayHeader,children:[/* @__PURE__ */E(fi,{style:[hd.dayLabel,{color:hn(B),fontFamily:v}],children:t}),/* @__PURE__ */E(W,{style:[hd.rule,{backgroundColor:S}]})]})):null,e.events.map(Ce)]},e.key);var t}),P&&/* @__PURE__ */E(Ic,{propositions:P.props.filter(e=>!ne(e)),title:P.title,onClose:()=>T(null)})]})}function sd({theme:e,selected:t,onPress:n,style:i,children:o}){const{hovered:r,pressed:l,handlers:a}=wi(),s=t?null:ai(e.colors.primary,{hovered:r,pressed:l});/* @__PURE__ */
337
+ return E(z,{...a,activeOpacity:1,accessibilityRole:"button",accessibilityState:{selected:t},onPress:n,style:[i,s&&{backgroundColor:s.background},xi(l)],children:o})}var cd=440;function dd({color:e}){/* @__PURE__ */
338
+ return E(A,{width:14,height:14,viewBox:"0 0 24 24",fill:"none",children:/* @__PURE__ */E(H,{d:"m6 9 6 6 6-6",stroke:e,strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})})}var hd=B.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},count:{fontSize:10,fontWeight:"600"},splitTitle:{fontSize:11,fontWeight:"700",flexShrink:1},slotChip:{borderWidth:1,paddingHorizontal:6,paddingVertical:1},slotChipText:{fontSize:8.5,fontWeight:"700",letterSpacing:.25,textTransform:"uppercase"},foldedCount:{fontSize:11,paddingHorizontal:12},time:{fontSize:9.5,fontWeight:"500"},foldedStrip:{flexDirection:"row",alignItems:"center",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",borderWidth:1,overflow:"hidden",marginBottom:8},splitStub:{width:96,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:{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}}),ud=12;function fd({matchup:e,renderTeamLogo:t,altText:n,mutedColor:i,size:o="sm"}){const{width:r}=F(),l=r>=640,[a,s=""]=e.split(" vs "),c=s.length>0,d="md"===o&&l?16:14;if(!c)/* @__PURE__ */return E(fi,{style:{color:n,fontSize:d,fontWeight:"600"},children:e});const h=e=>/* @__PURE__ */U(W,{style:pd.teamLogoRowWrap,children:[t?.(e),/* @__PURE__ */E(fi,{style:{color:n,fontSize:d,fontWeight:"600",flexShrink:1},children:e})]}),u=/* @__PURE__ */E(fi,{style:{color:i,fontSize:12,flexShrink:0},children:"vs"});/* @__PURE__ */
339
+ return U(W,l?{style:pd.matchupTeamsRow,children:[h(a),u,h(s)]}:{style:pd.matchupTeamsStacked,children:[u,/* @__PURE__ */U(W,{style:{flexShrink:1,minWidth:0},children:[h(a),h(s)]})]})}function gd({game:t,propositions:n,selections:i,onToggleSelection:o,onNext:a,onBack:c,loading:h,error:f,theme:g,colorScheme:p,hideActions:y=!1,initialSport:m,renderTeamLogo:b,disableQuickPick:w=!1,selectedPropositionCount:x,onPropositionCountChange:v,gameCategory:k,headerExtra:B,railSlot:C,variant:P,disableEventSwipe:T}){const D=r(pl),M=xr(t),L=M&&D?function(e,t){if(e.loading)return"recalculating";const n=e.data;return n&&t>0&&!n.can_submit&&0===n.choices.length?"stuck":null}(D.correlation,Object.keys(i).length):null,R=function(e){const[t,n]=d(!1);return l(()=>{if(!e)return void n(!1);const t=setTimeout(()=>n(!0),200);return()=>clearTimeout(t)},[e,200]),e&&t}("recalculating"===L),I=D?.sportBaseKey,O=D?.compositeComponentById,G=P??D?.selectionVariant??("playbook"===D?.uiVariant?"shelf":D?.uiVariant&&"default"!==D.uiVariant?D.uiVariant:void 0),V=T??D?.disableEventSwipe??!1,Y=Yn(g,p),N=Y.colors,X=la(Y).colors,q=kn(Y),K=Cn(Y),Q=N.matchupHeader??(t.color?tn(t.color,.14):Bn(Y)),J=N.textAlt??N.text;Nr(Y),Yr(Y),hn(Y);const{width:Z}=F(),$=Z>=640,_=function(e){return{shadowColor:"#000",shadowOpacity:"dark"===e.colorScheme?.4:.12,shadowRadius:12,shadowOffset:{width:0,height:6},elevation:2}}(Y),ee=!!(t.allowed_propositions&&t.allowed_propositions.length>0),{min:te,max:ne}=Wt(t,x),ie=te,oe=ne,[re,le]=e.useState(()=>new Set(Object.keys($t(n,k,I))));e.useEffect(()=>{const e=$t(n,k,I),t=Object.keys(e);t.length>0&&le(e=>t.every(t=>e.has(t))?e:new Set(t))},[n]);const ae=ie>0&&ie===oe,se=ie||1,ce=oe||n.length,de=oe||ie||n.length,[he,ue]=e.useState(de),fe=Object.keys(i).length,ge=oe>0&&fe>=oe,pe=ee?null!=x&&fe===x:St(fe,t.min_propositions,t.max_propositions);t.min_bet,oe>0?Math.max(2,2*oe):Math.max(2,2*fe);const ye=e.useRef(fe),me=ee?null!=x&&fe===x:oe>0&&fe===oe;l(()=>{!M&&me&&fe>ye.current&&a?.(),ye.current=fe},[fe,me]);const be=s(()=>Ge(n,i,O,t),[n,i,O,t]);s(()=>n.some(e=>null!==Ie(e)),[n]);const we=(e,t)=>{if(e in i)return void o(e,t);if(ge)return;const r=n.find(t=>t.id===e);r&&!M&&be.isCapped(r)||o(e,t)};l(()=>{const e=oe||n.length,t=ie||1;ue(n=>ae?oe:Math.max(t,Math.min(n,e)))},[n.length,ie,oe,ae]);const xe=s(()=>At(k,n,I),[k,n,I]),ve=s(()=>$t(n,k,I),[n,k,I]),ke=Object.keys(ve);if(h)/* @__PURE__ */return E(yc,{theme:Y,variant:G,sports:C?D?.sportOptions.length??0:void 0,actions:!!B,headerBg:Q,shadow:_,logos:!!b,swipe:!V});if(f)/* @__PURE__ */return E(W,{style:pd.centered,children:/* @__PURE__ */E(fi,{style:{color:N.error},children:f})});const Be=!w&&n.length>0;/* @__PURE__ */
340
+ return U(W,{style:{gap:qn(D?.uiVariant)?0:$?24:16,paddingBottom:qn(D?.uiVariant)?0:64},children:[(()=>{const e=B?/* @__PURE__ */E(W,{style:pd.filterToggleRow,children:B}):null;return e||C?"function"==typeof C?C(e):/* @__PURE__ */U(W,{style:{gap:10},children:[C,e]}):null})(),Be&&/* @__PURE__ */E(W,{style:[pd.topBar,{justifyContent:"flex-end"}],children:/* @__PURE__ */U(W,{style:[pd.quickPickRow,{gap:$?8:6}],children:[!ae&&/* @__PURE__ */U(W,{style:pd.quickPickCountRow,children:[/* @__PURE__ */E(S,{keyboardType:"number-pad",accessibilityLabel:"QuickPick count",value:String(he),onChangeText:e=>{const t=parseInt(e,10);isNaN(t)||ue(Math.max(se,Math.min(ce,t)))},style:[pd.quickPickInput,{borderRadius:sn(Y,8),width:$?56:40,paddingHorizontal:$?8:4,paddingVertical:$?6:4,fontSize:$?14:12,color:X.textAlt??X.text,backgroundColor:X.backgroundAlt,borderColor:X.border}]}),/* @__PURE__ */U(fi,{style:{color:X.textMuted,fontSize:12},children:["/ ",n.length]})]}),/* @__PURE__ */E(is,{onPress:()=>{const e=ae?oe:he;for(const n of Object.keys(i)){const e=Number(n);o(e,i[e])}const{yesPicks:t,noPicks:r}=function(e,t){const n=[...e].sort(()=>Math.random()-.5).slice(0,t),i=[],o=[];for(const r of n)Math.random()<.5?i.push(r):o.push(r);return{yesPicks:i,noPicks:o}}(n,e);for(const n of t)o(n.id,"yes");for(const n of r)o(n.id,"no");a?.()}})]})}),"recalculating"===L&&/* @__PURE__ */E(W,{testID:"correlation-loading",accessibilityLiveRegion:"polite",accessibilityLabel:kr,style:{height:0}}),R&&/* @__PURE__ */E(W,{testID:"correlation-overlay",pointerEvents:"none",style:{position:"absolute",top:0,bottom:0,left:0,right:0,zIndex:50,alignItems:"center",backgroundColor:"rgba(15, 23, 42, 0.28)"},children:/* @__PURE__ */U(W,{style:{marginTop:24,flexDirection:"row",alignItems:"center",gap:12,paddingHorizontal:24,paddingVertical:16,borderRadius:sn(Y,16),backgroundColor:q,shadowColor:"#000",shadowOpacity:.28,shadowRadius:24,shadowOffset:{width:0,height:16},elevation:12},children:[/* @__PURE__ */E(u,{size:"small",color:N.primary}),/* @__PURE__ */E(fi,{style:{color:N.text,fontSize:16,fontWeight:"600"},children:fe>0?kr:"Loading picks…"})]})}),"stuck"===L&&/* @__PURE__ */E(W,{pointerEvents:"none",style:{position:"absolute",top:16,left:16,right:16,zIndex:50,alignItems:"center"},children:/* @__PURE__ */E(W,{testID:"correlation-stuck",accessibilityLiveRegion:"polite",style:{maxWidth:360,paddingHorizontal:20,paddingVertical:12,borderRadius:sn(Y,16),borderWidth:1,borderColor:N.warning,backgroundColor:N.warningBg,elevation:10},children:/* @__PURE__ */E(fi,{style:{color:N.warningText,fontSize:14,fontWeight:"600",textAlign:"center"},children:"Nothing left can finish this multi. Remove a pick to keep going."})})}),n.length>0&&G?/* @__PURE__ */E(ad,{variant:G,groups:ve,racing:xe,selections:i,onToggleSelection:we,atMax:ge,theme:Y,renderTeamLogo:b,componentById:O,disableEventSwipe:V}):null,n.length>0&&!G&&/* @__PURE__ */E(W,{style:pd.matchupList,children:ke.every(e=>1===ve[e].length)?/* @__PURE__ */E(W,{style:[pd.matchupCard,{borderRadius:sn(Y,ud),borderColor:N.border,backgroundColor:q},_],children:ke.map((e,t)=>{const n=ve[e][0],o="yes"===i[n.id],r="no"===i[n.id],l=n.id in i,a=ge&&!l||!M&&be.isCapped(n),s=0===t,c=t===ke.length-1;/* @__PURE__ */
341
+ return U(W,{style:{borderTopColor:N.border,borderTopWidth:s?0:1,opacity:a?.45:1},children:[/* @__PURE__ */U(W,{style:{paddingHorizontal:16,paddingVertical:$?12:10,backgroundColor:Q,borderTopLeftRadius:s?sn(Y,ud):0,borderTopRightRadius:s?sn(Y,ud):0},children:[/* @__PURE__ */E(W,{style:{minWidth:0},children:/* @__PURE__ */E(fd,{matchup:e,renderTeamLogo:b,altText:J,mutedColor:N.textAltMuted??N.textMuted??J})}),/* @__PURE__ */E(W,{style:{flexDirection:"row",alignItems:"center",gap:8,marginTop:2,minWidth:0},children:n.commence_time&&/* @__PURE__ */E(fi,{style:{color:N.textAltMuted??N.textMuted,fontSize:11,opacity:.7},children:mt(n.commence_time)})})]}),/* @__PURE__ */U(W,{style:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",gap:12,paddingHorizontal:16,paddingVertical:$?14:12,backgroundColor:K,borderTopWidth:1,borderTopColor:N.border,borderBottomLeftRadius:c?sn(Y,ud):0,borderBottomRightRadius:c?sn(Y,ud):0},children:[/* @__PURE__ */U(W,{style:{flex:1,minWidth:0,flexDirection:"row",alignItems:"flex-start",gap:8},children:[hc(n,b,e),/* @__PURE__ */E(gc,{id:n.id,kind:"text",children:/* @__PURE__ */E(fc,{prop:n,colors:N,componentById:O,renderTeamLogo:b,theme:Y})})]}),/* @__PURE__ */E(gc,{id:n.id,kind:"answers",children:/* @__PURE__ */E(Hi,{yesDisabled:!!D?.canSelectAnswer&&!D.canSelectAnswer(n.id,"yes"),noDisabled:!!D?.canSelectAnswer&&!D.canSelectAnswer(n.id,"no"),theme:Y,size:"sm",value:o?"yes":r?"no":null,onYes:()=>we(n.id,"yes"),onNo:()=>we(n.id,"no"),disabled:a})})]})]},n.id)})}):ke.map(e=>{const t=ve[e],o=re.has(e),r=t.filter(e=>e.id in i).length,l=t[0]?.commence_time;/* @__PURE__ */
342
+ return U(W,{style:[pd.matchupCard,{borderRadius:sn(Y,ud),borderColor:N.border,backgroundColor:q},_],children:[/* @__PURE__ */E(z,{onPress:()=>{return t=e,le(e=>{const n=new Set(e);return n.has(t)?n.delete(t):n.add(t),n});var t},style:[pd.matchupHeader,{paddingHorizontal:0,paddingVertical:0},{backgroundColor:Q,borderTopLeftRadius:sn(Y,ud),borderTopRightRadius:sn(Y,ud),borderBottomLeftRadius:o?0:ud,borderBottomRightRadius:o?0:ud}],children:/* @__PURE__ */E(W,{style:{flex:1,minWidth:0},children:/* @__PURE__ */E(td,{theme:Y,title:e,...qc(e,xe),racing:xe,date:l?new Date(l):null,renderTeamLogo:b,trailing:/* @__PURE__ */U(j,{children:[r>0&&/* @__PURE__ */E(W,{style:[pd.answeredBadge,{borderRadius:sn(Y,999),backgroundColor:N.successBg}],children:/* @__PURE__ */U(fi,{style:{color:N.successText,fontSize:12,fontWeight:"500"},children:[r,"/",t.length]})}),/* @__PURE__ */E(A,{width:18,height:18,viewBox:"0 0 24 24",style:{flexShrink:0,transform:[{rotate:o?"180deg":"0deg"}]},children:/* @__PURE__ */E(H,{d:"m6 9 6 6 6-6",stroke:N.textAltMuted??N.textMuted,strokeWidth:2.5,strokeLinecap:"round",strokeLinejoin:"round",fill:"none"})})]})})})}),o&&/* @__PURE__ */E(W,{children:/* @__PURE__ */E(j,{children:(()=>{const o=(t,{top:n,swap:o},r=!1)=>{const l="yes"===i[t.id],a="no"===i[t.id],s=t.id in i,c=!o&&(ge&&!s||!M&&be.isCapped(t));/* @__PURE__ */
343
+ return E(W,{style:{paddingHorizontal:16,paddingVertical:$?14:12,backgroundColor:K,borderTopColor:N.border,borderTopWidth:n?1:0,opacity:c?.45:1,borderBottomLeftRadius:r?sn(Y,ud):0,borderBottomRightRadius:r?sn(Y,ud):0},children:/* @__PURE__ */U(W,{style:{flexDirection:"row",flexWrap:"wrap",justifyContent:"space-between",alignItems:"flex-start",columnGap:$?16:8,rowGap:$?16:8},children:[/* @__PURE__ */U(W,{style:{flex:1,minWidth:128,flexDirection:"row",alignItems:"flex-start",gap:8},children:[hc(t,b,e),/* @__PURE__ */E(gc,{id:t.id,kind:"text",children:/* @__PURE__ */E(fc,{prop:t,colors:N,size:"md",componentById:O,renderTeamLogo:b,theme:Y})})]}),/* @__PURE__ */E(gc,{id:t.id,kind:"answers",children:/* @__PURE__ */E(Hi,{yesDisabled:!(o||!D?.canSelectAnswer||D.canSelectAnswer(t.id,"yes")),noDisabled:!(o||!D?.canSelectAnswer||D.canSelectAnswer(t.id,"no")),theme:Y,size:"sm",value:l?"yes":a?"no":null,onYes:()=>o?D?.swapSelection(t.id,"yes",o()):we(t.id,"yes"),onNo:()=>o?D?.swapSelection(t.id,"no",o()):we(t.id,"no"),disabled:c})})]})},t.id)},r=Ye(t);return r.some(e=>e.family)?r.map(e=>/* @__PURE__ */E(rd,{theme:Y,group:e,selections:i,caps:be,game:D?.selectedGame,pool:n,componentById:O,pickOrder:D?.pickOrder,renderRow:o},e.family??"other")):t.map((e,n)=>o(e,{top:n>0},n===t.length-1))})()})})]},e)})}),0===n.length&&!(M&&D?.correlation.loading)&&/* @__PURE__ */E(W,{style:pd.centered,children:/* @__PURE__ */E(fi,{style:{color:X.textMuted},children:"No propositions available at this time"})}),!y&&/* @__PURE__ */U(W,{style:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",gap:12,borderTopWidth:1,borderTopColor:N.border,backgroundColor:q,marginHorizontal:$?-24:-16,paddingHorizontal:$?24:16,paddingVertical:$?16:12},children:[/* @__PURE__ */E(vi,{theme:Y,size:"lg",variant:"secondary",onPress:c,children:"Back"}),/* @__PURE__ */E(W,{style:{flexDirection:"row",alignItems:"center",gap:$?12:8},children:/* @__PURE__ */E(vi,{theme:Y,size:"lg",disabled:!pe,onPress:a,children:"Wager"})})]})]})}var pd=B.create({centered:{alignItems:"center",justifyContent:"center",padding:32,flexDirection:"row"},filterToggleRow:{flexDirection:"row",alignItems:"center",gap:8},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:{borderWidth:2,fontWeight:"600",textAlign:"center"},matchupList:{gap:16},matchupCard:{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},slotChip:{borderWidth:1,paddingHorizontal:6,paddingVertical:1},slotChipText:{fontSize:9,fontWeight:"700",letterSpacing:.25,textTransform:"uppercase"}});function yd({propositions:e,selections:t,onToggleSelection:n,onNext:i,onBack:o,theme:r,colorScheme:l,hideActions:a=!1,renderTeamLogo:s,allowAnswerToggle:c=!0,gameName:h,potentialPayout:u,defaultExpanded:f=!1,componentById:g,addMorePicks:p}){const y="shelf"===Zn(),m=Yn(r,l),b=m.colors,w=kn(m),x=Nr(m),v=hn(m),k=b.textAlt??b.text,{width:B}=F(),C=B>=640,S=function(e){return{shadowColor:"#000",shadowOpacity:"dark"===e.colorScheme?.4:.12,shadowRadius:12,shadowOffset:{width:0,height:6},elevation:2}}(m),[P,T]=d(f),D=e.filter(e=>e.id in t),M=D.length,L=_t(D),R=b.matchupHeader??Bn(m),I=Cn(m),O=C?16:12;/* @__PURE__ */
344
344
  return U(W,{style:{gap:C?24:16,paddingBottom:64},children:[
345
- /* @__PURE__ */U(W,{style:[yd.section,{borderRadius:sn(m,12),padding:C?24:16,backgroundColor:w,borderColor:b.border},S],children:[
345
+ /* @__PURE__ */U(W,{style:[md.section,{borderRadius:sn(m,12),padding:C?24:16,backgroundColor:w,borderColor:b.border},S],children:[
346
346
  /* @__PURE__ */U(z,{onPress:()=>T(e=>!e),accessibilityRole:"button",accessibilityState:{expanded:P},style:{flexDirection:"row",justifyContent:"space-between",alignItems:"center",gap:12},children:[/* @__PURE__ */U(W,{style:{flexDirection:"row",alignItems:"center",gap:8,flex:1,minWidth:0},children:[/* @__PURE__ */E(A,{width:18,height:18,viewBox:"0 0 24 24",style:{flexShrink:0,transform:[{rotate:P?"180deg":"0deg"}]},children:/* @__PURE__ */E(H,{d:"m6 9 6 6 6-6",stroke:b.textMuted,strokeWidth:2.5,strokeLinecap:"round",strokeLinejoin:"round",fill:"none"})}),/* @__PURE__ */U(W,{style:{flex:1,minWidth:0},children:[/* @__PURE__ */U(W,{style:{flexDirection:"row",alignItems:"center",gap:8},children:[/* @__PURE__ */E(fi,{style:{fontSize:C?18:16,fontWeight:"600",color:v,fontFamily:x},children:"Your Selections"}),/* @__PURE__ */E(W,{style:{backgroundColor:b.primary,paddingHorizontal:6,paddingVertical:2,borderRadius:sn(m,999)},children:/* @__PURE__ */E(fi,{style:{color:b.primaryText,fontSize:12,fontWeight:"600"},children:M})})]}),h&&/* @__PURE__ */E(fi,{numberOfLines:1,style:{color:b.textMuted,fontSize:14,marginTop:2},children:h})]})]}),null!=u&&u>0&&/* @__PURE__ */U(W,{style:{alignItems:"flex-end",flexShrink:0},children:[/* @__PURE__ */E(fi,{style:{color:b.textMuted,fontSize:10,textTransform:"uppercase",letterSpacing:.25},children:"Potential Payout"}),/* @__PURE__ */E(fi,{style:{color:v,fontSize:14,fontWeight:"700"},children:yt(u)})]})]}),p&&p.remaining>0&&/* @__PURE__ */U(W,{style:{marginTop:O,padding:12,borderRadius:sn(m,8),backgroundColor:`${b.primary}12`,flexDirection:"row",alignItems:"center",justifyContent:"space-between",gap:12},children:[/* @__PURE__ */U(fi,{style:{flex:1,color:b.textMuted,fontSize:12},children:[1===p.remaining?"Add ":"Add up to ",
347
347
  /* @__PURE__ */U(fi,{style:{color:b.primary,fontWeight:"700"},children:[p.remaining," more pick",1!==p.remaining?"s":""]}),null!=p.potentialPayout&&p.potentialPayout>0&&/* @__PURE__ */U(fi,{children:[" ","to win up to"," ",
348
- /* @__PURE__ */E(fi,{style:{color:v,fontWeight:"700"},children:yt(p.potentialPayout)})," ","with ",p.max," picks"]})]}),/* @__PURE__ */E(vi,{theme:m,variant:"secondary",onPress:()=>p.onAdd(),style:{flexShrink:0},children:"Add picks"})]}),P&&(0===D.length?/* @__PURE__ */E(W,{style:[yd.emptyState,{marginTop:O}],children:/* @__PURE__ */E(fi,{style:{color:b.textMuted},children:"No selections made yet"})}):/* @__PURE__ */E(W,{style:{gap:C?12:8,marginTop:O},children:L.map(e=>/* @__PURE__ */U(W,{style:{borderRadius:sn(m,8),overflow:"hidden",borderWidth:1,borderColor:b.border},children:[e.key?/* @__PURE__ */U(W,{style:{paddingHorizontal:12,paddingVertical:8,backgroundColor:R},children:[/* @__PURE__ */E(ud,{matchup:e.key,renderTeamLogo:s,altText:k,mutedColor:b.textAltMuted??b.textMuted??k}),e.props[0].commence_time?/* @__PURE__ */E(fi,{style:[yd.propTime,{color:b.textAltMuted??b.textMuted}],children:mt(e.props[0].commence_time)}):null]}):null,e.props.map((i,r)=>{const l=t[i.id],a="yes"===l,d="no"===l;/* @__PURE__ */
349
- return U(W,{style:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",gap:C?12:8,paddingHorizontal:12,paddingVertical:C?12:10,backgroundColor:I,...y?{flexWrap:"wrap",gap:12,padding:14}:{},borderTopWidth:e.key||r>0?1:0,borderTopColor:b.border},children:[/* @__PURE__ */U(W,{style:{flex:1,minWidth:0,flexDirection:"row",alignItems:"flex-start",gap:8,...y?{flexBasis:"100%"}:{}},children:[dc(i,s,e.key),/* @__PURE__ */E(uc,{prop:i,colors:b,componentById:g??void 0,renderTeamLogo:s,textStyle:{fontSize:14,fontWeight:"400",lineHeight:19},textColor:k,theme:m})]}),/* @__PURE__ */U(W,{style:yd.rightControls,children:[c?/* @__PURE__ */E(Hi,{theme:m,size:"sm",value:a?"yes":d?"no":null,onYes:()=>n(i.id,"yes"),onNo:()=>n(i.id,"no")}):l&&/* @__PURE__ */E(Mi,{theme:m,size:"sm",value:"yes"===l?"yes":"no"}),/* @__PURE__ */E(Ci,{theme:m,size:28,tone:"danger",accessibilityLabel:"Remove selection",onPress:()=>{n(i.id,t[i.id]),o()},children:/* @__PURE__ */E(A,{width:12,height:12,viewBox:"0 0 24 24",children:/* @__PURE__ */E(H,{d:"M6 18L18 6M6 6l12 12",stroke:Si(m),strokeWidth:2.5,strokeLinecap:"round",strokeLinejoin:"round",fill:"none"})})})]})]},i.id)})]},e.key??`solo-${e.props[0].id}`))}))]}),
350
- /* @__PURE__ */E(W,{style:[yd.section,{borderRadius:sn(m,12),padding:C?24:16,backgroundColor:w,borderColor:b.border},S],children:/* @__PURE__ */U(W,{style:yd.summaryRow,children:[/* @__PURE__ */E(fi,{style:{color:b.textMuted,fontSize:14},children:"Total Selections"}),/* @__PURE__ */E(fi,{style:{color:b.text,fontSize:14,fontWeight:"600"},children:D.length})]})}),!a&&/* @__PURE__ */U(W,{style:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",gap:12,borderTopWidth:1,borderTopColor:b.border,backgroundColor:b.background,marginHorizontal:C?-24:-16,paddingHorizontal:C?24:16,paddingVertical:C?16:12},children:[/* @__PURE__ */E(vi,{theme:m,size:"lg",variant:"secondary",onPress:o,children:"Back"}),/* @__PURE__ */E(vi,{theme:m,size:"lg",disabled:0===D.length,onPress:i,children:"Place bet"})]})]})}var yd=B.create({section:{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},summaryRow:{flexDirection:"row",justifyContent:"space-between"}});function md({view:e,theme:t,bare:n=!1}){const i=t.colors,o=hn(t),r=e.rows.some(e=>null!=e.added),l=Math.max(0,...e.rows.map(e=>e.amount)),a=l>0?e.rows.findIndex(e=>e.amount===l):-1,s=wn(i.primary,t.brand?.accent,i.primaryText),c=n?12:14;/* @__PURE__ */
348
+ /* @__PURE__ */E(fi,{style:{color:v,fontWeight:"700"},children:yt(p.potentialPayout)})," ","with ",p.max," picks"]})]}),/* @__PURE__ */E(vi,{theme:m,variant:"secondary",onPress:()=>p.onAdd(),style:{flexShrink:0},children:"Add picks"})]}),P&&(0===D.length?/* @__PURE__ */E(W,{style:[md.emptyState,{marginTop:O}],children:/* @__PURE__ */E(fi,{style:{color:b.textMuted},children:"No selections made yet"})}):/* @__PURE__ */E(W,{style:{gap:C?12:8,marginTop:O},children:L.map(e=>/* @__PURE__ */U(W,{style:{borderRadius:sn(m,8),overflow:"hidden",borderWidth:1,borderColor:b.border},children:[e.key?/* @__PURE__ */U(W,{style:{paddingHorizontal:12,paddingVertical:8,backgroundColor:R},children:[/* @__PURE__ */E(fd,{matchup:e.key,renderTeamLogo:s,altText:k,mutedColor:b.textAltMuted??b.textMuted??k}),e.props[0].commence_time?/* @__PURE__ */E(fi,{style:[md.propTime,{color:b.textAltMuted??b.textMuted}],children:mt(e.props[0].commence_time)}):null]}):null,e.props.map((i,r)=>{const l=t[i.id],a="yes"===l,d="no"===l;/* @__PURE__ */
349
+ return U(W,{style:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",gap:C?12:8,paddingHorizontal:12,paddingVertical:C?12:10,backgroundColor:I,...y?{flexWrap:"wrap",gap:12,padding:14}:{},borderTopWidth:e.key||r>0?1:0,borderTopColor:b.border},children:[/* @__PURE__ */U(W,{style:{flex:1,minWidth:0,flexDirection:"row",alignItems:"flex-start",gap:8,...y?{flexBasis:"100%"}:{}},children:[hc(i,s,e.key),/* @__PURE__ */E(fc,{prop:i,colors:b,componentById:g??void 0,renderTeamLogo:s,textStyle:{fontSize:14,fontWeight:"400",lineHeight:19},textColor:k,theme:m})]}),/* @__PURE__ */U(W,{style:md.rightControls,children:[c?/* @__PURE__ */E(Hi,{theme:m,size:"sm",value:a?"yes":d?"no":null,onYes:()=>n(i.id,"yes"),onNo:()=>n(i.id,"no")}):l&&/* @__PURE__ */E(Mi,{theme:m,size:"sm",value:"yes"===l?"yes":"no"}),/* @__PURE__ */E(Ci,{theme:m,size:28,tone:"danger",accessibilityLabel:"Remove selection",onPress:()=>{n(i.id,t[i.id]),o()},children:/* @__PURE__ */E(A,{width:12,height:12,viewBox:"0 0 24 24",children:/* @__PURE__ */E(H,{d:"M6 18L18 6M6 6l12 12",stroke:Si(m),strokeWidth:2.5,strokeLinecap:"round",strokeLinejoin:"round",fill:"none"})})})]})]},i.id)})]},e.key??`solo-${e.props[0].id}`))}))]}),
350
+ /* @__PURE__ */E(W,{style:[md.section,{borderRadius:sn(m,12),padding:C?24:16,backgroundColor:w,borderColor:b.border},S],children:/* @__PURE__ */U(W,{style:md.summaryRow,children:[/* @__PURE__ */E(fi,{style:{color:b.textMuted,fontSize:14},children:"Total Selections"}),/* @__PURE__ */E(fi,{style:{color:b.text,fontSize:14,fontWeight:"600"},children:D.length})]})}),!a&&/* @__PURE__ */U(W,{style:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",gap:12,borderTopWidth:1,borderTopColor:b.border,backgroundColor:b.background,marginHorizontal:C?-24:-16,paddingHorizontal:C?24:16,paddingVertical:C?16:12},children:[/* @__PURE__ */E(vi,{theme:m,size:"lg",variant:"secondary",onPress:o,children:"Back"}),/* @__PURE__ */E(vi,{theme:m,size:"lg",disabled:0===D.length,onPress:i,children:"Place bet"})]})]})}var md=B.create({section:{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},summaryRow:{flexDirection:"row",justifyContent:"space-between"}});function bd({view:e,theme:t,bare:n=!1}){const i=t.colors,o=hn(t),r=e.rows.some(e=>null!=e.added),l=Math.max(0,...e.rows.map(e=>e.amount)),a=l>0?e.rows.findIndex(e=>e.amount===l):-1,s=wn(i.primary,t.brand?.accent,i.primaryText),c=n?12:14;/* @__PURE__ */
351
351
  return U(W,{style:n?void 0:{backgroundColor:kn(t),borderWidth:1,borderColor:i.border,borderRadius:sn(t,16),overflow:"hidden"},children:[
352
352
  /* @__PURE__ */U(W,{style:{flexDirection:"row",flexWrap:"wrap",alignItems:"baseline",justifyContent:"space-between",columnGap:8,paddingHorizontal:n?0:14,paddingTop:n?0:12,paddingBottom:8},children:[/* @__PURE__ */E(fi,{accessibilityRole:"header",style:{fontSize:14,fontWeight:"800",color:o},children:e.heading}),!!e.aside&&/* @__PURE__ */E(fi,{style:{fontSize:12,fontWeight:"600",color:i.textMuted},children:e.aside})]}),r&&/* @__PURE__ */U(W,{style:{flexDirection:"row",gap:8,paddingHorizontal:c,paddingBottom:6},children:[
353
353
  /* @__PURE__ */E(fi,{style:{flex:1,fontSize:12,fontWeight:"600",color:i.textMuted},children:"Outcome"}),
@@ -355,73 +355,73 @@ return U(W,{style:n?void 0:{backgroundColor:kn(t),borderWidth:1,borderColor:i.bo
355
355
  /* @__PURE__ */E(fi,{style:{width:88,textAlign:"right",fontSize:12,fontWeight:"600",color:i.textMuted},children:"Total payout"})]}),e.rows.map((e,t)=>{const l=t===a,d=e.amount<=0,h=l?i.primaryText:d?i.textMuted:i.text,u=n?!!t&&!l&&t-1!==a:!!t;/* @__PURE__ */
356
356
  return U(W,{style:{flexDirection:"row",alignItems:"center",gap:8,minHeight:n&&!l?44:52,paddingHorizontal:c,backgroundColor:l?i.primary:void 0,borderRadius:n&&l?12:void 0,borderTopWidth:u?1:0,borderColor:i.border},children:[
357
357
  /* @__PURE__ */E(fi,{style:{flex:1,fontSize:15,fontWeight:l?"800":d?"600":"700",color:h},children:e.label}),r&&/* @__PURE__ */E(fi,{style:{width:68,textAlign:"right",fontSize:13,color:h,opacity:.8},children:null!=e.added?yt(e.added):"—"}),
358
- /* @__PURE__ */E(fi,{style:{minWidth:88,textAlign:"right",fontSize:l?22:18,fontWeight:"800",letterSpacing:l?-.4:0,color:l?s:d?i.textMuted:o,fontVariant:["tabular-nums"]},children:yt(e.amount)})]},e.label)}),!!e.note&&/* @__PURE__ */E(fi,{style:{color:i.textMuted,fontSize:12,lineHeight:18,paddingHorizontal:n?0:14,paddingTop:10,paddingBottom:n?0:12},children:e.note})]})}function bd({on:e,style:t,children:n}){return e?/* @__PURE__ */E(W,{style:t,children:n}):/* @__PURE__ */E(j,{children:n})}function wd({shelf:e,theme:t,grow:n,style:i,children:o}){return e?/* @__PURE__ */E(Hl,{theme:t,style:n?{flexGrow:1}:void 0,children:o}):/* @__PURE__ */E(W,{style:i,children:o})}function xd({shelf:e,theme:t,above:n,style:i,children:o}){return e?/* @__PURE__ */U(W,{children:[n,/* @__PURE__ */E(Ml,{theme:t,children:o})]}):/* @__PURE__ */E(W,{style:i,children:o})}function vd({game:t,propositions:n,selections:i,onToggleSelection:o,onRemoveSelection:r,onSubmit:l,onBack:a,loading:s,error:c,expectedCorrect:d,onExpectedCorrectChange:h,betAmount:f,onBetAmountChange:g,theme:p,colorScheme:y,hideActions:m=!1,winningCounts:b,payouts:w,renderTeamLogo:x,componentById:v,showCustomAmount:k=!1,betAmountLocked:B=!1,betAmountLockedNote:C,canSubmit:S,confirming:P=!1,authenticated:T=!0,userBalance:D,onRecharge:M,boostBanner:L,aboveDock:R}){const I="shelf"===Zn(),O=Yn(p,y),G=O.colors,V=ra(O),Y=kn(O),N=Nr(O),X=hn(O),q=un(O),K=fn(O),Q=G.textAlt??G.text,{width:J}=F(),Z=J>=640,$="dark"===O.colorScheme,_=n.length,ee=t.min_bet??0,te=Math.max(ee,.01),ne=t.max_bet??null,ie=[5,10,20,50,100,200,500].filter(e=>e>=te&&(null===ne||e<=ne)).slice(0,4),oe={};for(let e=0;e<=_;e++)oe[e]=f*e;const re=w??oe,le=re[d]??0,ae=Ft(t),se=ae.enabled&&d===_,[ce,de]=e.useState(!0),[he,ue]=e.useState(!1),fe=s||f<te||!1===S,ge=null!=D&&f>D,pe=f<te||ge,[ye,me]=e.useState(pe);e.useEffect(()=>{pe&&me(!0)},[pe]);const be=s?null:f<te?f>0?`Stake is below the ${yt(te)} minimum`:"Set a stake to place this entry":ge?"Not enough balance":null,we=Fi(),xe=m&&!!l&&T,ve=i?n.filter(e=>e.id in i):n,ke=_t(ve),Be=G.matchupHeader??Bn(O),Ce=Cn(O),Se=ve.filter(e=>"yes"===i?.[e.id]).length,ze=ve.filter(e=>"no"===i?.[e.id]).length,We=I&&f>0?ja(t,ve.length,f,d):null,Fe=We&&{...We,note:"",rows:[...We.rows].sort((e,t)=>t.amount-e.amount).map(({label:e,amount:t})=>({label:e,amount:t}))},Ae=Object.entries(re).map(([e,t])=>({correct:Number(e),payout:t})).filter(e=>e.correct>0&&e.payout>0).sort((e,t)=>e.correct-t.correct),Pe=1===Ae.length?Ae[0].correct:null;e.useEffect(()=>{null!==Pe&&d!==Pe&&h(Pe)},[Pe]);const Te={shadowColor:"#000",shadowOpacity:$?.4:.12,shadowRadius:12,shadowOffset:{width:0,height:6},elevation:2},De=Qa(O),He=[Te,{borderRadius:sn(O,12),backgroundColor:Y,borderColor:G.border}],Me=I?{fontWeight:"800",letterSpacing:-.4}:null,Le=I&&J>=700,Re=Le||ce;/* @__PURE__ */
358
+ /* @__PURE__ */E(fi,{style:{minWidth:88,textAlign:"right",fontSize:l?22:18,fontWeight:"800",letterSpacing:l?-.4:0,color:l?s:d?i.textMuted:o,fontVariant:["tabular-nums"]},children:yt(e.amount)})]},e.label)}),!!e.note&&/* @__PURE__ */E(fi,{style:{color:i.textMuted,fontSize:12,lineHeight:18,paddingHorizontal:n?0:14,paddingTop:10,paddingBottom:n?0:12},children:e.note})]})}function wd({on:e,style:t,children:n}){return e?/* @__PURE__ */E(W,{style:t,children:n}):/* @__PURE__ */E(j,{children:n})}function xd({shelf:e,theme:t,grow:n,style:i,children:o}){return e?/* @__PURE__ */E(Ml,{theme:t,style:n?{flexGrow:1}:void 0,children:o}):/* @__PURE__ */E(W,{style:i,children:o})}function vd({shelf:e,theme:t,above:n,style:i,children:o}){return e?/* @__PURE__ */U(W,{children:[n,/* @__PURE__ */E(Ll,{theme:t,children:o})]}):/* @__PURE__ */E(W,{style:i,children:o})}function kd({game:t,propositions:n,selections:i,onToggleSelection:o,onRemoveSelection:r,onSubmit:l,onBack:a,loading:s,error:c,expectedCorrect:d,onExpectedCorrectChange:h,betAmount:f,onBetAmountChange:g,theme:p,colorScheme:y,hideActions:m=!1,winningCounts:b,payouts:w,renderTeamLogo:x,componentById:v,showCustomAmount:k=!1,betAmountLocked:B=!1,betAmountLockedNote:C,canSubmit:S,confirming:P=!1,authenticated:T=!0,userBalance:D,onRecharge:M,boostBanner:L,aboveDock:R}){const I="shelf"===Zn(),O=Yn(p,y),G=O.colors,V=la(O),Y=kn(O),N=Nr(O),X=hn(O),q=un(O),K=fn(O),Q=G.textAlt??G.text,{width:J}=F(),Z=J>=640,$="dark"===O.colorScheme,_=n.length,ee=t.min_bet??0,te=Math.max(ee,.01),ne=t.max_bet??null,ie=[5,10,20,50,100,200,500].filter(e=>e>=te&&(null===ne||e<=ne)).slice(0,4),oe={};for(let e=0;e<=_;e++)oe[e]=f*e;const re=w??oe,le=re[d]??0,ae=Ft(t),se=ae.enabled&&d===_,[ce,de]=e.useState(!0),[he,ue]=e.useState(!1),fe=s||f<te||!1===S,ge=null!=D&&f>D,pe=f<te||ge,[ye,me]=e.useState(pe);e.useEffect(()=>{pe&&me(!0)},[pe]);const be=s?null:f<te?f>0?`Stake is below the ${yt(te)} minimum`:"Set a stake to place this entry":ge?"Not enough balance":null,we=Fi(),xe=m&&!!l&&T,ve=i?n.filter(e=>e.id in i):n,ke=_t(ve),Be=G.matchupHeader??Bn(O),Ce=Cn(O),Se=ve.filter(e=>"yes"===i?.[e.id]).length,ze=ve.filter(e=>"no"===i?.[e.id]).length,We=I&&f>0?Ea(t,ve.length,f,d):null,Fe=We&&{...We,note:"",rows:[...We.rows].sort((e,t)=>t.amount-e.amount).map(({label:e,amount:t})=>({label:e,amount:t}))},Ae=Object.entries(re).map(([e,t])=>({correct:Number(e),payout:t})).filter(e=>e.correct>0&&e.payout>0).sort((e,t)=>e.correct-t.correct),Pe=1===Ae.length?Ae[0].correct:null;e.useEffect(()=>{null!==Pe&&d!==Pe&&h(Pe)},[Pe]);const Te={shadowColor:"#000",shadowOpacity:$?.4:.12,shadowRadius:12,shadowOffset:{width:0,height:6},elevation:2},De=Ja(O),He=[Te,{borderRadius:sn(O,12),backgroundColor:Y,borderColor:G.border}],Me=I?{fontWeight:"800",letterSpacing:-.4}:null,Le=I&&J>=700,Re=Le||ce;/* @__PURE__ */
359
359
  return U(W,{style:I?{gap:12,marginBottom:64}:{gap:Z?16:12,paddingBottom:64},children:[
360
- /* @__PURE__ */U(bd,{on:I,style:{flexDirection:Le?"row":"column",gap:Le?18:12},children:[/* @__PURE__ */U(bd,{on:I,style:{flex:Le?1:void 0,minWidth:0,gap:12},children:[
361
- /* @__PURE__ */U(wd,{shelf:I,theme:O,grow:Le,style:[kd.section,He,{padding:Z?20:16},Le&&{flexGrow:1}],children:[/* @__PURE__ */U(j,I?{children:[/* @__PURE__ */U(W,{style:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",gap:12},children:[/* @__PURE__ */U(W,{style:{flex:1,minWidth:0},children:[/* @__PURE__ */U(fi,{accessibilityRole:"header",style:{fontSize:16,fontWeight:"800",color:X,fontFamily:N},children:[ve.length," pick",1!==ve.length?"s":""]}),/* @__PURE__ */E(fi,{style:{fontSize:13,fontWeight:"500",color:G.textMuted},children:`${Se} ${we.yes}, ${ze} ${we.no}`})]}),!Le&&/* @__PURE__ */E(vi,{theme:O,variant:"quiet",onPress:()=>de(e=>!e),accessibilityState:{expanded:ce},testID:"entry-submission-selections-toggle",style:{flexShrink:0},children:ce?"Show less":"Show all"})]}),!Re&&/* @__PURE__ */E(W,{accessibilityRole:"list",accessibilityLabel:"Your answers in order",style:{flexDirection:"row",flexWrap:"wrap",gap:4,marginTop:12},children:ve.map(e=>i?.[e.id]?/* @__PURE__ */E(W,{style:{flexGrow:0,flexShrink:0,flexBasis:44,flexDirection:"row"},children:/* @__PURE__ */E(Mi,{theme:O,size:"sm",value:i[e.id],style:{flex:1,alignSelf:"stretch",justifyContent:"center"}})},e.id):null)})]}:{children:[/* @__PURE__ */U(W,{style:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",gap:12},children:[Le?/* @__PURE__ */E(fi,{style:[{fontSize:Z?16:14,fontWeight:"600",color:X,fontFamily:N},Me],children:"Your picks"}):/* @__PURE__ */U(z,{onPress:()=>de(e=>!e),accessibilityRole:"button",accessibilityState:{expanded:ce},accessibilityLabel:ce?"Hide selections":"Show selections",testID:"entry-submission-selections-toggle",style:{flexDirection:"row",alignItems:"center",gap:8,flex:1},activeOpacity:.7,children:[/* @__PURE__ */E(W,{style:{transform:[{rotate:ce?"180deg":"0deg"}]},children:/* @__PURE__ */E(A,{width:18,height:18,viewBox:"0 0 24 24",fill:"none",children:/* @__PURE__ */E(H,{d:"m6 9 6 6 6-6",stroke:G.textMuted,strokeWidth:2.5,strokeLinecap:"round",strokeLinejoin:"round"})})}),/* @__PURE__ */E(fi,{style:[{fontSize:Z?16:14,fontWeight:"600",color:X,fontFamily:N},Me],children:ce?"Hide Selections":"Review Selections"})]}),/* @__PURE__ */E(W,{style:{paddingHorizontal:8,paddingVertical:2,borderRadius:sn(O,999),flexShrink:0,backgroundColor:`${G.primary}15`},children:/* @__PURE__ */U(fi,{style:{color:G.primary,fontSize:12,fontWeight:"600"},children:[ve.length," pick",1!==ve.length?"s":""]})})]}),!Re&&/* @__PURE__ */E(fi,{style:{color:G.textMuted,fontSize:12,marginTop:8},children:"Tap to show your picks"})]}),Re&&/* @__PURE__ */E(W,{style:{gap:8,marginTop:12},children:ke.map(e=>/* @__PURE__ */U(W,{style:I?void 0:{borderRadius:sn(O,8),overflow:"hidden",borderWidth:1,borderColor:G.border},children:[e.key?/* @__PURE__ */U(W,{style:I?{paddingVertical:8}:{paddingHorizontal:12,paddingVertical:8,backgroundColor:Be},children:[/* @__PURE__ */E(ud,{matchup:e.key,renderTeamLogo:x,altText:Q,mutedColor:G.textAltMuted??G.textMuted??Q}),e.props[0].commence_time?/* @__PURE__ */E(fi,{style:{color:G.textAltMuted??G.textMuted,fontSize:11,marginTop:2,opacity:.7},children:mt(e.props[0].commence_time)}):null]}):null,e.props.map((t,n)=>{const l=i?.[t.id],a="yes"===l,s="no"===l,c=!!o;/* @__PURE__ */
362
- return U(W,{style:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",gap:8,paddingVertical:8,paddingHorizontal:12,backgroundColor:I?void 0:Ce,...I?{flexWrap:"wrap",gap:12,paddingVertical:14,paddingHorizontal:0}:{},borderTopWidth:e.key||n>0?1:0,borderTopColor:G.border},children:[/* @__PURE__ */U(W,{style:{flex:1,minWidth:0,flexDirection:"row",alignItems:"flex-start",gap:8,...I?{flexBasis:"100%"}:{}},children:[dc(t,x,e.key),/* @__PURE__ */E(uc,{prop:t,colors:G,componentById:v??void 0,renderTeamLogo:x,textStyle:{fontSize:Z?14:12,fontWeight:"400"},textColor:Q,theme:O})]}),/* @__PURE__ */U(W,{style:{flexDirection:"row",alignItems:"center",gap:6,flexShrink:0},children:[c?/* @__PURE__ */E(Hi,{theme:O,size:"xs",value:a?"yes":s?"no":null,onYes:()=>o(t.id,"yes"),onNo:()=>o(t.id,"no")}):l?/* @__PURE__ */E(Mi,{theme:O,size:"sm",value:"yes"===l?"yes":"no",style:{flexShrink:0}}):null,Re&&r&&/* @__PURE__ */E(Ci,{theme:O,size:28,tone:"danger",accessibilityLabel:"Remove selection",onPress:()=>{l&&o?.(t.id,l),r(t.id)},children:/* @__PURE__ */E(A,{width:14,height:14,viewBox:"0 0 24 24",fill:"none",children:/* @__PURE__ */E(H,{d:"M6 18L18 6M6 6l12 12",stroke:Si(O),strokeWidth:2.5,strokeLinecap:"round",strokeLinejoin:"round"})})})]})]},t.id)})]},e.key??`solo-${e.props[0].id}`))})]}),!Le&&L,xe&&!I&&/* @__PURE__ */U(W,{testID:"entry-submission-scroll-hint",style:{flexDirection:"row",alignItems:"center",gap:6,marginTop:-4},children:[/* @__PURE__ */E(fi,{style:{color:V.colors.textMuted,fontSize:Z?14:12,fontWeight:"500"},children:"↓"}),/* @__PURE__ */E(fi,{style:{color:V.colors.textMuted,fontSize:Z?14:12,fontWeight:"500",flex:1},children:"Scroll down to set your bet and place your entry"})]})]}),/* @__PURE__ */U(bd,{on:I,style:{width:Le?360:void 0,alignSelf:Le?"flex-start":void 0,gap:12},children:[Le&&L,T?/* @__PURE__ */U(j,{children:[/* @__PURE__ */U(wd,{shelf:I,theme:O,style:[kd.section,He,{padding:Z?24:16}],children:[/* @__PURE__ */U(W,I?{style:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",gap:12,marginBottom:ye&&!B?12:0},children:[/* @__PURE__ */U(W,{style:{flex:1,minWidth:0},children:[
360
+ /* @__PURE__ */U(wd,{on:I,style:{flexDirection:Le?"row":"column",gap:Le?18:12},children:[/* @__PURE__ */U(wd,{on:I,style:{flex:Le?1:void 0,minWidth:0,gap:12},children:[
361
+ /* @__PURE__ */U(xd,{shelf:I,theme:O,grow:Le,style:[Bd.section,He,{padding:Z?20:16},Le&&{flexGrow:1}],children:[/* @__PURE__ */U(j,I?{children:[/* @__PURE__ */U(W,{style:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",gap:12},children:[/* @__PURE__ */U(W,{style:{flex:1,minWidth:0},children:[/* @__PURE__ */U(fi,{accessibilityRole:"header",style:{fontSize:16,fontWeight:"800",color:X,fontFamily:N},children:[ve.length," pick",1!==ve.length?"s":""]}),/* @__PURE__ */E(fi,{style:{fontSize:13,fontWeight:"500",color:G.textMuted},children:`${Se} ${we.yes}, ${ze} ${we.no}`})]}),!Le&&/* @__PURE__ */E(vi,{theme:O,variant:"quiet",onPress:()=>de(e=>!e),accessibilityState:{expanded:ce},testID:"entry-submission-selections-toggle",style:{flexShrink:0},children:ce?"Show less":"Show all"})]}),!Re&&/* @__PURE__ */E(W,{accessibilityRole:"list",accessibilityLabel:"Your answers in order",style:{flexDirection:"row",flexWrap:"wrap",gap:4,marginTop:12},children:ve.map(e=>i?.[e.id]?/* @__PURE__ */E(W,{style:{flexGrow:0,flexShrink:0,flexBasis:44,flexDirection:"row"},children:/* @__PURE__ */E(Mi,{theme:O,size:"sm",value:i[e.id],style:{flex:1,alignSelf:"stretch",justifyContent:"center"}})},e.id):null)})]}:{children:[/* @__PURE__ */U(W,{style:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",gap:12},children:[Le?/* @__PURE__ */E(fi,{style:[{fontSize:Z?16:14,fontWeight:"600",color:X,fontFamily:N},Me],children:"Your picks"}):/* @__PURE__ */U(z,{onPress:()=>de(e=>!e),accessibilityRole:"button",accessibilityState:{expanded:ce},accessibilityLabel:ce?"Hide selections":"Show selections",testID:"entry-submission-selections-toggle",style:{flexDirection:"row",alignItems:"center",gap:8,flex:1},activeOpacity:.7,children:[/* @__PURE__ */E(W,{style:{transform:[{rotate:ce?"180deg":"0deg"}]},children:/* @__PURE__ */E(A,{width:18,height:18,viewBox:"0 0 24 24",fill:"none",children:/* @__PURE__ */E(H,{d:"m6 9 6 6 6-6",stroke:G.textMuted,strokeWidth:2.5,strokeLinecap:"round",strokeLinejoin:"round"})})}),/* @__PURE__ */E(fi,{style:[{fontSize:Z?16:14,fontWeight:"600",color:X,fontFamily:N},Me],children:ce?"Hide Selections":"Review Selections"})]}),/* @__PURE__ */E(W,{style:{paddingHorizontal:8,paddingVertical:2,borderRadius:sn(O,999),flexShrink:0,backgroundColor:`${G.primary}15`},children:/* @__PURE__ */U(fi,{style:{color:G.primary,fontSize:12,fontWeight:"600"},children:[ve.length," pick",1!==ve.length?"s":""]})})]}),!Re&&/* @__PURE__ */E(fi,{style:{color:G.textMuted,fontSize:12,marginTop:8},children:"Tap to show your picks"})]}),Re&&/* @__PURE__ */E(W,{style:{gap:8,marginTop:12},children:ke.map(e=>/* @__PURE__ */U(W,{style:I?void 0:{borderRadius:sn(O,8),overflow:"hidden",borderWidth:1,borderColor:G.border},children:[e.key?/* @__PURE__ */U(W,{style:I?{paddingVertical:8}:{paddingHorizontal:12,paddingVertical:8,backgroundColor:Be},children:[/* @__PURE__ */E(fd,{matchup:e.key,renderTeamLogo:x,altText:Q,mutedColor:G.textAltMuted??G.textMuted??Q}),e.props[0].commence_time?/* @__PURE__ */E(fi,{style:{color:G.textAltMuted??G.textMuted,fontSize:11,marginTop:2,opacity:.7},children:mt(e.props[0].commence_time)}):null]}):null,e.props.map((t,n)=>{const l=i?.[t.id],a="yes"===l,s="no"===l,c=!!o;/* @__PURE__ */
362
+ return U(W,{style:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",gap:8,paddingVertical:8,paddingHorizontal:12,backgroundColor:I?void 0:Ce,...I?{flexWrap:"wrap",gap:12,paddingVertical:14,paddingHorizontal:0}:{},borderTopWidth:e.key||n>0?1:0,borderTopColor:G.border},children:[/* @__PURE__ */U(W,{style:{flex:1,minWidth:0,flexDirection:"row",alignItems:"flex-start",gap:8,...I?{flexBasis:"100%"}:{}},children:[hc(t,x,e.key),/* @__PURE__ */E(fc,{prop:t,colors:G,componentById:v??void 0,renderTeamLogo:x,textStyle:{fontSize:Z?14:12,fontWeight:"400"},textColor:Q,theme:O})]}),/* @__PURE__ */U(W,{style:{flexDirection:"row",alignItems:"center",gap:6,flexShrink:0},children:[c?/* @__PURE__ */E(Hi,{theme:O,size:"xs",value:a?"yes":s?"no":null,onYes:()=>o(t.id,"yes"),onNo:()=>o(t.id,"no")}):l?/* @__PURE__ */E(Mi,{theme:O,size:"sm",value:"yes"===l?"yes":"no",style:{flexShrink:0}}):null,Re&&r&&/* @__PURE__ */E(Ci,{theme:O,size:28,tone:"danger",accessibilityLabel:"Remove selection",onPress:()=>{l&&o?.(t.id,l),r(t.id)},children:/* @__PURE__ */E(A,{width:14,height:14,viewBox:"0 0 24 24",fill:"none",children:/* @__PURE__ */E(H,{d:"M6 18L18 6M6 6l12 12",stroke:Si(O),strokeWidth:2.5,strokeLinecap:"round",strokeLinejoin:"round"})})})]})]},t.id)})]},e.key??`solo-${e.props[0].id}`))})]}),!Le&&L,xe&&!I&&/* @__PURE__ */U(W,{testID:"entry-submission-scroll-hint",style:{flexDirection:"row",alignItems:"center",gap:6,marginTop:-4},children:[/* @__PURE__ */E(fi,{style:{color:V.colors.textMuted,fontSize:Z?14:12,fontWeight:"500"},children:"↓"}),/* @__PURE__ */E(fi,{style:{color:V.colors.textMuted,fontSize:Z?14:12,fontWeight:"500",flex:1},children:"Scroll down to set your bet and place your entry"})]})]}),/* @__PURE__ */U(wd,{on:I,style:{width:Le?360:void 0,alignSelf:Le?"flex-start":void 0,gap:12},children:[Le&&L,T?/* @__PURE__ */U(j,{children:[/* @__PURE__ */U(xd,{shelf:I,theme:O,style:[Bd.section,He,{padding:Z?24:16}],children:[/* @__PURE__ */U(W,I?{style:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",gap:12,marginBottom:ye&&!B?12:0},children:[/* @__PURE__ */U(W,{style:{flex:1,minWidth:0},children:[
363
363
  /* @__PURE__ */E(fi,{accessibilityRole:"header",style:{fontSize:13,fontWeight:"700",color:G.textMuted},children:"Stake"}),
364
- /* @__PURE__ */E(fi,{style:{fontSize:Pl,fontWeight:"800",letterSpacing:-.52,color:X,fontFamily:N,fontVariant:["tabular-nums"]},children:yt(f)}),null!=D&&/* @__PURE__ */E(fi,{style:{fontSize:13,fontWeight:"500",color:G.textMuted},children:`${yt(D)} available`}),B&&/* @__PURE__ */E(fi,{style:{fontSize:13,fontWeight:"500",color:G.textMuted},children:C??"Stake is set for this ticket."})]}),!B&&!pe&&(ye?/* @__PURE__ */E(Ci,{theme:O,size:32,accessibilityState:{expanded:!0},accessibilityLabel:"Close stake",onPress:()=>me(!1),children:/* @__PURE__ */E(fi,{style:{fontSize:16,color:Si(O)},children:"×"})}):/* @__PURE__ */E(vi,{theme:O,variant:"quiet",accessibilityState:{expanded:!1},onPress:()=>me(!0),style:{flexShrink:0},children:"Change stake"}))]}:{style:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",marginBottom:Z?16:12},children:[/* @__PURE__ */E(fi,{style:[{fontSize:Z?18:16,fontWeight:"600",color:X,fontFamily:N},Me],children:"How much are you betting?"}),null!=D&&/* @__PURE__ */U(fi,{style:{fontSize:12,fontWeight:"600",color:G.textMuted},children:["Balance: ",/* @__PURE__ */E(fi,{style:{color:ge?G.error:G.success},children:yt(D)})]})]}),(!I||ye)&&ge&&/* @__PURE__ */U(W,{style:{marginBottom:12,paddingHorizontal:12,paddingVertical:8,borderRadius:sn(O,8),backgroundColor:G.errorBg??`${G.error}15`,flexDirection:"row",alignItems:"center",justifyContent:"space-between",gap:12},children:[/* @__PURE__ */U(fi,{style:{flex:1,fontSize:12,fontWeight:"500",color:G.errorText??G.error},children:["Insufficient balance. Your bet of ",yt(f)," exceeds your available ",yt(D),"."]}),M&&/* @__PURE__ */E(vi,{theme:O,variant:"secondary",onPress:M,style:{flexShrink:0},children:"Add funds"})]}),B?I?null:/* @__PURE__ */U(W,{style:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",gap:12,borderRadius:sn(O,8),paddingHorizontal:12,paddingVertical:10,backgroundColor:G.backgroundAlt,borderWidth:1,borderColor:G.border},children:[/* @__PURE__ */E(fi,{style:{fontSize:12,color:G.textMuted,flex:1},children:C??"Stake is set for this ticket."}),/* @__PURE__ */E(fi,{style:{fontSize:18,fontWeight:"700",color:X,fontFamily:N},children:yt(f)})]}):(!I||ye)&&/* @__PURE__ */U(W,{style:{gap:16},children:[k&&/* @__PURE__ */U(W,{children:[
364
+ /* @__PURE__ */E(fi,{style:{fontSize:Tl,fontWeight:"800",letterSpacing:-.52,color:X,fontFamily:N,fontVariant:["tabular-nums"]},children:yt(f)}),null!=D&&/* @__PURE__ */E(fi,{style:{fontSize:13,fontWeight:"500",color:G.textMuted},children:`${yt(D)} available`}),B&&/* @__PURE__ */E(fi,{style:{fontSize:13,fontWeight:"500",color:G.textMuted},children:C??"Stake is set for this ticket."})]}),!B&&!pe&&(ye?/* @__PURE__ */E(Ci,{theme:O,size:32,accessibilityState:{expanded:!0},accessibilityLabel:"Close stake",onPress:()=>me(!1),children:/* @__PURE__ */E(fi,{style:{fontSize:16,color:Si(O)},children:"×"})}):/* @__PURE__ */E(vi,{theme:O,variant:"quiet",accessibilityState:{expanded:!1},onPress:()=>me(!0),style:{flexShrink:0},children:"Change stake"}))]}:{style:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",marginBottom:Z?16:12},children:[/* @__PURE__ */E(fi,{style:[{fontSize:Z?18:16,fontWeight:"600",color:X,fontFamily:N},Me],children:"How much are you betting?"}),null!=D&&/* @__PURE__ */U(fi,{style:{fontSize:12,fontWeight:"600",color:G.textMuted},children:["Balance: ",/* @__PURE__ */E(fi,{style:{color:ge?G.error:G.success},children:yt(D)})]})]}),(!I||ye)&&ge&&/* @__PURE__ */U(W,{style:{marginBottom:12,paddingHorizontal:12,paddingVertical:8,borderRadius:sn(O,8),backgroundColor:G.errorBg??`${G.error}15`,flexDirection:"row",alignItems:"center",justifyContent:"space-between",gap:12},children:[/* @__PURE__ */U(fi,{style:{flex:1,fontSize:12,fontWeight:"500",color:G.errorText??G.error},children:["Insufficient balance. Your bet of ",yt(f)," exceeds your available ",yt(D),"."]}),M&&/* @__PURE__ */E(vi,{theme:O,variant:"secondary",onPress:M,style:{flexShrink:0},children:"Add funds"})]}),B?I?null:/* @__PURE__ */U(W,{style:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",gap:12,borderRadius:sn(O,8),paddingHorizontal:12,paddingVertical:10,backgroundColor:G.backgroundAlt,borderWidth:1,borderColor:G.border},children:[/* @__PURE__ */E(fi,{style:{fontSize:12,color:G.textMuted,flex:1},children:C??"Stake is set for this ticket."}),/* @__PURE__ */E(fi,{style:{fontSize:18,fontWeight:"700",color:X,fontFamily:N},children:yt(f)})]}):(!I||ye)&&/* @__PURE__ */U(W,{style:{gap:16},children:[k&&/* @__PURE__ */U(W,{children:[
365
365
  /* @__PURE__ */E(fi,{style:{fontSize:Z?14:12,fontWeight:"600",color:q,marginBottom:8},children:"Entry amount"}),
366
366
  /* @__PURE__ */U(W,{style:{position:"relative"},children:[/* @__PURE__ */E(W,{style:{position:"absolute",left:12,top:0,bottom:0,justifyContent:"center",zIndex:1},pointerEvents:"none",children:/* @__PURE__ */E(fi,{style:{color:G.textMuted},children:"$"})}),/* @__PURE__ */E(gi,{keyboardType:"decimal-pad",placeholder:"Enter amount",accessibilityLabel:"Entry amount",value:f,onChangeText:e=>{if(""===e)return void g(0);const t=Number(e);if(!Number.isFinite(t))return;const n=Math.max(0,Math.round(100*t)/100);g(null!==ne?Math.min(n,ne):n)},onFocus:()=>ue(!0),onBlur:()=>ue(!1),style:{paddingLeft:32,paddingRight:16,paddingVertical:12,borderWidth:1,borderRadius:sn(O,8),fontSize:18,fontWeight:"600",borderColor:he?G.borderFocus??G.primary:G.border,color:Q,backgroundColor:G.backgroundAlt},placeholderTextColor:G.textMuted})]}),
367
- /* @__PURE__ */U(fi,{style:{fontSize:12,marginTop:6,color:G.textMuted},children:["Minimum bet: ",yt(te),null!==ne?` · Maximum: ${yt(ne)}`:""]}),f>0&&f<te&&/* @__PURE__ */U(fi,{style:{fontSize:12,marginTop:4,color:G.error},children:["Bet amount must be at least ",yt(te)]})]}),I?/* @__PURE__ */U(j,{children:[/* @__PURE__ */E(W,{accessibilityLabel:"Quick stakes",style:{flexDirection:"row",gap:5},children:ie.map(e=>/* @__PURE__ */E(Ll,{theme:O,selected:f===e,onPress:()=>g(e),style:{flex:1,minWidth:0},children:yt(e)},e))}),f>0&&/* @__PURE__ */E(vi,{theme:O,variant:"quiet",onPress:()=>g(0),style:{alignSelf:"flex-start"},children:"Reset stake"})]}):/* @__PURE__ */U(W,{children:[(k||f>0)&&/* @__PURE__ */U(W,{style:{flexDirection:"row",justifyContent:"space-between",alignItems:"center",marginBottom:8},children:[k?/* @__PURE__ */E(fi,{style:{fontSize:Z?14:12,fontWeight:"600",color:q},children:"Add to bet"}):/* @__PURE__ */E(W,{}),f>0&&/* @__PURE__ */E(vi,{theme:O,variant:"quiet",onPress:()=>g(0),children:"Reset stake"})]}),/* @__PURE__ */E(W,{style:{flexDirection:"row",gap:8},children:ie.map(e=>/* @__PURE__ */E(Ll,{theme:O,selected:!1,onPress:()=>{const t=f+e;g(null!==ne?Math.min(t,ne):t)},disabled:null!==ne&&f>=ne,style:{flex:1,minWidth:0},children:`+${yt(e)}`},e))})]})]})]}),/* @__PURE__ */E(xd,{shelf:I,theme:O,above:R,style:[kd.section,He,{padding:Z?20:16}],children:(()=>{const e=m&&!!l,t=ae.enabled&&/* @__PURE__ */U(W,{style:[kd.jackpotBanner,{borderRadius:sn(O,4),backgroundColor:`${G.warning}08`,borderColor:`${G.warning}25`}],children:[/* @__PURE__ */U(fi,{style:{color:G.warning,fontSize:12,fontWeight:"600"},children:["★ ",ae.progressive?"Progressive Jackpot":"Jackpot"]}),/* @__PURE__ */E(fi,{style:{color:G.warning,fontSize:14,fontWeight:"700"},children:ae.progressive?ae.amount>0?yt(ae.amount):ae.limit>0?`Up to ${yt(ae.limit)}`:"Progressive":yt(ae.amount)})]});if(I)/* @__PURE__ */return U(j,{children:[Fe?/* @__PURE__ */E(W,{accessibilityLiveRegion:"polite",children:/* @__PURE__ */E(md,{view:Fe,theme:O,bare:!0})}):/* @__PURE__ */U(j,{children:[/* @__PURE__ */E(fi,{style:{fontSize:11,fontWeight:"800",letterSpacing:1.8,textTransform:"uppercase",color:De.accent},children:le>0?"Potential payout":"Stake"}),/* @__PURE__ */U(W,{accessibilityLiveRegion:"polite",style:{flexDirection:"row",flexWrap:"wrap",alignItems:"baseline",columnGap:6,marginTop:4},children:[
368
- /* @__PURE__ */E(fi,{style:{fontSize:Pl,fontWeight:"800",letterSpacing:-.52,color:X,fontFamily:N,fontVariant:["tabular-nums"]},children:yt(le>0?le:f)}),le>0&&/* @__PURE__ */U(fi,{style:{fontSize:14,color:G.textMuted},children:["for ",yt(f)]}),se&&/* @__PURE__ */E(fi,{style:{fontSize:12,fontWeight:"600",color:G.warning},children:"+ Jackpot"})]})]}),t,e&&/* @__PURE__ */E(vi,{size:"lg",theme:O,block:!0,variant:P?"confirm":"primary",onPress:l,disabled:fe,accessibilityState:{busy:!!s},icon:s?/* @__PURE__ */E(u,{size:"small",color:G.textMuted}):void 0,style:{marginTop:4},children:s?"Placing entry…":`${P?"Confirm":"Place"} entry · ${yt(f)}`}),e&&fe&&be&&/* @__PURE__ */E(fi,{accessibilityLiveRegion:"polite",style:{fontSize:13,fontWeight:"600",color:G.text,textAlign:"center"},children:be})]});const n=/* @__PURE__ */U(j,{children:[
367
+ /* @__PURE__ */U(fi,{style:{fontSize:12,marginTop:6,color:G.textMuted},children:["Minimum bet: ",yt(te),null!==ne?` · Maximum: ${yt(ne)}`:""]}),f>0&&f<te&&/* @__PURE__ */U(fi,{style:{fontSize:12,marginTop:4,color:G.error},children:["Bet amount must be at least ",yt(te)]})]}),I?/* @__PURE__ */U(j,{children:[/* @__PURE__ */E(W,{accessibilityLabel:"Quick stakes",style:{flexDirection:"row",gap:5},children:ie.map(e=>/* @__PURE__ */E(Rl,{theme:O,selected:f===e,onPress:()=>g(e),style:{flex:1,minWidth:0},children:yt(e)},e))}),f>0&&/* @__PURE__ */E(vi,{theme:O,variant:"quiet",onPress:()=>g(0),style:{alignSelf:"flex-start"},children:"Reset stake"})]}):/* @__PURE__ */U(W,{children:[(k||f>0)&&/* @__PURE__ */U(W,{style:{flexDirection:"row",justifyContent:"space-between",alignItems:"center",marginBottom:8},children:[k?/* @__PURE__ */E(fi,{style:{fontSize:Z?14:12,fontWeight:"600",color:q},children:"Add to bet"}):/* @__PURE__ */E(W,{}),f>0&&/* @__PURE__ */E(vi,{theme:O,variant:"quiet",onPress:()=>g(0),children:"Reset stake"})]}),/* @__PURE__ */E(W,{style:{flexDirection:"row",gap:8},children:ie.map(e=>/* @__PURE__ */E(Rl,{theme:O,selected:!1,onPress:()=>{const t=f+e;g(null!==ne?Math.min(t,ne):t)},disabled:null!==ne&&f>=ne,style:{flex:1,minWidth:0},children:`+${yt(e)}`},e))})]})]})]}),/* @__PURE__ */E(vd,{shelf:I,theme:O,above:R,style:[Bd.section,He,{padding:Z?20:16}],children:(()=>{const e=m&&!!l,t=ae.enabled&&/* @__PURE__ */U(W,{style:[Bd.jackpotBanner,{borderRadius:sn(O,4),backgroundColor:`${G.warning}08`,borderColor:`${G.warning}25`}],children:[/* @__PURE__ */U(fi,{style:{color:G.warning,fontSize:12,fontWeight:"600"},children:["★ ",ae.progressive?"Progressive Jackpot":"Jackpot"]}),/* @__PURE__ */E(fi,{style:{color:G.warning,fontSize:14,fontWeight:"700"},children:ae.progressive?ae.amount>0?yt(ae.amount):ae.limit>0?`Up to ${yt(ae.limit)}`:"Progressive":yt(ae.amount)})]});if(I)/* @__PURE__ */return U(j,{children:[Fe?/* @__PURE__ */E(W,{accessibilityLiveRegion:"polite",children:/* @__PURE__ */E(bd,{view:Fe,theme:O,bare:!0})}):/* @__PURE__ */U(j,{children:[/* @__PURE__ */E(fi,{style:{fontSize:11,fontWeight:"800",letterSpacing:1.8,textTransform:"uppercase",color:De.accent},children:le>0?"Potential payout":"Stake"}),/* @__PURE__ */U(W,{accessibilityLiveRegion:"polite",style:{flexDirection:"row",flexWrap:"wrap",alignItems:"baseline",columnGap:6,marginTop:4},children:[
368
+ /* @__PURE__ */E(fi,{style:{fontSize:Tl,fontWeight:"800",letterSpacing:-.52,color:X,fontFamily:N,fontVariant:["tabular-nums"]},children:yt(le>0?le:f)}),le>0&&/* @__PURE__ */U(fi,{style:{fontSize:14,color:G.textMuted},children:["for ",yt(f)]}),se&&/* @__PURE__ */E(fi,{style:{fontSize:12,fontWeight:"600",color:G.warning},children:"+ Jackpot"})]})]}),t,e&&/* @__PURE__ */E(vi,{size:"lg",theme:O,block:!0,variant:P?"confirm":"primary",onPress:l,disabled:fe,accessibilityState:{busy:!!s},icon:s?/* @__PURE__ */E(u,{size:"small",color:G.textMuted}):void 0,style:{marginTop:4},children:s?"Placing entry…":`${P?"Confirm":"Place"} entry · ${yt(f)}`}),e&&fe&&be&&/* @__PURE__ */E(fi,{accessibilityLiveRegion:"polite",style:{fontSize:13,fontWeight:"600",color:G.text,textAlign:"center"},children:be})]});const n=/* @__PURE__ */U(j,{children:[
369
369
  /* @__PURE__ */U(W,{style:{flexDirection:"row",justifyContent:"space-between",alignItems:"center",marginBottom:4},children:[/* @__PURE__ */E(fi,{style:{color:q,fontSize:14},children:"Bet"}),/* @__PURE__ */E(fi,{style:{color:K,fontSize:14,fontWeight:"600"},children:yt(f)})]}),le>0&&/* @__PURE__ */U(W,{style:{flexDirection:"row",flexWrap:"wrap",columnGap:8,justifyContent:"space-between",alignItems:"center",paddingTop:8,borderTopWidth:1,borderTopColor:G.border},children:[/* @__PURE__ */E(fi,{style:{color:q,fontSize:14,fontWeight:"600"},children:"Potential Payout"}),/* @__PURE__ */U(W,{style:{flexDirection:"row",alignItems:"center"},children:[/* @__PURE__ */E(fi,{style:{color:X,fontSize:18,fontWeight:"700"},children:yt(le)}),se&&/* @__PURE__ */E(fi,{style:{color:G.warning,fontSize:12,marginLeft:4},children:"+ Jackpot"})]})]}),t]});return e?/* @__PURE__ */U(W,{style:{flexDirection:"row",alignItems:"stretch",gap:16},children:[
370
370
  /* @__PURE__ */E(W,{style:{flex:1,minWidth:0},children:n}),
371
371
  /* @__PURE__ */E(W,{style:{width:1,alignSelf:"stretch",backgroundColor:G.border}}),
372
- /* @__PURE__ */E(vi,{size:"lg",theme:O,variant:P?"confirm":"primary",onPress:l,disabled:fe,accessibilityState:{busy:!!s},icon:s?/* @__PURE__ */E(u,{size:"small",color:G.textMuted}):void 0,style:{flexShrink:0},children:s?"Placing Entry…":/* @__PURE__ */U(W,{style:{alignItems:"center"},children:[/* @__PURE__ */E(fi,{style:{color:ki(O,P?"confirm":"primary",fe),fontSize:16,fontWeight:"800"},children:P?"Confirm Entry":"Place Entry"}),/* @__PURE__ */E(fi,{style:{color:ki(O,P?"confirm":"primary",fe),fontSize:12,fontWeight:"600",opacity:.9},children:yt(f)})]})})]}):n})()})]}):/* @__PURE__ */U(wd,{shelf:I,theme:O,style:[kd.section,He,{padding:Z?24:16}],children:[
372
+ /* @__PURE__ */E(vi,{size:"lg",theme:O,variant:P?"confirm":"primary",onPress:l,disabled:fe,accessibilityState:{busy:!!s},icon:s?/* @__PURE__ */E(u,{size:"small",color:G.textMuted}):void 0,style:{flexShrink:0},children:s?"Placing Entry…":/* @__PURE__ */U(W,{style:{alignItems:"center"},children:[/* @__PURE__ */E(fi,{style:{color:ki(O,P?"confirm":"primary",fe),fontSize:16,fontWeight:"800"},children:P?"Confirm Entry":"Place Entry"}),/* @__PURE__ */E(fi,{style:{color:ki(O,P?"confirm":"primary",fe),fontSize:12,fontWeight:"600",opacity:.9},children:yt(f)})]})})]}):n})()})]}):/* @__PURE__ */U(xd,{shelf:I,theme:O,style:[Bd.section,He,{padding:Z?24:16}],children:[
373
373
  /* @__PURE__ */E(fi,{style:[{fontSize:Z?18:16,fontWeight:"600",color:X,fontFamily:N},Me],children:"Log in to place this entry"}),
374
374
  /* @__PURE__ */E(fi,{style:{fontSize:Z?14:12,color:G.textMuted,marginTop:4,marginBottom:16},children:"Your picks are held. Log in to set your bet and confirm."}),
375
- /* @__PURE__ */E(vi,{size:"lg",theme:O,block:!0,onPress:l,children:"Log in"})]})]})]}),c&&/* @__PURE__ */E(W,{style:[kd.errorBanner,{borderRadius:sn(O,8),backgroundColor:G.errorBg,borderColor:G.error}],children:/* @__PURE__ */E(fi,{style:{color:G.errorText,fontSize:14},children:c})}),!m&&/* @__PURE__ */U(W,{style:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",gap:12,borderTopWidth:1,borderTopColor:G.border,backgroundColor:G.background,marginHorizontal:Z?-24:-16,paddingHorizontal:Z?24:16,paddingVertical:Z?16:12},children:[/* @__PURE__ */E(vi,{theme:O,size:"lg",variant:"secondary",disabled:s,onPress:a,children:"Back"}),/* @__PURE__ */E(vi,{theme:O,size:"lg",variant:P?"confirm":"primary",onPress:l,disabled:fe,accessibilityState:{busy:!!s},icon:s?/* @__PURE__ */E(u,{size:"small",color:G.textMuted}):void 0,children:s?"Placing Entry…":`${P?"Confirm":"Place"} Entry (${yt(f)})`})]})]})}var kd=B.create({section:{borderWidth:1},jackpotBanner:{flexDirection:"row",justifyContent:"space-between",alignItems:"center",paddingVertical:6,paddingHorizontal:8,borderWidth:1,marginTop:8},errorBanner:{padding:12,borderWidth:1}}),Bd="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 Cd({index:e,size:t,wide:n,isWinning:i,isJackpot:o,isSelected:r,bgColor:l,borderFallback:a,warning:s,primary:c,textMuted:d,payout:h,onPress:u,accessibilityLabel:f}){const{hovered:g,pressed:p,handlers:y}=wi(),m=!!u,b=i||o,w=(b?1.1:1)*(m&&p?li.pressScale:1),x=m&&!r?ai(c,{hovered:g,pressed:p})?.borderColor:void 0;/* @__PURE__ */
376
- return U(z,{...y,onPress:u,disabled:!m,activeOpacity:1,accessibilityRole:"button",accessibilityLabel:f,accessibilityState:{disabled:!m,selected:r},style:[zd.circle,{width:t,height:t,borderRadius:t/2,backgroundColor:l,borderColor:x??(o?s:i?l:a),zIndex:r?10:o?6:i?5:1,transform:[{scale:w}]},b&&zd.circleWinning],children:[o&&/* @__PURE__ */E(W,{pointerEvents:"none",style:{position:"absolute",top:-3,right:-3,bottom:-3,left:-3,borderRadius:t/2+3,borderWidth:2,borderColor:`${s}80`}}),r&&/* @__PURE__ */E(W,{pointerEvents:"none",style:{position:"absolute",top:-6,right:-6,bottom:-6,left:-6,borderRadius:t/2+6,borderWidth:3,borderColor:c}}),o&&/* @__PURE__ */E(W,{pointerEvents:"none",style:{position:"absolute",top:-6,right:-6},children:/* @__PURE__ */E(A,{width:14,height:14,viewBox:"0 0 24 24",children:/* @__PURE__ */E(H,{d:Bd,fill:s,stroke:s,strokeWidth:1})})}),
377
- /* @__PURE__ */E(fi,{style:{fontSize:n?16:14,lineHeight:n?16:14,fontWeight:"600",color:i||o?"#ffffff":d},children:e}),h>0&&/* @__PURE__ */E(fi,{style:{fontSize:n?8:7,lineHeight:n?8:7,fontWeight:"400",color:i||o?"#ffffff":d},children:yt(h)})]})}function Sd({game:e,totalSelections:t,expectedCorrect:n,onExpectedCorrectChange:i,theme:o=Fn,colorWinning:r,colorNone:l,winningCounts:a,payouts:s}){const c=o.colors,{width:h}=F(),u=h>=640,f=r??c.payoutWinning,g=l??c.payoutNone,p=Ft(e),y=u?48:40,[m,b]=d({width:0,height:0});/* @__PURE__ */
378
- return U(W,{style:zd.container,children:[
379
- /* @__PURE__ */E(fi,{style:[zd.title,{color:c.textMuted}],children:"Payout Visualization"}),p.enabled&&/* @__PURE__ */U(W,{style:[zd.jackpotBanner,{borderRadius:sn(o,8),borderColor:`${c.warning}30`}],onLayout:e=>b({width:e.nativeEvent.layout.width,height:e.nativeEvent.layout.height}),children:[m.width>0&&/* @__PURE__ */U(A,{style:B.absoluteFill,width:m.width,height:m.height,pointerEvents:"none",children:[/* @__PURE__ */E(P,{children:/* @__PURE__ */U(D,{id:"payout-jackpot-grad",x1:"0%",y1:"0%",x2:"100%",y2:"100%",children:[/* @__PURE__ */E(R,{offset:"0%",stopColor:c.warning,stopOpacity:.094}),/* @__PURE__ */E(R,{offset:"100%",stopColor:c.warning,stopOpacity:.031})]})}),/* @__PURE__ */E(L,{x:0,y:0,width:m.width,height:m.height,fill:"url(#payout-jackpot-grad)"})]}),
380
- /* @__PURE__ */E(A,{width:16,height:16,viewBox:"0 0 24 24",style:{flexShrink:0},children:/* @__PURE__ */E(H,{d:Bd,fill:c.warning})}),
381
- /* @__PURE__ */E(fi,{style:[zd.jackpotText,{color:c.warning}],children:p.progressive?p.amount>0?`Progressive Jackpot: ${yt(p.amount)}${p.limit>0?` (up to ${yt(p.limit)})`:""} for a perfect pick!`:p.limit>0?`Progressive Jackpot — up to ${yt(p.limit)} for a perfect pick!`:"Progressive Jackpot for a perfect pick!":`Jackpot: ${yt(p.amount)} for a perfect pick!`})]}),
382
- /* @__PURE__ */E(W,{style:[zd.circleGrid,{gap:u?8:6}],children:Array.from({length:t+1},(e,o)=>{const r=a.includes(o),l=s[o]??0,d=o===t,h=p.enabled&&d,m=h?c.warning:r?f:g,b=o===n,w=h?p.progressive?`${o} correct wins progressive jackpot${p.amount>0?` (currently ${yt(p.amount)})`:""}${p.limit>0?` up to ${yt(p.limit)}`:""} plus ${yt(l)}`:`${o} correct wins jackpot ${yt(p.amount)} plus ${yt(l)}`:r?`${o} correct wins ${yt(l)}`:l>0?`${o} correct pays ${yt(l)} but does not win`:`${o} correct — no payout`,x=i?`${w}. Tap to select`:w;/* @__PURE__ */
383
- return E(Cd,{index:o,size:y,wide:u,isWinning:r,isJackpot:h,isSelected:b,bgColor:m,borderFallback:c.border,warning:c.warning,primary:c.primary,textMuted:c.textMuted,payout:l,onPress:i?()=>i(o):void 0,accessibilityLabel:x},o)})}),
384
- /* @__PURE__ */U(fi,{style:[zd.expectedText,{color:c.textMuted}],children:["Your expected: ",/* @__PURE__ */U(fi,{style:zd.expectedBold,children:[n," correct"]})]})]})}var zd=B.create({container:{gap:16},title:{fontSize:14,fontWeight:"600",textAlign:"center"},jackpotBanner:{flexDirection:"row",alignItems:"center",justifyContent:"center",gap:8,paddingVertical:10,paddingHorizontal:16,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},expectedText:{fontSize:12,textAlign:"center"},expectedBold:{fontWeight:"600"}});function Wd(e){if(!e.commence_time)return null;const t=new Date(e.commence_time);return Number.isNaN(t.getTime())?null:t}function Fd(e,t,n,i,o,r){const l=e?ja(e,t,n,i??void 0):null;return(l?l.rows.flatMap(e=>null!=e.correct&&e.amount>0?[{correct:e.correct,amount:e.amount}]:[]):hr(o,t,r).map(e=>({correct:e.count,amount:e.prize}))).sort((e,t)=>t.amount-e.amount)}function Ad(e,t,n){return null==n?null:Ji(e)?.modes.find(e=>e.allowedMisses===t-n)?.label??null}function Pd(e,t=Date.now()){let n=null;for(const i of e){const e=i&&null==i.result&&!i.is_voided?Wd(i):null;e&&e.getTime()>=t&&(!n||e<n)&&(n=e)}return n}function Td(e,t){return t?`${e} right, ${t} ${1===t?"miss":"misses"}`:`${e} right`}function Dd({iconUrl:e,gameName:t,chipColor:n,textColor:i,iconColor:o,accentColor:r,brandColor:l,height:a=56,showTrademark:s=!0,compact:c=!1,onPress:d}){const h=n??l??"#0F4C5C",u=i??h,f=.85*a,g=1.8*f,p=f/2,y='Manrope, Poppins, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif',m=a,b=g-.18*f*2,w=f-.05*f*2,v=/* @__PURE__ */U(j,{children:[
375
+ /* @__PURE__ */E(vi,{size:"lg",theme:O,block:!0,onPress:l,children:"Log in"})]})]})]}),c&&/* @__PURE__ */E(W,{style:[Bd.errorBanner,{borderRadius:sn(O,8),backgroundColor:G.errorBg,borderColor:G.error}],children:/* @__PURE__ */E(fi,{style:{color:G.errorText,fontSize:14},children:c})}),!m&&/* @__PURE__ */U(W,{style:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",gap:12,borderTopWidth:1,borderTopColor:G.border,backgroundColor:G.background,marginHorizontal:Z?-24:-16,paddingHorizontal:Z?24:16,paddingVertical:Z?16:12},children:[/* @__PURE__ */E(vi,{theme:O,size:"lg",variant:"secondary",disabled:s,onPress:a,children:"Back"}),/* @__PURE__ */E(vi,{theme:O,size:"lg",variant:P?"confirm":"primary",onPress:l,disabled:fe,accessibilityState:{busy:!!s},icon:s?/* @__PURE__ */E(u,{size:"small",color:G.textMuted}):void 0,children:s?"Placing Entry…":`${P?"Confirm":"Place"} Entry (${yt(f)})`})]})]})}var Bd=B.create({section:{borderWidth:1},jackpotBanner:{flexDirection:"row",justifyContent:"space-between",alignItems:"center",paddingVertical:6,paddingHorizontal:8,borderWidth:1,marginTop:8},errorBanner:{padding:12,borderWidth:1}}),Cd="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 Sd({index:e,size:t,wide:n,isWinning:i,isJackpot:o,isSelected:r,bgColor:l,borderFallback:a,warning:s,primary:c,textMuted:d,payout:h,onPress:u,accessibilityLabel:f}){const{hovered:g,pressed:p,handlers:y}=wi(),m=!!u,b=i||o,w=(b?1.1:1)*(m&&p?li.pressScale:1),x=m&&!r?ai(c,{hovered:g,pressed:p})?.borderColor:void 0;/* @__PURE__ */
376
+ return U(z,{...y,onPress:u,disabled:!m,activeOpacity:1,accessibilityRole:"button",accessibilityLabel:f,accessibilityState:{disabled:!m,selected:r},style:[Wd.circle,{width:t,height:t,borderRadius:t/2,backgroundColor:l,borderColor:x??(o?s:i?l:a),zIndex:r?10:o?6:i?5:1,transform:[{scale:w}]},b&&Wd.circleWinning],children:[o&&/* @__PURE__ */E(W,{pointerEvents:"none",style:{position:"absolute",top:-3,right:-3,bottom:-3,left:-3,borderRadius:t/2+3,borderWidth:2,borderColor:`${s}80`}}),r&&/* @__PURE__ */E(W,{pointerEvents:"none",style:{position:"absolute",top:-6,right:-6,bottom:-6,left:-6,borderRadius:t/2+6,borderWidth:3,borderColor:c}}),o&&/* @__PURE__ */E(W,{pointerEvents:"none",style:{position:"absolute",top:-6,right:-6},children:/* @__PURE__ */E(A,{width:14,height:14,viewBox:"0 0 24 24",children:/* @__PURE__ */E(H,{d:Cd,fill:s,stroke:s,strokeWidth:1})})}),
377
+ /* @__PURE__ */E(fi,{style:{fontSize:n?16:14,lineHeight:n?16:14,fontWeight:"600",color:i||o?"#ffffff":d},children:e}),h>0&&/* @__PURE__ */E(fi,{style:{fontSize:n?8:7,lineHeight:n?8:7,fontWeight:"400",color:i||o?"#ffffff":d},children:yt(h)})]})}function zd({game:e,totalSelections:t,expectedCorrect:n,onExpectedCorrectChange:i,theme:o=Fn,colorWinning:r,colorNone:l,winningCounts:a,payouts:s}){const c=o.colors,{width:h}=F(),u=h>=640,f=r??c.payoutWinning,g=l??c.payoutNone,p=Ft(e),y=u?48:40,[m,b]=d({width:0,height:0});/* @__PURE__ */
378
+ return U(W,{style:Wd.container,children:[
379
+ /* @__PURE__ */E(fi,{style:[Wd.title,{color:c.textMuted}],children:"Payout Visualization"}),p.enabled&&/* @__PURE__ */U(W,{style:[Wd.jackpotBanner,{borderRadius:sn(o,8),borderColor:`${c.warning}30`}],onLayout:e=>b({width:e.nativeEvent.layout.width,height:e.nativeEvent.layout.height}),children:[m.width>0&&/* @__PURE__ */U(A,{style:B.absoluteFill,width:m.width,height:m.height,pointerEvents:"none",children:[/* @__PURE__ */E(P,{children:/* @__PURE__ */U(D,{id:"payout-jackpot-grad",x1:"0%",y1:"0%",x2:"100%",y2:"100%",children:[/* @__PURE__ */E(R,{offset:"0%",stopColor:c.warning,stopOpacity:.094}),/* @__PURE__ */E(R,{offset:"100%",stopColor:c.warning,stopOpacity:.031})]})}),/* @__PURE__ */E(L,{x:0,y:0,width:m.width,height:m.height,fill:"url(#payout-jackpot-grad)"})]}),
380
+ /* @__PURE__ */E(A,{width:16,height:16,viewBox:"0 0 24 24",style:{flexShrink:0},children:/* @__PURE__ */E(H,{d:Cd,fill:c.warning})}),
381
+ /* @__PURE__ */E(fi,{style:[Wd.jackpotText,{color:c.warning}],children:p.progressive?p.amount>0?`Progressive Jackpot: ${yt(p.amount)}${p.limit>0?` (up to ${yt(p.limit)})`:""} for a perfect pick!`:p.limit>0?`Progressive Jackpot — up to ${yt(p.limit)} for a perfect pick!`:"Progressive Jackpot for a perfect pick!":`Jackpot: ${yt(p.amount)} for a perfect pick!`})]}),
382
+ /* @__PURE__ */E(W,{style:[Wd.circleGrid,{gap:u?8:6}],children:Array.from({length:t+1},(e,o)=>{const r=a.includes(o),l=s[o]??0,d=o===t,h=p.enabled&&d,m=h?c.warning:r?f:g,b=o===n,w=h?p.progressive?`${o} correct wins progressive jackpot${p.amount>0?` (currently ${yt(p.amount)})`:""}${p.limit>0?` up to ${yt(p.limit)}`:""} plus ${yt(l)}`:`${o} correct wins jackpot ${yt(p.amount)} plus ${yt(l)}`:r?`${o} correct wins ${yt(l)}`:l>0?`${o} correct pays ${yt(l)} but does not win`:`${o} correct — no payout`,x=i?`${w}. Tap to select`:w;/* @__PURE__ */
383
+ return E(Sd,{index:o,size:y,wide:u,isWinning:r,isJackpot:h,isSelected:b,bgColor:m,borderFallback:c.border,warning:c.warning,primary:c.primary,textMuted:c.textMuted,payout:l,onPress:i?()=>i(o):void 0,accessibilityLabel:x},o)})}),
384
+ /* @__PURE__ */U(fi,{style:[Wd.expectedText,{color:c.textMuted}],children:["Your expected: ",/* @__PURE__ */U(fi,{style:Wd.expectedBold,children:[n," correct"]})]})]})}var Wd=B.create({container:{gap:16},title:{fontSize:14,fontWeight:"600",textAlign:"center"},jackpotBanner:{flexDirection:"row",alignItems:"center",justifyContent:"center",gap:8,paddingVertical:10,paddingHorizontal:16,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},expectedText:{fontSize:12,textAlign:"center"},expectedBold:{fontWeight:"600"}});function Fd(e){if(!e.commence_time)return null;const t=new Date(e.commence_time);return Number.isNaN(t.getTime())?null:t}function Ad(e,t,n,i,o,r){const l=e?Ea(e,t,n,i??void 0):null;return(l?l.rows.flatMap(e=>null!=e.correct&&e.amount>0?[{correct:e.correct,amount:e.amount}]:[]):hr(o,t,r).map(e=>({correct:e.count,amount:e.prize}))).sort((e,t)=>t.amount-e.amount)}function Pd(e,t,n){return null==n?null:Ji(e)?.modes.find(e=>e.allowedMisses===t-n)?.label??null}function Td(e,t=Date.now()){let n=null;for(const i of e){const e=i&&null==i.result&&!i.is_voided?Fd(i):null;e&&e.getTime()>=t&&(!n||e<n)&&(n=e)}return n}function Dd(e,t){return t?`${e} right, ${t} ${1===t?"miss":"misses"}`:`${e} right`}function Hd({iconUrl:e,gameName:t,chipColor:n,textColor:i,iconColor:o,accentColor:r,brandColor:l,height:a=56,showTrademark:s=!0,compact:c=!1,onPress:d}){const h=n??l??"#0F4C5C",u=i??h,f=.85*a,g=1.8*f,p=f/2,y='Manrope, Poppins, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif',m=a,b=g-.18*f*2,w=f-.05*f*2,v=/* @__PURE__ */U(j,{children:[
385
385
  /* @__PURE__ */U(fi,{accessibilityLabel:"YESNO",style:{fontFamily:y,fontSize:a,lineHeight:1.15*a,letterSpacing:-1,color:u,includeFontPadding:!1},children:[/* @__PURE__ */E(fi,{style:{fontWeight:"900"},children:"YES"}),/* @__PURE__ */E(fi,{style:{fontWeight:"300"},children:"NO"})]}),
386
- /* @__PURE__ */E(W,{accessible:!0,accessibilityRole:"image",accessibilityLabel:t,style:{width:g,height:f,borderRadius:p,backgroundColor:h,alignItems:"center",justifyContent:"center",flexShrink:0,transform:[{translateY:.06*-a}]},children:/* @__PURE__ */E(ds,{iconUrl:e,width:b,height:w,iconColor:o,accentColor:r})}),
387
- /* @__PURE__ */U(W,{style:{flexDirection:"row",alignItems:"flex-start",flexShrink:1,minWidth:0},children:[/* @__PURE__ */E(fi,{style:{fontFamily:y,fontSize:m,lineHeight:1.15*m,fontWeight:"500",color:u,includeFontPadding:!1,flexShrink:1},children:t}),s&&/* @__PURE__ */E(fi,{style:{fontFamily:y,fontSize:.3*m,lineHeight:.3*m,fontWeight:"600",color:u,marginLeft:.06*m,includeFontPadding:!1},children:"TM"})]})]});return d?/* @__PURE__ */E(x,{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:v}):/* @__PURE__ */E(W,{style:{flexDirection:"row",alignItems:"center",flexWrap:"wrap",gap:.2*a,maxWidth:"100%",minWidth:0},children:v})}function Hd({testId:e,label:t,children:n}){/* @__PURE__ */
388
- return E(W,{testID:e,role:"status","aria-live":"polite","aria-label":t,style:{width:"100%",minWidth:0},children:/* @__PURE__ */E(W,{"aria-hidden":!0,children:n})})}function Md({color:e,line:t,h:n,w:i,style:o}){/* @__PURE__ */
389
- return E(W,{style:[{height:t,justifyContent:"center"},o],children:/* @__PURE__ */E(Is,{color:e,style:{height:n,width:i,maxWidth:"100%"}})})}function Ld({theme:t,layout:n,categories:i}){const{categoryCovers:o={}}=le(),{width:r}=F(),[l,a]=e.useState(0),s=Sn(t),c=i.length?i:xt.slice(0,2);if("kit"===n)/* @__PURE__ */return E(Hd,{testId:"skeleton-category-kit",label:"Loading categories",children:/* @__PURE__ */E(Os,{colors:s,count:c.length,theme:t})});const d=Math.max(1,Math.floor((l+Ja)/312)),h=d>1&&l>0?(l-Ja*(d-1))/d:"100%",u=Qa(t).coverText;/* @__PURE__ */
390
- return E(Hd,{testId:"skeleton-category-shelf",label:"Loading categories",children:/* @__PURE__ */E(W,{onLayout:e=>a(e.nativeEvent.layout.width),style:{flexDirection:"row",flexWrap:"wrap",gap:Ja,width:"100%"},children:c.map(e=>/* @__PURE__ */U(W,{style:{width:h,height:116,padding:16,borderRadius:sn(t,16),justifyContent:"space-between",alignItems:"flex-start",backgroundColor:$a(e,t).ground??t.colors.infoBg},children:[/* @__PURE__ */E(Is,{color:u,style:{height:22,width:120,marginTop:3}}),/* @__PURE__ */E(Is,{color:u,style:{height:22,width:110,borderRadius:sn(t,8)}})]},e))})})}function Rd({theme:e,layout:t,rows:n=3}){const i=Sn(e),o=Sn(ra(e)),r=e.colors,l=r.textMuted,a=Array.from({length:n});/* @__PURE__ */
391
- return U(Hd,"kit"===t?{testId:"skeleton-entries-kit",label:"Loading entries",children:[/* @__PURE__ */E(Ns,{colors:o}),/* @__PURE__ */E(W,{style:{gap:12},children:a.map((t,n)=>/* @__PURE__ */E(W,{style:{borderRadius:sn(e,12),borderWidth:1,overflow:"hidden",borderColor:r.border,backgroundColor:Rs(i),shadowColor:"#000",shadowOpacity:"dark"===e.colorScheme?.4:.12,shadowRadius:12,shadowOffset:{width:0,height:6},elevation:2},children:/* @__PURE__ */U(W,{style:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",gap:12,paddingHorizontal:16,paddingVertical:12},children:[/* @__PURE__ */U(W,{style:{flex:1,minWidth:0},children:[/* @__PURE__ */E(Md,{color:l,line:18,h:18,w:160}),/* @__PURE__ */E(Md,{color:l,line:16,h:12,w:128,style:{marginTop:2}})]}),/* @__PURE__ */U(W,{style:{flexDirection:"row",alignItems:"center",gap:12,flexShrink:0},children:[
392
- /* @__PURE__ */E(Is,{color:l,style:{height:12,width:40}}),
393
- /* @__PURE__ */E(Is,{color:l,style:{height:20,width:68,borderRadius:sn(e,999)}}),
394
- /* @__PURE__ */E(Is,{color:l,style:{width:18,height:18}})]})]})},n))})]}:{testId:"skeleton-entries-shelf",label:"Loading entries",children:[/* @__PURE__ */U(W,{style:{flexDirection:"row",gap:6,marginBottom:12},children:[/* @__PURE__ */E(Is,{color:l,style:{flex:1,height:kl,borderRadius:sn(e,bl)}}),/* @__PURE__ */U(W,{style:{flex:1,height:kl,gap:4,alignItems:"center",justifyContent:"center",borderRadius:sn(e,bl),borderWidth:1,borderColor:r.border,backgroundColor:Rs(i)},children:[/* @__PURE__ */E(Is,{color:l,style:{height:12,width:56}}),/* @__PURE__ */E(Is,{color:l,style:{height:10,width:48}})]})]}),/* @__PURE__ */E(W,{style:{gap:12},children:a.map((t,n)=>/* @__PURE__ */U(Hl,{theme:e,children:[
386
+ /* @__PURE__ */E(W,{accessible:!0,accessibilityRole:"image",accessibilityLabel:t,style:{width:g,height:f,borderRadius:p,backgroundColor:h,alignItems:"center",justifyContent:"center",flexShrink:0,transform:[{translateY:.06*-a}]},children:/* @__PURE__ */E(hs,{iconUrl:e,width:b,height:w,iconColor:o,accentColor:r})}),
387
+ /* @__PURE__ */U(W,{style:{flexDirection:"row",alignItems:"flex-start",flexShrink:1,minWidth:0},children:[/* @__PURE__ */E(fi,{style:{fontFamily:y,fontSize:m,lineHeight:1.15*m,fontWeight:"500",color:u,includeFontPadding:!1,flexShrink:1},children:t}),s&&/* @__PURE__ */E(fi,{style:{fontFamily:y,fontSize:.3*m,lineHeight:.3*m,fontWeight:"600",color:u,marginLeft:.06*m,includeFontPadding:!1},children:"TM"})]})]});return d?/* @__PURE__ */E(x,{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:v}):/* @__PURE__ */E(W,{style:{flexDirection:"row",alignItems:"center",flexWrap:"wrap",gap:.2*a,maxWidth:"100%",minWidth:0},children:v})}function Md({testId:e,label:t,children:n}){/* @__PURE__ */
388
+ return E(W,{testID:e,role:"status","aria-live":"polite","aria-label":t,style:{width:"100%",minWidth:0},children:/* @__PURE__ */E(W,{"aria-hidden":!0,children:n})})}function Ld({color:e,line:t,h:n,w:i,style:o}){/* @__PURE__ */
389
+ return E(W,{style:[{height:t,justifyContent:"center"},o],children:/* @__PURE__ */E(Os,{color:e,style:{height:n,width:i,maxWidth:"100%"}})})}function Rd({theme:t,layout:n,categories:i}){const{categoryCovers:o={}}=le(),{width:r}=F(),[l,a]=e.useState(0),s=Sn(t),c=i.length?i:xt.slice(0,2);if("kit"===n)/* @__PURE__ */return E(Md,{testId:"skeleton-category-kit",label:"Loading categories",children:/* @__PURE__ */E(js,{colors:s,count:c.length,theme:t})});const d=Math.max(1,Math.floor((l+Za)/312)),h=d>1&&l>0?(l-Za*(d-1))/d:"100%",u=Ja(t).coverText;/* @__PURE__ */
390
+ return E(Md,{testId:"skeleton-category-shelf",label:"Loading categories",children:/* @__PURE__ */E(W,{onLayout:e=>a(e.nativeEvent.layout.width),style:{flexDirection:"row",flexWrap:"wrap",gap:Za,width:"100%"},children:c.map(e=>/* @__PURE__ */U(W,{style:{width:h,height:116,padding:16,borderRadius:sn(t,16),justifyContent:"space-between",alignItems:"flex-start",backgroundColor:_a(e,t).ground??t.colors.infoBg},children:[/* @__PURE__ */E(Os,{color:u,style:{height:22,width:120,marginTop:3}}),/* @__PURE__ */E(Os,{color:u,style:{height:22,width:110,borderRadius:sn(t,8)}})]},e))})})}function Id({theme:e,layout:t,rows:n=3}){const i=Sn(e),o=Sn(la(e)),r=e.colors,l=r.textMuted,a=Array.from({length:n});/* @__PURE__ */
391
+ return U(Md,"kit"===t?{testId:"skeleton-entries-kit",label:"Loading entries",children:[/* @__PURE__ */E(Xs,{colors:o}),/* @__PURE__ */E(W,{style:{gap:12},children:a.map((t,n)=>/* @__PURE__ */E(W,{style:{borderRadius:sn(e,12),borderWidth:1,overflow:"hidden",borderColor:r.border,backgroundColor:Is(i),shadowColor:"#000",shadowOpacity:"dark"===e.colorScheme?.4:.12,shadowRadius:12,shadowOffset:{width:0,height:6},elevation:2},children:/* @__PURE__ */U(W,{style:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",gap:12,paddingHorizontal:16,paddingVertical:12},children:[/* @__PURE__ */U(W,{style:{flex:1,minWidth:0},children:[/* @__PURE__ */E(Ld,{color:l,line:18,h:18,w:160}),/* @__PURE__ */E(Ld,{color:l,line:16,h:12,w:128,style:{marginTop:2}})]}),/* @__PURE__ */U(W,{style:{flexDirection:"row",alignItems:"center",gap:12,flexShrink:0},children:[
392
+ /* @__PURE__ */E(Os,{color:l,style:{height:12,width:40}}),
393
+ /* @__PURE__ */E(Os,{color:l,style:{height:20,width:68,borderRadius:sn(e,999)}}),
394
+ /* @__PURE__ */E(Os,{color:l,style:{width:18,height:18}})]})]})},n))})]}:{testId:"skeleton-entries-shelf",label:"Loading entries",children:[/* @__PURE__ */U(W,{style:{flexDirection:"row",gap:6,marginBottom:12},children:[/* @__PURE__ */E(Os,{color:l,style:{flex:1,height:Bl,borderRadius:sn(e,wl)}}),/* @__PURE__ */U(W,{style:{flex:1,height:Bl,gap:4,alignItems:"center",justifyContent:"center",borderRadius:sn(e,wl),borderWidth:1,borderColor:r.border,backgroundColor:Is(i)},children:[/* @__PURE__ */E(Os,{color:l,style:{height:12,width:56}}),/* @__PURE__ */E(Os,{color:l,style:{height:10,width:48}})]})]}),/* @__PURE__ */E(W,{style:{gap:12},children:a.map((t,n)=>/* @__PURE__ */U(Ml,{theme:e,children:[
395
395
  /* @__PURE__ */U(W,{style:{flexDirection:"row",alignItems:"flex-start",gap:12},children:[
396
- /* @__PURE__ */U(W,{style:{flex:1,minWidth:0},children:[/* @__PURE__ */E(Md,{color:l,line:24,h:16,w:"55%"}),/* @__PURE__ */E(Md,{color:l,line:19.5,h:12,w:"75%"})]}),
397
- /* @__PURE__ */U(W,{style:{flexShrink:0,alignItems:"flex-end"},children:[/* @__PURE__ */E(Md,{color:l,line:18,h:11,w:64}),/* @__PURE__ */E(Md,{color:l,line:27,h:18,w:60})]}),
398
- /* @__PURE__ */E(Is,{color:l,style:{width:18,height:18}})]}),
399
- /* @__PURE__ */E(W,{style:{flexDirection:"row",gap:Fl,marginTop:12},children:Array.from({length:6}).map((e,t)=>/* @__PURE__ */E(Is,{color:l,style:{flex:1,height:zl,borderRadius:Wl}},t))}),
400
- /* @__PURE__ */E(Md,{color:l,line:19.5,h:12,w:"65%",style:{marginTop:8}})]},n))})]})}function Id({theme:e,count:t=3}){const{width:n}=F(),i=n>=640,o=Sn(e),r=o.textMuted,l=ra(e).colors.textMuted,a={height:i?16:14,width:96,marginVertical:i?4:3};/* @__PURE__ */
401
- return U(Hd,{testId:"skeleton-event-kit",label:"Loading fixtures",children:[/* @__PURE__ */E(Md,{color:l,line:22.75,h:12,w:300,style:{marginBottom:16}}),/* @__PURE__ */E(W,{style:{gap:i?12:10},children:Array.from({length:t}).map((t,n)=>/* @__PURE__ */U(W,{style:{minHeight:64,flexDirection:"row",alignItems:"center",justifyContent:"space-between",gap:12,borderWidth:1,borderRadius:sn(e,16),paddingHorizontal:i?20:14,paddingVertical:i?16:14,borderColor:o.border,backgroundColor:Rs(o)},children:[/* @__PURE__ */U(W,{style:{flex:1,minWidth:0},children:[/* @__PURE__ */U(W,{style:[{flexDirection:"column",alignItems:"flex-start",gap:4,borderRadius:sn(e,12),paddingHorizontal:12,paddingVertical:10,backgroundColor:Bn(e)},i&&{flexDirection:"row",alignItems:"center",columnGap:6}],children:[
402
- /* @__PURE__ */E(Is,{color:r,style:a}),
403
- /* @__PURE__ */E(Is,{color:r,style:{height:12,width:16,marginVertical:2}}),
404
- /* @__PURE__ */E(Is,{color:r,style:a})]}),/* @__PURE__ */E(Md,{color:r,line:i?18:16.5,h:i?12:10,w:160,style:{marginTop:8}})]}),/* @__PURE__ */E(Is,{color:r,style:{width:22,height:22,flexShrink:0}})]},n))})]})}function Od({apiUrl:e,apiKey:t,fetchImpl:n,getAuthHeaders:i,userId:o,demoEntries:r,demoGames:a,demoPropositions:h,onSelectEntry:u,theme:f,colorScheme:g,renderTeamLogo:p,filterSport:y}){const m=Yn(f,g),b="shelf"===Zn(),w=!!(r&&a&&h),x=m.colors,v=ra(m),k=v.colors,[B,C]=d("pending"),[S,z]=d([]),F=s(()=>new Ar({apiUrl:e,apiKey:t,fetchImpl:n,getAuthHeaders:i}),[e,t,n,i]),{entries:P,loading:T,error:D,refetch:M}=Ir(F,{user_id:o},{skip:w}),{games:L,loading:R,error:I}=Mr(F,void 0,{skip:w}),{propositions:O,loading:j,error:G}=Lr(F,void 0,{skip:w}),V=w?r:P,Y=w?a:L,N=w?h:O,X=!w&&(T||R||j),q=w?null:D||I||G,K=s(()=>V.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}),[V]),Q=s(()=>{const e=/* @__PURE__ */new Map;for(const t of Y)e.set(t.id,t);return e},[Y]),J=s(()=>{const e=/* @__PURE__ */new Map;for(const t of N)e.set(t.id,t);for(const t of K)if(t.propositions)for(const n of t.propositions)e.set(n.id,{...e.get(n.id),...n});for(const t of S)e.set(t.id,t);return e},[N,K,S]),Z=c(/* @__PURE__ */new Set);l(()=>{if(X||w)return;const e=[];for(const n of K)for(const t of n.proposition_ids??[])J.has(t)||Z.current.has(t)||(e.push(t),Z.current.add(t));if(0===e.length)return;let t=!1;return(async()=>{try{const n=await F.getPropositionsByIds(e);!t&&n.length>0&&z(e=>[...e,...n])}catch{}})(),()=>{t=!0}},[K,J,X,w,F]);const $=s(()=>y?K.filter(e=>{const t=e.proposition_ids??[];return 0===t.length||t.some(t=>(J.get(t)??e.propositions?.find(e=>e.id===t))?.sport===y)}):K,[K,y,J]),_=s(()=>$.filter(e=>gt(e.pending)),[$]),ee=s(()=>$.filter(e=>!gt(e.pending)),[$]),te="pending"===B?_:ee;return X?/* @__PURE__ */E(W,{style:Ud.container,children:/* @__PURE__ */E(Rd,{theme:m,layout:b?"shelf":"kit"})}):q?/* @__PURE__ */E(W,{style:Ud.container,children:/* @__PURE__ */U(W,{style:[Ud.errorBanner,{borderRadius:sn(m,8),backgroundColor:x.errorBg,borderColor:x.error}],children:[/* @__PURE__ */E(fi,{style:{color:x.errorText},children:q}),/* @__PURE__ */E(vi,{theme:m,variant:"quiet",onPress:M,style:{alignSelf:"flex-start",marginTop:8},children:"Try again"})]})}):/* @__PURE__ */U(W,{style:Ud.container,children:[
396
+ /* @__PURE__ */U(W,{style:{flex:1,minWidth:0},children:[/* @__PURE__ */E(Ld,{color:l,line:24,h:16,w:"55%"}),/* @__PURE__ */E(Ld,{color:l,line:19.5,h:12,w:"75%"})]}),
397
+ /* @__PURE__ */U(W,{style:{flexShrink:0,alignItems:"flex-end"},children:[/* @__PURE__ */E(Ld,{color:l,line:18,h:11,w:64}),/* @__PURE__ */E(Ld,{color:l,line:27,h:18,w:60})]}),
398
+ /* @__PURE__ */E(Os,{color:l,style:{width:18,height:18}})]}),
399
+ /* @__PURE__ */E(W,{style:{flexDirection:"row",gap:Al,marginTop:12},children:Array.from({length:6}).map((e,t)=>/* @__PURE__ */E(Os,{color:l,style:{flex:1,height:Wl,borderRadius:Fl}},t))}),
400
+ /* @__PURE__ */E(Ld,{color:l,line:19.5,h:12,w:"65%",style:{marginTop:8}})]},n))})]})}function Od({theme:e,count:t=3}){const{width:n}=F(),i=n>=640,o=Sn(e),r=o.textMuted,l=la(e).colors.textMuted,a={height:i?16:14,width:96,marginVertical:i?4:3};/* @__PURE__ */
401
+ return U(Md,{testId:"skeleton-event-kit",label:"Loading fixtures",children:[/* @__PURE__ */E(Ld,{color:l,line:22.75,h:12,w:300,style:{marginBottom:16}}),/* @__PURE__ */E(W,{style:{gap:i?12:10},children:Array.from({length:t}).map((t,n)=>/* @__PURE__ */U(W,{style:{minHeight:64,flexDirection:"row",alignItems:"center",justifyContent:"space-between",gap:12,borderWidth:1,borderRadius:sn(e,16),paddingHorizontal:i?20:14,paddingVertical:i?16:14,borderColor:o.border,backgroundColor:Is(o)},children:[/* @__PURE__ */U(W,{style:{flex:1,minWidth:0},children:[/* @__PURE__ */U(W,{style:[{flexDirection:"column",alignItems:"flex-start",gap:4,borderRadius:sn(e,12),paddingHorizontal:12,paddingVertical:10,backgroundColor:Bn(e)},i&&{flexDirection:"row",alignItems:"center",columnGap:6}],children:[
402
+ /* @__PURE__ */E(Os,{color:r,style:a}),
403
+ /* @__PURE__ */E(Os,{color:r,style:{height:12,width:16,marginVertical:2}}),
404
+ /* @__PURE__ */E(Os,{color:r,style:a})]}),/* @__PURE__ */E(Ld,{color:r,line:i?18:16.5,h:i?12:10,w:160,style:{marginTop:8}})]}),/* @__PURE__ */E(Os,{color:r,style:{width:22,height:22,flexShrink:0}})]},n))})]})}function jd({apiUrl:e,apiKey:t,fetchImpl:n,getAuthHeaders:i,userId:o,demoEntries:r,demoGames:a,demoPropositions:h,onSelectEntry:u,theme:f,colorScheme:g,renderTeamLogo:p,filterSport:y}){const m=Yn(f,g),b="shelf"===Zn(),w=!!(r&&a&&h),x=m.colors,v=la(m),k=v.colors,[B,C]=d("pending"),[S,z]=d([]),F=s(()=>new Ar({apiUrl:e,apiKey:t,fetchImpl:n,getAuthHeaders:i}),[e,t,n,i]),{entries:P,loading:T,error:D,refetch:M}=Ir(F,{user_id:o},{skip:w}),{games:L,loading:R,error:I}=Mr(F,void 0,{skip:w}),{propositions:O,loading:j,error:G}=Lr(F,void 0,{skip:w}),V=w?r:P,Y=w?a:L,N=w?h:O,X=!w&&(T||R||j),q=w?null:D||I||G,K=s(()=>V.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}),[V]),Q=s(()=>{const e=/* @__PURE__ */new Map;for(const t of Y)e.set(t.id,t);return e},[Y]),J=s(()=>{const e=/* @__PURE__ */new Map;for(const t of N)e.set(t.id,t);for(const t of K)if(t.propositions)for(const n of t.propositions)e.set(n.id,{...e.get(n.id),...n});for(const t of S)e.set(t.id,t);return e},[N,K,S]),Z=c(/* @__PURE__ */new Set);l(()=>{if(X||w)return;const e=[];for(const n of K)for(const t of n.proposition_ids??[])J.has(t)||Z.current.has(t)||(e.push(t),Z.current.add(t));if(0===e.length)return;let t=!1;return(async()=>{try{const n=await F.getPropositionsByIds(e);!t&&n.length>0&&z(e=>[...e,...n])}catch{}})(),()=>{t=!0}},[K,J,X,w,F]);const $=s(()=>y?K.filter(e=>{const t=e.proposition_ids??[];return 0===t.length||t.some(t=>(J.get(t)??e.propositions?.find(e=>e.id===t))?.sport===y)}):K,[K,y,J]),_=s(()=>$.filter(e=>gt(e.pending)),[$]),ee=s(()=>$.filter(e=>!gt(e.pending)),[$]),te="pending"===B?_:ee;return X?/* @__PURE__ */E(W,{style:Gd.container,children:/* @__PURE__ */E(Id,{theme:m,layout:b?"shelf":"kit"})}):q?/* @__PURE__ */E(W,{style:Gd.container,children:/* @__PURE__ */U(W,{style:[Gd.errorBanner,{borderRadius:sn(m,8),backgroundColor:x.errorBg,borderColor:x.error}],children:[/* @__PURE__ */E(fi,{style:{color:x.errorText},children:q}),/* @__PURE__ */E(vi,{theme:m,variant:"quiet",onPress:M,style:{alignSelf:"flex-start",marginTop:8},children:"Try again"})]})}):/* @__PURE__ */U(W,{style:Gd.container,children:[
405
405
  /* @__PURE__ */E(W,{accessibilityRole:"tablist",accessibilityLabel:"Entry status",style:{flexDirection:"row",gap:6,marginBottom:12},children:["pending","completed"].map(e=>{const t="pending"===e?_.length:ee.length;/* @__PURE__ */
406
- return E(Ll,{theme:B===e?v:m,accessibilityRole:"tab",selected:B===e,sub:`${t} ${1===t?"entry":"entries"}`,onPress:()=>C(e),style:{flex:1,minWidth:0},children:"pending"===e?b?"Open":"Pending":b?"Settled":"Completed"},e)})}),0===te.length&&/* @__PURE__ */U(W,{style:Ud.emptyState,children:[
406
+ return E(Rl,{theme:B===e?v:m,accessibilityRole:"tab",selected:B===e,sub:`${t} ${1===t?"entry":"entries"}`,onPress:()=>C(e),style:{flex:1,minWidth:0},children:"pending"===e?b?"Open":"Pending":b?"Settled":"Completed"},e)})}),0===te.length&&/* @__PURE__ */U(W,{style:Gd.emptyState,children:[
407
407
  /* @__PURE__ */E(W,{style:{marginBottom:16},children:/* @__PURE__ */E(A,{width:48,height:48,viewBox:"0 0 24 24",fill:"none",children:/* @__PURE__ */E(H,{d:"pending"===B?"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:k.textMuted,strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"})})}),
408
- /* @__PURE__ */E(fi,{style:[Ud.emptyTitle,{color:k.text}],children:"pending"===B?b?"No open entries":"No pending entries":b?"No settled entries":"No completed entries"}),
409
- /* @__PURE__ */E(fi,{style:[Ud.emptySubtitle,{color:k.textMuted}],children:"pending"===B?"Entries awaiting results will appear here":"Settled entries will appear here"})]}),
410
- /* @__PURE__ */E(W,{style:Ud.entryList,children:te.map(e=>/* @__PURE__ */E(jd,{entry:e,game:Q.get(e.game_id),propositionsById:J,onSelect:u,theme:m,renderTeamLogo:p,shelf:b},e.id))})]})}function jd({entry:e,game:t,propositionsById:n,onSelect:i,theme:o,renderTeamLogo:r,shelf:l=!1}){const a=o.colors,c=Nr(o),h=e.proposition_ids??[],u=s(()=>h.map(e=>n.get(e)).filter(Boolean),[h,n]),f=h.length,[g,p]=d(!1),{hovered:y,pressed:m,handlers:b}=wi(),w=f>0,x=w||!!i,v=s(()=>{const t=/* @__PURE__ */new Map;for(const n of e.propositions??[])t.set(n.id,n);return t},[e.propositions]),k=t=>{const i=e.selections?.[t];return null!=i?i:v.get(t)?.user_prediction??n.get(t)?.user_prediction},B=u.filter(e=>null!=e.result&&!e.is_voided).length,C=u.filter(e=>{if(null==e.result||e.is_voided)return!1;const t=k(e.id);return null!=t&&t===e.result}).length,S=null!=e.selections&&Object.keys(e.selections).length>0||(e.propositions??[]).some(e=>null!=e.user_prediction),F=gt(e.pending),P=!F&&ft(e.winning)>0,T=e.payout_status,D="fulfilled"===T&&P,M=F?"Pending":D?"Won — pay due":"paid_out"===T&&P?"Paid":P?"Won":"Lost",L=F||D?a.warningBg:P?a.successBg:a.errorBg,R=F||D?a.warningText:P?a.successText:a.errorText,I=S&&B>0?`${C}/${f} correct`:f>0?`${f} pick${1!==f?"s":""}`:null,O=S&&B>0?C>0?a.success:a.error:a.textMuted,G=t=>n.get(t)??e.propositions?.find(e=>e.id===t),V=t?t.allowed_propositions&&t.allowed_propositions.length>0&&t.game_name.replace(/\s+\d+\s*$/,"").trim()||t.game_name:`Game #${e.game_id}`,Y=l?function(e,t,n,i,o=Date.now()){const r=n.length,l=ft(e.bet_amount??e.stake),a=gt(e.pending),s=n.map(({answer:e,prop:t})=>!t||null==t.result||t.is_voided?"open":e===t.result?"right":"miss"),c=s.filter(e=>"right"===e).length,d=s.filter(e=>"miss"===e).length,h=Fd(t,r,l,e.expected_correct),u=function(e,t,n){if(n.length)return t-Math.min(...n.map(e=>e.correct));const i=ar(e);return"game_set"===i||"pick_your_dividend"===i?0:"exact"!==(e?.rule??"").trim().toLowerCase()||"selections"!==i&&"rule_setup"!==i&&"quick_pick"!==i?null:0}(t,r,h),f=a&&null!=u&&d>u,g=ft(e.winning),p=br(t,r,l,{expectedCorrect:e.expected_correct})||h[0]?.amount||0,y=!a&&g>0?{label:"Won",amount:g,struck:!1}:p<=0?null:f||!a?{label:"Was",amount:p,struck:!0}:{label:h.length>1?"Pays up to":"Pays",amount:p,struck:!1},m=Pd(n.map(e=>e.prop),o),b=n.filter(({prop:e})=>e?.live&&null==e.result&&!e.is_voided).length;let w;if(i)w=`${i}. ${Td(c,d)}.`;else if(f)w=`${d} ${1===d?"miss":"misses"}, so this entry can no longer win.`;else{const e=[c||d?d?Td(c,d):`${c} right so far`:null,b&&`${b} live now`,m&&`Next result ${mt(m)}`].filter(Boolean);w=e.length?`${e.join(". ")}.`:"No results yet."}return{detail:[Ad(t,r,e.expected_correct),r>0&&`${r} pick${1===r?"":"s"}`,l>0&&`${yt(l)} stake`].filter(Boolean).join(", "),pips:s,pay:y,status:w,dead:f}}(e,t,h.map(e=>({answer:k(e),prop:G(e)})),F?null:M):null,N=w&&/* @__PURE__ */E(W,{style:{flexShrink:0,transform:[{rotate:g?"180deg":"0deg"}]},accessibilityElementsHidden:!0,children:/* @__PURE__ */E(A,{width:18,height:18,viewBox:"0 0 24 24",fill:"none",children:/* @__PURE__ */E(H,{d:"m6 9 6 6 6-6",stroke:a.textMuted,strokeWidth:2.5,strokeLinecap:"round",strokeLinejoin:"round"})})}),X=/* @__PURE__ */U(W,Y?{style:{padding:Bl},children:[
408
+ /* @__PURE__ */E(fi,{style:[Gd.emptyTitle,{color:k.text}],children:"pending"===B?b?"No open entries":"No pending entries":b?"No settled entries":"No completed entries"}),
409
+ /* @__PURE__ */E(fi,{style:[Gd.emptySubtitle,{color:k.textMuted}],children:"pending"===B?"Entries awaiting results will appear here":"Settled entries will appear here"})]}),
410
+ /* @__PURE__ */E(W,{style:Gd.entryList,children:te.map(e=>/* @__PURE__ */E(Ed,{entry:e,game:Q.get(e.game_id),propositionsById:J,onSelect:u,theme:m,renderTeamLogo:p,shelf:b},e.id))})]})}function Ed({entry:e,game:t,propositionsById:n,onSelect:i,theme:o,renderTeamLogo:r,shelf:l=!1}){const a=o.colors,c=Nr(o),h=e.proposition_ids??[],u=s(()=>h.map(e=>n.get(e)).filter(Boolean),[h,n]),f=h.length,[g,p]=d(!1),{hovered:y,pressed:m,handlers:b}=wi(),w=f>0,x=w||!!i,v=s(()=>{const t=/* @__PURE__ */new Map;for(const n of e.propositions??[])t.set(n.id,n);return t},[e.propositions]),k=t=>{const i=e.selections?.[t];return null!=i?i:v.get(t)?.user_prediction??n.get(t)?.user_prediction},B=u.filter(e=>null!=e.result&&!e.is_voided).length,C=u.filter(e=>{if(null==e.result||e.is_voided)return!1;const t=k(e.id);return null!=t&&t===e.result}).length,S=null!=e.selections&&Object.keys(e.selections).length>0||(e.propositions??[]).some(e=>null!=e.user_prediction),F=gt(e.pending),P=!F&&ft(e.winning)>0,T=e.payout_status,D="fulfilled"===T&&P,M=F?"Pending":D?"Won — pay due":"paid_out"===T&&P?"Paid":P?"Won":"Lost",L=F||D?a.warningBg:P?a.successBg:a.errorBg,R=F||D?a.warningText:P?a.successText:a.errorText,I=S&&B>0?`${C}/${f} correct`:f>0?`${f} pick${1!==f?"s":""}`:null,O=S&&B>0?C>0?a.success:a.error:a.textMuted,G=t=>n.get(t)??e.propositions?.find(e=>e.id===t),V=t?t.allowed_propositions&&t.allowed_propositions.length>0&&t.game_name.replace(/\s+\d+\s*$/,"").trim()||t.game_name:`Game #${e.game_id}`,Y=l?function(e,t,n,i,o=Date.now()){const r=n.length,l=ft(e.bet_amount??e.stake),a=gt(e.pending),s=n.map(({answer:e,prop:t})=>!t||null==t.result||t.is_voided?"open":e===t.result?"right":"miss"),c=s.filter(e=>"right"===e).length,d=s.filter(e=>"miss"===e).length,h=Ad(t,r,l,e.expected_correct),u=function(e,t,n){if(n.length)return t-Math.min(...n.map(e=>e.correct));const i=ar(e);return"game_set"===i||"pick_your_dividend"===i?0:"exact"!==(e?.rule??"").trim().toLowerCase()||"selections"!==i&&"rule_setup"!==i&&"quick_pick"!==i?null:0}(t,r,h),f=a&&null!=u&&d>u,g=ft(e.winning),p=br(t,r,l,{expectedCorrect:e.expected_correct})||h[0]?.amount||0,y=!a&&g>0?{label:"Won",amount:g,struck:!1}:p<=0?null:f||!a?{label:"Was",amount:p,struck:!0}:{label:h.length>1?"Pays up to":"Pays",amount:p,struck:!1},m=Td(n.map(e=>e.prop),o),b=n.filter(({prop:e})=>e?.live&&null==e.result&&!e.is_voided).length;let w;if(i)w=`${i}. ${Dd(c,d)}.`;else if(f)w=`${d} ${1===d?"miss":"misses"}, so this entry can no longer win.`;else{const e=[c||d?d?Dd(c,d):`${c} right so far`:null,b&&`${b} live now`,m&&`Next result ${mt(m)}`].filter(Boolean);w=e.length?`${e.join(". ")}.`:"No results yet."}return{detail:[Pd(t,r,e.expected_correct),r>0&&`${r} pick${1===r?"":"s"}`,l>0&&`${yt(l)} stake`].filter(Boolean).join(", "),pips:s,pay:y,status:w,dead:f}}(e,t,h.map(e=>({answer:k(e),prop:G(e)})),F?null:M):null,N=w&&/* @__PURE__ */E(W,{style:{flexShrink:0,transform:[{rotate:g?"180deg":"0deg"}]},accessibilityElementsHidden:!0,children:/* @__PURE__ */E(A,{width:18,height:18,viewBox:"0 0 24 24",fill:"none",children:/* @__PURE__ */E(H,{d:"m6 9 6 6 6-6",stroke:a.textMuted,strokeWidth:2.5,strokeLinecap:"round",strokeLinejoin:"round"})})}),X=/* @__PURE__ */U(W,Y?{style:{padding:Cl},children:[
411
411
  /* @__PURE__ */U(W,{style:{flexDirection:"row",alignItems:"flex-start",gap:12},children:[
412
- /* @__PURE__ */U(W,{style:{flex:1,minWidth:0},children:[/* @__PURE__ */E(fi,{style:{fontSize:16,fontWeight:"800",color:hn(o),fontFamily:c},children:V}),Y.detail?/* @__PURE__ */E(fi,{style:{fontSize:13,fontWeight:"500",color:a.textMuted},children:Y.detail}):null]}),Y.pay&&/* @__PURE__ */U(W,{style:{flexShrink:0,alignItems:"flex-end"},children:[/* @__PURE__ */E(fi,{style:{fontSize:12,fontWeight:"600",color:a.textMuted},children:Y.pay.label}),/* @__PURE__ */E(fi,{style:{fontSize:18,fontWeight:"800",letterSpacing:-.18,fontVariant:["tabular-nums"],color:Y.pay.struck?a.textMuted:hn(o),textDecorationLine:Y.pay.struck?"line-through":"none"},children:yt(Y.pay.amount)})]}),N]}),Y.pips.length>0&&/* @__PURE__ */E(Rl,{theme:o,states:Y.pips,style:{marginTop:12}}),
413
- /* @__PURE__ */E(fi,{style:{marginTop:8,fontSize:13,fontWeight:"600",color:a.text},children:Y.status})]}:{style:Ud.cardHeader,children:[/* @__PURE__ */U(W,{style:Ud.cardHeaderLeft,children:[t?/* @__PURE__ */E(Dd,{iconUrl:$(t),gameName:V,height:18,chipColor:a.primary,textColor:a.text,iconColor:a.primaryText,accentColor:o.brand?.accent}):/* @__PURE__ */E(fi,{style:[Ud.cardGameName,{color:a.text,fontFamily:c}],numberOfLines:1,children:V}),/* @__PURE__ */U(W,{style:Ud.metaRow,children:[(e.created_at||e.entry_date)&&/* @__PURE__ */E(fi,{style:[Ud.metaText,{color:a.textMuted}],children:mt(e.created_at||e.entry_date)}),I&&/* @__PURE__ */U(j,{children:[/* @__PURE__ */E(fi,{style:[Ud.metaDot,{color:a.textMuted}],children:"·"}),/* @__PURE__ */E(fi,{style:[Ud.metaText,{fontWeight:"500",color:O}],children:I})]})]})]}),/* @__PURE__ */U(W,{style:Ud.cardHeaderRight,children:[
414
- /* @__PURE__ */U(W,{style:Ud.amounts,children:[ft(e.bet_amount)>0&&/* @__PURE__ */E(fi,{style:[Ud.betLabel,{color:a.textMuted}],children:yt(ft(e.bet_amount))}),!F&&ft(e.winning)>0&&/* @__PURE__ */U(W,{style:{alignItems:"flex-end"},children:[/* @__PURE__ */E(fi,{style:[Ud.winAmount,{color:a.success}],children:yt(ft(e.winning))}),(e.payout_jackpot??0)>0&&/* @__PURE__ */U(fi,{style:{fontSize:12,fontWeight:"400",color:a.textMuted},children:["incl. ",yt(ft(e.payout_jackpot))," jackpot"]})]})]}),
415
- /* @__PURE__ */E(W,{style:[Ud.statusPill,{borderRadius:sn(o,999),backgroundColor:L}],children:/* @__PURE__ */E(fi,{style:[Ud.statusText,{color:R}],children:M})}),N]})]});/* @__PURE__ */
416
- return U(Ed,{theme:o,shelf:!!Y,dead:Y?.dead,hot:x&&(y||m),pressed:x&&m,children:[/* @__PURE__ */E(z,{...b,testID:"entry-card",onPress:()=>{w&&p(e=>!e),i?.({entry:e,game:t,propositions:u})},activeOpacity:1,disabled:!x,accessibilityLabel:`Entry #${e.id}`,accessibilityState:w?{expanded:g}:void 0,children:X}),g&&f>0&&h.map(e=>{const t=G(e),n=k(e);if(!t)/* @__PURE__ */return U(W,{style:[Ud.propRow,{borderTopColor:a.border,borderTopWidth:1}],children:[/* @__PURE__ */E(W,{style:Ud.propInfo,children:/* @__PURE__ */U(fi,{style:{fontSize:14,color:a.textMuted},children:["Loading proposition #",e,"…"]})}),null!=n&&/* @__PURE__ */E(Mi,{theme:o,size:"sm",value:"yes"===n?"yes":"no"})]},e);const i=t.result,l=null!=i,s=!!t.is_voided,c=l&&!s&&null!=n&&n===i;let d,h,u;s?(d="Void",h=`${a.textMuted}20`,u=a.textMuted):!l&&t.live?(d="Live",h=a.primary,u=a.primaryText):l?c?(d="Won",h=a.successBg,u=a.successText):(d="Lost",h=a.errorBg,u=a.errorText):(d="Pending",h=a.warningBg,u=a.warningText);const f=kt(t)?void 0:t.home_team;/* @__PURE__ */
417
- return U(W,{style:[Ud.propRow,{borderTopColor:a.border,borderTopWidth:1}],children:[
418
- /* @__PURE__ */U(W,{style:Ud.propInfo,children:[(t.home_team||t.away_team)&&/* @__PURE__ */U(W,{style:Ud.teamsRow,children:[r&&f?r(f):null,f?/* @__PURE__ */E(fi,{style:[Ud.teamName,{color:a.text}],children:f}):null,f&&t.away_team?/* @__PURE__ */E(fi,{style:[Ud.vsText,{color:a.textMuted}],children:"vs"}):null,r&&t.away_team?r(t.away_team):null,t.away_team?/* @__PURE__ */E(fi,{style:[Ud.teamName,{color:a.text}],children:t.away_team}):null]}),(t.proposition||t.description)&&/* @__PURE__ */E(fi,{style:{fontSize:12,color:a.textMuted,marginTop:2},children:t.proposition||t.description}),!l&&null!=t.live?.current&&/* @__PURE__ */U(fi,{style:{fontSize:12,fontWeight:"600",color:a.text,marginTop:2,fontVariant:["tabular-nums"]},children:["Now ",t.live.current]}),t.commence_time&&/* @__PURE__ */E(fi,{style:{fontSize:12,color:a.textMuted,marginTop:2},children:mt(t.commence_time)})]}),
419
- /* @__PURE__ */U(W,{style:Ud.outcomeCol,children:[/* @__PURE__ */E(fi,{style:[Ud.outcomeLabel,{color:a.textMuted}],children:"Pick"}),null!=n?/* @__PURE__ */E(Mi,{theme:o,size:"sm",value:"yes"===n?"yes":"no"}):/* @__PURE__ */E(fi,{style:{fontSize:12,color:a.textMuted},children:"—"})]}),
420
- /* @__PURE__ */U(W,{style:Ud.outcomeCol,children:[/* @__PURE__ */E(fi,{style:[Ud.outcomeLabel,{color:a.textMuted}],children:"Result"}),/* @__PURE__ */E(W,{style:{paddingHorizontal:8,paddingVertical:2,borderRadius:sn(o,4),backgroundColor:h},children:/* @__PURE__ */E(fi,{style:{fontSize:12,fontWeight:"700",color:u,textTransform:"uppercase"},children:d})})]})]},e)})]})}function Ed({theme:e,shelf:t,dead:n,hot:i,pressed:o,children:r}){const l=e.colors,a=i?l.primary:l.border;return t?/* @__PURE__ */E(Hl,{theme:e,padded:!1,style:[{overflow:"hidden",borderColor:a,...n?{backgroundColor:l.backgroundAlt}:null},xi(o)],children:r}):/* @__PURE__ */E(W,{style:[Ud.card,xi(o),{borderRadius:sn(e,12),borderColor:a,backgroundColor:kn(e),shadowColor:"#000",shadowOpacity:"dark"===e.colorScheme?.4:.12,shadowRadius:12,shadowOffset:{width:0,height:6},elevation:2}],children:r})}var Ud=B.create({container:{flex:1},errorBanner:{padding:16,borderWidth:1},emptyState:{alignItems:"center",justifyContent:"center",paddingVertical:48,paddingHorizontal:16},emptyTitle:{fontSize:16,fontWeight:"500"},emptySubtitle:{fontSize:14,marginTop:4},entryList:{gap:12},card:{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},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 Gd({style:e}){const{theme:t,bodyFont:n,eventFilterActive:i,eventFilterLabel:o,clearEventFilter:r,gameCategory:l}=yl(),{width:a}=F(),s=a>=640;if(!i)return null;const c=t.colors,d=o??("racing"===l?"This race":"This event");/* @__PURE__ */
421
- return U(W,{style:[Vd.container,s&&Vd.containerWide,{borderRadius:sn(t,12),borderColor:`${c.primary}33`,backgroundColor:c.surface},e],children:[/* @__PURE__ */U(W,{style:Vd.textBlock,children:[
422
- /* @__PURE__ */E(fi,{style:[Vd.kicker,{color:c.primary,fontFamily:n}],children:"Event filter"}),
423
- /* @__PURE__ */E(fi,{style:[Vd.label,{color:c.text,fontFamily:n}],numberOfLines:1,children:d}),
424
- /* @__PURE__ */E(fi,{style:[Vd.hint,{color:c.textMuted,fontFamily:n}],children:"Only propositions from this event are shown."})]}),/* @__PURE__ */E(vi,{theme:t,variant:"quiet",onPress:r,style:[Vd.button,s&&Vd.buttonWide],children:"Show all events"})]})}var Vd=B.create({container:{marginBottom:16,flexDirection:"column",borderWidth:1,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"},buttonWide:{alignSelf:"center"}});function Yd({size:e=22}){const t=ra(yl().theme),n=hn(t),i=Nr(t)??"Manrope, Poppins, sans-serif",o=Math.round(.95*e),r={fontFamily:i,fontSize:e,lineHeight:e,color:n,includeFontPadding:!1};/* @__PURE__ */
412
+ /* @__PURE__ */U(W,{style:{flex:1,minWidth:0},children:[/* @__PURE__ */E(fi,{style:{fontSize:16,fontWeight:"800",color:hn(o),fontFamily:c},children:V}),Y.detail?/* @__PURE__ */E(fi,{style:{fontSize:13,fontWeight:"500",color:a.textMuted},children:Y.detail}):null]}),Y.pay&&/* @__PURE__ */U(W,{style:{flexShrink:0,alignItems:"flex-end"},children:[/* @__PURE__ */E(fi,{style:{fontSize:12,fontWeight:"600",color:a.textMuted},children:Y.pay.label}),/* @__PURE__ */E(fi,{style:{fontSize:18,fontWeight:"800",letterSpacing:-.18,fontVariant:["tabular-nums"],color:Y.pay.struck?a.textMuted:hn(o),textDecorationLine:Y.pay.struck?"line-through":"none"},children:yt(Y.pay.amount)})]}),N]}),Y.pips.length>0&&/* @__PURE__ */E(Il,{theme:o,states:Y.pips,style:{marginTop:12}}),
413
+ /* @__PURE__ */E(fi,{style:{marginTop:8,fontSize:13,fontWeight:"600",color:a.text},children:Y.status})]}:{style:Gd.cardHeader,children:[/* @__PURE__ */U(W,{style:Gd.cardHeaderLeft,children:[t?/* @__PURE__ */E(Hd,{iconUrl:$(t),gameName:V,height:18,chipColor:a.primary,textColor:a.text,iconColor:a.primaryText,accentColor:o.brand?.accent}):/* @__PURE__ */E(fi,{style:[Gd.cardGameName,{color:a.text,fontFamily:c}],numberOfLines:1,children:V}),/* @__PURE__ */U(W,{style:Gd.metaRow,children:[(e.created_at||e.entry_date)&&/* @__PURE__ */E(fi,{style:[Gd.metaText,{color:a.textMuted}],children:mt(e.created_at||e.entry_date)}),I&&/* @__PURE__ */U(j,{children:[/* @__PURE__ */E(fi,{style:[Gd.metaDot,{color:a.textMuted}],children:"·"}),/* @__PURE__ */E(fi,{style:[Gd.metaText,{fontWeight:"500",color:O}],children:I})]})]})]}),/* @__PURE__ */U(W,{style:Gd.cardHeaderRight,children:[
414
+ /* @__PURE__ */U(W,{style:Gd.amounts,children:[ft(e.bet_amount)>0&&/* @__PURE__ */E(fi,{style:[Gd.betLabel,{color:a.textMuted}],children:yt(ft(e.bet_amount))}),!F&&ft(e.winning)>0&&/* @__PURE__ */U(W,{style:{alignItems:"flex-end"},children:[/* @__PURE__ */E(fi,{style:[Gd.winAmount,{color:a.success}],children:yt(ft(e.winning))}),(e.payout_jackpot??0)>0&&/* @__PURE__ */U(fi,{style:{fontSize:12,fontWeight:"400",color:a.textMuted},children:["incl. ",yt(ft(e.payout_jackpot))," jackpot"]})]})]}),
415
+ /* @__PURE__ */E(W,{style:[Gd.statusPill,{borderRadius:sn(o,999),backgroundColor:L}],children:/* @__PURE__ */E(fi,{style:[Gd.statusText,{color:R}],children:M})}),N]})]});/* @__PURE__ */
416
+ return U(Ud,{theme:o,shelf:!!Y,dead:Y?.dead,hot:x&&(y||m),pressed:x&&m,children:[/* @__PURE__ */E(z,{...b,testID:"entry-card",onPress:()=>{w&&p(e=>!e),i?.({entry:e,game:t,propositions:u})},activeOpacity:1,disabled:!x,accessibilityLabel:`Entry #${e.id}`,accessibilityState:w?{expanded:g}:void 0,children:X}),g&&f>0&&h.map(e=>{const t=G(e),n=k(e);if(!t)/* @__PURE__ */return U(W,{style:[Gd.propRow,{borderTopColor:a.border,borderTopWidth:1}],children:[/* @__PURE__ */E(W,{style:Gd.propInfo,children:/* @__PURE__ */U(fi,{style:{fontSize:14,color:a.textMuted},children:["Loading proposition #",e,"…"]})}),null!=n&&/* @__PURE__ */E(Mi,{theme:o,size:"sm",value:"yes"===n?"yes":"no"})]},e);const i=t.result,l=null!=i,s=!!t.is_voided,c=l&&!s&&null!=n&&n===i;let d,h,u;s?(d="Void",h=`${a.textMuted}20`,u=a.textMuted):!l&&t.live?(d="Live",h=a.primary,u=a.primaryText):l?c?(d="Won",h=a.successBg,u=a.successText):(d="Lost",h=a.errorBg,u=a.errorText):(d="Pending",h=a.warningBg,u=a.warningText);const f=kt(t)?void 0:t.home_team;/* @__PURE__ */
417
+ return U(W,{style:[Gd.propRow,{borderTopColor:a.border,borderTopWidth:1}],children:[
418
+ /* @__PURE__ */U(W,{style:Gd.propInfo,children:[(t.home_team||t.away_team)&&/* @__PURE__ */U(W,{style:Gd.teamsRow,children:[r&&f?r(f):null,f?/* @__PURE__ */E(fi,{style:[Gd.teamName,{color:a.text}],children:f}):null,f&&t.away_team?/* @__PURE__ */E(fi,{style:[Gd.vsText,{color:a.textMuted}],children:"vs"}):null,r&&t.away_team?r(t.away_team):null,t.away_team?/* @__PURE__ */E(fi,{style:[Gd.teamName,{color:a.text}],children:t.away_team}):null]}),(t.proposition||t.description)&&/* @__PURE__ */E(fi,{style:{fontSize:12,color:a.textMuted,marginTop:2},children:t.proposition||t.description}),!l&&null!=t.live?.current&&/* @__PURE__ */U(fi,{style:{fontSize:12,fontWeight:"600",color:a.text,marginTop:2,fontVariant:["tabular-nums"]},children:["Now ",t.live.current]}),t.commence_time&&/* @__PURE__ */E(fi,{style:{fontSize:12,color:a.textMuted,marginTop:2},children:mt(t.commence_time)})]}),
419
+ /* @__PURE__ */U(W,{style:Gd.outcomeCol,children:[/* @__PURE__ */E(fi,{style:[Gd.outcomeLabel,{color:a.textMuted}],children:"Pick"}),null!=n?/* @__PURE__ */E(Mi,{theme:o,size:"sm",value:"yes"===n?"yes":"no"}):/* @__PURE__ */E(fi,{style:{fontSize:12,color:a.textMuted},children:"—"})]}),
420
+ /* @__PURE__ */U(W,{style:Gd.outcomeCol,children:[/* @__PURE__ */E(fi,{style:[Gd.outcomeLabel,{color:a.textMuted}],children:"Result"}),/* @__PURE__ */E(W,{style:{paddingHorizontal:8,paddingVertical:2,borderRadius:sn(o,4),backgroundColor:h},children:/* @__PURE__ */E(fi,{style:{fontSize:12,fontWeight:"700",color:u,textTransform:"uppercase"},children:d})})]})]},e)})]})}function Ud({theme:e,shelf:t,dead:n,hot:i,pressed:o,children:r}){const l=e.colors,a=i?l.primary:l.border;return t?/* @__PURE__ */E(Ml,{theme:e,padded:!1,style:[{overflow:"hidden",borderColor:a,...n?{backgroundColor:l.backgroundAlt}:null},xi(o)],children:r}):/* @__PURE__ */E(W,{style:[Gd.card,xi(o),{borderRadius:sn(e,12),borderColor:a,backgroundColor:kn(e),shadowColor:"#000",shadowOpacity:"dark"===e.colorScheme?.4:.12,shadowRadius:12,shadowOffset:{width:0,height:6},elevation:2}],children:r})}var Gd=B.create({container:{flex:1},errorBanner:{padding:16,borderWidth:1},emptyState:{alignItems:"center",justifyContent:"center",paddingVertical:48,paddingHorizontal:16},emptyTitle:{fontSize:16,fontWeight:"500"},emptySubtitle:{fontSize:14,marginTop:4},entryList:{gap:12},card:{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},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 Vd({style:e}){const{theme:t,bodyFont:n,eventFilterActive:i,eventFilterLabel:o,clearEventFilter:r,gameCategory:l}=ml(),{width:a}=F(),s=a>=640;if(!i)return null;const c=t.colors,d=o??("racing"===l?"This race":"This event");/* @__PURE__ */
421
+ return U(W,{style:[Yd.container,s&&Yd.containerWide,{borderRadius:sn(t,12),borderColor:`${c.primary}33`,backgroundColor:c.surface},e],children:[/* @__PURE__ */U(W,{style:Yd.textBlock,children:[
422
+ /* @__PURE__ */E(fi,{style:[Yd.kicker,{color:c.primary,fontFamily:n}],children:"Event filter"}),
423
+ /* @__PURE__ */E(fi,{style:[Yd.label,{color:c.text,fontFamily:n}],numberOfLines:1,children:d}),
424
+ /* @__PURE__ */E(fi,{style:[Yd.hint,{color:c.textMuted,fontFamily:n}],children:"Only propositions from this event are shown."})]}),/* @__PURE__ */E(vi,{theme:t,variant:"quiet",onPress:r,style:[Yd.button,s&&Yd.buttonWide],children:"Show all events"})]})}var Yd=B.create({container:{marginBottom:16,flexDirection:"column",borderWidth:1,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"},buttonWide:{alignSelf:"center"}});function Nd({size:e=22}){const t=la(ml().theme),n=hn(t),i=Nr(t)??"Manrope, Poppins, sans-serif",o=Math.round(.95*e),r={fontFamily:i,fontSize:e,lineHeight:e,color:n,includeFontPadding:!1};/* @__PURE__ */
425
425
  return U(W,{accessible:!0,accessibilityRole:"image",accessibilityLabel:"YESNO Multi",style:{flexDirection:"row",alignItems:"center",gap:.3*e},children:[
426
426
  /* @__PURE__ */U(fi,{style:{...r,letterSpacing:.02*-e},children:[/* @__PURE__ */E(fi,{style:{fontWeight:"800"},children:"YES"}),/* @__PURE__ */E(fi,{style:{fontWeight:"500"},children:"NO"})]}),
427
427
  /* @__PURE__ */U(A,{width:o,height:o,viewBox:"0 0 260 260",children:[
@@ -429,80 +429,80 @@ return U(W,{accessible:!0,accessibilityRole:"image",accessibilityLabel:"YESNO Mu
429
429
  /* @__PURE__ */E(L,{x:40,y:40,width:180,height:180,rx:36,fill:n,opacity:.55}),
430
430
  /* @__PURE__ */E(L,{x:80,y:80,width:180,height:180,rx:36,fill:n,opacity:.3})]}),
431
431
  /* @__PURE__ */E(W,{style:{width:Math.max(1.5,.035*e),height:o,backgroundColor:tn(n,.75)}}),
432
- /* @__PURE__ */U(W,{style:{flexDirection:"row",alignItems:"flex-start",marginLeft:.12*-e},children:[/* @__PURE__ */E(fi,{style:{...r,fontWeight:"500"},children:"Multi"}),/* @__PURE__ */E(fi,{style:{fontFamily:i,fontSize:.4*e,lineHeight:.4*e,fontWeight:"600",color:n,marginLeft:1},children:"®"})]})]})}function Nd(){/* @__PURE__ */
433
- return E(W,{style:{alignItems:"center",marginTop:28,opacity:.6},children:/* @__PURE__ */E(Yd,{size:14})})}function Xd({onBack:e,hideActions:t}={}){const{theme:n,headingFont:i,bodyFont:o,howToPlayMarkdown:r,selectedCategory:l,displayCategoryName:a}=yl(),s=n.colors;/* @__PURE__ */
434
- return E(Cs,{title:"Choose your game",onBack:e,backLabel:l?a(l):void 0,actions:r?.trim()?/* @__PURE__ */E(da,{content:r,title:"How to Play",colors:{text:s.text,textMuted:s.textMuted,border:s.border,background:s.background,backgroundAlt:s.backgroundAlt,primary:s.primary,primaryText:s.primaryText},bodyFont:o,headingFont:i}):null})}function qd({onCancel:e,onSelectGame:t}){const{theme:n,screenSize:i}=yl();return e&&"mobile"!==i?/* @__PURE__ */E(W,{style:[Qd.footer],children:/* @__PURE__ */E(vi,{theme:n,variant:"secondary",size:"lg",onPress:e,children:"Cancel"})}):null}function Kd({gameVariant:t,onSelectGame:n,onGameSetup:i,onRuleSetup:o,onGameSetBet:r,onPickYourDividend:l,onLadder:a,onMirror:s,onSafetyNet:c,onQuickPick:d,onCancel:h,hideTitle:u,hideActions:f,showPerfectPickSetup:g=!1,showTierFilter:p=!1}){const y=yl(),{theme:m,games:b,loading:w,error:x,selectedGame:v,selectedPropositionCount:k,handlePropositionCountChange:B,maxPayouts:C}=y;m.colors;const S=e.useRef(v);S.current=v;const{width:z}=F(),A=z>=640,P="toolbar"===oi().pageHeader.layout;/* @__PURE__ */
435
- return U(W,{style:Qd.container,children:[!u&&/* @__PURE__ */E(W,{style:{marginBottom:P?Al:A?24:16},children:/* @__PURE__ */E(Xd,{onBack:h,hideActions:f})}),
436
- /* @__PURE__ */E(Gd,{}),
437
- /* @__PURE__ */E(W,{style:Qd.content,children:/* @__PURE__ */E(sc,{uiVariant:y.uiVariant,gameVariant:t??y.gameVariant,onBack:h,games:b,selectedGame:v,onSelectGame:e=>{S.current=e,y.selectGame(e)},loading:w,error:x,theme:m,showTierFilter:p,selectedPropositionCount:k,onPropositionCountChange:B,onPropositionCountSelected:()=>{const e=S.current;if("rule_setup"===y.getGameFlow(e)&&cr(e)&&!g)return y.goToSportSelection(),void n?.();const t=y.getGameFlow(e);if("quick_pick"===t||"selections"===t)return y.goToSportSelection(),void n?.();i?i(t):({game_set:r,pick_your_dividend:l,ladder:a,mirror:s,safety_net:c,rule_setup:o}[t]??o)?.()},onQuickPickGame:(e,t)=>{y.quickPickGame(e,t),d?.()},maxPayouts:C})}),
438
- /* @__PURE__ */E(Nd,{})]})}var Qd=B.create({container:{flex:1},content:{flex:1},footer:{flexDirection:"row",alignItems:"center",paddingTop:16}});function Jd(){const{selectedGame:e,showCorrelationDebug:t,correlation:n,correlationTargetCount:i,theme:o}=yl();if(!t||!xr(e))return null;const r=Br(n,i);/* @__PURE__ */
439
- return E(fi,{testID:"correlation-debug",style:{color:o.colors.textMuted,fontSize:12,marginBottom:12},children:r})}var Zd="yesno:favourite-sport",$d=null;function _d(){try{return globalThis.localStorage??null}catch{return null}}function eh({theme:e,active:t,disabled:n,style:i,...o}){const r=e.colors,{hovered:l,pressed:a,handlers:s}=wi(),c=t?null:ai(r.primary,{hovered:l,pressed:a,disabled:!!n});/* @__PURE__ */
440
- return E(z,{...o,...s,disabled:n,activeOpacity:1,style:[nh.seg,{borderRadius:sn(e,999),borderColor:c?.borderColor??"transparent",backgroundColor:t?r.primary:c?.background??"transparent",opacity:n?.45:1},xi(a,!!n),i]})}function th({label:t="Pick your sport",sublabel:n,actions:i,style:o}){const{theme:r,sportOptions:l,sportSummaries:a,selectedSport:s,setSelectedSport:c,sportBaseKey:d,displaySportName:h,selections:u,clearSelections:f,enableSportFavourites:g}=yl(),p=ra(r),y=p.colors,m=oi(),b=Yr(p),w=Nr(p),x=hn(p),v=bn(p),[k,B]=e.useState(null);e.useEffect(()=>{B(g?function(){try{const e=_d()?.getItem(Zd);if(e)return e}catch{}return $d}():null)},[g]);const C=e.useRef({key:"",at:0}),[S,z]=e.useState({room:0,names:0,codes:0}),F=e=>t=>{const n=t.nativeEvent.layout.width;z(t=>t[e]===n?t:{...t,[e]:n})},A=S.room>0&&S.names>0&&S.codes>0,P=!t&&void 0!==n&&!n,T=!A||S.names<=S.room+1?"names":S.codes<=S.room+1||P?"codes":"wrap";if(l.length<2)return i?/* @__PURE__ */E(W,{style:[nh.wrap,{flexDirection:"row",justifyContent:"flex-end",paddingBottom:10},o],children:i}):null;const D=k?[...l].sort((e,t)=>Number(t.key===k)-Number(e.key===k)):l,H=void 0===n?g?"Tap to select. Double tap to pin up front.":"Tap to select.":n,M=Object.keys(u).length>0,L=y.backgroundAlt??y.background??"#fff",R=e=>{const t=Date.now(),n=g&&C.current.key===e&&t-C.current.at<320;C.current=n?{key:"",at:0}:{key:e,at:t},n?(e=>{const t=k===e?null:e;B(t),function(e){$d=e;try{e?_d()?.setItem(Zd,e):_d()?.removeItem(Zd)}catch{}}(t)})(e):M||e===s||c(e)},I="wrap"===T,O=e=>D.map(({key:t})=>{const n=a.find(e=>e.key===t)?.games_today??0,i=s===t,o=k===t,{code:r,name:l}=et(t,h(t),d),c=i||"names"===(e??T);/* @__PURE__ */
441
- return U(eh,{theme:p,active:i,accessibilityRole:"button",focusable:!e,accessibilityLabel:`${l} button`,accessibilityState:{selected:i},disabled:M&&!i,onPress:()=>R(t),children:[n>0&&/* @__PURE__ */E(W,{style:[nh.dot,{backgroundColor:i?v:y.success}]}),
442
- /* @__PURE__ */E(fi,{numberOfLines:1,style:[nh.segText,{color:i?y.primaryText:y.text,fontFamily:w}],children:c?l:r}),o&&/* @__PURE__ */E(W,{style:nh.pin,children:/* @__PURE__ */E(ma,{size:11,filled:!0,color:i?y.primaryText:v})})]},t)}),G=/* @__PURE__ */E(j,{children:/* @__PURE__ */U(W,{style:nh.headRow,children:[/* @__PURE__ */U(W,{style:nh.headText,children:[t?/* @__PURE__ */E(fi,{style:[nh.label,{color:x,fontFamily:w}],children:t}):null,M?/* @__PURE__ */U(W,{style:nh.lockRow,children:[/* @__PURE__ */E(fi,{style:[nh.hint,{color:y.textMuted,fontFamily:b,marginBottom:0}],children:dl}),/* @__PURE__ */E(vi,{theme:p,variant:"quiet",onPress:f,children:Kr})]}):H?/* @__PURE__ */E(fi,{style:[nh.hint,{color:y.textMuted,fontFamily:b}],children:H}):null]}),i?/* @__PURE__ */E(W,{style:{flexShrink:0,paddingBottom:10},children:i}):null]})}),V=/* @__PURE__ */U(j,{children:[t?/* @__PURE__ */E(fi,{style:[nh.label,{color:x,fontFamily:w}],children:t}):null,M||H||i?/* @__PURE__ */U(W,{style:nh.lockRow,children:[
443
- /* @__PURE__ */E(fi,{style:[nh.hint,{flexShrink:1,color:y.textMuted,fontFamily:b,marginBottom:0,paddingLeft:0}],children:M||!H?dl:H}),M?/* @__PURE__ */E(vi,{theme:p,variant:"quiet",onPress:f,children:Kr}):null,i?/* @__PURE__ */E(W,{style:{marginLeft:"auto",flexShrink:0},children:i}):null]}):null]});if("chips"===m.sportRail){const e="button"===m.matchRail.fill?y.buttonPrimaryText:y.primaryText,t=D.map(({key:t})=>{const{code:n,name:i}=et(t,h(t),d),o=(a.find(e=>e.key===t)?.games_today??0)>0;return{key:t,label:n,fullLabel:i,accessibilityLabel:`${i} button`,disabled:M&&s!==t,leading:o?e=>/* @__PURE__ */E(W,{style:[nh.dot,{backgroundColor:e?v:y.success}]}):void 0,trailing:k===t?t=>/* @__PURE__ */E(ma,{size:11,filled:!0,color:t?e:v}):void 0}});/* @__PURE__ */
444
- return U(W,{style:[nh.wrap,o],children:[V,/* @__PURE__ */E($c,{theme:p,items:t,activeKey:s??void 0,onSelect:R,noun:"sport",groupLabel:"Choose a sport"})]})}/* @__PURE__ */
445
- return U(W,{style:[nh.wrap,o],children:[P?null:G,
446
- /* @__PURE__ */U(W,{style:P?nh.oneRow:void 0,children:[/* @__PURE__ */E(W,{style:[nh.track,P&&nh.trackInRow,{borderRadius:sn(p,I?22:999),backgroundColor:L,borderColor:y.border}],children:/* @__PURE__ */U(W,{onLayout:F("room"),style:[nh.box,{opacity:A?1:0}],children:[/* @__PURE__ */U(W,{pointerEvents:"none","aria-hidden":!0,accessibilityElementsHidden:!0,importantForAccessibility:"no-hide-descendants",style:nh.copies,children:[/* @__PURE__ */E(W,{onLayout:F("names"),style:nh.copy,children:O("names")}),/* @__PURE__ */E(W,{onLayout:F("codes"),style:nh.copy,children:O("codes")})]}),I?/* @__PURE__ */E(W,{style:nh.wrappedShelf,children:O()}):/* @__PURE__ */E(ba,{theme:p,hideArrows:!0,contentContainerStyle:nh.shelf,children:O()})]})}),P&&i?/* @__PURE__ */E(W,{style:{flexShrink:0},children:i}):null]}),P&&M?/* @__PURE__ */E(fi,{style:[nh.hint,{color:y.textMuted,fontFamily:b,marginTop:6,marginBottom:0}],children:dl}):null]})}var nh=B.create({wrap:{minWidth:0},headRow:{flexDirection:"row",flexWrap:"wrap",alignItems:"flex-start",justifyContent:"space-between",columnGap:8,rowGap:4},headText:{minWidth:0,maxWidth:"100%",flexShrink:0},label:{paddingLeft:2,fontSize:14,fontWeight:"800",letterSpacing:-.2},hint:{paddingLeft:2,marginBottom:6,fontSize:12,lineHeight:16},lockRow:{flexDirection:"row",alignItems:"center",gap:8,paddingLeft:2,marginBottom:6},track:{borderWidth:1,padding:5},oneRow:{flexDirection:"row",alignItems:"center",gap:8},trackInRow:{flex:1,minWidth:0},shelf:{gap:2,paddingHorizontal:0,paddingVertical:0,flexGrow:1},box:{overflow:"hidden"},copies:{position:"absolute",left:0,top:0,width:2e3,opacity:0},copy:{flexDirection:"row",alignSelf:"flex-start",gap:2},wrappedShelf:{flexDirection:"row",flexWrap:"wrap",alignItems:"center",gap:4},seg:{flexDirection:"row",alignItems:"center",justifyContent:"center",flexGrow:1,flexShrink:0,paddingHorizontal:13,paddingVertical:9,borderWidth:1},segText:{fontSize:13,fontWeight:"800",letterSpacing:-.2},dot:{width:6,height:6,borderRadius:3,marginRight:6},pin:{marginLeft:6}});function ih({onBack:e,hideActions:t}={}){const n="toolbar"===oi().pageHeader.layout;/* @__PURE__ */
447
- return E(Cs,{title:"Pick a category",onBack:e,backLabel:n?"YESNO":void 0})}function oh({onCancel:e}){const{theme:t,screenSize:n}=yl();return e&&"mobile"!==n?/* @__PURE__ */E(W,{style:lh.footer,children:/* @__PURE__ */E(vi,{theme:t,variant:"secondary",size:"lg",onPress:e,children:"Cancel"})}):null}function rh({onSelectCategory:t,onCancel:n,hideTitle:i,hideActions:o,renderCategoryIcon:r,getCategoryTagline:l}){const a=le(),{theme:s,availableCategories:c,loading:d,setSelectedCategory:h,setSelectedSport:u,clearSelectedGame:f,displayCategoryName:g,uiVariant:p}=yl(),m=s.colors,b=kn(s),w=Yr(s),x="toolbar"===oi().pageHeader.layout?{marginBottom:Al}:lh.titleWrap,{width:v}=F(),k=v>=640,B=v>=400,[C,S]=e.useState(0),z=k?12:10,A="shelf"===p?Math.max(1,Math.floor((C+Ja)/312)):B?2:1,P=A>1?C>0?(C-z*(A-1))/A:Math.floor(100/A)-2+"%":"100%";/* @__PURE__ */
448
- return U(W,d?{style:lh.container,children:[!i&&/* @__PURE__ */E(W,{style:x,children:/* @__PURE__ */E(ih,{onBack:n,hideActions:o})}),/* @__PURE__ */E(W,{style:lh.content,children:/* @__PURE__ */E(Ld,{theme:s,layout:"shelf"===p?"shelf":"kit",categories:c})})]}:{style:lh.container,children:[!i&&/* @__PURE__ */E(W,{style:x,children:/* @__PURE__ */E(ih,{onBack:n,hideActions:o})}),
449
- /* @__PURE__ */E(W,{style:lh.content,children:/* @__PURE__ */E(W,"shelf"===p?{style:{flexDirection:"row",flexWrap:"wrap",gap:Ja},onLayout:e=>S(e.nativeEvent.layout.width),children:c.map(e=>{const{ground:n,ink:i,art:o,drawn:r}=$a(e,s,a),c=l?.(e)??nt(e);/* @__PURE__ */
450
- return U(Ol,{ring:m.primary,radius:sn(s,16),onPress:()=>{h(e),u(null),f(),t?.(e)},style:{width:A>1&&C>0?(C-Ja*(A-1))/A:"100%",height:116,padding:16,borderRadius:sn(s,16),overflow:"hidden",backgroundColor:n??m.infoBg,justifyContent:"space-between",alignItems:"flex-start"},children:[r?/* @__PURE__ */E(Il,{drawn:r,frame:{right:16,top:12,size:92}}):o?/* @__PURE__ */E(y,{accessible:!1,source:{uri:o},resizeMode:"cover",style:{position:"absolute",top:0,right:0,bottom:0,width:150}}):null,
451
- /* @__PURE__ */E(fi,{style:{marginRight:134,fontFamily:w,fontSize:26,fontWeight:"800",letterSpacing:-1.2,lineHeight:29,color:i},children:g(e)}),c?/* @__PURE__ */E(fi,{style:{overflow:"hidden",paddingHorizontal:8,paddingVertical:3,borderRadius:sn(s,8),backgroundColor:"#ffffffde",color:i,fontFamily:w,fontSize:12,fontWeight:"700"},children:c}):null]},e)})}:{style:[lh.grid,k&&lh.gridWide],onLayout:e=>S(e.nativeEvent.layout.width),children:c.map(e=>{const n=l?.(e)??nt(e);/* @__PURE__ */
452
- return U(Bi,{theme:s,onPress:()=>{h(e),u(null),f(),t?.(e)},style:[lh.card,k&&lh.cardWide,{width:P,borderRadius:sn(s,16),backgroundColor:b}],children:[/* @__PURE__ */E(pa,{label:g(e),category:e,icon:r?.(e),theme:s}),n?/* @__PURE__ */E(fi,{style:[lh.tagline,k&&lh.taglineWide,{color:m.primary,fontFamily:w}],children:n}):null]},e)})})}),
453
- /* @__PURE__ */E(Nd,{})]})}var lh=B.create({container:{flex:1},centered:{flex:1,flexDirection:"row",justifyContent:"center",alignItems:"center",padding:32},titleWrap:{marginBottom:8},content:{flex:1},grid:{flexDirection:"row",flexWrap:"wrap",gap:10},gridWide:{gap:12},card:{alignItems:"flex-start",justifyContent:"center",gap:8,minHeight:112,borderWidth:1,padding:14},cardWide:{gap:12,minHeight:140,padding:20},tagline:{fontSize:10,fontWeight:"500",textTransform:"uppercase",letterSpacing:.8},taglineWide:{fontSize:12,letterSpacing:1.2},footer:{flexDirection:"row",alignItems:"center",paddingTop:16}});function ah(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 sh({name:e,renderTeamLogo:t,muted:n,headingFont:i,ink:o,wide:r}){if(!e)/* @__PURE__ */return E(fi,{style:[dh.teamName,{color:n,fontFamily:i}],children:"TBC"});const l=t?.(e);/* @__PURE__ */
454
- return U(W,{style:dh.teamMark,children:[null!=l?/* @__PURE__ */E(W,{style:dh.teamLogo,children:l}):null,/* @__PURE__ */E(fi,{style:[dh.teamName,r&&dh.teamNameWide,{color:o,fontFamily:i}],children:e})]})}function ch({onSelectEvent:t}){const{theme:n,loading:i,sameGameMultiEvents:o,selectSameGameMultiEvent:r,renderTeamLogo:l,displaySportName:a}=yl(),s=n.colors,c=ra(n),d=Yr(n),h=Nr(n),u=kn(n),f=Bn(n),{width:g}=F(),p=g>=640,[y,m]=e.useState(null);return i?/* @__PURE__ */E(W,{style:dh.container,children:/* @__PURE__ */E(Id,{theme:n})}):/* @__PURE__ */U(W,{style:dh.container,accessibilityLabel:"Available fixtures",children:[/* @__PURE__ */E(fi,{style:[dh.intro,{color:c.colors.textMuted,fontFamily:d}],children:"All picks in your multi must come from one game."}),0===o.length?/* @__PURE__ */E(W,{accessibilityRole:"text",accessibilityLiveRegion:"polite",style:[dh.emptyState,{borderRadius:sn(n,16),borderColor:s.border,backgroundColor:u}],children:/* @__PURE__ */E(fi,{style:[dh.emptyText,{color:s.textMuted,fontFamily:d}],children:"No fixtures with available propositions."})}):/* @__PURE__ */E(W,{style:[dh.list,p&&dh.listWide],children:o.map(e=>/* @__PURE__ */U(Bi,{theme:n,lit:y===e.id,accessibilityLabel:`Select ${ye(e)}`,onPress:()=>{r(e.id),t?.(e.id)},onFocus:()=>m(e.id),onBlur:()=>m(t=>t===e.id?null:t),style:[dh.card,p&&dh.cardWide,{borderRadius:sn(n,16),backgroundColor:u}],children:[/* @__PURE__ */U(W,{style:dh.cardMain,children:[/* @__PURE__ */U(W,{style:[dh.matchup,p&&dh.matchupWide,{borderRadius:sn(n,12),backgroundColor:f}],children:[
455
- /* @__PURE__ */E(sh,{name:e.homeTeam,renderTeamLogo:l,muted:s.textMuted,headingFont:h,ink:s.text,wide:p}),
456
- /* @__PURE__ */E(fi,{style:[dh.vs,{color:s.textMuted,fontFamily:h}],children:"vs"}),
457
- /* @__PURE__ */E(sh,{name:e.awayTeam,renderTeamLogo:l,muted:s.textMuted,headingFont:h,ink:s.text,wide:p})]}),/* @__PURE__ */U(fi,{style:[dh.meta,p&&dh.metaWide,{color:s.textMuted,fontFamily:d}],children:[ah(e.commenceTime)," · ",e.propositionCount," proposition",1===e.propositionCount?"":"s",e.league||e.sport?` · ${e.league?.toUpperCase()??a(e.sport)}`:""]})]}),/* @__PURE__ */E(W,{style:{flexShrink:0},children:/* @__PURE__ */E(fa,{size:22,color:s.textMuted})})]},e.id))})]})}var dh=B.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,padding:24,alignItems:"center"},emptyText:{fontSize:14,textAlign:"center"},list:{gap:10},listWide:{gap:12},card:{minHeight:64,width:"100%",flexDirection:"row",alignItems:"center",justifyContent:"space-between",gap:12,borderWidth:1,paddingHorizontal:14,paddingVertical:14},cardWide:{paddingHorizontal:20,paddingVertical:16},cardMain:{flex:1,minWidth:0},matchup:{flexDirection:"column",alignItems:"flex-start",gap:4,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 hh({onBack:e,onNext:t,hideActions:n}={}){const{theme:i,headingFont:o,bodyFont:r,selectedGame:l,propositions:a,uiVariant:s,selectedPropositionCount:c,disableQuickPick:d,answeredCount:h,goToConfirmation:u,quickPickSelections:f,upgradePropositionCount:g,selectedEventId:p,sameGameMultiEvents:y,selectSameGameMultiEvent:m,selectedRule:b,howToPlayMarkdown:w,maxPayouts:x,correlationTargetCount:v}=yl(),k=i.colors,B=ht(l),C=La(l??{},l?x?.[l.id]:void 0),S=be(l)&&!p,z=y.find(e=>e.id===p),W=l?Wt(l,c,b):{min:0,max:0},F=xr(l)?v:W.min,A=xr(l)?v:be(l)&&p?Math.min(W.max,a.length):W.max,P=F>0&&F===A,T=!!(l?.allowed_propositions&&l.allowed_propositions.length>0),D=ur(l,c),H=!fr(l)&&!T&&F>0&&A>F,M=D??(P?A:A||a.length),L=(e,n="fill")=>{const i=e??M;return null==e||H||g(e),!(f(i,n)<i||(ri(s)||(u(),t?.()),0))},R=!xr(l)&&!d&&a.length>0,I=gr(l,b,a.length),O=h>0?h:F||M,j=pr(I,h,M,O),U=l?z?ye(z):l.game_name:void 0,G="inline"===ii(s).pageHeader.layout;return qn(s)?/* @__PURE__ */E(Ps,{onBack:p?()=>m(null):e}):/* @__PURE__ */E(Cs,{title:S?"Choose a Game":G&&U?U:"playbook"===s?"Make your calls":"call"===s||"shelf"===s?"Choose your picks":"Select Propositions",onBack:l?p?()=>m(null):e:void 0,backLabel:U,actions:R?"menu"===j.kind?/* @__PURE__ */E(ls,{counts:j.counts,current:h,hint:j.hint,onPick:e=>L(e),onDoubleAction:j.counts.length?()=>L(O):void 0,onFill:j.fillLabel?()=>L():void 0,fillLabel:j.fillLabel,onRandomise:j.randomise?()=>L(j.randomise.count,"replace"):void 0,randomiseLabel:j.randomise?.label,colors:k,menuShadow:dn(i),theme:i}):/* @__PURE__ */E(ns,{hint:j.hint,onPress:()=>L(void 0,j.mode)}):null,children:l&&(B||w?.trim())?/* @__PURE__ */E(da,{variant:"icon",content:w,panel:B,theme:i,title:`${l.game_name} — How to Play`,extra:/* @__PURE__ */E(hs,{tiers:C.hasGenericDividends?C.tiers:[],modes:C.modes,pydDividends:C.pydDividends,minBet:C.minBet,maxBet:C.maxBet,colors:k,bodyFont:r,headingFont:o,theme:i}),colors:{text:k.text,textMuted:k.textMuted,border:k.border,background:k.background,backgroundAlt:k.backgroundAlt,primary:k.primary,primaryText:k.primaryText},bodyFont:r,headingFont:o}):null})}function uh({number:e,color:t,size:n=34,label:i,selected:o,onSelect:r}){const l=(e,i)=>({position:"absolute",left:e,top:.4*e,width:n,height:n,borderRadius:.26*n,backgroundColor:t,opacity:i});/* @__PURE__ */
432
+ /* @__PURE__ */U(W,{style:{flexDirection:"row",alignItems:"flex-start",marginLeft:.12*-e},children:[/* @__PURE__ */E(fi,{style:{...r,fontWeight:"500"},children:"Multi"}),/* @__PURE__ */E(fi,{style:{fontFamily:i,fontSize:.4*e,lineHeight:.4*e,fontWeight:"600",color:n,marginLeft:1},children:"®"})]})]})}function Xd(){/* @__PURE__ */
433
+ return E(W,{style:{alignItems:"center",marginTop:28,opacity:.6},children:/* @__PURE__ */E(Nd,{size:14})})}function qd({onBack:e,hideActions:t}={}){const{theme:n,headingFont:i,bodyFont:o,howToPlayMarkdown:r,selectedCategory:l,displayCategoryName:a}=ml(),s=n.colors;/* @__PURE__ */
434
+ return E(Ss,{title:"Choose your game",onBack:e,backLabel:l?a(l):void 0,actions:r?.trim()?/* @__PURE__ */E(ha,{content:r,title:"How to Play",colors:{text:s.text,textMuted:s.textMuted,border:s.border,background:s.background,backgroundAlt:s.backgroundAlt,primary:s.primary,primaryText:s.primaryText},bodyFont:o,headingFont:i}):null})}function Kd({onCancel:e,onSelectGame:t}){const{theme:n,screenSize:i}=ml();return e&&"mobile"!==i?/* @__PURE__ */E(W,{style:[Jd.footer],children:/* @__PURE__ */E(vi,{theme:n,variant:"secondary",size:"lg",onPress:e,children:"Cancel"})}):null}function Qd({gameVariant:t,onSelectGame:n,onGameSetup:i,onRuleSetup:o,onGameSetBet:r,onPickYourDividend:l,onLadder:a,onMirror:s,onSafetyNet:c,onQuickPick:d,onCancel:h,hideTitle:u,hideActions:f,showPerfectPickSetup:g=!1,showTierFilter:p=!1}){const y=ml(),{theme:m,games:b,loading:w,error:x,selectedGame:v,selectedPropositionCount:k,handlePropositionCountChange:B,maxPayouts:C}=y;m.colors;const S=e.useRef(v);S.current=v;const{width:z}=F(),A=z>=640,P="toolbar"===oi().pageHeader.layout;/* @__PURE__ */
435
+ return U(W,{style:Jd.container,children:[!u&&/* @__PURE__ */E(W,{style:{marginBottom:P?Pl:A?24:16},children:/* @__PURE__ */E(qd,{onBack:h,hideActions:f})}),
436
+ /* @__PURE__ */E(Vd,{}),
437
+ /* @__PURE__ */E(W,{style:Jd.content,children:/* @__PURE__ */E(cc,{uiVariant:y.uiVariant,gameVariant:t??y.gameVariant,onBack:h,games:b,selectedGame:v,onSelectGame:e=>{S.current=e,y.selectGame(e)},loading:w,error:x,theme:m,showTierFilter:p,selectedPropositionCount:k,onPropositionCountChange:B,onPropositionCountSelected:()=>{const e=S.current;if("rule_setup"===y.getGameFlow(e)&&cr(e)&&!g)return y.goToSportSelection(),void n?.();const t=y.getGameFlow(e);if("quick_pick"===t||"selections"===t)return y.goToSportSelection(),void n?.();i?i(t):({game_set:r,pick_your_dividend:l,ladder:a,mirror:s,safety_net:c,rule_setup:o}[t]??o)?.()},onQuickPickGame:(e,t)=>{y.quickPickGame(e,t),d?.()},maxPayouts:C})}),
438
+ /* @__PURE__ */E(Xd,{})]})}var Jd=B.create({container:{flex:1},content:{flex:1},footer:{flexDirection:"row",alignItems:"center",paddingTop:16}});function Zd(){const{selectedGame:e,showCorrelationDebug:t,correlation:n,correlationTargetCount:i,theme:o}=ml();if(!t||!xr(e))return null;const r=Br(n,i);/* @__PURE__ */
439
+ return E(fi,{testID:"correlation-debug",style:{color:o.colors.textMuted,fontSize:12,marginBottom:12},children:r})}var $d="yesno:favourite-sport",_d=null;function eh(){try{return globalThis.localStorage??null}catch{return null}}function th({theme:e,active:t,disabled:n,style:i,...o}){const r=e.colors,{hovered:l,pressed:a,handlers:s}=wi(),c=t?null:ai(r.primary,{hovered:l,pressed:a,disabled:!!n});/* @__PURE__ */
440
+ return E(z,{...o,...s,disabled:n,activeOpacity:1,style:[ih.seg,{borderRadius:sn(e,999),borderColor:c?.borderColor??"transparent",backgroundColor:t?r.primary:c?.background??"transparent",opacity:n?.45:1},xi(a,!!n),i]})}function nh({label:t="Pick your sport",sublabel:n,actions:i,style:o}){const{theme:r,sportOptions:l,sportSummaries:a,selectedSport:s,setSelectedSport:c,sportBaseKey:d,displaySportName:h,selections:u,clearSelections:f,enableSportFavourites:g}=ml(),p=la(r),y=p.colors,m=oi(),b=Yr(p),w=Nr(p),x=hn(p),v=bn(p),[k,B]=e.useState(null);e.useEffect(()=>{B(g?function(){try{const e=eh()?.getItem($d);if(e)return e}catch{}return _d}():null)},[g]);const C=e.useRef({key:"",at:0}),[S,z]=e.useState({room:0,names:0,codes:0}),F=e=>t=>{const n=t.nativeEvent.layout.width;z(t=>t[e]===n?t:{...t,[e]:n})},A=S.room>0&&S.names>0&&S.codes>0,P=!t&&void 0!==n&&!n,T=!A||S.names<=S.room+1?"names":S.codes<=S.room+1||P?"codes":"wrap";if(l.length<2)return i?/* @__PURE__ */E(W,{style:[ih.wrap,{flexDirection:"row",justifyContent:"flex-end",paddingBottom:10},o],children:i}):null;const D=k?[...l].sort((e,t)=>Number(t.key===k)-Number(e.key===k)):l,H=void 0===n?g?"Tap to select. Double tap to pin up front.":"Tap to select.":n,M=Object.keys(u).length>0,L=y.backgroundAlt??y.background??"#fff",R=e=>{const t=Date.now(),n=g&&C.current.key===e&&t-C.current.at<320;C.current=n?{key:"",at:0}:{key:e,at:t},n?(e=>{const t=k===e?null:e;B(t),function(e){_d=e;try{e?eh()?.setItem($d,e):eh()?.removeItem($d)}catch{}}(t)})(e):M||e===s||c(e)},I="wrap"===T,O=e=>D.map(({key:t})=>{const n=a.find(e=>e.key===t)?.games_today??0,i=s===t,o=k===t,{code:r,name:l}=et(t,h(t),d),c=i||"names"===(e??T);/* @__PURE__ */
441
+ return U(th,{theme:p,active:i,accessibilityRole:"button",focusable:!e,accessibilityLabel:`${l} button`,accessibilityState:{selected:i},disabled:M&&!i,onPress:()=>R(t),children:[n>0&&/* @__PURE__ */E(W,{style:[ih.dot,{backgroundColor:i?v:y.success}]}),
442
+ /* @__PURE__ */E(fi,{numberOfLines:1,style:[ih.segText,{color:i?y.primaryText:y.text,fontFamily:w}],children:c?l:r}),o&&/* @__PURE__ */E(W,{style:ih.pin,children:/* @__PURE__ */E(ba,{size:11,filled:!0,color:i?y.primaryText:v})})]},t)}),G=/* @__PURE__ */E(j,{children:/* @__PURE__ */U(W,{style:ih.headRow,children:[/* @__PURE__ */U(W,{style:ih.headText,children:[t?/* @__PURE__ */E(fi,{style:[ih.label,{color:x,fontFamily:w}],children:t}):null,M?/* @__PURE__ */U(W,{style:ih.lockRow,children:[/* @__PURE__ */E(fi,{style:[ih.hint,{color:y.textMuted,fontFamily:b,marginBottom:0}],children:hl}),/* @__PURE__ */E(vi,{theme:p,variant:"quiet",onPress:f,children:Qr})]}):H?/* @__PURE__ */E(fi,{style:[ih.hint,{color:y.textMuted,fontFamily:b}],children:H}):null]}),i?/* @__PURE__ */E(W,{style:{flexShrink:0,paddingBottom:10},children:i}):null]})}),V=/* @__PURE__ */U(j,{children:[t?/* @__PURE__ */E(fi,{style:[ih.label,{color:x,fontFamily:w}],children:t}):null,M||H||i?/* @__PURE__ */U(W,{style:ih.lockRow,children:[
443
+ /* @__PURE__ */E(fi,{style:[ih.hint,{flexShrink:1,color:y.textMuted,fontFamily:b,marginBottom:0,paddingLeft:0}],children:M||!H?hl:H}),M?/* @__PURE__ */E(vi,{theme:p,variant:"quiet",onPress:f,children:Qr}):null,i?/* @__PURE__ */E(W,{style:{marginLeft:"auto",flexShrink:0},children:i}):null]}):null]});if("chips"===m.sportRail){const e="button"===m.matchRail.fill?y.buttonPrimaryText:y.primaryText,t=D.map(({key:t})=>{const{code:n,name:i}=et(t,h(t),d),o=(a.find(e=>e.key===t)?.games_today??0)>0;return{key:t,label:n,fullLabel:i,accessibilityLabel:`${i} button`,disabled:M&&s!==t,leading:o?e=>/* @__PURE__ */E(W,{style:[ih.dot,{backgroundColor:e?v:y.success}]}):void 0,trailing:k===t?t=>/* @__PURE__ */E(ba,{size:11,filled:!0,color:t?e:v}):void 0}});/* @__PURE__ */
444
+ return U(W,{style:[ih.wrap,o],children:[V,/* @__PURE__ */E(_c,{theme:p,items:t,activeKey:s??void 0,onSelect:R,noun:"sport",groupLabel:"Choose a sport"})]})}/* @__PURE__ */
445
+ return U(W,{style:[ih.wrap,o],children:[P?null:G,
446
+ /* @__PURE__ */U(W,{style:P?ih.oneRow:void 0,children:[/* @__PURE__ */E(W,{style:[ih.track,P&&ih.trackInRow,{borderRadius:sn(p,I?22:999),backgroundColor:L,borderColor:y.border}],children:/* @__PURE__ */U(W,{onLayout:F("room"),style:[ih.box,{opacity:A?1:0}],children:[/* @__PURE__ */U(W,{pointerEvents:"none","aria-hidden":!0,accessibilityElementsHidden:!0,importantForAccessibility:"no-hide-descendants",style:ih.copies,children:[/* @__PURE__ */E(W,{onLayout:F("names"),style:ih.copy,children:O("names")}),/* @__PURE__ */E(W,{onLayout:F("codes"),style:ih.copy,children:O("codes")})]}),I?/* @__PURE__ */E(W,{style:ih.wrappedShelf,children:O()}):/* @__PURE__ */E(wa,{theme:p,hideArrows:!0,contentContainerStyle:ih.shelf,children:O()})]})}),P&&i?/* @__PURE__ */E(W,{style:{flexShrink:0},children:i}):null]}),P&&M?/* @__PURE__ */E(fi,{style:[ih.hint,{color:y.textMuted,fontFamily:b,marginTop:6,marginBottom:0}],children:hl}):null]})}var ih=B.create({wrap:{minWidth:0},headRow:{flexDirection:"row",flexWrap:"wrap",alignItems:"flex-start",justifyContent:"space-between",columnGap:8,rowGap:4},headText:{minWidth:0,maxWidth:"100%",flexShrink:0},label:{paddingLeft:2,fontSize:14,fontWeight:"800",letterSpacing:-.2},hint:{paddingLeft:2,marginBottom:6,fontSize:12,lineHeight:16},lockRow:{flexDirection:"row",alignItems:"center",gap:8,paddingLeft:2,marginBottom:6},track:{borderWidth:1,padding:5},oneRow:{flexDirection:"row",alignItems:"center",gap:8},trackInRow:{flex:1,minWidth:0},shelf:{gap:2,paddingHorizontal:0,paddingVertical:0,flexGrow:1},box:{overflow:"hidden"},copies:{position:"absolute",left:0,top:0,width:2e3,opacity:0},copy:{flexDirection:"row",alignSelf:"flex-start",gap:2},wrappedShelf:{flexDirection:"row",flexWrap:"wrap",alignItems:"center",gap:4},seg:{flexDirection:"row",alignItems:"center",justifyContent:"center",flexGrow:1,flexShrink:0,paddingHorizontal:13,paddingVertical:9,borderWidth:1},segText:{fontSize:13,fontWeight:"800",letterSpacing:-.2},dot:{width:6,height:6,borderRadius:3,marginRight:6},pin:{marginLeft:6}});function oh({onBack:e,hideActions:t}={}){const n="toolbar"===oi().pageHeader.layout;/* @__PURE__ */
447
+ return E(Ss,{title:"Pick a category",onBack:e,backLabel:n?"YESNO":void 0})}function rh({onCancel:e}){const{theme:t,screenSize:n}=ml();return e&&"mobile"!==n?/* @__PURE__ */E(W,{style:ah.footer,children:/* @__PURE__ */E(vi,{theme:t,variant:"secondary",size:"lg",onPress:e,children:"Cancel"})}):null}function lh({onSelectCategory:t,onCancel:n,hideTitle:i,hideActions:o,renderCategoryIcon:r,getCategoryTagline:l}){const a=le(),{theme:s,availableCategories:c,loading:d,setSelectedCategory:h,setSelectedSport:u,clearSelectedGame:f,displayCategoryName:g,uiVariant:p}=ml(),m=s.colors,b=kn(s),w=Yr(s),x="toolbar"===oi().pageHeader.layout?{marginBottom:Pl}:ah.titleWrap,{width:v}=F(),k=v>=640,B=v>=400,[C,S]=e.useState(0),z=k?12:10,A="shelf"===p?Math.max(1,Math.floor((C+Za)/312)):B?2:1,P=A>1?C>0?(C-z*(A-1))/A:Math.floor(100/A)-2+"%":"100%";/* @__PURE__ */
448
+ return U(W,d?{style:ah.container,children:[!i&&/* @__PURE__ */E(W,{style:x,children:/* @__PURE__ */E(oh,{onBack:n,hideActions:o})}),/* @__PURE__ */E(W,{style:ah.content,children:/* @__PURE__ */E(Rd,{theme:s,layout:"shelf"===p?"shelf":"kit",categories:c})})]}:{style:ah.container,children:[!i&&/* @__PURE__ */E(W,{style:x,children:/* @__PURE__ */E(oh,{onBack:n,hideActions:o})}),
449
+ /* @__PURE__ */E(W,{style:ah.content,children:/* @__PURE__ */E(W,"shelf"===p?{style:{flexDirection:"row",flexWrap:"wrap",gap:Za},onLayout:e=>S(e.nativeEvent.layout.width),children:c.map(e=>{const{ground:n,ink:i,art:o,drawn:r}=_a(e,s,a),c=l?.(e)??nt(e);/* @__PURE__ */
450
+ return U(jl,{ring:m.primary,radius:sn(s,16),onPress:()=>{h(e),u(null),f(),t?.(e)},style:{width:A>1&&C>0?(C-Za*(A-1))/A:"100%",height:116,padding:16,borderRadius:sn(s,16),overflow:"hidden",backgroundColor:n??m.infoBg,justifyContent:"space-between",alignItems:"flex-start"},children:[r?/* @__PURE__ */E(Ol,{drawn:r,frame:{right:16,top:12,size:92}}):o?/* @__PURE__ */E(y,{accessible:!1,source:{uri:o},resizeMode:"cover",style:{position:"absolute",top:0,right:0,bottom:0,width:150}}):null,
451
+ /* @__PURE__ */E(fi,{style:{marginRight:134,fontFamily:w,fontSize:26,fontWeight:"800",letterSpacing:-1.2,lineHeight:29,color:i},children:g(e)}),c?/* @__PURE__ */E(fi,{style:{overflow:"hidden",paddingHorizontal:8,paddingVertical:3,borderRadius:sn(s,8),backgroundColor:"#ffffffde",color:i,fontFamily:w,fontSize:12,fontWeight:"700"},children:c}):null]},e)})}:{style:[ah.grid,k&&ah.gridWide],onLayout:e=>S(e.nativeEvent.layout.width),children:c.map(e=>{const n=l?.(e)??nt(e);/* @__PURE__ */
452
+ return U(Bi,{theme:s,onPress:()=>{h(e),u(null),f(),t?.(e)},style:[ah.card,k&&ah.cardWide,{width:P,borderRadius:sn(s,16),backgroundColor:b}],children:[/* @__PURE__ */E(ya,{label:g(e),category:e,icon:r?.(e),theme:s}),n?/* @__PURE__ */E(fi,{style:[ah.tagline,k&&ah.taglineWide,{color:m.primary,fontFamily:w}],children:n}):null]},e)})})}),
453
+ /* @__PURE__ */E(Xd,{})]})}var ah=B.create({container:{flex:1},centered:{flex:1,flexDirection:"row",justifyContent:"center",alignItems:"center",padding:32},titleWrap:{marginBottom:8},content:{flex:1},grid:{flexDirection:"row",flexWrap:"wrap",gap:10},gridWide:{gap:12},card:{alignItems:"flex-start",justifyContent:"center",gap:8,minHeight:112,borderWidth:1,padding:14},cardWide:{gap:12,minHeight:140,padding:20},tagline:{fontSize:10,fontWeight:"500",textTransform:"uppercase",letterSpacing:.8},taglineWide:{fontSize:12,letterSpacing:1.2},footer:{flexDirection:"row",alignItems:"center",paddingTop:16}});function sh(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 ch({name:e,renderTeamLogo:t,muted:n,headingFont:i,ink:o,wide:r}){if(!e)/* @__PURE__ */return E(fi,{style:[hh.teamName,{color:n,fontFamily:i}],children:"TBC"});const l=t?.(e);/* @__PURE__ */
454
+ return U(W,{style:hh.teamMark,children:[null!=l?/* @__PURE__ */E(W,{style:hh.teamLogo,children:l}):null,/* @__PURE__ */E(fi,{style:[hh.teamName,r&&hh.teamNameWide,{color:o,fontFamily:i}],children:e})]})}function dh({onSelectEvent:t}){const{theme:n,loading:i,sameGameMultiEvents:o,selectSameGameMultiEvent:r,renderTeamLogo:l,displaySportName:a}=ml(),s=n.colors,c=la(n),d=Yr(n),h=Nr(n),u=kn(n),f=Bn(n),{width:g}=F(),p=g>=640,[y,m]=e.useState(null);return i?/* @__PURE__ */E(W,{style:hh.container,children:/* @__PURE__ */E(Od,{theme:n})}):/* @__PURE__ */U(W,{style:hh.container,accessibilityLabel:"Available fixtures",children:[/* @__PURE__ */E(fi,{style:[hh.intro,{color:c.colors.textMuted,fontFamily:d}],children:"All picks in your multi must come from one game."}),0===o.length?/* @__PURE__ */E(W,{accessibilityRole:"text",accessibilityLiveRegion:"polite",style:[hh.emptyState,{borderRadius:sn(n,16),borderColor:s.border,backgroundColor:u}],children:/* @__PURE__ */E(fi,{style:[hh.emptyText,{color:s.textMuted,fontFamily:d}],children:"No fixtures with available propositions."})}):/* @__PURE__ */E(W,{style:[hh.list,p&&hh.listWide],children:o.map(e=>/* @__PURE__ */U(Bi,{theme:n,lit:y===e.id,accessibilityLabel:`Select ${ye(e)}`,onPress:()=>{r(e.id),t?.(e.id)},onFocus:()=>m(e.id),onBlur:()=>m(t=>t===e.id?null:t),style:[hh.card,p&&hh.cardWide,{borderRadius:sn(n,16),backgroundColor:u}],children:[/* @__PURE__ */U(W,{style:hh.cardMain,children:[/* @__PURE__ */U(W,{style:[hh.matchup,p&&hh.matchupWide,{borderRadius:sn(n,12),backgroundColor:f}],children:[
455
+ /* @__PURE__ */E(ch,{name:e.homeTeam,renderTeamLogo:l,muted:s.textMuted,headingFont:h,ink:s.text,wide:p}),
456
+ /* @__PURE__ */E(fi,{style:[hh.vs,{color:s.textMuted,fontFamily:h}],children:"vs"}),
457
+ /* @__PURE__ */E(ch,{name:e.awayTeam,renderTeamLogo:l,muted:s.textMuted,headingFont:h,ink:s.text,wide:p})]}),/* @__PURE__ */U(fi,{style:[hh.meta,p&&hh.metaWide,{color:s.textMuted,fontFamily:d}],children:[sh(e.commenceTime)," · ",e.propositionCount," proposition",1===e.propositionCount?"":"s",e.league||e.sport?` · ${e.league?.toUpperCase()??a(e.sport)}`:""]})]}),/* @__PURE__ */E(W,{style:{flexShrink:0},children:/* @__PURE__ */E(ga,{size:22,color:s.textMuted})})]},e.id))})]})}var hh=B.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,padding:24,alignItems:"center"},emptyText:{fontSize:14,textAlign:"center"},list:{gap:10},listWide:{gap:12},card:{minHeight:64,width:"100%",flexDirection:"row",alignItems:"center",justifyContent:"space-between",gap:12,borderWidth:1,paddingHorizontal:14,paddingVertical:14},cardWide:{paddingHorizontal:20,paddingVertical:16},cardMain:{flex:1,minWidth:0},matchup:{flexDirection:"column",alignItems:"flex-start",gap:4,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 uh({onBack:e,onNext:t,hideActions:n}={}){const{theme:i,headingFont:o,bodyFont:r,selectedGame:l,propositions:a,uiVariant:s,selectedPropositionCount:c,disableQuickPick:d,answeredCount:h,goToConfirmation:u,quickPickSelections:f,upgradePropositionCount:g,selectedEventId:p,sameGameMultiEvents:y,selectSameGameMultiEvent:m,selectedRule:b,howToPlayMarkdown:w,maxPayouts:x,correlationTargetCount:v}=ml(),k=i.colors,B=ht(l),C=Ra(l??{},l?x?.[l.id]:void 0),S=be(l)&&!p,z=y.find(e=>e.id===p),W=l?Wt(l,c,b):{min:0,max:0},F=xr(l)?v:W.min,A=xr(l)?v:be(l)&&p?Math.min(W.max,a.length):W.max,P=F>0&&F===A,T=!!(l?.allowed_propositions&&l.allowed_propositions.length>0),D=ur(l,c),H=!fr(l)&&!T&&F>0&&A>F,M=D??(P?A:A||a.length),L=(e,n="fill")=>{const i=e??M;return null==e||H||g(e),!(f(i,n)<i||(ri(s)||(u(),t?.()),0))},R=!xr(l)&&!d&&a.length>0,I=gr(l,b,a.length),O=h>0?h:F||M,j=pr(I,h,M,O),U=l?z?ye(z):l.game_name:void 0,G="inline"===ii(s).pageHeader.layout;return qn(s)?/* @__PURE__ */E(Ts,{onBack:p?()=>m(null):e}):/* @__PURE__ */E(Ss,{title:S?"Choose a Game":G&&U?U:"playbook"===s?"Make your calls":"call"===s||"shelf"===s?"Choose your picks":"Select Propositions",onBack:l?p?()=>m(null):e:void 0,backLabel:U,actions:R?"menu"===j.kind?/* @__PURE__ */E(as,{counts:j.counts,current:h,hint:j.hint,onPick:e=>L(e),onDoubleAction:j.counts.length?()=>L(O):void 0,onFill:j.fillLabel?()=>L():void 0,fillLabel:j.fillLabel,onRandomise:j.randomise?()=>L(j.randomise.count,"replace"):void 0,randomiseLabel:j.randomise?.label,colors:k,menuShadow:dn(i),theme:i}):/* @__PURE__ */E(is,{hint:j.hint,onPress:()=>L(void 0,j.mode)}):null,children:l&&(B||w?.trim())?/* @__PURE__ */E(ha,{variant:"icon",content:w,panel:B,theme:i,title:`${l.game_name} — How to Play`,extra:/* @__PURE__ */E(us,{tiers:C.hasGenericDividends?C.tiers:[],modes:C.modes,pydDividends:C.pydDividends,minBet:C.minBet,maxBet:C.maxBet,colors:k,bodyFont:r,headingFont:o,theme:i}),colors:{text:k.text,textMuted:k.textMuted,border:k.border,background:k.background,backgroundAlt:k.backgroundAlt,primary:k.primary,primaryText:k.primaryText},bodyFont:r,headingFont:o}):null})}function fh({number:e,color:t,size:n=34,label:i,selected:o,onSelect:r}){const l=(e,i)=>({position:"absolute",left:e,top:.4*e,width:n,height:n,borderRadius:.26*n,backgroundColor:t,opacity:i});/* @__PURE__ */
458
458
  return E(Li,{children:/* @__PURE__ */U(z,{accessibilityRole:"button",accessibilityLabel:i,onPress:r,activeOpacity:.8,style:{position:"relative",width:n+.2*n,height:1.3*n},children:[
459
459
  /* @__PURE__ */E(W,{style:l(.44*n,.3)}),
460
460
  /* @__PURE__ */E(W,{style:l(.22*n,.55)}),
461
- /* @__PURE__ */E(W,{style:{position:"absolute",left:0,top:0,width:n,height:n,borderRadius:.26*n,backgroundColor:t,alignItems:"center",justifyContent:"center",borderWidth:o?2:0,borderColor:"#fff"},children:/* @__PURE__ */E(fi,{style:{color:"#fff",fontSize:n*(e>9?.42:.5),fontWeight:"800"},children:String(e)})})]})})}function fh(){const{theme:t,selectionUndo:n,undoSelectionChange:i,dismissSelectionUndo:o,uiVariant:r}=yl(),l=e.useRef(o);l.current=o,e.useEffect(()=>{if(!n)return;const e=setTimeout(()=>l.current(),6e3);return()=>clearTimeout(e)},[n]);const a=t.colors;return ri(r)?/* @__PURE__ */E(W,{accessibilityLiveRegion:"polite",children:n?/* @__PURE__ */U(Ml,{theme:t,style:{flexDirection:"row",alignItems:"center",gap:10,paddingTop:6,paddingRight:6,paddingBottom:6,paddingLeft:8,marginBottom:8},children:["quickpick"===n.kind?/* @__PURE__ */E(W,{importantForAccessibility:"no-hide-descendants",style:{width:32,height:32,alignItems:"center",justifyContent:"center",borderRadius:sn(t,bl)-4,backgroundColor:a.primary},children:/* @__PURE__ */E(es,{size:16,color:a.primaryText})}):null,
461
+ /* @__PURE__ */E(W,{style:{position:"absolute",left:0,top:0,width:n,height:n,borderRadius:.26*n,backgroundColor:t,alignItems:"center",justifyContent:"center",borderWidth:o?2:0,borderColor:"#fff"},children:/* @__PURE__ */E(fi,{style:{color:"#fff",fontSize:n*(e>9?.42:.5),fontWeight:"800"},children:String(e)})})]})})}function gh(){const{theme:t,selectionUndo:n,undoSelectionChange:i,dismissSelectionUndo:o,uiVariant:r}=ml(),l=e.useRef(o);l.current=o,e.useEffect(()=>{if(!n)return;const e=setTimeout(()=>l.current(),6e3);return()=>clearTimeout(e)},[n]);const a=t.colors;return ri(r)?/* @__PURE__ */E(W,{accessibilityLiveRegion:"polite",children:n?/* @__PURE__ */U(Ll,{theme:t,style:{flexDirection:"row",alignItems:"center",gap:10,paddingTop:6,paddingRight:6,paddingBottom:6,paddingLeft:8,marginBottom:8},children:["quickpick"===n.kind?/* @__PURE__ */E(W,{importantForAccessibility:"no-hide-descendants",style:{width:32,height:32,alignItems:"center",justifyContent:"center",borderRadius:sn(t,wl)-4,backgroundColor:a.primary},children:/* @__PURE__ */E(ts,{size:16,color:a.primaryText})}):null,
462
462
  /* @__PURE__ */E(fi,{style:{flex:1,minWidth:0,paddingLeft:"quickpick"===n.kind?0:8,fontSize:14,fontWeight:"700",color:a.text},children:n.message}),
463
- /* @__PURE__ */E(vi,{theme:t,variant:"quiet",onPress:i,children:"Undo"})]}):null}):null}function gh({onNext:t,onBack:n}){const{theme:i,headingFont:o,selectedGame:r,selectedPropositionCount:l,selectedEventId:a,propositions:s,goToConfirmation:c,selectedRule:d,maxPayouts:h,betAmount:u,setBetAmount:f,selections:g,expectedCorrect:p,gamePrice:y,toggleSelection:m,correlationTargetCount:b,selectionValid:w,uiVariant:x,previewCallPayouts:v,selectedRuleId:B,clearSelections:C,dismissSelectionUndo:S}=yl(),z=i.colors,A=r?Wt(r,l,d):{min:0,max:0},P=ur(r,l),T=xr(r)?b:P??A.min,D=xr(r)?b:P??(be(r)&&a?Math.min(A.max,s.length):A.max),H=e.useRef(!1);e.useEffect(()=>{H.current=!1},[r?.id]),e.useEffect(()=>{qn(x)&&u>0&&(H.current=!0),u<=0&&!H.current&&f(Math.max(20,y))},[u,y,f]);const M=e.useRef([]);M.current=ul(M.current,g);const L=function({selections:e,order:t,minReq:n,maxReq:i,stake:o,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,s=a>=n,c=Math.max(0,n-a),d=s||i>0&&n===i?r*(o/20):0;return{legs:l,count:a,dividend:d,dividendText:yt(d),ctaLabel:s?`Continue with ${a} ›`:0===a?`Select at least ${n}`:`Add ${c} more to continue`,ctaDisabled:!s,atMax:i>0&&a>=i}}({selections:g,order:M.current,minReq:T,maxReq:D,stake:u,payout20:r?fl(h?.[r.id],D>0&&T===D?D:M.current.length,{game:r,expectedCorrect:p,stake:u}):0}),R=gn(i),I=pn(i),O=L.ctaDisabled||xr(r)&&!w,j=ci(i,"primary"),G=ki(i,"primary",O),V=wn(j.background,bn(i),j.color),Y=yr(r),[N,X]=e.useState(!1);F().width;const[q,K]=e.useState(!1),[Q,J]=e.useState(null),Z=L.legs.find(e=>e.id===Q)??null,$=Z?s.find(e=>e.id===Z.id)?.description??s.find(e=>e.id===Z.id)?.proposition??"":"",_=()=>{J(null),C()},ee=r?ja(r,l??L.count,u,p??void 0):null,te=ws("default"!==x?v:void 0,r,l??L.count,u,p,B,ee),ne=r&&!xr(r)?te.view??Ea(r,u,h[r.id]):null,ie=ee?te.estimated?"Estimated all correct":"All correct payout":"Potential payout",oe=ee?yt(Math.max(...(te.view??ee).rows.map(e=>e.amount))):L.dividendText;if(qn(x))/* @__PURE__ */return E(Ds,{count:L.count,target:D,minimum:T,disabled:L.ctaDisabled||xr(r)&&!w,label:L.ctaLabel,view:ne,payoutText:oe,onNext:()=>{c(),t?.()}});const re=Math.max(0,T-L.count),le=D>0&&D<=16?D:T,ae=ee?Math.max(...(te.view??ee).rows.map(e=>e.amount)):L.dividend,se=Math.max(T,L.count),ce=/* @__PURE__ */U(W,{style:{flexDirection:"row",alignItems:"flex-end",gap:12},children:[/* @__PURE__ */U(W,{style:{flex:1,minWidth:0},children:[/* @__PURE__ */U(fi,{style:{fontSize:13,fontWeight:"600",color:z.textMuted},children:[0===re&&L.count>0?`All ${se}`:`${L.count} of ${se}`," picked"]}),/* @__PURE__ */U(W,{accessibilityLiveRegion:"polite",style:{flexDirection:"row",flexWrap:"wrap",alignItems:"baseline",columnGap:6},children:[/* @__PURE__ */E(fi,{style:{fontSize:26,fontWeight:"800",letterSpacing:-.5,color:hn(i),fontVariant:["tabular-nums"]},children:ae>0?yt(ae):"—"}),/* @__PURE__ */U(fi,{style:{fontSize:13,fontWeight:"500",color:z.textMuted},children:["if all ",se," right"]})]})]}),/* @__PURE__ */E(vi,{size:"lg",theme:i,disabled:L.ctaDisabled||xr(r)&&!w,onPress:()=>{X(!1),S(),c(),t?.()},children:re>0?`Pick ${re} more`:"Review picks"})]});return ri(x)?/* @__PURE__ */U(W,{children:[/* @__PURE__ */U(W,{style:{flexDirection:"row",alignItems:"center",gap:10,marginBottom:8},children:[/* @__PURE__ */U(W,{style:{flex:1,minWidth:0,alignItems:"flex-start",gap:6},children:[/* @__PURE__ */E(W,{style:{opacity:.6},children:/* @__PURE__ */E(Yd,{size:12})}),le>0?/* @__PURE__ */E(Rl,{theme:i,states:Array.from({length:le},(e,t)=>t<L.count?"right":"open"),style:{alignSelf:"stretch"}}):null]}),Y?/* @__PURE__ */U(fi,{style:{fontSize:14,fontWeight:"700",color:z.text},children:[yt(u)," · locked"]}):/* @__PURE__ */U(W,{style:{marginLeft:"auto",flexDirection:"row",alignItems:"center",minHeight:44,borderWidth:1,borderColor:z.border,borderRadius:sn(i,bl),paddingLeft:12},children:[/* @__PURE__ */E(fi,{style:{fontSize:16,color:z.text},children:"$"}),/* @__PURE__ */E(gi,{accessibilityLabel:Xr,keyboardType:"decimal-pad",value:u,onChangeText:e=>{H.current=!0,f(Math.max(0,Number(e)||0))},style:{width:96,minHeight:44,paddingVertical:8,paddingLeft:4,paddingRight:12,color:z.text,fontSize:16,fontWeight:"700"}})]})]}),ce]}):/* @__PURE__ */U(W,"call"===x?{style:{gap:10},children:[
463
+ /* @__PURE__ */E(vi,{theme:t,variant:"quiet",onPress:i,children:"Undo"})]}):null}):null}function ph({onNext:t,onBack:n}){const{theme:i,headingFont:o,selectedGame:r,selectedPropositionCount:l,selectedEventId:a,propositions:s,goToConfirmation:c,selectedRule:d,maxPayouts:h,betAmount:u,setBetAmount:f,selections:g,expectedCorrect:p,gamePrice:y,toggleSelection:m,correlationTargetCount:b,selectionValid:w,uiVariant:x,previewCallPayouts:v,selectedRuleId:B,clearSelections:C,dismissSelectionUndo:S}=ml(),z=i.colors,A=r?Wt(r,l,d):{min:0,max:0},P=ur(r,l),T=xr(r)?b:P??A.min,D=xr(r)?b:P??(be(r)&&a?Math.min(A.max,s.length):A.max),H=e.useRef(!1);e.useEffect(()=>{H.current=!1},[r?.id]),e.useEffect(()=>{qn(x)&&u>0&&(H.current=!0),u<=0&&!H.current&&f(Math.max(20,y))},[u,y,f]);const M=e.useRef([]);M.current=fl(M.current,g);const L=function({selections:e,order:t,minReq:n,maxReq:i,stake:o,payout20:r=0,game:l}){const a=[];for(const u of t){const t=e[u];t&&a.push({id:u,number:a.length+1,side:t})}const s=a.length,c=s>=n,d=Math.max(0,n-s),h=c||i>0&&n===i?l?wr(r*(o/20),l):r*(o/20):0;return{legs:a,count:s,dividend:h,dividendText:yt(h),ctaLabel:c?`Continue with ${s} ›`:0===s?`Select at least ${n}`:`Add ${d} more to continue`,ctaDisabled:!c,atMax:i>0&&s>=i}}({game:r,selections:g,order:M.current,minReq:T,maxReq:D,stake:u,payout20:r?gl(h?.[r.id],D>0&&T===D?D:M.current.length,{game:r,expectedCorrect:p,stake:u}):0}),R=gn(i),I=pn(i),O=L.ctaDisabled||xr(r)&&!w,j=ci(i,"primary"),G=ki(i,"primary",O),V=wn(j.background,bn(i),j.color),Y=yr(r),[N,X]=e.useState(!1);F().width;const[q,K]=e.useState(!1),[Q,J]=e.useState(null),Z=L.legs.find(e=>e.id===Q)??null,$=Z?s.find(e=>e.id===Z.id)?.description??s.find(e=>e.id===Z.id)?.proposition??"":"",_=()=>{J(null),C()},ee=r?Ea(r,l??L.count,u,p??void 0):null,te=xs("default"!==x?v:void 0,r,l??L.count,u,p,B,ee),ne=r&&!xr(r)?te.view??Ua(r,u,h[r.id]):null,ie=ee?te.estimated?"Estimated all correct":"All correct payout":qr,oe=ee?yt(Math.max(...(te.view??ee).rows.map(e=>e.amount))):L.dividendText;if(qn(x))/* @__PURE__ */return E(Hs,{count:L.count,target:D,minimum:T,disabled:L.ctaDisabled||xr(r)&&!w,label:L.ctaLabel,view:ne,payoutText:oe,onNext:()=>{c(),t?.()}});const re=Math.max(0,T-L.count),le=D>0&&D<=16?D:T,ae=ee?Math.max(...(te.view??ee).rows.map(e=>e.amount)):L.dividend,se=Math.max(T,L.count),ce=/* @__PURE__ */U(W,{style:{flexDirection:"row",alignItems:"flex-end",gap:12},children:[/* @__PURE__ */U(W,{style:{flex:1,minWidth:0},children:[/* @__PURE__ */U(fi,{style:{fontSize:13,fontWeight:"600",color:z.textMuted},children:[0===re&&L.count>0?`All ${se}`:`${L.count} of ${se}`," picked"]}),/* @__PURE__ */U(W,{accessibilityLiveRegion:"polite",style:{flexDirection:"row",flexWrap:"wrap",alignItems:"baseline",columnGap:6},children:[/* @__PURE__ */E(fi,{style:{fontSize:26,fontWeight:"800",letterSpacing:-.5,color:hn(i),fontVariant:["tabular-nums"]},children:ae>0?yt(ae):"—"}),/* @__PURE__ */U(fi,{style:{fontSize:13,fontWeight:"500",color:z.textMuted},children:["if all ",se," right"]})]})]}),/* @__PURE__ */E(vi,{size:"lg",theme:i,disabled:L.ctaDisabled||xr(r)&&!w,onPress:()=>{X(!1),S(),c(),t?.()},children:re>0?`Pick ${re} more`:"Review picks"})]});return ri(x)?/* @__PURE__ */U(W,{children:[/* @__PURE__ */U(W,{style:{flexDirection:"row",alignItems:"center",gap:10,marginBottom:8},children:[/* @__PURE__ */U(W,{style:{flex:1,minWidth:0,alignItems:"flex-start",gap:6},children:[/* @__PURE__ */E(W,{style:{opacity:.6},children:/* @__PURE__ */E(Nd,{size:12})}),le>0?/* @__PURE__ */E(Il,{theme:i,states:Array.from({length:le},(e,t)=>t<L.count?"right":"open"),style:{alignSelf:"stretch"}}):null]}),Y?/* @__PURE__ */U(fi,{style:{fontSize:14,fontWeight:"700",color:z.text},children:[yt(u)," · locked"]}):/* @__PURE__ */U(W,{style:{marginLeft:"auto",flexDirection:"row",alignItems:"center",minHeight:44,borderWidth:1,borderColor:z.border,borderRadius:sn(i,wl),paddingLeft:12},children:[/* @__PURE__ */E(fi,{style:{fontSize:16,color:z.text},children:"$"}),/* @__PURE__ */E(gi,{accessibilityLabel:Xr,keyboardType:"decimal-pad",value:u,onChangeText:e=>{H.current=!0,f(Math.max(0,Number(e)||0))},style:{width:96,minHeight:44,paddingVertical:8,paddingLeft:4,paddingRight:12,color:z.text,fontSize:16,fontWeight:"700"}})]})]}),ce]}):/* @__PURE__ */U(W,"call"===x?{style:{gap:10},children:[
464
464
  /* @__PURE__ */U(W,{style:{flexDirection:"row",alignItems:"center",gap:8},children:[
465
- /* @__PURE__ */U(W,{style:{flex:1},children:[/* @__PURE__ */U(fi,{accessibilityLiveRegion:"polite",style:{color:z.text,fontSize:13,fontWeight:"700"},children:[L.count," ",1===L.count?"pick":"picks"," selected"]}),/* @__PURE__ */E(fi,{style:{color:z.textMuted,fontSize:11},children:T===D?`${D} required`:`Choose ${T}–${D}`})]}),L.count>0&&/* @__PURE__ */E(vi,{theme:i,variant:"quiet",accessibilityState:{expanded:N},onPress:()=>{X(e=>!e),K(!1)},children:N?"Hide picks":"View picks"}),L.count>0&&(!ne||N)&&/* @__PURE__ */E(vi,{theme:i,variant:"quiet",onPress:_,children:"Clear picks"}),ne&&!N&&/* @__PURE__ */E(vi,{theme:i,variant:"quiet",accessibilityState:{expanded:q},onPress:()=>{K(e=>!e),X(!1)},children:q?"Hide payouts":"View payouts"})]}),N&&/* @__PURE__ */E(k,{style:{maxHeight:160},children:L.legs.map(e=>/* @__PURE__ */U(W,{style:{flexDirection:"row",gap:8,alignItems:"center",paddingVertical:8,borderTopWidth:1,borderColor:z.border},children:[/* @__PURE__ */U(fi,{style:{color:z.text,flex:1,fontSize:13},children:[e.number,". ",e.side.toUpperCase()," — ",s.find(t=>t.id===e.id)?.description||s.find(t=>t.id===e.id)?.proposition]}),/* @__PURE__ */E(vi,{theme:i,variant:"quiet",accessibilityLabel:`Remove pick ${e.number}`,onPress:()=>m(e.id,e.side),children:"Remove"})]},e.id))}),q&&ne&&/* @__PURE__ */E(k,{style:{maxHeight:230},children:/* @__PURE__ */E(md,{view:ne,theme:i})}),
465
+ /* @__PURE__ */U(W,{style:{flex:1},children:[/* @__PURE__ */U(fi,{accessibilityLiveRegion:"polite",style:{color:z.text,fontSize:13,fontWeight:"700"},children:[L.count," ",1===L.count?"pick":"picks"," selected"]}),/* @__PURE__ */E(fi,{style:{color:z.textMuted,fontSize:11},children:T===D?`${D} required`:`Choose ${T}–${D}`})]}),L.count>0&&/* @__PURE__ */E(vi,{theme:i,variant:"quiet",accessibilityState:{expanded:N},onPress:()=>{X(e=>!e),K(!1)},children:N?"Hide picks":"View picks"}),L.count>0&&(!ne||N)&&/* @__PURE__ */E(vi,{theme:i,variant:"quiet",onPress:_,children:"Clear picks"}),ne&&!N&&/* @__PURE__ */E(vi,{theme:i,variant:"quiet",accessibilityState:{expanded:q},onPress:()=>{K(e=>!e),X(!1)},children:q?"Hide payouts":"View payouts"})]}),N&&/* @__PURE__ */E(k,{style:{maxHeight:160},children:L.legs.map(e=>/* @__PURE__ */U(W,{style:{flexDirection:"row",gap:8,alignItems:"center",paddingVertical:8,borderTopWidth:1,borderColor:z.border},children:[/* @__PURE__ */U(fi,{style:{color:z.text,flex:1,fontSize:13},children:[e.number,". ",e.side.toUpperCase()," — ",s.find(t=>t.id===e.id)?.description||s.find(t=>t.id===e.id)?.proposition]}),/* @__PURE__ */E(vi,{theme:i,variant:"quiet",accessibilityLabel:`Remove pick ${e.number}`,onPress:()=>m(e.id,e.side),children:"Remove"})]},e.id))}),q&&ne&&/* @__PURE__ */E(k,{style:{maxHeight:230},children:/* @__PURE__ */E(bd,{view:ne,theme:i})}),
466
466
  /* @__PURE__ */U(W,{style:{flexDirection:"row",gap:16,alignItems:"center"},children:[/* @__PURE__ */U(W,{style:{gap:4},children:[/* @__PURE__ */E(fi,{style:{fontSize:12,color:z.textMuted},children:"Stake"}),Y?/* @__PURE__ */U(fi,{style:{color:z.text,fontWeight:"700"},children:[yt(u)," · locked"]}):/* @__PURE__ */E(gi,{accessibilityLabel:Xr,keyboardType:"decimal-pad",value:u,onChangeText:e=>{H.current=!0,f(Math.max(0,Number(e)||0))},style:{minHeight:44,width:90,padding:8,borderWidth:1,borderRadius:sn(i,8),borderColor:z.border,color:z.text,fontSize:16}})]}),/* @__PURE__ */U(W,{style:{flex:1},children:[/* @__PURE__ */E(fi,{style:{fontSize:12,color:z.textMuted},children:ie}),/* @__PURE__ */E(fi,{style:{fontSize:20,color:z.text,fontWeight:"800"},children:oe})]})]}),
467
467
  /* @__PURE__ */E(vi,{theme:i,size:"lg",block:!0,disabled:L.ctaDisabled||xr(r)&&!w,onPress:()=>{c(),t?.()},children:L.ctaLabel})]}:{children:[
468
- /* @__PURE__ */U(W,{style:{flexDirection:"row",alignItems:"center",gap:8,marginBottom:8},children:[/* @__PURE__ */E(k,{horizontal:!0,showsHorizontalScrollIndicator:!1,style:{flex:1,minHeight:44},contentContainerStyle:{alignItems:"center"},children:0===L.legs.length?/* @__PURE__ */E(fi,{style:{fontSize:13,color:z.textMuted},children:"Tap Yes or No to start building your multi."}):L.legs.map(e=>/* @__PURE__ */E(uh,{number:e.number,color:"yes"===e.side?R:I,label:`Leg ${e.number}, answered ${e.side}`,selected:e.id===Q,onSelect:()=>J(t=>t===e.id?null:e.id)},e.id))}),L.legs.length>0?/* @__PURE__ */E(vi,{theme:i,variant:"quiet",onPress:_,style:{flexShrink:0},children:Kr}):null]}),Z?/* @__PURE__ */U(W,{style:{flexDirection:"row",alignItems:"center",gap:8,marginBottom:8},children:[
468
+ /* @__PURE__ */U(W,{style:{flexDirection:"row",alignItems:"center",gap:8,marginBottom:8},children:[/* @__PURE__ */E(k,{horizontal:!0,showsHorizontalScrollIndicator:!1,style:{flex:1,minHeight:44},contentContainerStyle:{alignItems:"center"},children:0===L.legs.length?/* @__PURE__ */E(fi,{style:{fontSize:13,color:z.textMuted},children:"Tap Yes or No to start building your multi."}):L.legs.map(e=>/* @__PURE__ */E(fh,{number:e.number,color:"yes"===e.side?R:I,label:`Leg ${e.number}, answered ${e.side}`,selected:e.id===Q,onSelect:()=>J(t=>t===e.id?null:e.id)},e.id))}),L.legs.length>0?/* @__PURE__ */E(vi,{theme:i,variant:"quiet",onPress:_,style:{flexShrink:0},children:Qr}):null]}),Z?/* @__PURE__ */U(W,{style:{flexDirection:"row",alignItems:"center",gap:8,marginBottom:8},children:[
469
469
  /* @__PURE__ */E(fi,{style:{paddingHorizontal:6,paddingVertical:2,borderRadius:sn(i,4),fontSize:10,fontWeight:"700",textTransform:"uppercase",backgroundColor:"yes"===Z.side?R:I,color:"#fff"},children:Z.side}),
470
470
  /* @__PURE__ */E(fi,{numberOfLines:2,style:{flex:1,fontSize:12,color:z.text},children:$}),
471
- /* @__PURE__ */E(vi,{theme:i,variant:"quiet",accessibilityLabel:`${qr} leg ${Z.number}`,onPress:()=>{J(null),m(Z.id,Z.side)},children:qr})]}):null,
472
- /* @__PURE__ */U(W,{style:{flexDirection:"row",alignItems:"stretch",gap:8},children:[/* @__PURE__ */U(W,Y?{accessibilityLabel:`${Xr}. ${mr(r)}`,style:{flexDirection:"row",alignItems:"center",gap:8,borderRadius:sn(i,10),paddingHorizontal:12,borderWidth:1,borderColor:z.border,backgroundColor:z.backgroundAlt},children:[/* @__PURE__ */E(fi,{style:{fontSize:15,fontWeight:"800",color:z.text},children:yt(u)}),/* @__PURE__ */E(fi,{style:{fontSize:10,color:z.textMuted},children:"locked"})]}:{style:{flexDirection:"row",alignItems:"center",width:96,borderRadius:sn(i,10),borderWidth:1,borderColor:z.border,backgroundColor:z.background,overflow:"hidden"},children:[/* @__PURE__ */E(fi,{style:{paddingLeft:11,fontSize:16,fontWeight:"800",color:z.text},children:"$"}),/* @__PURE__ */E(gi,{keyboardType:"decimal-pad",accessibilityLabel:Xr,value:u,onChangeText:e=>{H.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:z.text,fontFamily:o}})]}),/* @__PURE__ */E(vi,{theme:i,size:"lg",disabled:O,onPress:()=>{c(),t?.()},style:{flex:1,minWidth:0},children:/* @__PURE__ */U(W,{style:{alignItems:"center",minWidth:0},children:[L.dividend>0?/* @__PURE__ */U(fi,{numberOfLines:1,style:[{fontSize:10,fontWeight:"700",letterSpacing:.8,textTransform:"uppercase"},{color:tn(G,.8)}],children:["Potential dividend"," ",
473
- /* @__PURE__ */E(fi,{style:{fontSize:13,fontWeight:"800",letterSpacing:0,color:O?G:V},children:L.dividendText})]}):null,/* @__PURE__ */E(fi,{numberOfLines:1,style:{fontSize:li.fontSize.lg,fontWeight:String(li.weight),color:G},children:L.ctaLabel})]})})]})]})}function ph(){const{theme:t,propositions:n,uiVariant:i}=yl(),[o,r]=e.useState(!1),l=ra(t),a=!ri(i);return 0===n.length?null:/* @__PURE__ */U(j,{children:[/* @__PURE__ */E(vi,{theme:l,variant:"quiet",accessibilityLabel:"Swipe all matches",icon:/* @__PURE__ */E(Lc,{color:l.colors.primary}),onPress:()=>r(!0),style:[{flexShrink:0},a&&{width:44,paddingHorizontal:0}],children:a?void 0:hl}),o?/* @__PURE__ */E(Rc,{propositions:n,title:"All matches",onClose:()=>r(!1)}):null]})}function yh({view:e,onChange:t}){const n=ra(yl().theme),i="list"===e?"swipe":"list";/* @__PURE__ */
474
- return E(vi,{theme:n,variant:"quiet",onPress:()=>t(i),style:{flexShrink:0},children:"swipe"===i?hl:"List"})}function mh({onNext:t,onBack:n,hideTitle:i,hideActions:o,defaultView:r="list",view:l,onViewChange:a,hideViewSwitch:s,onSwipeDragStateChange:c}){const d=yl(),{selectedRule:h,correlation:u,correlationTargetCount:f,selectionValid:g,selectionUndo:p}=d,{theme:y,selectedGame:m,propositions:b,selections:w,toggleSelection:x,loading:v,error:B,disableQuickPick:C,renderTeamLogo:S,filterSport:z,initialSport:F,gameCategory:A,selectedPropositionCount:P,handlePropositionCountChange:T,goToConfirmation:D,goBack:H,selectedCategory:M,setSelectedCategory:L,selectedSport:R,selectedEventId:I,propositionsForCategoryPicker:O,answeredCount:G}=d,[V,Y]=e.useState(r),N=l??V,X=e.useCallback(e=>{void 0===l&&Y(e),a?.(e)},[l,a]);e.useEffect(()=>{m||(d.goToSportSelection(),n?.())},[m,d,n]);const q=e.useMemo(()=>{if(!m)return null;if(xr(m))return f;const{min:e,max:t}=Wt(m,P??void 0,h);return e>0&&e===t?e:ur(m,P)},[m,P,f]),K=e.useRef(!1),Q=e.useRef(G);e.useEffect(()=>{const e=Q.current;if(Q.current=G,null==q)return;const n=e===q-1&&G===q&&!p;if(xr(m)){if(G!==q&&(K.current=!1),n&&(K.current=!0),!K.current||!g)return;return K.current=!1,D(),void t?.()}n&&(D(),t?.())},[G,q,g]);const J=e.useMemo(()=>Bt(O??[]),[O]);if(e.useEffect(()=>{m&&1===J.length&&M!==J[0]&&L(J[0])},[m,J,M,L]),!m)return null;const Z=J.length>1&&!M,$=!Z&&be(m)&&!I,_=(()=>{if(xr(m))return{...m,allowed_propositions:u.data?.supported_counts??m.allowed_propositions};if(!be(m)||!I)return m;const e=Math.min(m.max_propositions??b.length,b.length);return{...m,max_propositions:e,allowed_propositions:m.allowed_propositions?.filter(t=>t<=e)}})(),ee=()=>{H(),n?.()},te="default"===d.uiVariant||o?W:k;/* @__PURE__ */
475
- return U(W,{style:bh.container,children:[!i&&/* @__PURE__ */E(W,{style:{marginBottom:qn(d.uiVariant)?0:ri(d.uiVariant)?Al:24},children:/* @__PURE__ */E(hh,{onBack:o?ee:void 0,onNext:o?t:void 0,hideActions:o})}),!be(m)&&/* @__PURE__ */E(Gd,{}),xr(m)&&!Z&&!$&&/* @__PURE__ */U(j,{children:[/* @__PURE__ */E(Jd,{}),u.error&&/* @__PURE__ */E(vi,{theme:y,variant:"quiet",onPress:u.retry,style:{alignSelf:"flex-start"},children:"Retry available choices"})]}),
476
- /* @__PURE__ */U(te,{style:bh.content,children:[Z?/* @__PURE__ */E(rh,{hideTitle:!0,hideActions:!0,onSelectCategory:e=>L(e)}):$?/* @__PURE__ */E(ch,{}):"swipe"===N?/* @__PURE__ */E(Hc,{onBack:ee,onNext:t,viewSwitch:s?void 0:/* @__PURE__ */E(yh,{view:N,onChange:X}),onDragStateChange:c}):/* @__PURE__ */E(fd,{game:_,propositions:b,selections:w,onToggleSelection:x,onBack:ee,loading:v,error:B,theme:y,hideActions:!0,initialSport:z??F,renderTeamLogo:S,disableQuickPick:!0,selectedPropositionCount:xr(m)?f:P,onPropositionCountChange:T,gameCategory:A,headerExtra:s?void 0:/* @__PURE__ */E(ph,{}),railSlot:e=>qn(d.uiVariant)?/* @__PURE__ */E(Fs,{actions:e}):/* @__PURE__ */E(th,{actions:e,label:null,sublabel:null})}),!ri(d.uiVariant)&&/* @__PURE__ */E(Nd,{})]}),!o&&!Z&&!$&&(ri(d.uiVariant)?/* @__PURE__ */U(W,{style:{marginTop:16,flexShrink:0},children:[/* @__PURE__ */E(fh,{}),/* @__PURE__ */E(Ml,{theme:y,children:/* @__PURE__ */E(gh,{onNext:t,onBack:n})})]}):/* @__PURE__ */E(W,{style:{marginTop:qn(d.uiVariant)?0:16,flexShrink:0},children:/* @__PURE__ */E(gh,{onNext:t,onBack:n})}))]})}var bh=B.create({container:{flex:1},content:{flex:1}});function wh({tiers:e,game:t,selectedCount:n,onSelect:i,colors:o,bodyFont:r,extraBetAmount:l,buttonLabel:a,columnLabel:s="Legs",buildYourOwn:c,quickPickOnly:h,onQuickPick:u,collapsible:f,expanded:g,onExpandedChange:p,summaryTiers:y,theme:m}){const b=Tl(m),[w,x]=d(!1),v=g??w,B=null!=l&&20!==l,C=B?`$${Math.round(l)} returns`:"$20 returns",S=e.some(e=>e.payout20>0),z=!!f&&!v,F=S&&!z,A=(y??e).reduce((e,t)=>t.payout20>e?t.payout20:e,0),P=B&&A>0?wr(A*(l/20),t):A,T=e.length>0?82*e.length+8*Math.max(0,e.length-1):82,D=/* @__PURE__ */U(j,{children:[/* @__PURE__ */U(W,{style:{flexDirection:"column",gap:8,width:70,flexShrink:0},children:[/* @__PURE__ */E(W,{style:{paddingVertical:6,justifyContent:"center"},children:/* @__PURE__ */E(fi,{style:[xh.labelText,{color:o.textMuted,fontFamily:r}],children:h?"Quick Pick":s})}),F&&/* @__PURE__ */U(j,{children:[/* @__PURE__ */E(W,{style:{paddingVertical:4,justifyContent:"center"},children:/* @__PURE__ */E(fi,{style:[xh.labelText,{color:o.textMuted,fontFamily:r}],children:"Dividend"})}),/* @__PURE__ */E(W,{style:{paddingVertical:4,justifyContent:"center"},children:/* @__PURE__ */E(fi,{style:[xh.labelText,{color:o.textMuted,fontFamily:r}],children:C})})]})]}),h?/* @__PURE__ */U(W,{style:{gap:8,alignSelf:"flex-start",width:T},children:[/* @__PURE__ */E(ls,{theme:m,counts:(y??e).map(e=>e.count),onPick:e=>u?u(e):i(e),align:"left",direction:"up",colors:{background:o.background??"#ffffff",backgroundAlt:o.backgroundAlt??"#f3f4f6",border:o.border??"#e5e7eb",text:o.text??"#111827"}}),S&&!z&&/* @__PURE__ */E(W,{style:{flexDirection:"row",gap:8},children:e.map(({count:e,payout20:n})=>{const i=B&&n>0?wr(n*(l/20),t):null;/* @__PURE__ */
477
- return U(W,{style:{flexDirection:"column",gap:8,alignItems:"center",width:82},children:[/* @__PURE__ */E(W,{style:[xh.tableCell,{backgroundColor:`${o.success}15`,alignSelf:"stretch"}],children:/* @__PURE__ */U(fi,{style:[xh.tableCellText,{color:o.success}],children:[e,"/",e]})}),/* @__PURE__ */E(W,{style:[xh.tableCell,{backgroundColor:`${o.primary}12`,alignSelf:"stretch"}],children:/* @__PURE__ */E(fi,{style:[xh.tableCellText,{color:o.primary}],children:n>0?yt(i??n):"—"})})]},String(e))})})]}):c?/* @__PURE__ */U(W,{style:{gap:8,alignSelf:"flex-start",width:T},children:[/* @__PURE__ */E(vi,{theme:b,block:!0,onPress:()=>i(e[0]?.count??0),children:"Make Your Selections"}),S&&!z&&/* @__PURE__ */E(W,{style:{flexDirection:"row",gap:8},children:e.map(({count:e,payout20:n})=>{const i=n>0?yt(B?wr(n*(l/20),t):n):"—";/* @__PURE__ */
478
- return U(W,{style:{flexDirection:"column",gap:8,alignItems:"center",width:82},children:[/* @__PURE__ */E(W,{style:[xh.tableCell,{backgroundColor:`${o.success}15`,alignSelf:"stretch"}],children:/* @__PURE__ */U(fi,{style:[xh.tableCellText,{color:o.success}],children:[e,"/",e]})}),/* @__PURE__ */E(W,{style:[xh.tableCell,{backgroundColor:`${o.primary}12`,alignSelf:"stretch"}],children:/* @__PURE__ */E(fi,{style:[xh.tableCellText,{color:o.primary}],children:i})})]},String(e))})})]}):e.map(({count:e,payout20:r})=>{const s=n===e,c=B&&r>0?wr(r*(l/20),t):null;/* @__PURE__ */
479
- return U(W,{style:{flexDirection:"column",gap:8,alignItems:"center",width:82},children:[/* @__PURE__ */E(Ll,{theme:b,selected:s,onPress:()=>i(e),style:{alignSelf:"stretch"},children:/* @__PURE__ */E(fi,{numberOfLines:1,style:{color:di(b,s).color,fontSize:14,fontWeight:"700"},children:a?a(e):`Multi ${e}`})}),!z&&r>0&&/* @__PURE__ */U(j,{children:[/* @__PURE__ */E(W,{style:[xh.tableCell,{backgroundColor:`${o.success}15`,alignSelf:"stretch"}],children:/* @__PURE__ */U(fi,{style:[xh.tableCellText,{color:o.success}],children:[e,"/",e]})}),B?null!=c&&/* @__PURE__ */E(W,{style:[xh.tableCell,{backgroundColor:`${o.primary}12`,alignSelf:"stretch"}],children:/* @__PURE__ */E(fi,{style:[xh.tableCellText,{color:o.primary}],children:yt(c)})}):/* @__PURE__ */E(W,{style:[xh.tableCell,{backgroundColor:`${o.primary}12`,alignSelf:"stretch"}],children:/* @__PURE__ */E(fi,{style:[xh.tableCellText,{color:o.primary}],children:yt(r)})})]})]},String(e))})]});/* @__PURE__ */
471
+ /* @__PURE__ */E(vi,{theme:i,variant:"quiet",accessibilityLabel:`${Kr} leg ${Z.number}`,onPress:()=>{J(null),m(Z.id,Z.side)},children:Kr})]}):null,
472
+ /* @__PURE__ */U(W,{style:{flexDirection:"row",alignItems:"stretch",gap:8},children:[/* @__PURE__ */U(W,Y?{accessibilityLabel:`${Xr}. ${mr(r)}`,style:{flexDirection:"row",alignItems:"center",gap:8,borderRadius:sn(i,10),paddingHorizontal:12,borderWidth:1,borderColor:z.border,backgroundColor:z.backgroundAlt},children:[/* @__PURE__ */E(fi,{style:{fontSize:15,fontWeight:"800",color:z.text},children:yt(u)}),/* @__PURE__ */E(fi,{style:{fontSize:10,color:z.textMuted},children:"locked"})]}:{style:{flexDirection:"row",alignItems:"center",width:96,borderRadius:sn(i,10),borderWidth:1,borderColor:z.border,backgroundColor:z.background,overflow:"hidden"},children:[/* @__PURE__ */E(fi,{style:{paddingLeft:11,fontSize:16,fontWeight:"800",color:z.text},children:"$"}),/* @__PURE__ */E(gi,{keyboardType:"decimal-pad",accessibilityLabel:Xr,value:u,onChangeText:e=>{H.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:z.text,fontFamily:o}})]}),/* @__PURE__ */E(vi,{theme:i,size:"lg",disabled:O,onPress:()=>{c(),t?.()},style:{flex:1,minWidth:0},children:/* @__PURE__ */U(W,{style:{alignItems:"center",minWidth:0},children:[L.dividend>0?/* @__PURE__ */U(fi,{numberOfLines:1,style:[{fontSize:10,fontWeight:"700",letterSpacing:.8,textTransform:"uppercase"},{color:tn(G,.8)}],children:[qr," ",
473
+ /* @__PURE__ */E(fi,{style:{fontSize:13,fontWeight:"800",letterSpacing:0,color:O?G:V},children:L.dividendText})]}):null,/* @__PURE__ */E(fi,{numberOfLines:1,style:{fontSize:li.fontSize.lg,fontWeight:String(li.weight),color:G},children:L.ctaLabel})]})})]})]})}function yh(){const{theme:t,propositions:n,uiVariant:i}=ml(),[o,r]=e.useState(!1),l=la(t),a=!ri(i);return 0===n.length?null:/* @__PURE__ */U(j,{children:[/* @__PURE__ */E(vi,{theme:l,variant:"quiet",accessibilityLabel:"Swipe all matches",icon:/* @__PURE__ */E(Rc,{color:l.colors.primary}),onPress:()=>r(!0),style:[{flexShrink:0},a&&{width:44,paddingHorizontal:0}],children:a?void 0:ul}),o?/* @__PURE__ */E(Ic,{propositions:n,title:"All matches",onClose:()=>r(!1)}):null]})}function mh({view:e,onChange:t}){const n=la(ml().theme),i="list"===e?"swipe":"list";/* @__PURE__ */
474
+ return E(vi,{theme:n,variant:"quiet",onPress:()=>t(i),style:{flexShrink:0},children:"swipe"===i?ul:"List"})}function bh({onNext:t,onBack:n,hideTitle:i,hideActions:o,defaultView:r="list",view:l,onViewChange:a,hideViewSwitch:s,onSwipeDragStateChange:c}){const d=ml(),{selectedRule:h,correlation:u,correlationTargetCount:f,selectionValid:g,selectionUndo:p}=d,{theme:y,selectedGame:m,propositions:b,selections:w,toggleSelection:x,loading:v,error:B,disableQuickPick:C,renderTeamLogo:S,filterSport:z,initialSport:F,gameCategory:A,selectedPropositionCount:P,handlePropositionCountChange:T,goToConfirmation:D,goBack:H,selectedCategory:M,setSelectedCategory:L,selectedSport:R,selectedEventId:I,propositionsForCategoryPicker:O,answeredCount:G}=d,[V,Y]=e.useState(r),N=l??V,X=e.useCallback(e=>{void 0===l&&Y(e),a?.(e)},[l,a]);e.useEffect(()=>{m||(d.goToSportSelection(),n?.())},[m,d,n]);const q=e.useMemo(()=>{if(!m)return null;if(xr(m))return f;const{min:e,max:t}=Wt(m,P??void 0,h);return e>0&&e===t?e:ur(m,P)},[m,P,f]),K=e.useRef(!1),Q=e.useRef(G);e.useEffect(()=>{const e=Q.current;if(Q.current=G,null==q)return;const n=e===q-1&&G===q&&!p;if(xr(m)){if(G!==q&&(K.current=!1),n&&(K.current=!0),!K.current||!g)return;return K.current=!1,D(),void t?.()}n&&(D(),t?.())},[G,q,g]);const J=e.useMemo(()=>Bt(O??[]),[O]);if(e.useEffect(()=>{m&&1===J.length&&M!==J[0]&&L(J[0])},[m,J,M,L]),!m)return null;const Z=J.length>1&&!M,$=!Z&&be(m)&&!I,_=(()=>{if(xr(m))return{...m,allowed_propositions:u.data?.supported_counts??m.allowed_propositions};if(!be(m)||!I)return m;const e=Math.min(m.max_propositions??b.length,b.length);return{...m,max_propositions:e,allowed_propositions:m.allowed_propositions?.filter(t=>t<=e)}})(),ee=()=>{H(),n?.()},te="default"===d.uiVariant||o?W:k;/* @__PURE__ */
475
+ return U(W,{style:wh.container,children:[!i&&/* @__PURE__ */E(W,{style:{marginBottom:qn(d.uiVariant)?0:ri(d.uiVariant)?Pl:24},children:/* @__PURE__ */E(uh,{onBack:o?ee:void 0,onNext:o?t:void 0,hideActions:o})}),!be(m)&&/* @__PURE__ */E(Vd,{}),xr(m)&&!Z&&!$&&/* @__PURE__ */U(j,{children:[/* @__PURE__ */E(Zd,{}),u.error&&/* @__PURE__ */E(vi,{theme:y,variant:"quiet",onPress:u.retry,style:{alignSelf:"flex-start"},children:"Retry available choices"})]}),
476
+ /* @__PURE__ */U(te,{style:wh.content,children:[Z?/* @__PURE__ */E(lh,{hideTitle:!0,hideActions:!0,onSelectCategory:e=>L(e)}):$?/* @__PURE__ */E(dh,{}):"swipe"===N?/* @__PURE__ */E(Mc,{onBack:ee,onNext:t,viewSwitch:s?void 0:/* @__PURE__ */E(mh,{view:N,onChange:X}),onDragStateChange:c}):/* @__PURE__ */E(gd,{game:_,propositions:b,selections:w,onToggleSelection:x,onBack:ee,loading:v,error:B,theme:y,hideActions:!0,initialSport:z??F,renderTeamLogo:S,disableQuickPick:!0,selectedPropositionCount:xr(m)?f:P,onPropositionCountChange:T,gameCategory:A,headerExtra:s?void 0:/* @__PURE__ */E(yh,{}),railSlot:e=>qn(d.uiVariant)?/* @__PURE__ */E(As,{actions:e}):/* @__PURE__ */E(nh,{actions:e,label:null,sublabel:null})}),!ri(d.uiVariant)&&/* @__PURE__ */E(Xd,{})]}),!o&&!Z&&!$&&(ri(d.uiVariant)?/* @__PURE__ */U(W,{style:{marginTop:16,flexShrink:0},children:[/* @__PURE__ */E(gh,{}),/* @__PURE__ */E(Ll,{theme:y,children:/* @__PURE__ */E(ph,{onNext:t,onBack:n})})]}):/* @__PURE__ */E(W,{style:{marginTop:qn(d.uiVariant)?0:16,flexShrink:0},children:/* @__PURE__ */E(ph,{onNext:t,onBack:n})}))]})}var wh=B.create({container:{flex:1},content:{flex:1}});function xh({tiers:e,game:t,selectedCount:n,onSelect:i,colors:o,bodyFont:r,extraBetAmount:l,buttonLabel:a,columnLabel:s="Legs",buildYourOwn:c,quickPickOnly:h,onQuickPick:u,collapsible:f,expanded:g,onExpandedChange:p,summaryTiers:y,theme:m}){const b=Dl(m),[w,x]=d(!1),v=g??w,B=null!=l&&20!==l,C=B?`$${Math.round(l)} returns`:"$20 returns",S=e.some(e=>e.payout20>0),z=!!f&&!v,F=S&&!z,A=(y??e).reduce((e,t)=>t.payout20>e?t.payout20:e,0),P=B&&A>0?wr(A*(l/20),t):A,T=e.length>0?82*e.length+8*Math.max(0,e.length-1):82,D=/* @__PURE__ */U(j,{children:[/* @__PURE__ */U(W,{style:{flexDirection:"column",gap:8,width:70,flexShrink:0},children:[/* @__PURE__ */E(W,{style:{paddingVertical:6,justifyContent:"center"},children:/* @__PURE__ */E(fi,{style:[vh.labelText,{color:o.textMuted,fontFamily:r}],children:h?"Quick Pick":s})}),F&&/* @__PURE__ */U(j,{children:[/* @__PURE__ */E(W,{style:{paddingVertical:4,justifyContent:"center"},children:/* @__PURE__ */E(fi,{style:[vh.labelText,{color:o.textMuted,fontFamily:r}],children:"Dividend"})}),/* @__PURE__ */E(W,{style:{paddingVertical:4,justifyContent:"center"},children:/* @__PURE__ */E(fi,{style:[vh.labelText,{color:o.textMuted,fontFamily:r}],children:C})})]})]}),h?/* @__PURE__ */U(W,{style:{gap:8,alignSelf:"flex-start",width:T},children:[/* @__PURE__ */E(as,{theme:m,counts:(y??e).map(e=>e.count),onPick:e=>u?u(e):i(e),align:"left",direction:"up",colors:{background:o.background??"#ffffff",backgroundAlt:o.backgroundAlt??"#f3f4f6",border:o.border??"#e5e7eb",text:o.text??"#111827"}}),S&&!z&&/* @__PURE__ */E(W,{style:{flexDirection:"row",gap:8},children:e.map(({count:e,payout20:n})=>{const i=B&&n>0?wr(n*(l/20),t):null;/* @__PURE__ */
477
+ return U(W,{style:{flexDirection:"column",gap:8,alignItems:"center",width:82},children:[/* @__PURE__ */E(W,{style:[vh.tableCell,{backgroundColor:`${o.success}15`,alignSelf:"stretch"}],children:/* @__PURE__ */U(fi,{style:[vh.tableCellText,{color:o.success}],children:[e,"/",e]})}),/* @__PURE__ */E(W,{style:[vh.tableCell,{backgroundColor:`${o.primary}12`,alignSelf:"stretch"}],children:/* @__PURE__ */E(fi,{style:[vh.tableCellText,{color:o.primary}],children:n>0?yt(i??n):"—"})})]},String(e))})})]}):c?/* @__PURE__ */U(W,{style:{gap:8,alignSelf:"flex-start",width:T},children:[/* @__PURE__ */E(vi,{theme:b,block:!0,onPress:()=>i(e[0]?.count??0),children:"Make Your Selections"}),S&&!z&&/* @__PURE__ */E(W,{style:{flexDirection:"row",gap:8},children:e.map(({count:e,payout20:n})=>{const i=n>0?yt(B?wr(n*(l/20),t):n):"—";/* @__PURE__ */
478
+ return U(W,{style:{flexDirection:"column",gap:8,alignItems:"center",width:82},children:[/* @__PURE__ */E(W,{style:[vh.tableCell,{backgroundColor:`${o.success}15`,alignSelf:"stretch"}],children:/* @__PURE__ */U(fi,{style:[vh.tableCellText,{color:o.success}],children:[e,"/",e]})}),/* @__PURE__ */E(W,{style:[vh.tableCell,{backgroundColor:`${o.primary}12`,alignSelf:"stretch"}],children:/* @__PURE__ */E(fi,{style:[vh.tableCellText,{color:o.primary}],children:i})})]},String(e))})})]}):e.map(({count:e,payout20:r})=>{const s=n===e,c=B&&r>0?wr(r*(l/20),t):null;/* @__PURE__ */
479
+ return U(W,{style:{flexDirection:"column",gap:8,alignItems:"center",width:82},children:[/* @__PURE__ */E(Rl,{theme:b,selected:s,onPress:()=>i(e),style:{alignSelf:"stretch"},children:/* @__PURE__ */E(fi,{numberOfLines:1,style:{color:di(b,s).color,fontSize:14,fontWeight:"700"},children:a?a(e):`Multi ${e}`})}),!z&&r>0&&/* @__PURE__ */U(j,{children:[/* @__PURE__ */E(W,{style:[vh.tableCell,{backgroundColor:`${o.success}15`,alignSelf:"stretch"}],children:/* @__PURE__ */U(fi,{style:[vh.tableCellText,{color:o.success}],children:[e,"/",e]})}),B?null!=c&&/* @__PURE__ */E(W,{style:[vh.tableCell,{backgroundColor:`${o.primary}12`,alignSelf:"stretch"}],children:/* @__PURE__ */E(fi,{style:[vh.tableCellText,{color:o.primary}],children:yt(c)})}):/* @__PURE__ */E(W,{style:[vh.tableCell,{backgroundColor:`${o.primary}12`,alignSelf:"stretch"}],children:/* @__PURE__ */E(fi,{style:[vh.tableCellText,{color:o.primary}],children:yt(r)})})]})]},String(e))})]});/* @__PURE__ */
480
480
  return U(W,{style:{flexDirection:"column",gap:8,alignSelf:"stretch"},children:[h?/* @__PURE__ */E(W,{style:{flexDirection:"row",gap:8,alignItems:"flex-start",paddingBottom:6},children:D}):/* @__PURE__ */E(k,{horizontal:!0,showsHorizontalScrollIndicator:!1,contentContainerStyle:{flexDirection:"row",gap:8,alignItems:"flex-start",paddingBottom:6},children:D}),f&&(S?/* @__PURE__ */U(W,{style:{alignSelf:"flex-start",flexDirection:"row",flexWrap:"wrap",alignItems:"center",columnGap:8,rowGap:4,maxWidth:"100%"},children:[/* @__PURE__ */U(fi,{style:{fontSize:12,fontWeight:"600",color:o.text,fontFamily:r},children:["Win up to ",
481
481
  /* @__PURE__ */E(fi,{style:{color:o.heading??o.text??o.primary},children:yt(P)}),
482
- /* @__PURE__ */E(fi,{style:{color:o.textMuted},children:` for $${B?Math.round(l):20}`})]}),/* @__PURE__ */E(vi,{theme:b,variant:"quiet",onPress:()=>{return e=!v,void 0===g&&x(e),void p?.(e);var e},accessibilityState:{expanded:v},children:v?"Hide dividends":"Show dividends"})]}):/* @__PURE__ */E(W,{style:{alignSelf:"flex-start",minHeight:44,opacity:0},pointerEvents:"none",children:/* @__PURE__ */E(fi,{style:{fontSize:12,fontWeight:"600",fontFamily:r},children:"Show dividends"})}))]})}var xh=B.create({labelText:{fontSize:12,fontWeight:"400"},tableCell:{paddingHorizontal:8,paddingVertical:4,borderRadius:6,alignItems:"center",justifyContent:"center"},tableCellText:{fontSize:12,fontWeight:"700"}});function vh({shelf:e,layout:t,style:n,children:i,theme:o}){return e?/* @__PURE__ */E(Hl,{style:t,children:i}):/* @__PURE__ */E(W,{style:[{padding:16,borderWidth:1,borderRadius:sn(o,12),borderColor:o.colors.border,backgroundColor:kn(o),shadowColor:"#000",shadowOpacity:"dark"===o.colorScheme?.4:.12,shadowRadius:12,shadowOffset:{width:0,height:6},elevation:2},n,t],children:i})}function kh(e){return{game_id:e.selectedGame.id,rule_id:e.selectedRule?.id??null,proposition_ids:e.selectedPropositionIds,selections:e.selections,stake:e.betAmount}}function Bh({onBack:e,hideActions:t}={}){const n=Zn(),{theme:i,selectedGame:o,selectedEventId:r,propositions:l,quickPickSelections:a,upgradePropositionCount:s,selectedPropositionCount:c,disableQuickPick:d,answeredCount:h,selectedRule:u}=yl(),f=i.colors,g=o?Wt(o,c,u):{min:0,max:0},p=g.min,y=be(o)&&r?Math.min(g.max,l.length):g.max,m=p>0&&p===y,b=ur(o,c)??(m?y:y||l.length),w=(e,t="fill")=>{s(a(e??b,t))},x=!xr(o)&&!d&&l.length>0,v=gr(o,u,l.length),k=h>0?h:p||b,B=pr(v,h,b,k);/* @__PURE__ */
483
- return E(Cs,{title:"call"===n?"Review your calls.":"shelf"===n||"playbook"===n?"Review your picks":"Place Your Wager",onBack:o?e:void 0,backLabel:o?.game_name,actions:x?"menu"===B.kind?/* @__PURE__ */E(ls,{counts:B.counts,current:h,hint:B.hint,onPick:e=>w(e),onDoubleAction:B.counts.length?()=>w(k):void 0,onFill:B.fillLabel?()=>w():void 0,fillLabel:B.fillLabel,onRandomise:B.randomise?()=>w(B.randomise.count,"replace"):void 0,randomiseLabel:B.randomise?.label,colors:f,menuShadow:dn(i),theme:i}):/* @__PURE__ */E(ns,{hint:B.hint,onPress:()=>w(void 0,B.mode)}):null})}function Ch({onBack:e,onSubmitted:t,authenticated:n=!0,onUnauthenticated:i}){const o=yl(),r="shelf"===Zn(),{theme:l,selectedGame:a,expectedCorrect:s,betAmount:c,submitting:d,submitError:h,canSubmit:u,confirmPending:f,payouts:g,selectedPropositionIds:p,screenSize:y}=o,m=ra(l),b=m.colors,{width:w}=F(),x=w>=640;if(!a)return null;const v=g[s]??0,k=Ft(a),B=s===p.length,C=k?.enabled&&B,S=e&&"mobile"!==y;/* @__PURE__ */
484
- return U(W,{style:zh.footer,children:[S&&/* @__PURE__ */E(vi,{theme:m,size:"lg",variant:"secondary",onPress:e,children:"Back"}),/* @__PURE__ */U(W,{style:zh.footerRight,children:[h?/* @__PURE__ */E(fi,{style:[zh.errorText,{color:b.error}],children:h}):null,(v>0||C)&&x&&/* @__PURE__ */U(W,{style:zh.payoutInfo,children:[/* @__PURE__ */E(fi,{style:[zh.payoutLabel,{color:b.textMuted}],children:"Potential winnings"}),/* @__PURE__ */U(fi,{style:[zh.payoutAmount,{color:b.heading??b.text}],children:[yt(v),C?/* @__PURE__ */E(fi,{style:{color:b.warning},children:" + Jackpot"}):null]})]}),
485
- /* @__PURE__ */E(vi,{variant:f?"confirm":"primary",theme:m,size:"lg",disabled:!u,onPress:async()=>{n?await o.handleSubmit()&&t?.():i?.(kh(o))},children:n?d?"Placing…":r?`${f?"Confirm":"Place"} entry · ${yt(c)}`:`${f?"Confirm":"Place"} Entry (${yt(c)})`:"Log in to place entry"})]})]})}function Sh({onBack:e,onSubmitted:t,authenticated:n=!0,onUnauthenticated:i,hideTitle:o,hideActions:r}){const a=yl(),{theme:s,selectedGame:c,selectedPropositions:d,selections:h,compositeComponentById:u,propositions:f,selectedPropositionCount:g,selectedEventId:p,expectedCorrect:y,setExpectedCorrect:m,betAmount:b,setBetAmount:w,submitting:x,submitError:v,canSubmit:k,confirmPending:B,winningCounts:C,payouts:S,overloadPayouts:z,renderTeamLogo:A,userBalance:P,onRecharge:T,goBack:D,toggleSelection:H,upgradePropositionCount:M,goToSportSelection:L,selectedRule:R}=a,I=s.colors,O="shelf"===Zn(),G=ra(s),V=O?s:G,Y=V.colors,{width:N}=F(),X=N>=640;if(l(()=>{c||(L(),e?.())},[c,L,e]),!c)return null;const q=!!(c.allowed_propositions&&c.allowed_propositions.length>0),K=Wt(c,g,R),Q=ur(c,g),J=Q??K.min,Z=Q??(be(c)&&p?Math.min(K.max,f.length):K.max),$=Object.keys(h).length,_=J>0&&$<J,ee=!fr(c)&&!q&&J>0&&Z>J&&$>=J&&$<Z,te=q?[...c.allowed_propositions??[]].sort((e,t)=>e-t).filter(e=>e>(g??0)):[],ne=q&&te.length>0&&!_,ie=ee||ne;I.textAlt??I.text;const oe=()=>{D(),e?.()},re=(q?[...c.allowed_propositions??[]].sort((e,t)=>t-e):[]).find(e=>e===$&&e<(g??1/0)),le=q&&$<Math.min(...c.allowed_propositions??[1/0]),ae=q&&_&&!le,se=dr(c),ce=function(e,t,n,i){const o=e?.description?.trim();if(o)return o;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.";const a=r.length/2;if(r.length>=2&&r.length%2==0&&r.every((e,t)=>t<a?e===t:e===n-(r.length-1-t))){const e=a-1,t=`Get all ${n} picks right — or all ${n} wrong — to win.`;return 0===e?t:`${t} ${1===e?"One miss":`Up to ${e} misses`} either way still wins.`}if(!r.every((e,t)=>e===l+t)||r[r.length-1]!==n)return`Get exactly ${r.length>1?`${r.slice(0,-1).join(", ")} or ${r[r.length-1]}`:`${r[0]}`} of your ${n} picks right to win.`;const s=r.map(e=>i?.[e]).filter(e=>Number.isFinite(e));if(s.length===r.length&&s.length>1&&s.every((e,t)=>0===t||e>s[t-1]))return`Get at least ${l} of your ${n} picks right to win — every extra right pick grows the prize.`;const c=n-l;return`Get at least ${l} of your ${n} picks right to win — you can miss ${1===c?"one":`up to ${c}`}.`}(R,C,$,S),de=S[$]||br(c,$,b),he=(C??[]).length>1?"Top prize":"That pays",ue=hr(C,$,S),fe=O&&b>0&&!!ja(c,$,b,y),ge=null!=re?se.belowRequiredHint(re,g??J):se.belowRequiredAddOnlyHint(g??J);return l(()=>{!_||q&&!le||oe()},[_,q,le]),/* @__PURE__ */U(W,{style:zh.container,children:[!o&&/* @__PURE__ */E(W,{style:{marginBottom:O?Al:24},children:/* @__PURE__ */E(Bh,{onBack:e,hideActions:r})}),
486
- /* @__PURE__ */E(Jd,{}),
487
- /* @__PURE__ */E(W,{style:zh.content,children:/* @__PURE__ */E(vd,{componentById:u,game:c,propositions:d,selections:h,onToggleSelection:H,onRemoveSelection:()=>{},onSubmit:async()=>{n?await a.handleSubmit()&&t?.():i?.(kh(a))},confirming:B,onBack:oe,loading:x,error:v,expectedCorrect:y,onExpectedCorrectChange:m,betAmount:b,onBetAmountChange:w,theme:s,showCustomAmount:!0,betAmountLocked:yr(c),betAmountLockedNote:mr(c),hideActions:!0,winningCounts:C,payouts:S,renderTeamLogo:A,canSubmit:k,authenticated:n,userBalance:P,onRecharge:T,aboveDock:/* @__PURE__ */E(fh,{}),boostBanner:/* @__PURE__ */U(j,{children:[ie&&/* @__PURE__ */E(vh,{shelf:O,theme:V,children:ne?(()=>{const e=g??$,t=z[e],n=b>0?b:20,i=null!=t&&t>0?wr(t*(n/20),c):null;/* @__PURE__ */
482
+ /* @__PURE__ */E(fi,{style:{color:o.textMuted},children:` for $${B?Math.round(l):20}`})]}),/* @__PURE__ */E(vi,{theme:b,variant:"quiet",onPress:()=>{return e=!v,void 0===g&&x(e),void p?.(e);var e},accessibilityState:{expanded:v},children:v?"Hide dividends":"Show dividends"})]}):/* @__PURE__ */E(W,{style:{alignSelf:"flex-start",minHeight:44,opacity:0},pointerEvents:"none",children:/* @__PURE__ */E(fi,{style:{fontSize:12,fontWeight:"600",fontFamily:r},children:"Show dividends"})}))]})}var vh=B.create({labelText:{fontSize:12,fontWeight:"400"},tableCell:{paddingHorizontal:8,paddingVertical:4,borderRadius:6,alignItems:"center",justifyContent:"center"},tableCellText:{fontSize:12,fontWeight:"700"}});function kh({shelf:e,layout:t,style:n,children:i,theme:o}){return e?/* @__PURE__ */E(Ml,{style:t,children:i}):/* @__PURE__ */E(W,{style:[{padding:16,borderWidth:1,borderRadius:sn(o,12),borderColor:o.colors.border,backgroundColor:kn(o),shadowColor:"#000",shadowOpacity:"dark"===o.colorScheme?.4:.12,shadowRadius:12,shadowOffset:{width:0,height:6},elevation:2},n,t],children:i})}function Bh(e){return{game_id:e.selectedGame.id,rule_id:e.selectedRule?.id??null,proposition_ids:e.selectedPropositionIds,selections:e.selections,stake:e.betAmount}}function Ch({onBack:e,hideActions:t}={}){const n=Zn(),{theme:i,selectedGame:o,selectedEventId:r,propositions:l,quickPickSelections:a,upgradePropositionCount:s,selectedPropositionCount:c,disableQuickPick:d,answeredCount:h,selectedRule:u}=ml(),f=i.colors,g=o?Wt(o,c,u):{min:0,max:0},p=g.min,y=be(o)&&r?Math.min(g.max,l.length):g.max,m=p>0&&p===y,b=ur(o,c)??(m?y:y||l.length),w=(e,t="fill")=>{s(a(e??b,t))},x=!xr(o)&&!d&&l.length>0,v=gr(o,u,l.length),k=h>0?h:p||b,B=pr(v,h,b,k);/* @__PURE__ */
483
+ return E(Ss,{title:"call"===n?"Review your calls.":"shelf"===n||"playbook"===n?"Review your picks":"Place Your Wager",onBack:o?e:void 0,backLabel:o?.game_name,actions:x?"menu"===B.kind?/* @__PURE__ */E(as,{counts:B.counts,current:h,hint:B.hint,onPick:e=>w(e),onDoubleAction:B.counts.length?()=>w(k):void 0,onFill:B.fillLabel?()=>w():void 0,fillLabel:B.fillLabel,onRandomise:B.randomise?()=>w(B.randomise.count,"replace"):void 0,randomiseLabel:B.randomise?.label,colors:f,menuShadow:dn(i),theme:i}):/* @__PURE__ */E(is,{hint:B.hint,onPress:()=>w(void 0,B.mode)}):null})}function Sh({onBack:e,onSubmitted:t,authenticated:n=!0,onUnauthenticated:i}){const o=ml(),r="shelf"===Zn(),{theme:l,selectedGame:a,expectedCorrect:s,betAmount:c,submitting:d,submitError:h,canSubmit:u,confirmPending:f,payouts:g,selectedPropositionIds:p,screenSize:y}=o,m=la(l),b=m.colors,{width:w}=F(),x=w>=640;if(!a)return null;const v=g[s]??0,k=Ft(a),B=s===p.length,C=k?.enabled&&B,S=e&&"mobile"!==y;/* @__PURE__ */
484
+ return U(W,{style:Wh.footer,children:[S&&/* @__PURE__ */E(vi,{theme:m,size:"lg",variant:"secondary",onPress:e,children:"Back"}),/* @__PURE__ */U(W,{style:Wh.footerRight,children:[h?/* @__PURE__ */E(fi,{style:[Wh.errorText,{color:b.error}],children:h}):null,(v>0||C)&&x&&/* @__PURE__ */U(W,{style:Wh.payoutInfo,children:[/* @__PURE__ */E(fi,{style:[Wh.payoutLabel,{color:b.textMuted}],children:"Potential winnings"}),/* @__PURE__ */U(fi,{style:[Wh.payoutAmount,{color:b.heading??b.text}],children:[yt(v),C?/* @__PURE__ */E(fi,{style:{color:b.warning},children:" + Jackpot"}):null]})]}),
485
+ /* @__PURE__ */E(vi,{variant:f?"confirm":"primary",theme:m,size:"lg",disabled:!u,onPress:async()=>{n?await o.handleSubmit()&&t?.():i?.(Bh(o))},children:n?d?"Placing…":r?`${f?"Confirm":"Place"} entry · ${yt(c)}`:`${f?"Confirm":"Place"} Entry (${yt(c)})`:"Log in to place entry"})]})]})}function zh({onBack:e,onSubmitted:t,authenticated:n=!0,onUnauthenticated:i,hideTitle:o,hideActions:r}){const a=ml(),{theme:s,selectedGame:c,selectedPropositions:d,selections:h,compositeComponentById:u,propositions:f,selectedPropositionCount:g,selectedEventId:p,expectedCorrect:y,setExpectedCorrect:m,betAmount:b,setBetAmount:w,submitting:x,submitError:v,canSubmit:k,confirmPending:B,winningCounts:C,payouts:S,overloadPayouts:z,renderTeamLogo:A,userBalance:P,onRecharge:T,goBack:D,toggleSelection:H,upgradePropositionCount:M,goToSportSelection:L,selectedRule:R}=a,I=s.colors,O="shelf"===Zn(),G=la(s),V=O?s:G,Y=V.colors,{width:N}=F(),X=N>=640;if(l(()=>{c||(L(),e?.())},[c,L,e]),!c)return null;const q=!!(c.allowed_propositions&&c.allowed_propositions.length>0),K=Wt(c,g,R),Q=ur(c,g),J=Q??K.min,Z=Q??(be(c)&&p?Math.min(K.max,f.length):K.max),$=Object.keys(h).length,_=J>0&&$<J,ee=!fr(c)&&!q&&J>0&&Z>J&&$>=J&&$<Z,te=q?[...c.allowed_propositions??[]].sort((e,t)=>e-t).filter(e=>e>(g??0)):[],ne=q&&te.length>0&&!_,ie=ee||ne;I.textAlt??I.text;const oe=()=>{D(),e?.()},re=(q?[...c.allowed_propositions??[]].sort((e,t)=>t-e):[]).find(e=>e===$&&e<(g??1/0)),le=q&&$<Math.min(...c.allowed_propositions??[1/0]),ae=q&&_&&!le,se=dr(c),ce=function(e,t,n,i){const o=e?.description?.trim();if(o)return o;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.";const a=r.length/2;if(r.length>=2&&r.length%2==0&&r.every((e,t)=>t<a?e===t:e===n-(r.length-1-t))){const e=a-1,t=`Get all ${n} picks right — or all ${n} wrong — to win.`;return 0===e?t:`${t} ${1===e?"One miss":`Up to ${e} misses`} either way still wins.`}if(!r.every((e,t)=>e===l+t)||r[r.length-1]!==n)return`Get exactly ${r.length>1?`${r.slice(0,-1).join(", ")} or ${r[r.length-1]}`:`${r[0]}`} of your ${n} picks right to win.`;const s=r.map(e=>i?.[e]).filter(e=>Number.isFinite(e));if(s.length===r.length&&s.length>1&&s.every((e,t)=>0===t||e>s[t-1]))return`Get at least ${l} of your ${n} picks right to win — every extra right pick grows the prize.`;const c=n-l;return`Get at least ${l} of your ${n} picks right to win — you can miss ${1===c?"one":`up to ${c}`}.`}(R,C,$,S),de=S[$]||br(c,$,b),he=(C??[]).length>1?"Top prize":"That pays",ue=hr(C,$,S),fe=O&&b>0&&!!Ea(c,$,b,y),ge=null!=re?se.belowRequiredHint(re,g??J):se.belowRequiredAddOnlyHint(g??J);return l(()=>{!_||q&&!le||oe()},[_,q,le]),/* @__PURE__ */U(W,{style:Wh.container,children:[!o&&/* @__PURE__ */E(W,{style:{marginBottom:O?Pl:24},children:/* @__PURE__ */E(Ch,{onBack:e,hideActions:r})}),
486
+ /* @__PURE__ */E(Zd,{}),
487
+ /* @__PURE__ */E(W,{style:Wh.content,children:/* @__PURE__ */E(kd,{componentById:u,game:c,propositions:d,selections:h,onToggleSelection:H,onRemoveSelection:()=>{},onSubmit:async()=>{n?await a.handleSubmit()&&t?.():i?.(Bh(a))},confirming:B,onBack:oe,loading:x,error:v,expectedCorrect:y,onExpectedCorrectChange:m,betAmount:b,onBetAmountChange:w,theme:s,showCustomAmount:!0,betAmountLocked:yr(c),betAmountLockedNote:mr(c),hideActions:!0,winningCounts:C,payouts:S,renderTeamLogo:A,canSubmit:k,authenticated:n,userBalance:P,onRecharge:T,aboveDock:/* @__PURE__ */E(gh,{}),boostBanner:/* @__PURE__ */U(j,{children:[ie&&/* @__PURE__ */E(kh,{shelf:O,theme:V,children:ne?(()=>{const e=g??$,t=z[e],n=b>0?b:20,i=null!=t&&t>0?wr(t*(n/20),c):null;/* @__PURE__ */
488
488
  return U(W,{children:[
489
489
  /* @__PURE__ */E(fi,{style:{fontSize:14,fontWeight:"600",color:Y.primary,marginBottom:4},children:se.overloadTitle}),null!=i&&/* @__PURE__ */U(fi,{style:{fontSize:12,color:Y.textMuted,marginBottom:8},children:["Currently winning up to ",
490
490
  /* @__PURE__ */E(fi,{style:{color:Y.heading??Y.text,fontWeight:"700"},children:yt(i)}),` with ${e} picks`]}),
491
- /* @__PURE__ */E(wh,{game:c,tiers:te.map(e=>({count:e,payout20:z[e]??0})),selectedCount:void 0,onSelect:e=>{M(e),oe()},colors:Y,bodyFont:a.bodyFont,extraBetAmount:20!==n?n:void 0,columnLabel:se.tableColumnLabel,buttonLabel:se.tierButtonLabel,theme:V})]})})():/* @__PURE__ */E(vi,{theme:V,variant:"secondary",block:!0,onPress:oe,children:"Add more picks"})}),ae&&/* @__PURE__ */U(vh,{shelf:O,theme:V,style:{backgroundColor:`${Y.warning}18`},layout:{flexDirection:X?"row":"column",alignItems:X?"center":"flex-start",justifyContent:"space-between",gap:12},children:[/* @__PURE__ */U(fi,{style:{fontSize:X?14:12,color:Y.text,flexShrink:1},children:["You have ",
492
- /* @__PURE__ */U(fi,{style:{fontWeight:"700"},children:[$," pick",1!==$?"s":""]}),`. ${ge}`]}),/* @__PURE__ */U(W,{style:{flexDirection:"row",gap:8,flexShrink:0},children:[/* @__PURE__ */E(vi,{theme:V,variant:"secondary",onPress:oe,children:"Add a pick"}),null!=re&&/* @__PURE__ */E(vi,{theme:V,variant:"secondary",onPress:()=>M(re),children:se.switchTierLabel(re)})]})]}),(ce||!fe&&de>0)&&/* @__PURE__ */U(vh,{shelf:O,theme:V,children:[ce&&/* @__PURE__ */E(fi,{style:{fontSize:X?14:12,color:Y.text},children:ce}),fe?null:ue.length>0?/* @__PURE__ */E(W,{style:{marginTop:8,gap:4},children:ue.map(e=>/* @__PURE__ */U(W,{style:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",gap:12},children:[/* @__PURE__ */E(fi,{style:{fontSize:X?14:12,color:Y.textMuted},children:e.label}),/* @__PURE__ */E(fi,{style:{fontSize:X?14:12,fontWeight:"700",color:hn(V)},children:yt(e.prize)})]},e.count))}):de>0&&/* @__PURE__ */U(fi,{style:{fontSize:X?14:12,color:Y.textMuted,marginTop:6},children:[`${he} `/* @__PURE__ */,E(fi,{style:{fontWeight:"700",color:hn(V)},children:yt(de)})]})]})]})})}),r&&v?/* @__PURE__ */E(W,{style:{marginTop:12,alignItems:"flex-end"},children:/* @__PURE__ */E(fi,{style:[zh.errorText,{color:I.error}],children:v})}):null,
493
- /* @__PURE__ */E(Nd,{})]})}var zh=B.create({container:{flex:1},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"}});function Wh(e={}){const{theme:t,selectedGame:n}=yl(),i=ra(t);/* @__PURE__ */
494
- return E(Cs,{title:"Entry placed",backLabel:n?.game_name,leading:/* @__PURE__ */E(ks,{testID:"entry-placed-check",color:Qa(i).accent})})}function Fh({onPlayAgain:e,onDone:t,onShare:n}){const{theme:i,reset:o,placedEntry:r,selectedGame:l,selectedPropositions:a,selections:s,betAmount:c}=yl();/* @__PURE__ */
495
- return U(Ml,{theme:i,testID:"entry-placed-dock",children:[t&&/* @__PURE__ */E(vi,{size:"lg",theme:i,block:!0,onPress:t,children:"View my entries"}),/* @__PURE__ */E(vi,{size:"lg",theme:i,variant:"secondary",block:!0,onPress:()=>{o(),e?.()},children:"Play again"})]})}function Ah({onPlayAgain:t,onDone:n,onShare:i,hideTitle:o,hideActions:r}){const l=yl(),{theme:a,bodyFont:s,headingFont:c,selectedGame:d,placedEntry:h,betAmount:u,selectedPropositionIds:f,selectedPropositions:g,selections:p,payouts:y,winningCounts:m,expectedCorrect:b,onShare:w}=l,x=a.colors,v=i??w,k=e.useRef(!1);if(e.useEffect(()=>{h&&d?k.current=!1:(l.goToSportSelection(),k.current||(k.current=!0,t?t():n?.()))},[h,d,l,t,n]),!h)return null;const B=function(e,t,n,i,o,r,l,a=Date.now()){const s=t.length,c=Fd(e,s,n,i,o,r),d=(l?l/100:0)||r?.[s]||c[0]?.amount||br(e,s,n,{expectedCorrect:i??void 0}),h=c.find(e=>e.correct>0&&e.correct<s),u=Pd(t,a),f=[h&&`${h.correct} right still pays ${yt(h.amount)}`,u&&`First result ${mt(u)}`].filter(Boolean).join(". ");return{payLabel:c.length>1?"Pays up to":"Pays",pays:d,note:f?`${f}.`:""}}(d,g,u,b,m,y,h.max_win_amount),C=Ad(d,f.length,b),S=(e,t)=>/* @__PURE__ */U(W,{style:{flex:1,minWidth:0},children:[/* @__PURE__ */E(fi,{style:{fontSize:13,fontWeight:"600",color:x.textMuted,fontFamily:s},children:e}),/* @__PURE__ */E(fi,{style:{fontSize:Pl,fontWeight:"800",letterSpacing:-.52,color:hn(a),fontFamily:c,fontVariant:["tabular-nums"]},children:yt(t)})]});/* @__PURE__ */
496
- return U(W,{style:Ph.container,children:[!o&&/* @__PURE__ */E(W,{style:{marginBottom:Al},children:/* @__PURE__ */E(Wh,{hideActions:r})}),
497
- /* @__PURE__ */U(W,{style:[Ph.content,{gap:12}],children:[/* @__PURE__ */U(Hl,{theme:a,accessibilityLabel:"Entry summary",children:[
491
+ /* @__PURE__ */E(xh,{game:c,tiers:te.map(e=>({count:e,payout20:z[e]??0})),selectedCount:void 0,onSelect:e=>{M(e),oe()},colors:Y,bodyFont:a.bodyFont,extraBetAmount:20!==n?n:void 0,columnLabel:se.tableColumnLabel,buttonLabel:se.tierButtonLabel,theme:V})]})})():/* @__PURE__ */E(vi,{theme:V,variant:"secondary",block:!0,onPress:oe,children:"Add more picks"})}),ae&&/* @__PURE__ */U(kh,{shelf:O,theme:V,style:{backgroundColor:`${Y.warning}18`},layout:{flexDirection:X?"row":"column",alignItems:X?"center":"flex-start",justifyContent:"space-between",gap:12},children:[/* @__PURE__ */U(fi,{style:{fontSize:X?14:12,color:Y.text,flexShrink:1},children:["You have ",
492
+ /* @__PURE__ */U(fi,{style:{fontWeight:"700"},children:[$," pick",1!==$?"s":""]}),`. ${ge}`]}),/* @__PURE__ */U(W,{style:{flexDirection:"row",gap:8,flexShrink:0},children:[/* @__PURE__ */E(vi,{theme:V,variant:"secondary",onPress:oe,children:"Add a pick"}),null!=re&&/* @__PURE__ */E(vi,{theme:V,variant:"secondary",onPress:()=>M(re),children:se.switchTierLabel(re)})]})]}),(ce||!fe&&de>0)&&/* @__PURE__ */U(kh,{shelf:O,theme:V,children:[ce&&/* @__PURE__ */E(fi,{style:{fontSize:X?14:12,color:Y.text},children:ce}),fe?null:ue.length>0?/* @__PURE__ */E(W,{style:{marginTop:8,gap:4},children:ue.map(e=>/* @__PURE__ */U(W,{style:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",gap:12},children:[/* @__PURE__ */E(fi,{style:{fontSize:X?14:12,color:Y.textMuted},children:e.label}),/* @__PURE__ */E(fi,{style:{fontSize:X?14:12,fontWeight:"700",color:hn(V)},children:yt(e.prize)})]},e.count))}):de>0&&/* @__PURE__ */U(fi,{style:{fontSize:X?14:12,color:Y.textMuted,marginTop:6},children:[`${he} `/* @__PURE__ */,E(fi,{style:{fontWeight:"700",color:hn(V)},children:yt(de)})]})]})]})})}),r&&v?/* @__PURE__ */E(W,{style:{marginTop:12,alignItems:"flex-end"},children:/* @__PURE__ */E(fi,{style:[Wh.errorText,{color:I.error}],children:v})}):null,
493
+ /* @__PURE__ */E(Xd,{})]})}var Wh=B.create({container:{flex:1},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"}});function Fh(e={}){const{theme:t,selectedGame:n}=ml(),i=la(t);/* @__PURE__ */
494
+ return E(Ss,{title:"Entry placed",backLabel:n?.game_name,leading:/* @__PURE__ */E(Bs,{testID:"entry-placed-check",color:Ja(i).accent})})}function Ah({onPlayAgain:e,onDone:t,onShare:n}){const{theme:i,reset:o,placedEntry:r,selectedGame:l,selectedPropositions:a,selections:s,betAmount:c}=ml();/* @__PURE__ */
495
+ return U(Ll,{theme:i,testID:"entry-placed-dock",children:[t&&/* @__PURE__ */E(vi,{size:"lg",theme:i,block:!0,onPress:t,children:"View my entries"}),/* @__PURE__ */E(vi,{size:"lg",theme:i,variant:"secondary",block:!0,onPress:()=>{o(),e?.()},children:"Play again"})]})}function Ph({onPlayAgain:t,onDone:n,onShare:i,hideTitle:o,hideActions:r}){const l=ml(),{theme:a,bodyFont:s,headingFont:c,selectedGame:d,placedEntry:h,betAmount:u,selectedPropositionIds:f,selectedPropositions:g,selections:p,payouts:y,winningCounts:m,expectedCorrect:b,onShare:w}=l,x=a.colors,v=i??w,k=e.useRef(!1);if(e.useEffect(()=>{h&&d?k.current=!1:(l.goToSportSelection(),k.current||(k.current=!0,t?t():n?.()))},[h,d,l,t,n]),!h)return null;const B=function(e,t,n,i,o,r,l,a=Date.now()){const s=t.length,c=Ad(e,s,n,i,o,r),d=(l?l/100:0)||r?.[s]||c[0]?.amount||br(e,s,n,{expectedCorrect:i??void 0}),h=c.find(e=>e.correct>0&&e.correct<s),u=Td(t,a),f=[h&&`${h.correct} right still pays ${yt(h.amount)}`,u&&`First result ${mt(u)}`].filter(Boolean).join(". ");return{payLabel:c.length>1?"Pays up to":"Pays",pays:d,note:f?`${f}.`:""}}(d,g,u,b,m,y,h.max_win_amount),C=Pd(d,f.length,b),S=(e,t)=>/* @__PURE__ */U(W,{style:{flex:1,minWidth:0},children:[/* @__PURE__ */E(fi,{style:{fontSize:13,fontWeight:"600",color:x.textMuted,fontFamily:s},children:e}),/* @__PURE__ */E(fi,{style:{fontSize:Tl,fontWeight:"800",letterSpacing:-.52,color:hn(a),fontFamily:c,fontVariant:["tabular-nums"]},children:yt(t)})]});/* @__PURE__ */
496
+ return U(W,{style:Th.container,children:[!o&&/* @__PURE__ */E(W,{style:{marginBottom:Pl},children:/* @__PURE__ */E(Fh,{hideActions:r})}),
497
+ /* @__PURE__ */U(W,{style:[Th.content,{gap:12}],children:[/* @__PURE__ */U(Ml,{theme:a,accessibilityLabel:"Entry summary",children:[
498
498
  /* @__PURE__ */E(fi,{style:{fontSize:13,fontWeight:"700",color:x.textMuted,fontFamily:s},children:[`Entry ${l.entryReference??`#${h.id}`}`,C].filter(Boolean).join(" · ")}),
499
- /* @__PURE__ */U(W,{style:{flexDirection:"row",gap:12,marginTop:8},children:[S("Stake",u),B.pays>0?S(B.payLabel,B.pays):/* @__PURE__ */E(W,{style:{flex:1}})]}),B.note?/* @__PURE__ */E(fi,{style:{marginTop:12,paddingTop:12,borderTopWidth:1,borderTopColor:x.border,fontSize:14,fontWeight:"600",color:x.text,fontFamily:s},children:B.note}):null]}),g.length>0&&/* @__PURE__ */U(Hl,{theme:a,padded:!1,accessibilityLabel:"Your picks",style:{overflow:"hidden"},children:[/* @__PURE__ */E(fi,{accessibilityRole:"header",style:{paddingHorizontal:16,paddingTop:14,paddingBottom:8,fontSize:16,fontWeight:"800",color:hn(a),fontFamily:c},children:`Your ${g.length} pick${1!==g.length?"s":""}`}),g.map(e=>{const t=p?.[e.id],n=kt(e)?e.away_team:[e.home_team,e.away_team].filter(Boolean).join(" vs ");/* @__PURE__ */
500
- return U(W,{style:{flexDirection:"row",alignItems:"center",gap:12,paddingHorizontal:16,paddingVertical:10,borderTopWidth:1,borderTopColor:x.border},children:[/* @__PURE__ */U(W,{style:{flex:1,minWidth:0},children:[/* @__PURE__ */E(fi,{style:{fontSize:15,lineHeight:20,fontWeight:"600",color:x.text,fontFamily:s},children:e.description||e.proposition}),n?/* @__PURE__ */E(fi,{style:{fontSize:13,fontWeight:"500",color:x.textMuted,fontFamily:s},children:n}):null]}),null!=t&&/* @__PURE__ */E(Mi,{theme:a,size:"sm",value:t,style:{alignSelf:"center",flexShrink:0}})]},e.id)})]})]}),!r&&/* @__PURE__ */E(W,{style:{marginTop:12},children:/* @__PURE__ */E(Fh,{onPlayAgain:t,onDone:n,onShare:v})}),
501
- /* @__PURE__ */E(Nd,{})]})}var Ph=B.create({container:{flex:1},content:{flex:1}});function Th({onBack:e,hideActions:t}={}){const n="shelf"===Zn();/* @__PURE__ */
502
- return E(Cs,{title:n?"Your entries":"Your Entries",onBack:e,backLabel:n&&e?"Games":void 0})}function Dh({onSelectEntry:e,onBack:t,hideTitle:n,hideActions:i}){const o=yl(),r="shelf"===Zn(),{theme:l,apiUrl:a,apiKey:s,fetchImpl:c,getAuthHeaders:d,userId:h,demoEntries:u,demoGames:f,demoPropositions:g,renderTeamLogo:p,filterSport:y}=o;/* @__PURE__ */
503
- return U(W,{style:Hh.container,children:[!n&&/* @__PURE__ */E(W,{style:{marginBottom:r?Al:24},children:/* @__PURE__ */E(Th,{onBack:t,hideActions:i})}),
504
- /* @__PURE__ */E(W,{style:Hh.content,children:/* @__PURE__ */E(Od,{apiUrl:a,apiKey:s,fetchImpl:c,getAuthHeaders:d,userId:h,demoEntries:u,demoGames:f,demoPropositions:g,onSelectEntry:e,theme:l,renderTeamLogo:p,filterSport:y})}),
505
- /* @__PURE__ */E(Nd,{})]})}var Hh=B.create({container:{flex:1},content:{flex:1}});function Mh({gameKey:e,short:t,size:n=56,footer:i="YESNO Multi",title:o,sportBaseKey:r}){const l=it(e,r,t),a=function(e){return e.length<=3?92:4===e.length?72:56}(l),s=!i;/* @__PURE__ */
499
+ /* @__PURE__ */U(W,{style:{flexDirection:"row",gap:12,marginTop:8},children:[S("Stake",u),B.pays>0?S(B.payLabel,B.pays):/* @__PURE__ */E(W,{style:{flex:1}})]}),B.note?/* @__PURE__ */E(fi,{style:{marginTop:12,paddingTop:12,borderTopWidth:1,borderTopColor:x.border,fontSize:14,fontWeight:"600",color:x.text,fontFamily:s},children:B.note}):null]}),g.length>0&&/* @__PURE__ */U(Ml,{theme:a,padded:!1,accessibilityLabel:"Your picks",style:{overflow:"hidden"},children:[/* @__PURE__ */E(fi,{accessibilityRole:"header",style:{paddingHorizontal:16,paddingTop:14,paddingBottom:8,fontSize:16,fontWeight:"800",color:hn(a),fontFamily:c},children:`Your ${g.length} pick${1!==g.length?"s":""}`}),g.map(e=>{const t=p?.[e.id],n=kt(e)?e.away_team:[e.home_team,e.away_team].filter(Boolean).join(" vs ");/* @__PURE__ */
500
+ return U(W,{style:{flexDirection:"row",alignItems:"center",gap:12,paddingHorizontal:16,paddingVertical:10,borderTopWidth:1,borderTopColor:x.border},children:[/* @__PURE__ */U(W,{style:{flex:1,minWidth:0},children:[/* @__PURE__ */E(fi,{style:{fontSize:15,lineHeight:20,fontWeight:"600",color:x.text,fontFamily:s},children:e.description||e.proposition}),n?/* @__PURE__ */E(fi,{style:{fontSize:13,fontWeight:"500",color:x.textMuted,fontFamily:s},children:n}):null]}),null!=t&&/* @__PURE__ */E(Mi,{theme:a,size:"sm",value:t,style:{alignSelf:"center",flexShrink:0}})]},e.id)})]})]}),!r&&/* @__PURE__ */E(W,{style:{marginTop:12},children:/* @__PURE__ */E(Ah,{onPlayAgain:t,onDone:n,onShare:v})}),
501
+ /* @__PURE__ */E(Xd,{})]})}var Th=B.create({container:{flex:1},content:{flex:1}});function Dh({onBack:e,hideActions:t}={}){const n="shelf"===Zn();/* @__PURE__ */
502
+ return E(Ss,{title:n?"Your entries":"Your Entries",onBack:e,backLabel:n&&e?"Games":void 0})}function Hh({onSelectEntry:e,onBack:t,hideTitle:n,hideActions:i}){const o=ml(),r="shelf"===Zn(),{theme:l,apiUrl:a,apiKey:s,fetchImpl:c,getAuthHeaders:d,userId:h,demoEntries:u,demoGames:f,demoPropositions:g,renderTeamLogo:p,filterSport:y}=o;/* @__PURE__ */
503
+ return U(W,{style:Mh.container,children:[!n&&/* @__PURE__ */E(W,{style:{marginBottom:r?Pl:24},children:/* @__PURE__ */E(Dh,{onBack:t,hideActions:i})}),
504
+ /* @__PURE__ */E(W,{style:Mh.content,children:/* @__PURE__ */E(jd,{apiUrl:a,apiKey:s,fetchImpl:c,getAuthHeaders:d,userId:h,demoEntries:u,demoGames:f,demoPropositions:g,onSelectEntry:e,theme:l,renderTeamLogo:p,filterSport:y})}),
505
+ /* @__PURE__ */E(Xd,{})]})}var Mh=B.create({container:{flex:1},content:{flex:1}});function Lh({gameKey:e,short:t,size:n=56,footer:i="YESNO Multi",title:o,sportBaseKey:r}){const l=it(e,r,t),a=function(e){return e.length<=3?92:4===e.length?72:56}(l),s=!i;/* @__PURE__ */
506
506
  return U(A,{viewBox:"0 0 360 360",width:n,height:n,accessibilityLabel:o??`${l} button`,children:[/* @__PURE__ */U(j,s?{children:[
507
507
  /* @__PURE__ */E(L,{x:90,y:90,width:260,height:260,rx:52,fill:Je}),
508
508
  /* @__PURE__ */E(L,{x:55,y:55,width:260,height:260,rx:52,fill:"#4B7985"}),
@@ -511,49 +511,49 @@ return U(A,{viewBox:"0 0 360 360",width:n,height:n,accessibilityLabel:o??`${l} b
511
511
  /* @__PURE__ */E(L,{x:50,y:10,width:260,height:260,rx:52,fill:Ke,opacity:.3}),
512
512
  /* @__PURE__ */E(L,{x:50,y:35,width:260,height:260,rx:52,fill:Ke,opacity:.55}),
513
513
  /* @__PURE__ */E(L,{x:50,y:60,width:260,height:260,rx:52,fill:Ke})]}),
514
- /* @__PURE__ */E(O,{x:s?150:180,y:s?180:220,fontFamily:"Manrope, Poppins, sans-serif",fontSize:a,letterSpacing:-3,textAnchor:"middle",fontWeight:"800",fill:Qe,children:l}),i&&/* @__PURE__ */U(j,{children:[/* @__PURE__ */E(O,{x:180,y:345,fontFamily:"Manrope, Poppins, sans-serif",fontSize:24,letterSpacing:-.5,textAnchor:"middle",fontWeight:"700",fill:Ke,children:i}),/* @__PURE__ */E(O,{x:262,y:333,fontFamily:"Manrope, Poppins, sans-serif",fontSize:10,fontWeight:"600",fill:Ke,children:"TM"})]})]})}function Lh({onBack:e,hideActions:t,backLabel:n="Category"}={}){const{selectedCategory:i}=yl();/* @__PURE__ */
515
- return E(Cs,{title:Ct(i),onBack:e,backLabel:e?n:void 0})}function Rh({onCancel:e}){const{theme:t,screenSize:n}=yl();return e&&"mobile"!==n?/* @__PURE__ */E(W,{style:Oh.footer,children:/* @__PURE__ */E(vi,{theme:t,variant:"secondary",size:"lg",onPress:e,children:"Cancel"})}):null}function Ih({onSelectSport:e,onCancel:t,hideTitle:n,hideActions:i,renderSportLogo:o,renderSportTagline:r,backLabel:l,comingSoonSports:a}){const{theme:s,propositionsForSportPicker:c,sportSummaries:d,loading:h,setSelectedSport:u,clearSelectedGame:f,selectedCategory:g,sportBaseKey:p,displaySportName:y}=yl(),m=s.colors,b=kn(s),w=Nr(s),x=Yr(s),v=hn(s),{width:k}=F(),B=k>=640,C=B?64:56,S=bt(c),z=Object.keys(S);return h?/* @__PURE__ */E(W,{style:Oh.container,children:/* @__PURE__ */E(Ks,{colors:Sn(s),bodyFont:x,variant:"sport",theme:s,categoryCount:z.length>0?z.length:2})}):/* @__PURE__ */U(W,{style:Oh.container,children:[!n&&/* @__PURE__ */E(W,{style:Oh.titleWrap,children:/* @__PURE__ */E(Lh,{onBack:t,hideActions:i,backLabel:l})}),/* @__PURE__ */E(W,{style:Oh.content,children:/* @__PURE__ */U(W,{style:Oh.grid,children:[z.map(t=>{const n=d.find(e=>e.key===t),i=n?.active_props??S[t].length,l=r?.(t,i)??(n?function(e,t){const n=`${e} game${1===e?"":"s"} today`;return t<=0?n:`${n} · ${t} pick${1===t?"":"s"} available`}(n.games_today,n.active_props):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`}(i,g)),a=y(t);/* @__PURE__ */
516
- return U(Bi,{theme:s,onPress:()=>{u(t),f(),e?.(t)},style:[Oh.gridCard,B&&Oh.gridCardWide,{borderRadius:sn(s,16),backgroundColor:b},Oh.gridCardRaised],children:[o?o(t):/* @__PURE__ */E(Mh,{gameKey:t,size:C,footer:null,sportBaseKey:p,title:`${a} button`}),/* @__PURE__ */U(W,{style:Oh.gridText,children:[/* @__PURE__ */E(fi,{numberOfLines:2,style:[Oh.gridName,B&&Oh.gridNameWide,{color:v,fontFamily:w}],children:a}),/* @__PURE__ */E(W,{style:Oh.gridTaglineRow,children:/* @__PURE__ */E(fi,{numberOfLines:2,style:[Oh.gridMeta,{color:m.primary,fontFamily:x}],children:l})})]})]},t)}),a?.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??it(e.key,p));/* @__PURE__ */
517
- return U(W,{style:[Oh.gridCard,B&&Oh.gridCardWide,{borderRadius:sn(s,16),backgroundColor:m.canvas?b:tn(m.backgroundAlt,.4),borderColor:tn(m.border,.7)}],children:[/* @__PURE__ */E(W,{style:Oh.comingSoonLogo,children:o?o(e.key):/* @__PURE__ */E(Mh,{gameKey:e.key,short:e.short,size:C,footer:null,sportBaseKey:p,title:`${e.label} button`})}),/* @__PURE__ */U(W,{style:Oh.gridText,children:[/* @__PURE__ */E(fi,{numberOfLines:2,style:[Oh.gridName,B&&Oh.gridNameWide,{color:m.textMuted,fontFamily:w}],children:n&&n!==t?`${t} · ${n}`:t}),/* @__PURE__ */U(W,{style:Oh.gridTaglineRow,children:[/* @__PURE__ */E(ga,{size:11,color:m.textMuted}),/* @__PURE__ */E(fi,{numberOfLines:2,style:[Oh.gridMeta,{color:m.textMuted,fontFamily:x}],children:(i=e.seasonStart,i?`Starts ${i}`:"Coming soon")})]})]})]},e.key);var i})]})})]})}var Oh=B.create({container:{flex:1},centered:{flex:1,flexDirection:"row",justifyContent:"center",alignItems:"center",padding:32},titleWrap:{marginBottom:8},content:{flex:1},grid:{flexDirection:"row",flexWrap:"wrap",gap:12},gridCard:{flexBasis:"48%",flexGrow:1,minWidth:0,flexDirection:"column",alignItems:"center",gap:8,borderWidth:1,paddingHorizontal:8,paddingVertical:12},gridCardWide:{paddingHorizontal:12,paddingVertical:16},gridCardRaised:{shadowColor:"#000",shadowOpacity:.1,shadowRadius:6,shadowOffset:{width:0,height:4},elevation:2},gridText:{flexDirection:"column",alignItems:"center",alignSelf:"stretch",minWidth:0},gridName:{fontSize:14,fontWeight:"800",letterSpacing:-.35,lineHeight:18,maxWidth:"100%",textAlign:"center"},gridNameWide:{fontSize:16,lineHeight:20},gridTaglineRow:{marginTop:4,flexDirection:"row",alignItems:"flex-start",justifyContent:"center",gap:6,minWidth:0,alignSelf:"stretch"},gridMeta:{fontSize:9.3,fontWeight:"700",textTransform:"uppercase",letterSpacing:.93,lineHeight:13,flexShrink:1,textAlign:"center"},comingSoonLogo:{opacity:.6},footer:{flexDirection:"row",alignItems:"center",paddingTop:16}});function jh(e,t){const n=/^#([0-9a-f]{6})$/i.exec((e??"").trim());if(!n)return e;const i=parseInt(n[1],16);return`rgba(${i>>16&255}, ${i>>8&255}, ${255&i}, ${t})`}function Eh(){const{theme:e}=yl(),t=e.brand?.chip??e.colors.primary,n=e.brand?.icon??e.colors.primaryText;return{chip:t,icon:n,ball:wn(t,bn(e),n)}}function Uh({size:e=56,children:t}){const{chip:n,icon:i}=Eh();/* @__PURE__ */
518
- return E(W,{style:{width:e,height:e,borderRadius:.3*e,backgroundColor:n,borderWidth:1,borderColor:jh(i,.16),alignItems:"center",justifyContent:"center",shadowColor:n,shadowOpacity:.45,shadowRadius:9,shadowOffset:{width:0,height:4},elevation:2},children:t})}function Gh({iconUrl:e,size:t=56}){const{icon:n,ball:i}=Eh();/* @__PURE__ */
519
- return E(Uh,{size:t,children:/* @__PURE__ */E(ds,{iconUrl:e,width:Math.round(.68*t),height:Math.round(.68*t),iconColor:n,accentColor:i})})}function Vh({eyebrow:e,iconUrl:t,gameName:n,subtitle:i,tagline:o,style:r}){const{theme:l,screenSize:a}=yl(),s=l.colors,c=Nr(l),d="mobile"===a,{width:h}=F(),u=h>=640;/* @__PURE__ */
520
- return U(W,{style:[Yh.block,u&&Yh.blockWide,r],children:[e&&u?/* @__PURE__ */E(fi,{style:[Yh.eyebrow,{color:s.primary,fontFamily:c}],children:e.toUpperCase()}):null,
521
- /* @__PURE__ */E(Dd,{iconUrl:t,gameName:n,height:d?20:32,chipColor:s.primary,textColor:s.text,iconColor:s.primaryText,accentColor:l.brand?.accent,compact:d}),i?/* @__PURE__ */E(fi,{style:[Yh.subtitle,u&&Yh.subtitleWide,{color:s.textMuted}],children:i}):null,o?/* @__PURE__ */E(fi,{style:[Yh.tagline,u&&Yh.taglineWide,{color:s.textMuted}],children:o}):null]})}var Yh=B.create({block:{alignItems:"center",marginBottom:16},blockWide:{marginBottom:28},eyebrow:{fontSize:12,fontWeight:"700",textTransform:"uppercase",letterSpacing:2.16,marginBottom:20,textAlign:"center"},subtitle:{marginTop:8,fontSize:12,textAlign:"center"},subtitleWide:{fontSize:14},tagline:{marginTop:8,fontSize:13,lineHeight:18,textAlign:"center",maxWidth:384},taglineWide:{marginTop:12,fontSize:15,lineHeight:24}});function Nh({ariaLabel:e,children:t}){const{width:n}=F();return n>=640?/* @__PURE__ */E(W,{accessibilityRole:"radiogroup",accessibilityLabel:e,style:qh.grid,children:t}):/* @__PURE__ */E(k,{horizontal:!0,showsHorizontalScrollIndicator:!1,accessibilityRole:"radiogroup",accessibilityLabel:e,contentContainerStyle:qh.rail,children:t})}function Xh(e,t="21%"){return e?{flexGrow:1,flexBasis:t,minWidth:0}:{width:124,flexGrow:0,flexShrink:0}}var qh=B.create({grid:{flexDirection:"row",flexWrap:"wrap",gap:8},rail:{flexDirection:"row",gap:8,paddingBottom:4}});function Kh({legs:e,prizeBall:t=!0}){const{theme:n}=yl(),i=n.colors.primary,o=bn(n);/* @__PURE__ */
522
- return U(W,{style:{flexDirection:"row",alignItems:"center"},children:[Array.from({length:e}).map((e,t)=>/* @__PURE__ */E(W,{style:{width:5,height:5,borderRadius:1.5,backgroundColor:i,opacity:.85,marginRight:3}},t)),t?/* @__PURE__ */E(W,{style:{width:7,height:7,borderRadius:999,backgroundColor:o,marginLeft:2}}):null]})}function Qh({hovered:e=!1,pressed:t=!1,style:n,children:i,...o}){const{theme:r}=yl(),l=r.colors,a=l.primary,{width:s}=F(),c=s>=640;/* @__PURE__ */
523
- return E(W,{...o,style:[$h.card,c&&$h.cardWide,{borderRadius:sn(r,24),backgroundColor:l.selectionCard??l.backgroundAlt,borderColor:e||t?a:l.border,shadowColor:"#000",shadowOpacity:.08,shadowRadius:10,shadowOffset:{width:0,height:8},elevation:1},xi(t),n],children:i})}function Jh({tile:e,label:t,stat:n,detail:i,body:o,ariaLabel:r,onSelect:l,children:a}){const{theme:s}=yl(),c=s.colors,d=Nr(s),h=hn(s),u=c.primary,{width:f}=F(),g=f>=640,{hovered:p,pressed:y,handlers:m}=wi();/* @__PURE__ */
524
- return U(Qh,{hovered:p,pressed:y,children:[/* @__PURE__ */U(z,{...m,onPress:l,activeOpacity:1,accessibilityRole:"button",accessibilityLabel:r,style:[$h.cardMain,g&&$h.cardMainWide],children:[e,
525
- /* @__PURE__ */U(W,{style:[$h.cardText,g&&$h.cardTextWide],children:[t?/* @__PURE__ */U(W,{style:$h.titleRow,children:[/* @__PURE__ */E(fi,{style:[$h.cardTitle,g&&$h.cardTitleWide,{color:h,fontFamily:d}],children:t}),n?/* @__PURE__ */E(W,{style:[$h.statChip,{borderRadius:sn(s,999),backgroundColor:jh(u,.12)}],children:/* @__PURE__ */E(fi,{style:[$h.statChipText,{color:u}],children:n.toUpperCase()})}):null]}):null,i&&i.length>0?/* @__PURE__ */E(W,{style:$h.detailBlock,children:(g?i:i.slice(0,1)).map(e=>/* @__PURE__ */E(fi,{style:[$h.detailLine,g&&$h.detailLineWide,{color:c.textMuted}],children:e},e))}):null,o]}),
526
- /* @__PURE__ */E(W,{style:$h.chevron,children:/* @__PURE__ */E(A,{width:22,height:22,viewBox:"0 0 24 24",fill:"none",children:/* @__PURE__ */E(H,{d:"m9 6 6 6-6 6",stroke:u,strokeWidth:2.5,strokeLinecap:"round",strokeLinejoin:"round"})})})]}),a?/* @__PURE__ */E(W,{style:[$h.childrenWrap,{borderTopColor:jh(h,.08)}],children:a}):null]})}function Zh({iconUrl:e,pickLabel:t="Pick my own",pickDetail:n,quickDetail:i,onPickYourOwn:o,onQuickPick:r,style:l}){const{width:a}=F(),s=a>=640,c=s?$h.playCell:void 0;/* @__PURE__ */
527
- return U(W,{style:[$h.playCards,s&&$h.playCardsWide,l],children:[/* @__PURE__ */E(W,{style:c,children:/* @__PURE__ */E(Jh,{tile:/* @__PURE__ */E(Gh,{iconUrl:e,size:60}),label:t,stat:"Your calls",detail:n,onSelect:o})}),/* @__PURE__ */E(W,{style:c,children:/* @__PURE__ */E(Jh,{tile:/* @__PURE__ */E(Gh,{iconUrl:`${Y}quickpick`,size:60}),label:"QuickPick for me",stat:"Fastest",detail:i,onSelect:r})})]})}var $h=B.create({card:{flexGrow:1,borderWidth:2,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:{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},playCards:{gap:12},playCardsWide:{flexDirection:"row",flexWrap:"wrap",alignItems:"stretch"},playCell:{flexBasis:"48%",flexGrow:1,minWidth:"45%"}});function _h({style:e}){/* @__PURE__ */
528
- return E(th,{style:[{marginBottom:16},e]})}function eu(e){const{previewCallPayouts:t}=yl(),n=ws(t,e.game,e.legs,e.stake,e.expectedCorrect??e.legs,e.ruleId,e.view),i=oi();if("dense"===i.pages.setup)/* @__PURE__ */return E(Ts,{...e,quotedView:n.view??e.view});const o=e.theme.colors,r={color:o.text,fontFamily:Yr(e.theme),fontSize:14},l={minHeight:46,padding:12,borderRadius:sn(e.theme,10),borderWidth:1,borderColor:o.border,backgroundColor:o.background},a=(t,n,i)=>/* @__PURE__ */E(Ll,{theme:e.theme,selected:n,onPress:i,style:{flexGrow:1,minWidth:44},children:t},t);/* @__PURE__ */
529
- return U(W,{style:{gap:12},children:[void 0!==e.header?e.header:/* @__PURE__ */E(Cs,{title:e.game.game_name,onBack:e.onBack,backLabel:e.onBack?"All games":void 0}),
530
- /* @__PURE__ */E(_h,{}),e.modes&&/* @__PURE__ */U(W,{style:{gap:8},children:[/* @__PURE__ */E(fi,{style:{...r,fontWeight:"700"},children:"Choose your cover"}),/* @__PURE__ */E(W,{style:{flexDirection:"row",gap:8},children:e.modes.map(t=>/* @__PURE__ */E(Ll,{theme:e.theme,selected:t.id===e.modeId,sub:t.detail,onPress:()=>e.onMode?.(t.id),style:{flex:1},children:t.label},t.id))})]}),
514
+ /* @__PURE__ */E(O,{x:s?150:180,y:s?180:220,fontFamily:"Manrope, Poppins, sans-serif",fontSize:a,letterSpacing:-3,textAnchor:"middle",fontWeight:"800",fill:Qe,children:l}),i&&/* @__PURE__ */U(j,{children:[/* @__PURE__ */E(O,{x:180,y:345,fontFamily:"Manrope, Poppins, sans-serif",fontSize:24,letterSpacing:-.5,textAnchor:"middle",fontWeight:"700",fill:Ke,children:i}),/* @__PURE__ */E(O,{x:262,y:333,fontFamily:"Manrope, Poppins, sans-serif",fontSize:10,fontWeight:"600",fill:Ke,children:"TM"})]})]})}function Rh({onBack:e,hideActions:t,backLabel:n="Category"}={}){const{selectedCategory:i}=ml();/* @__PURE__ */
515
+ return E(Ss,{title:Ct(i),onBack:e,backLabel:e?n:void 0})}function Ih({onCancel:e}){const{theme:t,screenSize:n}=ml();return e&&"mobile"!==n?/* @__PURE__ */E(W,{style:jh.footer,children:/* @__PURE__ */E(vi,{theme:t,variant:"secondary",size:"lg",onPress:e,children:"Cancel"})}):null}function Oh({onSelectSport:e,onCancel:t,hideTitle:n,hideActions:i,renderSportLogo:o,renderSportTagline:r,backLabel:l,comingSoonSports:a}){const{theme:s,propositionsForSportPicker:c,sportSummaries:d,loading:h,setSelectedSport:u,clearSelectedGame:f,selectedCategory:g,sportBaseKey:p,displaySportName:y}=ml(),m=s.colors,b=kn(s),w=Nr(s),x=Yr(s),v=hn(s),{width:k}=F(),B=k>=640,C=B?64:56,S=bt(c),z=Object.keys(S);return h?/* @__PURE__ */E(W,{style:jh.container,children:/* @__PURE__ */E(Qs,{colors:Sn(s),bodyFont:x,variant:"sport",theme:s,categoryCount:z.length>0?z.length:2})}):/* @__PURE__ */U(W,{style:jh.container,children:[!n&&/* @__PURE__ */E(W,{style:jh.titleWrap,children:/* @__PURE__ */E(Rh,{onBack:t,hideActions:i,backLabel:l})}),/* @__PURE__ */E(W,{style:jh.content,children:/* @__PURE__ */U(W,{style:jh.grid,children:[z.map(t=>{const n=d.find(e=>e.key===t),i=n?.active_props??S[t].length,l=r?.(t,i)??(n?function(e,t){const n=`${e} game${1===e?"":"s"} today`;return t<=0?n:`${n} · ${t} pick${1===t?"":"s"} available`}(n.games_today,n.active_props):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`}(i,g)),a=y(t);/* @__PURE__ */
516
+ return U(Bi,{theme:s,onPress:()=>{u(t),f(),e?.(t)},style:[jh.gridCard,B&&jh.gridCardWide,{borderRadius:sn(s,16),backgroundColor:b},jh.gridCardRaised],children:[o?o(t):/* @__PURE__ */E(Lh,{gameKey:t,size:C,footer:null,sportBaseKey:p,title:`${a} button`}),/* @__PURE__ */U(W,{style:jh.gridText,children:[/* @__PURE__ */E(fi,{numberOfLines:2,style:[jh.gridName,B&&jh.gridNameWide,{color:v,fontFamily:w}],children:a}),/* @__PURE__ */E(W,{style:jh.gridTaglineRow,children:/* @__PURE__ */E(fi,{numberOfLines:2,style:[jh.gridMeta,{color:m.primary,fontFamily:x}],children:l})})]})]},t)}),a?.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??it(e.key,p));/* @__PURE__ */
517
+ return U(W,{style:[jh.gridCard,B&&jh.gridCardWide,{borderRadius:sn(s,16),backgroundColor:m.canvas?b:tn(m.backgroundAlt,.4),borderColor:tn(m.border,.7)}],children:[/* @__PURE__ */E(W,{style:jh.comingSoonLogo,children:o?o(e.key):/* @__PURE__ */E(Lh,{gameKey:e.key,short:e.short,size:C,footer:null,sportBaseKey:p,title:`${e.label} button`})}),/* @__PURE__ */U(W,{style:jh.gridText,children:[/* @__PURE__ */E(fi,{numberOfLines:2,style:[jh.gridName,B&&jh.gridNameWide,{color:m.textMuted,fontFamily:w}],children:n&&n!==t?`${t} · ${n}`:t}),/* @__PURE__ */U(W,{style:jh.gridTaglineRow,children:[/* @__PURE__ */E(pa,{size:11,color:m.textMuted}),/* @__PURE__ */E(fi,{numberOfLines:2,style:[jh.gridMeta,{color:m.textMuted,fontFamily:x}],children:(i=e.seasonStart,i?`Starts ${i}`:"Coming soon")})]})]})]},e.key);var i})]})})]})}var jh=B.create({container:{flex:1},centered:{flex:1,flexDirection:"row",justifyContent:"center",alignItems:"center",padding:32},titleWrap:{marginBottom:8},content:{flex:1},grid:{flexDirection:"row",flexWrap:"wrap",gap:12},gridCard:{flexBasis:"48%",flexGrow:1,minWidth:0,flexDirection:"column",alignItems:"center",gap:8,borderWidth:1,paddingHorizontal:8,paddingVertical:12},gridCardWide:{paddingHorizontal:12,paddingVertical:16},gridCardRaised:{shadowColor:"#000",shadowOpacity:.1,shadowRadius:6,shadowOffset:{width:0,height:4},elevation:2},gridText:{flexDirection:"column",alignItems:"center",alignSelf:"stretch",minWidth:0},gridName:{fontSize:14,fontWeight:"800",letterSpacing:-.35,lineHeight:18,maxWidth:"100%",textAlign:"center"},gridNameWide:{fontSize:16,lineHeight:20},gridTaglineRow:{marginTop:4,flexDirection:"row",alignItems:"flex-start",justifyContent:"center",gap:6,minWidth:0,alignSelf:"stretch"},gridMeta:{fontSize:9.3,fontWeight:"700",textTransform:"uppercase",letterSpacing:.93,lineHeight:13,flexShrink:1,textAlign:"center"},comingSoonLogo:{opacity:.6},footer:{flexDirection:"row",alignItems:"center",paddingTop:16}});function Eh(e,t){const n=/^#([0-9a-f]{6})$/i.exec((e??"").trim());if(!n)return e;const i=parseInt(n[1],16);return`rgba(${i>>16&255}, ${i>>8&255}, ${255&i}, ${t})`}function Uh(){const{theme:e}=ml(),t=e.brand?.chip??e.colors.primary,n=e.brand?.icon??e.colors.primaryText;return{chip:t,icon:n,ball:wn(t,bn(e),n)}}function Gh({size:e=56,children:t}){const{chip:n,icon:i}=Uh();/* @__PURE__ */
518
+ return E(W,{style:{width:e,height:e,borderRadius:.3*e,backgroundColor:n,borderWidth:1,borderColor:Eh(i,.16),alignItems:"center",justifyContent:"center",shadowColor:n,shadowOpacity:.45,shadowRadius:9,shadowOffset:{width:0,height:4},elevation:2},children:t})}function Vh({iconUrl:e,size:t=56}){const{icon:n,ball:i}=Uh();/* @__PURE__ */
519
+ return E(Gh,{size:t,children:/* @__PURE__ */E(hs,{iconUrl:e,width:Math.round(.68*t),height:Math.round(.68*t),iconColor:n,accentColor:i})})}function Yh({eyebrow:e,iconUrl:t,gameName:n,subtitle:i,tagline:o,style:r}){const{theme:l,screenSize:a}=ml(),s=l.colors,c=Nr(l),d="mobile"===a,{width:h}=F(),u=h>=640;/* @__PURE__ */
520
+ return U(W,{style:[Nh.block,u&&Nh.blockWide,r],children:[e&&u?/* @__PURE__ */E(fi,{style:[Nh.eyebrow,{color:s.primary,fontFamily:c}],children:e.toUpperCase()}):null,
521
+ /* @__PURE__ */E(Hd,{iconUrl:t,gameName:n,height:d?20:32,chipColor:s.primary,textColor:s.text,iconColor:s.primaryText,accentColor:l.brand?.accent,compact:d}),i?/* @__PURE__ */E(fi,{style:[Nh.subtitle,u&&Nh.subtitleWide,{color:s.textMuted}],children:i}):null,o?/* @__PURE__ */E(fi,{style:[Nh.tagline,u&&Nh.taglineWide,{color:s.textMuted}],children:o}):null]})}var Nh=B.create({block:{alignItems:"center",marginBottom:16},blockWide:{marginBottom:28},eyebrow:{fontSize:12,fontWeight:"700",textTransform:"uppercase",letterSpacing:2.16,marginBottom:20,textAlign:"center"},subtitle:{marginTop:8,fontSize:12,textAlign:"center"},subtitleWide:{fontSize:14},tagline:{marginTop:8,fontSize:13,lineHeight:18,textAlign:"center",maxWidth:384},taglineWide:{marginTop:12,fontSize:15,lineHeight:24}});function Xh({ariaLabel:e,children:t}){const{width:n}=F();return n>=640?/* @__PURE__ */E(W,{accessibilityRole:"radiogroup",accessibilityLabel:e,style:Kh.grid,children:t}):/* @__PURE__ */E(k,{horizontal:!0,showsHorizontalScrollIndicator:!1,accessibilityRole:"radiogroup",accessibilityLabel:e,contentContainerStyle:Kh.rail,children:t})}function qh(e,t="21%"){return e?{flexGrow:1,flexBasis:t,minWidth:0}:{width:124,flexGrow:0,flexShrink:0}}var Kh=B.create({grid:{flexDirection:"row",flexWrap:"wrap",gap:8},rail:{flexDirection:"row",gap:8,paddingBottom:4}});function Qh({legs:e,prizeBall:t=!0}){const{theme:n}=ml(),i=n.colors.primary,o=bn(n);/* @__PURE__ */
522
+ return U(W,{style:{flexDirection:"row",alignItems:"center"},children:[Array.from({length:e}).map((e,t)=>/* @__PURE__ */E(W,{style:{width:5,height:5,borderRadius:1.5,backgroundColor:i,opacity:.85,marginRight:3}},t)),t?/* @__PURE__ */E(W,{style:{width:7,height:7,borderRadius:999,backgroundColor:o,marginLeft:2}}):null]})}function Jh({hovered:e=!1,pressed:t=!1,style:n,children:i,...o}){const{theme:r}=ml(),l=r.colors,a=l.primary,{width:s}=F(),c=s>=640;/* @__PURE__ */
523
+ return E(W,{...o,style:[_h.card,c&&_h.cardWide,{borderRadius:sn(r,24),backgroundColor:l.selectionCard??l.backgroundAlt,borderColor:e||t?a:l.border,shadowColor:"#000",shadowOpacity:.08,shadowRadius:10,shadowOffset:{width:0,height:8},elevation:1},xi(t),n],children:i})}function Zh({tile:e,label:t,stat:n,detail:i,body:o,ariaLabel:r,onSelect:l,children:a}){const{theme:s}=ml(),c=s.colors,d=Nr(s),h=hn(s),u=c.primary,{width:f}=F(),g=f>=640,{hovered:p,pressed:y,handlers:m}=wi();/* @__PURE__ */
524
+ return U(Jh,{hovered:p,pressed:y,children:[/* @__PURE__ */U(z,{...m,onPress:l,activeOpacity:1,accessibilityRole:"button",accessibilityLabel:r,style:[_h.cardMain,g&&_h.cardMainWide],children:[e,
525
+ /* @__PURE__ */U(W,{style:[_h.cardText,g&&_h.cardTextWide],children:[t?/* @__PURE__ */U(W,{style:_h.titleRow,children:[/* @__PURE__ */E(fi,{style:[_h.cardTitle,g&&_h.cardTitleWide,{color:h,fontFamily:d}],children:t}),n?/* @__PURE__ */E(W,{style:[_h.statChip,{borderRadius:sn(s,999),backgroundColor:Eh(u,.12)}],children:/* @__PURE__ */E(fi,{style:[_h.statChipText,{color:u}],children:n.toUpperCase()})}):null]}):null,i&&i.length>0?/* @__PURE__ */E(W,{style:_h.detailBlock,children:(g?i:i.slice(0,1)).map(e=>/* @__PURE__ */E(fi,{style:[_h.detailLine,g&&_h.detailLineWide,{color:c.textMuted}],children:e},e))}):null,o]}),
526
+ /* @__PURE__ */E(W,{style:_h.chevron,children:/* @__PURE__ */E(A,{width:22,height:22,viewBox:"0 0 24 24",fill:"none",children:/* @__PURE__ */E(H,{d:"m9 6 6 6-6 6",stroke:u,strokeWidth:2.5,strokeLinecap:"round",strokeLinejoin:"round"})})})]}),a?/* @__PURE__ */E(W,{style:[_h.childrenWrap,{borderTopColor:Eh(h,.08)}],children:a}):null]})}function $h({iconUrl:e,pickLabel:t="Pick my own",pickDetail:n,quickDetail:i,onPickYourOwn:o,onQuickPick:r,style:l}){const{width:a}=F(),s=a>=640,c=s?_h.playCell:void 0;/* @__PURE__ */
527
+ return U(W,{style:[_h.playCards,s&&_h.playCardsWide,l],children:[/* @__PURE__ */E(W,{style:c,children:/* @__PURE__ */E(Zh,{tile:/* @__PURE__ */E(Vh,{iconUrl:e,size:60}),label:t,stat:"Your calls",detail:n,onSelect:o})}),/* @__PURE__ */E(W,{style:c,children:/* @__PURE__ */E(Zh,{tile:/* @__PURE__ */E(Vh,{iconUrl:`${Y}quickpick`,size:60}),label:"QuickPick for me",stat:"Fastest",detail:i,onSelect:r})})]})}var _h=B.create({card:{flexGrow:1,borderWidth:2,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:{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},playCards:{gap:12},playCardsWide:{flexDirection:"row",flexWrap:"wrap",alignItems:"stretch"},playCell:{flexBasis:"48%",flexGrow:1,minWidth:"45%"}});function eu({style:e}){/* @__PURE__ */
528
+ return E(nh,{style:[{marginBottom:16},e]})}function tu(e){const{previewCallPayouts:t}=ml(),n=xs(t,e.game,e.legs,e.stake,e.expectedCorrect??e.legs,e.ruleId,e.view),i=oi();if("dense"===i.pages.setup)/* @__PURE__ */return E(Ds,{...e,quotedView:n.view??e.view});const o=e.theme.colors,r={color:o.text,fontFamily:Yr(e.theme),fontSize:14},l={minHeight:46,padding:12,borderRadius:sn(e.theme,10),borderWidth:1,borderColor:o.border,backgroundColor:o.background},a=(t,n,i)=>/* @__PURE__ */E(Rl,{theme:e.theme,selected:n,onPress:i,style:{flexGrow:1,minWidth:44},children:t},t);/* @__PURE__ */
529
+ return U(W,{style:{gap:12},children:[void 0!==e.header?e.header:/* @__PURE__ */E(Ss,{title:e.game.game_name,onBack:e.onBack,backLabel:e.onBack?"All games":void 0}),
530
+ /* @__PURE__ */E(eu,{}),e.modes&&/* @__PURE__ */U(W,{style:{gap:8},children:[/* @__PURE__ */E(fi,{style:{...r,fontWeight:"700"},children:"Choose your cover"}),/* @__PURE__ */E(W,{style:{flexDirection:"row",gap:8},children:e.modes.map(t=>/* @__PURE__ */E(Rl,{theme:e.theme,selected:t.id===e.modeId,sub:t.detail,onPress:()=>e.onMode?.(t.id),style:{flex:1},children:t.label},t.id))})]}),
531
531
  /* @__PURE__ */E(fi,{style:{...r,fontWeight:"700"},children:"Picks"}),
532
532
  /* @__PURE__ */E(W,{style:{flexDirection:"row",flexWrap:"wrap",gap:6},children:e.legOptions.map(t=>a(String(t),e.legs===t,()=>e.onLegs(t)))}),
533
533
  /* @__PURE__ */E(fi,{style:{...r,fontSize:13,fontWeight:"500",color:o.textMuted},children:"Fewer picks are easier to win. More pay bigger."}),
534
534
  /* @__PURE__ */E(fi,{style:{...r,fontWeight:"700"},children:"Stake"}),e.stakes?/* @__PURE__ */E(W,{style:{flexDirection:"row",flexWrap:"wrap",gap:6},children:e.stakes.map(t=>a(yt(t),e.stake===t,()=>e.onStake(t)))}):/* @__PURE__ */E(gi,{accessibilityLabel:"Stake",keyboardType:"decimal-pad",value:e.stake,onChangeText:t=>e.onStake(Number(t)||0),style:{...l,...r}}),
535
- /* @__PURE__ */E(md,{view:n.view??e.view,theme:e.theme}),!1===e.valid&&/* @__PURE__ */U(fi,{accessibilityRole:"alert",style:{...r,color:o.error},children:["Minimum stake ",yt(e.minStake??1),"."]}),
536
- /* @__PURE__ */U(W,{style:{flexDirection:"row",gap:8,paddingTop:12,paddingBottom:16,backgroundColor:o.background,borderTopWidth:1,borderColor:o.border},children:[/* @__PURE__ */E(vi,{theme:e.theme,size:"lg",disabled:!1===e.valid,onPress:e.onPick,style:{flex:1.3,minWidth:0},children:`Choose ${e.legs} picks`}),"deck"===i.quickPick?/* @__PURE__ */E(ts,{tone:"paper",theme:e.theme,hint:`All ${e.legs} for me`,disabled:!1===e.valid,onPress:e.onQuickPick,style:{flex:1,minWidth:0}}):/* @__PURE__ */E(vi,{theme:e.theme,size:"lg",variant:"secondary",disabled:!1===e.valid,onPress:e.onQuickPick,style:{flex:1,minWidth:0},children:`QuickPick ${e.legs}`})]})]})}function tu({onBack:e,hideActions:t}={}){const{theme:n,selectedGame:i}=yl(),o=Nr(n),r=n.colors,{width:l}=F(),a=l<640;/* @__PURE__ */
537
- return U(W,{style:[iu.header,a&&iu.headerCompact],children:[/* @__PURE__ */E(fi,{style:[iu.sectionTitle,a&&iu.sectionTitleCompact,{color:r.primary,fontFamily:o}],children:"Choose your safety net"}),/* @__PURE__ */E(Ss,{onBack:e,hideActions:t,label:i?.game_name})]})}function nu({onQuickPick:e,onPickYourOwn:t,onBack:n,hideTitle:i,header:o,config:r,backLabel:l="Games"}){const a=Zn(),c="call"===a||"shelf"===a||qn(a),{theme:h,selectedGame:u,selectedPropositionCount:f,handlePropositionCountChange:g,setExpectedCorrect:p,setBetAmount:y,setSelectedRuleId:m,quickPickGame:b,goToSportSelection:w}=yl(),x=h.colors,v=Yr(h),k=Nr(h),B=hn(h),C=kn(h),{width:S}=F(),A=S>=640,[P,T]=d(!1),D=s(()=>r??Ji(u),[r,u]),[H,M]=d(()=>D?.defaultModeId??"extra_shot"),[L,R]=d(()=>{const e=D?.modes.find(e=>e.id===(D?.defaultModeId??"extra_shot"));return e?null!=f&&e.legOptions.includes(f)?f:e.defaultLegs:8}),[I,O]=d(()=>D?.defaultStake??20);if(!u||!Ei(u)||!D)/* @__PURE__ */return E(W,{style:[iu.container,{backgroundColor:x.background}],children:/* @__PURE__ */E(fi,{style:{color:x.textMuted,fontFamily:v},children:"No safety net available."})});const j=D.modes.find(e=>e.id===H)??D.modes[0],G=Yi(I,L,j.allowedMisses,D.pricing),V=e=>{const t=Math.max(0,Math.round(100*e)/100);return null!==D.maxStake?Math.min(t,D.maxStake):t},N=e=>{const t=D.modes.find(t=>t.id===e);t&&(M(e),m(t.ruleId),t.legOptions.includes(L)||R(t.legOptions.reduce((e,t)=>Math.abs(t-L)<Math.abs(e-L)?t:e,t.legOptions[0])))},X=I>=D.minStake,q=()=>{X&&(m(j.ruleId),g(L),p(L-j.allowedMisses),y(I),w(),t?.())},K=()=>{X&&(m(j.ruleId),p(L-j.allowedMisses),y(I),b(u,L,I),e?.())},Q=(e,t)=>/* @__PURE__ */U(W,{style:iu.controlLabelRow,children:[/* @__PURE__ */E(fi,{style:[iu.controlLabelText,{color:x.textMuted}],children:e}),/* @__PURE__ */E(fi,{style:[iu.controlValueText,{color:B}],children:t})]}),J=(e,t,n,i)=>/* @__PURE__ */E(z,{onPress:i,accessibilityRole:"radio",accessibilityState:{selected:n},activeOpacity:.8,style:[iu.chip,{backgroundColor:n?x.primary:"transparent",borderColor:n?x.primary:x.border}],children:/* @__PURE__ */E(fi,{style:[iu.chipText,{color:n?x.primaryText:x.textMuted}],children:t})},e),Z=[{label:"Perfect",amount:G.perfect},...G.nearMiss.map((e,t)=>({label:`All but ${t+1}`,amount:e}))];return c?/* @__PURE__ */E(eu,{game:u,theme:h,legs:L,legOptions:j.legOptions,onLegs:R,stake:I,onStake:e=>O(V(e)),minStake:D.minStake,maxStake:D.maxStake,valid:X,modes:D.modes.map(e=>({id:e.id,label:e.label,detail:`${e.allowedMisses} ${1===e.allowedMisses?"miss":"misses"} covered`})),modeId:j.id,onMode:e=>N(e),onBack:n,onPick:q,onQuickPick:K,expectedCorrect:L-j.allowedMisses,ruleId:j.ruleId,view:Oa(G,j.label)}):/* @__PURE__ */U(W,{style:[iu.container,{backgroundColor:x.background}],children:[n?/* @__PURE__ */E(W,{style:iu.backRow,children:/* @__PURE__ */E(Bs,{onBack:n,label:l})}):null,/* @__PURE__ */U(Li,{style:iu.inner,children:[void 0!==o?o:/* @__PURE__ */E(Vh,{eyebrow:i?null:"Choose your safety net",iconUrl:$(u),gameName:u.game_name,tagline:D.tagline}),
538
- /* @__PURE__ */E(_h,{}),
539
- /* @__PURE__ */U(W,{style:[iu.ticket,A&&iu.ticketWide,{backgroundColor:C,borderColor:x.border,shadowColor:B,shadowOpacity:.14,shadowRadius:14,shadowOffset:{width:0,height:10},elevation:1}],children:[Q("Safety net",j.label),
540
- /* @__PURE__ */E(W,{style:iu.chipRow,children:D.modes.map(e=>J(e.id,e.label,e.id===j.id,()=>N(e.id)))}),
541
- /* @__PURE__ */E(fi,{style:[iu.modeExplain,A&&iu.modeExplainWide,{color:x.textMuted}],children:j.explain}),
542
- /* @__PURE__ */U(W,{style:iu.legsBlock,children:[Q("Legs",`${L} legs`),
543
- /* @__PURE__ */E(W,{style:iu.chipRow,children:j.legOptions.map(e=>J(e,String(e),e===L,()=>R(e)))}),
544
- /* @__PURE__ */U(W,{style:iu.hintRow,children:[/* @__PURE__ */E(fi,{style:[iu.hintText,{color:x.textMuted}],children:"Easier to land"}),/* @__PURE__ */E(fi,{style:[iu.hintText,{color:x.textMuted}],children:"Bigger prizes"})]})]}),
545
- /* @__PURE__ */U(W,{style:iu.stakeBlock,children:[Q("Stake",yt(I)),
546
- /* @__PURE__ */U(W,{style:[iu.inputWrap,{borderColor:P?x.borderFocus??x.primary:x.border,backgroundColor:x.backgroundAlt}],children:[/* @__PURE__ */E(fi,{style:[iu.inputPrefix,{color:x.textMuted}],children:"$"}),/* @__PURE__ */E(gi,{keyboardType:"decimal-pad",placeholder:"Enter stake",placeholderTextColor:x.textMuted,accessibilityLabel:"Stake amount",onFocus:()=>T(!0),onBlur:()=>T(!1),value:I,onChangeText:e=>{if(""===e)return void O(0);const t=Number(e);Number.isFinite(t)&&O(V(t))},style:[iu.input,{color:x.textAlt??x.text,fontFamily:v}]})]}),
547
- /* @__PURE__ */E(W,{style:iu.chipRow,children:D.quickAdds.map(e=>/* @__PURE__ */E(z,{onPress:()=>O(V((I||0)+e)),activeOpacity:.8,style:[iu.stakeChip,{backgroundColor:"transparent",borderColor:x.border}],children:/* @__PURE__ */U(fi,{style:[iu.chipText,{color:x.textMuted}],children:["+$",e]})},e))}),!X&&I>0?/* @__PURE__ */U(fi,{style:[iu.errorText,{color:x.error}],children:["Minimum stake is ",yt(D.minStake),"."]}):null]}),
548
- /* @__PURE__ */U(W,{style:[iu.prizeBlock,{borderTopColor:jh(B,.08)}],children:[
549
- /* @__PURE__ */U(W,{style:iu.prizeCaptionRow,children:[/* @__PURE__ */E(fi,{style:[iu.prizeCaption,{color:x.textMuted}],children:"What you can win"}),/* @__PURE__ */U(fi,{style:[iu.prizeCaption,{color:x.textMuted}],children:[yt(I)," returns"]})]}),
550
- /* @__PURE__ */U(W,{style:iu.prizeRows,children:[Z.map(e=>/* @__PURE__ */U(W,{style:iu.prizeRow,children:[/* @__PURE__ */E(fi,{style:[iu.prizeRowLabel,A&&iu.prizeRowLabelWide,{color:x.text}],children:e.label}),/* @__PURE__ */E(fi,{style:[iu.prizeRowAmount,A&&iu.prizeRowAmountWide,{color:x.primary,fontFamily:k}],children:yt(Math.round(e.amount))})]},e.label)),/* @__PURE__ */U(W,{style:[iu.sweepRow,{backgroundColor:x.primary}],children:[/* @__PURE__ */U(W,{style:iu.sweepLeft,children:[/* @__PURE__ */E(fi,{style:[iu.sweepLabel,A&&iu.sweepLabelWide,{color:x.primaryText,fontFamily:k}],children:"Clean sweep"}),/* @__PURE__ */E(fi,{style:[iu.sweepSub,{color:x.primaryText}],children:"every leg right — all prizes"})]}),/* @__PURE__ */E(fi,{style:[iu.sweepAmount,A&&iu.sweepAmountWide,{color:x.primaryText,fontFamily:k}],children:yt(Math.round(G.sweep))})]})]}),
551
- /* @__PURE__ */E(fi,{style:[iu.stakeNote,{color:x.textMuted}],children:"Total returns, stake included."}),
552
- /* @__PURE__ */U(fi,{style:[iu.missNote,{color:x.textMuted}],children:["Miss ",1===j.allowedMisses?"two":"three"," or more and the ticket does not pay."]})]})]}),
553
- /* @__PURE__ */U(W,{style:[iu.modeCards,A&&iu.modeCardsWide],children:[/* @__PURE__ */E(W,{style:A?iu.modeCardCell:void 0,children:/* @__PURE__ */E(Jh,{tile:/* @__PURE__ */E(Gh,{iconUrl:$(u),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:q})}),/* @__PURE__ */E(W,{style:A?iu.modeCardCell:void 0,children:/* @__PURE__ */E(Jh,{tile:/* @__PURE__ */E(Gh,{iconUrl:`${Y}quickpick`,size:60}),label:"QuickPick for me",stat:"Fastest",detail:["We fill every leg for you","Straight to the bet slip"],onSelect:K})})]})]})]})}var iu=B.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 ou({onPickYourOwn:e,onQuickPick:t,onBack:n,hideTitle:i,backLabel:o="Games"}){const r=yl(),l=Fi(),a=Wr(r.selectedGame,r.gameLibrary);return a?.Setup?/* @__PURE__ */U(j,{children:[/* @__PURE__ */E(a.Setup,{onPickYourOwn:e,onQuickPick:t,onBack:n,hideTitle:i,backLabel:o,entry:r,yesNoLabels:l}),/* @__PURE__ */E(Nd,{})]}):Ei(r.selectedGame)?/* @__PURE__ */U(j,{children:[/* @__PURE__ */E(nu,{onPickYourOwn:e,onQuickPick:t,onBack:n,hideTitle:i,backLabel:o}),/* @__PURE__ */E(Nd,{})]}):r.selectedGame?/* @__PURE__ */U(W,{children:[/* @__PURE__ */E(fi,{style:{color:r.theme.colors.textMuted,fontFamily:r.bodyFont},children:"No setup required — this game goes straight to picks."}),/* @__PURE__ */E(Nd,{})]}):null}function ru({onBack:e}){const{selectedGame:t,selectedCategory:n,displayCategoryName:i,uiVariant:o}=yl();if(!t)return null;if(qn(o))/* @__PURE__ */return E(As,{onBack:e});const r=n??t.category;/* @__PURE__ */
554
- return E(Cs,{title:t.game_name,onBack:e,backLabel:r?i(r):void 0})}function lu({iconUrl:e,gameName:t,nameLines:n,height:i=56,showTrademark:o=!0}){const{theme:r}=yl(),l=hn(r),a=bn(r),s=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),c=Nr(r)??"Manrope, Poppins, sans-serif",d=n&&n.length>0?n:t.split(/\s+/),h=.72*i,u=.5*i,f=Math.min(.62*i/d.length,.3*i);/* @__PURE__ */
535
+ /* @__PURE__ */E(bd,{view:n.view??e.view,theme:e.theme}),!1===e.valid&&/* @__PURE__ */U(fi,{accessibilityRole:"alert",style:{...r,color:o.error},children:["Minimum stake ",yt(e.minStake??1),"."]}),
536
+ /* @__PURE__ */U(W,{style:{flexDirection:"row",gap:8,paddingTop:12,paddingBottom:16,backgroundColor:o.background,borderTopWidth:1,borderColor:o.border},children:[/* @__PURE__ */E(vi,{theme:e.theme,size:"lg",disabled:!1===e.valid,onPress:e.onPick,style:{flex:1.3,minWidth:0},children:`Choose ${e.legs} picks`}),"deck"===i.quickPick?/* @__PURE__ */E(ns,{tone:"paper",theme:e.theme,hint:`All ${e.legs} for me`,disabled:!1===e.valid,onPress:e.onQuickPick,style:{flex:1,minWidth:0}}):/* @__PURE__ */E(vi,{theme:e.theme,size:"lg",variant:"secondary",disabled:!1===e.valid,onPress:e.onQuickPick,style:{flex:1,minWidth:0},children:`QuickPick ${e.legs}`})]})]})}function nu({onBack:e,hideActions:t}={}){const{theme:n,selectedGame:i}=ml(),o=Nr(n),r=n.colors,{width:l}=F(),a=l<640;/* @__PURE__ */
537
+ return U(W,{style:[ou.header,a&&ou.headerCompact],children:[/* @__PURE__ */E(fi,{style:[ou.sectionTitle,a&&ou.sectionTitleCompact,{color:r.primary,fontFamily:o}],children:"Choose your safety net"}),/* @__PURE__ */E(zs,{onBack:e,hideActions:t,label:i?.game_name})]})}function iu({onQuickPick:e,onPickYourOwn:t,onBack:n,hideTitle:i,header:o,config:r,backLabel:l="Games"}){const a=Zn(),c="call"===a||"shelf"===a||qn(a),{theme:h,selectedGame:u,selectedPropositionCount:f,handlePropositionCountChange:g,setExpectedCorrect:p,setBetAmount:y,setSelectedRuleId:m,quickPickGame:b,goToSportSelection:w}=ml(),x=h.colors,v=Yr(h),k=Nr(h),B=hn(h),C=kn(h),{width:S}=F(),A=S>=640,[P,T]=d(!1),D=s(()=>r??Ji(u),[r,u]),[H,M]=d(()=>D?.defaultModeId??"extra_shot"),[L,R]=d(()=>{const e=D?.modes.find(e=>e.id===(D?.defaultModeId??"extra_shot"));return e?null!=f&&e.legOptions.includes(f)?f:e.defaultLegs:8}),[I,O]=d(()=>D?.defaultStake??20);if(!u||!Ei(u)||!D)/* @__PURE__ */return E(W,{style:[ou.container,{backgroundColor:x.background}],children:/* @__PURE__ */E(fi,{style:{color:x.textMuted,fontFamily:v},children:"No safety net available."})});const j=D.modes.find(e=>e.id===H)??D.modes[0],G=Yi(I,L,j.allowedMisses,D.pricing),V=e=>{const t=Math.max(0,Math.round(100*e)/100);return null!==D.maxStake?Math.min(t,D.maxStake):t},N=e=>{const t=D.modes.find(t=>t.id===e);t&&(M(e),m(t.ruleId),t.legOptions.includes(L)||R(t.legOptions.reduce((e,t)=>Math.abs(t-L)<Math.abs(e-L)?t:e,t.legOptions[0])))},X=I>=D.minStake,q=()=>{X&&(m(j.ruleId),g(L),p(L-j.allowedMisses),y(I),w(),t?.())},K=()=>{X&&(m(j.ruleId),p(L-j.allowedMisses),y(I),b(u,L,I),e?.())},Q=(e,t)=>/* @__PURE__ */U(W,{style:ou.controlLabelRow,children:[/* @__PURE__ */E(fi,{style:[ou.controlLabelText,{color:x.textMuted}],children:e}),/* @__PURE__ */E(fi,{style:[ou.controlValueText,{color:B}],children:t})]}),J=(e,t,n,i)=>/* @__PURE__ */E(z,{onPress:i,accessibilityRole:"radio",accessibilityState:{selected:n},activeOpacity:.8,style:[ou.chip,{backgroundColor:n?x.primary:"transparent",borderColor:n?x.primary:x.border}],children:/* @__PURE__ */E(fi,{style:[ou.chipText,{color:n?x.primaryText:x.textMuted}],children:t})},e),Z=[{label:"Perfect",amount:G.perfect},...G.nearMiss.map((e,t)=>({label:`All but ${t+1}`,amount:e}))];return c?/* @__PURE__ */E(tu,{game:u,theme:h,legs:L,legOptions:j.legOptions,onLegs:R,stake:I,onStake:e=>O(V(e)),minStake:D.minStake,maxStake:D.maxStake,valid:X,modes:D.modes.map(e=>({id:e.id,label:e.label,detail:`${e.allowedMisses} ${1===e.allowedMisses?"miss":"misses"} covered`})),modeId:j.id,onMode:e=>N(e),onBack:n,onPick:q,onQuickPick:K,expectedCorrect:L-j.allowedMisses,ruleId:j.ruleId,view:ja(G,j.label)}):/* @__PURE__ */U(W,{style:[ou.container,{backgroundColor:x.background}],children:[n?/* @__PURE__ */E(W,{style:ou.backRow,children:/* @__PURE__ */E(Cs,{onBack:n,label:l})}):null,/* @__PURE__ */U(Li,{style:ou.inner,children:[void 0!==o?o:/* @__PURE__ */E(Yh,{eyebrow:i?null:"Choose your safety net",iconUrl:$(u),gameName:u.game_name,tagline:D.tagline}),
538
+ /* @__PURE__ */E(eu,{}),
539
+ /* @__PURE__ */U(W,{style:[ou.ticket,A&&ou.ticketWide,{backgroundColor:C,borderColor:x.border,shadowColor:B,shadowOpacity:.14,shadowRadius:14,shadowOffset:{width:0,height:10},elevation:1}],children:[Q("Safety net",j.label),
540
+ /* @__PURE__ */E(W,{style:ou.chipRow,children:D.modes.map(e=>J(e.id,e.label,e.id===j.id,()=>N(e.id)))}),
541
+ /* @__PURE__ */E(fi,{style:[ou.modeExplain,A&&ou.modeExplainWide,{color:x.textMuted}],children:j.explain}),
542
+ /* @__PURE__ */U(W,{style:ou.legsBlock,children:[Q("Legs",`${L} legs`),
543
+ /* @__PURE__ */E(W,{style:ou.chipRow,children:j.legOptions.map(e=>J(e,String(e),e===L,()=>R(e)))}),
544
+ /* @__PURE__ */U(W,{style:ou.hintRow,children:[/* @__PURE__ */E(fi,{style:[ou.hintText,{color:x.textMuted}],children:"Easier to land"}),/* @__PURE__ */E(fi,{style:[ou.hintText,{color:x.textMuted}],children:"Bigger prizes"})]})]}),
545
+ /* @__PURE__ */U(W,{style:ou.stakeBlock,children:[Q("Stake",yt(I)),
546
+ /* @__PURE__ */U(W,{style:[ou.inputWrap,{borderColor:P?x.borderFocus??x.primary:x.border,backgroundColor:x.backgroundAlt}],children:[/* @__PURE__ */E(fi,{style:[ou.inputPrefix,{color:x.textMuted}],children:"$"}),/* @__PURE__ */E(gi,{keyboardType:"decimal-pad",placeholder:"Enter stake",placeholderTextColor:x.textMuted,accessibilityLabel:"Stake amount",onFocus:()=>T(!0),onBlur:()=>T(!1),value:I,onChangeText:e=>{if(""===e)return void O(0);const t=Number(e);Number.isFinite(t)&&O(V(t))},style:[ou.input,{color:x.textAlt??x.text,fontFamily:v}]})]}),
547
+ /* @__PURE__ */E(W,{style:ou.chipRow,children:D.quickAdds.map(e=>/* @__PURE__ */E(z,{onPress:()=>O(V((I||0)+e)),activeOpacity:.8,style:[ou.stakeChip,{backgroundColor:"transparent",borderColor:x.border}],children:/* @__PURE__ */U(fi,{style:[ou.chipText,{color:x.textMuted}],children:["+$",e]})},e))}),!X&&I>0?/* @__PURE__ */U(fi,{style:[ou.errorText,{color:x.error}],children:["Minimum stake is ",yt(D.minStake),"."]}):null]}),
548
+ /* @__PURE__ */U(W,{style:[ou.prizeBlock,{borderTopColor:Eh(B,.08)}],children:[
549
+ /* @__PURE__ */U(W,{style:ou.prizeCaptionRow,children:[/* @__PURE__ */E(fi,{style:[ou.prizeCaption,{color:x.textMuted}],children:"What you can win"}),/* @__PURE__ */U(fi,{style:[ou.prizeCaption,{color:x.textMuted}],children:[yt(I)," returns"]})]}),
550
+ /* @__PURE__ */U(W,{style:ou.prizeRows,children:[Z.map(e=>/* @__PURE__ */U(W,{style:ou.prizeRow,children:[/* @__PURE__ */E(fi,{style:[ou.prizeRowLabel,A&&ou.prizeRowLabelWide,{color:x.text}],children:e.label}),/* @__PURE__ */E(fi,{style:[ou.prizeRowAmount,A&&ou.prizeRowAmountWide,{color:x.primary,fontFamily:k}],children:yt(Math.round(e.amount))})]},e.label)),/* @__PURE__ */U(W,{style:[ou.sweepRow,{backgroundColor:x.primary}],children:[/* @__PURE__ */U(W,{style:ou.sweepLeft,children:[/* @__PURE__ */E(fi,{style:[ou.sweepLabel,A&&ou.sweepLabelWide,{color:x.primaryText,fontFamily:k}],children:"Clean sweep"}),/* @__PURE__ */E(fi,{style:[ou.sweepSub,{color:x.primaryText}],children:"every leg right — all prizes"})]}),/* @__PURE__ */E(fi,{style:[ou.sweepAmount,A&&ou.sweepAmountWide,{color:x.primaryText,fontFamily:k}],children:yt(Math.round(G.sweep))})]})]}),
551
+ /* @__PURE__ */E(fi,{style:[ou.stakeNote,{color:x.textMuted}],children:"Total returns, stake included."}),
552
+ /* @__PURE__ */U(fi,{style:[ou.missNote,{color:x.textMuted}],children:["Miss ",1===j.allowedMisses?"two":"three"," or more and the ticket does not pay."]})]})]}),
553
+ /* @__PURE__ */U(W,{style:[ou.modeCards,A&&ou.modeCardsWide],children:[/* @__PURE__ */E(W,{style:A?ou.modeCardCell:void 0,children:/* @__PURE__ */E(Zh,{tile:/* @__PURE__ */E(Vh,{iconUrl:$(u),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:q})}),/* @__PURE__ */E(W,{style:A?ou.modeCardCell:void 0,children:/* @__PURE__ */E(Zh,{tile:/* @__PURE__ */E(Vh,{iconUrl:`${Y}quickpick`,size:60}),label:"QuickPick for me",stat:"Fastest",detail:["We fill every leg for you","Straight to the bet slip"],onSelect:K})})]})]})]})}var ou=B.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 ru({onPickYourOwn:e,onQuickPick:t,onBack:n,hideTitle:i,backLabel:o="Games"}){const r=ml(),l=Fi(),a=Wr(r.selectedGame,r.gameLibrary);return a?.Setup?/* @__PURE__ */U(j,{children:[/* @__PURE__ */E(a.Setup,{onPickYourOwn:e,onQuickPick:t,onBack:n,hideTitle:i,backLabel:o,entry:r,yesNoLabels:l}),/* @__PURE__ */E(Xd,{})]}):Ei(r.selectedGame)?/* @__PURE__ */U(j,{children:[/* @__PURE__ */E(iu,{onPickYourOwn:e,onQuickPick:t,onBack:n,hideTitle:i,backLabel:o}),/* @__PURE__ */E(Xd,{})]}):r.selectedGame?/* @__PURE__ */U(W,{children:[/* @__PURE__ */E(fi,{style:{color:r.theme.colors.textMuted,fontFamily:r.bodyFont},children:"No setup required — this game goes straight to picks."}),/* @__PURE__ */E(Xd,{})]}):null}function lu({onBack:e}){const{selectedGame:t,selectedCategory:n,displayCategoryName:i,uiVariant:o}=ml();if(!t)return null;if(qn(o))/* @__PURE__ */return E(Ps,{onBack:e});const r=n??t.category;/* @__PURE__ */
554
+ return E(Ss,{title:t.game_name,onBack:e,backLabel:r?i(r):void 0})}function au({iconUrl:e,gameName:t,nameLines:n,height:i=56,showTrademark:o=!0}){const{theme:r}=ml(),l=hn(r),a=bn(r),s=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),c=Nr(r)??"Manrope, Poppins, sans-serif",d=n&&n.length>0?n:t.split(/\s+/),h=.72*i,u=.5*i,f=Math.min(.62*i/d.length,.3*i);/* @__PURE__ */
555
555
  return U(W,{accessible:!0,accessibilityRole:"image",accessibilityLabel:`YESNO ${t}`,style:{flexDirection:"row",alignItems:"center",gap:.22*i},children:[
556
- /* @__PURE__ */E(ds,{iconUrl:e,width:h,height:h,iconColor:l,accentColor:a}),
556
+ /* @__PURE__ */E(hs,{iconUrl:e,width:h,height:h,iconColor:l,accentColor:a}),
557
557
  /* @__PURE__ */U(fi,{style:{fontFamily:c,fontSize:u,letterSpacing:.045*-u,lineHeight:u,color:l,includeFontPadding:!1},children:[/* @__PURE__ */E(fi,{style:{fontWeight:"800"},children:"YES"}),/* @__PURE__ */E(fi,{style:{fontWeight:"600"},children:"NO"})]}),
558
558
  /* @__PURE__ */E(W,{style:{width:Math.max(2,Math.round(.045*i)),height:.78*i,backgroundColor:s}}),
559
- /* @__PURE__ */E(W,{style:{flexDirection:"column"},children:d.map((e,t)=>/* @__PURE__ */U(W,{style:{flexDirection:"row",alignItems:"flex-start"},children:[/* @__PURE__ */E(fi,{style:{fontFamily:c,fontSize:f,fontWeight:"500",letterSpacing:.012*-f,lineHeight:1.14*f,color:l,includeFontPadding:!1},children:e}),o&&t===d.length-1?/* @__PURE__ */E(fi,{style:{fontFamily:c,fontSize:.36*f,fontWeight:"500",color:l,marginLeft:1},children:"™"}):null]},`${e}-${t}`))})]})}var au=["cards","split","compare","shelf","showcase"],su={cards:"Cards",split:"Split",compare:"Compare",shelf:"Game Shelf",showcase:"Showcase"};function cu(e){return au.includes(e)?e:void 0}export{ie as BASE_GAME_ARTWORK,Sr as BASE_GAME_IDS,li as BUTTON_UI,Ar as BladeApiClient,Gh as BrandChipTile,lu as BrandLockup,Uh as BrandTile,vi as Button,$o as CHALLENGE_MISSES,Zo as CHALLENGE_MULTIPLE,eu as CallTicketBuilder,ua as CategoryIcon,rh as CategoryPickerPage,oh as CategoryPickerPageActions,ih as CategoryPickerPageTitle,fa as ChevronRightIcon,Sh as ConfirmPage,Ch as ConfirmPageActions,Bh as ConfirmPageTitle,wc as CorrelationChoicesSkeleton,Jd as CorrelationPricingDebug,fc as CorrelationPropPlaceholder,Ii as DOUBLE_SHOT_MIN_LEGS,Ri as EXTRA_SHOT_MIN_LEGS,Li as Entrance,Dh as EntriesPage,Th as EntriesPageTitle,vd as EntrySubmission,Gd as EventFilterBanner,ch as EventPickerPage,Rc as EventSwipeModal,xa as FilterChipCarousel,va as FilterChipRow,Y as GAME_ICON_SCHEME,N as GAME_ICON_SVG,Co as GAME_TIER_LEVEL,So as GAME_TIER_TABS,au as GAME_VARIANTS,su as GAME_VARIANT_LABELS,_o as GOLDEN_POINT_FACTOR,re as GameArtworkContext,Od as GameEntries,Mh as GameLogo,Jh as GameModeCard,Kd as GamePage,qd as GamePageActions,Vh as GamePageHeader,Xd as GamePageTitle,sc as GameSelector,ou as GameSetupPage,ru as GameSetupPageTitle,_h as GameSportRow,da as HowToPlayButton,ta as HowToPlayPanel,Ci as IconButton,ds as IconSvg,Qh as KitCard,mo as LADDER_FAMILY,po as LADDER_REFERENCE_BET,yo as LADDER_STAKES,Kh as LegPips,ga as LockIcon,No as MIRROR_CROSS,Po as MIRROR_STANDARD_MARGIN,Yo as MIRROR_TICK,tr as NO_BOOSTS,Nh as OptionStrip,so as PYD_LEG_RUNGS,ao as PYD_RETAIL_DIVIDENDS,Bs as PageBackLink,Cs as PageHeader,Ss as PageTitleBackRow,Sd as PayoutCircles,gl as PlaceEntryContext,ml as PlaceEntryProvider,Zh as PlayModeCards,Bi as PressCard,ns as QuickPickButton,Oc as SELECTION_VARIANTS,Jo as SIX_AGAIN_LEGS,Qo as SIX_AGAIN_MARGIN,nu as SafetyNetPage,tu as SafetyNetPageTitle,ba as ScrollShelf,pd as SelectionReview,fh as SelectionUndoSnackbar,ld as SelectionVariantList,mh as SelectionsPage,gh as SelectionsPageActions,hh as SelectionsPageTitle,Ih as SportPickerPage,Rh as SportPickerPageActions,Lh as SportPickerPageTitle,th as SportRail,ma as StarIcon,Ah as SuccessPage,Fh as SuccessPageActions,Wh as SuccessPageTitle,Wc as SwipeCard,Fc as SwipeCardFace,Hc as SwipeDeck,Nn as UI_VARIANTS,Xn as UI_VARIANT_LABELS,Jn as UiVariantContext,yc as VISIBLE_DEPTH,pa as YesNoCategoryLabel,Wi as YesNoLabelsProvider,Nd as YesNoMultiFooter,Yd as YesNoMultiLogo,wn as accentOnSurface,Fo as availableGameTierTabs,ki as buttonInk,ci as buttonLook,ne as categoryShelfArtwork,Ko as collapseMirrorSet,Kt as contrastTextColour,Br as correlationDebugText,Pn as darkTheme,Ao as defaultGameTierId,Fn as defaultTheme,Rn as defaultThemeSet,Wo as filterGamesByTierLevel,Se as filterPropositionsToEvent,se as findCategoryGamePreset,yt as formatCurrency,mt as formatDate,ye as formatSameGameMultiEventLabel,vo as fullStackPrize,to as gameNeedsRuleSetup,ro as gameSetPrize,te as gameShelfArtwork,dr as getConfirmBoostCopy,ar as getGameFlow,lo as getGameSetBetConfig,Ft as getJackpotInfo,Bo as getLadderConfig,jo as getMirrorConfig,go as getPickYourDividendConfig,we as getPropositionEventId,eo as getRuleSetupConfig,Ji as getSafetyNetConfig,Ui as getSafetyNetPricing,lr as getSixAgainConfig,Pt as getSportDisplayName,En as getTheme,Un as getThemeSet,Hn as goldLightTheme,Tn as goldTheme,On as goldThemeSet,Dn as greenLightTheme,An as greenTheme,In as greenThemeSet,bt as groupPropositionsBySport,xe as groupSameGameMultiEvents,qc as groupSelectionDays,jh as hexA,bi as hoverHandlers,Si as iconButtonInk,qn as isDenseUiVariant,sr as isFixedCardExactGame,_ as isGameIconUrl,oo as isGameSetBetGame,bo as isLadderGame,Ro as isMirrorGame,cr as isOpenExactMultiGame,co as isPickYourDividendGame,Ei as isSafetyNetGame,be as isSameGameMultiGame,Ce as isSelectableSameGameMultiProposition,er as isSixAgainGame,Wn as isThemeSet,St as isValidSelectionCount,ko as ladderCollectAt,xo as ladderTiers,oe as mergeGameArtwork,Oo as mirrorPrize,Xo as mirrorPrizeRows,Vo as mirrorSuitePrize,qo as mirrorVariantGames,di as optionLook,Xh as optionStripItemStyle,cu as parseGameVariant,Kn as parseUiVariant,Ka as previewCopy,ai as previewTint,ze as propositionsBelongToEvent,fo as pydLadder,uo as pydRung,Dt as resolveCategoryDisplayName,Q as resolveGameIconId,ee as resolveGameIconMarkup,$ as resolveGameIconUrl,zo as resolveGameTierLevel,ut as resolvePrice,Za as resolveShelfArtwork,Tt as resolveSportDisplayName,zn as resolveTheme,Gi as roundDividendAmount,wr as roundQuotedPayout,Ni as safetyNetCollect,Yi as safetyNetTicket,_a as shelfGameName,ir as sixAgainRuleId,or as sixAgainStakeMultiples,nr as sixAgainTicket,bn as themeAccent,Yr as themeBodyFont,hn as themeHeading,Nr as themeHeadingFont,un as themeLabel,kn as themeSelectionCard,Vn as themeSets,xn as themeTextAlt,vn as themeTextAltMuted,fn as themeValue,Gn as themes,Qn as uiVariantTheme,Eh as useBrandTileColors,Gr as useCalculatePayout,vr as useCorrelationSteering,jr as useCreateGameEntry,Vr as useEntryPreview,Ur as useEvaluateRule,le as useGameArtwork,Ir as useGameEntries,Or as useGameMaxPayouts,Mr as useGames,yl as usePlaceEntry,Er as usePlaceEntryFlow,wi as usePress,Lr as usePropositions,Yn as useResolvedTheme,Rr as useSports,bc as useSwipeDeck,Zn as useUiVariant,Fi as useYesNoLabels,xr as usesCorrelationPricing};
559
+ /* @__PURE__ */E(W,{style:{flexDirection:"column"},children:d.map((e,t)=>/* @__PURE__ */U(W,{style:{flexDirection:"row",alignItems:"flex-start"},children:[/* @__PURE__ */E(fi,{style:{fontFamily:c,fontSize:f,fontWeight:"500",letterSpacing:.012*-f,lineHeight:1.14*f,color:l,includeFontPadding:!1},children:e}),o&&t===d.length-1?/* @__PURE__ */E(fi,{style:{fontFamily:c,fontSize:.36*f,fontWeight:"500",color:l,marginLeft:1},children:"™"}):null]},`${e}-${t}`))})]})}var su=["cards","split","compare","shelf","showcase"],cu={cards:"Cards",split:"Split",compare:"Compare",shelf:"Game Shelf",showcase:"Showcase"};function du(e){return su.includes(e)?e:void 0}export{ie as BASE_GAME_ARTWORK,Sr as BASE_GAME_IDS,li as BUTTON_UI,Ar as BladeApiClient,Vh as BrandChipTile,au as BrandLockup,Gh as BrandTile,vi as Button,$o as CHALLENGE_MISSES,Zo as CHALLENGE_MULTIPLE,tu as CallTicketBuilder,fa as CategoryIcon,lh as CategoryPickerPage,rh as CategoryPickerPageActions,oh as CategoryPickerPageTitle,ga as ChevronRightIcon,zh as ConfirmPage,Sh as ConfirmPageActions,Ch as ConfirmPageTitle,xc as CorrelationChoicesSkeleton,Zd as CorrelationPricingDebug,gc as CorrelationPropPlaceholder,Ii as DOUBLE_SHOT_MIN_LEGS,Ri as EXTRA_SHOT_MIN_LEGS,Li as Entrance,Hh as EntriesPage,Dh as EntriesPageTitle,kd as EntrySubmission,Vd as EventFilterBanner,dh as EventPickerPage,Ic as EventSwipeModal,va as FilterChipCarousel,ka as FilterChipRow,Y as GAME_ICON_SCHEME,N as GAME_ICON_SVG,Co as GAME_TIER_LEVEL,So as GAME_TIER_TABS,su as GAME_VARIANTS,cu as GAME_VARIANT_LABELS,_o as GOLDEN_POINT_FACTOR,re as GameArtworkContext,jd as GameEntries,Lh as GameLogo,Zh as GameModeCard,Qd as GamePage,Kd as GamePageActions,Yh as GamePageHeader,qd as GamePageTitle,cc as GameSelector,ru as GameSetupPage,lu as GameSetupPageTitle,eu as GameSportRow,ha as HowToPlayButton,na as HowToPlayPanel,Ci as IconButton,hs as IconSvg,Jh as KitCard,mo as LADDER_FAMILY,po as LADDER_REFERENCE_BET,yo as LADDER_STAKES,Qh as LegPips,pa as LockIcon,No as MIRROR_CROSS,Po as MIRROR_STANDARD_MARGIN,Yo as MIRROR_TICK,tr as NO_BOOSTS,Xh as OptionStrip,so as PYD_LEG_RUNGS,ao as PYD_RETAIL_DIVIDENDS,Cs as PageBackLink,Ss as PageHeader,zs as PageTitleBackRow,zd as PayoutCircles,pl as PlaceEntryContext,bl as PlaceEntryProvider,$h as PlayModeCards,Bi as PressCard,is as QuickPickButton,jc as SELECTION_VARIANTS,Jo as SIX_AGAIN_LEGS,Qo as SIX_AGAIN_MARGIN,iu as SafetyNetPage,nu as SafetyNetPageTitle,wa as ScrollShelf,yd as SelectionReview,gh as SelectionUndoSnackbar,ad as SelectionVariantList,bh as SelectionsPage,ph as SelectionsPageActions,uh as SelectionsPageTitle,Oh as SportPickerPage,Ih as SportPickerPageActions,Rh as SportPickerPageTitle,nh as SportRail,ba as StarIcon,Ph as SuccessPage,Ah as SuccessPageActions,Fh as SuccessPageTitle,Fc as SwipeCard,Ac as SwipeCardFace,Mc as SwipeDeck,Nn as UI_VARIANTS,Xn as UI_VARIANT_LABELS,Jn as UiVariantContext,mc as VISIBLE_DEPTH,ya as YesNoCategoryLabel,Wi as YesNoLabelsProvider,Xd as YesNoMultiFooter,Nd as YesNoMultiLogo,wn as accentOnSurface,Fo as availableGameTierTabs,ki as buttonInk,ci as buttonLook,ne as categoryShelfArtwork,Ko as collapseMirrorSet,Kt as contrastTextColour,Br as correlationDebugText,Pn as darkTheme,Ao as defaultGameTierId,Fn as defaultTheme,Rn as defaultThemeSet,Wo as filterGamesByTierLevel,Se as filterPropositionsToEvent,se as findCategoryGamePreset,yt as formatCurrency,mt as formatDate,ye as formatSameGameMultiEventLabel,vo as fullStackPrize,to as gameNeedsRuleSetup,ro as gameSetPrize,te as gameShelfArtwork,dr as getConfirmBoostCopy,ar as getGameFlow,lo as getGameSetBetConfig,Ft as getJackpotInfo,Bo as getLadderConfig,jo as getMirrorConfig,go as getPickYourDividendConfig,we as getPropositionEventId,eo as getRuleSetupConfig,Ji as getSafetyNetConfig,Ui as getSafetyNetPricing,lr as getSixAgainConfig,Pt as getSportDisplayName,En as getTheme,Un as getThemeSet,Hn as goldLightTheme,Tn as goldTheme,On as goldThemeSet,Dn as greenLightTheme,An as greenTheme,In as greenThemeSet,bt as groupPropositionsBySport,xe as groupSameGameMultiEvents,Kc as groupSelectionDays,Eh as hexA,bi as hoverHandlers,Si as iconButtonInk,qn as isDenseUiVariant,sr as isFixedCardExactGame,_ as isGameIconUrl,oo as isGameSetBetGame,bo as isLadderGame,Ro as isMirrorGame,cr as isOpenExactMultiGame,co as isPickYourDividendGame,Ei as isSafetyNetGame,be as isSameGameMultiGame,Ce as isSelectableSameGameMultiProposition,er as isSixAgainGame,Wn as isThemeSet,St as isValidSelectionCount,ko as ladderCollectAt,xo as ladderTiers,oe as mergeGameArtwork,Oo as mirrorPrize,Xo as mirrorPrizeRows,Vo as mirrorSuitePrize,qo as mirrorVariantGames,di as optionLook,qh as optionStripItemStyle,du as parseGameVariant,Kn as parseUiVariant,Qa as previewCopy,ai as previewTint,ze as propositionsBelongToEvent,fo as pydLadder,uo as pydRung,Dt as resolveCategoryDisplayName,Q as resolveGameIconId,ee as resolveGameIconMarkup,$ as resolveGameIconUrl,zo as resolveGameTierLevel,ut as resolvePrice,$a as resolveShelfArtwork,Tt as resolveSportDisplayName,zn as resolveTheme,Gi as roundDividendAmount,wr as roundQuotedPayout,Ni as safetyNetCollect,Yi as safetyNetTicket,es as shelfGameName,ir as sixAgainRuleId,or as sixAgainStakeMultiples,nr as sixAgainTicket,bn as themeAccent,Yr as themeBodyFont,hn as themeHeading,Nr as themeHeadingFont,un as themeLabel,kn as themeSelectionCard,Vn as themeSets,xn as themeTextAlt,vn as themeTextAltMuted,fn as themeValue,Gn as themes,Qn as uiVariantTheme,Uh as useBrandTileColors,Gr as useCalculatePayout,vr as useCorrelationSteering,jr as useCreateGameEntry,Vr as useEntryPreview,Ur as useEvaluateRule,le as useGameArtwork,Ir as useGameEntries,Or as useGameMaxPayouts,Mr as useGames,ml as usePlaceEntry,Er as usePlaceEntryFlow,wi as usePress,Lr as usePropositions,Yn as useResolvedTheme,Rr as useSports,wc as useSwipeDeck,Zn as useUiVariant,Fi as useYesNoLabels,xr as usesCorrelationPricing};