1import{w as r,a0 as P,T as R,cc as V,aV as A,j as s,I as p}from"./client-Bai4VJA1.js";import{I as o}from"./FeaturedSgmWidgetHeader-Bs5pMGp9.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};e.SENTRY_RELEASE={id:"97808a5afbf047a0a6f7534b79e8c9b165448d38"};var a=new e.Error().stack;a&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[a]="7c4fb159-2867-41f4-b686-76630f62a21a",e._sentryDebugIdIdentifier="sentry-dbid-7c4fb159-2867-41f4-b686-76630f62a21a")}catch{}})();function $(e,a){const[n,u]=r.useState(e);return r.useEffect(()=>{const d=setTimeout(()=>u(e),a);return()=>clearTimeout(d)},[e,a]),n}const U=({theme:e="default",size:a="small",label:n,title:u,price:d,keyword:g,leftIcon:v,rightIcon:w,middleIcon:y,fav:j=!1,stroke:c=!1,type:h="button",showTick:N,disabled:_,className:E="",favClassName:F,...T})=>{const D=P(),I=R()?.locale??"en-AU",f=j&&!V(I,"hideFavBadge"),b=r.useRef(d),[t,S]=r.useState(),{processingAndPendingBets:B}=A();r.useEffect(()=>{if(d!==void 0&&b.current!=null){const m=b.current,x=d;!isNaN(+m.display_price)&&!isNaN(+x.display_price)&&m.display_price!==x.display_price&&S(x.display_price>m.display_price?"up":"down"),b.current=d}},[d]);const l=$(t,2e3)!==t,i=_||B.length>0;return s.jsxs("button",{className:p("relative z-10 flex flex-row items-center rounded text-sm font-bold transition-all ease-in-out",{"text-text-button-odds-default bg-bg-button-odds-default":!i&&e==="default"&&!c,"text-text-button-odds-active bg-bg-button-odds-active":!i&&e==="active"&&!c,"text-text-button-odds-disabled bg-bg-button-odds-disabled":i,"h-[2rem] min-w-[2.5rem]":a==="extraSmall","h-[2rem] min-w-[3.5rem]":a==="small","h-[2.5rem] min-w-[3.5rem]":a==="medium","h-[2.5rem] min-w-[4rem]":a==="extraMedium","h-[3rem] w-[4rem]":a==="moderate","h-[2.5rem] w-full flex-1":a==="w-full","h-[3rem] min-w-[7.5rem]":a==="large","border-bg-button-odds-favourite bg-button-odds-favourite rounded-b-none border":f,"border-border-primary bg-core-primary border":c,[`border-bg-flucs-${t}-${e==="active"?"active":"default"} border`]:l},E),type:h,disabled:i,...T,children:[v?s.jsx(o,{name:v}):null,e==="active"&&N?s.jsx("div",{className:"flex flex-1 justify-center",children:s.jsx(o,{name:"tick-line",size:"md",className:"text-text-button-odds-active"})}):s.jsxs("div",{className:"flex flex-1 flex-col items-center justify-center",children:[n?s.jsx("span",{className:"text-xxs font-medium leading-4",children:n}):null,u?s.jsx("span",{children:u}):null,d||g?s.jsx("span",{children:d&&!isNaN(+d.display_price)?D.odds(d.display_price,d?.fractional_price):g}):null]}),w?s.jsx(o,{name:w}):null,f?s.jsx("div",{className:p("text-text-inverse bg-bg-button-odds-favourite border-bg-button-odds-favourite absolute left-0 right-0 top-full -mx-px flex justify-center rounded-b border p-1",{"border-bg-flucs-up-default":l&&t==="up","border-bg-flucs-up-active":e==="active"&&l&&t==="up","border-bg-flucs-down-default":l&&t==="down","border-bg-flucs-down-active":e==="active"&&l&&t==="down","-translate-y-1.5":!n,"-translate-y-0.5":n},F),children:s.jsx(o,{name:"fav",size:"raw",className:"w-4"})}):null,t&&l?s.jsx("div",{className:p("absolute",{"text-bg-flucs-up-active":l&&t==="up"&&e==="active","text-bg-flucs-up-default":l&&t==="up"&&e==="default","right-0 top-0":l&&t==="up","text-bg-flucs-down-active":l&&t==="down"&&e==="active","text-bg-flucs-down-default":l&&t==="down"&&e==="default","left-0":l&&t==="down",[`${f?"-bottom-[0.6rem]":"bottom-0"}`]:l&&t==="down"}),children:t==="up"?s.jsx(o,{name:"fluc-angle-up",size:"xs"}):s.jsx(o,{name:"fluc-angle-down",size:"xs"})}):null,y?s.jsx("div",{className:"absolute bottom-0 left-0 right-0 top-0 flex items-center justify-center rounded-[inherit]",children:s.jsx(o,{name:y})}):null]})};export{U as O};
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.