1import{u as _,r as c,a as M,t as p,z as R,b as P,j as e,S as F,y,B as I,g as v}from"./index-C3Qps0S4.js";import{S as C,g as T,P as O}from"./slotProviders-EvAtjHsk.js";import{A as Q,a as z,b as U,c as G,d as H,e as q,f as V,g as A}from"./alert-dialog-BzKLv-3y.js";import{A as Z}from"./arrow-left-AxGNO8ZF.js";import{S as D}from"./search-DKbjFAwP.js";import{F as k}from"./flame-ClgW77Uq.js";import{Z as B}from"./zap-Dg3Ucl6s.js";import{C as K}from"./coins-Cn4zgY_g.js";import"./index-BKUanX19.js";import"./index-Dr02_Kwf.js";import"./button-xdpkFraK.js";import"./index-Jol-UBUv.js";const f=9;function ie(){const[,t]=_(),[l,d]=c.useState(0),[r,m]=c.useState(""),[o,a]=c.useState(!1),[g,S]=c.useState(!1),{isAuthenticated:h}=M(),x=p.credits.balance.useQuery(void 0,{enabled:h}),j=p.credits.deductHotGames.useMutation(),w=p.useUtils(),{data:$}=p.publicSettings.providerMaintenance.useQuery(),L=c.useCallback(()=>{if(!h){window.location.href=R();return}a(!0)},[h]),E=c.useCallback(async()=>{S(!0);try{await j.mutateAsync(),w.credits.balance.invalidate(),P.success("หัภPoint สำà¹à¸£à¹à¸",{description:"-5 Points"}),a(!1),t("/hot-games")}catch(s){P.error(s?.message||"à¹à¸¡à¹à¸ªà¸²à¸¡à¸²à¸£à¸à¸«à¸±à¸ Point à¹à¸à¹")}finally{S(!1)}},[j,w,t]),u=c.useMemo(()=>r.trim()?C.filter(s=>s.name.toLowerCase().includes(r.toLowerCase())):C,[r]),n=Math.ceil(u.length/f),N=u.slice(l*f,(l+1)*f),b=s=>{s>=0&&s<n&&d(s)};return e.jsxs("div",{"data-loc":"client/src/pages/SlotPage.tsx:86",className:"flex flex-col gap-4 pb-24 px-3 min-h-screen",children:[e.jsxs("div",{"data-loc":"client/src/pages/SlotPage.tsx:88",className:"flex items-center justify-between pt-3",children:[e.jsx("button",{"data-loc":"client/src/pages/SlotPage.tsx:89",onClick:()=>t("/game-selection"),className:"p-2 -ml-2 text-gray-400 hover:text-white transition-colors",children:e.jsx(Z,{"data-loc":"client/src/pages/SlotPage.tsx:90",className:"w-5 h-5"})}),e.jsxs("h1",{"data-loc":"client/src/pages/SlotPage.tsx:92",className:"text-lg font-bold text-white flex items-center gap-2",children:[e.jsx(F,{"data-loc":"client/src/pages/SlotPage.tsx:93",className:"w-5 h-5 text-purple-400"}),"สลà¹à¸à¸"]}),e.jsx("div",{"data-loc":"client/src/pages/SlotPage.tsx:96",className:"w-9"})]}),e.jsxs("div",{"data-loc":"client/src/pages/SlotPage.tsx:100",className:"relative",children:[e.jsx(D,{"data-loc":"client/src/pages/SlotPage.tsx:101",className:"absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-gray-500"}),e.jsx("input",{"data-loc":"client/src/pages/SlotPage.tsx:102",type:"text",value:r,onChange:s=>{m(s.target.value),d(0)}
1,placeholder:"à¸à¹à¸à¸«à¸²à¸à¹à¸²à¸¢à¹à¸à¸¡...",className:"w-full pl-9 pr-4 py-2.5 rounded-xl bg-white/[0.03] border border-white/10 text-white text-sm placeholder:text-gray-600 focus:outline-none focus:border-purple-500/50 transition-colors"})]}),e.jsxs("button",{"data-loc":"client/src/pages/SlotPage.tsx:112",onClick:L,className:"w-full flex items-center gap-3 p-3 rounded-xl bg-gradient-to-r from-orange-500/15 via-red-500/10 to-purple-500/15 border border-orange-500/30 hover:border-orange-500/50 transition-all active:scale-[0.98] relative overflow-hidden",children:[e.jsx("div",{"data-loc":"client/src/pages/SlotPage.tsx:116",className:"w-10 h-10 rounded-full bg-gradient-to-br from-orange-500/30 to-red-500/20 flex items-center justify-center",children:e.jsx(k,{"data-loc":"client/src/pages/SlotPage.tsx:117",className:"w-5 h-5 text-orange-400 animate-pulse"})}),e.jsxs("div",{"data-loc":"client/src/pages/SlotPage.tsx:119",className:"flex-1 text-left",children:[e.jsx("p",{"data-loc":"client/src/pages/SlotPage.tsx:120",className:"text-sm font-bold text-white",children:"à¹à¸à¸¡à¹à¸à¸°à¸à¸³à¸§à¸±à¸à¸à¸µà¹"}),e.jsx("p",{"data-loc":"client/src/pages/SlotPage.tsx:121",className:"text-[10px] text-gray-400",children:"รวมà¹à¸à¸¡à¸à¸µà¹à¸à¸³à¸¥à¸±à¸à¹à¸à¸à¸à¸²à¸à¸à¸¸à¸à¸à¹à¸²à¸¢"})]}),e.jsxs("div",{"data-loc":"client/src/pages/SlotPage.tsx:123",className:"flex items-center gap-1",children:[e.jsxs("span",{"data-loc":"client/src/pages/SlotPage.tsx:124",className:"flex items-center gap-0.5 px-2 py-0.5 rounded-full bg-yellow-500/20 border border-yellow-500/30",children:[e.jsx(B,{"data-loc":"client/src/pages/SlotPage.tsx:125",className:"w-3 h-3 text-yellow-400"}),e.jsx("span",{"data-loc":"client/src/pages/SlotPage.tsx:126",className:"text-[10px] font-bold text-yellow-300",children:"5"})]}),e.jsx(y,{"data-loc":"client/src/pages/SlotPage.tsx:128",className:"w-4 h-4 text-orange-400"})]})]}),e.jsx(Q,{"data-loc":"client/src/pages/SlotPage.tsx:133",open:o,onOpenChange:a,children:e.jsxs(z,{"data-loc":"client/src/pages/SlotPage.tsx:134",className:"bg-gray-900 border-gray-700 max-w-[340px]",children:[e.jsxs(U,{"data-loc":"client/src/pages/SlotPage.tsx:135",children:[e.jsxs(G,{"data-loc":"client/src/pages/SlotPage.tsx:136",className:"text-white flex items-center gap-2",children:[e.jsx(k,{"data-loc":"client/src/pages/SlotPage.tsx:137",className:"w-5 h-5 text-orange-400"}),"à¹à¸à¸¡à¹à¸à¸°à¸à¸³à¸§à¸±à¸à¸à¸µà¹"]}),e.jsx(H,{"data-loc":"client/src/pages/SlotPage.tsx:140",className:"text-gray-400",children:e.jsxs("div",{"data-loc":"client/src/pages/SlotPage.tsx:141",className:"flex flex-col gap-3 mt-2",children:[e.jsxs("div",{"data-loc":"client/src/pages/SlotPage.tsx:142",className:"flex items-center justify-between p-3 rounded-lg bg-white/[0.03] border border-white/10",children:[e.jsx("span",{"data-loc":"client/src/pages/SlotPage.tsx:143",className:"text-sm text-gray-300",children:"à¸à¹à¸²à¹à¸à¹à¸à¸£à¸´à¸à¸²à¸£"}),e.jsxs("span",{"data-loc":"client/src/pages/SlotPage.tsx:144",className:"flex items-center gap-1 text-yellow-400 font-bold",children:[e.jsx(K,{"data-loc":"client/src/pages/SlotPage.tsx:145",className:"w-4 h-4"})," 5 Points"]})]}),e.jsxs("div",{"data-loc":"client/src/pages/SlotPage.tsx:148",className:"flex items-center justify-between p-3 rounded-lg bg-white/[0.03] border border-white/10",children:[e.jsx("span",{"data-loc":"client/src/pages/SlotPage.tsx:149",className:"text-sm text-gray-300",children:"ยà¸à¸à¸à¸à¹à¸«à¸¥à¸·à¸"}),e.jsxs("span",{"data-loc":"client/src/pages/SlotPage.tsx:150",className:`font-bold ${parseFloat(x.data?.balance??"0")>=5?"text-green-400":"text-red-400"}`,children:[x.data?.balance??"0.00"," Point"]})]}),parseFloat(x.data?.balance??"0")<5&&e.jsx("div",{"data-loc":"client/src/pages/SlotPage.tsx:155",className:"p-2 rounded-lg bg-red-500/10 border border-red-500/30",children:e.jsx("p",{"data-loc":"client/src/pages/SlotPage.tsx:156",className:"text-xs text-red-400 text-center",children:"Point à¹à¸¡à¹à¹à¸à¸µà¸¢à¸à¸à¸ à¸à¸£à¸¸à¸à¸²à¹à¸à¸´à¸¡ Point à¸à¹à¸à¸"})})]})})]}),e.jsxs(q,{"data-loc":"client/src/pages/SlotPage.tsx:162",className:"gap-2",children:[e.jsx(V,{"data-loc":"client/src/pages/SlotPage.tsx:163",className:"bg-gray-800 border-gray-700 text-gray-300 hover:bg-gray-700",children:"ยà¸à¹à¸¥à¸´à¸"}),parseFloat(x.data?.balance??"0")<5?e.jsx(A,{"data-loc":"client/src/pages/SlotPage.tsx:167",onClick:()=>{a(!1),t("/wallet")},className:"bg-gradient-to-r from-green-500 to-emerald-500 text-white hover:from-green-600 hover:to-emerald-600",children:"à¹à¸à¸´à¸¡ Point"}):e.jsx(A,{"data-loc":"client/src/pages/SlotPage.tsx:174",onClick:E,disabled:g,className:"bg-gradient-to-r from-orange-500 to-red-500 text-white hover:from-orange-600 hover:to-red-600 disabled:opacity-50",children:g?"à¸à¸³à¸¥à¸±à¸à¸à¸³à¹à¸à¸´à¸à¸à¸²à¸£...":"ยืà¸à¸¢à¸±à¸ (-5 Points)"})]})]})}),e.jsxs("div",{"data-loc":"client/src/pages/SlotPage.tsx:187",className:"bg-white/[0.02] rounded-2xl border border-white/10 p-4 min-h-[420px]",children:[e.jsx("div",{"data-loc":"client/src/pages/SlotPage.tsx:188",className:"grid grid-cols-3 gap-3",children:N.map((s,i)=>e.jsx(W,{"data-loc":"client/src/pages/SlotPage.tsx:190",provider:s,maintenanceMap:$},`${s.name}-${i}`))}),N.length===0&&e.jsxs("div",{"data-loc":"client/src/pages/SlotPage.tsx:196",className:"flex flex-col items-center justify-center py-12",children:[e.jsx(D,{"data-loc":"client/src/pages/SlotPage.tsx:197",className:"w-10 h-10 text-gray-600 mb-3"}),e.jsx("p",{"data-loc":"client/src/pages/SlotPage.tsx:198",className:"text-gray-500 text-sm",children:"à¹à¸¡à¹à¸à¸à¸à¹à¸²à¸¢à¹à¸
1มà¸à¸µà¹à¸à¹à¸à¸«à¸²"})]})]}),n>1&&e.jsxs("div",{"data-loc":"client/src/pages/SlotPage.tsx:205",className:"flex items-center justify-center gap-3",children:[e.jsx("button",{"data-loc":"client/src/pages/SlotPage.tsx:206",onClick:()=>b(l-1),disabled:l===0,className:"p-2 rounded-lg bg-white/5 text-gray-400 hover:bg-white/10 hover:text-white disabled:opacity-30 disabled:cursor-not-allowed transition-all",children:e.jsx(I,{"data-loc":"client/src/pages/SlotPage.tsx:211",className:"w-4 h-4"})}),e.jsx("div",{"data-loc":"client/src/pages/SlotPage.tsx:214",className:"flex gap-1.5",children:Array.from({length:n},(s,i)=>e.jsx("button",{"data-loc":"client/src/pages/SlotPage.tsx:216",onClick:()=>b(i),className:`transition-all duration-300 rounded-full ${i===l?"w-8 h-2.5 bg-gradient-to-r from-purple-500 to-violet-500":"w-2.5 h-2.5 bg-white/20 hover:bg-white/40"}`},i))}),e.jsx("button",{"data-loc":"client/src/pages/SlotPage.tsx:228",onClick:()=>b(l+1),disabled:l===n-1,className:"p-2 rounded-lg bg-white/5 text-gray-400 hover:bg-white/10 hover:text-white disabled:opacity-30 disabled:cursor-not-allowed transition-all",children:e.jsx(y,{"data-loc":"client/src/pages/SlotPage.tsx:233",className:"w-4 h-4"})})]}),e.jsx("div",{"data-loc":"client/src/pages/SlotPage.tsx:239",className:"text-center",children:e.jsxs("p",{"data-loc":"client/src/pages/SlotPage.tsx:240",className:"text-[10px] text-gray-600",children:["à¸à¸±à¹à¸à¸«à¸¡à¸ ",u.length," à¸à¹à¸²à¸¢ ⢠หà¸à¹à¸² ",l+1,"/",n]})})]})}function W({provider:t,maintenanceMap:l}){const[,d]=_(),[r,m]=c.useState(!1),o=T(t.name),a=l?.[o]===!0,g=()=>{if(a){P.error(`à¸à¹à¸²à¸¢ ${t.name} à¸à¸´à¸à¸à¸£à¸±à¸à¸à¸£à¸¸à¸à¸à¸±à¹à¸§à¸à¸£à¸²à¸§`,{description:"ยัà¸à¹à¸¡à¹à¸ªà¸²à¸¡à¸²à¸£à¸à¹à¸à¹à¸²à¹à¸¥à¹à¸à¸«à¸£à¸·à¸à¹à¸à¸´à¸à¸ªà¸¹à¸à¸£à¹à¸à¹ à¸à¸£à¸¸à¸à¸²à¸¥à¸à¸à¹à¸«à¸¡à¹à¸ ายหลัà¸"});return}d(`/slot/${o}`)};return e.jsxs("button",{"data-loc":"client/src/pages/SlotPage.tsx:266",onClick:g,"aria-disabled":a,"aria-label":a?`${t.name} à¸à¸´à¸à¸à¸£à¸±à¸à¸à¸£à¸¸à¸à¸à¸±à¹à¸§à¸à¸£à¸²à¸§`:t.name,"data-provider-slug":o,"data-maintenance":a?"true":"false",className:`flex flex-col items-center gap-2 group w-full ${a?"cursor-not-allowed":""}`,children:[e.jsxs("div",{"data-loc":"client/src/pages/SlotPage.tsx:275",className:"relative w-full aspect-square",children:[t.badge&&!a&&e.jsx("span",{"data-loc":"client/src/pages/SlotPage.tsx:278",className:`absolute -top-1 -right-1 z-10 text-[9px] font-bold px-1.5 py-0.5 rounded-full ${t.badge==="ฮà¸à¸"?"bg-red-500 text-white":"bg-green-500 text-white"}`,children:t.badge}),e.jsxs("div",{"data-loc":"client/src/pages/SlotPage.tsx:286",className:`w-full h-full rounded-2xl overflow-hidden shadow-lg transition-all duration-200 border relative bg-gray-900 ${a?"border-orange-400/45 shadow-[0_8px_24px_rgba(245,160,0,0.08)]":"group-hover:scale-105 active:scale-95 border-white/10"}`,children:[!r&&e.jsx("div",{"data-loc":"client/src/pages/SlotPage.tsx:293",className:"absolute inset-0 bg-gradient-to-br from-gray-800 to-gray-900 animate-pulse flex items-center justify-center",children:e.jsx("span",{"data-loc":"client/src/pages/SlotPage.tsx:294",className:"text-white/30 font-bold text-sm",children:t.name.slice(0,3).toUpperCase()})}),e.jsx("img",{"data-loc":"client/src/pages/SlotPage.tsx:298",src:v(t.image),alt:t.name,loading:"lazy",onLoad:()=>m(!0),className:`w-full h-full object-cover transition-all duration-300 ${r?"opacity-100":"opacity-0"} ${a?"grayscale saturate-0 brightness-[0.38] scale-[1.02]":""}`}),e.jsx("div",{"data-loc":"client/src/pages/SlotPage.tsx:308",className:"absolute inset-x-0 bottom-0 h-1/3 bg-gradient-to-t from-black/60 to-transparent"}),a&&e.jsxs("div",{"data-loc":"client/src/pages/SlotPage.tsx:312",className:"absolute inset-0 z-20 flex flex-col items-center justify-center bg-[radial-gradient(circle_at_center,rgba(30,41,59,0.2),rgba(2,6,23,0.82)_72%)] px-2",children:[e.jsx("img",{"data-loc":"client/src/pages/SlotPage.tsx:313",src:v(O),alt:"","aria-hidden":"true",className:"w-[48%] max-w-16 aspect-square object-contain drop-shadow-[0_5px_12px_rgba(245,160,0,0.38)]"}),e.jsx("span",{"data-loc":"client/src/pages/SlotPage.tsx:319",className:"mt-0.5 rounded-full border border-orange-300/35 bg-black/45 px-2 py-0.5 text-[9px] font-bold leading-none text-orange-200 shadow-sm",children:"à¸à¸´à¸à¸à¸£à¸±à¸à¸à¸£à¸¸à¸"})]})]})]}),e.jsx("span",{"data-loc":"client/src/pages/SlotPage.tsx:328",className:`text-[11px] font-medium text-center leading-tight line-clamp-2 w-full transition-colors ${a?"text-gray-400":"text-gray-300 group-hover:text-white"}`,children:t.name})]})}
1export{W as ProviderCard,ie as default};
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.