1import{l as V,r as i,A as e,_ as k,ae as L,S as T,B as I}from"./index.d5ed491e.1790691266856.js";import{u as Y,r as q}from"./agentation.5cf31a33.1790691266856.js";import{g as W,d as J,e as Q,l as D,p as X,h as Z}from"./index-layout-lite.b1b338ee.1790691266856.js";import{f as ee}from"./user-slice.9308c135.1790691266856.js";import se from"./breadcrumbs.7620e80e.1790691266856.js";import"./usePreloadTheme.75050896.1790691266856.js";import"./luckyWheelModules.48083fab.1790691266856.js";import"./ms-hook.4307a960.1790691266856.js";import"./staticContentModules.2872032d.1790691266856.js";const te="_myVIPContainer_12uz6_9",ae="_breadcrumbs_12uz6_15",re="_tabsContainer_12uz6_18",le="_tab_12uz6_18",ie="_isActive_12uz6_39",ne="_redeemContainer_12uz6_43",oe="_redeemOverlay_12uz6_53",ce="_redeemModal_12uz6_62",de="_close_12uz6_68",me="_iconContainer_12uz6_79",ue="_iconBg_12uz6_83",_e="_iconReward_12uz6_91",pe="_title_12uz6_98",ve="_subtitle_12uz6_105",be="_subtitleAmount_12uz6_111",xe="_cardSkeleton_12uz6_114",he="_cardLabel_12uz6_114",ge="_card_12uz6_114",ye="_emptyCard_12uz6_143",je="_vipCard_12uz6_147",Ne="_labelText_12uz6_155",Ce="_labelBtn_12uz6_158",Ve="_cardInfo_12uz6_182",Le="_cardLevel_12uz6_192",Ie="_cardLevelName_12uz6_196",fe="_cardLevelIcon_12uz6_200",ze="_progressSkeleton_12uz6_209",Me="_progressLabel_12uz6_212",Pe="_progressBox_12uz6_227",we="_progressContainer_12uz6_240",Se="_progressHeader_12uz6_243",Re="_progressItem_12uz6_252",Ae="_label_12uz6_155",Te="_progressAmount_12uz6_261",ke="_amount_12uz6_267",De="_value_12uz6_267",$e="_progressBar_12uz6_270",Ee="_barStatus_12uz6_277",Be="_privillegaSkeleton_12uz6_286",Fe="_privillegaLabel_12uz6_289",He="_privillegaBox_12uz6_304",Ue="_privillegaItem_12uz6_310",Ge="_vipPrivillege_12uz6_323",Oe="_header_12uz6_326",Ke="_headerBtn_12uz6_334",Ye="_privillegeContainer_12uz6_348",qe="_box_12uz6_354",We="_boxDisabled_12uz6_357",Je="_boxBtn_12uz6_360",Qe="_boxContent_12uz6_365",Xe="_boxImg_12uz6_376",Ze="_boxCount_12uz6_385",es="_vipStatement_12uz6_403",ss="_statementContainer_12uz6_409",ts="_statementTable_12uz6_414",as="_headerRow_12uz6_417",rs="_headerColSpan_12uz6_424",ls="_headerCol_12uz6_424",is="_innerRow_12uz6_431",ns="_innerRowCol_12uz6_438",os="_innerCol_12uz6_444",cs="_statmentLoading_12uz6_451",ds="_emptyRow_12uz6_463",ms="_row_12uz6_468",us="_totalRow_12uz6_475",s={myVIPContainer:te,breadcrumbs:ae,tabsContainer:re,tab:le,isActive:ie,redeemContainer:ne,redeemOverlay:oe,redeemModal:ce,close:de,iconContainer:me,iconBg:ue,iconReward:_e,title:pe,subtitle:ve,subtitleAmount:be,cardSkeleton:xe,cardLabel:he,"skeleton-loading-effect":"_skeleton-loading-effect_12uz6_1",card:ge,emptyCard:ye,vipCard:je,labelText:Ne,labelBtn:Ce,cardInfo:Ve,cardLevel:Le,cardLevelName:Ie,cardLevelIcon:fe,progressSkeleton:ze,progressLabel:Me,progressBox:Pe,progressContainer:we,progressHeader:Se,progressItem:Re,label:Ae,progressAmount:Te,amount:ke,value:De,progressBar:$e,barStatus:Ee,privillegaSkeleton:Be,privillegaLabel:Fe,privillegaBox:He,privillegaItem:Ue,vipPrivillege:Ge,header:Oe,headerBtn:Ke,privillegeContainer:Ye,box:qe,boxDisabled:We,boxBtn:Je,boxContent:Qe,boxImg:Xe,boxCount:Ze,vipStatement:es,statementContainer:ss,statementTable:ts,headerRow:as,headerColSpan:rs,headerCol:ls,innerRow:is,innerRowCol:ns,innerCol:os,statmentLoading:cs,emptyRow:ds,row:ms,totalRow:us},_s=D(()=>k(()=>import("./myvip-level-up-down.66c411ce.1790691266856.js"),["assets/10.9.30/myvip-level-up-down.66c411ce.1790691266856.js","assets/10.9.30/index.d5ed491e.1790691266856.js","assets/10.9.30/index-layout-lite.b1b338ee.1790691266856.js","assets/10.9.30/agentation.5cf31a33.1790691266856.js","assets/10.9.30/agentation.06ce37f5.1790691266856.css","assets/10.9.30/user-slice.9308c135.1790691266856.js","assets/10.9.30/usePreloadTheme.75050896.1790691266856.js","assets/10.9.30/staticContentModules.2872032d.1790691266856.js","assets/10.9.30/luckyWheelModules.48083fab.1790691266856.js","assets/10.9.30/ms-hook.4307a960.1790691266856.js","assets/10.9.30/index-layout-lite.62f46006.1790691266856.css","assets/10.9.30/dateInput.e77a8c1c.1790691266856.js","assets/10.9.30/react-datepicker.min.28415d2e.1790691266856.js","assets/10.9.30/index.7b83896e.1790691266856.js","assets/10.9.30/warning.883c7a3c.1790691266856.js","assets/10.9.30/dateInput.ac5c39fd.1790691266856.css","assets/10.9.30/pagination.4af6a072.1790691266856.js","assets/10.9.30/Pagination.d595b730.1790691266856.js","assets/10.9.30/pagination.1b8746c4.1790691266856.css","assets/10.9.30/myvip-level-up-down.1a123cc2.1790691266856.css"])),ps=D(()=>k(()=>import("./myvip-redeem-history.2a8ae032.1790691266856.js"),["assets/10.9.30/myvip-redeem-history.2a8ae032.1790691266856.js","assets/10.9.30/index.d5ed491e.1790691266856.js","assets/10.9.30/index-layout-lite.b1b338ee.1790691266856.js","assets/10.9.30/agentation.5cf31a33.1790691266856.js","assets/10.9.30/agentation.06ce37f5.1790691266856.css","assets/10.9.30/user-slice.9308c135.1790691266856.js","assets/10.9.30/usePreloadTheme.75050896.1790691266856.js","assets/10.9.30/staticContentModules.2872032d.1790691266856.js","assets/10.9.30/luckyWheelModules.48083fab.1790691266856.js","assets/10.9.30/ms-hook.4307a960.1790691266856.js","assets/10.9.30/index-layout-lite.62f46006.1790691266856.css","assets/10.9.30/dateInput.e77a8c1c.1790691266856.js","assets/10.9.30/react-datepicker.min.28415d2e.1790691266856.js","assets/10.9.30/index.7b83896e.1790691266856.js","assets/10.9.30/warning.883c7a3c.1790691266856.js","assets/10.9.30/dateInput.ac5c39fd.1790691266856.css","assets/10.9.30/pagination.4af6a072.1790691266856.js","assets/10.9.30/Pagination.d595b730.1790691266856.js","assets/10.9.30/pagination.1b8746c4.1790691266856.css","assets/10.9.30/myvip-redeem-history.be362236.1790691266856.css"])),Vs=()=>{const{t:a}=Y(["liteMyVip"]),b=q.useHistory(),$=V.useDispatch(),{countryLanguageKey:x,walletCurrency:E}=V.useSelector(t=>({countryLanguageKey:t.language?.currentLanguage?.countryLanguageKey,walletCurrency:t.user?.account?.currency}),V.shallowEqual),B=i.useRef(new Date),[u,h]=i.useState("vipLevel"),[l,f]=i.useState(null),[F,z]=i.useState(null),[_,M
1]=i.useState(null),[p,g]=i.useState(null),[H,y]=i.useState(!1),[o,j]=i.useState(null),[P,w]=i.useState(!1),U=t=>{t?.vipMemberInfo?.memberLevelUpNotification&&(y(!0),j({title:a("liteMyVip:redeemTitle.LEVEL_UPGRADE","VIP Level Up!"),subtitle:e.jsx(L,{i18nKey:"liteMyVip:redeemSubtitle.LEVEL_UPGRADE",values:{memberVipName:t?.vipMemberInfo?.memberVipName,memberLevel:t?.vipMemberInfo?.memberLevel},components:{subsubtitle:e.jsx("span",{className:s.subtitleAmount})},defaults:"You have reached <subsubtitle>{{memberVipName}} {{memberLevel}}</subsubtitle>"}),icon:t?.vipMemberInfo?.memberVipImage,onClickFunction:X}))};i.useEffect(()=>{let t=!0;return(async()=>{w(!0);try{const[r,c,d]=await Promise.allSettled([W(x),J(),Q()]);if(!t)return;if(r.status==="fulfilled"?(f(r.value?.vipMemberInfo),z(r.value?.vipMemberSettingInfo),U(r.value)):(f(null),z(null)),c.status==="fulfilled"?g(c.value):g(null),d.status==="fulfilled"){const m=Object.entries(d.value||{}).map(([N,n])=>({key:N,...n}));M(m)}else M(null)}finally{t&&w(!1)}})(),()=>{t=!1}},[x]);const G=async t=>{if(t.contactCS){t.url&&window.open(t.url,"","width=500,height=700,toolbar=no,location=no,directories=no,status=yes,menubar=no,scrollbars=no");return}if(!(!t.idList||t.idList.length<1))try{const r=await Z({id:t.idList[0],lang:x});t.type!=="VIP_GIFT"&&g(N=>(N||[]).map(n=>{if(n.type!==t.type)return n;const C=Array.isArray(n.idList)?n.idList.slice(1):null,A=!C||C.length===0;return{...n,idList:A?null:C,status:A?"A":n.status}}));let c=a(`liteMyVip:redeemTitle.${t.type}`,"Congratulations!"),d=e.jsx(L,{i18nKey:`liteMyVip:redeemSubtitle.${t.type}`,values:{currency:E,amount:r.bonusAmount?.toFixed(2)},components:{amountDiv:e.jsx("span",{className:s.subtitleAmount})},defaults:"You have won <br /><amountDiv>{{currency}}{{amount}}</amountDiv>"}),m=t.icon;t.type==="VIP_GIFT"&&r.claimStatus&&(c=r.description,d=e.jsx(L,{i18nKey:"liteMyVip:redeemSubtitle.VIP_GIFT",values:{status:`liteMyVip:redeemSubtitle.VIP_GIFT_${r.claimStatus}`},components:{amountDiv:e.jsx("span",{className:s.subtitleAmount})},defaults:"Status: {{status}}"}),m=r.icon),y(!0),j({title:c,subtitle:d,icon:m}),$(ee())}catch(r){r.response?.data?.errorCode===5607?I.toast.error(a("liteMyVip:errorCode.5607","The bonus has been expired")):r.response?.data?.errorCode===5606?I.toast.error(a("liteMyVip:errorCode.5606","The bonus has been claimed")):I.toast.error(a("liteMyVip:errorCode.general","Unable to Redeem. Please try again later!"))}},S=(()=>Array.isArray(_)?_.reduce((t,r)=>({last:t.last+(r.last||0),current:t.current+(r.current||0)}),{last:0,current:0}):{last:0,current:0})(),v=B.current,R=t=>{y(!1),j(null),t&&t()},O=()=>e.jsxs("div",{className:s.redeemContainer,children:[e.jsx("div",{className:s.redeemOverlay,onClick:()=>R(o?.onClickFunction)}),e.jsxs("div",{className:s.redeemModal,children:[e.jsx("div",{className:s.close,onClick:()=>R(o?.onClickFunction),children:e.jsxs("picture",{children:[e.jsx("source",{src:"/public/html/images/sp2lite/shared/cross.webp",type:"image/webp"}),e.jsx("img",{src:"/public/html/images/sp2lite/shared/cross.png",alt:"share-modal-close"})]})}),e.jsx("div",{className:s.title,children:o.title}),e.jsxs("div",{className:s.iconContainer,children:[e.jsx("img",{className:s.iconReward,src:o.icon,alt:`redeemed-${o.title}`}),e.jsx("img",{className:s.iconBg,src:"/public/html/default_whitelabel/shared-image/vip-system/claimed-bg.png",alt:"claimed-bg"})]}),e.jsx("div",{className:s.subtitle,children:o.subtitle})]})]}),K=()=>e.jsx("div",{className:s.vipLevelContainer,children:P?e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:s.cardSkeleton,children:[e.jsx("div",{className:s.cardLabel}),e.jsx("div",{className:s.card})]}),e.jsxs("div",{className:s.progressSkeleton,children:[e.jsx("div",{className:s.progressLabel}),e.jsx("div",{className:s.progressBox})]})]}):e.jsxs(e.Fragment,{children:[l?.memberLevel||l?.memberVipName||l?.memberVipImage?e.jsxs("div",{className:s.vipCard,children:[e.jsxs("div",{className:s.cardLabel,children:[e.jsx("div",{className:s.labelText,children:a("liteMyVip:vipLevel","VIP Level")}),e.jsxs("div",{className:s.labelBtn,onClick:()=>b.push("/vip"),children:[a("liteMyVip:vipDetails","VIP Details"),e.jsx(T,{category:"SVGHome",name:"right-arrow3"})]})]}),e.jsxs("div",{className:s.card,children:[e.jsxs("div",{className:s.cardInfo,children:[e.jsx("div",{className:s.cardLabel,children:a("liteMyVip:currentLevel","Current Level")}),e.jsxs("div",{className:s.cardLevel,children:[l?.memberLevel||"",e.jsx("div",{className:s.cardLevelName,children:l?.memberVipName||""})]})]}),e.jsx("div",{className:s.cardLevelIcon,children:l?.memberVipImage&&e.jsx("img",{src:l.memberVipImage||"",alt:"vip-level"})})]})]}):e.jsx("div",{className:s.emptyCard,children:a("liteMyVip:comingSoon","Coming Soon ...")}),(F||[]).map(t=>t?.deposit?.totalPoint>0||t?.validBet?.totalPoint>0?e.jsxs("div",{className:s.progressContainer,children:[e.jsx("div",{className:s.progressHeader,children:a(`liteMyVip:progressTypes.${t.type}`,t.type)}),e.jsxs("div",{className:s.progressBox,children:[t.deposit?.totalPoint>0&&e.jsxs("div",{className:s.progressItem,children:[e.jsx("div",{className:s.label,children:a("liteMyVip:depositPoint","Deposit Point")}),e.jsxs("div",{className:s.progressAmount,children:[e.jsxs("div",{className:s.amount,children:[e.jsx("span",{className:s.value,children:t.deposit.currentPoint||"0"}),e.jsx("span",{className:s.separator,children:" / "}),e.jsx("span",{className:s.target,children:t.deposit.totalPoint})]}),e.jsxs("div",{className:s.remainAmount,children:[Math.max(0,t.deposit.totalPoint-(t.deposit.currentPoint||0))," ",a("liteMyVip:toGo","to go")]})]}),e.jsx("div",{className:s.progressBar,children:e.jsx("div",{className:s.barStatus,style:{width:`${t.deposit.currentPoint/t.deposit.totalPoint*100}%`}})})]}),t.validBet?.totalPoint>0&&e.jsxs("div",{className:s.progressItem,children:[e.jsx("div",{className:s.label,children:a("liteMyVip:turnoverPoint","Turnover Point")}),e.jsxs("div",{className:s.progressAmount,children:[e.jsxs("div",{className:s.amount,children:[e.jsx("span",{className:s.value,children:t.validBet.currentPoint||"0"}),e.jsx("span",{className:s.separator,children:" / "}),e.jsx("span",{className:s.target,children:t.validBet.totalPoint})]}),e.jsxs("div",{className:s.remainAmount,children:[Math.max(0,t.validBet.totalPoint-(t.validBet.currentPoint||0))," ",a("liteMyVip:toGo","to go")]})]}),e.jsx("div",{className:s.progressBar,children:e.jsx("div",{className:s.barStatus,style:{width:`${t.validBet.currentPoint/t.validBet.totalPoint*100}%`}})})]})]})]},`requirement-${t.type}`):null),Array.isArray(p)&&p.length>0&&e.jsxs("div",{className:s.vipPrivillege,children:[e.jsxs("div",{className:s.header,children:[e.jsx("div",{className:s.label,children:a("liteMyVip:vipPrivillege","VIP Privillege")}
1),e.jsxs("div",{className:s.headerBtn,onClick:()=>b.push("/promotion"),children:[a("liteMyVip:morePromotion","More Promotion"),e.jsx(T,{category:"SVGHome",name:"right-arrow3"})]})]}),e.jsx("div",{className:s.privillegeContainer,children:(p||[]).map((t,r)=>{const c=t.status==="A",d=Array.isArray(t.idList)&&t.idList.length>0,m=t.contactCS?!t.url:c||!d;return e.jsxs("div",{className:`${s.box} ${m?s.boxDisabled:""}`,children:[e.jsxs("div",{className:s.boxContent,children:[e.jsx("div",{className:s.boxImg,children:e.jsx("img",{src:t.icon,alt:`privillege-${t.type}`})}),e.jsx("div",{className:s.boxText,children:a(`liteMyVip:bonusTypes.${t.type}`,t.type)}),Array.isArray(t.idList)&&t.idList.length>1&&e.jsx("div",{className:s.boxCount,children:t.idList.length})]}),e.jsx("div",{className:s.boxBtn,onClick:()=>m?null:G(t),children:t.contactCS||t.type==="DEDICATED_CS"?a("liteMyVip:contactCS","Contact CS"):t.status==="A"?a("liteMyVip:redeemed","Redeemed"):a("liteMyVip:redeem","Redeem")})]},`privillege-${t.type}=${r}`)})})]}),(l?.memberLevel||l?.memberVipName||l?.memberVipImage)&&Array.isArray(p)&&p.length>0?e.jsxs("div",{className:s.vipStatement,children:[e.jsx("div",{className:s.header,children:e.jsx("div",{className:s.label,children:a("liteMyVip:statementOfMonth","Statement of Month")})}),e.jsx("div",{className:s.statementContainer,children:e.jsxs("div",{className:s.statementTable,children:[e.jsxs("div",{className:s.headerRow,children:[e.jsx("div",{className:s.headerColSpan,children:a("liteMyVip:type","Type")}),e.jsxs("div",{className:s.headerCol,children:[e.jsx("div",{className:s.innerRow,children:a("liteMyVip:turnover","Turnover")}),e.jsxs("div",{className:s.innerRowCol,children:[e.jsxs("div",{className:s.innerCol,children:[String(v.getMonth()).padStart(2,"0"),"/",v.getFullYear()]}),e.jsxs("div",{className:s.innerCol,children:[String(v.getMonth()+1).padStart(2,"0"),"/",v.getFullYear()]})]})]})]}),P?e.jsx("div",{className:s.statmentLoading}):Array.isArray(_)&&_.length>0?e.jsxs(e.Fragment,{children:[(_||[]).map(t=>e.jsxs("div",{className:s.row,children:[e.jsx("div",{className:s.col,children:t?.key}),e.jsx("div",{className:s.col,children:Number(t.last||0).toFixed(2)}),e.jsx("div",{className:s.col,children:Number(t.current||0).toFixed(2)})]},`turnover-statement-${t?.key}`)),e.jsxs("div",{className:`${s.row} ${s.totalRow}`,children:[e.jsx("div",{className:s.col,children:a("liteMyVip:total","Total")}),e.jsx("div",{className:s.col,children:Number(S.last).toFixed(2)}),e.jsx("div",{className:s.col,children:Number(S.current).toFixed(2)})]})]}):e.jsx("div",{className:s.emptyRow,children:a("liteGlobal:noRecords","No Record")})]})})]}):null]})});return e.jsxs("div",{className:s.myVIPContainer,children:[e.jsx("div",{className:s.breadcrumbs,children:e.jsx(se,{title:a("liteMyVip:myVip","My VIP"),backAction:()=>b.push("/home")})}),e.jsxs("div",{className:s.tabsContainer,children:[e.jsx("div",{className:`${s.tab} ${u==="vipLevel"?s.isActive:""}`,onClick:()=>h("vipLevel"),children:a("liteMyVip:vipLevel","VIP Level")}),e.jsx("div",{className:`${s.tab} ${u==="levelUpDown"?s.isActive:""}`,onClick:()=>h("levelUpDown"),children:a("liteMyVip:levelUpDown","Level Up / Down")}),e.jsx("div",{className:`${s.tab} ${u==="redeemHistory"?s.isActive:""}`,onClick:()=>h("redeemHistory"),children:a("liteMyVip:redeemHistory","Redeem History")})]}),H&&o&&O(),u==="vipLevel"&&e.jsx(K,{}),u==="levelUpDown"&&e.jsx(_s,{}),u==="redeemHistory"&&e.jsx(ps,{})]})};export{Vs 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.