(this.webpackJsonpwebsite=this.webpackJsonpwebsite||[]).push([[88],{1195:function(e,t,a){},1303:function(e,t,a){"use strict";a.r(t);var n=a(5),o=a.n(n),l=a(12),r=a(75),i=a(0),c=a.n(i),s=a(62),u=a(39),m=(a(1195),a(351)),d=a(320),b=a(323),v=a(743),p=a(607),g=a(885),f=a(355),w=Object(f.a)(c.a.createElement("path",{d:"M8.12 9.29L12 13.17l3.88-3.88c.39-.39 1.02-.39 1.41 0 .39.39.39 1.02 0 1.41l-4.59 4.59c-.39.39-1.02.39-1.41 0L6.7 10.7a.9959.9959 0 010-1.41c.39-.38 1.03-.39 1.42 0z"}),"KeyboardArrowDownRounded"),y=a(52);t.default=Object(s.b)((function(e){return{gameUrl:e.common.dcGameUrl,loggedIn:e.auth.loggedIn,isMolobby:e.auth.isMolobby,langData:e.common.langData}}),null)((function(e){e.isMolobby;var t=e.langData,a=Object(i.useState)(""),n=Object(r.a)(a,2),s=n[0],f=n[1],h=Object(i.useState)(!1),E=Object(r.a)(h,2),j=(E[0],E[1]),O=e.loggedIn,k=Object(u.g)(),N=Object(i.useRef)(null),x=Object(i.useState)(!1),_=Object(r.a)(x,2),I=_[0],L=_[1],M=Object(i.useCallback)(function(){var e=Object(l.a)(o.a.mark((function e(t,a,n,l){var r,i,c,s,u;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!O){e.next=19;break}if(j(!0),i=sessionStorage.getItem("jwt_token").split(".")[1],0!==(c=JSON.parse(window.atob(i)).status)&&3!==c){e.next=6;break}return e.abrupt("return",k.push("/home"));case 6:return e.prev=6,u={gameId:t,providerName:n,subProviderName:l,platformId:m.isMobile?"mobile":"desktop",type:"MINI"},e.next=10,y.a.post("/catalog/v2/live-casino/game-url",u,{headers:{Authorization:sessionStorage.getItem("jwt_token")}});case 10:s=e.sent,e.next=16;break;case 13:e.prev=13,e.t0=e.catch(6),console.log(e.t0);case 16:(null===(r=s)||void 0===r?void 0:r.data)&&(f(s.data),j(!1)),e.next=20;break;case 19:k.push("/");case 20:case"end":return e.stop()}}),e,null,[[6,13]])})));return function(t,a,n,o){return e.apply(this,arguments)}}(),[O,k]);Object(i.useEffect)((function(){var e=function(){M("902000","YG-MLOBBY","RG","Yuvi Games Lobby")};return window.addEventListener("mlobby-mini-open",e),function(){return window.removeEventListener("mlobby-mini-open",e)}}),[M]);var S=function(e){L(e)};return c.a.createElement(c.a.Fragment,null,c.a.createElement("div",{ref:N,className:"mlobby-main-dc d-none"},c.a.createElement("div",{className:"mini-iframe-close-btn",onClick:function(){N.current.classList.add("d-none");var e=document.getElementsByClassName("router-ctn")[0];e&&(e.style.maxHeight="100vh",e.style.overflowY="auto"),document.getElementsByClassName("mini-casino-btn")[0].classList.remove("d-none")}},c.a.createElement(w,null)),c.a.createElement("div",{className:"dc-iframe-ctn-mlobby"},c.a.createElement("iframe",{src:s,title:null===t||void 0===t?void 0:t.dc_game,allowFullScreen:!0,sandbox:"allow-same-origin allow-forms allow-scripts allow-top-navigation allow-popups"}))),c.a.createElement(d.a,{open:I,onClose:function(){return S(!1)},"aria-labelledby":"form-dialog-title",maxWidth:"xs"},c.a.createElement(v.a,{id:"form-dialog-title"},null===t||void 0===t?void 0:t.notice),c.a.createElement(b.a,null,c.a.createElement("div",{className:"dc-dialog-body"},null===t||void 0===t?void 0:t.you_have_to_be_logged_in_to_play)),c.a.createElement(g.a,{className:"dc-dialog-actions"},c.a.createElement(p.a,{onClick:function(){return S(!1)},color:"primary",autoFocus:!0},null===t||void 0===t?void 0:t.ok))))}))}}]); //# sourceMappingURL=88.9ed4f633.chunk.js.map