{"version":3,"file":"static/chunks/infoModal.container.0bcb880b28379271.js","sources":["webpack://_N_E/./src/LegacyApp/client/components/infoModal/infoModal.style.js","webpack://_N_E/./src/LegacyApp/client/components/infoModal/infoModal.jsx","webpack://_N_E/./src/LegacyApp/client/components/infoModal/infoModal.container.ts","webpack://_N_E/./src/modules/games/Game/store/gameAutobet/gameAutobet.actions.ts"],"sourceRoot":"","sourcesContent":["import styled from 'styled-components';\nimport { rgba } from 'polished';\n\nexport const InfoModalStyle = styled.div.attrs(() => ({\n\tclassName: 'info-modal',\n}))`\n\tz-index: 99998; // 5\n\tposition: fixed;\n\ttransform: translate(-50%, -50%);\n\ttop: 50%;\n\tleft: 50%;\n\tmax-width: 900px;\n\twidth: 90vw;\n\tuser-select: text;\n\t${(props) => (props.open ? '' : 'display: none;')}\n\n\t* {\n\t\tuser-select: text;\n\t}\n\n\t&:before {\n\t\tcontent: '';\n\t\tposition: absolute;\n\t\twidth: 300vw;\n\t\theight: 300vh;\n\t\tbackground: ${(props) => rgba(props.theme.colors.background, 0.9)};\n\t\ttop: -100vh;\n\t\tleft: -100vw;\n\t\tz-index: -1;\n\t}\n\n\t> h3 {\n\t\ttext-align: center;\n\t\tmargin-bottom: 5px;\n\t\ttext-shadow: 0 0 3px ${(props) => props.theme.colors.background};\n\t\tcolor: ${(props) => props.theme.colors.text};\n\t}\n\n\t> button {\n\t\tbackground-color: ${(props) => props.theme.colors.active};\n\t\tposition: absolute;\n\t\tright: -17px;\n\t\ttop: 17px;\n\t\tpadding: 0;\n\t\theight: 25px;\n\t\twidth: 25px;\n\t}\n\n\t> section {\n\t\tfloat: left;\n\t\twidth: 100%;\n\t\theight: auto;\n\t\tbackground-color: #072349;\n\t\tborder: 2px solid ${(props) => props.theme.colors.active};\n\t\tpadding: 25px;\n\t\tborder-radius: 6px;\n\t}\n`;\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport { faTimes } from '@fortawesome/free-solid-svg-icons';\nimport { modalService } from '../../../../modules/modals/modalService';\nimport { Button } from '../button';\nimport transactionService from '../../../../modules/transactions/transactionsService';\nimport { enhanceComponent } from '../../wrappers/enhanceComponent';\nimport { trans } from '../../modules/translation/translate';\nimport { AwesomeIcon } from '../../../../common/components/icons/AwesomeIcon';\nimport ModalStoreController from '../../../../common/components/storeControllers/ModalStoreController';\nimport { InfoModalStyle } from './infoModal.style';\n\nclass InfoModal extends React.PureComponent {\n\tstatic propTypes = {\n\t\tid: PropTypes.any,\n\t\topen: PropTypes.bool,\n\t\tclose: PropTypes.func.isRequired,\n\t\tprops: PropTypes.any,\n\t};\n\n\tconstructor(props) {\n\t\tsuper(props);\n\t\tthis.state = {\n\t\t\telement: false,\n\t\t};\n\t\tthis.modalBox = React.createRef();\n\t}\n\n\tcomponentDidMount() {\n\t\tthis.setModal();\n\t}\n\n\thandleClickOutside = () => {\n\t\tif (this.props.id) {\n\t\t\tthis.props.close();\n\t\t}\n\t};\n\n\tcomponentDidUpdate(prevProps) {\n\t\tconst isModalChanged =\n\t\t\tprevProps.id !== this.props.id ||\n\t\t\t!transactionService.isDuplicate(this.props.props, prevProps.props);\n\n\t\t// console.log('modal - componentDidUpdate', {\n\t\t//   isModalChanged,\n\t\t//   isOpenChanged,\n\t\t//   isOpened,\n\t\t//   isDuplicate: transactionService.isDuplicate(this.props.props, prevProps.props),\n\t\t//   propsProps: {...this.props.props || {}},\n\t\t//   prevPropsProps: {...prevProps.props || {}},\n\t\t//   props: {...this.props},\n\t\t//   prevProps: {...prevProps},\n\t\t// });\n\n\t\tif (isModalChanged) {\n\t\t\tthis.setModal();\n\t\t}\n\t}\n\n\tsetModal = (id = this.props.id) => {\n\t\tif (!id) {\n\t\t\treturn this.setState({\n\t\t\t\telement: false,\n\t\t\t});\n\t\t}\n\t\tconst element = modalService.getElement(this.props.id, this.props.props);\n\t\tif (!element) {\n\t\t\treturn this.props.close();\n\t\t}\n\t\tthis.setState({\n\t\t\telement,\n\t\t});\n\t};\n\n\trender() {\n\t\treturn (\n\t\t\t<>\n\t\t\t\t<ModalStoreController />\n\t\t\t\t<InfoModalStyle open={this.props.open} ref={this.modalBox}>\n\t\t\t\t\t<Button name=\"close-info-modal\" onClick={this.props.close}>\n\t\t\t\t\t\t<AwesomeIcon icon={faTimes} />\n\t\t\t\t\t</Button>\n\t\t\t\t\t{this.props.props && this.props.props.title && (\n\t\t\t\t\t\t<h3>\n\t\t\t\t\t\t\t{typeof this.props.props.title === 'string'\n\t\t\t\t\t\t\t\t? trans({ label: this.props.props.title })\n\t\t\t\t\t\t\t\t: this.props.props.title}\n\t\t\t\t\t\t</h3>\n\t\t\t\t\t)}\n\t\t\t\t\t<section>{this.state.element}</section>\n\t\t\t\t</InfoModalStyle>\n\t\t\t</>\n\t\t);\n\t}\n}\n\nInfoModal = enhanceComponent({\n\tInfoModal,\n\tprops: {\n\t\tclickOutside: true,\n\t},\n});\n\nexport { InfoModal };\n","import { connect } from 'react-redux';\nimport { modalCloseInfo } from '../../../../modules/modals/store/modal.actions';\nimport { InfoModal } from './infoModal';\n\nconst mapStateToProps = (state) => {\n\treturn {\n\t\tid: state.modal?.info?.id,\n\t\topen: !!state.modal?.info?.id,\n\t\tprops: state.modal?.info?.props,\n\t};\n};\n\nconst mapDispatchToProps = (dispatch) => {\n\treturn {\n\t\tclose: () => dispatch(modalCloseInfo()),\n\t};\n};\n\nconst InfoModalContainer = connect(\n\tmapStateToProps,\n\tmapDispatchToProps,\n)(InfoModal);\n\nexport default InfoModalContainer;\n","import { actionSimple } from '@legacyApp/client/modules/app/actionService';\nimport { CurrencyType } from '@legacyApp/types/wallet/CurrencyType';\nimport { roundNumber } from '@common/methods/roundNumber/roundNumber';\nimport { LocalStorageKeys } from '@modules/localStorage/types/localStorageKeys.type';\nimport { GameType } from '../../constants/availableGames';\nimport { RollRule } from '../../types/RollRule';\nimport { AutoBetMode } from '../game/thunks/handleBet.thunk';\nimport {\n\tAUTOBET,\n\tAUTOBET_CLEAR,\n\tAUTOBET_PAUSE,\n\tAUTOBET_PLAY,\n\tAUTOBET_RESET_TO_DEFAULT,\n\tAUTOBET_ROLLING,\n\tAUTOBET_SET_ACTIVE,\n\tAUTOBET_SET_AUTO_STATS,\n\tAUTOBET_SET_CONFIG,\n\tAUTOBET_SET_CONFIG_EASY,\n\tAUTOBET_SET_CURRENCY,\n\tAUTOBET_SET_DEFAULTS,\n\tAUTOBET_SET_EDIT_MODAL,\n\tAUTOBET_SET_ID,\n\tAUTOBET_SET_MANUAL,\n\tAUTOBET_SET_MODE,\n\tAUTOBET_SET_PAUSE,\n\tAUTOBET_SET_PAUSE_DATA,\n\tAUTOBET_SET_ROLLS,\n\tAUTOBET_SET_ROLLS_COUNTER,\n\tAUTOBET_STOP,\n\tAUTOBET_STOPPED,\n\tAUTOBET_SUMMARY_CONNECTION_ERROR,\n\tAUTOBET_UPDATE_CONFIG_EASY,\n\tDELETE_AUTOBET_STRATEGY,\n\tDISABLE_CHECK_AUTOBET_STRATEGY,\n\tEDIT_AUTOBET_STRATEGY,\n\tGET_AUTOBET_STRATEGIES,\n\tSAVE_AUTOBET_STRATEGY,\n\tSET_ACTIVE_AUTOBET_STRATEGY,\n\tSET_AUTOBET_STRATEGIES,\n} from './gameAutobet.constants';\n\nexport const autobet = actionSimple(AUTOBET);\n\nexport const autobetPause = actionSimple(AUTOBET_PAUSE);\n\nexport const autobetSetPause = actionSimple(AUTOBET_SET_PAUSE);\n\nexport const autobetSetPauseData = actionSimple(AUTOBET_SET_PAUSE_DATA);\n\nexport const saveAutobetStrategy = (payload, setActive) => ({\n\ttype: SAVE_AUTOBET_STRATEGY,\n\tpayload,\n\tsetActive,\n});\n\nexport const editAutobetStrategy = actionSimple(EDIT_AUTOBET_STRATEGY);\n\nexport const setAutobetStrategies = actionSimple(SET_AUTOBET_STRATEGIES);\n\nexport const getAutobetStrategies = actionSimple(GET_AUTOBET_STRATEGIES);\n\nexport const deleteAutobetStrategy = actionSimple(DELETE_AUTOBET_STRATEGY);\n\nexport const setActiveAutobetStrategy = actionSimple(\n\tSET_ACTIVE_AUTOBET_STRATEGY,\n);\n\nexport const disableCheckAutobetStrategy = actionSimple(\n\tDISABLE_CHECK_AUTOBET_STRATEGY,\n);\n\nexport const getAutobetSessionLength = (game) => {\n\treturn (dispatch, getState) => {\n\t\tconst gameSession = getState().gameSession;\n\t\treturn roundNumber(\n\t\t\tparseFloat(gameSession.lostAuto[game]) +\n\t\t\t\tparseFloat(gameSession.wonAuto[game]),\n\t\t\t0,\n\t\t);\n\t};\n};\n\nexport const autobetSummaryConnectionError = (\n\tbet,\n\tdata = null,\n\tonlyAlert = false,\n) => ({\n\ttype: AUTOBET_SUMMARY_CONNECTION_ERROR,\n\tbet,\n\tdata,\n\tonlyAlert,\n});\n\nexport const autobetSetRolls = actionSimple(AUTOBET_SET_ROLLS);\n\nexport const autobetSetRollsCounter = actionSimple(AUTOBET_SET_ROLLS_COUNTER);\n\nexport const autobetSetActive = actionSimple<{\n\tgame: GameType;\n\tvalue: AutoBetMode | boolean;\n}>(AUTOBET_SET_ACTIVE);\n\nexport const autoBetRolling = actionSimple(AUTOBET_ROLLING);\n\nexport interface AutobetPlayProps {\n\tgame: GameType;\n\tcurrency: CurrencyType;\n\trule?: RollRule;\n\tstopped?: boolean;\n\tmanualConfirmed?: boolean;\n}\n\nexport const autobetPlay = actionSimple<AutobetPlayProps>(AUTOBET_PLAY);\n\nexport const autobetStop = actionSimple(AUTOBET_STOP);\n\nexport const autobetStopped = actionSimple(AUTOBET_STOPPED);\n\nexport const autobetClear = actionSimple(AUTOBET_CLEAR);\n\nexport const autobetSetMode = actionSimple(AUTOBET_SET_MODE, {\n\tlsKey: LocalStorageKeys.AUTOBET_MODE,\n});\n\nexport const autobetSetConfig = actionSimple(AUTOBET_SET_CONFIG);\n\nexport const autobetSetEditModal = actionSimple(AUTOBET_SET_EDIT_MODAL);\n\nexport const autobetSetConfigEasy = actionSimple(AUTOBET_SET_CONFIG_EASY);\n\nexport const autobetUpdateConfigEasy = actionSimple(AUTOBET_UPDATE_CONFIG_EASY);\n\nexport const autobetSetAutoStats = actionSimple(AUTOBET_SET_AUTO_STATS);\n\nexport const autobetSetId = (game, id) => ({\n\ttype: AUTOBET_SET_ID,\n\tgame,\n\tid,\n});\n\nexport const autobetSetCurrency = (game, payload) => ({\n\ttype: AUTOBET_SET_CURRENCY,\n\tgame,\n\tpayload,\n});\n\nexport const autobetSetManual = actionSimple(AUTOBET_SET_MANUAL);\n\nexport const autobetResetToDefault = actionSimple(AUTOBET_RESET_TO_DEFAULT);\nexport const autobetSetDefaults = actionSimple(AUTOBET_SET_DEFAULTS);\n"],"names":["InfoModalStyle","styled","className","props","open","rgba","theme","colors","background","text","active","InfoModal","id","close","setState","element","modalService","state","modalBox","React","this","setModal","prevProps","transactionService","ModalStoreController","ref","name","onClick","AwesomeIcon","icon","faTimes","title","trans","label","enhanceComponent","clickOutside","connect","modal","info","dispatch","modalCloseInfo","autobet","actionSimple","AUTOBET","autobetPause","AUTOBET_PAUSE","autobetSetPause","AUTOBET_SET_PAUSE","autobetSetPauseData","AUTOBET_SET_PAUSE_DATA","saveAutobetStrategy","payload","setActive","type","SAVE_AUTOBET_STRATEGY","editAutobetStrategy","EDIT_AUTOBET_STRATEGY","setAutobetStrategies","SET_AUTOBET_STRATEGIES","getAutobetStrategies","GET_AUTOBET_STRATEGIES","deleteAutobetStrategy","DELETE_AUTOBET_STRATEGY","setActiveAutobetStrategy","SET_ACTIVE_AUTOBET_STRATEGY","disableCheckAutobetStrategy","DISABLE_CHECK_AUTOBET_STRATEGY","autobetSummaryConnectionError","bet","data","onlyAlert","AUTOBET_SUMMARY_CONNECTION_ERROR","autobetSetRolls","AUTOBET_SET_ROLLS","autobetSetRollsCounter","AUTOBET_SET_ROLLS_COUNTER","autobetSetActive","AUTOBET_SET_ACTIVE","autoBetRolling","AUTOBET_ROLLING","autobetPlay","AUTOBET_PLAY","autobetStop","AUTOBET_STOP","autobetStopped","AUTOBET_STOPPED","autobetClear","AUTOBET_CLEAR","autobetSetMode","AUTOBET_SET_MODE","lsKey","LocalStorageKeys","autobetSetConfig","AUTOBET_SET_CONFIG","autobetSetEditModal","AUTOBET_SET_EDIT_MODAL","autobetSetConfigEasy","AUTOBET_SET_CONFIG_EASY","autobetUpdateConfigEasy","AUTOBET_UPDATE_CONFIG_EASY","autobetSetAutoStats","AUTOBET_SET_AUTO_STATS","autobetSetId","game","AUTOBET_SET_ID","autobetSetCurrency","AUTOBET_SET_CURRENCY","autobetSetManual","AUTOBET_SET_MANUAL","autobetResetToDefault","AUTOBET_RESET_TO_DEFAULT","autobetSetDefaults","AUTOBET_SET_DEFAULTS"],"mappings":";;mWAGaA,EAAiBC,EAAAA,GAAAA,IAAAA,OAAiB,iBAAO,CACrDC,UAAW,iBADe,iEAAGD,CAAH,qjBAWxB,SAACE,GAAD,OAAYA,EAAMC,KAAO,GAAK,oBAWjB,SAACD,GAAD,OAAWE,EAAAA,EAAAA,IAAKF,EAAMG,MAAMC,OAAOC,WAAY,OAStC,SAACL,GAAD,OAAWA,EAAMG,MAAMC,OAAOC,cAC5C,SAACL,GAAD,OAAWA,EAAMG,MAAMC,OAAOE,QAInB,SAACN,GAAD,OAAWA,EAAMG,MAAMC,OAAOG,UAc9B,SAACP,GAAD,OAAWA,EAAMG,MAAMC,OAAOG,U,ycCzC9CC,EAAAA,SAAAA,I,uBAQL,WAAYR,GAAO,4BAClB,cAAMA,IADY,wCAYE,WAChB,EAAKA,MAAMS,IACd,EAAKT,MAAMU,YAdM,8BAuCR,WAAwB,IAAvBD,EAAuB,uDAAlB,EAAKT,MAAMS,GAC3B,IAAKA,EACJ,OAAO,EAAKE,SAAS,CACpBC,SAAS,IAGX,IAAMA,EAAUC,EAAAA,EAAAA,WAAwB,EAAKb,MAAMS,GAAI,EAAKT,MAAMA,OAClE,IAAKY,EACJ,OAAO,EAAKZ,MAAMU,QAEnB,EAAKC,SAAS,CACbC,QAAAA,OAhDD,EAAKE,MAAQ,CACZF,SAAS,GAEV,EAAKG,SAAWC,EAAAA,YALE,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