(window.webpackJsonp=window.webpackJsonp||[]).push([[1],{"2gJC":function(t,e,n){"use strict";var a=n("0P+p"),s=n("8H4/"),i=n("yWTg"),r=n("8/MJ"),o=(n("ma9I"),n("TeQF"),n("fbCW"),n("yq1k"),n("2B1R"),n("FNk8"),n("+2oP"),n("6cQw"),n("tkto"),n("07d7"),n("B6y2"),n("rB9j"),n("JfAA"),n("JTJg"),n("UxlC"),n("FZtP"),n("3bBZ"),n("LvDl")),c=n("oCYn"),u=n("gGy4"),l=n("ybLR"),v=n("2dvV"),p=n("eZnm"),m=(n("qePV"),{props:{time:{type:Number,required:!0,default:0},isSale:{type:Boolean}},data:function(){return{lottTime:1*this.time,displayTime:""}},mounted:function(){this.isSale?this.countdown():this.displayTime="-- : -- : --"},beforeDestroy:function(){clearTimeout(this.countTimer)},methods:{countdown:function(){var t=this,e=this.lottTime-(new Date).getTime();this.displayTime=e>1e3?this.formatTime(e):"-- : -- : --",this.countTimer=setTimeout((function(){t.countdown()}),1e3)},formatTime:function(t){var e=Math.floor(t/1e3/60/60/24),n=Math.floor(t/1e3/60/60-24*e),a=Math.floor(t/1e3/60/60),s=Math.floor(t/1e3/60%60),i=Math.floor(t/1e3%60);return a=a<10?"0"+a:a,s=s<10?"0"+s:s,i=i<10?"0"+i:i,t<864e5?a+":"+s+":"+i:e+"days "+(0===n?"":n+"hr")}}}),f=n("KHd+"),g=Object(f.a)(m,(function(){return(0,this._self._c)("div",{staticClass:"lott-count-down"},[this._v(this._s(this.displayTime))])}),[],!1,null,null,null).exports,w=n("SCLs"),d=n("Wgwc"),b=n.n(d),h=[{name:"All",value:-1},{name:"short_week_1",value:2},{name:"short_week_2",value:3},{name:"short_week_3",value:4},{name:"short_week_4",value:5},{name:"short_week_5",value:6},{name:"short_week_6",value:7},{name:"short_week_0",value:1}],_={components:{CountDown:g,GameItem:w.a},mixins:[l.a],props:["isLobby"],setup:function(){var t=Object(c.reactive)({listSwiperOption:{slidesPerView:5,spaceBetween:0,navigation:{prevEl:".lott-prev",nextEl:".lott-next",disabledClass:"button-disabled"}},historySwiperOption:{slidesPerView:"auto",spaceBetween:15,observer:!0,observeParents:!0,navigation:{prevEl:".his-prev",nextEl:".his-next"}},lottSwiperOption:{slidesPerView:"auto",spaceBetween:15},openTimer:null,nowTag:"",showWeek:!1,nowWeek:"0",DAYTIME:864e5,allMenu:[],allLotts:[],currentLottMenu:[],tabActive:"",openNumname:["DB","G1","G2","G3","G4","G5","G6","G7","G8"],lottListType:""}),e=Object(c.getCurrentInstance)().proxy,n=Object(u.h)().dispatch,l=Object(u.b)(),m=l.checkLoginV2,f=l.lottIsFav,g=l.lottFavAction,w=l.lottFavIds,d=Object(u.d)(),_=d.goPage,T=d.gameVendor,k=d.language;Object(c.provide)("type",""),Object(c.onMounted)((function(){S()}));var y=Object(c.computed)((function(){return L.value.length>5})),L=Object(c.computed)((function(){return t.allMenu.map((function(t){return Object(r.a)(Object(r.a)({},t),{},{gameMenus:A(t.gameMenus)})}))})),C=Object(c.computed)((function(){var t=T.value.ELOTT;return(void 0===t?[]:t).find((function(t){return"GPI"===t.vassalage}))})),O=Object(c.computed)((function(){var e,n;return t.tabActive?(null===(n=t.currentLottMenu)||void 0===n?void 0:n.find((function(e){return e.gameId===t.tabActive})))||{}:(null===(e=t.currentLottMenu)||void 0===e?void 0:e[0])||{}})),x=Object(c.computed)((function(){return I(t.currentLottMenu)})),M=Object(c.computed)((function(){return[]})),j=function(){var e=Object(i.a)(Object(s.a)().mark((function e(a){var i,r;return Object(s.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("recent"!==a){e.next=8;break}if(m()){e.next=3;break}return e.abrupt("return");case 3:return clearTimeout(t.openTimer),t.nowTag="",N(),t.lottListType=a,e.abrupt("return");case 8:if("hot"!==a){e.next=17;break}return clearTimeout(t.openTimer),t.nowTag="",t.lottListType=a,e.next=14,n("getPopular");case 14:return i=e.sent,t.currentLottMenu=i,e.abrupt("return");case 17:if("fav"!==a){e.next=26;break}if(m()){e.next=20;break}return e.abrupt("return");case 20:return clearTimeout(t.openTimer),t.nowTag="",t.lottListType=a,r=t.allLotts.filter((function(t){return w.value.includes(t.gameId)})),t.currentLottMenu=r,e.abrupt("return");case 26:[""].includes(a)&&(S(),t.lottListType=a);case 27:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),N=function(){var n=Object(i.a)(Object(s.a)().mark((function n(){var a,i,r,o,c,u,l;return Object(s.a)().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return e.cover.loader(!0),a={prizeMode:v.a.brand.lotteryType,device:v.a.device,recentCount:100},i=[],n.next=5,p.a.getLottRecent({data:a});case 5:for(o in r=n.sent)i.push(r[o]);c=[],n.t0=Object(s.a)().keys(i);case 9:if((n.t1=n.t0()).done){n.next=21;break}u=n.t1.value,n.t2=Object(s.a)().keys(t.allLotts);case 12:if((n.t3=n.t2()).done){n.next=19;break}if(l=n.t3.value,t.allLotts[l].gameId!==i[u].gameId){n.next=17;break}return c.push(t.allLotts[l]),n.abrupt("break",19);case 17:n.next=12;break;case 19:n.next=9;break;case 21:e.cover.loader(!1),t.currentLottMenu=c;case 23:case"end":return n.stop()}}),n)})));return function(){return n.apply(this,arguments)}}(),S=function(){var e=Object(i.a)(Object(s.a)().mark((function e(){var i,r,c,u,l,v,p,m,f,g,w;return Object(s.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=(new Date).getTime(),e.next=3,n("getVnLotteryMenu");case 3:r=e.sent,c=(new Date).getTime(),u=Math.abs(c-i)/2,l=Object.values(r),v=JSON.parse(JSON.stringify(l)),p=[],m=v.reduce((function(t,e){return[].concat(Object(a.a)(t),Object(a.a)(e.gameMenus))}),[]),p=""===t.nowTag?Object(o.cloneDeep)(m):v.find((function(e){return e.tag===(t.nowTag||v[0].tag)})).gameMenus,f=Math.min.apply(Math,Object(a.a)(p.map((function(t){return t.remainTime})))),g=f<7e3?7e3:Math.min(3e4,f-u),w=(new Date).getTime(),p.forEach((function(t){t.fewinTime=w+t.remainTime-u-1e3*t.lockTime})),t.allMenu=v,t.allLotts=m,t.currentLottMenu=p,clearTimeout(t.openTimer),t.openTimer=null,t.openTimer=setTimeout((function(){S()}),g);case 21:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),A=function(t){for(var e=[],n=2;n<8;n++)e.push({gameMenus:[],tname:n.toString()});e.push({gameMenus:[],tname:"1"});for(var a=0;a<t.length;a++)for(var s=t[a],i=0;i<e.length;i++){var r=e[i];(s.drawDayOfWeek.split(",")||[]).indexOf(r.tname)>-1&&r.gameMenus.push(s)}return e},I=function(t){return h.map((function(e){return Object(r.a)(Object(r.a)({},e),{},{gameMenus:t.filter((function(t){var n=t.drawDayOfWeek,a=void 0===n?"":n;return(a=a.replace("1,2,3,4,5,6,7","-1")).split(",").includes("".concat(e.value))}))})}))},D=function(){var e=Object(i.a)(Object(s.a)().mark((function e(n){return Object(s.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t.nowTag=n,t.nowWeek="0",clearTimeout(t.openTimer),t.lottListType="",""!==n){e.next=8;break}return t.currentLottMenu=Object(o.cloneDeep)(t.allLotts),t.tabActive=t.currentLottMenu[0].gameId,e.abrupt("return");case 8:if("KENO"!==n){e.next=12;break}E(C.value),e.next=15;break;case 12:return e.next=14,S();case 14:t.tabActive=t.currentLottMenu[0].gameId;case 15:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),E=function(){var a=Object(i.a)(Object(s.a)().mark((function a(i){var r,o;return Object(s.a)().wrap((function(a){for(;;)switch(a.prev=a.next){case 0:return e.cover.loader(!0),r={data:{clientType:"3",platform:"flash,html5-desktop",merchant:v.a.brand.merchant,gameType:i.gameType,vassalage:i.vassalage,language:k.value,pageNo:1,pageSize:1e3}},a.next=4,n("getPopupGame",r);case 4:o=a.sent,e.cover.loader(!1),t.currentLottMenu=o.games;case 7:case"end":return a.stop()}}),a)})));return function(t){return a.apply(this,arguments)}}();return Object(r.a)(Object(r.a)({},Object(c.toRefs)(t)),{},{goPage:_,vnlotts:L,gpiGame:C,language:k,isShowVnLottArrow:y,historyLott:M,currentLott:O,weekCurrentLottMenu:x,setShowWeek:function(e,n){["vietnam_rb_central","vietnam_rb_southern"].includes(n)?t.showWeek=e:t.showWeek=!1},changeTag:D,changeNum:function(t){if(!t)return[];var e=[];return t&&(e=t.indexOf(",")>0&&t.indexOf("~")>0?t.split("~")[0].split(""):t.indexOf(",")>0&&t.split(",")[0].split("").length>3?t.split(",")[0].split(""):t.indexOf(",")>0?t.split(","):t.split("")),e.slice(0,6)},changeNumV2:function(t){return t?t.split("~").map((function(t){return t.split(",")})):[]},formatDate:function(t){return t?b()(t).format("MM/DD HH:mm:ss"):"-"},setTabActive:function(e){t.tabActive=e.gameId},moreFn:function(){_("/elott")},setListType:j,lottIsFav:f,lottFavAction:g})}},T=(n("swHE"),Object(f.a)(_,(function(){var t=this,e=t._self._c;return e("div",{staticClass:"lott-wrap"},[e("div",{staticClass:"row-title"},[e("span",{staticClass:"title-text",on:{click:function(e){return t.goPage("/elott")}}},[t._v(t._s(t.$t("in_lott_game")))]),t._v(" "),e("div",{staticClass:"lott-switch"},[!t.isLobby&&t.vnlotts.length?e("div",{staticClass:"vendor-slide"},[e("swiper",{attrs:{options:t.listSwiperOption}},[e("swiper-slide",[e("span",{staticClass:"swiper-text",class:{active:""===t.nowTag},on:{click:function(e){return t.changeTag("")}}},[t._v("ALL")])]),t._v(" "),t._l(t.vnlotts,(function(n){return e("swiper-slide",{key:n.gameMenuSort},[e("span",{staticClass:"swiper-text",class:[{active:t.nowTag===n.tag}],on:{click:function(e){return t.changeTag(n.tag)}}},[t._v("\n "+t._s(n.labelName)+"\n ")])])})),t._v(" "),t.gpiGame?e("swiper-slide",[e("span",{staticClass:"swiper-text",class:{active:"KENO"===t.nowTag},on:{click:function(e){return t.changeTag("KENO")}}},[t._v("KENO")])]):t._e()],2),t._v(" "),[e("div",{staticClass:"lott-prev prev lott-swiper-arrow",attrs:{slot:"button-prev"},slot:"button-prev"}),t._v(" "),e("div",{directives:[{name:"show",rawName:"v-show",value:t.isShowVnLottArrow,expression:"isShowVnLottArrow"}],staticClass:"lott-next next lott-swiper-arrow",attrs:{slot:"button-next"},slot:"button-next"})]],2):t._e(),t._v(" "),e("div",{staticClass:"switch-icon"},[e("span",{staticClass:"icon hot",class:{active:"hot"===t.lottListType},on:{click:function(e){return t.setListType("hot")}}}),t._v(" "),e("span",{staticClass:"icon fav",class:{active:"fav"===t.lottListType},on:{click:function(e){return t.setListType("fav")}}}),t._v(" "),e("span",{staticClass:"icon recent",class:{active:"recent"===t.lottListType},on:{click:function(e){return t.setListType("recent")}}})])])]),t._v(" "),t.isLobby?e("div",{staticClass:"select-wrap"},[e("div",{staticClass:"select-title"},[t._v(t._s(t.$t("in_game_category")))]),t._v(" "),e("div",{staticClass:"select-content"},[e("span",{staticClass:"select-item",class:{active:""===t.nowTag},on:{click:function(e){return t.changeTag("")}}},[t._v("ALL")]),t._v(" "),t._l(t.vnlotts,(function(n,a){return e("span",{key:"lobby-select-"+a,staticClass:"select-item",class:{active:t.nowTag===n.tag},on:{click:function(e){return t.changeTag(n.tag)}}},[t._v("\n "+t._s(t.$t(n.labelName))+"\n ")])})),t._v(" "),e("span",{staticClass:"select-item",class:{active:"KENO"===t.nowTag},on:{click:function(e){return t.changeTag("KENO")}}},[t._v("KENO")])],2)]):t._e(),t._v(" "),e("div",{staticClass:"lott-list"},[""===t.lottListType&&"KENO"!==t.nowTag?e("div",{staticClass:"lott-history",class:[t.language,{isLobby:t.isLobby}]},[e("div",{staticClass:"history-title"},[t._v(t._s(t.$t("more_history")))]),t._v(" "),e("div",{staticClass:"history-drop"},[e("div",{staticClass:"drop-title"},[e("span",{staticClass:"title-left"},[e("span",[t._v("\n "+t._s(t.currentLott.remark)+"\n ")]),t._v(" "),e("div",{staticClass:"bot-box"},[t.vnlotts.length?e("div",{staticClass:"history-lotts-menu"},[e("swiper",{attrs:{options:t.historySwiperOption}},[e("swiper-slide",[e("span",{staticClass:"swiper-text",class:[{active:""===t.nowTag}],on:{click:function(e){return t.changeTag("")}}},[t._v("ALL")])]),t._v(" "),t._l(t.vnlotts,(function(n,a){return e("swiper-slide",{key:"his_"+a},[e("span",{staticClass:"swiper-text",class:[{active:t.nowTag===n.tag}],on:{click:function(e){return t.changeTag(n.tag)}}},[t._v("\n "+t._s(n.labelName)+"\n ")])])}))],2),t._v(" "),[e("div",{directives:[{name:"show",rawName:"v-show",value:t.isShowVnLottArrow,expression:"isShowVnLottArrow"}],staticClass:"his-prev prev his-swiper-arrow",attrs:{slot:"button-prev"},slot:"button-prev"}),t._v(" "),e("div",{directives:[{name:"show",rawName:"v-show",value:t.isShowVnLottArrow,expression:"isShowVnLottArrow"}],staticClass:"his-next next his-swiper-arrow",attrs:{slot:"button-next"},slot:"button-next"})]],2):t._e(),t._v(" "),e("div",{staticClass:"week-rows-wrap"},[t._l(t.weekCurrentLottMenu,(function(n,a){return[n.gameMenus.length>0?e("div",{key:"bot-"+a,staticClass:"option-item"},[e("div",{staticClass:"wee-box"},[t._v("\n "+t._s(t.$t(n.name))+"\n ")]),t._v(" "),e("ul",{staticClass:"games_box"},t._l(n.gameMenus,(function(n,s){return e("li",{key:`drop-lott${a}-${s}`,class:{active:t.currentLott.gameId===n.gameId},on:{click:function(e){return t.setTabActive(n)}}},[t._v("\n "+t._s(n.remark)+"\n ")])})),0)]):t._e()]}))],2)])]),t._v(" "),t.currentLott.previousWinningTime?e("span",{staticClass:"pre_time"},[t._v("\n "+t._s(t.formatDate(t.currentLott.previousWinningTime))+"\n ")]):t._e()]),t._v(" "),e("div",{staticClass:"history-line"}),t._v(" "),e("ul",{staticClass:"history-num-wrap"},t._l(t.changeNumV2(t.currentLott.previousWinningNumber),(function(n,a){return e("li",{key:"his-count-"+a,staticClass:"history-row"},[e("span",{staticClass:"name"},[t._v(t._s(t.openNumname[a]))]),t._v(" "),e("div",{staticClass:"num-row"},t._l(n,(function(n,s){return e("span",{key:`num${a}-${s}`},[t._v(t._s(n))])})),0)])})),0),t._v(" "),e("div",{staticClass:"history-line"}),t._v(" "),e("div",{staticClass:"history-bottom-wrap",on:{click:function(e){return t.startLott(t.currentLott)}}},[e("span",{staticClass:"date-icon"}),t._v(" "),e("CountDown",{attrs:{isSale:t.currentLott.isSale,time:t.currentLott.fewinTime||0}}),t._v(" "),e("span",{staticClass:"history-btn"},[t._v(t._s(t.$t("in_immediate_game")))])],1)])]):t._e(),t._v(" "),t.isLobby?[t.currentLottMenu.length?e("div",{staticClass:"lobby-wrap"},[t._l(t.currentLottMenu,(function(n,a){return["KENO"===t.nowTag?[e("GameItem",{key:"game-"+a,attrs:{game:n}})]:[e("div",{key:"lott-"+a,staticClass:"lott-slide"},[e("img",{attrs:{src:n.webIconUrl},on:{click:function(e){return t.startLott(n)}}}),t._v(" "),e("div",{staticClass:"lott-right"},[e("span",{staticClass:"fav-icon",on:{click:function(e){return t.lottFavAction(n.gameId)}}},[e("svg-icon",{attrs:{iconClass:t.lottIsFav(n.gameId)?"icon-heart-active":"icon-heart"}})],1),t._v(" "),e("p",{staticClass:"lott-remark",on:{click:function(e){return t.startLott(n)}}},[t._v(t._s(n.remark))]),t._v(" "),e("CountDown",{attrs:{isSale:n.isSale,time:n.fewinTime}}),t._v(" "),n.previousWinningNumber?e("ul",{staticClass:"lott-num-box",on:{click:function(e){return t.startLott(n)}}},t._l(t.changeNum(n.previousWinningNumber),(function(n,s){return e("li",{key:`lobby-num-${a}-${s}`},[t._v("\n "+t._s(n)+"\n ")])})),0):t._e()],1)])]]}))],2):e("div",{staticClass:"no_data"})]:[t.currentLottMenu.length?e("div",{staticClass:"lott-swiper-wrap"},[e("swiper",{attrs:{options:t.lottSwiperOption}},[t._l(t.currentLottMenu,(function(n,a){return["KENO"===t.nowTag?[e("GameItem",{key:"game-"+a,attrs:{game:n}})]:[e("swiper-slide",{key:"home-lott-"+a,staticClass:"lott-slide",class:[{on:Math.max(n.remainTime-1e3*n.lockTime,0)<t.DAYTIME,hot:n.tag&&n.tag.length&&n.tag[0]}]},[e("img",{attrs:{src:n.webIconUrl},on:{click:function(e){return t.startLott(n)}}}),t._v(" "),e("div",{staticClass:"lott-right",on:{click:function(e){return t.startLott(n)}}},[e("p",{staticClass:"lott-remark"},[t._v(t._s(n.remark))]),t._v(" "),e("CountDown",{attrs:{isSale:n.isSale,time:n.fewinTime}}),t._v(" "),n.previousWinningNumber?e("ul",{staticClass:"lott-num-box"},t._l(t.changeNum(n.previousWinningNumber),(function(n,s){return e("li",{key:`home-count-${a}-${s}`},[t._v("\n "+t._s(n)+"\n ")])})),0):t._e()],1)])]]})),t._v(" "),"KENO"!==t.nowTag?[e("swiper-slide",[e("div",{staticClass:"more-img",on:{click:t.moreFn}})])]:t._e()],2)],1):e("div",{staticClass:"no_data"})]],2)])}),[],!1,null,null,null));e.a=T.exports},Jcqh:function(t,e,n){},swHE:function(t,e,n){"use strict";n("Jcqh")}}]);