1import{A as s,l as c,M as G,r as o,o as A}from"./index.cb24fa47.1790666596239.js";import{S as T}from"./index.56f81e6f.1790666596239.js";import{r as k}from"./agentation.3e8ef65e.1790666596239.js";import{g as B}from"./luckyWheelModules.98beb515.1790666596239.js";import{a as H}from"./general-hook.cc6630c8.1790666596239.js";import{a as q}from"./game-hook.4c9c3278.1790666596239.js";import O from"./Picture.b08308fd.1790666596239.js";import{u as U}from"./ms-hook.135c78a0.1790666596239.js";import{u as V}from"./useLuckyWheel.281a1081.1790666596239.js";import Y from"./angpow-rain-floating.0ca51bcd.1790666596239.js";import{F as $}from"./FloatingContainer.21527b0f.1790666596239.js";import"./index.a8804be1.1790666596239.js";import"./index.9bdd72e5.1790666596239.js";import"./index.cde3986f.1790666596239.js";import"./store.b019d147.1790666596239.js";import"./floatingNotification.constant.27687fe7.1790666596239.js";import"./dayjs.min.2527fb14.1790666596239.js";import"./matchPredictionModules.5077a1fd.1790666596239.js";import"./oddsFeedModules.feb27095.1790666596239.js";import"./promotionModules.b56c876e.1790666596239.js";import"./index.bcdbaaf5.1790666596239.js";import"./modal.action.3e3564f1.1790666596239.js";import"./currency-util.966edf9c.1790666596239.js";import"./angpowRainModules.c1c37f65.1790666596239.js";import"./isNumber.e961a46c.1790666596239.js";const K="_floatingSlider_1sxv1_1",z="_floatingSliderMenuDots_1sxv1_9",J="_sliderDot_1sxv1_22",Q="_sliderWrapper_1sxv1_40",X="_slideImage_1sxv1_44",r={floatingSlider:K,floatingSliderMenuDots:z,sliderDot:J,sliderWrapper:Q,slideImage:X},Z={slidesToShow:1,slidesToScroll:1,arrows:!1,autoplay:!0,infinite:!0,dotsClass:`floatingSliderMenuDots ${r.floatingSliderMenuDots}`,dots:!0,swipe:!1,draggable:!1,touchMove:!1,centerMode:!0,centerPadding:0,customPaging:()=>s.jsx("button",{type:"button",className:`sliderDot ${r.sliderDot}`}),pauseOnHover:!1,pauseOnFocus:!1,pauseOnDotsHover:!1,accessibility:!1},ee=({luckyWheelFloatingImage:f,includeLuckyWheel:n=!1,currencyLang:u,getCorrectContentFromSetting:m})=>{const p=[{id:"angpowRain",type:"angpowRain",href:"/angpow-rain",hideInCurrentPage:!0},{id:"diaryMission",type:"diaryMission",img:"/public/html/images/home_img/daily-mission-floating.gif",href:"/myaccount/mission-diary"},{id:"sMahPheb",type:"game",img:"/public/html/images/home_img/sMahPheb.gif",gameParams:{provider:"NS",gameCode:"sMahPheb",category:"SL"}},{id:"sGuanGongb",type:"game",img:"/public/html/images/home_img/sGuanGongb.gif",gameParams:{provider:"NS",gameCode:"sGuanGongb",category:"SL"}},{id:"referral",type:"referral",img:"/public/html/images/home_img/referral-floating.gif",href:"/myaccount/referral"}];let a=[...window.customFloatingMenuList?.[u]||window.customFloatingMenuList||p];return n&&a.unshift({id:"luckyWheel",type:"luckyWheel",img:f,href:"/lucky-wheel-landing",hideInCurrentPage:!0}),a=a.filter(t=>t?.enableCurrencies?t.enableCurrencies.includes(u):(t.img=m(t.img),t)),a},ve=({angpowRainSettings:f,angpowVisible:n})=>{const u=q(),m=c.useDispatch(),p=c.useSelector(e=>e?.user?.isLogin),{key:a,currencyLang:t}=c.useSelector(e=>e?.language),{viewType:S}=c.useSelector(e=>e.screen||{}),w=k.useHistory(),x=k.useLocation(),g=H(),{angpowRainConfig:C}=window.customFloatingConfig?.[S]??window.customFloatingConfig??{},I=c.useSelector(e=>e.portal?.settings?.features?.floatingSliderMenuSettings?.defaultPosition??{right:5,bottom:90}
1),M=U(G.LUCKY_WHEEL),[b,h]=o.useState(!1),[P,_]=o.useState(0),d=o.useRef(0),{luckyWheelTemplateData:R}=V(),{floatingLuckyWheelImg:L}=R||{};o.useEffect(()=>{if(!M){h(!1);return}let e=!0;const i=d.current+1;return d.current=i,(async()=>{try{const N=(await B({merchantCode:window.merchantCode,currency:t}))?.data?.luckyWheelSettingId??!1;e&&i===d.current&&h(!!N)}catch(D){e&&i===d.current&&h(!1),console.error(D)}})(),()=>{e=!1}},[t,M]);const W=o.useMemo(()=>ee({luckyWheelFloatingImage:L,includeLuckyWheel:b,currencyLang:t,getCorrectContentFromSetting:g}),[t,b,L]),v=x.pathname,l=o.useMemo(()=>W.filter(e=>e.type==="angpowRain"&&!n?!1:!(e.hideInCurrentPage&&v.startsWith(e.href))),[n,v,W]);o.useEffect(()=>{_(0)},[l.length]);const y=l[P]||l[0]||{},F=g(y?.closeBtnStyle)||{},E=g(y?.hideCloseVisual??y?.disableCloseIconVisual)||!1,j=e=>{if(e){if(e.type==="game"&&e?.gameParams){u(e.gameParams);return}if(e.type==="diaryMission"||e.type==="referral"){p?w.push(e.href):m(A.showLoginAlert(!0));return}if(e.href){let i=g(e.href);i.startsWith("http")?window.open(i,"_blank","noopener,noreferrer"):w.push(i)}}};return s.jsx($,{id:"floating-slider-menu",className:r.floatingSlider,disableUseLocalStorageLocated:!0,defaultPosition:I,showCloseButton:l.length>0,disableCloseIconVisual:E,closeBtnStyle:F,children:s.jsx("div",{className:r.sliderWrapper,children:s.jsx(T,{...Z,afterChange:_,children:l.map(e=>e.type==="angpowRain"?s.jsx("div",{className:r.slide,children:s.jsx(Y,{angpowRainSettings:f,angpowVisible:n,showCloseButton:!1,showCountDownImg:C?.showCountDownImg,customCssVar:{y:"auto",edge:"auto",w:C?.width||"6.3%"},posDetection:!1})},e.id):s.jsx("div",{className:r.slide,onClick:()=>j(e),children:s.jsx(O,{src:(e?.img?.[S]||e?.img||"").replace("{language}",a),alt:e.id,className:r.slideImage,draggable:!1})},e.id))})})})};export{ve as default};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.