1import{u as M,r as n,t as j,j as e,S,g as A}from"./index-C3Qps0S4.js";import{P as H,a as _,g as C}from"./gameData-CmrY7CmA.js";import{r as I}from"./gamePlayLink-1q4gak8k.js";import{u as L,c as D,S as F}from"./useSimulatedActivity-Cc8kV7RX.js";import{A as R}from"./arrow-left-AxGNO8ZF.js";import{F as y}from"./flame-ClgW77Uq.js";import{T as O}from"./timer-BUYRTa4S.js";import{S as U}from"./star-B909tHoY.js";import{C as B}from"./clock-CHw5d3NP.js";import{T as V}from"./trending-up-Dq4_iocl.js";import{T as Q}from"./trending-down-4uZLcbK3.js";import{E as N}from"./external-link-BaKbLCyP.js";import"./users-DTIsUZbE.js";function b(t){let s=5381;for(let l=0;l<t.length;l++)s=(s<<5)+s+t.charCodeAt(l),s=s&s;return Math.abs(s)}function w(){return Math.floor(Date.now()/(1e3*60*60))}function J(){return w()-24}function Y(t,s){const l=w(),d=b(`${t}-${l}`)%11-5;return Math.max(60,Math.min(98,s+d))}function z(t,s){const l=J(),d=b(`${t}-${l}`)%11-5;return Math.max(60,Math.min(98,s+d))}function K(t){const s=w();return b(`hot-${t}-${s}`)%7===0}function k(){return 60-new Date().getMinutes()}function q(t){const s=Math.floor(Date.now()/6e5);return b(`jackpot-${t}-${s}`)%120+1}function W(t){return t<60?`${t} à¸à¸²à¸à¸µà¸à¸µà¹à¹à¸¥à¹à¸§`:`${Math.floor(t/60)} à¸à¸¡.à¸à¸µà¹à¹à¸¥à¹à¸§`}const X=24,Z=6,ee=3;function E(t,s){return`${t}\0${s}`}function fe(){const[,t]=M(),[s,l]=n.useState(k()),[c,d]=n.useState("all"),m=j.publicSettings.gamePopupEnabled.useQuery(void 0,{staleTime:3e4}),g=j.gameLinks.getAllEnabled.useQuery(void 0,{staleTime:6e4}),x=j.gameIndividualLinks.getAllEnabled.useQuery(void 0,{staleTime:6e4});n.useEffect(()=>{const a=setInterval(()=>{l(k())},6e4);return()=>clearInterval(a)},[]);const u=n.useMemo(()=>{const a=[];return Object.entries(H).forEach(([r,p])=>{if(!_[r])return;C(r,p).filter(i=>!!i.image).slice(0,X).forEach(i=>{if(K(i.name)){const f=Y(i.name,i.winPercent),$=z(i.name,i.winPercent);a.push({...i,providerName:p,providerSlug:r,dynamicPercent:f,trendDiff:f-$,lastJackpotMin:q(i.name)})}})}),a.sort((r,p)=>p.dynamicPercent-r.dynamicPercent)},[]),h=n.useMemo(()=>new Map((g.data||[]).map(a=>[a.providerName,a])),[g.data]),v=n.useMemo(()=>new Map((x.data||[]).map(a=>[E(a.providerName,a.gameName),a.playUrl])),[x.data]),T=m.isLoading||g.isLoading||x.isLoading,P=m.data?.enabled===!0,o=(a,r)=>T?"à¸à¸³à¸¥à¸±à¸à¸à¸£à¸§à¸à¸ªà¸à¸à¸¥à¸´à¸à¸à¹à¹à¸à¸¡":P?a?r?"à¹à¸à¸´à¸à¹à¸à¸¡à¹à¸à¸«à¸à¹à¸²à¸à¹à¸²à¸à¹à¸«à¸¡à¹":"ยัà¸à¹à¸¡à¹à¹à¸à¹à¸à¸±à¹à¸à¸¥à¸´à¸à¸à¹à¸ªà¸³à¸«à¸£à¸±à¸à¹à¸à¸¡à¸à¸µà¹":"à¸à¸¸à¹à¸¡à¹à¸¥à¹à¸à¸à¸à¸à¸à¹à¸²à¸¢à¸à¸µà¹à¸à¸¹à¸à¸à¹à¸à¸à¹à¸à¸¢à¹à¸à¸à¸¡à¸´à¸":"ระà¸à¸à¸¥à¸´à¸à¸à¹à¹à¸à¸¡à¸¢à¸±à¸à¸à¸´à¸à¸à¸¢à¸¹à¹";return e.jsxs("div",{"data-loc":"client/src/pages/HotGamesTodayPage.tsx:172",className:"flex flex-col gap-3 pb-24 px-3 min-h-screen",children:[e.jsxs("div",{"data-loc":"client/src/pages/HotGamesTodayPage.tsx:174",className:"flex items-center justify-between pt-3",children:[e.jsx("button",{"data-loc":"client/src/pages/HotGamesTodayPage.tsx:175",onClick:()=>t("/slot"),className:"p-2 -ml-2 text-gray-400 hover:text-white transition-colors",children:e.jsx(R,{"data-loc":"client/src/pages/HotGamesTodayPage.tsx:176",className:"w-5 h-5"})}),e.jsxs("h1",{"data-loc":"client/src/pages/HotGamesTodayPage.tsx:178",className:"text-lg font-bold text-white flex items-center gap-2",children:[e.jsx(y,{"data-loc":"client/src/pages/HotGamesTodayPage.tsx:179",className:"w-5 h-5 text-orange-400"}),"à¹à¸à¸¡à¹à¸à¸°à¸à¸³à¸§à¸±à¸à¸à¸µà¹"]}),e.jsx("div",{"data-loc":"client/src/pages/HotGamesTodayPage.tsx:182",className:"w-9"})]}),e.jsxs("div",{"data-loc":"client/src/pages/HotGamesTodayPage.tsx:186",className:"relative overflow-hidden rounded-2xl bg-gradient-to-r from-orange-500/20 via-red-500/15 to-purple-500/20 border border-orange-500/30 p-4",children:[e.jsx("div",{"data-loc":"client/src/pages/HotGamesTodayPage.tsx:187",className:"absolute top-0 right-0 w-24 h-24 bg-orange-500/10 rounded-full blur-2xl"}),e.jsx("div",{"data-loc":"client/src/pages/HotGamesTodayPage.tsx:188",className:"absolute bottom-0 left-0 w-16 h-16 bg-red-500/10 rounded-full blur-xl"}),e.jsxs("div",{"data-loc":"client/src/pages/HotGamesTodayPage.tsx:190",className:"relative flex items-center justify-between",children:[e.jsxs("div",{"data-loc":"client/src/pages/HotGamesTodayPage.tsx:191",children:[e.jsxs("h2",{"data-loc":"client/src/pages/HotGamesTodayPage.tsx:192",className:"text-white font-bold text-sm flex items-center gap-1.5",children:[e.jsx(S,{"data-loc":"client/src/pages/HotGamesTodayPage.tsx:193",className:"w-4 h-4 text-yellow-400"}),"à¸à¹à¸§à¸à¹à¸§à¸¥à¸²à¸à¸à¸"]}),e.jsx("p",{"data-loc":"client/src/pages/HotGamesTodayPage.tsx:196",className:"text-gray-300 text-xs mt-1",children:"à¹à¸à¸¡à¸à¸µà¹à¸¡à¸µà¹à¸à¸à¸²à¸ªà¹à¸à¸à¸ªà¸¹à¸à¹à¸à¸à¸à¸à¸à¸µà¹"})]}),e.jsxs("div",{"data-loc":"client/src/pages/HotGamesTodayPage.tsx:200",className:"flex flex-col items-center bg-black/30 rounded-xl px-3 py-2 border border-orange-500/20",children:[e.jsx(O,{"data-loc":"client/src/pages/HotGamesTodayPage.tsx:201",className:"w-4 h-4 text-orange-300 mb-0.5"}),e.jsxs("span",{"data-loc":"client/src/pages/HotGamesTodayPage.tsx:202",className:"text-orange-200 text-xs font-bold",children:[s," à¸à¸²à¸à¸µ"]}),e.jsx("span",{"data-loc":"client/src/pages/HotGamesTodayPage.tsx:203",className:"text-gray-500 text-[8px]",children:"รà¸à¸à¸à¸±à¸à¹à¸"})]})]}),e.jsxs("div",{"data-loc":"client/src/pages/HotGamesTodayPage.tsx:207",className:"flex items-center gap-4 mt-3",children:[e.jsxs("div",{"data-loc":"client/src/pages/HotGamesTodayPage.tsx:208",className:"flex items-center gap-1.5",children:[e.jsx(y,{"data-loc":"client/src/pages/HotGamesTodayPage.tsx:209",className:"w-3.5 h-3.5 text-orange-400 animate-pulse"}),e.jsxs("span",{"data-loc":"client/src/pages/HotGamesTodayPage.tsx:210",className:"text-xs text-gray-300",children:[u.length," à¹à¸à¸¡à¸à¸³à¸¥à¸±à¸à¹à¸à¸"]})]}),e.jsxs("div",{"data-loc":"client/src/pages/HotGamesTodayPage.tsx:212",className:"flex items-center gap-1.5",children:[e.jsx(U,{"data-loc":"client/src/pages/HotGamesTodayPage.tsx:213",className:"w-3.5 h-3.5 text-yellow-400"}),e.jsxs("span",{"data-loc":"client/src/pages/HotGamesTodayPage.tsx:214",className:"text-xs text-gray-300",children:[Object.keys(H).length," à¸à¹à¸²à¸¢"]})]})]})]}),e.jsxs("div",{"data-loc":"client/src/pages/HotGamesTodayPage.tsx:220",className:"flex gap-1.5 overflow-x-auto pb-1 scrollbar-hide",children:[e.jsx("button",{"data-loc":"client/src/pages/HotGamesTodayPage.tsx:221",onClick:()=>d("all"),className:`flex-shrink-0 px-3 py-1.5 rounded-full text-xs font-medium transition-all ${c==="all"?"bg-orange-500 text-white":"bg-white/[0.05] text-gray-400 border border-white/10 hover:border-orange-500/30"}`,children:"à¸à¸±à¹à¸à¸«à¸¡à¸"}),Array.from(new Set(u.map(a=>a.providerName))).map(a=>e.jsx("button",{"data-loc":"client/src/pages/HotGamesTodayPage.tsx:232",onClick:()=>d(a),className:`flex-shrink-0 px-3 py-1.5 rounded-full text-xs font-medium transition-all ${c===a?"bg-orange-500 text-white":"bg-white/[0.05] text-gray-400 border border-white/10 hover:border-orange-500/30"}`,children:a},a))]}),(()=>{const a=c==="all"?u:u.filter(r=>r.providerName===c);return a.length===0?e.jsxs("div",{"data-loc":"client/src/pages/HotGamesTodayPage.tsx:253",className:"flex flex-col items-center justify-center py-16",children:[e.jsx(y,{"data-loc":"client/src/pages/HotGamesTodayPage.tsx:254",className:"w-12 h-12 text-gray-600 mb-3"}),e.jsx("p",{"data-loc":"client/src/pages/HotGamesTodayPage.tsx:255",className:"text-gray-500 text-sm",children:"à¹à¸¡à¹à¸¡à¸µà¹à¸à¸¡à¹à¸à¸à¹à¸§à¸à¹à¸§à¸¥à¸²à¸à¸à¸à¸à¸à¸à¸à¸µà¹"}),e.jsx("p",{"data-loc":"client/src/pages/HotGamesTodayPage.tsx:256",className:"text-gray-600 text-xs mt-1",children:"à¸à¸£à¸¸à¸à¸²à¸à¸¥à¸±à¸à¸¡à¸²à¸à¸£à¸§à¸à¸ªà¸à¸à¹à¸à¸à¸±à¹à¸§à¹à¸¡à¸à¸à¸±à¸à¹à¸"})]}):e.jsx("div",{"data-loc":"client/src/pages/HotGamesTodayPage.tsx:259",className:"flex flex-col gap-2",children:a.map((r,p)=>{const G=h.get(r.providerSlug),i=G?.showPlay!==!1,f=I({masterEnabled:P,providerShowPlay:i,individualPlayUrl:v.get(E(r.providerSlug,r.n
1ame)),providerPlayUrl:G?.playUrl});return e.jsx(te,{"data-loc":"client/src/pages/HotGamesTodayPage.tsx:271",game:r,rank:p+1,playUrl:f,playUnavailableReason:o(i,f),onProviderClick:()=>t(`/slot/${r.providerSlug}`)},`${r.providerSlug}-${r.name}-${p}`)})})})(),e.jsxs("div",{"data-loc":"client/src/pages/HotGamesTodayPage.tsx:286",className:"text-center mt-2",children:[e.jsx("p",{"data-loc":"client/src/pages/HotGamesTodayPage.tsx:287",className:"text-[10px] text-gray-600",children:"* à¸à¹à¸à¸¡à¸¹à¸¥à¸à¸±à¸à¹à¸à¸à¸à¸¸à¸à¸à¸±à¹à¸§à¹à¸¡à¸ à¹à¸¡à¹à¸£à¸±à¸à¸à¸£à¸°à¸à¸±à¸à¸à¸¥à¸¥à¸±à¸à¸à¹"}),e.jsx("p",{"data-loc":"client/src/pages/HotGamesTodayPage.tsx:290",className:"mt-1 text-[9px] text-gray-700",children:"Activity à¹à¸à¹à¸à¸à¹à¸²à¸à¸³à¸¥à¸à¸à¹à¸à¸¢à¸à¸£à¸°à¸¡à¸²à¸ à¹à¸¡à¹à¹à¸à¹à¸à¸³à¸à¸§à¸à¸à¸¹à¹à¹à¸à¹à¸à¸²à¸à¹à¸à¸à¹à¸£à¸µà¸¢à¸¥à¹à¸à¸¡à¹"})]})]})}function te({game:t,rank:s,playUrl:l,playUnavailableReason:c,onProviderClick:d}){const m=n.useRef(null),[g,x]=n.useState(!1),[u,h]=n.useState(!1),v=L({id:D(t.providerSlug,t.name),activitySignal:t.winPercent,active:u});n.useEffect(()=>{const o=m.current;if(!o||typeof IntersectionObserver>"u"){h(!0);return}const a=new IntersectionObserver(([r])=>h(r.isIntersecting),{rootMargin:"160px"});return a.observe(o),()=>a.disconnect()},[]),n.useEffect(()=>{if(t.dynamicPercent>=90){x(!0);const o=setTimeout(()=>x(!1),3e3);return()=>clearTimeout(o)}},[t.dynamicPercent]);const T=o=>o>=90?"text-green-400":o>=80?"text-yellow-400":o>=70?"text-orange-400":"text-red-400",P=o=>o===1?"bg-gradient-to-r from-yellow-500 to-amber-400 text-black":o===2?"bg-gradient-to-r from-gray-300 to-gray-400 text-black":o===3?"bg-gradient-to-r from-orange-600 to-amber-700 text-white":"bg-gray-700 text-gray-300";return e.jsxs("div",{"data-loc":"client/src/pages/HotGamesTodayPage.tsx:355",ref:m,onClick:d,className:"relative flex items-center gap-3 p-3 rounded-xl bg-gray-900/80 border border-orange-500/20 hover:border-orange-500/40 transition-all cursor-pointer active:scale-[0.98] overflow-hidden",children:[g&&t.dynamicPercent>=90&&e.jsx("div",{"data-loc":"client/src/pages/HotGamesTodayPage.tsx:362",className:"absolute inset-0 pointer-events-none overflow-hidden z-20",children:Array.from({length:12}).map((o,a)=>e.jsx("div",{"data-loc":"client/src/pages/HotGamesTodayPage.tsx:364",className:"absolute w-1.5 h-1.5 rounded-full animate-[confetti_2s_ease-out_forwards]",style:{left:`${10+a*7}%`,top:"-5px",backgroundColor:["#FFD700","#FF6B35","#FF1744","#00E676","#2979FF","#AA00FF"][a%6],animationDelay:`${a*.1}s`,opacity:.8}},a))}),e.jsx("div",{"data-loc":"client/src/pages/HotGamesTodayPage.tsx:380",className:`flex-shrink-0 w-7 h-7 rounded-full flex items-center justify-center text-xs font-bold ${P(s)}`,children:s}),e.jsx("div",{"data-loc":"client/src/pages/HotGamesTodayPage.tsx:385",className:"flex-shrink-0 w-12 h-12 rounded-lg overflow-hidden bg-gradient-to-br from-purple-900/60 to-indigo-900/60",children:t.image?e.jsx(ae,{"data-loc":"client/src/pages/HotGamesTodayPage.tsx:387",src:t.image,alt:t.name,rank:s}):e.jsx("div",{"data-loc":"client/src/pages/HotGamesTodayPage.tsx:389",className:"w-full h-full flex items-center justify-center",children:e.jsx(y,{"data-loc":"client/src/pages/HotGamesTodayPage.tsx:390",className:"w-5 h-5 text-orange-400/60"})})}),e.jsxs("div",{"data-loc":"client/src/pages/HotGamesTodayPage.tsx:396",className:"flex-1 min-w-0",children:[e.jsxs("div",{"data-loc":"client/src/pages/HotGamesTodayPage.tsx:397",className:"flex items-center gap-1.5",children:[e.jsx("p",{"data-loc":"client/src/pages/HotGamesTodayPage.tsx:398",className:"text-sm font-medium text-white truncate",children:t.name}),t.dynamicPercent>=90&&e.jsx(S,{"data-loc":"client/src/pages/HotGamesTodayPage.tsx:400",className:"w-3 h-3 text-yellow-400 flex-shrink-0 animate-pulse"})]}),e.jsxs("div",{"data-loc":"client/src/pages/HotGamesTodayPage.tsx:403",className:"flex items-center gap-2 mt-0.5",children:[e.jsx("span",{"data-loc":"client/src/pages/HotGamesTodayPage.tsx:404",className:"text-[10px] text-gray-500",children:t.providerName}),e.jsx(F,{"data-loc":"client/src/pages/HotGamesTodayPage.tsx:405",count:v,showLabel:!0,className:"text-[9px] text-blue-300",labelClassName:"text-[9px]"}),e.jsxs("span",{"data-loc":"client/src/pages/HotGamesTodayPage.tsx:411",className:"flex items-center gap-0.5 text-[9px] text-purple-300",children:[e.jsx(B,{"data-loc":"client/src/pages/HotGamesTodayPage.tsx:412",className:"w-2.5 h-2.5"}),W(t.lastJackpotMin)]})]}),e.jsx("div",{"data-loc":"client/src/pages/HotGamesTodayPage.tsx:416",className:"mt-1.5 h-1 rounded-full bg-gray-800 overflow-hidden",children:e.jsx("div",{"data-loc":"client/src/pages/HotGamesTodayPage.tsx:417",className:`h-full rounded-full bg-gradient-to-r ${t.dynamicPercent>=90?"from-green-500 to-emerald-400":t.dynamicPercent>=80?"from-yellow-500 to-amber-400":"from-orange-500 to-amber-500"}`,style:{width:`${t.dynamicPercent}%`}})})]}),e.jsxs("div",{"data-loc":"client/src/pages/HotGamesTodayPage.tsx:429",className:"flex w-[78px] shrink-0 flex-col items-end",children:[e.jsxs("span",{"data-loc":"client/src/pages/HotGamesTodayPage.tsx:430",className:`text-lg font-bold ${T(t.dynamicPercent)}`,children:[t.dynamicPercent,"%"]}),t.trendDiff!==0&&e.jsxs("span",{"data-loc":"client/src/pages/HotGamesTodayPage.tsx:434",className:`flex items-center gap-0.5 text-[9px] font-bold ${t.trendDiff>0?"text-green-400":"text-red-400"}`,children:[t.trendDiff>0?e.jsx(V,{"data-loc":"client/src/pages/HotGamesTodayPage.tsx:435",className:"w-2.5 h-2.5"}):e.jsx(Q,{"data-loc":"client/src/pages/HotGamesTodayPage.tsx:435",className:"w-2.5 h-2.5"}),t.trendDiff>0?"+":"",t.trendDiff,"%"]}),l?e.jsxs("a",{"data-loc":"client/src/pages/HotGamesTodayPage.tsx:440",href:l,target:"_blank",rel:"noopener noreferrer","aria-label":`à¹à¸à¹à¸¥à¹à¸à¹à¸à¸¡ ${t.name} à¹à¸à¸«à¸à¹à¸²à¸à¹à¸²à¸à¹à¸«à¸¡à¹`,title:c,onClick:o=>o.stopPropagation(),className:"play-game-link mt-1 flex h-6 w-full items-center justify-center gap-0.5 whitespace-nowrap rounded-lg border border-amber-300/45 bg-gradient-to-r from-amber-400 to-orange-500 px-1 text-[9px] font-bold text-[#171006] shadow-[0_3px_10px_rgba(245,158,11,0.18)] hover:from-amber-300 hover:to-orange-400 active:scale-[0.97] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-amber-300/80",children:[e.jsx(N,{"data-loc":"client/src/pages/HotGamesTodayPage.tsx:449","aria-hidden":"true",className:"play-game-link-icon h-2.5 w-2.5 shrink-0"}),e.jsx("span",{"data-loc":"client/src/pages/HotGamesTodayPage.tsx:450",className:"play-game-link-label",children:"à¹à¸à¹à¸¥à¹à¸à¹à¸à¸¡"})]}):e.jsxs("button",{"data-loc":"client/src/pages/HotGamesTodayPage.tsx:453",type:"button",disabled:!0,"aria-label":`${t.name}: ${c}`,title:c,onClick:o=>o.stopPropagation(),className:"mt-1 flex h-6 w-full cursor-not-allowed items-center justify-center gap-0.5 whitespace-nowrap rounded-lg border border-white/[0.12] bg-white/[0.05] px-1 text-[9px] font-bold text-gray-500",children:[e.jsx(N,{"data-loc":"client/src/pages/HotGamesTodayPage.tsx:461","aria-hidden":"true",className:"h-2.5 w-2.5 shrink-0"}),"à¹à¸à¹à¸¥à¹à¸à¹à¸à¸¡"]})]})]})}function ae({src:t,alt:s,rank:l}){const[c,d]=n.useState(!1),[m,g]=n.useState(!1),x=l<=Z;return e.jsxs("div",{"data-loc":"client/src/pages/HotGamesTodayPage.tsx:476",className:"relative h-full w-full",children:[!c&&e.jsx("div",{"data-loc":"client/src/pages/HotGamesTodayPage.tsx:478",className:"absolute inset-0 flex items-center justify-center bg-gradient-to-br from-purple-900/60 to-indigo-900/60",children:e.jsx(y,{"data-loc":"client/src/pages/HotGamesTodayPage.tsx:479",className:"h-5 w-5 text-orange-400/60","aria-hidden":"true"})}),!m&&e.jsx("img",{"data-loc":"client/src/pages/HotGamesTodayPage.tsx:483",src:A(t),alt:s,width:48,height:48,loading:x?"eager":"lazy",fetchPriority:l<=ee?"high":"auto",decoding:"async",onLoad:()=>d(!0),onError:()=>{g(!0),d(!1)},className:`h-full w-full object-cover transition-opacity duration-150 ${c?"opacity-100":"opacity-0"}`})]})}
1export{X as HOT_GAME_CANDIDATE_LIMIT_PER_PROVIDER,Z as HOT_GAME_EAGER_IMAGE_COUNT,ee as HOT_GAME_HIGH_PRIORITY_IMAGE_COUNT,te as HotGameCard,ae as HotGameImage,fe as default,E as getHotGameLinkKey};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.