"use strict";(self.webpackChunkcrashlogic=self.webpackChunkcrashlogic||[]).push([[114],{7114:(e,t,n)=>{n.r(t),n.d(t,{BASE_POPUP_NAMES:()=>o.BASE_POPUP_NAMES,BaseHubMethodNames:()=>i.BaseHubMethodNames,BaseHubRequests:()=>re.C,BaseHubResponseModels:()=>i.BaseHubResponseModels,CashoutTypeEnum:()=>p.AS,CrashGameConnection:()=>A,GAME_DURATION:()=>v.U8,GameButtonStates:()=>v.WH,HubMethodNames:()=>p.GO,HubRequests:()=>p.Kb,HubResponseModels:()=>p.IP,MAX_PRECISION:()=>v.ps,TicketList:()=>ie,getBetTypeBySelectedBonus:()=>v.hd,initialState:()=>r.Z,mappedGlobalBonusHistory:()=>Pe,mappedGlobalHistory:()=>ke,mappedHistory:()=>Se,mappedLeaders:()=>Ie,mappedPlayers:()=>ve,mappedPlayersV2:()=>he,mappedResults:()=>we,mappedStatistics:()=>ge,numberToSpacedStringLocal:()=>v.LG,setNumberToKMB:()=>v.x$,subtractWithPrecision:()=>v.fC,sumWithPrecision:()=>v.E_,useBaseRequests:()=>re.c});var o=n(8030),i=n(248),r=n(3688),c=n(6606),a=n(8416),s=n(5694),l=n(6345),u=n(1100),d=n.n(u),f=n(3953),y=n(701),b=n(1277),m=n(8513),p=n(342),v=n(2663);function h(e){var t;if(e>=0&&e<=1.7){var n=Math.pow(1.091,e/1.7)-.02;t=n<1?1:n}else t=e>1.7&&e<=5?Math.pow(1.091,(4*e-3.5)/3.3)-.02:Math.pow(1.091,e)-.02;return Math.round(100*t)/100}function S(e){return S="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},S(e)}function I(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function w(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,o=new Array(t);n0||"number"!=typeof c.win&&i.win>0)&&y.settings.playSound("win"),"number"==typeof i.win&&"number"==typeof c.win&&(P["Cashout_".concat(t)]&&clearTimeout(P["Cashout_".concat(t)]),P["Cashout_".concat(t)]=setTimeout((function(){r(m.actions.movePendingToCurrentStake({index:t}))}),v.rL))}}return(0,a.useEffect)((function(){W.current=E}),[E]),(0,a.useEffect)((function(){v.xf&&(T(),null===d()||void 0===d()||d().setItem("useBonus_hook_enabled_".concat(v.GZ.toLowerCase()),!1))}),[]),(0,a.useEffect)((function(){A&&(f.hubConnection.on(p.GO.GetInitialState,(function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:p.IP.GetInitialState;r(m.actions.setInitialState(t)),(e=new Map).set(p.GO.GetTotalSeconds,(function(e){r(m.actions.updateGameSecond(e))})).set(p.GO.LogOutPlayer,(function(){window.location.href="".concat(window.location.origin,"/?PartnerId=").concat(v.y_,"&culture=").concat(v.TG,"&gameType=").concat(v.GZ,"&isMobile=").concat(v.tq,"&isLogout=true")})).set(p.GO.AddStake,(function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:p.IP.AddStake;r(m.actions.addNotification((0,c.getNotificationById)(W.current,0))),r(m.actions.addMyTicket(e)),window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"bet_success",game_name:v.GZ})})).set(p.GO.AddOtherStake,(function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:p.IP.AddOtherStake;e.playerId!==+v.QW&&r(m.actions.addOtherTicket({otherTicket:e}))})).set(p.GO.AddStakeValidation,(function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:p.IP.AddStakeValidation,t=e.index,n=e.validation,o=null;switch(null===d()||void 0===d()||d().removeItem("pending_autobet_".concat(t)),null===d()||void 0===d()||d().removeItem("autobet_count_".concat(t)),null===d()||void 0===d()||d().removeItem("externalAutoPlayOptions_".concat(t)),n){case 2:o=g;break;case 12:o=k}r(m.actions.cancelMyTicket({index:t})),r(m.actions.addNotification((0,c.getNotificationById)(W.current,n,o)))})).set(p.GO.StopStake,(function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:p.IP.StopStake,t=e.index,n=e.validation;e.stopStakeResult?r(m.actions.cashoutMyTicket(e)):(r(m.actions.addNotification((0,c.getNotificationById)(W.current,n))),r(m.actions.setPlayerPressed({index:t,pressed:!1})))})).set(p.GO.CancelStake,(function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:p.IP.CancelStake,t=e.index,n=e.validation;e.success?r(m.actions.cancelMyTicket(e)):(r(m.actions.addNotification((0,c.getNotificationById)(W.current,n))),r(m.actions.setPlayerPressed({index:t,pressed:!1})))})).set(p.GO.CancelOtherStake,(function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:p.IP.CancelOtherStake;r(m.actions.cancelOtherTicket(e))})).set(p.GO.StartRound,(function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:p.IP.StartRound;r(m.actions.setStartRoundState(e)),v.xf||j("GalaxsysRound",{state:"start"})})).set(p.GO.ReportStatus,(function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:p.IP.ReportStatus;(0,s.batch)((function(){var t;r((0,m.conditionallySetCoefficientIfExists)(e)),(null==e||null===(t=e.finishedTickets)||void 0===t?void 0:t.length)>0&&r(m.actions.setFinishedTickets(e))}));var t=e.seconds;if(t){var n=t;O&&clearTimeout(O),O=setTimeout((function(){C&&clearInterval(C)}),1e3),C&&clearInterval(C),C=setInterval((function(){n+=.15,r(m.actions.setCoefficient({coefficient:h(n),seconds:n}))}),150)}})).set(p.GO.ReportCoefficient,(function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:p.IP.ReportCoefficient;r((0,m.conditionallySetCoefficientIfExists)(e))})).set(p.GO.ReportTickets,(function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:p.IP.ReportTickets;r(m.actions.setFinishedTickets(e))})).set(p.GO.FinishRound,(function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:p.IP.FinishRound;C&&clearInterval(C),O&&clearTimeout(O),(0,s.batch)((function(){r(m.actions.setFinishRoundState(e))})),r((0,m.condintionallyUpdateAfterFinishStateAsync)(800)),v.xf||j("GalaxsysRound",{state:"finish"})})).set(i.BaseHubMethodNames.Deactivated,(function(){var e;null!==(e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:i.BaseHubResponseModels.Deactivated).partnerIds)&&void 0!==e&&e.includes(v.y_)&&(T(),r(m.actions.closeAllPopups()),r(m.actions.setDeactivated(!0)))})).set(i.BaseHubMethodNames.ExpiredToken,(function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:p.IP.ExpiredToken;T(),r(m.actions.setExpiredToken(e)),f.hubConnection.dontReconnect=!0,f.hubConnection.stop()})),e.forEach((function(e,t){f.hubConnection.off(t),f.hubConnection.on(t,e)}))})),f.hubConnection.on(i.BaseHubMethodNames.GetInitialStateGameTickets,(function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:p.IP.GetInitialStateGameTickets;r(m.actions.setInitialStateSharedTickets(e))})),f.hubConnection.on(i.BaseHubMethodNames.GetInitialStateLastRoundTickets,(function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:p.IP.GetInitialStateGameTickets;r(m.actions.setInitialStateLastRoundTickets(e))})))}),[A]),(0,a.useEffect)((function(){B.isOn&&B.isLoaded&&y.settings.playMusic("background")}),[B.isLoaded,B.isOn]),(0,a.useEffect)((function(){switch(S){case l.GameStatus.Countdown:I.forEach((function(e,t){if(e.pending){var n=e.pending,o=n.autoBet,i=n.isAutoBet;if(v.xf)!i||o>0?(r(m.actions.addNotification((0,c.getNotificationById)(W.current,0))),r(m.actions.addDemoTicket({index:t}))):r(m.actions.clearStake({index:t}));else if(!i||o>0){r(m.actions.setPlayerPressed({index:t,pressed:!0}));var a=new p.Kb.AddStake(w(w({activeGameId:v.N2,partnerId:v.y_,token:_,gameId:N},e.pending),{},{combination:{autoCashout:e.pending.autoCashout,isAutoBet:e.pending.isAutoBet,index:t},index:t}));(0,f.requestToServer)(a)}}}));break;case l.GameStatus.Loading:y.settings.playSound("explode")}}),[S]),(0,a.useEffect)((function(){D(I[0],0)}),[null===(e=I[0].current)||void 0===e||null===(e=e.betInfo[0])||void 0===e?void 0:e.win,null===(t=I[0].current)||void 0===t||null===(t=t.betInfo[1])||void 0===t?void 0:t.win]),(0,a.useEffect)((function(){D(I[1],1)}),[null===(n=I[1].current)||void 0===n?void 0:n.betInfo[0].win,null===(o=I[1].current)||void 0===o?void 0:o.betInfo[1].win]),null};const A=(0,a.memo)(B);var _=n(5480),E=n.n(_),N=n(669),W=n.n(N),D=n(1905),G=n.n(D),L=n(5234),M=n.n(L),R=n(1846),H=n.n(R),F=n(4223),U=n.n(F),q=n(6346),X=n.n(q),K=n(8247),Z=n.n(K),$=n(5893);function Q(e){return Q="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Q(e)}function V(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);ne.length)&&(t=e.length);for(var n=0,o=new Array(t);n