{"version":3,"file":"static/chunks/pages/casino/limbo-243c6ef0faf1b329.js","sources":["webpack://_N_E/./src/modules/games/Game/store/limbo/limbo.actions.js","webpack://_N_E/./src/modules/games/Game/store/limbo/limbo.constants.js","webpack://_N_E/./src/modules/games/Game/types/RollRule.ts","webpack://_N_E/./src/modules/games/LimboGame/LimboCounter/LimboCounter.jsx","webpack://_N_E/./src/modules/games/LimboGame/LimboCounter/LimboCounter.container.js","webpack://_N_E/./src/modules/games/LimboGame/LimboGame.jsx","webpack://_N_E/./src/modules/games/LimboGame/LimboGame.container.js","webpack://_N_E/./src/pages/casino/limbo.tsx","webpack://_N_E/?54f1"],"sourceRoot":"","sourcesContent":["import { actionSimple } from '@legacyApp/client/modules/app/actionService';\nimport {\n\tLIMBO_SET_DEFAULT_PAYOUT,\n\tLIMBO_SET_LOADING,\n\tLIMBO_SET_RESULT,\n} from './limbo.constants';\n\nexport const limboSetResult = actionSimple(LIMBO_SET_RESULT);\nexport const limboSetLoading = actionSimple(LIMBO_SET_LOADING);\nexport const limboSetDefaultPayout = actionSimple(LIMBO_SET_DEFAULT_PAYOUT);\n","export const LIMBO_SET_RESULT = 'LIMBO_SET_RESULT';\nexport const LIMBO_SET_DEFAULT_PAYOUT = 'LIMBO_SET_DEFAULT_PAYOUT';\nexport const LIMBO_SET_LOADING = 'LIMBO_SET_LOADING';\n","export enum RollRule {\n\tDIRECT = 'direct',\n\tUNDER = 'under',\n\tOVER = 'over',\n\tBETWEEN = 'between',\n\tOUTSIDE = 'outside',\n\tTWO_RANGE = 'two_ranges',\n}\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport classnames from 'classnames';\nimport CountUp from 'react-countup';\nimport { faTimes } from '@fortawesome/free-solid-svg-icons';\nimport { enhanceComponent } from '@legacyApp/client/wrappers/enhanceComponent';\nimport { AwesomeIcon } from '@common/components/icons/AwesomeIcon';\nimport { isTrueOrZero } from '@common/methods/isTrueOrZero';\nimport { checkHotkeysAllowed } from '@legacyApp/client/modules/app/checkHotkeysAllowed';\nimport { roundNumber } from '@common/methods/roundNumber/roundNumber';\nimport { StyledLimboCounter } from './LimboCounter.styled';\n\nclass LimboCounter extends React.PureComponent {\n\tstatic propTypes = {\n\t\tresult: PropTypes.any,\n\t\ttarget: PropTypes.any,\n\t\tanimation: PropTypes.bool,\n\t\tset: PropTypes.func,\n\t\tsmall: PropTypes.bool,\n\t\thotkeys: PropTypes.bool,\n\t\tclassName: PropTypes.any,\n\t\tupdateTarget: PropTypes.func,\n\t\tgetHotkey: PropTypes.func,\n\t\tdisableHotkeys: PropTypes.bool,\n\t\tscreenWidth: PropTypes.number,\n\t};\n\n\tconstructor(props) {\n\t\tsuper(props);\n\t\tthis.state = {\n\t\t\tclassName: '',\n\t\t};\n\t\tthis.timeout = null;\n\t\tthis.el = React.createRef();\n\t}\n\n\tcomponentDidMount() {\n\t\tif (this.props.hotkeys) {\n\t\t\twindow.addEventListener('keydown', this.handleKeyboard);\n\t\t}\n\t}\n\n\tcomponentDidUpdate(prevProps) {\n\t\tif (this.props.result !== prevProps.result) {\n\t\t\tthis.onStart();\n\t\t}\n\t}\n\n\tcomponentWillUnmount() {\n\t\tif (this.props.hotkeys) {\n\t\t\twindow.removeEventListener('keydown', this.handleKeyboard);\n\t\t}\n\t\tif (this.timeout) {\n\t\t\tclearTimeout(this.timeout);\n\t\t}\n\t\tif (this.props.set) {\n\t\t\tthis.props.set(false);\n\t\t}\n\t}\n\n\thandleKeyboard = (obj) => {\n\t\tif (!this.el || !checkHotkeysAllowed(this.props.disableHotkeys)) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (obj.keyCode === this.props.getHotkey('lower_target', 'limbo').keyCode) {\n\t\t\tobj.preventDefault();\n\t\t\tthis.props.updateTarget(\n\t\t\t\troundNumber(parseFloat(this.props.target) - 1, 0),\n\t\t\t);\n\t\t}\n\n\t\tif (\n\t\t\tobj.keyCode === this.props.getHotkey('higher_target', 'limbo').keyCode\n\t\t) {\n\t\t\tobj.preventDefault();\n\t\t\tthis.props.updateTarget(\n\t\t\t\troundNumber(parseFloat(this.props.target) + 1, 0),\n\t\t\t);\n\t\t}\n\t};\n\n\tonEnd = () => {\n\t\tif (!this.props.result) {\n\t\t\treturn;\n\t\t}\n\t\tthis.setState({\n\t\t\tclassName: this.props.target\n\t\t\t\t? parseFloat(this.props.result) >= parseFloat(this.props.target)\n\t\t\t\t\t? 'text-positive'\n\t\t\t\t\t: 'text-negative'\n\t\t\t\t: '',\n\t\t});\n\t};\n\n\tonStart = () => {\n\t\tif (!this.props.animation) {\n\t\t\treturn this.onEnd();\n\t\t}\n\t\tthis.setState({\n\t\t\tclassName: '',\n\t\t});\n\t\tif (this.props.result) {\n\t\t\tthis.timeout = setTimeout(() => this.onEnd(), 400);\n\t\t}\n\t};\n\n\trender() {\n\t\tconst result = parseFloat(this.props.result || 1);\n\t\treturn (\n\t\t\t