import{G as D,R as P,r as m,C as z,H as f,I as B,J as d,Q as u,au as k,ao as I,P as b,an as G,N as g,K as H,M as S,at as V}from"./common.modules-8cbc64b2.js";import{br as E,A as F,eg as J,_ as Q}from"./page-activity-ActivityDetail-11971e62.js";import{M as U}from"./MayrecordList-e77db91f.js";import{K as q}from"./page-main-BetRecords-1e884b74.js";import"./page-turntable-assets-d6267459.js";import"./native/index-15fb3a5d.js";import"./en-5d34117c.js";import"./page-activity-DailySignIn-aa4b91fa.js";import"./page-activity-Bonus-36161c6d.js";import"./page-home-AllGames-1b3c8b5f.js";const W={class:"BettingRecordK3__C"},X={class:"BettingRecordK3__C-head"},Y={class:"BettingRecordK3__C-nav"},Z=["innerHTML"],$={class:"BettingRecordK3__C-list"},O={key:0,class:"BettingRecordK3__C-foot"},ee={class:"BettingRecordK3__C-foot-page"},te=D({__name:"index",setup(oe){const x=P(),K=E(),h=m(q),L=m([]),w=m(0),_=m(1),y=m(4),N=p=>{C.value=p.name,_.value=1,v()},C=m(0),v=async()=>{const p=await F(J({pageSize:20,pageNo:_.value,typeId:C.value})),o=(p==null?void 0:p.data.list)||[];for(let s=0;o.length>s;s++){let i=o[s].gameType.split(","),e=o[s].selectType.split(",");for(let n=0;i.length>n;n++)if(i[n]=="1"||i[n]=="2"||i[n]=="3")o[s].gameType="1",o[s].oneList=e;else if(i[n]=="5"||i[n]=="6"){let l=[],c=[],r=[];for(let t=0;e.length>t;t++){if(e[t]=="|11|"||e[t]=="|22|"||e[t]=="|33|"||e[t]=="|44|"||e[t]=="|55|"||e[t]=="|66|"){let a=e[t].split("|");a.pop(),a.shift(),l.push(a.join())}if(e[t]==":11:"||e[t]==":22:"||e[t]==":33:"||e[t]==":44:"||e[t]==":55:"||e[t]==":66:"){let a=e[t].split(":");a.pop(),a.shift(),c.push(a.join())}if(e[t]==":1:"||e[t]==":2:"||e[t]==":3:"||e[t]==":4:"||e[t]==":5:"||e[t]==":6:"){let a=e[t].split(":");a.pop(),a.shift(),r.push(a.join())}}o[s].gameType="2",o[s].oneList=l,o[s].towList=!!R(c,r),o[s].towListArr=R(c,r)}else if(i[n]=="7"||i[n]=="8"){let l=[],c=!1;for(let r=0;e.length>r;r++){if(e[r]=="|111|"||e[r]=="|222|"||e[r]=="|333|"||e[r]=="|444|"||e[r]=="|555|"||e[r]=="|666|"){let t=e[r].split("|");t.pop(),t.shift(),l.push(t.join())}e[r]=="|AAA|"&&(c=!0),o[s].oneList=l,o[s].towList=c,o[s].gameType="3"}}else if(i[n]=="9"||i[n]=="10"||i[n]=="4"){let l=[],c=!1,r=[];for(let t=0;e.length>t;t++){if(e[t]=="|1|"||e[t]=="|2|"||e[t]=="|3|"||e[t]=="|4|"||e[t]=="|5|"||e[t]=="|6|"){let a=e[t].split("|");a.pop(),a.shift(),l.push(a.join())}if(e[t]=="|ABC|"&&(c=!0),e[t]==".1."||e[t]==".2."||e[t]==".3."||e[t]==".4."||e[t]==".5."||e[t]==".6."){let a=e[t].split(".");a.pop(),a.shift(),r.push(a.join())}}o[s].oneList=l,o[s].towList=c,o[s].threeList=r,o[s].gameType="4"}}L.value=o||[],y.value=(p==null?void 0:p.data.totalPage)||0},R=(p,o)=>{let s=[];for(var i=0;p.length>i;i++){let n=p[i],l=[];for(var e=0;o.length>e;e++)l.push(o[e]);if(l.length>0){let c=l.sort().join(",");s.push(n+"|"+c)}}return s.sort()},T=async()=>{await K.getK3Data(),h.value=K.getK3,C.value=h.value[0].typeID,await v()};function A(){x.go(-1)}const j=()=>{_.value--,v()},M=()=>{_.value++,v()};return z(()=>{T()}),(p,o)=>{const s=f("NavBar"),i=f("van-tab"),e=f("van-tabs"),n=f("van-icon");return g(),B("div",W,[d("div",X,[u(s,{"left-arrow":"",onClickLeft:A,class:"main",title:"K3 Lotre"})]),d("div",Y,[u(e,{active:w.value,"onUpdate:active":o[0]||(o[0]=l=>w.value=l),onClickTab:N},{default:k(()=>[(g(!0),B(H,null,S(h.value,(l,c)=>(g(),V(i,{key:c,name:l.typeID},{title:k(()=>[d("div",{innerHTML:l.typeName.replace(/<br ?\/?>/,"")},null,8,Z)]),_:2},1032,["name"]))),128))]),_:1},8,["active"])]),d("div",$,[u(U,{mayrecord:L.value},null,8,["mayrecord"])]),L.value.length?(g(),B("div",O,[d("div",{class:I(["BettingRecordK3__C-foot-previous",{disabled:_.value<=1}]),onClick:j},[u(n,{name:"arrow-left",class:"BettingRecordK3__C-icon",size:"20"})],2),d("div",ee,b(_.value)+"/"+b(y.value),1),d("div",{class:I(["BettingRecordK3__C-foot-next",{disabled:_.value>=y.value}]),onClick:M},[u(n,{name:"arrow",class:"BettingRecordK3__C-icon",size:"20"})],2)])):G("v-if",!0)])}}});const me=Q(te,[["__scopeId","data-v-c228f246"],["__file","/usr/local/jenkins-prod/workspace/ar055-india-bdg/src/views/home/AllLotteryGames/BettingRecordK3/index.vue"]]);export{me as default};
