(function(e){function t(t){for(var o,r,s=t[0],c=t[1],u=t[2],l=0,d=[];lt;n&&o&&!r&&(this.$store.dispatch("betSlip/setBetSlipSingle",n),this.$store.dispatch("betSlip/setBetSlipMixParlay",o)),window.onbeforeunload=function(){window.localStorage.setItem("tempBetSlipExpiration",JSON.stringify((new Date).getTime()+15e3)),window.localStorage.setItem("tempBetSlipSingle",JSON.stringify(e.betSlipSingle)),window.localStorage.setItem("tempBetSlipMixParlay",JSON.stringify(e.betSlipMixParlay))}},handleAaoBanner:function(){if(null===this.showAcceptAnyOddsBanner){var e=s.a.get("SportsAaoPopup");e&&this.$store.commit("setShowAcceptAnyOddsBanner",!1)}},handleMatchDetailRedirect:function(){var e=s.a.get("matchDetailRoute");e&&(this.$router.push(JSON.parse(e)),s.a.remove("matchDetailRoute",{domain:Object(le["c"])()}))},handleGoToTargetPage:function(){var e=s.a.get("SwitchToSportsTargetPage");s.a.remove("SwitchToSportsTargetPage",{domain:Object(le["c"])()}),e&&""!==e&&this.$router.push({name:e})},closedBetSlip:function(){this.$store.commit("betSlip/setShowBetSlip",!1),this.$store.dispatch("betSlip/setBetSlipSingle",{})}}},De=Oe,_e=(n("774c"),Object(I["a"])(De,u,l,!1,null,null,null)),Be=_e.exports,Te=n("8b00"),Ce=(n("e2c2"),n("6b5e")),Pe=n("04e9"),Ae=n("41cb"),ke=n("4360");n("bb53");function Me(){return(ce=ce||Object(r["a"])(regeneratorRuntime.mark((function e(){var t,o,r,a,i,c;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return Object(Ce["b"])(window.location.search),e.next=3,ke["a"].dispatch("initApiInfo");case 3:if(t=e.sent,t){e.next=6;break}throw new Error("initApiInfo failed");case 6:return o=new URLSearchParams(window.location.search),r=o.get("loginname")||"",sessionStorage.setItem("loginname",r),e.next=11,n.e("chunk-68490b09").then(n.bind(null,"baa8"));case 11:if(a=e.sent,i=a.apolloProvider,c=a.provideApollo,!ke["a"].state.isAsi){e.next=27;break}return s.a.set("SportsHaveSession",1,{domain:Object(le["c"])()}),s.a.remove("switchToMPPage",{domain:Object(le["c"])()}),localStorage.setItem("isAcceptAnyCashOutValue",ke["a"].state.account.isAcceptAnyCashOutValue),e.next=20,_["b"].updateIsAcceptAnyCashOutValue(ke["a"].state.account.isAcceptAnyCashOutValue);case 20:if(!ke["a"].state.account.customerInfo.displayName){e.next=24;break}ke["a"].state.account.customerInfo.featureConfig.isSports568&&window.document.documentElement.setAttribute("data-theme","Green"),e.next=25;break;case 24:return e.abrupt("return",setTimeout(Me,500));case 25:e.next=28;break;case 27:Object(Te["b"])(Te["a"].promoCode);case 28:return e.next=30,Object(Pe["c"])();case 30:return ke["a"].state.featureToggle.isShowBlockSportsAlert&&alert("Due to a change in our PAGCOR regulation, you are no longer allowed to place any bets in Sports."),e.abrupt("return",{apolloProvider:i,provideApollo:c});case 32:case"end":return e.stop()}}),e)})))).apply(this,arguments)}Object(Pe["e"])(),c["default"].config.ignoredElements=["sports-widget"];var $e="qpxfihoagk";a["a"].init($e),Me().then((function(e){var t=e.apolloProvider,a=e.provideApollo;new c["default"]({i18n:ue["a"],router:Ae["a"],store:ke["a"],apolloProvider:t,setup:function(){a()},data:function(){return{clockIntervalId:0,getPpHeightAttempt:0}},created:function(){var e=this;return Object(r["a"])(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:e.$windowEventBus.$on("product.updateLanguage",e.changeLanguage),e.$windowEventBus.$on("product.logout",e.logout),e.$windowEventBus.$on("product.ppReady",e.ppReady),e.clockIntervalId=setInterval((function(){e.$root.$emit("tick")}),1e3);case 4:case"end":return t.stop()}}),t)})))()},mounted:function(){var e=this;return Object(r["a"])(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,e.checkAndRedirectToSportWithEvents();case 2:e.$nextTick((function(){e.$root.$emit("triggerInitialSportsFetch")}));case 3:case"end":return t.stop()}}),t)})))()},beforeDestroy:function(){this.$windowEventBus.$off("product.updateLanguage",this.changeLanguage),this.$windowEventBus.$off("product.logout",this.logout),this.$windowEventBus.$off("product.ppReady",this.ppReady),clearInterval(this.clockIntervalId)},methods:{checkAndRedirectToSportWithEvents:function(){var e=this;return Object(r["a"])(regeneratorRuntime.mark((function t(){var r,a,i,s,c,u,l,d,p,m,h,f,v,b,g,I;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(t.prev=0,r=e.$route.name,"MainBySport"===r){t.next=4;break}return t.abrupt("return");case 4:return t.next=6,n.e("chunk-68490b09").then(n.bind(null,"baa8"));case 6:return a=t.sent,i=a.apolloClient,t.next=10,Promise.resolve().then(n.t.bind(null,"5fd3",7));case 10:return s=t.sent,c=s.SportsInfoQuery,t.next=14,Promise.resolve().then(n.bind(null,"bb0a"));case 14:return u=t.sent,t.next=17,Promise.resolve().then(n.bind(null,"e2c2"));case 17:return l=t.sent,t.next=20,i.query({query:c,variables:{query:{}},fetchPolicy:"network-only",errorPolicy:"all"});case 20:d=t.sent,p=d.data.sportsInfo,p&&p.length>0&&(m=p.map((function(e){return Object(o["a"])(Object(o["a"])({},e),{},{sportType:u.default.EnumSportType[e.sport],hasEvents:e.eventCount+e.outrightTournamentCount>0})})),h=ke["a"].state.sportType,f=m.find((function(e){return e.sportType===h})),v=f&&f.hasEvents,v||(b=m.find((function(e){return e.hasEvents})),b&&(g=l.default.sportType.toRouteName(b.sportType),I="MainBySport"===e.$route.name&&e.$route.params.sportRouteName===g,I||e.$router.push({name:"MainBySport",params:{sportRouteName:g}})))),t.next=27;break;case 25:t.prev=25,t.t0=t["catch"](0);case 27:case"end":return t.stop()}}),t,null,[[0,25]])})))()},logout:function(e){_["b"].logout(e)},ppReady:function(){var e=this;if(window.isPpReady=!0,"undefined"!==typeof MutationObserver){var t=new MutationObserver((function(){e.setPpHeight()})),n=document.querySelector("#pp-component");if(null===n)return;t.observe(n,{childList:!0})}this.setPpHeight()},setPpHeight:function(){var e,t=null===(e=document.querySelector(".sboMenu-header"))||void 0===e?void 0:e.clientHeight;t&&this.$store.dispatch("headerDisplay/setState",{ppHeight:t}),this.getPpHeightAttempt<20&&(this.getPpHeightAttempt++,setTimeout(this.setPpHeight,500))}},render:function(e){return e(Be)}}).$mount("#sports")})).catch((function(e){console.error(e)}))},b368:function(e,t,n){"use strict";var o=n("e033"),r=n.n(o);r.a},bb53:function(e,t,n){},e033:function(e,t,n){},e542:function(e,t,n){var o={"./img_voucherTutorial_EN.png":"4296","./img_voucherTutorial_ID_ID.png":"5d7e","./img_voucherTutorial_JA_JP.png":"98cd","./img_voucherTutorial_KO_KR.png":"510c","./img_voucherTutorial_MY_MM.png":"774a","./img_voucherTutorial_TH_TH.png":"44a4","./img_voucherTutorial_VI_VN.png":"163f","./img_voucherTutorial_ZH_CN.png":"5959"};function r(e){var t=a(e);return n(t)}function a(e){if(!n.o(o,e)){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}return o[e]}r.keys=function(){return Object.keys(o)},r.resolve=a,e.exports=r,r.id="e542"}}); //# sourceMappingURL=sports.c3a27ad3.js.map