1const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/SicBoDiceTrayScene-B6XmVFDZ.js","assets/index-C3Qps0S4.js","assets/index-Y6BcoKun.css","assets/sicbo-BX5zbWgn.js","assets/index-BKUanX19.js","assets/index-Dr02_Kwf.js","assets/useMobile-DLAeP0pO.js","assets/sliders-horizontal-8DHyQzuu.js","assets/button-xdpkFraK.js","assets/index-Jol-UBUv.js","assets/dialog-BY1FISUw.js","assets/loader-circle-DohmWZz_.js","assets/arrow-left-AxGNO8ZF.js","assets/plus-BLlLQSZn.js","assets/download-DqVnTrbq.js","assets/trash-2-DOBLe4Vk.js","assets/history-B2QWoLNH.js","assets/volume-2-B2de-iZy.js","assets/volume-x-x5MV5uu0.js","assets/coins-Cn4zgY_g.js","assets/calculator-BESwuf8w.js"])))=>i.map(i=>d[i]); 2import{f as _e,r as m,j as e,i as E,X as tt,S as pe,N as Ee,a as at,u as st,t as v,b as A,e as ct,C as oe,d as Ie,T as Re,I as we,J as it,ax as lt}from"./index-C3Qps0S4.js";import{b as Me,D as Z,c as ne,S as Be,d as rt,e as Pe}from"./sicbo-BX5zbWgn.js";import{R as ot,b as nt,C as dt,a as xt,T as gt,D as pt,P as mt,O as ut}from"./index-BKUanX19.js";import{u as bt}from"./useMobile-DLAeP0pO.js";import{S as ht}from"./sliders-horizontal-8DHyQzuu.js";import{B as J}from"./button-xdpkFraK.js";import{D as yt,a as ft,b as St,c as wt,d as Bt,e as Pt}from"./dialog-BY1FISUw.js";import{L as M}from"./loader-circle-DohmWZz_.js";import{A as jt}from"./arrow-left-AxGNO8ZF.js";import{P as vt}from"./plus-BLlLQSZn.js";import{D as zt}from"./download-DqVnTrbq.js";import{T as At}from"./trash-2-DOBLe4Vk.js";import{H as $e}from"./history-B2QWoLNH.js";import{V as Nt}from"./volume-2-B2de-iZy.js";import{V as kt}from"./volume-x-x5MV5uu0.js";import{C as Ct}from"./coins-Cn4zgY_g.js";import{C as Dt}from"./calculator-BESwuf8w.js";/** 3 * @license lucide-react v0.453.0 - ISC 4 * 5 * This source code is licensed under the ISC license. 6 * See the LICENSE file in the root directory of this source tree. 7 */const _t=_e("FileUp",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M12 12v6",key:"3ahymv"}],["path",{d:"m15 15-3-3-3 3",key:"15xj92"}]]);/** 8 * @license lucide-react v0.453.0 - ISC 9 * 10 * This source code is licensed under the ISC license. 11 * See the LICENSE file in the root directory of this source tree. 12 */const Et=_e("Palette",[["circle",{cx:"13.5",cy:"6.5",r:".5",fill:"currentColor",key:"1okk4w"}],["circle",{cx:"17.5",cy:"10.5",r:".5",fill:"currentColor",key:"f64h9f"}],["circle",{cx:"8.5",cy:"7.5",r:".5",fill:"currentColor",key:"fotxhn"}],["circle",{cx:"6.5",cy:"12.5",r:".5",fill:"currentColor",key:"qy21gx"}],["path",{d:"M12 2C6.5 2 2 6.5 2 12s4.5 10 10 10c.926 0 1.648-.746 1.648-1.688 0-.437-.18-.835-.437-1.125-.29-.289-.438-.652-.438-1.125a1.64 1.64 0 0 1 1.668-1.668h1.996c3.051 0 5.555-2.503 5.555-5.554C21.965 6.012 17.461 2 12 2z",key:"12rzf8"}]]),It=10;function Rt(t,a){return t.isTrusted&&t.isPrimary&&(t.pointerType==="touch"||t.pointerType==="pen")&&a.visibilityState==="visible"&&!a.reducedMotion&&typeof a.vibrate=="function"}function Mt(){if(typeof window>"u"||typeof document>"u"||typeof navigator>"u")return null;const t=typeof navigator.vibrate=="function"?navigator.vibrate.bind(navigator):void 0,a=typeof window.matchMedia=="function"?window.matchMedia("(prefers-reduced-motion: reduce)").matches:!1;return{vibrate:t,visibilityState:document.visibilityState,reducedMotion:a}}function $t(t,a=Mt()){if(!a||!Rt(t,a))return!1;try{return a.vibrate?.(It)??!1}catch{return!1}}function Lt(t,a=""){const c=t.toLowerCase(),l=a.match(/^(?:Digit|Numpad)([1-6])$/)?.[1]??(/^[1-6]$/.test(c)?c:null);return l?{type:"value",value:Number(l)}:c==="q"||a==="KeyQ"?{type:"select",index:0}:c==="w"||a==="KeyW"?{type:"select",index:1}:c==="e"||a==="KeyE"?{type:"select",index:2}:t==="ArrowLeft"||a==="ArrowLeft"?{type:"move",delta:-1}:t==="ArrowRight"||a==="ArrowRight"?{type:"move",delta:1}:t==="Enter"||a==="Enter"||a==="NumpadEnter"?{type:"save"}:null}function Tt(t){return t instanceof HTMLElement?!!t.closest('input, textarea, select, [contenteditable="true"], [contenteditable=""], [role="textbox"]'):!1}function Ot(t){const a=m.useRef(t),c=m.useRef(t.activeIndex);a.current=t,c.current=t.activeIndex,m.useEffect(()=>{const r=s=>{const i=Math.max(0,Math.min(s,2));c.current=i,a.current.onActiveIndexChange(i)},l=s=>{if(!a.current.enabled||s.isComposing||s.repeat||s.ctrlKey||s.metaKey||s.altKey||s.shiftKey||document.visibilityState!=="visible"||document.querySelector('[role="dialog"][data-state="open"]')||Tt(s.target))return;const i=Lt(s.key,s.code);
12if(i&&!(i.type==="save"&&s.target instanceof HTMLElement&&s.target.closest('button, a, [role="button"], [role="link"]')))if(s.preventDefault(),i.type==="value"){const d=c.current;a.current.onValueChange(d,i.value),r(Math.min(d+1,2))}else i.type==="select"?r(i.index):i.type==="move"?r(c.current+i.delta):a.current.canSave!==!1&&a.current.onSave()};return window.addEventListener("keydown",l),()=>window.removeEventListener("keydown",l)},[])}const Ft=1760,Le=90,Vt=Ft+Le*2,qa={width:8.6,depth:3.5,floorY:-1.08,wallHeight:.72,dieSize:1.48};function Q(t){const a=Math.sin(t*12.9898+78.233)*43758.5453;return a-Math.floor(a)}function Qa(t,a){const c=Math.max(1,t)*19+a*101,r=Q(c+1)-.5,l=Q(c+2)-.5,s=Q(c+3);return{position:[[-2.45,0,2.45][a]+r*.3,1.45+a*.18,l*.35],linearVelocity:[r*1.7+(a-1)*-1.12,-.3-a*.08,l*2.1],angularVelocity:[8.2+s*3.2,(a%2===0?1:-1)*(9.1+s*2.8),6.8+Q(c+4)*3.4]}}function Ka(t){return[[-2.45,-.23,0],[0,-.23,.04],[2.45,-.23,-.02]][t]}const je=Le,Ut=Vt;function Ht(){return typeof window<"u"&&typeof window.matchMedia=="function"&&window.matchMedia("(prefers-reduced-motion: reduce)").matches}function ve(t){return{totalMs:t?0:Ut,delays:t?[0,0,0]:[0,je,je*2]}}function Gt(){let t=!1;return{tryLock(){return t?!1:(t=!0,!0)},release(){t=!1},isLocked(){return t}}}function Yt(){const[t,a]=m.useState(!1),[c,r]=m.useState(!1),[l,s]=m.useState(0),i=m.useRef(null),d=m.useRef(!0),b=m.useRef(Gt()),f=m.useCallback(()=>{i.current&&(clearTimeout(i.current),i.current=null)},[]),n=m.useCallback(()=>{f(),d.current&&(b.current.release(),r(!1),a(!1))},[f]),P=m.useCallback(g=>{if(!b.current.tryLock())return!1;const x=ve(Ht());return a(!0),s(h=>h+1),x.totalMs===0?(g(),!0):(r(!0),i.current=setTimeout(()=>{i.current=null,d.current&&(r(!1),g())},x.totalMs),!0)},[]);return m.useEffect(()=>(d.current=!0,()=>{d.current=!1,f(),b.current.release()}),[f]),{isLocked:t,isRolling:c,sequence:l,delays:ve(!1).delays,start:P,release:n}}const qt={1:[4],2:[0,8],3:[0,4,8],4:[0,2,6,8],5:[0,2,4,6,8],6:[0,2,3,5,6,8]},Qt=[{value:1,position:"front"},{value:6,position:"back"},{value:3,position:"right"},{value:4,position:"left"},{value:2,position:"top"},{value:5,position:"bottom"}];function Kt({value:t}){return e.jsx("span",{"data-loc":"client/src/components/SicBoDie3D.tsx:26",className:"sicbo-die-cube__pips",children:qt[t].map(a=>e.jsx("span",{"data-loc":"client/src/components/SicBoDie3D.tsx:28",className:"sicbo-die-cube__pip",style:{gridColumn:a%3+1,gridRow:Math.floor(a/3)+1}},a))})}function Wt({value:t,dieIndex:a,active:c=!1,rolling:r=!1,rollDelayMs:l=0,className:s}){const i={"--sicbo-roll-delay":`${l}ms`};return e.jsxs("span",{"data-loc":"client/src/components/SicBoDie3D.tsx:59",className:E("sicbo-die-scene",s),"data-die":a+1,"data-active":c?"true":"false","data-rolling":r?"true":"false",style:i,"aria-hidden":"true",children:[e.jsx("span",{"data-loc":"client/src/components/SicBoDie3D.tsx:67",className:"sicbo-die-cube__contact"}),e.jsx("span",{"data-loc":"client/src/components/SicBoDie3D.tsx:68",className:"sicbo-die-cube__camera",children:e.jsx("span",{"data-loc":"client/src/components/SicBoDie3D.tsx:69",className:E("sicbo-die-cube",`sicbo-die-cube--value-${t}`),"data-die":a+1,"data-active":c?"true":"false","data-rolling":r?"true":"false","data-value":t,children:Qt.map(d=>e.jsxs("span",{"data-loc":"client/src/components/SicBoDie3D.tsx:77",className:E("sicbo-die-cube__face",`sicbo-die-cube__face--${d.position}`),"data-face":d.value,"data-opposite":7-d.value,children:[e.jsx("span",{"data-loc":"client/src/components/SicBoDie3D.tsx:83",className:"sicbo-die-cube__micro-texture"}),e.jsx(Kt,{"data-loc":"client/src/components/SicBoDie3D.tsx:84",value:d.value})]},d.position))})})]})}function Xt({...t}){return e.jsx(ot,{"data-loc":"client/src/components/ui/sheet.tsx:10","data-slot":"sheet",...t})}function Zt({...t}){return e.jsx(nt,{"data-loc":"client/src/components/ui/sheet.tsx:16","data-slot":"sheet-trigger",...t})}function Jt({...t}){return e.jsx(mt,{"data-loc":"client/src/components/ui/sheet.tsx:28","data-slot":"sheet-portal",...t})}function ea({className:t,...a}){return e.jsx(ut,{"data-loc":"client/src/components/ui/sheet.tsx:36","data-slot":"sheet-overlay",className:E("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",t),...a})}function ta({className:t,children:a,side:c="right",...r}){return e.jsxs(Jt,{"data-loc":"client/src/components/ui/sheet.tsx:56",children:[e.jsx(ea,{"data-loc":"client/src/components/ui/sheet.tsx:57"}),e.jsxs(dt,{"data-loc":"client/src/components/ui/sheet.tsx:58","data-slot":"sheet-content",className:E("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out fixed z-50 flex flex-col gap-4 shadow-lg transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-500",c==="right"&&"data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right inset-y-0 right-0 h-full w-3/4 border-l sm:max-w-sm",c==="left"&&"data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left inset-y-0 left-0 h-full w-3/4 border-r sm:max-w-sm",c==="top"&&"data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top inset-x-0 top-0 h-auto border-b",c==="bottom"&&"data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom inset-x-0 bottom-0 h-auto border-t",t),...r,children:[a,e.jsxs(xt,{"data-loc":"client/src/components/ui/sheet.tsx:75",className:"ring-offset-background focus:ring-ring data-[state=open]:bg-secondary absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none",children:[e.jsx(tt,{"data-loc":"client/src/components/ui/sheet.tsx:76",className:"size-4"}),e.jsx("span",{"data-loc":"client/src/components/ui/sheet.tsx:77",className:"sr-only",children:"Close"})]})]})]})}function aa({className:t,...a}){return e.jsx("div",{"data-loc":"client/src/components/ui/sheet.tsx:86","data-slot":"sheet-header",className:E("flex flex-col gap-1.5 p-4",t),...a})}function sa({className:t,...a}){return e.jsx(gt,{"data-loc":"client/src/components/ui/sheet.tsx:109","data-slot":"sheet-title",className:E("text-foreground font-semibold",t),...a})}function ca({className:t,...a}){return e.jsx(pt,{"data-loc":"client/src/components/ui/sheet.tsx:122","data-slot":"sheet-
12description",className:E("text-muted-foreground text-sm",t),...a})}const Te="mawin:sicbo:dice-settings:v1",me=[{id:"white-pearl",label:"White Pearl",hex:"#f4f2ea"},{id:"ivory",label:"Ivory",hex:"#ead8aa"},{id:"black-onyx",label:"Black Onyx",hex:"#252b35"},{id:"ice-blue",label:"Ice Blue",hex:"#38c7e8"},{id:"emerald-green",label:"Emerald Green",hex:"#14966c"},{id:"ruby-red",label:"Ruby Red",hex:"#c9364f"},{id:"amethyst-purple",label:"Amethyst Purple",hex:"#8f55d9"},{id:"amber-gold",label:"Amber Gold",hex:"#d99a24"},{id:"rose-pink",label:"Rose Pink",hex:"#e16f9d"},{id:"midnight-blue",label:"Midnight Blue",hex:"#203c78"}],ue=[{id:"classic-ivory",label:"Classic Ivory",roughness:.32,metalness:.03,transmission:.04,opacity:1,clearcoat:.72,clearcoatRoughness:.2,iridescence:0},{id:"casino-white",label:"Casino White",roughness:.22,metalness:.02,transmission:.02,opacity:1,clearcoat:.9,clearcoatRoughness:.12,iridescence:0},{id:"black-luxury",label:"Black Luxury",roughness:.18,metalness:.22,transmission:.02,opacity:1,clearcoat:1,clearcoatRoughness:.08,iridescence:.08},{id:"transparent-crystal",label:"Transparent Crystal",roughness:.06,metalness:0,transmission:.9,opacity:.74,clearcoat:1,clearcoatRoughness:.03,iridescence:.06},{id:"frosted-glass",label:"Frosted Glass",roughness:.46,metalness:0,transmission:.62,opacity:.88,clearcoat:.55,clearcoatRoughness:.32,iridescence:0},{id:"premium-resin",label:"Premium Resin",roughness:.16,metalness:.04,transmission:.22,opacity:.96,clearcoat:1,clearcoatRoughness:.1,iridescence:.1},{id:"pearl",label:"Pearl",roughness:.28,metalness:.12,transmission:.06,opacity:1,clearcoat:.82,clearcoatRoughness:.16,iridescence:.65},{id:"metallic-gold",label:"Metallic Gold",roughness:.2,metalness:.82,transmission:0,opacity:1,clearcoat:.62,clearcoatRoughness:.14,iridescence:0},{id:"obsidian",label:"Obsidian",roughness:.12,metalness:.34,transmission:.08,opacity:1,clearcoat:1,clearcoatRoughness:.05,iridescence:.22}],be=[{id:"classic",label:"Classic",radius:.11},{id:"rounded",label:"Rounded",radius:.18},{id:"ultra-rounded",label:"Ultra Rounded",radius:.25}],he=[{id:"classic-black",label:"Classic Black",color:"#07090c",emissive:"#000000",emissiveIntensity:0},{id:"classic-white",label:"Classic White",color:"#f4f7fb",emissive:"#dceeff",emissiveIntensity:.05},{id:"gold",label:"Gold",color:"#e6b84e",emissive:"#9a5b08",emissiveIntensity:.06},{id:"silver",label:"Silver",color:"#c7d0dc",emissive:"#8ca0b8",emissiveIntensity:.04},{id:"glow",label:"Glow",color:"#e9fbff",emissive:"#55dfff",emissiveIntensity:.85}],Oe=[{id:"black-velvet",label:"Black Velvet",floor:"#11171b",wall:"#080b0e",stitch:"#80694b",roughness:.94},{id:"green-felt",label:"Green Casino Felt",floor:"#123f32",wall:"#071d18",stitch:"#aa8b52",roughness:.92},{id:"red-velvet",label:"Red Velvet",floor:"#531c29",wall:"#210b10",stitch:"#bc8858",roughness:.91},{id:"navy-velvet",label:"Navy Velvet",floor:"#152b4b",wall:"#081224",stitch:"#99815a",roughness:.92},{id:"dark-leather",label:"Dark Leather",floor:"#201711",wall:"#0b0908",stitch:"#a57845",roughness:.7}],ee=[{color:"ice-blue",material:"premium-resin",shape:"rounded",pip:"classic-black"},{color:"amethyst-purple",material:"premium-resin",shape:"rounded",pip:"classic-black"},{color:"amber-gold",material:"premium-resin",shape:"rounded",pip:"classic-black"}],V={version:1,applyMode:"all",selectedDie:0,dice:ee,tray:"black-velvet",soundEnabled:!0},de=[{id:"casino-classic",label:"Casino Classic",note:"à¸à¸²à¸§à¸à¸¥à¸²à¸ªà¸ªà¸´à¸ ⢠à¸à¹à¸²à¸ªà¸±à¸à¸«à¸¥à¸²à¸à¹à¸à¸µà¸¢à¸§",dice:[{color:"white-pearl",material:"casino-white",shape:"rounded",pip:"classic-black"},{color:"white-pearl",material:"casino-white",shape:"rounded",pip:"classic-black"},{color:"white-pearl",material:"casino-white",shape:"rounded",pip:"classic-black"}],tray:"green-felt"},{id:"ice-crystal",label:"Ice Crystal",note:"à¸à¸£à¸´à¸ªà¸à¸±à¸¥à¸à¹à¸² ⢠à¸à¸²à¸à¸à¹à¸³à¹à¸à¸´à¸",dice:[{color:"ice-blue",material:"transparent-crystal",shape:"ultra-rounded",pip:"silver"},{color:"ice-blue",material:"transparent-crystal",shape:"ultra-rounded",pip:"silver"},{color:"ice-blue",material:"transparent-crystal",shape:"ultra-rounded",pip:"silver"}],tray:"navy-velvet"},{id:"black-gold",label:"Black & Gold",note:"à¸à¸à¸à¸à¸´à¹à¸à¸µà¸¢à¸ ⢠à¸à¸¸à¸à¸à¸à¸",dice:[{color:"black-onyx",material:"obsidian",shape:"rounded",pip:"gold"},{color:"black-onyx",material:"obsidian",shape:"rounded",pip:"gold"},{color:"black-onyx",material:"obsidian",shape:"rounded",pip:"gold"}
12],tray:"dark-leather"},{id:"neon-glow",label:"Neon Glow",note:"สามสี ⢠à¸à¸¸à¸à¹à¸£à¸·à¸à¸à¹à¸ªà¸",dice:[{color:"ice-blue",material:"premium-resin",shape:"ultra-rounded",pip:"glow"},{color:"amethyst-purple",material:"premium-resin",shape:"ultra-rounded",pip:"glow"},{color:"ruby-red",material:"premium-resin",shape:"ultra-rounded",pip:"glow"}],tray:"black-velvet"}],F=(t,a,c)=>typeof t=="string"&&a.some(r=>r.id===t)?t:c;function ie(t,a){const c=t&&typeof t=="object"?t:{};return{color:F(c.color,me,a.color),material:F(c.material,ue,a.material),shape:F(c.shape,be,a.shape),pip:F(c.pip,he,a.pip)}}function U(t){const a=t&&typeof t=="object"?t:{},c=Array.isArray(a.dice)?a.dice:[],r=a.selectedDie===1||a.selectedDie===2?a.selectedDie:0;return{version:1,applyMode:a.applyMode==="individual"?"individual":"all",selectedDie:r,dice:[ie(c[0],ee[0]),ie(c[1],ee[1]),ie(c[2],ee[2])],tray:F(a.tray,Oe,V.tray),soundEnabled:a.soundEnabled!==!1}}function ia(){if(typeof window>"u")return V;try{const t=window.localStorage.getItem(Te);return t?U(JSON.parse(t)):V}catch{return V}}function la(t){if(!(typeof window>"u"))try{window.localStorage.setItem(Te,JSON.stringify(U(t)))}catch{}}function ra(t,a){const c=t.applyMode==="all"?[0,1,2]:[t.selectedDie],r=t.dice.map((l,s)=>c.includes(s)?{...l,...a}:l);return U({...t,dice:r})}function oa(t,a){const c=de.find(r=>r.id===a)??de[0];return U({...t,dice:c.dice.map(r=>({...r})),tray:c.tray})}function na(){return U(V)}const da={1:[4],2:[0,8],3:[0,4,8],4:[0,2,6,8],5:[0,2,4,6,8],6:[0,2,3,5,6,8]},xa=[{value:1,face:"front"},{value:6,face:"back"},{value:3,face:"right"},{value:4,face:"left"},{value:2,face:"top"},{value:5,face:"bottom"}];function K(t,a){return t.find(c=>c.id===a)??t[0]}function ga({appearance:t}){const a=K(me,t.color),c=K(ue,t.material),r=K(he,t.pip),l=K(be,t.shape),[s,i]=m.useState({x:-22,y:30}),d=m.useRef(null),b=g=>{d.current={pointerId:g.pointerId,x:g.clientX,y:g.clientY,rotationX:s.x,rotationY:s.y};try{g.currentTarget.setPointerCapture(g.pointerId)}catch{}},f=g=>{const x=d.current;!x||x.pointerId!==g.pointerId||i({x:Math.max(-80,Math.min(80,x.rotationX-(g.clientY-x.y)*.55)),y:x.rotationY+(g.clientX-x.x)*.65})},n=g=>{d.current?.pointerId===g.pointerId&&(d.current=null),g.currentTarget.hasPointerCapture(g.pointerId)&&g.currentTarget.releasePointerCapture(g.pointerId)},P={"--preview-rotate-x":`${s.x}deg`,"--preview-rotate-y":`${s.y}deg`,"--preview-color":a.hex,"--preview-pip":r.color,"--preview-pip-glow":r.emissiveIntensity>.5?r.emissive:"transparent","--preview-radius":`${Math.round(l.radius*68)}px`,"--preview-solid":`${Math.round(c.opacity*100)}%`,"--preview-gloss":String(Math.max(.12,1-c.roughness)),"--preview-border":`color-mix(in srgb, white ${Math.round(15+c.metalness*20)}%, ${a.hex})`,"--preview-highlight-alpha":String(.09+Math.max(.12,1-c.roughness)*.22),"--preview-dark-alpha":String(.08+c.metalness*.18),"--preview-inner-alpha":String(.03+Math.max(.12,1-c.roughness)*.1),"--preview-shine-alpha":String(.1+Math.max(.12,1-c.roughness)*.35),"--preview-blur":`${Math.round(c.transmission*5)}px`};return e.jsxs("div",{"data-loc":"client/src/components/SicBoDicePreview3D.tsx:74",className:"sicbo-dice-custom-preview",style:P,tabIndex:0,role:"img","aria-label":`à¸à¸±à¸§à¸à¸¢à¹à¸²à¸à¸¥à¸¹à¸à¹à¸à¹à¸² 3D ${a.label}, ${c.label}, ${l.label}, à¸à¸¸à¸ ${r.label}; ลาà¸à¸«à¸£à¸·à¸à¹à¸à¹à¸à¸¸à¹à¸¡à¸¥à¸¹à¸à¸¨à¸£à¹à¸à¸·à¹à¸à¸«à¸¡à¸¸à¸`,onPointerDown:b,onPointerMove:f,onPointerUp:n,onPointerCancel:n,onKeyDown:g=>{const x=g.shiftKey?20:8;(g.key==="ArrowLeft"||g.key==="ArrowRight"||g.key==="ArrowUp"||g.key==="ArrowDown"||g.key==="Home")&&g.preventDefault(),g.key==="ArrowLeft"&&i(h=>({...h,y:h.y-x})),g.key==="ArrowRight"&&i(h=>({...h,y:h.y+x})),g.key==="ArrowUp"&&i(h=>({...h,x:Math.max(-80,h.x-x)})),g.key==="ArrowDown"&&i(h=>({...h,x:Math.min(80,h.x+x)})),g.key==="Home"&&i({x:-22,y:30})},children:[e.jsx("div",{"data-loc":"client/src/components/SicBoDicePreview3D.tsx:94",className:"sicbo-dice-custom-preview__halo","aria-hidden":"true"}),e.jsx("div",{"data-loc":"client/src/components/SicBoDicePreview3D.tsx:95",className:"sicbo-dice-custom-preview__cube","aria-hidden":"true",children:xa.map(({value:g,face:x})=>e.jsxs("div",{"data-loc":"client/src/components/SicBoDicePreview3D.tsx:97",className:`sicbo-dice-custom-preview__face sicbo-dice-custom-preview__face--${x}`,children:[e.jsx("span",{"data-loc":"client/src/components/SicBoDicePreview3D.tsx:98",className:"sicbo-dice-custom-preview__shine"}),e.jsx("span",{"data-loc":"client/src/components/SicBoDicePreview3D.tsx:99",className:"sicbo-dice-custom-preview__pips",children:da[g].map(h=>e.jsx("span",{"data-loc":"client/src/components/SicBoDicePreview3D.tsx:100",className:"sicbo-dice-custom-preview__pip",style:{gridColumn:h%3+1,gridRow:Math.floor(h/3)+1}},h))})]},x))}),e.jsx("span",{"data-loc":"client/src/components/SicBoDicePreview3D.tsx:105",className:"sicbo-dice-custom-preview__hint","aria-hidden":"true",children:"ลาà¸à¹à¸à¸·à¹à¸à¸«à¸¡à¸¸à¸ ⢠ลูà¸à¸¨à¸£à¸ªà¸³à¸«à¸£à¸±à¸à¸à¸µà¸¢à¹à¸à¸à¸£à¹à¸"})]})}const R=t=>`min-h-10 rounded-xl border px-2 py-2 text-[10px] font-bold transition-[transform,border-color,background-color] duration-150 active:scale-[0.98] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-amber-300/70 motion-reduce:transition-none ${t?"border-amber-300/45 bg-amber-300/[0.1] text-amber-100":"border-white/8 bg-white/[0.035] text-white/55 hover:border-white/18 hover:bg-white/[0.06]"}`;function pa({preferences:t,setPreferences:a}){const c=bt(),r=t.dice[t.selectedDie],l=s=>{a(i=>ra(i,s))};return e.jsxs(Xt,{"data-loc":"client/src/components/SicBoDiceCustomizer.tsx:41",children:[e.jsx(Zt,{"data-loc":"client/src/components/SicBoDiceCustomizer.tsx:42",asChild:!0,children:e.jsxs("button",{"data-loc":"client/src/components/SicBoDiceCustomizer.tsx:43",type:"button",className:"absolute right-12 top-2.5 z-30 flex h-8 items-center gap-1.5 rounded-full border border-white/10 bg-black/45 px-2.5 text-[9px] font-bold text-white/60 backdrop-blur-sm transition-[transform,color,background-color] duration-150 hover:bg-black/65 hover:text-white active:scale-[0.98] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-amber-300/70 motion-reduce:transition-none","aria-label":"à¹à¸à¸´à¸à¹à¸¡à¸à¸¹à¸à¸£à¸±à¸à¹à¸à¹à¸à¸¥à¸¹à¸à¹à¸à¹à¸²à¹à¸¥à¸°à¸à¸²à¸",children:[e.jsx(ht,{"data-loc":"client/src/components/SicBoDiceCustomizer.tsx:48",className:"h-3.5 w-3.5","aria-hidden":"true"}),"à¸à¸£à¸±à¸à¹à¸à¹à¸"]})}),e.jsxs(ta,{"data-loc":"client/src/components/SicBoDiceCustomizer.tsx:52",side:c?"bottom":"right",className:"max-h-[88dvh] gap-0 overflow-hidden rounded-t-[26px] border-white/10 bg-[#0d131d] p-0 text-white sm:max-w-[420px] md:max-h-none md:rounded-none md:rounded-l-[26px]",children:[e.jsxs(aa,{"data-loc":"client/src/components/SicBoDiceCustomizer.tsx:56",className:"border-b border-white/8 bg-[radial-gradient(circle_at_top_left,rgba(251,191,36,.1),transparent_48%)] px-4 pb-3 pt-4 text-left",children:[e.jsxs(sa,{"data-loc":"client/src/components/SicBoDiceCustomizer.tsx:57",className:"flex items-center gap-2 text-base font-black text-white",children:[e.jsx(Et,{"data-loc":"client/src/components/SicBoDiceCustomizer.tsx:57",className:"h-4 w-4 text-amber-300"}),"Dice Studio"]}),e.jsx(ca,{"data-loc":"client/src/components/SicBoDiceCustomizer.tsx:58",className:"text-[10px] leading-relaxed text-white/40",children:"à¹à¸à¸¥à¸µà¹à¸¢à¸à¸£à¸¹à¸à¸¥à¸±à¸à¸©à¸à¹à¹à¸à¸à¹à¸£à¸µà¸¢à¸¥à¹à¸à¸¡à¹à¹à¸à¹à¸²à¸à¸±à¹à¸ à¹à¸¡à¹à¹à¸à¸¥à¸µà¹à¸¢à¸à¸à¹à¸²à¸¥à¸¹à¸à¹à¸à¹à¸²à¸«à¸£à¸·à¸à¸à¸²à¸£à¸à¸±à¸à¸à¸¶à¸à¸à¸¥"})]}),e.jsxs("div",{"data-loc":"client/src/components/SicBoDiceCustomizer.tsx:61",className:"min-h-0 flex-1 space-y-5 overflow-y-auto px-4 py-4 overscroll-contain",children:[e.jsx(ga,{"data-loc":"client/src/components/SicBoDiceCustomizer.tsx:62",appearance:r}),e.jsxs("section",{"data-loc":"client/src/components/SicBoDiceCustomizer.tsx:64","aria-labelledby":"sicbo-presets-title",children:[e.jsxs("div",{"data-loc":"client/src/components/SicBoDiceCustomizer.tsx:65",className:"mb-2 flex items-center gap-1.5",children:[e.jsx(pe,{"data-loc":"client/src/components/SicBoDiceCustomizer.tsx:65",className:"h-3.5 w-3.5 text-amber-300"}),e.jsx("h3",{"data-loc":"client/src/components/SicBoDiceCustomizer.tsx:65",
12id:"sicbo-presets-title",className:"text-[11px] font-black text-white/80",children:"Preset"})]}),e.jsx("div",{"data-loc":"client/src/components/SicBoDiceCustomizer.tsx:66",className:"grid grid-cols-2 gap-2",children:de.map(s=>e.jsxs("button",{"data-loc":"client/src/components/SicBoDiceCustomizer.tsx:68",type:"button",onClick:()=>a(i=>oa(i,s.id)),className:"rounded-xl border border-white/8 bg-white/[0.035] px-3 py-2.5 text-left transition-[transform,border-color,background-color] duration-150 hover:border-amber-300/25 hover:bg-amber-300/[0.055] active:scale-[0.98] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-amber-300/70 motion-reduce:transition-none",children:[e.jsx("span",{"data-loc":"client/src/components/SicBoDiceCustomizer.tsx:69",className:"block text-[10px] font-black text-white/75",children:s.label}),e.jsx("span",{"data-loc":"client/src/components/SicBoDiceCustomizer.tsx:69",className:"mt-0.5 block text-[8px] text-white/35",children:s.note})]},s.id))})]}),e.jsxs("section",{"data-loc":"client/src/components/SicBoDiceCustomizer.tsx:75","aria-labelledby":"sicbo-apply-title",children:[e.jsx("h3",{"data-loc":"client/src/components/SicBoDiceCustomizer.tsx:76",id:"sicbo-apply-title",className:"mb-2 text-[11px] font-black text-white/80",children:"à¸à¸³à¹à¸à¹à¸à¹à¸à¸±à¸"}),e.jsxs("div",{"data-loc":"client/src/components/SicBoDiceCustomizer.tsx:77",className:"grid grid-cols-2 gap-2",children:[e.jsx("button",{"data-loc":"client/src/components/SicBoDiceCustomizer.tsx:78",type:"button","aria-pressed":t.applyMode==="all",onClick:()=>a(s=>({...s,applyMode:"all"})),className:R(t.applyMode==="all"),children:"à¸à¸¸à¸à¸¥à¸¹à¸"}),e.jsx("button",{"data-loc":"client/src/components/SicBoDiceCustomizer.tsx:79",type:"button","aria-pressed":t.applyMode==="individual",onClick:()=>a(s=>({...s,applyMode:"individual"})),className:R(t.applyMode==="individual"),children:"à¹à¸¥à¸·à¸à¸à¸à¸µà¸¥à¸°à¸¥à¸¹à¸"})]}),t.applyMode==="individual"&&e.jsx("div",{"data-loc":"client/src/components/SicBoDiceCustomizer.tsx:81",className:"mt-2 grid grid-cols-3 gap-2","aria-label":"à¹à¸¥à¸·à¸à¸à¸¥à¸¹à¸à¹à¸à¹à¸²à¸à¸µà¹à¸à¹à¸à¸à¸à¸²à¸£à¸à¸£à¸±à¸",children:[0,1,2].map(s=>e.jsxs("button",{"data-loc":"client/src/components/SicBoDiceCustomizer.tsx:82",type:"button","aria-pressed":t.selectedDie===s,onClick:()=>a(i=>({...i,selectedDie:s})),className:R(t.selectedDie===s),children:["ลูภ",s+1]},s))})]}),e.jsxs("section",{"data-loc":"client/src/components/SicBoDiceCustomizer.tsx:86","aria-labelledby":"sicbo-color-title",children:[e.jsx("h3",{"data-loc":"client/src/components/SicBoDiceCustomizer.tsx:87",id:"sicbo-color-title",className:"mb-2 text-[11px] font-black text-white/80",children:"สี"}),e.jsx("div",{"data-loc":"client/src/components/SicBoDiceCustomizer.tsx:88",className:"grid grid-cols-5 gap-2",children:me.map(s=>e.jsx("button",{"data-loc":"client/src/components/SicBoDiceCustomizer.tsx:89",type:"button","aria-label":`สี ${s.label}`,"aria-pressed":r.color===s.id,title:s.label,onClick:()=>l({color:s.id}),className:`grid h-10 place-items-center rounded-xl border transition-[transform,border-color] duration-150 active:scale-95 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-amber-300/70 motion-reduce:transition-none ${r.color===s.id?"border-amber-300/70":"border-white/10"}`,children:e.jsx("span",{"data-loc":"client/src/components/SicBoDiceCustomizer.tsx:89",className:"h-5 w-5 rounded-full border border-white/15 shadow-[inset_0_1px_2px_rgba(255,255,255,.25)]",style:{backgroundColor:s.hex}})},s.id))})]}),e.jsxs("section",{"data-loc":"client/src/components/SicBoDiceCustomizer.tsx:93","aria-labelledby":"sicbo-material-title",children:[e.jsx("h3",{"data-loc":"client/src/components/SicBoDiceCustomizer.tsx:94",id:"sicbo-material-title",className:"mb-2 text-[11px] font-black text-white/80",children:"วัสà¸à¸¸"}),e.jsx("div",{"data-loc":"client/src/components/SicBoDiceCustomizer.tsx:95",className:"grid grid-cols-3 gap-2",children:ue.map(s=>e.jsx("button",{"data-loc":"client/src/components/SicBoDiceCustomizer.tsx:95",type:"button","aria-pressed":r.material===s.id,onClick:()=>l({material:s.id}),className:R(r.material===s.id),children:s.label},s.id))})]}),e.jsxs("section",{"data-loc":"client/src/components/SicBoDiceCustomizer.tsx:98","aria-labelledby":"sicbo-shape-title",children:[e.jsx("h3",{"data-loc":"client/src/components/SicBoDiceCustomizer.tsx:99",id:"sicbo-shape-title",className:"mb-2 text-[11px] font-black text-white/80",children:"à¸à¸£à¸"}),e.jsx("div",{"data-loc":"client/src/components/SicBoDiceCustomizer.tsx:100",className:"grid grid-cols-3 gap-2",children:be.map(s=>e.jsx("button",{"data-loc":"client/src/components/SicBoDiceCustomizer.tsx:100",type:"button","aria-pressed":r.shape===s.id,onClick:()=>l({shape:s.id}),className:R(r.shape===s.id),children:s.label},s.id))})]}),e.jsxs("section",{"data-loc":"client/src/components/SicBoDiceCustomizer.tsx:103","aria-labelledby":"sicbo-pip-title",children:[e.jsx("h3",{"data-loc":"client/src/components/SicBoDiceCustomizer.tsx:104",id:"sicbo-pip-title",className:"mb-2 text-[11px] font-black text-white/80",children:"à¸
12ุà¸"}),e.jsx("div",{"data-loc":"client/src/components/SicBoDiceCustomizer.tsx:105",className:"grid grid-cols-3 gap-2",children:he.map(s=>e.jsx("button",{"data-loc":"client/src/components/SicBoDiceCustomizer.tsx:105",type:"button","aria-pressed":r.pip===s.id,onClick:()=>l({pip:s.id}),className:R(r.pip===s.id),children:s.label},s.id))})]}),e.jsxs("section",{"data-loc":"client/src/components/SicBoDiceCustomizer.tsx:108","aria-labelledby":"sicbo-tray-title",children:[e.jsx("h3",{"data-loc":"client/src/components/SicBoDiceCustomizer.tsx:109",id:"sicbo-tray-title",className:"mb-2 text-[11px] font-black text-white/80",children:"à¸à¸²à¸"}),e.jsx("div",{"data-loc":"client/src/components/SicBoDiceCustomizer.tsx:110",className:"grid grid-cols-2 gap-2",children:Oe.map(s=>e.jsxs("button",{"data-loc":"client/src/components/SicBoDiceCustomizer.tsx:110",type:"button","aria-pressed":t.tray===s.id,onClick:()=>a(i=>({...i,tray:s.id})),className:R(t.tray===s.id),children:[e.jsx("span",{"data-loc":"client/src/components/SicBoDiceCustomizer.tsx:110",className:"mr-1.5 inline-block h-2.5 w-2.5 rounded-full border border-white/15 align-middle",style:{backgroundColor:s.floor}}),s.label]},s.id))})]}),e.jsxs("button",{"data-loc":"client/src/components/SicBoDiceCustomizer.tsx:113",type:"button",onClick:()=>a(na()),className:"flex h-11 w-full items-center justify-center gap-2 rounded-xl border border-white/10 bg-white/[0.035] text-[10px] font-bold text-white/55 transition-[transform,background-color,color] duration-150 hover:bg-white/[0.07] hover:text-white active:scale-[0.98] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-amber-300/70 motion-reduce:transition-none",children:[e.jsx(Ee,{"data-loc":"client/src/components/SicBoDiceCustomizer.tsx:113",className:"h-3.5 w-3.5"}),"à¸à¸·à¸à¸à¹à¸²à¹à¸£à¸´à¹à¸¡à¸à¹à¸"]})]})]})]})}class ma extends m.Component{constructor(){super(...arguments),this.state={failed:!1}}static getDerivedStateFromError(){return{failed:!0}}componentDidCatch(a,c){console.warn("[SIC BO Dice] WebGL scene unavailable; using accessible CSS fallback.",a,c.componentStack)}render(){return this.state.failed?this.props.fallback:this.props.children}}function ua(){const[t,a]=m.useState(()=>ia());return m.useEffect(()=>{la(t)},[t]),{preferences:t,setPreferences:a}}const ba=8,ze=52;let L=null,xe=!0,le={};const T=[],Ae=[Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY];let Ne=Number.NEGATIVE_INFINITY;function ha(){return typeof window>"u"?null:window.AudioContext??window.webkitAudioContext??null}function re(t){const a=Math.sin(t*12.9898+78.233)*43758.5453;return(a-Math.floor(a))*2-1}function ya(t,a){const c=a==="throw"?.34:a==="rolling"?.92:a==="settle"?.16:a==="collision"?.085:.13,r=Math.ceil(t.sampleRate*c),l=t.createBuffer(1,r,t.sampleRate),s=l.getChannelData(0);for(let i=0;i<r;i+=1){const d=i/t.sampleRate,b=i/r,f=Math.pow(1-b,a==="throw"||a==="rolling"?1.3:3.1);a==="throw"?s[i]=(re(i)*.58+Math.sin(d*Math.PI*780)*.08)*f:a==="impact"?s[i]=(Math.sin(d*Math.PI*124)*.78+Math.sin(d*Math.PI*248)*.18)*f:a==="collision"?s[i]=(Math.sin(d*Math.PI*1080)*.52+re(i)*.18)*f:a==="rolling"?s[i]=(re(i)*.34+Math.sin(d*Math.PI*420)*.06)*f*(.76+Math.sin(d*Math.PI*24)*.24):s[i]=(Math.sin(d*Math.PI*1040)*.35+Math.sin(d*Math.PI*1480)*.22)*f}return l}function Fe(){if(!xe)return null;const t=ha();if(!t)return null;try{return L||(L=new t),L.state==="suspended"&&L.resume().catch(()=>{}),L}catch{return L=null,null}}function O(t,a){return le[a]||(le[a]=ya(t,a)),le[a]}function te(t,a){const c=Fe();if(!c)return!1;try{for(;T.length>=ba;){const d=T.shift();try{d?.stop()}catch{}}const r=c.createBufferSource(),l=c.createGain(),s=c.createBiquadFilter();r.buffer=O(c,t),r.playbackRate.value=a.rate??1,s.type="lowpass",s.frequency.value=a.lowpass??2800;const i=c.currentTime+(a.delay??0);return l.gain.setValueAtTime(Math.max(1e-4,a.volume),i),l.gain.exponentialRampToValueAtTime(1e-4,i+r.buffer.duration),r.connect(s),s.connect(l),l.connect(c.destination),r.onended=()=>{const d=T.indexOf(r);d>=0&&T.splice(d,1)},T.push(r),r.start(i),!0}catch{return!1}}
12function ke(t){xe=t,xe||T.splice(0).forEach(a=>{try{a.stop()}catch{}})}function Ve(){const t=Fe();return t?(O(t,"throw"),O(t,"impact"),O(t,"collision"),O(t,"rolling"),O(t,"settle"),!0):!1}function fa(){return te("throw",{volume:.055,rate:.96,lowpass:2100})}function Sa(){return te("rolling",{volume:.021,rate:.98+Math.random()*.06,delay:.14,lowpass:1450})}function wa(t,a,c="tray"){const r=typeof performance<"u"?performance.now():Date.now();if(c==="dice"&&r-Ne<ze||r-Ae[a]<ze)return!1;const l=Math.min(1,Math.log1p(Math.max(0,t))/8);if(l<.14)return!1;Ae[a]=r,c==="dice"&&(Ne=r);const s=.94+Math.random()*.12;return te(c==="dice"?"collision":"impact",{volume:(c==="dice"?.022:.03)+l*(c==="dice"?.07:.1),rate:s,lowpass:c==="dice"?3400:720+l*620})}function Ba(){return te("settle",{volume:.038,rate:1.02,lowpass:3600})}const Pa=[1,2,3,4,5,6],ja=m.lazy(()=>lt(()=>import("./SicBoDiceTrayScene-B6XmVFDZ.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20]))),W=[{active:"border-cyan-300/55 bg-cyan-400/[0.075] shadow-[0_0_22px_rgba(34,211,238,.12)]",label:"text-cyan-200",underline:"bg-cyan-300 shadow-[0_0_8px_rgba(103,232,249,.6)]",focus:"focus-visible:ring-cyan-300/70"},{active:"border-violet-300/55 bg-violet-400/[0.075] shadow-[0_0_22px_rgba(167,139,250,.12)]",label:"text-violet-200",underline:"bg-violet-300 shadow-[0_0_8px_rgba(196,181,253,.6)]",focus:"focus-visible:ring-violet-300/70"},{active:"border-amber-300/55 bg-amber-400/[0.085] shadow-[0_0_22px_rgba(251,191,36,.13)]",label:"text-amber-200",underline:"bg-amber-300 shadow-[0_0_8px_rgba(252,211,77,.6)]",focus:"focus-visible:ring-amber-300/70"}],va=[{id:"input",label:"à¸à¸±à¸à¸à¸¶à¸",icon:Z},{id:"stats",label:"สà¸à¸´à¸à¸´",icon:oe},{id:"patterns",label:"รูà¸à¹à¸à¸",icon:pe},{id:"lab",label:"Strategy Lab",icon:Ie}];function Ce(t,a){return a>0?`${(t/a*100).toFixed(1)}%`:"0.0%"}function Ue(t){return t==="big"?"สูà¸":t==="small"?"à¸à¹à¸³":"à¸à¸à¸"}function He(t){return t==="odd"?"à¸à¸µà¹":t==="even"?"à¸à¸¹à¹":"à¸à¸à¸"}function za(t,a){return t==="triple"?"bg-amber-400 text-[#10131c] ring-amber-300/40":a==="bigSmall"?t==="big"?"bg-rose-500 text-white ring-rose-400/30":"bg-sky-500 text-white ring-sky-400/30":t==="odd"?"bg-violet-500 text-white ring-violet-400/30":"bg-emerald-500 text-white ring-emerald-400/30"}function ge({title:t,values:a,market:c,limit:r}){const l=a.slice(-r);return e.jsxs("section",{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:115",className:"rounded-2xl border border-white/8 bg-white/[0.025] p-3",children:[e.jsxs("div",{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:116",className:"mb-3 flex items-center justify-between gap-2",children:[e.jsxs("div",{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:117",children:[e.jsx("h3",{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:118",className:"text-sm font-bold text-white",children:t}),e.jsxs("p",{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:119",className:"text-[10px] text-white/40",children:["ลà¹à¸²à¸ªà¸¸à¸ ",l.length," à¸à¸² ⢠à¹à¸¥à¸·à¹à¸à¸à¹à¸à¸§à¸à¸à¸à¹à¸à¹"]})]}),e.jsx("div",{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:121",className:"flex gap-1 text-[9px] text-white/50",children:e.jsx("span",{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:122",className:"rounded-full bg-white/5 px-2 py-1",children:"à¸à¹à¸à¸¡à¸¹à¸¥à¸à¸£à¸´à¸à¸¢à¹à¸à¸à¸«à¸¥à¸±à¸"})})]}),l.length===0?e.jsx("div",{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:126",className:"grid min-h-24 place-items-center rounded-xl border border-dashed border-white/10 text-xs text-white/30",children:"ยัà¸à¹à¸¡à¹à¸¡à¸µà¸à¹à¸à¸¡à¸¹à¸¥ Road"}):e.jsx("div",{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:128",className:"overflow-x-auto pb-1","aria-label":t,children:e.jsx("div",{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:129",className:"grid w-max grid-flow-col grid-rows-6 gap-1",children:l.map((s,i)=>e.jsx("div",{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:131",className:`grid h-7 w-7 place-items-center rounded-full text-[9px] font-black ring-1 ${za(s,c)}`,title:`à¸à¸² ${a.length-l.length+i+1}: ${c==="bigSmall"?Ue(s):He(s)}`,children:s==="triple"?"T":c==="bigSmall"?s==="big"?"B":"S":s==="odd"?"O":"E"},`${i}-${s}`))})})]})}function Ge({values:t,activeIndex:a,onActiveIndexChange:c,onValueChange:r,disabled:l=!1,rolling:s=!1,rollDelays:i=[0,55,110],rollSequence:d=0}){const{preferences:b,setPreferences:f}=ua(),n=m.useRef(!1);m.useEffect(()=>{ke(b.soundEnabled)},[b.soundEnabled]),m.useEffect(()=>{s&&!n.current&&(fa(),Sa()),!s&&n.current&&Ba(),n.current=s},[s]);const P=m.useCallback((y,u,D)=>{wa(y,u,D)},[]),g=y=>{$t({pointerType:y.pointerType,isPrimary:y.isPrimary,isTrusted:y.isTrusted})},x=y=>{r(a,y),c(Math.min(a+1,2))},h=e.jsx("div",{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:175",className:"grid h-full grid-cols-3 place-items-center gap-2 px-3 pt-6","aria-hidden":"true","data-sicbo-dice-fallback":"css",children:t.map((y,u)=>e.jsx(Wt,{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:176",value:y,dieIndex:u,active:a===u,rolling:s,rollDelayMs:i[u]},u))});return e.jsxs("div",{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:180",className:"space-y-3","aria-busy":s,children:[e.jsxs("div",{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:181",className:"sicbo-dice-tray-shell relative h-[160px] overflow-hidden rounded-[26px] border border-white/10 bg-[#080d14] sm:h-[176px]",role:"group","aria-label":"à¹à¸¥à¸·à¸à¸à¸¥à¸¹à¸à¹à¸à¹à¸²à¸à¸µà¹à¸à¹à¸à¸à¸à¸²à¸£à¹à¸à¹à¹à¸",children:[e.jsx(ma,{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:182",fallback:h,children:e.jsx(m.Suspense,{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:183",fallback:h,children:e.jsx(ja,{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:184",values:t,activeIndex:a,rolling:s,sequence:d,preferences:b,onImpact:P})})}),e.jsx("div",{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:187",className:"pointer-events-none absolute inset-0 grid grid-cols-3 gap-1.5 p-2",children:t.map((y,u)=>e.jsxs("button",{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:189",type:"button",disabled:l,onClick:()=>c(u),onPointerUp:g,"aria-pressed":a===u,"aria-label":`ลูà¸à¸à¸µà¹ ${u+1} à¸à¹à¸² ${y}${a===u?" à¸à¸³à¸¥à¸±à¸à¹à¸¥à¸·à¸à¸":""}`,className:`pointer-events-auto relative overflow-hidden rounded-[20px] border bg-transparent transition-[transform,border-color,background-color,box-shadow] duration-150 active:scale-[0.985] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:ring-offset-[#0d111b] disabled:cursor-wait disabled:opacity-80 motion-reduce:transition-none ${W[u].focus} ${a===u?W[u].active:"border-white/5 hover:border-white/15 hover:bg-white/[0.025]"}`,children:[e.jsxs("span",{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:199",className:`absolute left-3 top-2.5 z-10 text-[9px] font-bold uppercase tracking-[0.1em] ${a===u?W[u].label:"text-white/35"}`,children:["ลูภ",u+1]}),a===u&&e.jsx("span",{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:200",className:`absolute inset-x-4 bottom-2 h-0.5 rounded-full ${W[u].underline}`,"aria-hidden":"true"})]},u))}),e.jsxs("button",{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:204",type:"button",onClick:()=>{const y=!b.soundEnabled;ke(y),y&&Ve(),f(u=>({...u,soundEnabled:y}))},className:"absolute right-3 top-2.5 z-30 flex h-8 min-w-8 items-center justify-center gap-1 rounded-full border border-white/10 bg-black/45 px-1.5 text-white/55 backdrop-blur-sm transition-[transform,color,background-color] duration-150 hover:bg-black/65 hover:text-white active:scale-95 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-amber-300/70 motion-reduce:transition-none","aria-label":b.soundEnabled?"à¸à¸´à¸à¹à¸ªà¸µà¸¢à¸à¸¥à¸¹à¸à¹à¸à¹à¸²":"à¹à¸à¸´à¸à¹à¸ªà¸µà¸¢à¸à¸¥à¸¹à¸à¹à¸à¹à¸²","aria-pressed":b.soundEnabled,title:b.soundEnabled?"à¸à¸´à¸à¹à¸ªà¸µà¸¢à¸à¸¥à¸¹à¸à¹à¸à¹à¸²":"à¹à¸à¸´à¸à¹à¸ªà¸µà¸¢à¸à¸¥à¸¹à¸à¹à¸à¹à¸²",children:[b.soundEnabled?e.jsx(Nt,{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:217",className:"h-3.5 w-3.5","aria-hidden":"true"}):e.jsx(kt,{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:217",className:"h-3.5 w-3.5","aria-hidden":"true"}),e.jsx("span",{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:218",className:"text-[7px] font-black tracking-wide","aria-hidden":"true",children:b.soundEnabled?"ON":"OFF"})]}),e.jsx(pa,{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:220",preferences:b,setPreferences:f})]}),e.jsxs("fieldset",{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:222",disabled:l,className:"rounded-2xl border border-white/8 bg-black/20 p-2.5 disabled:cursor-wait disabled:opacity-70",children:[e.jsxs("legend",{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:223",className:"px-1 text-[9px] font-semibold text-white/45",children:["à¹à¸¥à¸·à¸à¸à¹à¸¥à¸à¹à¸«à¹à¸¥à¸¹à¸à¸à¸µà¹ ",a+1," ⢠à¹à¸¥à¸·à¸à¸à¹à¸¥à¹à¸§à¹à¸¥à¸·à¹à¸à¸à¹à¸à¸¥à¸¹à¸à¸à¸±à¸à¹à¸"]}),e.jsx("div",{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:224",className:"grid grid-cols-6 gap-1.5",children:Pa.map(y=>e.jsx("button",{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:226",type:"button",disabled:l,onClick:()=>x(y),onPointerUp:g,"aria-pressed":t[a]===y,"aria-label":`à¸à¸±à¹à¸à¸¥à¸¹à¸à¸à¸µà¹ ${a+1} à¹à¸à¹à¸ ${y}`,className:`h-11 rounded-xl text-sm font-black transition-[transform,background-color] duration-150 active:scale-95 disabled:cursor-wait motion-reduce:transition-none ${t[a]===y?"bg-gradient-to-br from-amber-300 to-amber-500 text-[#16120a] shadow-[0_0_18px_rgba(251,191,36,.2)]":"border border-white/8 bg-white/[0.035] text-white/70 hover:bg-white/[0.07]"}`,children:y},y))}),e.jsxs("div",{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:244",className:"mt-2 hidden flex-wrap items-center gap-x-3 gap-y-1 border-t border-white/6 pt-2 text-[8px] text-white/35 md:flex","aria-label":"à¸à¸µà¸¢à¹à¸¥à¸±à¸à¹à¸à¸ªà¸à¹à¸à¹à¸à¸",children:[e.jsxs("span",{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:245",children:[e.jsx("kbd",{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:245",className:"rounded border border-white/10 bg-white/5 px-1 py-0.5 font-mono text-white/60",children:"1â6"})," à¹à¸ªà¹à¹à¸¥à¸"]}),e.jsxs("span",{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:246",children:[e.jsx("kbd",{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:246",className:"rounded border border-white/10 bg-white/5 px-1 py-0.5 font-mono text-white/60",children:"Q W E"})," à¹à¸¥à¸·à¸à¸à¸¥à¸¹à¸"]}),e.jsxs("span",{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:247",children:[e.jsx("kbd",{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:247",className:"rounded border border-white/10 bg-white/5 px-1 py-0.5 font-mono text-white/60",children:"â â"})," สลัà¸à¸¥à¸¹à¸"]}),e.jsxs("span",{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:248",children:[e.jsx("kbd",{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:248",className:"rounded border border-white/10 bg-white/5 px-1 py-0.5 font-mono text-white/60",children:"Enter"})," à¸à¸±à¸à¸à¸¶à¸"]})]})]})]})}function Ye({nextRoundOrder:t,balance:a,loading:c,failed:r=!1}){const l=t>ne?Me:0,s=l===0||!c&&!r&&a>=l;return e.jsxs("div",{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:259",children:[e.jsxs("div",{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:260",className:`flex items-center justify-between gap-3 rounded-xl border px-3 py-2 text-[10px] ${l>0?"border-amber-400/20 bg-amber-400/[0.055] text-amber-100/70":"border-emerald-400/15 bg-emerald-400/[0.045] text-emerald-100/65"}`,children:[e.jsxs("div",{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:261",className:"flex min-w-0 items-center gap-2",children:[e.jsx(Ct,{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:261",className:"h-3.5 w-3.5 shrink-0"}),e.jsx("p",{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:261",className:"leading-relaxed",children:l>0?`à¸à¸² #${t} หัà¸à¸à¸±à¸à¹à¸à¸¡à¸±à¸à¸´ ${l} Point`:`à¸à¸£à¸µà¸à¸¶à¸à¸à¸² #${ne} ⢠à¹à¸£à¸´à¹à¸¡à¸«à¸±à¸à¸à¸²à¸à¸µà¹ 21`})]}),e.jsxs("span",{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:262",className:`shrink-0 font-black tabular-nums ${s?"text-white/75":"text-rose-300"}`,children:["à¸à¸à¹à¸«à¸¥à¸·à¸ ",c?"â¦":r?"â":a.toFixed(2)]})]}),l>0&&e.jsx("p",{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:264",className:"mt-1.5 text-[8px] leading-relaxed text-white/30",children:"à¸à¸±à¸à¸à¸¶à¸à¸ªà¸³à¹à¸£à¹à¸à¹à¸à¹à¸¥à¸°à¸à¸²à¸à¸±à¹à¸à¹à¸à¹à¸à¸²à¸à¸µà¹ 21 หัภ2 Point ⢠ยà¸à¹à¸¥à¸´à¸à¸«à¸£à¸·à¸à¸¥à¹à¸²à¸à¸ ายหลัà¸à¹à¸¡à¹à¸à¸·à¸ Point ⢠CSV à¸à¸´à¸à¸à¸²à¸¡à¸à¸³à¸à¸§à¸à¸à¸²à¸à¸µà¹à¹à¸à¸´à¸ 20"}),!c&&r&&l>0&&e.jsx("p",{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:265",className:"mt-2 text-center text-[10px] font-semibold text-rose-300",children:"à¹à¸«à¸¥à¸ Point à¹à¸¡à¹à¸ªà¸³à¹à¸£à¹à¸ â à¸à¸£à¸¸à¸à¸²à¸¥à¸à¸à¹à¸«à¸¡à¹à¸à¹à¸à¸à¸à¸±à¸à¸à¸¶à¸"}),!c&&!r&&!s&&e.jsxs("p",{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:266",className:"mt-2 text-center text-[10px] font-semibold text-rose-300",children:["Point à¹à¸¡à¹à¸à¸ â à¸à¹à¸à¸à¸¡à¸µ ",l," Point à¸à¸
12¶à¸à¸à¸°à¸à¸±à¸à¸à¸¶à¸à¸à¸²à¸à¸µà¹à¹à¸à¹"]})]})}function X({label:t,value:a,note:c,tone:r="amber"}){const l={amber:"text-amber-300 bg-amber-400/8 border-amber-400/15",sky:"text-sky-300 bg-sky-400/8 border-sky-400/15",emerald:"text-emerald-300 bg-emerald-400/8 border-emerald-400/15",violet:"text-violet-300 bg-violet-400/8 border-violet-400/15"}[r];return e.jsxs("div",{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:279",className:`rounded-2xl border p-3 ${l}`,children:[e.jsx("p",{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:280",className:"text-[10px] font-semibold uppercase tracking-[0.14em] text-white/40",children:t}),e.jsx("p",{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:281",className:"mt-1 text-xl font-black tabular-nums",children:a}),e.jsx("p",{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:282",className:"mt-0.5 text-[10px] text-white/40",children:c})]})}function qe({data:t,loading:a,error:c}){const r=(t?.rows??[]).filter(l=>["big","small","odd","even"].includes(l.id));return e.jsxs("section",{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:299",className:"rounded-2xl border border-sky-400/15 bg-sky-400/[0.045] p-3","aria-labelledby":"sicbo-probability-ev-title",children:[e.jsxs("div",{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:300",className:"flex flex-wrap items-start justify-between gap-2",children:[e.jsxs("div",{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:301",className:"flex min-w-0 items-start gap-2",children:[e.jsx(Dt,{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:302",className:"mt-0.5 h-4 w-4 shrink-0 text-sky-300","aria-hidden":"true"}),e.jsxs("div",{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:303",children:[e.jsx("h3",{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:304",id:"sicbo-probability-ev-title",className:"text-sm font-bold text-white",children:"Probability / EV à¸à¸²à¸¡ Paytable"}),e.jsx("p",{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:305",className:"mt-0.5 text-[10px] leading-relaxed text-white/40",children:"à¸à¹à¸²à¸à¸²à¸¡à¸à¸à¸´à¸à¸²à¹à¸§à¸à¸£à¹à¸à¸±à¸ Active à¹à¸¡à¹à¹à¸à¹à¸ªà¸±à¸à¸ªà¹à¸§à¸à¸à¸µà¹à¹à¸à¸´à¸à¹à¸à¹à¸à¸ªà¸à¸±à¸"})]})]}),e.jsxs("div",{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:308",className:"flex items-center gap-1","aria-label":"à¸à¸³à¸à¸à¸´à¸à¸²à¸¢ Probability à¹à¸¥à¸° EV",children:[e.jsx(Be,{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:309",term:"probability"}),e.jsx(Be,{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:310",term:"ev"})]})]}),a?e.jsxs("div",{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:315",className:"mt-3 flex min-h-20 items-center justify-center gap-2 rounded-xl border border-white/6 bg-black/15 text-[11px] text-white/40","aria-live":"polite",children:[e.jsx(M,{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:316",className:"h-4 w-4 animate-spin text-sky-300","aria-hidden":"true"})," à¸à¸³à¸¥à¸±à¸à¹à¸«à¸¥à¸à¸à¹à¸² Probability / EV"]}):c?e.jsx("div",{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:319",className:"mt-3 rounded-xl border border-rose-400/15 bg-rose-400/5 px-3 py-4 text-center text-[11px] text-rose-200/70",role:"status",children:"à¹à¸«à¸¥à¸à¸à¹à¸² Probability / EV à¹à¸¡à¹à¸ªà¸³à¹à¸£à¹à¸ à¸à¸£à¸¸à¸à¸²à¸¥à¸à¸à¹à¸«à¸¡à¹à¸ ายหลัà¸"}):r.length===0?e.jsx("div",{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:323",className:"mt-3 rounded-xl border border-dashed border-white/10 px-3 py-4 text-center text-[11px] text-white/35",role:"status",children:"ยัà¸à¹à¸¡à¹à¸¡à¸µà¸à¹à¸à¸¡à¸¹à¸¥ Paytable à¸à¸µà¹à¹à¸à¹à¸à¸²à¸"}):e.jsx("div",{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:327",className:"mt-3 grid grid-cols-2 gap-2 sm:grid-cols-4",children:r.map(l=>e.jsxs("div",{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:329",className:"rounded-xl border border-white/6 bg-black/15 p-2.5",children:[e.jsx("p",{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:330",className:"truncate text-[10px] font-bold text-white/70",children:l.label}),e.jsxs("p",{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:331",className:"mt-1 text-sm font-black tabular-nums text-sky-200",children:["P ",(l.probability*100).toFixed(3),"%"]}),e.jsxs("p",{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:332",className:`text-[10px] font-bold tabular-nums ${l.ev>=0?"text-emerald-300":"text-rose-300"}`,children:["EV ",(l.ev*100).toFixed(2),"%"]}),e.jsxs("p",{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:333",className:"mt-0.5 text-[9px] text-white/30",children:["Payout ",l.payout,":1"]})]},l.id))}),e.jsx("p",{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:339",className:"mt-3 text-[10px] leading-relaxed text-amber-100/55",children:"สัà¸à¸ªà¹à¸§à¸à¸à¸¥à¸«à¸¥à¸±à¸à¸à¸·à¸à¸ªà¸´à¹à¸à¸à¸µà¹à¹à¸à¸´à¸à¸à¸¶à¹à¸à¸à¸£à¸´à¸à¹à¸à¹à¸à¸ªà¸à¸±à¸ สà¹à¸§à¸ Probability/EV มาà¸à¸²à¸à¸à¸à¸´à¸à¸² Paytable; Data Confidence วัà¸à¸à¸à¸²à¸à¸à¸±à¸§à¸à¸¢à¹à¸²à¸ à¹à¸¡à¹à¹à¸à¹à¹à¸à¸à¸²à¸ªà¸à¸à¸° à¹à¸¥à¸°à¸à¸¸à¸à¸à¸²à¸¢à¸±à¸à¸à¸à¹à¸à¹à¸à¸à¸´à¸ªà¸£à¸°"})]})}function Qe({data:t,loading:a,refreshing:c=!1}){const r=n=>n==="big"?"สูà¸":n==="small"?"à¸à¹à¸³":n==="odd"?"à¸à¸µà¹":n==="even"?"à¸à¸¹à¹":"ยัà¸à¹à¸¡à¹à¸à¸±à¸",l=n=>n==="big"?{color:"#fb7185",text:"text-rose-300",border:"border-rose-400/20",background:"bg-rose-400/[0.055]"}:n==="small"?{color:"#38bdf8",text:"text-sky-300",border:"border-sky-400/20",background:"bg-sky-4
1200/[0.055]"}:n==="odd"?{color:"#c084fc",text:"text-violet-300",border:"border-violet-400/20",background:"bg-violet-400/[0.055]"}:n==="even"?{color:"#34d399",text:"text-emerald-300",border:"border-emerald-400/20",background:"bg-emerald-400/[0.055]"}:{color:"#64748b",text:"text-slate-300",border:"border-white/8",background:"bg-white/[0.025]"},s=(n,P)=>{const g=P.status==="lean",x=g?P.direction:null,h=l(x),y=g?P.strength:0;return e.jsxs("div",{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:355",className:`min-w-0 rounded-2xl border p-2.5 ${h.border} ${h.background}`,children:[e.jsxs("div",{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:356",className:"flex items-center justify-between gap-1.5",children:[e.jsx("p",{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:356",className:"truncate text-[9px] font-bold uppercase tracking-[0.11em] text-white/40",children:n}),e.jsxs("span",{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:356",className:"rounded-full bg-black/25 px-1.5 py-0.5 text-[8px] font-bold tabular-nums text-white/45",children:[y,"/100"]})]}),e.jsxs("div",{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:357",className:"mt-2 flex items-center gap-2",children:[e.jsx("div",{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:358",className:"grid h-12 w-12 shrink-0 place-items-center rounded-full p-[3px]",style:{background:`conic-gradient(${h.color} ${y*3.6}deg, rgba(255,255,255,.08) 0deg)`},"aria-hidden":"true",children:e.jsx("div",{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:358",className:"grid h-full w-full place-items-center rounded-full bg-[#111722] text-sm font-black text-white",children:g?r(x):"â"})}),e.jsxs("div",{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:359",className:"min-w-0",children:[e.jsx("p",{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:359",className:`truncate text-lg font-black ${h.text}`,children:g?r(x):"ยัà¸à¹à¸¡à¹à¸à¸±à¸"}),e.jsx("p",{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:359",className:"truncate text-[8px] text-white/35",children:"ยà¹à¸à¸à¸«à¸¥à¸±à¸ ⢠à¹à¸¡à¹à¹à¸à¹à¹à¸à¸à¸²à¸ªà¸à¸à¸°"})]})]}),e.jsx("div",{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:361",className:"mt-2 grid grid-cols-3 gap-1",children:P.windows.map(u=>e.jsxs("div",{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:361",className:"rounded-md bg-black/20 px-1 py-1 text-center",children:[e.jsxs("p",{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:361",className:"text-[7px] text-white/25",children:[u.size," à¸à¸²"]}),e.jsx("p",{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:361",className:"truncate text-[9px] font-bold text-white/60",children:u.direction?r(u.direction):"สมà¸à¸¸à¸¥"})]},u.size))})]})};if(a)return e.jsx("section",{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:365",className:"grid min-h-24 place-items-center rounded-2xl border border-cyan-400/10 bg-cyan-400/[0.025]",children:e.jsx(M,{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:365",className:"h-5 w-5 animate-spin text-cyan-300","aria-label":"à¸à¸³à¸¥à¸±à¸à¸à¸³à¸à¸§à¸à¹à¸à¸§à¹à¸à¹à¸¡à¸¢à¹à¸à¸à¸«à¸¥à¸±à¸"})});if(!t)return null;if(t.sampleSize<t.minimumSamples)return e.jsxs("section",{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:368","aria-live":"polite","aria-atomic":"true",className:"sicbo-historical-signal-update rounded-2xl border border-cyan-400/15 bg-[radial-gradient(circle_at_top_right,rgba(34,211,238,.08),transparent_42%),rgba(255,255,255,.02)] p-3",children:[e.jsxs("div",{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:368",className:"flex items-center gap-2",children:[e.jsx("div",{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:368",className:"grid h-9 w-9 shrink-0 place-items-center rounded-full border border-cyan-300/20 bg-cyan-300/8",children:e.jsx(we,{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:368",className:"h-4 w-4 text-cyan-300"})}),e.jsxs("div",{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:368",className:"min-w-0 flex-1",children:[e.jsxs("div",{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:368",className:"flex items-center justify-between gap-2",children:[e.jsx("h2",{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:368",className:"text-sm font-black text-white",children:"สัà¸à¸à¸²à¸à¸¢à¹à¸à¸à¸«à¸¥à¸±à¸"}),e.jsxs("span",{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:368",className:"text-[9px] font-bold tabular-nums text-cyan-200/65",children:[t.sampleSize,"/",t.minimumSamples," à¸à¸²"]})]}),e.jsxs("p",{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:368",className:"truncate text-[10px] text-white/40",children:["à¸à¸³à¸¥à¸±à¸à¹à¸à¹à¸à¸à¹à¸à¸¡à¸¹à¸¥ ⢠à¸à¸µà¸ ",t.minimumSamples-t.sampleSize," à¸à¸²"]})]})]}),e.jsx("div",{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:368",className:"mt-2 h-1.5 overflow-hidden rounded-full bg-black/30",children:e.jsx("div",{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:368",className:"h-full rounded-full bg-gradient-to-r from-cyan-500 to-cyan-300 transition-[width] duration-300 motion-reduce:transition-none",style:{width:`${t.progress*100}%`}})}),e.jsx("p",{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:368",className:"mt-2 text-[9px] text-amber-100/50",children:"ระà¸à¸à¹à¸¡à¹à¹à¸à¸²à¸à¸±à¹à¸à¸à¹à¸à¸à¸à¸¶à¸à¹à¸à¸à¸à¹ ⢠à¸à¸¸à¸à¸à¸²à¹à¸à¹à¸à¸à¸´à¸ªà¸£à¸°"})]},`insufficient-${t.sampleSize}`);const i=`${t.sampleSize}-${t.lastUpdatedAt?new Date(t.lastUpdatedAt).getTime():"none"}`,d=n=>n.status==="observed"?String(n.value):"ยัà¸à¹à¸¡à¹à¹à¸à¹à¸",b=t.face.status==="observed",f=n=>n.type==="started"?`à¹à¸£à¸´à¹à¸¡à¸à¸à¹à¸¥à¸ ${n.value} à¹à¸à¹à¸`:n.type==="switched"?`à¹à¸¥à¸à¹à¸à¹à¸à¹à¸à¸¥à¸µà¹à¸¢à¸ ${n.previousValue} â ${n.value}`:`à¹à¸¥à¸ ${n.previousValue} à¹à¸¡à¹à¹à¸à¹à¸à¸à¸²à¸¡à¹à¸à¸à¸à¹à¹à¸¥à¹à¸§`;return e.jsxs("section",{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:379","aria-live":"polite","aria-atomic":"true",className:"sicbo-historical-signal-update rounded-2xl border border-cyan-400/15 bg-[radial-gradient(circle_at_top_right,rgba(34,211,238,.09),transparent_38%),rgba(255,255,255,.02)] p-3",children:[e.jsxs("div",{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:380",className:"flex items-center justify-between gap-2",children:[e.jsxs("div",{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:380",className:"flex min-w-0 items-center gap-2",children:[e.jsx("div",{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:380",className:"grid h-8 w-8 shrink-0 place-items-center rounded-full border border-cyan-300/20 bg-cyan-300/8",children:e.jsx(we,{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:380",className:"h-4 w-4 text-cyan-300"})}),e.jsxs("div",{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:380",className:"min-w-0",children:[e.jsx("h2",{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:380",className:"text-sm font-black text-white",children:"สัà¸à¸à¸²à¸à¸¢à¹à¸à¸à¸«à¸¥à¸±à¸"}),e.jsx("p",{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:380",className:"truncate text-[9px] text-white/35",children:"à¸à¸±à¸à¹à¸à¸à¸à¸¸à¸à¸à¸²à¸à¸µà¹à¸à¸±à¸à¸à¸¶à¸ ⢠à¹à¸¡à¹à¹à¸à¹à¸à¸³à¹à¸à¸°à¸à¸³à¹à¸à¸´à¸¡à¸à¸±à¸"})]})]}),e.jsxs("div",{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:380",className:"flex shrink-0 items-center gap-1 rounded-full bg-cyan-300/8 px-2 py-1 text-[8px] font-bold text-cyan-200/70",children:[c?e.jsx(M,{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:380",className:"h-2.5 w-2.5 animate-spin"}):e.jsx("span",{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:380",className:"h-1.5 w-1.5 rounded-full bg-emerald-400"}),c?"à¸à¸±à¸à¹à¸à¸":`${t.sampleSize} à¸à¸²`]})]}),e.jsxs("div",{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:381",className:"mt-2.5 grid grid-cols-2 gap-2",children:[s("สูภ/ à¸à¹à¸³",t.bigSmall),s("à¸à¸µà¹ / à¸à¸¹à¹",t.oddEven)]}),e.jsxs("div",{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:382",className:"mt-2 grid grid-cols-[minmax(0,1fr)_112px] gap-2",children:[e.jsxs("div",{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:383",className:"flex min-w-0 items-center justify-between rounded-xl border border-violet-400/10 bg-violet-400/[0.035] px-3 py-2 text-[9px]",children:[e.jsxs("div",{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:383",children:[e.jsx("p",{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:383",className:"text-white/35",children:"à¸à¸¥à¸£à¸§à¸¡à¹à¸à¹à¸à¸¢à¹à¸à¸à¸«à¸¥à¸±à¸"}),e.jsx("p",{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:383",className:"mt-0.5 font-black text-violet-200",children:d(t.total)})]}),e.jsx("span",{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:383",className:"text-[8px] text-white/25",children:"à¸à¸à¹à¸¡à¸·à¹à¸à¸¡à¸µà¸à¸±à¸¢à¸ªà¸³à¸à¸±à¸"})]}),e.jsxs(yt,{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:384",children:[e.jsx(ft,{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:385",asChild:!0,children:e.jsxs("button",{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:386",type:"button",className:`rounded-xl border px-2 py-1.5 text-center transition-[transform,border-color,background-color] duration-150 active:scale-[0.98] motion-reduce:transition-none ${b?"border-amber-300/25 bg-amber-300/[0.07] hover:bg-amber-300/[0.11]":"border-white/8 bg-white/[0.025] hover:bg-white/[0.05]"}`,"aria-label":"à¹à¸à¸´à¸à¸à¸£à¸°à¸§à¸±à¸à¸´à¸à¸²à¸£à¹à¸à¸¥à¸µà¹à¸¢à¸à¹à¸¥à¸à¸«à¸à¹à¸²à¹à¸à¹à¸à¸¢à¹à¸à¸à¸«à¸¥à¸±à¸",children:[e.jsx("span",{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:387",className:"block text-[7px] font-bold text-white/35",children:"à¹à¸¥à¸à¸«à¸à¹à¸²à¹à¸à¹à¸à¸¢à¹à¸à¸à¸«à¸¥à¸±à¸"}),e.jsx("span",{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:387",className:`mx-auto mt-1 grid h-9 w-9 place-items-center rounded-xl border text-xl font-black tabular-nums ${b?"border-amber-200/40 bg-gradient-to-br from-amber-200 to-amber-500 text-[#181208] shadow-[0_0_18px_rgba(251,191,36,.18)]":"border-white/8 bg-black/20 text-white/25"}`,children:b?t.face.value:"â"}),b?e.jsxs(e.Fragment,{children:[e.jsxs("span",{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:387",className:"mt-1 block text-[7px] font-bold text-amber-100/65",children:["à¸à¸à¹à¸à¹à¸ ",t.face.stableRounds," à¸à¸²"]}),e.jsxs("span",{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:387",className:"block text-[6px] text-white/25",children:["à¹à¸£à¸´à¹à¸¡à¸à¸² #",t.face.firstObservedAtRound," ⢠à¸à¸²à¸ ",t.face.windowSize," à¸à¸²à¸¥à¹à¸²à¸ªà¸¸à¸"]})]}):e.jsx("span",{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:387",className:"mt-1 block text-[7px] text-white/30",children:"รà¸à¸ªà¸±à¸à¸à¸²à¸ ⢠à¹à¸¡à¹à¸ªà¸¸à¹à¸¡à¹à¸¥à¸"}),e.jsx("span",{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:387",className:"mt-0.5 block text-[6px] text-cyan-100/45",children:"à¹à¸à¸°à¸à¸¹à¸à¸£à¸°à¸§à¸±à¸à¸´"})]})}),e.jsxs(St,{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:390",className:"max-h-[calc(100dvh-2rem)] overflow-y-auto border-cyan-400/20 bg-[#101722] p-4 text-white sm:max-w-md
12sm:p-5",children:[e.jsxs(wt,{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:391",className:"pr-6 text-left",children:[e.jsxs(Bt,{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:392",className:"flex items-center gap-2 text-base font-black text-white",children:[e.jsx($e,{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:392",className:"h-4 w-4 text-cyan-300"}),"à¸à¸£à¸°à¸§à¸±à¸à¸´à¸à¸²à¸£à¹à¸à¸¥à¸µà¹à¸¢à¸à¹à¸¥à¸à¹à¸à¹à¸"]}),e.jsx(Pt,{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:393",className:"text-[11px] leading-relaxed text-white/45",children:"à¸à¸±à¸à¸à¸¶à¸à¸à¸²à¸£à¹à¸£à¸´à¹à¸¡ à¹à¸à¸¥à¸µà¹à¸¢à¸ à¹à¸¥à¸°à¸«à¸²à¸¢à¸à¸à¸à¹à¸¥à¸à¸«à¸à¹à¸²à¹à¸à¹à¸²à¸à¸µà¹à¸à¸à¹à¸à¹à¸à¸à¸²à¸à¸à¸¥à¸à¸µà¹à¸à¸à¹à¸¥à¹à¸§ à¹à¸¡à¹à¹à¸à¹à¸à¸²à¸£à¸à¸³à¸à¸²à¸¢à¹à¸¥à¸à¸à¸²à¸à¸±à¸à¹à¸"})]}),e.jsx("div",{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:395",className:"rounded-xl border border-amber-400/10 bg-amber-400/[0.045] px-3 py-2 text-[10px] text-amber-100/65",children:b?e.jsxs(e.Fragment,{children:["à¸à¸±à¸à¸à¸¸à¸à¸±à¸à¹à¸¥à¸ ",e.jsx("strong",{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:395",className:"text-amber-200",children:t.face.value})," à¸à¸à¹à¸à¹à¸ ",t.face.stableRounds," à¸à¸²"]}):e.jsx(e.Fragment,{children:"à¸à¸à¸°à¸à¸µà¹à¸¢à¸±à¸à¹à¸¡à¹à¸¡à¸µà¹à¸¥à¸à¸à¸µà¹à¸à¹à¸²à¸à¹à¸à¸à¸à¹ ⢠ระà¸à¸à¹à¸¡à¹à¸ªà¸¸à¹à¸¡à¹à¸¥à¸à¹à¸à¸"})}),t.face.changeHistory.length===0?e.jsx("div",{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:397",className:"rounded-xl border border-dashed border-white/10 px-3 py-7 text-center text-[11px] text-white/35",children:"ยัà¸à¹à¸¡à¹à¸¡à¸µà¹à¸«à¸à¸¸à¸à¸²à¸£à¸à¹à¹à¸¥à¸à¸«à¸à¹à¸²à¹à¸à¹à¸²à¹à¸à¹à¸à¸à¸²à¸¡à¹à¸à¸à¸à¹à¹à¸à¸à¹à¸à¸¡à¸¹à¸¥à¸à¸µà¹"}):e.jsx("ol",{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:399",className:"space-y-2","aria-label":"รายà¸à¸²à¸£à¸à¸£à¸°à¸§à¸±à¸à¸´à¸à¸²à¸£à¹à¸à¸¥à¸µà¹à¸¢à¸à¹à¸¥à¸à¸«à¸à¹à¸²à¹à¸à¹à¸",children:t.face.changeHistory.map((n,P)=>e.jsxs("li",{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:401",className:"rounded-xl border border-white/8 bg-black/20 px-3 py-2.5",children:[e.jsxs("div",{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:402",className:"flex items-center justify-between gap-2",children:[e.jsx("p",{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:402",className:"text-[11px] font-bold text-white",children:f(n)}),e.jsxs("span",{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:402",className:"shrink-0 rounded-full bg-white/5 px-2 py-0.5 text-[9px] font-bold text-cyan-200/70",children:["à¸à¸² #",n.round]})]}),e.jsxs("p",{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:403",className:"mt-1 text-[9px] leading-relaxed text-white/35",children:["à¸à¸²à¸ ",n.windowSize," à¸à¸²à¸¥à¹à¸²à¸ªà¸¸à¸ ⢠à¸à¸ ",n.observedCount," หà¸à¹à¸² ⢠à¸à¸²à¸ ",n.expectedCount.toFixed(2)," ⢠z ",n.zScore.toFixed(2)]})]},`${n.round}-${n.type}-${n.value??n.previousValue}-${P}`))}),e.jsx("p",{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:408",className:"text-[9px] leading-relaxed text-white/30",children:"à¹à¸ªà¸à¸à¸¥à¹à¸²à¸ªà¸¸à¸à¹à¸¡à¹à¹à¸à¸´à¸ 12 à¹à¸«à¸à¸¸à¸à¸²à¸£à¸à¹ à¹à¸¥à¸°à¸à¸³à¸à¸§à¸à¹à¸«à¸¡à¹à¹à¸¡à¸·à¹à¸à¹à¸à¸´à¹à¸¡ ยà¸à¹à¸¥à¸´à¸ ลà¹à¸²à¸ หรืà¸à¸à¸³à¹à¸à¹à¸²à¸à¸¥"})]})]})]}),e.jsxs("div",{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:412",className:"mt-2 flex items-start gap-1.5 rounded-lg border border-amber-400/10 bg-amber-400/[0.04] px-2 py-1.5 text-[8px] leading-relaxed text-amber-100/50",children:[e.jsx(Re,{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:412",className:"mt-0.5 h-2.5 w-2.5 shrink-0 text-amber-300/70"}),e.jsxs("p",{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:412",children:["à¸à¹à¸à¸¡à¸¹à¸¥à¸¢à¹à¸à¸à¸«à¸¥à¸±à¸à¹à¸à¹à¸²à¸à¸±à¹à¸ ⢠à¸à¸¸à¸à¸à¸²à¸à¸´à¸ªà¸£à¸° ⢠à¸à¸§à¸²à¸¡à¸à¸±à¸à¹à¸¡à¹à¹à¸à¹à¹à¸à¸à¸²à¸ªà¸à¸à¸° ⢠สูà¸/à¸à¹à¸³âà¸à¸µà¹/à¸à¸¹à¹ ",(t.theoretical.bigSmallEac
12h*100).toFixed(2),"% ⢠à¸à¸à¸ ",(t.theoretical.anyTriple*100).toFixed(2),"%",e.jsxs("span",{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:412",className:"sr-only",children:[" ",t.disclaimer]})]})]}),e.jsxs("p",{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:413",className:"mt-1.5 flex items-center justify-end gap-1 text-[7px] text-white/20",children:[e.jsx(it,{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:413",className:"h-2.5 w-2.5"})," ",t.lastUpdatedAt?new Date(t.lastUpdatedAt).toLocaleTimeString("th-TH"):"ยัà¸à¹à¸¡à¹à¸¡à¸µà¹à¸§à¸¥à¸²à¸à¸±à¸à¹à¸à¸"]})]},i)}function De({title:t,data:a,positiveLabel:c,negativeLabel:r}){return a?e.jsxs("section",{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:421",className:"rounded-2xl border border-white/8 bg-white/[0.025] p-3",children:[e.jsxs("div",{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:422",className:"flex items-center justify-between gap-2",children:[e.jsx("h3",{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:423",className:"text-sm font-bold text-white",children:t}),e.jsxs("span",{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:424",className:`rounded-full px-2 py-1 text-[10px] font-bold ${Math.abs(a.zScore)>=2?"bg-amber-400/10 text-amber-300":"bg-emerald-400/10 text-emerald-300"}`,children:["z ",Number(a.zScore).toFixed(2)]})]}),e.jsxs("div",{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:426",className:"mt-3 grid grid-cols-3 gap-2",children:[e.jsxs("div",{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:427",className:"rounded-xl bg-white/[0.035] p-2",children:[e.jsx("p",{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:427",className:"text-[9px] text-white/35",children:"สà¸à¸£à¸µà¸à¸à¸±à¸à¸à¸¸à¸à¸±à¸"}),e.jsxs("p",{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:427",className:"mt-1 text-sm font-black text-white",children:[a.currentRun.symbol??"â"," à ",a.currentRun.length]})]}),e.jsxs("div",{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:428",className:"rounded-xl bg-white/[0.035] p-2",children:[e.jsx("p",{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:428",className:"text-[9px] text-white/35",children:"ยาวà¸à¸µà¹à¸ªà¸¸à¸"}),e.jsx("p",{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:428",className:"mt-1 text-sm font-black text-white",children:a.longestRun})]}),e.jsxs("div",{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:429",className:"rounded-xl bg-white/[0.035] p-2",children:[e.jsx("p",{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:429",className:"text-[9px] text-white/35",children:"Ping-Pong"}),e.jsxs("p",{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:429",className:"mt-1 text-sm font-black text-white",children:[(a.alternationRate*100).toFixed(0),"%"]})]})]}),e.jsx("div",{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:431",className:"mt-3 grid grid-cols-3 gap-1.5 text-center",children:[{label:"2-2",value:a.blocks.twoTwo},{label:"3-3",value:a.blocks.threeThree},{label:"4-4",value:a.blocks.fourFour}].map(l=>e.jsxs("div",{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:432",className:"rounded-xl border border-white/6 bg-black/15 p-2",children:[e.jsxs("p",{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:432",className:"text-[9px] text-white/35",children:["รูà¸à¹à¸à¸ ",l.label]}),e.jsx("p",{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:432",className:"text-sm font-black text-amber-300",children:l.value})]},l.label))}),e.jsx("div",{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:434",className:"mt-3 space-y-1.5",children:a.windows.map(l=>{const s=l.counts[c]??0,i=l.counts[r]??0;return e.jsxs("div",{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:438",className:"grid grid-cols-[48px_1fr_auto] items-center gap-2 text-[10px]",children:[e.jsxs("span",{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:438",className:"text-white/35",children:[l.size," à¸à¸²"]}),e.jsxs("div",{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:438",className:"flex h-1.5 overflow-hidden rounded-full bg-white/5",children:[e.jsx("span",{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:438",className:"bg-rose-500",style:{width:`${l.samples?s/l.samples*100:0}%`}}),e.jsx("span",{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:438",className:"bg-sky-500",style:{width:`${l.samples?i/l.samples*100:0}%`}})]}),e.jsxs("span",{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:438",className:"tabular-nums text-white/55",children:[s,"/",i]})]},l.size)})}),e.jsx("p",{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:441",className:"mt-2 text-[9px] text-white/25",children:"Moving Window à¹à¸à¹à¸à¸à¹à¸à¸¡à¸¹à¸¥à¸¢à¹à¸à¸à¸«à¸¥à¸±à¸ à¹à¸¡à¹à¹à¸à¹à¸ªà¸±à¸à¸à¸²à¸à¸à¸²à¸à¸±à¸à¹à¸"})]}):null}function Aa({analysis:t}){if(!t||t.sampleSize===0)return e.jsx("section",{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:448",className:"grid min-h-72 place-items-center rounded-3xl border border-dashed border-white/10 bg-white/[0.015] px-6 text-center",children:e.jsxs("div",{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:448",children:[e.jsx(pe,{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:448",className:"mx-auto h-10 w-10 text-amber-300/30"}),e.jsx("h2",{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:448",className:"mt-3 font-bold text-white",children:"ยัà¸à¹à¸¡à¹à¸¡à¸µà¸à¹à¸à¸¡à¸¹à¸¥à¸§à¸´à¹à¸à¸£à¸²à¸°à¸«à¹"}),e.jsx("p",{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:448",className:"mt-1 text-xs text-white/40",children:"à¸à¸±à¸à¸à¸¶à¸à¸à¸¥à¸à¸¢à¹à¸²à¸à¸à¹à¸à¸¢ 10 à¸à¸²à¹à¸à¸·à¹à¸à¹à¸£à¸´à¹à¸¡à¹à¸«à¹à¸à¸£à¸¹à¸à¹à¸à¸à¸¢à¹à¸à¸à¸«à¸¥à¸±à¸"})]})});const a=Object.values(t.frequencies.doublesByFace).reduce((l,s)=>l+Number(s),0),c=Object.values(t.frequencies.triplesByFace).reduce((l,s)=>l+Number(s),0),r=[...t.markets.bigSmall.ngrams.slice(0,6),...t.markets.oddEven.ngrams.slice(0,6)].slice(0,10);return e.jsxs("section",{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:454",className:"space-y-4",children:[e.jsxs("div",{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:455",className:"rounded-2xl border border-amber-400/15 bg-amber-400/5 p-3",children:[e.jsxs("div",{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:456",className:"flex flex-wrap items-center justify-between gap-2",children:[e.jsxs("div",{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:456",children:[e.jsx("p",{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:456",className:"text-[10px] font-bold uppercase tracking-[0.15em] text-amber-300",children:"DATA CONFIDENCE"}),e.jsxs("p",{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:456",className:"text-lg font-black text-white",children:[t.dataConfidence.replace("_"," ")," ⢠",t.sampleSize," à¸à¸²"]})]}),e.jsx("span",{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:456",className:"rounded-full bg-white/5 px-3 py-1.5 text-[10px] text-white/45",children:"Descriptive Analytics"})]}),e.jsx("p",{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:457",className:"mt-2 text-[10px] leading-relaxed text-amber-100/55",children:t.warning})]}),e.jsxs("div",{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:459",className:"grid gap-4 lg:grid-cols-2",children:[e.jsx(De,{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:459",title:"Big / Small Trend",data:t.markets.bigSmall,positiveLabel:"B",negativeLabel:"S"}),e.jsx(De,{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:459",title:"Odd / Even Trend",data:t.markets.oddEven,positiveLabel:"O",negativeLabel:"E"})]}),e.jsxs("div",{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:460",className:"grid gap-4 lg:grid-cols-[.8fr_1.2fr]",children:[e.jsxs("section",{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:461",className:"rounded-2xl border border-white/8 bg-white/[0.025] p-3",children:[e.jsx("h3",{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:461",className:"text-sm font-bold text-white",children:"Sum Zone & Face Frequency"}),e.jsx("div",{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:461",className:"mt-3 grid grid-cols-5 ga
12p-1",children:Object.entries(t.frequencies.zones).map(([l,s])=>e.jsxs("div",{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:461",className:"rounded-xl bg-white/[0.035] p-2 text-center",children:[e.jsx("p",{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:461",className:"truncate text-[8px] text-white/30",children:l.replace("_"," ")}),e.jsx("p",{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:461",className:"text-sm font-black text-white",children:String(s)})]},l))}),e.jsx("div",{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:461",className:"mt-3 grid grid-cols-6 gap-1",children:Object.entries(t.frequencies.singlesByFace).map(([l,s])=>e.jsxs("div",{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:461",className:"rounded-xl border border-white/6 bg-black/15 p-2 text-center",children:[e.jsxs("p",{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:461",className:"text-[9px] text-white/35",children:["หà¸à¹à¸² ",l]}),e.jsx("p",{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:461",className:"text-sm font-black text-amber-300",children:String(s)})]},l))}),e.jsxs("div",{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:461",className:"mt-3 grid grid-cols-2 gap-2 text-[10px]",children:[e.jsxs("div",{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:461",className:"rounded-xl bg-white/[0.03] p-2 text-white/55",children:["à¸à¸¹à¹: ",a," à¸à¸²"]}),e.jsxs("div",{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:461",className:"rounded-xl bg-white/[0.03] p-2 text-white/55",children:["à¸à¸à¸: ",c," à¸à¸²"]})]})]}),e.jsxs("section",{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:462",className:"rounded-2xl border border-white/8 bg-white/[0.025] p-3",children:[e.jsx("h3",{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:462",className:"text-sm font-bold text-white",children:"Pattern Scanner / N-Gram"}),e.jsx("p",{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:462",className:"mt-1 text-[10px] text-white/35",children:"ลำà¸à¸±à¸à¸à¹à¸³ 2â5 à¸à¹à¸à¸à¹à¸¥à¸°à¸ªà¸´à¹à¸à¸à¸µà¹à¸à¸à¸à¸±à¸à¹à¸à¹à¸à¸à¸à¸µà¸"}),e.jsx("div",{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:462",className:"mt-3 grid gap-2 sm:grid-cols-2",children:r.map((l,s)=>e.jsxs("div",{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:462",className:"flex items-center gap-2 rounded-xl border border-white/6 bg-black/15 p-2",children:[e.jsx("div",{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:462",className:"flex gap-0.5",children:l.pattern.split("").map((i,d)=>e.jsx("span",{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:462",className:"grid h-6 w-6 place-items-center rounded-md bg-white/8 text-[9px] font-black text-white",children:i},d))}),e.jsxs("div",{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:462",className:"ml-auto text-right",children:[e.jsxs("p",{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:462",className:"text-[10px] font-bold text-amber-300",children:[l.occurrences," à¸à¸£à¸±à¹à¸"]}),e.jsxs("p",{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:462",className:"text-[8px] text-white/30",children:["à¸à¸±à¸à¹à¸ ",Object.entries(l.nextCounts).map(([i,d])=>`${i}:${d}`).join(" ")||"â"]})]})]},`${l.pattern}-${s}`))})]})]})]})}function Na({activeSessionId:t,historyRounds:a}){const c=v.useUtils(),[r,l]=m.useState("history"),[s,i]=m.useState({...rt}),[d,b]=m.useState("mawin-siam"),[f,n]=m.useState(100),[P,g]=m.useState(500),[x,h]=m.useState(null),y=v.sicbo.strategyLab.saved.useQuery(),u=v.sicbo.strategyLab.runHistory.useMutation({onSuccess:async p=>{h(p.metrics),await c.sicbo.strategyLab.saved.invalidate(),A.success("Backtest à¸à¸£à¸°à¸§à¸±à¸à¸´à¹à¸ªà¸£à¹à¸à¹à¸¥à¹à¸§")},onError:p=>A.error(p.message)}),D=v.sicbo.strategyLab.runMonteCarlo.useMutation({onSuccess:async p=>{h(p.metrics),await c.sicbo.strategyLab.saved.invalidate(),A.success("Simulation à¹à¸ªà¸£à¹à¸à¹à¸¥à¹à¸§")},onError:p=>A.error(p.message)}),$=u.isPending||D.isPending,_=f*P,ae=(p,j)=>i(k=>({...k,[p]:Math.max(1,Number(j)||1)})),se=()=>{h(null),r==="history"?u.mutate({sessionId:t,config:s,save:!0}):D.mutate({seed:d.trim(),trials:f,roundsPerTrial:P,config:{...s,maxRounds:P},save:!0})},N=(p,j,k="text-white")=>e.jsxs("div",{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:493",className:"rounded-xl border border-white/6 bg-black/15 p-2",children:[e.jsx("p",{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:493",className:"text-[9px] text-white/35",children:p}),e.jsx("p",{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:493",className:`mt-1 text-sm font-black tabular-nums ${k}`,children:j})]});return e.jsxs("section",{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:496",className:"space-y-4",children:[e.jsx("div",{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:497",className:"rounded-2xl border border-rose-400/15 bg-rose-400/5 p-3 text-[10px] leading-relaxed text-rose-100/60",children:e.jsxs("div",{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:498",className:"flex gap-2",children:[e.jsx(Ie,{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:498",className:"h-4 w-4 shrink-0 text-rose-300"}),e.jsxs("p",{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:498",children:[e.jsx("strong",{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:498",className:"text-rose-200",children:"Simulation à¹à¸à¹à¸²à¸à¸±à¹à¸:"})," ระà¸à¸à¹à¸à¸´à¸à¹à¸à¸´à¸à¹à¸à¸´à¹à¸¡à¸à¸§à¸²à¸¡à¸à¸±à¸à¸à¸§à¸à¹à¸¥à¸°à¸à¸²à¸à¸à¸³à¹à¸«à¹à¸«à¸¡à¸à¸à¸¸à¸à¹à¸£à¹à¸§ à¹à¸¡à¹à¹à¸à¸¥à¸µà¹à¸¢à¸ House Edge à¹à¸¥à¸°à¹à¸¡à¹à¹à¸à¹à¸à¸³à¹à¸à¸°à¸à¸³à¹à¸«à¹à¹à¸à¸´à¸¡à¸à¸±à¸"]})]})}),e.jsxs("div",{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:500",className:"grid gap-4 lg:grid-cols-[.85fr_1.15fr]",children:[e.jsxs("div",{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:501",className:"space-y-4 rounded-3xl border border-white/8 bg-white/[0.025] p-4",children:[e.jsxs("div",{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:502",children:[e.jsx("p",{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:502",className:"text-[10px] font-bold uppercase tracking-[0.15em] text-amber-300",children:"STRATEGY LAB"}),e.jsx("h2",{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:502",className:"mt-1 text-xl font-black text-white",children:"à¸à¸±à¹à¸à¸à¹à¸²à¸à¸²à¸£à¸à¸³à¸¥à¸à¸"})]}),e.jsxs("div",{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:503",className:"grid grid-cols-2 gap-2",children:[e.jsxs("button",{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:504",type:"button",onClick:()=>l("history"),className:`rounded-xl border px-3 py-2 text-xs font-bold ${r==="history"?"border-amber-400/30 bg-amber-400/10 text-amber-300":"border-white/8 bg-white/[0.025] text-white/40"}`,children:["à¸à¹à¸à¸¡à¸¹à¸¥à¸¢à¹à¸à¸à¸«à¸¥à¸±à¸ (",a,")"]}),e.jsx("button",{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:505",type:"button",onClick:()=>l("monte_carlo"),className:`rounded-xl border px-3 py-2 text-xs font-bold ${r==="monte_carlo"?"border-amber-400/30 bg-amber-400/10 text-amber-300":"border-white/8 bg-white/[0.025] text-white/40"}`,children:"Monte Carlo"})]}),e.jsxs("label",{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:507",className:"block text-[10px] text-white/40",children:["à¸à¸¥à¸¢à¸¸à¸à¸à¹",e.jsx("select",{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:507",value:s.strategy,onChange:p=>i(j=>({...j,strategy:p.target.value})),className:"mt-1 h-10 w-full rounded-xl border border-white/10 bg-[#111621] px-3 text-sm font-bold text-white",children:Object.entries(Pe).map(([p,j])=>e.jsx("option",{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:507",value:p,children:j},p))})]}),e.jsxs("div",{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:508",className:"grid grid-cols-2 gap-2",children:[e.jsxs("label",{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:509",className:"text-[10px] text-white/40",children:["à¸à¸¥à¸²à¸",e.jsxs("select",{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:509",value:s.market,onChange:p=>{const j=p.target.value;i(k=>({...k,market:j,baseSide:j==="big_small"?"big":"odd"}))},className:"mt-1 h-10 w-full rounded-xl border border-white/10 bg-[#111621] px-3 text-xs font-bold text-white",children:[e.jsx("option",{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:509",value:"big_small",children:"Big / Small"}),e.jsx("option",{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:509",value:"odd_even",children:"Odd / Even"})]})]}),e.jsxs("label",{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:510",className:"text-[10px] text-white/40",children:["à¸à¸±à¹à¸à¸à¸±à¹à¸à¸à¹à¸",e.jsx("select",{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:510",value:s.baseSide,onCh
12ange:p=>i(j=>({...j,baseSide:p.target.value})),className:"mt-1 h-10 w-full rounded-xl border border-white/10 bg-[#111621] px-3 text-xs font-bold text-white",children:s.market==="big_small"?e.jsxs(e.Fragment,{children:[e.jsx("option",{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:510",value:"big",children:"สูà¸"}),e.jsx("option",{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:510",value:"small",children:"à¸à¹à¸³"})]}):e.jsxs(e.Fragment,{children:[e.jsx("option",{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:510",value:"odd",children:"à¸à¸µà¹"}),e.jsx("option",{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:510",value:"even",children:"à¸à¸¹à¹"})]})})]})]}),e.jsx("div",{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:512",className:"grid grid-cols-2 gap-2 sm:grid-cols-3",children:[["startingBankroll","à¸à¸¸à¸à¹à¸£à¸´à¹à¸¡à¸à¹à¸"],["baseBet","à¹à¸à¸´à¸¡à¸à¸±à¸à¸à¸²à¸"],["maxBet","à¹à¸à¸´à¸¡à¸à¸±à¸à¸ªà¸¹à¸à¸ªà¸¸à¸"],["stopLoss","หยุà¸à¸à¸²à¸à¸à¸¸à¸"],["stopWin","หยุà¸à¸à¸³à¹à¸£"],["minimumStreak","สà¸à¸£à¸µà¸à¸à¸±à¹à¸à¸à¹à¸³"]].map(([p,j])=>e.jsxs("label",{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:514",className:"text-[10px] text-white/40",children:[j,e.jsx("input",{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:514",type:"number",min:1,value:s[p],onChange:k=>ae(p,k.target.value),className:"mt-1 h-9 w-full rounded-xl border border-white/10 bg-[#111621] px-2 text-xs font-bold text-white outline-none focus:border-amber-400/30"})]},p))}),r==="monte_carlo"&&e.jsxs("div",{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:515",className:"grid grid-cols-3 gap-2",children:[e.jsxs("label",{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:515",className:"text-[10px] text-white/40",children:["Seed",e.jsx("input",{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:515",value:d,onChange:p=>b(p.target.value),className:"mt-1 h-9 w-full rounded-xl border border-white/10 bg-[#111621] px-2 text-xs text-white"})]}),e.jsxs("label",{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:515",className:"text-[10px] text-white/40",children:["Trials",e.jsx("input",{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:515",type:"number",min:1,max:1e4,value:f,onChange:p=>n(Math.max(1,Number(p.target.value))),className:"mt-1 h-9 w-full rounded-xl border border-white/10 bg-[#111621] px-2 text-xs text-white"})]}),e.jsxs("label",{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:515",className:"text-[10px] text-white/40",children:["รà¸à¸/Trial",e.jsx("input",{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:515",type:"number",min:1,max:1e5,value:P,onChange:p=>g(Math.max(1,Number(p.target.value))),className:"mt-1 h-9 w-full rounded-xl border border-white/10 bg-[#111621] px-2 text-xs text-white"})]})]}),r==="monte_carlo"&&e.jsxs("p",{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:516",className:`text-[10px] ${_>1e6?"text-rose-300":"text-white/35"}`,children:["รวม ",_.toLocaleString()," à¸à¸² ⢠สูà¸à¸ªà¸¸à¸ 1,000,000"]}),e.jsxs(J,{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:517",type:"button",onClick:se,disabled:$||r==="history"&&a===0||r==="monte_carlo"&&(_>1e6||!d.trim()),className:"h-11 w-full bg-gradient-to-r from-amber-300 to-amber-500 font-black text-[#171207] hover:from-amber-200 hover:to-amber-400",children:[$?e.jsx(M,{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:517",className:"h-4 w-4 animate-spin"}):e.jsx(oe,{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:517",className:"h-4 w-4"})," ",r==="history"?"รัภBacktest":"รัภSimulation"]})]}),e.jsxs("div",{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:520",className:"space-y-4",children:[e.jsxs("div",{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:521",className:"rounded-3xl border border-white/8 bg-white/[0.025] p-4",children:[e.jsx("h2",{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:522",className:"font-bold text-white",children:"à¸à¸¥à¸¥à¸±à¸à¸à¹à¸¥à¹à¸²à¸ªà¸¸à¸"}),x?r==="history"?e.jsxs("div",{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:523",className:"mt-3 grid grid-cols-2 gap-2 sm:grid-cols-3",children:[N("à¸à¸³à¹à¸£/à¸à¸²à¸à¸à¸¸à¸à¸ªà¸¸à¸à¸à¸´",`${x.netProfit.toFixed(0)}`,x.netProfit>=0?"text-emerald-300":"text-rose-300"),N("ROI",`${(x.roi*100).toFixed(2)}%`),N("Max Drawdown",x.maxDrawdown.toFixed(0),"text-rose-300"),N("à¹à¸à¸´à¸¡à¸à¸±à¸à¸ªà¸¹à¸à¸ªà¸¸à¸",x.maxBetUsed.toFixed(0)),N("à¹à¸à¹à¸à¸´à¸à¸ªà¸¹à¸à¸ªà¸¸à¸",`${x.longestLossStreak} à¸à¸²`),N("Risk Score",`${x.riskScore}/100`,x.riskScore>=60?"text-rose-300":"text-amber-300")]}):e.jsxs("div",{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:523",className:"mt-3 grid grid-cols-2 gap-2 sm:grid-cols-3",children:[N("à¸à¸³à¹à¸£à¹à¸à¸¥à¸µà¹à¸¢",x.averageNetProfit.toFixed(0),x.averageNetProfit>=0?"text-emerald-300":"text-rose-300"),N("ROI à¹à¸à¸¥à¸µà¹à¸¢",`${(x.averageRoi*100).toFixed(2)}%`),N("Bust Rate",`${(x.bustRate*100).toFixed(2)}%`,"text-rose-300"),N("Worst Drawdown",x.worstDrawdown.toFixed(0),"text-rose-300"),N("หยุà¸à¸à¸³à¹à¸£",`${(x.stopWinRate*100).toFixed(1)}%`),N("Risk Score",x.averageRiskScore.toFixed(1),x.averageRiskScore>=60?"text-rose-300":"text-amber-300")]}):e.jsx("div",{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:523",className:"grid min-h-56 place-items-center text-center",children:e.jsxs("div",{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:523",children:[e.jsx(oe,{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:523",className:"mx-auto h-10 w-10 text-amber-300/20"}),e.jsx("p",{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:523",className:"mt-3 text-xs text-white/30",children:"à¸à¸±à¹à¸à¸à¹à¸²à¹à¸¥à¹à¸§à¸£à¸±à¸à¹à¸à¸·à¹à¸à¸à¸¹à¸à¸¥à¸¥à¸±à¸à¸à¹à¹à¸¥à¸°à¸à¸§à¸²à¸¡à¹à¸ªà¸µà¹à¸¢à¸"})]})}),x&&e.jsx("p",{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:524",className:"mt-3 rounded-xl bg-white/[0.025] p-2 text-[9px] leading-relaxed text-white/30",children:"à¸à¸¥à¸¥à¸±à¸à¸à¹à¹à¸à¹à¸à¸à¸²à¸£ replay/simulation ภายà¹à¸à¹à¸à¹à¸²à¸à¸µà¹à¸à¸³à¸«à¸à¸ à¹à¸¡à¹à¸ªà¸²à¸¡à¸²à¸£à¸à¹à¸à¹à¸à¸²à¸à¸à¸²à¸£à¸à¹à¸à¸¥à¸à¸£à¸´à¸ à¹à¸¥à¸°à¸à¸¥à¸¢à¹à¸à¸à¸«à¸¥à¸±à¸à¹à¸¡à¹à¸£à¸±à¸à¸à¸£à¸°à¸à¸±à¸à¸à¸¥à¹à¸à¸à¸à¸²à¸à¸"})]}),e.jsxs("div",{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:526",className:"rounded-3xl border border-white/8 bg-white/[0.025] p-4",children:[e.jsxs("div",{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:526",className:"flex items-center justify-between",children:[e.jsx("h2",{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:526",className:"font-bold text-white",children:"Saved Comparisons"}),e.jsxs("span",{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:526",className:"text-[10px] text-white/30",children:[y.data?.length??0," รายà¸à¸²à¸£"]})]}),e.jsx("div",{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:526",className:"mt-3 max-h-72 space-y-2 overflow-y-auto",children:y.data?.length?y.data.map(p=>{const j=p.metrics,k=Number(j.netProfit??j.averageNetProfit??0);return e.jsxs("div",{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:526",className:"grid grid-cols-[1fr_auto] gap-2 rounded-xl border border-white/6 bg-black/15 p-2.5",children:[e.jsxs("div",{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:526",className:"min-w-0",children:[e.jsx("p",{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:526",className:"truncate text-xs font-bold text-white",children:Pe[p.strategyId]??String(p.strategyId)}),e.jsxs("p",{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:526",className:"mt-0.5 text-[9px] text-white/30",children:[p.source==="history"?"History":`Monte Carlo ⢠${String(p.seed??"-")}
12`," ⢠",p.simulationRounds.toLocaleString()," à¸à¸²"]})]}),e.jsxs("div",{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:526",className:"text-right",children:[e.jsx("p",{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:526",className:`text-xs font-black ${k>=0?"text-emerald-300":"text-rose-300"}`,children:k.toFixed(0)}),e.jsx("p",{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:526",className:"text-[8px] text-white/25",children:new Date(p.createdAt).toLocaleDateString("th-TH")})]})]},p.id)}):e.jsx("p",{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:526",className:"py-8 text-center text-xs text-white/25",children:"ยัà¸à¹à¸¡à¹à¸¡à¸µà¸à¸¥à¸à¸µà¹à¸à¸±à¸à¸à¸¶à¸"})})]})]})]})]})}function ka(){const{user:t}=at(),[,a]=st(),c=v.useUtils(),r=m.useRef(null),l=m.useRef(null),s=m.useRef(null),[i,d]=m.useState(null),[b,f]=m.useState("input"),[n,P]=m.useState([1,1,1]),[g,x]=m.useState(0),[h,y]=m.useState(100),u=v.sicbo.sessions.list.useQuery(void 0,{enabled:!!t}),D=v.credits.balance.useQuery(void 0,{enabled:!!t}),$=v.featureFlags.isEnabled.useQuery({flag:"sicboEnabled"},{enabled:!!t}),_=v.sicbo.rounds.list.useQuery({sessionId:i??1,limit:100,offset:0},{enabled:!!i}),ae=v.sicbo.statistics.useQuery({sessionId:i??1},{enabled:!!i}),se=v.sicbo.analysis.useQuery({sessionId:i??1},{enabled:!!i}),N=v.sicbo.historicalLean.useQuery({sessionId:i??1},{enabled:!!i}),p=v.sicbo.paytables.evReport.useQuery(void 0,{enabled:b==="stats"}),j=v.sicbo.rounds.exportCsv.useQuery({sessionId:i??1},{enabled:!1});m.useEffect(()=>{i||!u.data?.length||d(u.data.find(o=>o.status==="active")?.id??u.data[0].id)},[i,u.data]);const k=m.useMemo(()=>u.data?.find(o=>o.id===i)??null,[u.data,i]),H=(k?.totalRounds??0)+1,G=H>ne?Me:0,ye=Number(D.data?.balance??0),Y=G===0||!!D.data&&ye>=G,S=Yt(),q=async()=>{await Promise.all([c.sicbo.sessions.list.invalidate(),i?c.sicbo.rounds.list.invalidate():Promise.resolve(),i?c.sicbo.statistics.invalidate():Promise.resolve(),i?c.sicbo.analysis.invalidate():Promise.resolve(),i?c.sicbo.historicalLean.invalidate():Promise.resolve(),c.credits.balance.invalidate(),c.credits.history.invalidate(),c.credits.usageLogs.invalidate()])},ce=v.sicbo.sessions.create.useMutation({onSuccess:async({id:o})=>{d(o),x(0),await c.sicbo.sessions.list.invalidate(),A.success("สรà¹à¸²à¸à¹à¸à¸ªà¸à¸±à¸ SIC BO à¹à¸¥à¹à¸§")},onError:o=>A.error(o.message)}),z=v.sicbo.rounds.add.useMutation({onSuccess:async o=>{try{l.current=null,await q(),x(0),A.success(o.pointsCharged>0?`à¸à¸±à¸à¸à¸¶à¸à¸à¸² #${o.roundOrder} ⢠หัภ${o.pointsCharged} Point ⢠à¸à¸à¹à¸«à¸¥à¸·à¸ ${o.newBalance}`:`à¸à¸±à¸à¸à¸¶à¸à¸à¸² #${o.roundOrder} ⢠à¸à¹à¸§à¸à¸à¸£à¸µ 20 à¸à¸²à¹à¸£à¸`)}finally{S.release()}},onError:o=>{S.release(),A.error(o.message)}}),Ke=v.sicbo.rounds.undo.useMutation({onSuccess:async({removed:o})=>{await q(),A.success(o?"ยà¸à¹à¸¥à¸´à¸à¸à¸²à¸¥à¹à¸²à¸ªà¸¸à¸à¹à¸¥à¹à¸§":"ยัà¸à¹à¸¡à¹à¸¡à¸µà¸à¸¥à¹à¸«à¹à¸¢à¸à¹à¸¥à¸´à¸")},onError:o=>A.error(o.message)}),We=v.sicbo.rounds.clear.useMutation({onSuccess:async()=>{await q(),A.success("ลà¹à¸²à¸à¸à¸¥à¹à¸à¹à¸à¸ªà¸à¸±à¸à¹à¸¥à¹à¸§")},onError:o=>A.error(o.message)}),Xe=v.sicbo.rounds.importCsv.useMutation({onSuccess:async({imported:o,pointsCharged:w,newBalance:C})=>{s.current=null,await q(),A.success(w>0?`à¸à¸³à¹à¸à¹à¸² ${o} à¸à¸² ⢠หัภ${w} Point ⢠à¸à¸à¹à¸«à¸¥à¸·à¸ ${C}`:`à¸à¸³à¹à¸à¹à¸² ${o} à¸à¸²à¸ªà¸³à¹à¸£à¹à¸ ⢠ยัà¸à¸à¸¢à¸¹à¹à¹à¸à¸à¹à¸§à¸à¸à¸£à¸µ`)},onError:o=>A.error(o.message)}),B=ae.data;m.useMemo(()=>[..._.data??[]].reverse(),[_.data]);const fe=m.useCallback((o,w)=>{P(C=>C.map((I,et)=>et===o?w:I))},[]),Se=m.useCallback(()=>{if(!i||z.isPending||S.isLocked)return;if(!Y){A.error(`Point à¹à¸¡à¹à¹à¸à¸µà¸¢à¸à¸à¸ à¸à¹à¸à¸à¸¡à¸µà¸à¸¢à¹à¸²à¸à¸à¹à¸à¸¢ ${G} Point à¸à¸¶à¸à¸à¸°à¸à¸±à¸à¸à¸¶à¸à¸à¸² #${H} à¹à¸à¹`);return}const o=[...n],w=i,C=`${w}:${o.join(",")}`;l.current?.signature!==C&&(l.current={signature:C,key:crypto.randomUUID()});const I=l.current.key;Ve(),S.start(()=>{z.mutate({sessionId:w,dice1:o[0],dice2:o[1],dice3:o[2],operationKey:I})})},[i,z,Y,n,G,H,S]);Ot({enabled:b==="input"&&!!i&&k?.status==="active"&&!z.isPending&&!S.isLocked,canSave:Y,activeIndex:g,onActiveIndexChange:x,onValueChange:fe,onSave:()=>{Se()}});const Ze=async o=>{if(!o||!i)return;if(o.size>1e6)return A.error("à¹à¸à¸¥à¹à¸à¹à¸à¸à¹à¸¡à¹à¹à¸à¸´à¸ 1MB");const w=await o.text(),C=`${i}:${w}`;s.current?.signature!==C&&(s.current={signature:C,key:crypto.randomUUID()}),Xe.mutate({sessionId:i,csv:w,operationKey:s.current.key})},Je=async()=>
12{if(!i)return;const o=await j.refetch();if(!o.data)return A.error("à¹à¸¡à¹à¸ªà¸²à¸¡à¸²à¸£à¸à¸ªà¹à¸à¸à¸à¸ CSV à¹à¸à¹");const w=new Blob([`\uFEFF${o.data}`],{type:"text/csv;charset=utf-8"}),C=URL.createObjectURL(w),I=document.createElement("a");I.href=C,I.download=`sicbo-session-${i}.csv`,I.click(),URL.revokeObjectURL(C)};return t?$.isLoading?e.jsx("div",{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:710",className:"grid min-h-[60vh] place-items-center",children:e.jsx(M,{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:710",className:"h-7 w-7 animate-spin text-amber-300","aria-label":"à¸à¸³à¸¥à¸±à¸à¸à¸£à¸§à¸à¸ªà¸à¸à¸ªà¸´à¸à¸à¸´à¹ SIC BO"})}):$.data&&!$.data.enabled?e.jsx("div",{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:713",className:"grid min-h-[60vh] place-items-center px-6 text-center",children:e.jsxs("div",{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:713",children:[e.jsx(Z,{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:713",className:"mx-auto h-12 w-12 text-amber-300/25"}),e.jsx("h1",{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:713",className:"mt-4 text-lg font-black text-white",children:"SIC BO ANALYZER ยัà¸à¹à¸¡à¹à¹à¸à¸´à¸à¹à¸à¹à¸à¸²à¸"}),e.jsx("p",{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:713",className:"mt-1 text-xs text-white/40",children:"à¸à¸¹à¹à¸à¸¹à¹à¸¥à¸à¸³à¸¥à¸±à¸à¸à¸£à¸§à¸à¸ªà¸à¸à¸£à¸°à¸à¸à¸à¸±à¹à¸à¸ªà¸¸à¸à¸à¹à¸²à¸¢ à¸à¸£à¸¸à¸à¸²à¸à¸¥à¸±à¸à¸¡à¸²à¹à¸«à¸¡à¹à¸ ายหลัà¸"}),e.jsx(J,{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:713",type:"button",onClick:()=>a("/game-selection"),variant:"outline",className:"mt-4 border-white/10 text-white",children:"à¸à¸¥à¸±à¸à¸«à¸à¹à¸²à¹à¸¥à¸·à¸à¸à¹à¸à¸¡"})]})}):e.jsxs("main",{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:717",className:"mx-auto flex w-full max-w-6xl flex-col gap-4 px-3 pb-28 pt-2 sm:px-5",children:[e.jsxs("section",{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:718",className:"flex items-center gap-2 rounded-2xl border border-amber-400/15 bg-[linear-gradient(135deg,rgba(18,23,36,.96),rgba(8,10,17,.96))] p-2 shadow-lg shadow-black/20","aria-label":"à¸à¸±à¸§à¸à¸§à¸à¸à¸¸à¸¡à¹à¸à¸ªà¸à¸±à¸ SIC BO",children:[e.jsx("button",{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:719",type:"button",onClick:()=>a("/game-selection"),disabled:S.isLocked||z.isPending,className:"grid h-10 w-10 shrink-0 place-items-center rounded-xl border border-white/8 bg-white/[0.03] text-white/50 transition-colors hover:bg-white/[0.07] hover:text-white disabled:cursor-wait disabled:opacity-40","aria-label":"à¸à¸¥à¸±à¸à¸«à¸à¹à¸²à¹à¸¥à¸·à¸à¸à¸ªà¸¹à¸à¸£",children:e.jsx(jt,{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:719",className:"h-4 w-4"})}),e.jsxs("div",{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:720",className:"relative min-w-0 flex-1",children:[e.jsx("label",{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:721",htmlFor:"sicbo-session",className:"sr-only",children:"à¹à¸¥à¸·à¸à¸à¹à¸à¸ªà¸à¸±à¸à¸à¹à¸à¸¡à¸¹à¸¥"}),e.jsxs("select",{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:722",id:"sicbo-session",disabled:S.isLocked||z.isPending,value:i??"",onChange:o=>{d(Number(o.target.value)),x(0)},className:"h-10 w-full appearance-none rounded-xl border border-white/10 bg-[#111621] px-3 pr-9 text-xs font-bold text-white outline-none focus:border-amber-400/50 focus:ring-2 focus:ring-amber-400/10 disabled:cursor-wait disabled:opacity-50 sm:text-sm",children:[e.jsx("option",{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:729",value:"",children:"à¹à¸¥à¸·à¸à¸à¹à¸à¸ªà¸à¸±à¸"}),u.data?.map(o=>e.jsxs("option",{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:730",value:o.id,children:[o.name," ⢠",o.totalRounds," à¸à¸²"]},o.id))]}),e.jsx(ct,{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:732",className:"pointer-events-none absolute right-3 top-3 h-4 w-4 text-white/35"})]}),e.jsxs(J,{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:734",type:"button",onClick:()=>ce.mutate({mode:"analysis"}),disabled:ce.isPending||S.isLocked||z.isPending,"aria-label":"สรà¹à¸²à¸à¹à¸à¸ªà¸à¸±à¸à¹à¸«à¸¡à¹",className:"h-10 shrink-0 bg-amber-400 px-3 text-[#171207] hover:bg-amber-300 sm:px-4",children:[ce.isPending?e.jsx(M,{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:735",className:"h-4 w-4 animate-spin"}):e.jsx(vt,{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:735",className:"h-4 w-4"}),e.jsx("span",{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:735",className:"hidden text-xs font-black sm:inline",children:"à¹à¸«à¸¡à¹"})]})]}),e.jsx("nav",{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:739",className:"grid grid-cols-4 gap-1 rounded-2xl border border-white/8 bg-[#10131c] p-1","aria-label":"à¹à¸¡à¸à¸¹ SIC BO",children:va.map(o=>{const w=o.icon;return e.jsxs("button",{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:743",type:"button",onClick:()=>f(o.id),disabled:S.isLocked||z.isPending,className:`flex min-w-0 items-center justify-center gap-1 rounded-xl px-1 py-2.5 text-[10px] font-bold transition-colors disabled:cursor-wait disabled:opacity-50 sm:text-xs ${b===o.id?"bg-amber-400/15 text-amber-300 ring-1 ring-amber-400/20":"text-white/40 hover:bg-white/4 hover:text-white/70"}`,children:[e.jsx(w,{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:744",className:"h-3.5 w-3.5 shrink-0"}),e.jsx("span",{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:744",className:"truncate",children:o.label})]},o.id)})}),i?e.jsxs(e.Fragment,{children:[b==="input"&&e.jsxs("section",{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:757",className:"space-y-4",children:[e.jsx(Qe,{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:758",data:N.data,loading:N.isLoading,refreshing:N.isFetching}),e.jsxs("div",{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:759",className:"grid gap-4 lg:grid-cols-[1.05fr_.95fr]",children:[e.jsxs("div",{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:760",className:"rounded-3xl border border-amber-400/15 bg-gradient-to-br from-[#171b27] to-[#0d1018] p-4 sm:p-5",children:[e.jsxs("div",{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:761",className:"mb-4 flex items-center justify-between gap-3",children:[e.jsxs("div",{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:762",children:[e.jsx("h2",{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:762",className:"font-black text-white",children:"à¸à¸¥à¸¥à¸¹à¸à¹à¸à¹à¸² 3 ลูà¸"}),e.jsx("p",{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:762",className:"text-[10px] text-white/40",children:"à¹à¸¥à¸·à¸à¸à¹à¸à¹à¸¥à¸°à¸¥à¸¹à¸à¹à¸¥à¹à¸§à¸à¸±à¸à¸à¸¶à¸ ระà¸à¸à¸à¸³à¸à¸§à¸à¸«à¸¡à¸§à¸à¸«à¸¡à¸¹à¹à¸à¸±à¹à¸à¹à¸à¸´à¸£à¹à¸à¹à¸§à¸à¸£à¹"})]}),e.jsxs("span",{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:763",className:"rounded-full bg-white/5 px-2 py-1 text-[10px] text-white/45",children:[k?.totalRounds??0," à¸à¸²"]})]}),e.jsx(Ge,{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:765",values:n,activeIndex:g,onActiveIndexChange:x,onValueChange:fe,disabled:S.isLocked||z.isPending,rolling:S.isRolling,rollDelays:S.delays,rollSequence:S.sequence}),e.jsx("div",{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:766",className:"mt-3",children:e.jsx(Ye,{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:766",nextRoundOrder:H,balance:ye,loading:D.isLoading,failed:D.isError})}),e.jsxs(J,{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:767",type:"button",onClick:Se,disabled:S.isLocked||z.isPending||k?.status!=="active"||!Y,"aria-busy":S.isRolling||z.isPending,className:"mt-3 h-12 w-full bg-gradient-to-r from-amber-300 to-amber-500 text-base font-black text-[#171207] shadow-lg shadow-amber-500/10 hover:from-amber-200 hover:to-amber-400 active:scale-[0.98]",children:[z.isPending?e.jsx(M,{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:768",className:"h-4 w-4 animate-spin"}):e.jsx(Z,{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:768",className:"h-5 w-5"}
12)," ",S.isRolling?`à¸à¸³à¸¥à¸±à¸à¸à¸à¸¢ ${n.join(" ⢠")}`:z.isPending?"à¸à¸³à¸¥à¸±à¸à¸à¸±à¸à¸à¸¶à¸à¸à¸¥":`à¸à¸à¸¢à¹à¸¥à¸°à¸à¸±à¸à¸à¸¶à¸ ${n.join(" ⢠")}`]}),e.jsxs("div",{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:770",className:"mt-3 grid grid-cols-2 gap-2 sm:grid-cols-4",children:[e.jsxs("button",{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:771",type:"button",disabled:S.isLocked||z.isPending,onClick:()=>Ke.mutate({sessionId:i}),className:"flex h-9 items-center justify-center gap-1 rounded-xl border border-white/8 bg-white/[0.03] text-[11px] text-white/60 hover:bg-white/[0.06] disabled:cursor-wait disabled:opacity-45",children:[e.jsx(Ee,{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:771",className:"h-3.5 w-3.5"})," ยà¸à¹à¸¥à¸´à¸à¸¥à¹à¸²à¸ªà¸¸à¸"]}),e.jsxs("button",{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:772",type:"button",disabled:S.isLocked||z.isPending,onClick:()=>r.current?.click(),className:"flex h-9 items-center justify-center gap-1 rounded-xl border border-white/8 bg-white/[0.03] text-[11px] text-white/60 hover:bg-white/[0.06] disabled:cursor-wait disabled:opacity-45",children:[e.jsx(_t,{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:772",className:"h-3.5 w-3.5"})," à¸à¸³à¹à¸à¹à¸² CSV"]}),e.jsxs("button",{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:773",type:"button",disabled:S.isLocked||z.isPending,onClick:Je,className:"flex h-9 items-center justify-center gap-1 rounded-xl border border-white/8 bg-white/[0.03] text-[11px] text-white/60 hover:bg-white/[0.06] disabled:cursor-wait disabled:opacity-45",children:[e.jsx(zt,{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:773",className:"h-3.5 w-3.5"})," สà¹à¸à¸à¸à¸"]}),e.jsxs("button",{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:774",type:"button",disabled:S.isLocked||z.isPending,onClick:()=>window.confirm("ลà¹à¸²à¸à¸à¸¥à¸à¸±à¹à¸à¸«à¸¡à¸à¹à¸à¹à¸à¸ªà¸à¸±à¸à¸à¸µà¹?")&&We.mutate({sessionId:i,confirm:"CLEAR"}),className:"flex h-9 items-center justify-center gap-1 rounded-xl border border-rose-400/10 bg-rose-400/5 text-[11px] text-rose-300/70 hover:bg-rose-400/10 disabled:cursor-wait disabled:opacity-45",children:[e.jsx(At,{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:774",className:"h-3.5 w-3.5"})," ลà¹à¸²à¸à¸à¹à¸à¸¡à¸¹à¸¥"]}),e.jsx("input",{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:775",ref:r,type:"file",accept:".csv,text/csv",disabled:S.isLocked||z.isPending,className:"hidden",onChange:o=>{Ze(o.target.files?.[0]),o.currentTarget.value=""}})]})]}),e.jsxs("div",{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:778",className:"rounded-3xl border border-white/8 bg-white/[0.02] p-4",children:[e.jsxs("div",{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:779",className:"mb-3 flex items-center gap-2",children:[e.jsx($e,{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:779",className:"h-4 w-4 text-amber-300"}),e.jsx("h2",{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:779",className:"font-bold text-white",children:"à¸à¸£à¸°à¸§à¸±à¸à¸´à¸¥à¹à¸²à¸ªà¸¸à¸"})]}),_.data?.length?e.jsx("div",{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:780",className:"max-h-[420px] space-y-2 overflow-y-auto pr-1",children:_.data.map(o=>e.jsxs("div",{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:780",className:"flex items-center gap-3 rounded-xl border border-white/6 bg-black/15 p-2.5",children:[e.jsxs("span",{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:780",className:"w-8 text-center text-[10px] font-bold text-white/30",children:["#",o.roundOrder]}),e.jsx("div",{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:780",className:"flex gap-1",children:[o.dice1,o.dice2,o.dice3].map((w,C)=>e.jsx("span",{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:780",className:"grid h-8 w-8 place-items-center rounded-lg bg-white/8 text-sm font-black text-white",children:w},C))}),e.jsxs("div",{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:780",className:"min-w-0 flex-1",children:[e.jsxs("p",{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:780",className:"text-xs font-bold text-white",children:["รวม ",o.total]}),e.jsxs("p",{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:780",className:"truncate text-[10px] text-white/40",children:[Ue(o.bigSmall)," ⢠",He(o.oddEven),o.isExactlyOnePair?" ⢠à¸à¸¹à¹":""]})]})]},o.id))}):e.jsx("div",{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:780",className:"grid min-h-56 place-items-center text-xs text-white/30",children:"ยัà¸à¹à¸¡à¹à¸¡à¸µà¸à¸¥à¸¥à¸¹à¸à¹à¸à¹à¸²"})]})]})]}),b==="stats"&&e.jsxs("section",{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:787",className:"space-y-4",children:[e.jsxs("div",{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:788",className:"grid grid-cols-2 gap-2 sm:grid-cols-4",children:[e.jsx(X,{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:788",label:"à¸à¸³à¸à¸§à¸à¸à¸²",value:B?.sampleSize??0,note:`Data Confidence: ${B?.dataConfidence??"none"}`}),e.jsx(X,{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:788",label:"สูภ/ à¸à¹à¸³",value:`${B?.bigSmall.big??0} / ${B?.bigSmall.small??0}`,note:`à¸à¸à¸ ${B?.bigSmall.triple??0}`,tone:"sky"}),e.jsx(X,{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:788",label:"à¸à¸µà¹ / à¸à¸¹à¹",value:`${B?.oddEven.odd??0} / ${B?.oddEven.even??0}`,note:`à¸à¸à¸ ${B?.oddEven.triple??0}`,tone:"emerald"}),e.jsx(X,{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:788",label:"à¸à¸¹à¹ / à¸à¸à¸",value:`${B?.exactlyOnePair??0} / ${B?.triples??0}`,note:"à¹à¸¢à¸à¸à¸§à¸²à¸¡à¸«à¸¡à¸²à¸¢à¸à¸±à¸à¹à¸à¸",tone:"violet"})]}),e.jsx(qe,{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:789",data:p.data,loading:p.isLoading,error:p.error?.message}),e.jsxs("div",{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:790",className:"grid gap-4 lg:grid-cols-2",children:[e.jsx(ge,{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:790",title:"Big / Small Road",values:B?.recentBigSmall??[],market:"bigSmall",limit:h}),e.jsx(ge,{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:790",title:"Odd / Even Road",values:B?.recentOddEven??[],market:"oddEven",limit:h})]}),e.jsx("div",{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:791",className:"flex justify-end gap-1",children:[100,200,300].map(o=>e.jsxs("button",{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:791",type:"button",onClick:()=>y(o),className:`rounded-lg px-2 py-1 text-[10px] ${h===o?"bg-amber-400/15 text-amber-300":"bg-white/5 text-white/35"}`,children:[o," à¸à¸²"]},o))}),e.jsxs("div",{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:792",className:"grid gap-4 lg:grid-cols-2",children:[e.jsxs("section",{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:793",className:"rounded-2xl border border-white/8 bg-white/[0.025] p-3",children:[e.jsx("h3",{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:793",className:"mb-3 text-sm font-bold text-white",children:"สัà¸à¸ªà¹à¸§à¸à¸à¸¥à¸«à¸¥à¸±à¸"}),B?e.jsx("div",{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:793",className:"space-y-3",children:[["สูà¸",B.bigSmall.big,"bg-rose-500"],["à¸à¹à¸³",B.bigSmall.small,"bg-sky-500"],["à¸à¸µà¹",B.oddEven.odd,"bg-violet-500"],["à¸à¸¹à¹",B.oddEven.even,"bg-emerald-500"]].map(([o,w,C])=>e.jsxs("div",{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:793",children:[e.jsxs("div",{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:793",className:"mb-1 flex justify-between text-[11px]",children:[e.jsx("span",{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:793",className:"text-white/60",children:o}),e.jsxs("span",{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:793",className:"font-bold text-white",children:[w," ⢠",Ce(Number(w),B.sampleSize)]})]}),e.jsx("div",{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:793",className:"h-1.5 overflow-hidden rounded-full bg-white/5",children:e.jsx("div",{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:793",className:`h-full rounded-full ${C}`,style:{width:Ce(Number(w),B.sampleSize)}})})]},String(o)))}):null]}),e.jsxs("section",{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:794",className:"rounded-2xl border border-white/8 bg-white/[0.025] p-3",children:[e.jsx("h3",{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:794",className:"mb-3 text-sm font-bold text-white",children:"à¸à¸¥à¸£à¸§à¸¡ 3â18"}),e.jsx("div",{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:794",className:"grid grid-cols-4 gap-1.5",children:Array.from({length:16},(o,w)=>w+3).map(o=>e.jsxs("div",{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:794",className:"rounded-xl bg-white/[0.035] p-2 text-center",children:[e.jsx("p",{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:794",className:"text-[10px] text-white/35",children:o}),e.jsx("p",{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:794",className:"text-sm font-black text-white",children:B?.totals[o]??0})]},o))})]})]})]}),b==="patterns"&&e.jsx(Aa,{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:799",analysis:se.data}),b==="lab"&&e.jsx(Na,{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:801",activeSessionId:i,historyRounds:k?.totalRounds??0})]}):e.jsx("section",{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:751",className:"grid min-h-72 place-items-center rounded-3xl border border-dashed border-white/10 bg-white/[0.015] px-6 text-center",children:e.jsxs("div",{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:752",children:[e.jsx(Z,{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:752",className:"mx-auto h-12 w-12 text-amber-300/30"}),e.jsx("h2",{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:752",className:"mt-4 font-bold text-white",children:"à¹à¸£à¸´à¹à¸¡à¸à¸²à¸à¸ªà¸£à¹à¸²à¸à¹à¸à¸ªà¸à¸±à¸à¸à¹à¸à¸¡à¸¹à¸¥"}),e.jsx("p",{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:752",className:"mt-1 text-xs text-white/40",children:"à¹à¸à¹à¸¥à¸°à¸à¸±à¸à¸à¸µà¹à¸«à¹à¸à¹à¸à¸à¸²à¸°à¸à¸£à¸°à¸§à¸±à¸à¸´à¸à¸à¸à¸à¸à¹à¸à¸"})]})}),e.jsx("aside",{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:805",className:"rounded-2xl border border-amber-400/15 bg-amber-400/5 p-3 text-[11px] leading-relaxed text-amber-100/65",children:e.jsxs("div",{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:806",className:"flex gap-2",children:[e.jsx(Re,{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:806",className:"mt-0.5 h-4 w-4 shrink-0 text-amber-300"}),e.jsxs("p",{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:806",children:[e.jsx("strong",{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:806",className:"text-amber-200",children:"à¸à¸³à¹à¸à¸·à¸à¸:"})," à¸à¸¥à¸¥à¸¹à¸à¹à¸à¹à¸²à¹à¸à¹à¸¥à¸°à¸à¸²à¹à¸à¹à¸à¸à¸´à¸ªà¸£à¸° สà¸à¸´à¸à¸´à¸¢à¹à¸à¸à¸«à¸¥à¸±à¸à¹à¸¥à¸°à¸£à¸¹à¸à¹à¸à¸à¸à¸µà¹à¸à¸à¹à¸¡à¹à¸£à¸±à¸à¸à¸£à¸°à¸à¸±à¸à¸à¸¥à¹à¸à¸à¸à¸²à¸à¸ à¸à¸£à¸¸à¸à¸²à¸à¸±à¹à¸à¸à¸ à¹à¸§à¸¥à¸² à¹à¸¥à¸°à¸à¸¸à¸à¸«à¸¢à¸¸à¸à¸à¹à¸à¸à¹à¸à¹à¸à¸²à¸"]})]})})]}):e.jsx("div",{"data-loc":"client/src/pages/SicBoAnalyzerPage.tsx:707",className:"grid min-h-[60vh] place-items-center px-6 text-center text-sm text-white/50",children:"à¸à¸£à¸¸à¸à¸²à¹à¸à¹à¸²à¸ªà¸¹à¹à¸£à¸°à¸à¸à¹à¸à¸·à¹à¸à¹à¸à¹ SIC BO ANALYZER"})}const Wa=Object.freeze(Object.defineProperty({__proto__:null,FastDiceRecorder:Ge,HistoricalLeanPanel:Qe,SicBoPointChargeNotice:Ye,SicBoProbabilityEvSummary:qe,SicBoRoad:ge,default:ka},Symbol.toStringTag,{value:"Module"}));
12export{qa as S,Oe as a,Le as b,Ka as c,me as d,ue as e,be as f,Qa as g,he as h,Wa as i};
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.