0x0 ? _0x378b5c.openRoom(_0xa88a13) : (_0x378b5c.stopLoadRooms(), _0x378b5c.loadRoomsList()), _0x378b5c.playerName || _0x4d8495.show('modal-9de6c4e9ce2b9361', {
'closeByEsckey': !0x1
});
}), _0xa88a13.elements.buttons.cheat && _0x1093f4.call(_0xa88a13, _0xa88a13.elements.buttons.cheat, 'click', function(_0x44b01a) {
_0x132da7(_0xa88a13.elements.dialogs.cheat, !0x1);
});
_0x1093f4.call(_0xa88a13, _0xa88a13.elements.container, 'savestate', function(_0x25b541) {
var _0x2c1832 = _0x25b541.detail.state;
if (_0x1e2c68.function(_0xa88a13.config.onsavestate)) _0xa88a13.config.onsavestate.call(null, {
'screenshot': _0x25b541.detail.screenshot,
'state': _0x2c1832
});
else {
var _0x2b5fc8 = new Blob([_0x2c1832]),
_0x152605 = _0xa88a13.startName.split('/').pop().split('.'),
_0x51d471 = _0x152605.slice(0x0, _0x152605.length - 0x1).join('.')
if (typeof _0xa88a13.gameName == 'string') {
var _0x51d471 = _0xa88a13.gameName
}
var _0x49f6b6 = _0x51d471 ? '' .concat(_0x51d471, '.state') : 'game.state';
_0x4e4ca6()(_0x2b5fc8, _0x49f6b6);
}
_0xa88a13.elements.container.focus();
});
_0xa88a13.game.stateloadField = _0x428003('input'), _0xa88a13.game.stateloadField.type = 'file', _0xa88a13.game.stateloadField.onchange = function _0x17edbf(_0xcd4599) {
var _0xfd246e, _0x3fdd71 = _0xcd4599.target.files;
_0x3fdd71.length > 0x0 && ((_0xfd246e = new FileReader()).file_name = _0x3fdd71[0x0].name, _0xfd246e.onload = function() {
var _0xa88a13 = new Uint8Array(_0xfd246e.result);
EJS_loadState(_0xa88a13);
}, _0xfd246e.readAsArrayBuffer(_0x3fdd71[0x0])), _0xa88a13.game.stateloadField = _0x428003('input'), _0xa88a13.game.stateloadField.type = 'file', _0xa88a13.game.stateloadField.onchange = _0x17edbf;
}, _0x1093f4.call(_0xa88a13, _0xa88a13.elements.container, 'loadstate', function(_0x13504c) {
_0x1e2c68.function(_0xa88a13.config.onloadstate) ? _0xa88a13.config.onloadstate.call(null, _0xa88a13.loadState) : _0xa88a13.game.stateloadField.click(), _0xa88a13.elements.container.focus();
}), document.addEventListener('visibilitychange', function() {
'hidden' === document.visibilityState ? console.log('hidden') : console.log('active');
});
},
'bindFunction': function() {
var _0xa88a13 = this,
_0x17edbf = _0xa88a13.system;
if (_0x27f4c4.Module && _0x27f4c4.Module._set_volume) {
var _0x2c1832 = _0x27f4c4.Module.cwrap('set_volume', 'null', ['number']);
_0x378b5c.setVolume = function() {
var _0x17edbf = 0x0;
_0xa88a13.volume < 0x1 && (_0x17edbf = 0x0 === _0xa88a13.volume ? -0x50 : 0x1e * _0xa88a13.volume - 0x1e, _0x2c1832(_0x17edbf)), _0xa88a13.muted && (_0x17edbf = -0x50), _0x2c1832(_0x17edbf);
};
}
_0x378b5c.setVariable = _0x27f4c4.Module.cwrap('set_variable', 'null', ['string', 'string']), _0x378b5c.simulateInputFn = _0x27f4c4.Module.cwrap('simulate_input', 'null', ['number', 'number', 'number']);
var _0x2c63cc = {
0: null,
1: null,
2: null,
3: null,
4: null,
5: null,
6: null,
7: null,
8: null,
9: null,
10: null,
11: null,
12: null,
13: null,
14: null,
15: null,
16: null,
17: null,
18: null,
19: null,
20: null,
21: null,
22: null,
23: null,
24: null,
25: null,
26: null,
27: null,
28: null,
29: null,
30: null,
31: null
};
_0x378b5c.simulateInput = function(_0x249751, _0x480d05, _0x50f784) {
if (_0x378b5c.connected) {
if (_0xa88a13.playing && !_0x378b5c.disableInput) {
var _0x35b9c1 = _0x378b5c.connection.userid,
_0x4d96ad = _0x378b5c.roomMaster === _0x35b9c1,
_0xf1bb97 = _0x378b5c.players.indexOf(_0x35b9c1),
_0x52e1f4 = _0x378b5c.currentFrameNum();
_0x249751 >> 0x0 == 0x0 && (_0x2c63cc[_0x480d05] !== _0x50f784 && (_0x4d96ad ? (_0x378b5c.inputsData[_0x52e1f4] || (_0x378b5c.inputsData[_0x52e1f4] = []), _0x378b5c.inputsData[_0x52e1f4].push({
'index': _0xf1bb97,
'key': _0x480d05,
'status': _0x50f784,
'frame': _0x52e1f4
}), _0x378b5c.simulateInputFn(_0xf1bb97, _0x480d05, _0x50f784)) : _0x378b5c.connection.send(JSON.stringify({
'act': 'sync-control',
'value': ['' .concat(_0xf1bb97, '|').concat(_0x480d05, '|').concat(_0x50f784, '|').concat(_0x52e1f4)]
}), _0x378b5c.roomMaster)), _0x2c63cc[_0x480d05] = _0x50f784);
}
} else _0x378b5c.disableInput || _0x378b5c.simulateInputFn(_0x249751, _0x480d05, _0x50f784);
}, _0x378b5c.syncInput = _0x378b5c.simulateInput;
var _0x762355 = _0x27f4c4.Module.cwrap('shader_enable', 'null', ['number']);
_0x378b5c.toggleShader = function(_0x433182) {
return _0x762355(_0x433182);
}, _0x378b5c.getStateInfo = _0x27f4c4.Module.cwrap('get_state_info', 'string', []), _0x378b5c.saveState = function() {
var _0xa88a13, _0x17edbf = _0x378b5c.getStateInfo().split('|'),
_0x2c1832 = _0x17edbf[0x0] >> 0x0;
if (_0x2c1832 > 0x0) {
_0xa88a13 = new Uint8Array(_0x2c1832);
for (var _0x2ef6be = _0x17edbf[0x1] >> 0x0, _0x3cc34b = 0x0; _0x3cc34b < _0x2c1832; _0x3cc34b++) _0xa88a13[_0x3cc34b] = _0x27f4c4.Module.getValue(_0x2ef6be + _0x3cc34b);
}
return _0xa88a13;
};
var _0x25a7a2 = _0x27f4c4.Module.cwrap('load_state', 'number', ['string', 'number']);
_0x378b5c.loadState = function(_0x4389ae, _0x1d4918) {
var _0x91cd69;
if (_0x91cd69 = _0x4389ae, _0x27f4c4.FS.createDataFile('/', 'game.state', _0x91cd69, true, true), null === _0x1d4918 && (_0x1d4918 = 0x0), _0x25a7a2('game.state', _0x1d4918), 'arcade' === _0x17edbf ? setTimeout(function() {
_0x378b5c.getStateInfo(), _0x25a7a2('game.state', _0x1d4918), _0x27f4c4.FS.unlink('game.state');
}, 0xa) : _0x27f4c4.FS.unlink('game.state'), _0x378b5c.connected && _0x378b5c.connection.isInitiator) {
for (var _0x54607c = _0x378b5c.getStateInfo().split('|'), _0x1ab9c9 = _0x54607c[0x0] >> 0x0, _0xce58ec = (_0x54607c[0x2], new Uint8Array(_0x1ab9c9)), _0x4aff4f = _0x54607c[0x1] >> 0x0, _0x3bfae0 = 0x0; _0x3bfae0 < _0x1ab9c9; _0x3bfae0 += 0x1) _0xce58ec[_0x3bfae0] = _0x27f4c4.Module.getValue(_0x4aff4f + _0x3bfae0);
var _0x227419 = new File([_0xce58ec], '0-game.state', {
'type': '',
'lastModified': new Date()
});
_0x378b5c.connection.shareFile(_0x227419), _0x378b5c.inputsData = {}, _0x378b5c.wait = true, _0x378b5c.systemPause(0x1), _0x27f4c4.Module.pauseMainLoop(), _0x378b5c.disableControl(true);
}
_0xa88a13.elements.container.focus();
}, _0x27f4c4.Module._set_cheat && (_0x378b5c.setCheat = _0x27f4c4.Module.cwrap('set_cheat', 'number', ['number', 'number', 'string'])), _0x27f4c4.Module._reset_cheat && (_0x378b5c.resetCheat = _0x27f4c4.Module._reset_cheat), _0x378b5c.quickSaveState = function() {
// save state button
if (_0xa88a13.started && !_0x378b5c.connected) {
var _0x17edbf = _0x378b5c.saveState();
try {
_0x27f4c4.FS.unlink('quick.state');
} catch (_0x4b4d4c) {}
_0x27f4c4.FS.createDataFile('/', 'quick.state', _0x17edbf, true, true);
}
}, _0x378b5c.quickLoadState = function() {
if (_0xa88a13.started && !_0x378b5c.connected) try {
_0x25a7a2('quick.state', 0x0), 'arcade' === _0x17edbf && setTimeout(function() {
_0x378b5c.getStateInfo(), _0x25a7a2('quick.state', 0x0);
}, 0xa);
} catch (_0x4ee386) {}
}, window.EJS_loadState = function(_0x4dd6a5) {
_0x378b5c.loadState(_0x4dd6a5, 0x0), setTimeout(function() {
if (_0x378b5c.connected) {
var _0x17edbf = new File([_0x4dd6a5], '0-game.state', {
'type': '',
'lastModified': new Date()
});
_0x378b5c.connection.shareFile(_0x17edbf), _0x378b5c.inputsData = {}, _0x378b5c.wait = true, _0x378b5c.systemPause(0x1), _0x27f4c4.Module.pauseMainLoop(), _0x378b5c.disableControl(true);
}
}, 0x1e);
};
var _0x840cf4 = _0x27f4c4.Module.cwrap('cmd_take_screenshot', '', []);
_0x378b5c.getScreenData = function() {
return _0x378b5c.toggleShader(0x0), _0x840cf4(), _0x378b5c.toggleShader(0x1), _0x27f4c4.FS.readFile('screenshot.png');
}, _0x378b5c.restartGame = _0x27f4c4.Module.cwrap('system_restart', '', []), _0x378b5c.currentFrameNum = _0x27f4c4.Module.cwrap('get_current_frame_count', '', []), _0x378b5c.saveSavFiles = _0x27f4c4.Module.cwrap('cmd_savefiles', '', []), _0x27f4c4.Module._get_core_options && (_0x378b5c.getGameCoreOptions = _0x27f4c4.Module.cwrap('get_core_options', 'string', [])), _0x378b5c.systemPause = function(_0x29d94a) {
return !0x1;
}, _0x378b5c.controllers = _0x2593da.storage.get('controllers'), _0x378b5c.controllers || (_0x378b5c.controllers = JSON.parse(JSON.stringify(_0x378b5c.defaultControllers)));
}
},
_0xdcec2a = _0x378b5c;
function _0x5005e6(_0x7f3270, _0x477158) {
return function(_0x20890f) {
if (Array.isArray(_0x20890f)) return _0x20890f;
}(_0x7f3270) || function(_0x557107, _0x409476) {
var _0x2c1832 = [],
_0x488a47 = true,
_0x34f76e = !0x1,
_0x19606f = void 0x0;
try {
for (var _0x328f4d, _0x4d9086 = _0x557107[Symbol.iterator](); !(_0x488a47 = (_0x328f4d = _0x4d9086.next()).done) && (_0x2c1832.push(_0x328f4d.value), !_0x409476 || _0x2c1832.length !== _0x409476); _0x488a47 = true);
} catch (_0x13c09a) {
_0x34f76e = true, _0x19606f = _0x13c09a;
} finally {
try {
_0x488a47 || null == _0x4d9086.return || _0x4d9086.return();
} finally {
if (_0x34f76e) throw _0x19606f;
}
}
return _0x2c1832;
}(_0x7f3270, _0x477158) || function() {
throw new TypeError('Invalid attempt to destructure non-iterable instance');
}();
}
var _0x7f9f36 = {
'storage': null,
'coreOptionsValues': {},
'contextMenu': null,
'normalOptions': {
'shader': {
'label': 'Shader',
'options': {
'disabled': 'Disabled',
'2xScaleHQ.glslp': '2xScaleHQ',
'4xScaleHQ.glslp': '4xScaleHQ',
'crt-easymode.glslp': 'CRT easymode',
'crt-aperture.glslp': 'CRT aperture',
'crt-geom.glslp': 'CRT geom'
},
'default': 'disabled'
},
'virtual-gamepad': {
'label': 'Virtual Gamepad',
'options': {
'disabled': 'Disabled',
'enabled': 'Enabled'
},
'default': 'enabled'
}
},
'defaultCoreOptionsValues': function() {
var _0xa88a13 = {};
switch (this.system) {
case 'pce':
_0xa88a13 = {
'pce_nospritelimit': 'enabled'
};
break;
case 'jaguar':
_0xa88a13 = {
'virtualjaguar_doom_res_hack': 'enabled'
};
break;
case 'psx':
_0xa88a13 = {
'pcsx_rearmed_memcard2': 'enabled'
};
break;
case 'nds':
_0xa88a13 = {};
}
return _0xa88a13;
},
'getCoreOptionsValues': function() {
var _0xa88a13 = _0x7f9f36.storage.get('core-options');
return _0x1e2c68.empty(_0xa88a13) && (_0xa88a13 = {}), _0xa88a13;
},
'getCoreOptions': function() {
var _0xa88a13 = {};
switch (this.system) {
case 'nes':
_0xa88a13.fceumm_palette = {
'label': 'Color Palette',
'options': {
'default': 'Default',
'asqrealc': 'asqrealc',
'nintendo-vc': 'nintendo-vc',
'rgb': 'rgb',
'yuv-v3': 'yuv-v3',
'unsaturated-final': 'unsaturated-final',
'sony-cxa2025as-us': 'sony-cxa2025as-us',
'pal': 'pal',
'bmf-final2': 'bmf-final2',
'bmf-final3': 'bmf-final3',
'smooth-fbx': 'smooth-fbx',
'composite-direct-fbx': 'composite-direct-fbx',
'pvm-style-d93-fbx': 'pvm-style-d93-fbx',
'nescap': 'nescap',
'ntsc-hardware-fbx': 'ntsc-hardware-fbx',
'nes-classic-fbx-fs': 'nes-classic-fbx-fs',
'wavebeam': 'wavebeam'
},
'default': 'default'
}, _0xa88a13.fceumm_nospritelimit = {
'label': 'No Sprite Limit',
'options': {
'enabled': 'Enabled',
'disabled': 'Disabled'
},
'default': 'disabled'
}, _0xa88a13.fceumm_sndquality = {
'label': 'Sound Quality',
'options': {
'Low': 'Low',
'High': 'High',
'Very High': 'Very High'
},
'default': 'Low'
}, this.lightgun || (_0xa88a13.system_type = {
'label': '4 Players Support',
'options': {
'nes': 'NES',
'famicom': 'Famicom'
},
'default': 'nes',
'netplay': true
}), _0xa88a13.fceumm_turbo_enable = {
'label': 'Turbo Enable',
'options': ['None', 'Player 1', 'Player 2', 'Both'],
'default': 'None',
'netplay': true
}, _0xa88a13.fceumm_region = {
'label': 'Region',
'options': ['Auto', 'NTSC', 'PAL', 'Dendy'],
'default': 'Auto',
'netplay': true
};
break;
case 'snes':
_0xa88a13 = {
'snes9x_next_overclock': {
'label': 'SuperFX Overclock',
'options': {
'disabled': 'Disabled(10MHz)',
'40MHz': '40MHz',
'60MHz': '60MHz',
'80MHz': '80MHz',
'100MHz': '100MHz'
},
'default': 'disabled',
'netplay': true
}
};
break;
case 'snes2002':
case 'snes2005':
case 'snes2010':
_0xa88a13 = {};
break;
case 'gb':
_0xa88a13 = {
'gambatte_gb_colorization': {
'label': 'GB Colorization',
'options': {
'disabled': 'Disabled',
'auto': 'auto',
'internal': 'internal'
},
'default': 'disabled'
},
'gambatte_gb_internal_palette': {
'label': 'Internal Palette',
'options': {
'GBC - Blue': 'GBC - Blue',
'GBC - Brown': 'GBC - Brown',
'GBC - Dark Blue': 'GBC - Dark Blue',
'GBC - Dark Brown': 'GBC - Dark Brown',
'GBC - Dark Green': 'GBC - Dark Green',
'GBC - Grayscale': 'GBC - Grayscale',
'GBC - Green': 'GBC - Green',
'GBC - Inverted': 'GBC - Inverted',
'GBC - Orange': 'GBC - Orange',
'GBC - Pastel Mix': 'GBC - Pastel Mix',
'GBC - Red': 'GBC - Red',
'GBC - Yellow': 'GBC - Yellow'
},
'default': 'GBC - Blue'
}
};
break;
case 'gba':
_0xa88a13 = {
'mgba_solar_sensor_level': {
'label': 'Solar sensor level',
'options': ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '10'],
'default': '0'
},
'mgba_frameskip': {
'label': 'Frameskip',
'options': ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '10'],
'default': '0'
}
};
break;
case 'vbanext':
_0xa88a13 = {
'vbanext_turboenable': {
'label': 'Enable Turbo Buttons',
'options': ['disabled', 'enabled'],
'default': 'disabled'
},
'vbanext_turbodelay': {
'label': 'Turbo Delay in frames',
'options': ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12', '13', '14', '15'],
'default': '2'
}
};
break;
case 'n64':
_0xa88a13 = {
'glupen64-aspect': {
'label': 'Aspect Ratio (Need to refresh page)',
'options': ['4:3', '16:9'],
'default': '4:3'
},
'glupen64-43screensize': {
'label': '4:3 Resolution',
'options': ['320x240', '640x480', '960x720', '1280x960'],
'default': '320x240'
},
'glupen64-169screensize': {
'label': '16:9 Resolution',
'options': ['640x360', '960x540', '1280x720'],
'default': '640x360'
},
'glupen64-pak1': {
'label': 'Player 1 Pak',
'options': ['none', 'memory', 'rumble'],
'default': 'none',
'netplay': true
},
'glupen64-pak2': {
'label': 'Player 2 Pak',
'options': ['none', 'memory', 'rumble'],
'default': 'none',
'netplay': true
},
'glupen64-pak3': {
'label': 'Player 3 Pak',
'options': ['none', 'memory', 'rumble'],
'default': 'none',
'netplay': true
},
'glupen64-pak4': {
'label': 'Player 4 Pak',
'options': ['none', 'memory', 'rumble'],
'default': 'none',
'netplay': true
}
};
break;
case 'nds':
_0xa88a13 = {
'desmume_screens_layout': {
'label': 'Screen layout',
'options': ['top/bottom', 'bottom/top', 'left/right', 'right/left', 'top only', 'bottom only', 'quick switch', 'hybrid/top', 'hybrid/bottom'],
'default': 'top/bottom'
},
'screen_rotation': {
'label': 'Screen Rotation',
'options': {
0: '0°',
90: '90°',
180: '180°',
270: '270°'
},
'default': 0x0
},
'desmume_frameskip': {
'label': 'Frameskip',
'options': ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9'],
'default': '0'
}
}, _0x2d904a.wasm || delete _0xa88a13.screen_rotation;
break;
case 'vb':
case 'pce':
_0xa88a13 = {};
break;
case 'segaMS':
case 'segaGG':
case 'segaMD':
case 'segaCD':
_0xa88a13 = {
'genesis_plus_gx_no_sprite_limit': {
'label': 'No Sprite Limit',
'options': ['disabled', 'enabled'],
'default': 'disabled'
},
'genesis_plus_gx_overclock': {
'label': 'CPU speed',
'options': ['100%', '125%', '150%', '175%', '200%'],
'default': '100%',
'netplay': true
},
'genesis_plus_gx_sound_output': {
'label': 'Sound output',
'options': ['stereo', 'mono'],
'default': 'stereo'
}
};
break;
case 'sega32x':
_0xa88a13 = {
'picodrive_sprlim': {
'label': 'No sprite limit',
'options': ['disabled', 'enabled'],
'default': 'disabled'
}
};
break;
case 'segaSaturn':
_0xa88a13 = {
'yabause_frameskip': {
'label': 'Frameskip',
'options': ['disabled', 'enabled'],
'default': 'disabled'
}
};
break;
case 'msx':
_0xa88a13 = {
'bluemsx_nospritelimits': {
'label': 'No Sprite Limit',
'options': ['OFF', 'ON'],
'default': 'OFF'
}
};
break;
case 'ws':
case 'ngp':
_0xa88a13 = {};
break;
case 'jaguar':
_0xa88a13 = {
'virtualjaguar_usefastblitter': {
'label': 'Fast Blitter',
'options': ['disabled', 'enabled'],
'default': 'disabled'
},
'virtualjaguar_bios': {
'label': 'Bios',
'options': ['disabled', 'enabled'],
'default': 'disabled'
}
};
break;
case 'psx':
_0xa88a13 = {
'pcsx_rearmed_frameskip': {
'label': 'Frameskip',
'options': [0x0, 0x1, 0x2, 0x3],
'default': 0x0,
'netplay': true
},
'pcsx_rearmed_memcard2': {
'label': 'Enable second memory card',
'options': ['enabled', 'disabled'],
'default': 'enabled',
'netplay': true
},
'pcsx_rearmed_pad1type': {
'label': 'Pad 1 Type',
'options': ['default', 'none', 'standard', 'analog', 'negcon'],
'default': 'default',
'netplay': true
},
'pcsx_rearmed_pad2type': {
'label': 'Pad 2 Type',
'options': ['default', 'none', 'standard', 'analog', 'negcon'],
'default': 'default',
'netplay': true
},
'pcsx_rearmed_pad3type': {
'label': 'Pad 3 Type',
'options': ['default', 'none', 'standard', 'analog', 'negcon'],
'default': 'default',
'netplay': true
},
'pcsx_rearmed_pad4type': {
'label': 'Pad 4 Type',
'options': ['default', 'none', 'standard', 'analog', 'negcon'],
'default': 'default',
'netplay': true
},
'pcsx_rearmed_vibration': {
'label': 'Enable Vibration',
'options': ['enabled', 'disabled'],
'default': 'enabled',
'netplay': true
},
'pcsx_rearmed_neon_interlace_enable': {
'label': 'Enable interlacing mode(s)',
'options': ['enabled', 'disabled'],
'default': 'disabled',
'netplay': true
},
'pcsx_rearmed_neon_enhancement_enable': {
'label': 'Enhanced resolution (slow)',
'options': ['enabled', 'disabled'],
'default': 'disabled',
'netplay': true
},
'pcsx_rearmed_neon_enhancement_no_main': {
'label': 'Enhanced resolution speed hack',
'options': ['enabled', 'disabled'],
'default': 'disabled',
'netplay': true
}
};
break;
case 'arcade':
case 'fba0.2.97.29':
_0xa88a13 = {
'fba-aspect': {
'label': 'Aspect ratio',
'options': ['DAR', 'PAR'],
'default': 'DAR'
},
'fba-frameskip': {
'label': 'Frameskip',
'options': ['0', '1', '2', '3', '4', '5'],
'default': '0',
'netplay': true
},
'fba-cpu-speed-adjust': {
'label': 'CPU overclock',
'options': ['100', '110', '120', '130', '140', '150', '160', '170', '180', '190', '200'],
'default': '100',
'netplay': true
},
'fba-diagnostic-input': {
'label': 'Diagnostic Input',
'options': ['None', 'Hold Start', 'Start + A + B', 'Hold Start + A + B', 'Start + L + R', 'Hold Start + L + R', 'Hold Select', 'Select + A + B', 'Hold Select + A + B', 'Select + L + R', 'Hold Select + L + R'],
'default': 'None',
'netplay': true
},
'fba-neogeo-mode': {
'label': 'Force Neo Geo mode',
'options': ['MVS', 'AES', 'UNIBIOS', 'DIPSWITCH'],
'default': 'MVS',
'netplay': true
}
};
break;
case 'mame2003':
case 'mame2010':
case 'mame':
_0xa88a13 = {};
break;
default:
_0xa88a13 = {}, console.warn('Unsupport emulator');
}
_0xdcec2a.getGameCoreOptions && _0xdcec2a.getGameCoreOptions().split('\n').forEach(function(_0x2bef5a, _0x49b64b) {
var _0x5995db = _0x2bef5a.split('; '),
_0x16274c = _0x5995db[0x0];
if (0x0 === _0x16274c.indexOf('fba-dipswitch-')) {
var _0x757776 = _0x5995db[0x1].split('|'),
_0x1f895e = _0x16274c.replace(/_/g, ' ').replace(/.+\-(.+)/, '$1');
_0xa88a13[_0x16274c] = {
'label': _0x1f895e,
'options': _0x757776.slice(0x1, -0x1),
'default': _0x757776[0x0].replace('(Default) ', ''),
'netplay': true
};
}
});
return _0xa88a13;
},
'supportNetPlay': function() {
if (this.lightgun || this.mouse) return !0x1;
var _0xa88a13 = window.RTCPeerConnection || window.webkitPeerConnection00 || window.webkitRTCPeerConnection || window.mozRTCPeerConnection,
_0x17edbf = window.mozRTCIceCandidate || window.RTCIceCandidate,
_0x2c1832 = window.mozRTCSessionDescription || window.RTCSessionDescription;
return !!(_0xa88a13 && _0x17edbf && _0x2c1832) && !!(_0xa88a13 && 'createDataChannel' in _0xa88a13.prototype);
},
'isNetPlay': function() {},
'findElements': function() {
try {
return this.elements.controls = _0x530042.call(this, this.config.selectors.controls.wrapper), this.elements.buttons = {
'play': _0x23ffa1.call(this, this.config.selectors.buttons.play),
'pause': _0x530042.call(this, this.config.selectors.buttons.pause),
'restart': _0x530042.call(this, this.config.selectors.buttons.restart),
'mute': _0x530042.call(this, this.config.selectors.buttons.mute),
'settings': _0x530042.call(this, this.config.selectors.buttons.settings),
'fullscreen': _0x530042.call(this, this.config.selectors.buttons.fullscreen),
'saveState': _0x530042.call(this, this.config.selectors.buttons.saveState),
'screenRecord': _0x530042.call(this, this.config.selectors.buttons.screenRecord),
'loadState': _0x530042.call(this, this.config.selectors.buttons.loadState),
'gamepad': _0x530042.call(this, this.config.selectors.buttons.gamepad),
'netplay': _0x530042.call(this, this.config.selectors.buttons.netplay),
'cheat': _0x530042.call(this, this.config.selectors.buttons.cheat)
}, this.elements.inputs = {
'volume': _0x530042.call(this, this.config.selectors.inputs.volume)
}, true;
} catch (_0x527381) {
return this.debug.warn('It looks like there is a problem with your custom controls HTML', _0x527381), !0x1;
}
},
'createIcon': function(_0x43d42f, _0x42a597) {
var _0x2c1832 = document.createElementNS('http://www.w3.org/2000/svg', 'svg');
_0x154f99(_0x2c1832, _0x5dc0c0(_0x42a597, {
'role': 'presentation',
'focusable': 'false'
}));
var _0x50b7a7 = document.createElement('div');
_0x50b7a7.innerHTML = '
');
for (var _0x373099 = _0x50b7a7.childNodes[0x0].childNodes, _0x804f4d = 0x0; _0x804f4d < _0x373099.length; _0x804f4d += 0x1) _0x2c1832.appendChild(_0x373099[_0x804f4d]);
return _0x2c1832;
},
'createLabel': function(_0x185043) {
var _0x17edbf = arguments.length > 0x1 && void 0x0 !== arguments[0x1] ? arguments[0x1] : {},
_0x2c1832 = _0xb9b2ff.get(_0x185043, this.config),
_0x3d681f = {};
_0x3d681f[_0x17edbf.class] = true, _0x3d681f[this.config.classNames.hidden] = true;
var _0x58a1d4 = Object.assign({}, _0x17edbf, {
'class': [_0x17edbf.class, this.config.classNames.tooltip].filter(Boolean).join(' ')
});
return _0x428003('span', _0x58a1d4, _0x2c1832);
},
'createBadge': function(_0x415aef) {
if (_0x1e2c68.empty(_0x415aef)) return null;
var _0x17edbf = _0x428003('span', {
'class': this.config.classNames.menu.value
});
return _0x17edbf.appendChild(_0x428003('span', {
'class': this.config.classNames.menu.badge
}, _0x415aef)), _0x17edbf;
},
'createButton': function(_0x427a85, _0x493eb2) {
var _0x2c1832, _0x325832, _0xcb618b, _0x25c678, _0x58309d = _0x428003('button'),
_0x183584 = Object.assign({}, _0x493eb2),
_0x2345d2 = _0x9fdcea(_0x427a85),
_0x2ca20d = !0x1;
'type' in _0x183584 || (_0x183584.type = 'button');
var _0x34225b = _0x449eac({
'ejs__control': true
});
switch ('class' in _0x183584 ? _0x183584.class.includes(_0x34225b) || (_0x183584.class += ' ' .concat(_0x34225b)) : _0x183584.class = _0x34225b, _0x427a85) {
case 'play':
_0x2ca20d = true, _0x2c1832 = 'play', _0xcb618b = 'pause', _0x325832 = 'play', _0x25c678 = 'pause';
break;
case 'mute':
_0x2ca20d = true, _0x2c1832 = 'mute', _0xcb618b = 'unmute', _0x325832 = 'volume', _0x25c678 = 'muted';
break;
case 'fullscreen':
_0x2ca20d = true, _0x2c1832 = 'enterFullscreen', _0xcb618b = 'exitFullscreen', _0x325832 = 'enter-fullscreen', _0x25c678 = 'exit-fullscreen';
break;
default:
_0x2c1832 = _0x2345d2, _0x325832 = _0x427a85;
}
return _0x2ca20d ? (_0x58309d.appendChild(_0x7f9f36.createIcon.call(this, _0x25c678, {
'class': _0x449eac({
'icon--pressed': true
})
})), _0x58309d.appendChild(_0x7f9f36.createIcon.call(this, _0x325832, {
'class': _0x449eac({
'icon--not-pressed': true
})
})), _0x58309d.appendChild(_0x7f9f36.createLabel.call(this, _0xcb618b, {
'class': _0x449eac({
'icon--pressed': true
})
})), _0x58309d.appendChild(_0x7f9f36.createLabel.call(this, _0x2c1832, {
'class': _0x449eac({
'icon--not-pressed': true
})
}))) : (_0x58309d.appendChild(_0x7f9f36.createIcon.call(this, _0x325832)), _0x58309d.appendChild(_0x7f9f36.createLabel.call(this, _0x2c1832))), _0x5dc0c0(_0x183584, _0xa949a8(this.config.selectors.buttons[_0x2345d2], _0x183584)), _0x154f99(_0x58309d, _0x183584), 'play' === _0x2345d2 ? (_0x1e2c68.array(this.elements.buttons[_0x2345d2]) || (this.elements.buttons[_0x2345d2] = []), this.elements.buttons[_0x2345d2].push(_0x58309d)) : this.elements.buttons[_0x2345d2] = _0x58309d, _0x58309d;
},
'createRange': function(_0x491b4a, _0x5f154a) {
var _0x2c1832 = _0x428003('input', _0x5dc0c0(_0xa949a8(this.config.selectors.inputs[_0x491b4a]), {
'type': 'range',
'min': 0x0,
'max': 0x64,
'step': 0.1,
'value': 0x0,
'autocomplete': 'off',
'role': 'slider',
'aria-label': _0xb9b2ff.get(_0x491b4a, this.config),
'aria-valuemin': 0x0,
'aria-valuemax': 0x64,
'aria-valuenow': 0x0
}, _0x5f154a));
return this.elements.inputs[_0x491b4a] = _0x2c1832, _0x7f9f36.updateRangeFill.call(this, _0x2c1832), _0x2c1832;
},
'bindMenuItemShortcuts': function(_0x1830d1, _0x2770c2) {
var _0x2c1832 = this;
_0x1093f4(_0x1830d1, 'keydown keyup', function(_0x4bb9d6) {
if ([0x20, 0x26, 0x27, 0x28].includes(_0x4bb9d6.which) && (_0x4bb9d6.preventDefault(), _0x4bb9d6.stopPropagation(), 'keydown' !== _0x4bb9d6.type)) {
var _0x20ac7b, _0x51717d = _0x13f491(_0x1830d1, '[role="menuitemradio"]');
if (!_0x51717d && [0x20, 0x27].includes(_0x4bb9d6.which)) _0x7f9f36.showMenuPanel.call(_0x2c1832, _0x2770c2, true);
else 0x20 !== _0x4bb9d6.which && (0x28 === _0x4bb9d6.which || _0x51717d && 0x27 === _0x4bb9d6.which ? (_0x20ac7b = _0x1830d1.nextElementSibling, _0x1e2c68.element(_0x20ac7b) || (_0x20ac7b = _0x1830d1.parentNode.firstElementChild)) : (_0x20ac7b = _0x1830d1.previousElementSibling, _0x1e2c68.element(_0x20ac7b) || (_0x20ac7b = _0x1830d1.parentNode.lastElementChild)), _0x31cc23.call(_0x2c1832, _0x20ac7b, true));
}
}, !0x1), _0x1093f4(_0x1830d1, 'keyup', function(_0x3844f5) {
0xd === _0x3844f5.which && _0x7f9f36.focusFirstMenuItem.call(_0x2c1832, null, true);
});
},
'createMenuItem': function(_0x52a95b) {
var _0x17edbf = this,
_0x2c1832 = _0x52a95b.value,
_0x231912 = _0x52a95b.list,
_0x57313b = _0x52a95b.type,
_0x19be70 = _0x52a95b.title,
_0x4ae558 = _0x52a95b.badge,
_0x34a012 = void 0x0 === _0x4ae558 ? null : _0x4ae558,
_0x7dbb2e = _0x52a95b.checked,
_0x200580 = void 0x0 !== _0x7dbb2e && _0x7dbb2e,
_0x4bb1a2 = _0xa949a8(this.config.selectors.inputs[_0x57313b]),
_0xb8fbbd = _0x428003('button', _0x5dc0c0(_0x4bb1a2, {
'type': 'button',
'role': 'menuitemradio',
'class': '' .concat(this.config.classNames.control, ' ').concat(_0x4bb1a2.class ? _0x4bb1a2.class : '').trim(),
'aria-checked': _0x200580,
'value': _0x2c1832
})),
_0x560073 = _0x428003('span');
_0x560073.innerHTML = _0x19be70, _0x1e2c68.element(_0x34a012) && _0x560073.appendChild(_0x34a012), _0xb8fbbd.appendChild(_0x560073), Object.defineProperty(_0xb8fbbd, 'checked', {
'enumerable': true,
'get': function() {
return 'true' === _0xb8fbbd.getAttribute('aria-checked');
},
'set': function(_0x2da7f0) {
_0x2da7f0 && Array.from(_0xb8fbbd.parentNode.children).filter(function(_0x480c16) {
return _0x13f491(_0x480c16, '[role="menuitemradio"]');
}).forEach(function(_0x363b12) {
return _0x363b12.setAttribute('aria-checked', 'false');
}), _0xb8fbbd.setAttribute('aria-checked', _0x2da7f0 ? 'true' : 'false');
}
});
var _0x449ec7 = _0x7f9f36.getCoreOptions.call(this);
this.listeners.bind(_0xb8fbbd, 'click keyup', function(_0x270d0d) {
_0x1e2c68.keyboardEvent(_0x270d0d) && 0x20 !== _0x270d0d.which || (_0x270d0d.preventDefault(), _0x270d0d.stopPropagation(), _0xb8fbbd.checked = true, Object.keys(_0x7f9f36.normalOptions).includes(_0x57313b) && _0x7f9f36.updateNormalOptions.call(_0x17edbf, _0x57313b, _0x2c1832), Object.keys(_0x449ec7).includes(_0x57313b) && (_0x449ec7[_0x57313b].netplay && _0xdcec2a.connected ? _0xdcec2a.connection.isInitiator && (_0x7f9f36.updateCoreOptions.call(_0x17edbf, _0x57313b, _0x2c1832), _0xdcec2a.connection.send(JSON.stringify({
'act': 'update-core-option',
'key': _0x57313b,
'value': _0x2c1832,
'frame': _0xdcec2a.currentFrame
}))) : _0x7f9f36.updateCoreOptions.call(_0x17edbf, _0x57313b, _0x2c1832)), _0x7f9f36.showMenuPanel.call(_0x17edbf, 'home', _0x1e2c68.keyboardEvent(_0x270d0d)));
}, _0x57313b, !0x1), _0x7f9f36.bindMenuItemShortcuts.call(this, _0xb8fbbd, _0x57313b), _0x231912.appendChild(_0xb8fbbd);
},
'updateVolume': function() {
_0x1e2c68.element(this.elements.inputs.volume) && _0x7f9f36.setRange.call(this, this.elements.inputs.volume, this.muted ? 0x0 : this.volume), _0x1e2c68.element(this.elements.buttons.mute) && (this.elements.buttons.mute.pressed = this.muted || 0x0 === this.volume);
},
'setRange': function(_0x1c075b) {
var _0x17edbf = arguments.length > 0x1 && void 0x0 !== arguments[0x1] ? arguments[0x1] : 0x0;
_0x1e2c68.element(_0x1c075b) && (_0x1c075b.value = _0x17edbf, _0x7f9f36.updateRangeFill.call(this, _0x1c075b));
},
'updateRangeFill': function(_0x2dbde1) {
var _0x17edbf = _0x1e2c68.event(_0x2dbde1) ? _0x2dbde1.target : _0x2dbde1;
if (_0x1e2c68.element(_0x17edbf) && 'range' === _0x17edbf.getAttribute('type')) {
if (_0x13f491(_0x17edbf, this.config.selectors.inputs.volume)) {
var _0x2c1832 = 0x64 * _0x17edbf.value;
_0x17edbf.setAttribute('aria-valuenow', _0x2c1832), _0x17edbf.setAttribute('aria-valuetext', '' .concat(_0x2c1832.toFixed(0x1), '%'));
} else _0x17edbf.setAttribute('aria-valuenow', _0x17edbf.value);
_0x59aa33.isWebkit && _0x17edbf.style.setProperty('--value', '' .concat(_0x17edbf.value / _0x17edbf.max * 0x64, '%'));
}
},
'toggleMenuButton': function(_0x249814, _0x2948e9) {
_0x132da7(this.elements.settings.buttons[_0x249814], !_0x2948e9);
},
'updateNormalOptions': function(_0x255b79, _0x505484) {
this.elements.settings.buttons[_0x255b79].querySelector('.' .concat(this.config.classNames.menu.value)).innerHTML = _0x7f9f36.normalOptions[_0x255b79].options[_0x505484];
var _0x2c1832 = {};
_0x2c1832[_0x255b79] = _0x505484, _0x7f9f36.storage.set(_0x2c1832), 'shader' === _0x255b79 && _0xdcec2a.setShader(_0x505484), 'virtual-gamepad' === _0x255b79 && _0xdcec2a.toggleVirtualGamepad.call(this, 'enabled' === _0x505484);
},
'updateCoreOptions': function(_0x41c4ad, _0x15823e) {
if ('nds' == this.system && !_0x2d904a.wasm) return true;
if (_0x7f9f36.coreOptionsValues[_0x41c4ad] = _0x15823e, 'psx' === this.system && _0x27f4c4.Module.pauseMainLoop(), _0xdcec2a.setVariable(_0x41c4ad, _0x15823e), 'psx' === this.system && (setTimeout(function() {
_0x27f4c4.Module.resumeMainLoop();
}, 0x64), setTimeout(function() {
_0x27f4c4.Module.resumeMainLoop();
}, 0xc8)), 'nds' === this.system && _0x2d904a.wasm) {
var _0x2c1832 = this.elements.wrapper.querySelector('canvas');
if ('screen_rotation' === _0x41c4ad) switch (_0x2c1832.style.transform = 'rotate(' + _0x15823e + 'deg)', _0x15823e) {
case '0':
_0xdcec2a.setVariable('desmume_input_rotation', '0');
break;
case '90':
_0xdcec2a.setVariable('desmume_input_rotation', '270');
break;
case '180':
_0xdcec2a.setVariable('desmume_input_rotation', '180');
break;
case '270':
_0xdcec2a.setVariable('desmume_input_rotation', '90');
}
}
if ('arcade' === this.system || 'fba0.2.97.29' === this.system) {
var _0x567ccc = this.elements.wrapper.querySelector('canvas');
_0x567ccc.height = 'fba-aspect' === _0x41c4ad && 'PAR' === _0x15823e ? _0x567ccc.width / 0x10 * 0x9 : _0x567ccc.width / 0x4 * 0x3;
}
var _0x31bdec = _0x7f9f36.getCoreOptions.call(this),
_0x3efd0b = _0x7f9f36.storage.get('core-options');
if (_0x1e2c68.empty(_0x3efd0b) && (_0x3efd0b = {}), _0x3efd0b[_0x41c4ad] = _0x15823e, _0x7f9f36.storage.set({
'core-options': _0x3efd0b
}), this.elements.settings.buttons[_0x41c4ad]) {
var _0xe95e6a = this.elements.settings.buttons[_0x41c4ad].querySelector('.' .concat(this.config.classNames.menu.value));
_0x1e2c68.object(_0x31bdec[_0x41c4ad].options) ? _0xe95e6a.innerHTML = _0x31bdec[_0x41c4ad].options[_0x15823e] : _0xe95e6a.innerHTML = _0x15823e;
}
},
'setOptionMenuItem': function(_0x2f0e6a, _0x85969e) {
var _0x2c1832 = this,
_0x549dac = this.elements.settings.panels.home.querySelector('[role="menu"]'),
_0x43777f = this.elements.settings.popup.children[0x0];
Object.keys(_0x2f0e6a).forEach(function(_0x4fcbcf) {
var _0x177975 = _0x4fcbcf,
_0x5f3e0f = _0x428003('button', _0x5dc0c0(_0xa949a8(_0x2c1832.config.selectors.buttons.settings), {
'type': 'button',
'class': _0x449eac({
'ejs__control': true,
'ejs__control--forward': true
}),
'role': 'menuitem',
'item': _0x4fcbcf,
'aria-haspopup': true
}));
_0x1093f4(_0x5f3e0f, 'click', function() {
_0x7f9f36.showMenuPanel.call(_0x2c1832, _0x177975, !0x1);
});
var _0x1d5857, _0x1838f9 = _0x428003('span', null, _0x2f0e6a[_0x4fcbcf].label),
_0x455b20 = _0x428003('span', {
'class': _0x2c1832.config.classNames.menu.value
});
_0x1e2c68.object(_0x85969e) && (_0x1d5857 = _0x85969e[_0x177975]), _0x1e2c68.empty(_0x1d5857) && (_0x1d5857 = _0x2f0e6a[_0x177975].default), _0x1e2c68.object(_0x2f0e6a[_0x177975].options) ? _0x455b20.innerHTML = _0x2f0e6a[_0x177975].options[_0x1d5857] : _0x455b20.innerHTML = _0x1d5857, _0x1838f9.appendChild(_0x455b20), _0x5f3e0f.appendChild(_0x1838f9), _0x549dac.appendChild(_0x5f3e0f);
var _0x3f3775 = _0x428003('div', {
'data-pane': escape(_0x177975),
'hidden': ''
}),
_0x288440 = _0x428003('button', {
'type': 'button',
'class': _0x449eac({
'ejs__control': true,
'ejs__control--back': true
})
});
_0x288440.appendChild(_0x428003('span', {
'aria-hidden': true
}, _0x2f0e6a[_0x4fcbcf].label)), _0x288440.appendChild(_0x428003('span', {
'class': _0x449eac({
'ejs__sr-only': true
})
}, _0xb9b2ff.get('menuBack', _0x2c1832.config))), _0x1093f4(_0x3f3775, 'keydown', function(_0x462a4d) {
0x25 === _0x462a4d.which && (_0x462a4d.preventDefault(), _0x462a4d.stopPropagation(), _0x7f9f36.showMenuPanel.call(_0x2c1832, 'home', true));
}, !0x1), _0x1093f4(_0x288440, 'click', function() {
_0x7f9f36.showMenuPanel.call(_0x2c1832, 'home', !0x1);
}), _0x3f3775.appendChild(_0x288440), _0x3f3775.appendChild(_0x428003('div', {
'role': 'menu'
})), _0x43777f.appendChild(_0x3f3775), _0x2c1832.elements.settings.buttons[_0x177975] = _0x5f3e0f, _0x2c1832.elements.settings.panels[_0x177975] = _0x3f3775;
var _0x2c172f = _0x3f3775.querySelector('[role="menu"]');
! function(_0x301c01) {
if (_0x1e2c68.element(_0x301c01))
for (var _0x85969e = _0x301c01.childNodes.length; _0x85969e > 0x0;) _0x301c01.removeChild(_0x301c01.lastChild), _0x85969e -= 0x1;
}(_0x2c172f), _0x1e2c68.object(_0x2f0e6a[_0x4fcbcf].options) ? Object.keys(_0x2f0e6a[_0x4fcbcf].options).forEach(function(_0x281296) {
_0x7f9f36.createMenuItem.call(_0x2c1832, {
'value': _0x281296,
'list': _0x2c172f,
'type': _0x177975,
'title': _0x2f0e6a[_0x4fcbcf].options[_0x281296],
'badge': null,
'checked': Boolean(_0x1d5857 === _0x281296)
});
}) : _0x1e2c68.array(_0x2f0e6a[_0x4fcbcf].options) && _0x2f0e6a[_0x4fcbcf].options.forEach(function(_0x28a341) {
_0x7f9f36.createMenuItem.call(_0x2c1832, {
'value': _0x28a341,
'list': _0x2c172f,
'type': _0x177975,
'title': _0x28a341,
'badge': null,
'checked': Boolean(_0x1d5857 === _0x28a341)
});
});
});
},
'setNormalOptionsMenu': function() {
var _0xa88a13 = this,
_0x17edbf = this,
_0x2c1832 = {};
_0x2c1832.orientation = _0x7f9f36.storage.get('orientation'), _0x2c1832.shader = _0x7f9f36.storage.get('shader'), _0x17edbf.touch ? (_0x2c1832['virtual-gamepad'] = _0x7f9f36.storage.get('virtual-gamepad'), _0x1093f4.call(_0x17edbf, _0x17edbf.elements.container, 'start-game', function() {
('enabled' === _0x2c1832['virtual-gamepad'] || _0x1e2c68.empty(_0x2c1832['virtual-gamepad'])) && _0xdcec2a.toggleVirtualGamepad.call(_0x17edbf, true);
})) : delete _0x7f9f36.normalOptions['virtual-gamepad'], _0x7f9f36.setOptionMenuItem.call(this, _0x7f9f36.normalOptions, _0x2c1832), _0x1093f4.call(_0x17edbf, _0x17edbf.elements.container, 'start-game', function() {
var _0x2c1832 = _0xa88a13,
_0x42a7b1 = {};
_0xdcec2a.getGameCoreOptions && _0xdcec2a.getGameCoreOptions().split('\n').forEach(function(_0x4a987e, _0x10bd7a) {
var _0x2c1832 = _0x4a987e.split('; '),
_0x1ddc5f = _0x2c1832[0x0];
if (0x0 === _0x1ddc5f.indexOf('fba-dipswitch-')) {
var _0xbd808 = _0x2c1832[0x1].split('|'),
_0x3c4b1a = _0x1ddc5f.replace(/_/g, ' ').replace(/.+\-(.+)/, '$1');
_0x42a7b1[_0x1ddc5f] = {
'label': _0x3c4b1a,
'options': _0xbd808.slice(0x1, -0x1),
'default': _0xbd808[0x0].replace('(Default) ', ''),
'netplay': true
};
}
});
var _0x27d859 = _0x7f9f36.storage.get('core-options');
_0x7f9f36.coreOptionsValues = _0x27d859 || {}, _0x7f9f36.setOptionMenuItem.call(_0x17edbf, _0x42a7b1, _0x7f9f36.coreOptionsValues), Object.keys(_0x7f9f36.coreOptionsValues).forEach(function(_0x51fc4e, _0x4b3613) {
_0x7f9f36.updateCoreOptions.call(_0x2c1832, _0x51fc4e, _0x7f9f36.coreOptionsValues[_0x51fc4e]);
}), 'nds' == _0x17edbf.system && (_0x27f4c4.Module._fast_forward_2 ? _0x27f4c4.Module._fast_forward_2(0x1) : _0x27f4c4.Module._fast_forward && _0x27f4c4.Module._fast_forward(0x1));
});
},
'updateCoreOptionMenuItems': function() {
var _0xa88a13 = this.elements.settings.panels.home.querySelector('[role="menu"]'),
_0x17edbf = _0x7f9f36.getCoreOptions.call(this);
_0xdcec2a.connected && !_0xdcec2a.connection.isInitiator ? Object.keys(_0x17edbf).forEach(function(_0x480587) {
_0x17edbf[_0x480587].netplay && _0xa88a13.querySelector('[item=\x22' .concat(_0x480587, '\x22]')).setAttribute('disabled', '');
}) : Object.keys(_0x17edbf).forEach(function(_0x20e093) {
_0xa88a13.querySelector('[item="' .concat(_0x20e093, '\x22]')).removeAttribute('disabled');
});
},
'setCoreOptionsMenu': function() {
this.elements.settings.panels.home.querySelector('[role="menu"]'), this.elements.settings.popup.children[0x0];
var _0xa88a13 = _0x7f9f36.getCoreOptions.call(this),
_0x17edbf = _0x7f9f36.storage.get('core-options');
_0x7f9f36.coreOptionsValues = _0x17edbf || {}, _0x7f9f36.setOptionMenuItem.call(this, _0xa88a13, _0x17edbf);
},
'checkMenu': function() {
var _0xa88a13 = this.elements.settings.buttons;
!_0x1e2c68.empty(_0xa88a13) && Object.values(_0xa88a13).some(function(_0x200331) {
return !_0x200331.hidden;
});
_0x132da7(this.elements.settings.menu, !0x1);
},
'focusFirstMenuItem': function(_0x303d68) {
var _0x17edbf = arguments.length > 0x1 && void 0x0 !== arguments[0x1] && arguments[0x1];
if (!this.elements.settings.popup.hidden) {
var _0x2c1832 = _0x303d68;
_0x1e2c68.element(_0x2c1832) || (_0x2c1832 = Object.values(this.elements.settings.panels).find(function(_0xe94c5e) {
return !_0xe94c5e.hidden;
}));
var _0x2f3a13 = _0x2c1832.querySelector('[role^="menuitem"]');
_0x31cc23.call(this, _0x2f3a13, _0x17edbf);
}
},
'toggleMenu': function(_0x28d6c6) {
var _0x17edbf = this.elements.settings.popup,
_0x2c1832 = this.elements.buttons.settings;
if (_0x1e2c68.element(_0x17edbf) && _0x1e2c68.element(_0x2c1832)) {
var _0x614270 = _0x17edbf.hidden,
_0x14f1b5 = _0x614270;
if (_0x1e2c68.boolean(_0x28d6c6)) _0x14f1b5 = _0x28d6c6;
else if (_0x1e2c68.keyboardEvent(_0x28d6c6) && 0x1b === _0x28d6c6.which) _0x14f1b5 = !0x1;
else if (_0x1e2c68.event(_0x28d6c6)) {
var _0xcf75ac = _0x17edbf.contains(_0x28d6c6.target);
if (_0xcf75ac || !_0xcf75ac && _0x28d6c6.target !== _0x2c1832 && _0x14f1b5) return;
}
_0x2c1832.setAttribute('aria-expanded', _0x14f1b5);
_0x132da7(_0x17edbf, !_0x14f1b5);
_0x3a8e2f(this.elements.container, this.config.classNames.menu.open, _0x14f1b5);
_0x14f1b5 && _0x1e2c68.keyboardEvent(_0x28d6c6) ? _0x7f9f36.focusFirstMenuItem.call(this, null, true) : _0x14f1b5 || _0x614270 || _0x31cc23.call(this, _0x2c1832, _0x1e2c68.keyboardEvent(_0x28d6c6));
}
},
'getMenuSize': function(_0x55fe13) {
var _0x17edbf = _0x55fe13.cloneNode(true);
_0x17edbf.style.position = 'absolute';
_0x17edbf.style.opacity = 0;
_0x17edbf.removeAttribute('hidden');
_0x55fe13.parentNode.appendChild(_0x17edbf);
var _0x2c1832 = _0x17edbf.scrollWidth,
_0x5edd1b = _0x17edbf.scrollHeight;
return _0x12a55d(_0x17edbf), {
'width': _0x2c1832,
'height': _0x5edd1b
};
},
'showLoadStatePanel': function() {},
'showMenuPanel': function() {
var _0xa88a13 = this,
_0x17edbf = arguments.length > 0x0 && void 0x0 !== arguments[0x0] ? arguments[0x0] : '',
_0x2c1832 = arguments.length > 0x1 && void 0x0 !== arguments[0x1] && arguments[0x1],
_0x7f4281 = _0x530042.call(this, '[data-pane="' .concat(escape(_0x17edbf), '\x22]'));
if (_0x1e2c68.element(_0x7f4281)) {
var _0x3d6729 = _0x7f4281.parentNode,
_0x381f57 = Array.from(_0x3d6729.children).find(function(_0x57c652) {
return !_0x57c652.hidden;
});
if (_0x2d904a.transitions && !_0x2d904a.reducedMotion) {
_0x3d6729.style.width = '' .concat(_0x381f57.scrollWidth, 'px');
_0x3d6729.style.height = '' .concat(_0x381f57.scrollHeight, 'px');
var _0x29dd37 = _0x7f9f36.getMenuSize.call(this, _0x7f4281),
_0x37447f = function _0x17edbf(_0x40854f) {
_0x40854f.target === _0x3d6729 && ['width', 'height'].includes(_0x40854f.propertyName) && (_0x3d6729.style.width = '', _0x3d6729.style.height = '', _0x20109b.call(_0xa88a13, _0x3d6729, _0x5a2767, _0x17edbf));
};
_0x1093f4.call(this, _0x3d6729, _0x5a2767, _0x37447f), _0x3d6729.style.width = '' .concat(_0x29dd37.width, 'px'), _0x3d6729.style.height = '' .concat(_0x29dd37.height, 'px');
}
_0x132da7(_0x381f57, true);
_0x132da7(_0x7f4281, false);
_0x7f9f36.focusFirstMenuItem.call(this, _0x7f4281, _0x2c1832);
}
},
'setLoadState': function(_0x526828, _0x2ce330) {
_0x526828.appendChild(_0x7f9f36.createButton.call(this, 'load-state', {
'aria-haspopup': true,
'aria-expanded': !0x1
}));
var _0x2c1832 = _0x428003('div', {
'class': _0x449eac({
'ejs__dialog': true,
'ejs__load-state__container': true
}),
'hidden': ''
}),
_0x2e5e96 = _0x428003('div');
_0x2c1832.appendChild(_0x2e5e96);
_0x530042.call(this, '.' .concat(_0x449eac({
'ejs__dialogs': true
}))).appendChild(_0x2c1832);
this.elements.dialogs.loadState = _0x2c1832;
},
'setScreenRecord': function(_0x4c3fdd, _0x289259) {
if (! window.MediaRecorder) {
return;
};
var _0x2c1832 = _0x7f9f36.createButton.call(this, 'screen-record', {
'aria-haspopup': true,
'aria-expanded': !0x1,
'style': 'margin-right:auto;'
});
_0x4c3fdd.appendChild(_0x2c1832);
var _0x13c0e4 = _0x428003('div', {
'class': _0x449eac({
'ejs__dialog': true,
'ejs__screenRecord__container': true
}),
'hidden': ''
}),
_0xe2c02a = _0x428003('div');
_0x13c0e4.appendChild(_0xe2c02a);
_0x530042.call(this, '.' .concat(_0x449eac({
'ejs__dialogs': true
}))).appendChild(_0x13c0e4);
this.elements.dialogs.screenRecord = _0x13c0e4;
},
'setGamepad': function(_0x4c3fdd, _0x289259) {
var _0x2c1832 = _0x7f9f36.createButton.call(this, 'gamepad', {
'aria-haspopup': true,
'aria-expanded': !0x1,
'style': 'margin-right:auto;'
});
_0x4c3fdd.appendChild(_0x2c1832);
var _0x13c0e4 = _0x428003('div', {
'class': _0x449eac({
'ejs__dialog': true,
'ejs__gamepad__container': true
}),
'hidden': ''
}),
_0xe2c02a = _0x428003('div');
_0x13c0e4.appendChild(_0xe2c02a);
_0x530042.call(this, '.' .concat(_0x449eac({
'ejs__dialogs': true
}))).appendChild(_0x13c0e4);
this.elements.dialogs.gamepad = _0x13c0e4;
},
'setCheat': function(_0x328075, _0x21ca37) {
var _0x2c1832 = _0x7f9f36.createButton.call(this, 'cheat', {
'aria-haspopup': true,
'aria-expanded': !0x1,
'style': 'margin-right:auto;'
});
_0x328075.appendChild(_0x2c1832);
var _0x173db3 = _0x428003('div', {
'class': _0x449eac({
'ejs__dialog': true,
'ejs__cheat__container': true
}),
'hidden': ''
}),
_0x460961 = _0x428003('div');
_0x173db3.appendChild(_0x460961);
_0x530042.call(this, '.' .concat(_0x449eac({
'ejs__dialogs': true
}))).appendChild(_0x173db3);
this.elements.dialogs.cheat = _0x173db3;
},
'setNetplayWidgets': function() {
var _0xa88a13 = _0x428003('div', {
'class': _0x449eac({
'ejs__widget': true,
'ejs__widget_netplay': true
})
}),
_0x17edbf = _0x428003('div');
_0xa88a13.appendChild(_0x17edbf);
_0x530042.call(this, '.' .concat(_0x449eac({
'ejs__widgets': true
}))).appendChild(_0xa88a13);
this.elements.widgets.netplay = _0xa88a13;
},
'setNetplay': function(_0x1859f4, _0x50544d) {
_0x1859f4.appendChild(_0x7f9f36.createButton.call(this, 'netplay', {
'aria-haspopup': true,
'aria-expanded': !0x1
}));
var _0x2c1832 = _0x428003('div', {
'class': _0x449eac({
'ejs__dialog': true,
'ejs__netplay__container': true
}),
'hidden': ''
}),
_0x4f63e0 = _0x428003('div');
_0x2c1832.appendChild(_0x4f63e0);
_0x530042.call(this, '.' .concat(_0x449eac({
'ejs__dialogs': true
}))).appendChild(_0x2c1832);
this.elements.dialogs.netplay = _0x2c1832;
_0x7f9f36.setNetplayWidgets.call(this);
},
'toggleContextMenu': function(_0x24b1f3, _0x4b9d55) {
if (_0x350d73(_0x24b1f3.target, _0x449eac({
'ejs__dialogs': true
}))) {
var _0x2c1832 = _0x7f9f36.contextMenu.timer;
if (this.started) {
var _0x2a1dda = _0x530042.call(this, '.' .concat(_0x449eac({
'ejs__contextmenu': true
}), ' ul'));
if (_0x4b9d55) {
_0x7f9f36.contextMenu.style.display = 'block', _0x7f9f36.contextMenu.style.left = '' .concat(_0x24b1f3.layerX, 'px'), _0x7f9f36.contextMenu.style.top = '' .concat(_0x24b1f3.layerY, 'px');
var _0x1b48e7 = _0x23ffa1.call(this, '.' .concat(_0x449eac({
'ejs__contextmenu': true
}), ' ul li'));
if (Array.from(_0x1b48e7).forEach(function(_0x228a1f, _0x123a07) {}), null === _0x2a1dda.getAttribute('menu')) {
var _0x14264d = _0x428003('li', {});
_0x14264d.appendChild(_0x428003('a', {
'target': '_blank',
'href': 'https://github.com/ethanaobrien/emulatorjs'
}, 'EmulatorJS v' .concat(this.version))), _0x2a1dda.appendChild(_0x14264d), _0x2a1dda.setAttribute('menu', '');
}
_0x2c1832 && clearTimeout(_0x2c1832), _0x2c1832 = setTimeout(function() {}, 0xfa0), _0x7f9f36.contextMenu.timer = _0x2c1832;
} else _0x7f9f36.contextMenu.style.display = 'none';
}
}
},
'create': function(_0x42e40d) {
var _0xa88a13 = this;
_0x7f9f36.storage = new _0x2f61ba(this, 'ejs_' .concat(this.system, '_settings'));
var _0x17edbf = _0x428003('div', _0xa949a8(this.config.selectors.controls.wrapper));
_0x7f9f36.contextMenu = _0x428003('div', {
'class': _0x449eac({
'ejs__contextmenu': true
}),
'style': 'position: absolute; display:none;z-index:9'
})
var contextHtml = ['
']
var contextFunctions = []
function addContextHtml(title, hidden, functi0n) {
if (typeof functi0n == 'function') {
contextFunctions.push(functi0n)
} else {
contextFunctions.push(function(){})
}
var i = contextHtml.length - 1
if (hidden) {
contextHtml.splice(i, 0, '
'+title+'')
} else {
contextHtml.splice(i, 0, '
'+title+'')
}
}
addContextHtml('Take Screenshot', false, function(_0x20faaa) {
var _0x4e898a = _0x378b5c.getScreenData();
_0x4e4ca6()(new Blob([_0x4e898a]), 'game.png');
return false;
})
addContextHtml('Cache Manage', true, function(_0x275730) {
if (_0x27f4c4.romdb) {
_0x132da7(_0xa88a13.elements.dialogs.cache, !0x1);
var _0x3360eb = _0xa88a13.elements.dialogs.cache.querySelector('.' .concat(_0x378b5c.classNames['dialog-content']));
_0x3360eb.innerHTML = '
Loading
', _0x27f4c4.romdb.getAll(function(_0x43586d) {
if (_0x43586d) {
var _0x275730 = _0x428003('table', {
'style': 'width:100%;padding-left:10px;text-align:left'
}),
_0x1ab9e9 = _0x428003('tbody');
_0x43586d.length > 0x0 ? (_0x3360eb.innerHTML = '', _0x43586d.forEach(function(_0x32b0b7, _0x2d0e11) {
if (_0x32b0b7.key && !/-part-\d+$/ .test(_0x32b0b7.key)) {
for (var _0x3360eb = Math.ceil(_0x32b0b7.filesize / 0x6400000), _0x277c67 = [_0x32b0b7.key], _0x3edb35 = 0x1; _0x3edb35 < _0x3360eb; _0x3edb35 += 0x1) _0x277c67.push('' .concat(_0x32b0b7.key, '-part-').concat(_0x3edb35));
var _0x3e31f6 = _0x428003('tr'),
_0x5b75bd = _0x428003('td'),
_0x227405 = _0x428003('td'),
_0xac150b = _0x428003('td');
_0x5b75bd.innerHTML = _0x32b0b7.filename, _0x227405.innerHTML = function(_0x1858c1) {
var _0x2d0e11 = -0x1;
do {
_0x1858c1 /= 0x400, _0x2d0e11++;
} while (_0x1858c1 > 0x400);
return Math.max(_0x1858c1, 0.1).toFixed(0x1) + [' kB', ' MB', ' GB', ' TB', 'PB', 'EB', 'ZB', 'YB'][_0x2d0e11];
}(_0x32b0b7.filesize), _0xac150b.innerHTML = '
Remove', _0x3e31f6.appendChild(_0x5b75bd), _0x3e31f6.appendChild(_0x227405), _0x3e31f6.appendChild(_0xac150b), _0x1ab9e9.appendChild(_0x3e31f6), _0xac150b.querySelector('a').onclick = function(_0x16f22a) {
_0x27f4c4.romdb.removeBatch(_0x277c67);
try {
_0x1ab9e9.removeChild(_0x3e31f6);
} catch (_0x353628) {}
return _0x16f22a.stopPropagation(), !0x1;
};
}
}), _0x275730.appendChild(_0x1ab9e9), _0x3360eb.appendChild(_0x275730)) : _0x3360eb.innerHTML = '
Empty
';
} else _0x3360eb.innerHTML = '
Empty
';
}, function() {});
}
return false;
})
addContextHtml('Quick Save (F2)', false, function(_0x395c73) {
_0x378b5c.quickSaveState();
_0x2593da.contextMenu.style.display = 'none';
})
addContextHtml('Quick Load (F4)', false, function(_0x124f69) {
_0x378b5c.quickLoadState();
_0x2593da.contextMenu.style.display = 'none';
})
_0x7f9f36.contextMenu.innerHTML = contextHtml.join('')
var a = _0x7f9f36.contextMenu.getElementsByTagName('li')
for (var i=0; i
0x0 && _0x7f9f36.setNetplay.call(this, _0x17edbf, _0x42e40d);
_0x7f9f36.setGamepad.call(this, _0x17edbf, _0x42e40d);
_0x7f9f36.setCheat.call(this, _0x17edbf, _0x42e40d);
_0x17edbf.appendChild(_0x428003('span', {
'style': 'flex:1'
}));
var _0xd299b = _0x428003('div', {
'class': _0x449eac({
'ejs__volume': true
})
});
_0xd299b.appendChild(_0x7f9f36.createButton.call(this, 'mute'));
var _0x4bbcd0 = {
'max': 0x1,
'step': 0.01,
'value': this.config.volume
};
_0xd299b.appendChild(_0x7f9f36.createRange.call(this, 'volume', _0x5dc0c0(_0x4bbcd0, {}))), this.elements.volume = _0xd299b, _0x17edbf.appendChild(_0xd299b);
var _0x2746ab = _0x428003('div', {
'class': _0x449eac({
'ejs__menu': true
})
});
_0x2746ab.appendChild(_0x7f9f36.createButton.call(this, 'settings', {
'aria-haspopup': true,
'aria-expanded': !0x1
}));
var _0x262fb8 = _0x428003('div', {
'class': _0x449eac({
'ejs__menu__container': true
}),
'hidden': ''
}),
_0x3f3385 = _0x428003('div'),
_0x174c46 = _0x428003('div', {
'data-pane': 'home'
}),
_0x17f3cb = _0x428003('div', {
'role': 'menu'
});
_0x174c46.appendChild(_0x17f3cb)
_0x3f3385.appendChild(_0x174c46)
this.elements.settings.panels.home = _0x174c46
_0x262fb8.appendChild(_0x3f3385)
_0x2746ab.appendChild(_0x262fb8)
_0x17edbf.appendChild(_0x2746ab)
this.elements.settings.popup = _0x262fb8
this.elements.settings.menu = _0x2746ab
_0x17edbf.appendChild(_0x7f9f36.createButton.call(this, 'fullscreen'))
this.elements.controls = _0x17edbf
_0x7f9f36.setNormalOptionsMenu.call(this)
_0x7f9f36.setCoreOptionsMenu.call(this)
return _0x17edbf;
},
'inject': function() {
var _0xa88a13 = this;
this.icons = {
'enter-fullscreen': '',
'exit-fullscreen': '',
'gamepad': '',
'load-state': '',
'muted': '',
'netplay': '',
'pause': '',
'play': '',
'restart': '',
'save-state': '',
'screen-record': '',
'settings': '',
'volume': '\n \n ',
'cheat': ''
}, this.id = Math.floor(0x2710 * Math.random());
var _0x17edbf = null;
this.elements.controls = null;
var _0x2c1832 = {
'id': this.id
},
_0x270a9e = true;
_0x1e2c68.function(this.config.controls) && (this.config.controls = this.config.controls.call(this.props)), this.config.controls || (this.config.controls = []), _0x1e2c68.element(this.config.controls) || _0x1e2c68.string(this.config.controls) ? _0x17edbf = this.config.controls : (_0x17edbf = _0x7f9f36.create.call(this, {
'id': this.id,
'seektime': this.config.seekTime,
'speed': this.speed,
'quality': this.quality
}), _0x270a9e = !0x1);
var _0x1e6644, _0x3ec218 = function(_0x406126) {
var _0x17edbf = _0x406126;
return Object.entries(_0x2c1832).forEach(function(_0x3e992c) {
var _0x2c1832 = _0x5005e6(_0x3e992c, 0x2),
_0x47c2ec = _0x2c1832[0x0],
_0x547588 = _0x2c1832[0x1];
_0x17edbf = _0x1a0e98(_0x17edbf, '{' .concat(_0x47c2ec, '}'), _0x547588);
}), _0x17edbf;
};
if (_0x270a9e && (_0x1e2c68.string(this.config.controls) ? _0x17edbf = _0x3ec218(_0x17edbf) : _0x1e2c68.element(_0x17edbf) && (_0x17edbf.innerHTML = _0x3ec218(_0x17edbf.innerHTML))), _0x1e2c68.string(this.config.selectors.controls.container) && (_0x1e6644 = document.querySelector(this.config.selectors.controls.container)), _0x1e2c68.element(_0x1e6644) || (_0x1e6644 = this.elements.container), _0x1e6644[_0x1e2c68.element(_0x17edbf) ? 'insertAdjacentElement' : 'insertAdjacentHTML']('afterbegin', _0x17edbf), _0x1e2c68.element(this.elements.controls) || _0x7f9f36.findElements.call(this), !_0x1e2c68.empty(this.elements.buttons)) {
var _0xe8272c = function(_0x176a3e) {
var _0x2c1832 = _0xa88a13.config.classNames.controlPressed;
Object.defineProperty(_0x176a3e, 'pressed', {
'enumerable': true,
'get': function() {
return _0x350d73(_0x176a3e, _0x2c1832);
},
'set': function() {
var _0xa88a13 = arguments.length > 0x0 && void 0x0 !== arguments[0x0] && arguments[0x0];
_0x3a8e2f(_0x176a3e, _0x2c1832, _0xa88a13);
}
});
};
Object.values(this.elements.buttons).filter(Boolean).forEach(function(_0x577b9b) {
_0x1e2c68.array(_0x577b9b) || _0x1e2c68.nodeList(_0x577b9b) ? Array.from(_0x577b9b).filter(Boolean).forEach(_0xe8272c) : _0xe8272c(_0x577b9b);
});
}
window.navigator.userAgent.includes('Edge') && _0x2b30e0(_0x1e6644);
}
},
_0x2593da = _0x7f9f36;
function _0x28bdca(_0x5c50c3, _0x217698) {
for (var _0x2c1832 = 0x0; _0x2c1832 < _0x217698.length; _0x2c1832++) {
var _0x172cdb = _0x217698[_0x2c1832];
_0x172cdb.enumerable = _0x172cdb.enumerable || !0x1, _0x172cdb.configurable = true, 'value' in _0x172cdb && (_0x172cdb.writable = true), Object.defineProperty(_0x5c50c3, _0x172cdb.key, _0x172cdb);
}
}
function _0x238270() {
if (this.enabled) {
var _0xa88a13 = this.player.elements.buttons.fullscreen;
_0x1e2c68.element(_0xa88a13) && (_0xa88a13.pressed = this.active), _0xbae705.call(this.player, this.target, this.active ? 'enterfullscreen' : 'exitfullscreen', true), _0x59aa33.isIos || _0x5e0c7d.call(this.player, this.target, this.active);
}
}
function _0x3c983f() {
var _0xa88a13 = arguments.length > 0x0 && void 0x0 !== arguments[0x0] && arguments[0x0];
_0xa88a13 ? this.scrollPosition = {
'x': window.scrollX || 0x0,
'y': window.scrollY || 0x0
} : window.scrollTo(this.scrollPosition.x, this.scrollPosition.y), document.body.style.overflow = _0xa88a13 ? 'hidden' : '', _0x3a8e2f(this.target, this.player.config.classNames.fullscreen.fallback, _0xa88a13), _0x238270.call(this);
}
var _0x335854 = function() {
function _0x1339df(_0x5f19c6) {
var _0x2c1832 = this;
! function(_0x143a8a, _0x32a0a1) {
if (!(_0x143a8a instanceof _0x32a0a1)) throw new TypeError('Cannot call a class as a function');
}(this, _0x1339df), this.player = _0x5f19c6, this.prefix = _0x1339df.prefix, this.property = _0x1339df.property, this.scrollPosition = {
'x': 0x0,
'y': 0x0
}, _0x1093f4.call(this.player, document, 'ms' === this.prefix ? 'MSFullscreenChange' : '' .concat(this.prefix, 'fullscreenchange'), function() {
_0x238270.call(_0x2c1832);
}), this.update();
}
var _0x17edbf, _0x2c1832, _0x50d347;
_0x17edbf = _0x1339df
_0x50d347 = [{
'key': 'native',
'get': function() {
return !!(document.fullscreenEnabled || document.webkitFullscreenEnabled || document.mozFullScreenEnabled || document.msFullscreenEnabled);
}
}, {
'key': 'prefix',
'get': function() {
if (_0x1e2c68.function(document.exitFullscreen)) return '';
var _0x1339df = '';
return ['webkit', 'moz', 'ms'].some(function(_0xc1e0c3) {
return !(!_0x1e2c68.function(document['' .concat(_0xc1e0c3, 'ExitFullscreen')]) && !_0x1e2c68.function(document['' .concat(_0xc1e0c3, 'CancelFullScreen')]) || (_0x1339df = _0xc1e0c3, 0x0));
}), _0x1339df;
}
}, {
'key': 'property',
'get': function() {
return 'moz' === this.prefix ? 'FullScreen' : 'Fullscreen';
}
}]
_0x2c1832 = [{
'key': 'update',
'value': function() {
this.enabled, _0x3a8e2f(this.player.elements.container, this.player.config.classNames.fullscreen.enabled, this.enabled);
}
}, {
'key': 'enter',
'value': function() {
this.enabled && (_0x1339df.native ? this.prefix ? _0x1e2c68.empty(this.prefix) || this.target['' .concat(this.prefix, 'Request').concat(this.property)]() : this.target.requestFullscreen() : _0x3c983f.call(this, true));
}
}, {
'key': 'exit',
'value': function() {
if (this.enabled)
if (_0x1339df.native)
if (this.prefix) {
if (!_0x1e2c68.empty(this.prefix)) {
var _0x17edbf = 'moz' === this.prefix ? 'Cancel' : 'Exit';
document['' .concat(this.prefix).concat(_0x17edbf).concat(this.property)]();
}
} else(document.cancelFullScreen || document.exitFullscreen).call(document);
else _0x3c983f.call(this, !0x1);
}
}, {
'key': 'toggle',
'value': function() {
this.active ? this.exit() : this.enter();
}
}, {
'key': 'enabled',
'get': function() {
return _0x1339df.native;
}
}, {
'key': 'active',
'get': function() {
return !!this.enabled && (_0x1339df.native ? (this.prefix ? document['' .concat(this.prefix).concat(this.property, 'Element')] : document.fullscreenElement) === this.target : _0x350d73(this.target, this.player.config.classNames.fullscreen.fallback));
}
}, {
'key': 'target',
'get': function() {
return _0x59aa33.isEdge ? this.player.game : this.player.elements.container;
}
}]
_0x28bdca(_0x17edbf.prototype, _0x2c1832)
_0x50d347 && _0x28bdca(_0x17edbf, _0x50d347)
return _0x1339df;
}();
function _0x42b437(_0x458e02, _0x5729e1) {
if (Array.isArray(_0x458e02)) return _0x458e02;
var _0x2c1832 = [],
_0x2e7aa7 = true,
_0x393a5f = false,
_0x3b4eca = void 0x0;
try {
for (var _0x1aca09, _0x1bb8de = _0x458e02[Symbol.iterator](); !(_0x2e7aa7 = (_0x1aca09 = _0x1bb8de.next()).done) && (_0x2c1832.push(_0x1aca09.value), !_0x5729e1 || _0x2c1832.length !== _0x5729e1); _0x2e7aa7 = true);
} catch (_0x190997) {
_0x393a5f = true, _0x3b4eca = _0x190997;
} finally {
try {
_0x2e7aa7 || null == _0x1bb8de.return || _0x1bb8de.return();
} finally {
if (_0x393a5f) throw _0x3b4eca;
}
}
return _0x2c1832;
throw new TypeError('Invalid attempt to destructure non-iterable instance');
}
var _0x37093c = function() {
function _0x31e271(_0x948a97) {
! function(_0x3adedc, _0x5952e9) {
if (!(_0x3adedc instanceof _0x5952e9)) throw new TypeError('Cannot call a class as a function');
}(this, _0x31e271), this.emulator = _0x948a97, this.lastKey = null, this.focusTimer = null, this.lastKeyDown = null, this.toggleMenu = this.toggleMenu.bind(this), this.setTabFocus = this.setTabFocus.bind(this), this.firstTouch = this.firstTouch.bind(this);
}
_0x31e271.prototype = {
toggleMenu: function(_0x3156ad) {
_0x2593da.toggleMenu.call(this.emulator, _0x3156ad);
},
firstTouch: function() {
var _0x31e271 = this.emulator,
_0x17edbf = _0x31e271.elements;
_0x31e271.touch = true, _0x3a8e2f(_0x17edbf.container, _0x31e271.config.classNames.isTouch, true);
},
setTabFocus: function(_0x20bf1f) {
var _0x17edbf = this.emulator,
_0x2c1832 = _0x17edbf.elements,
_0x48d087 = _0x17edbf;
if (clearTimeout(this.focusTimer), 'keydown' !== _0x20bf1f.type || 0x9 === _0x20bf1f.which) {
'keydown' === _0x20bf1f.type && (this.lastKeyDown = _0x20bf1f.timeStamp);
var _0x27d4ad, _0x967a30 = _0x20bf1f.timeStamp - this.lastKeyDown <= 0x14;
('focus' !== _0x20bf1f.type || _0x967a30) && (_0x27d4ad = _0x48d087.config.classNames.tabFocus, _0x3a8e2f(_0x23ffa1.call(_0x48d087, '.' .concat(_0x27d4ad)), _0x27d4ad, !0x1), this.focusTimer = setTimeout(function() {
var _0x20bf1f = document.activeElement;
_0x2c1832.container.contains(_0x20bf1f) && _0x3a8e2f(document.activeElement, _0x48d087.config.classNames.tabFocus, true);
}, 0xa));
}
},
global: function() {
var _0x31e271 = !(arguments.length > 0x0 && void 0x0 !== arguments[0x0]) || arguments[0x0],
_0x17edbf = this.emulator,
_0x2c1832 = _0x17edbf;
_0x1ef215.call(_0x2c1832, document.body, 'click', this.toggleMenu, _0x31e271), _0x455c85.call(_0x2c1832, document.body, 'touchstart', this.firstTouch), _0x1ef215.call(_0x2c1832, document.body, 'keydown focus blur', this.setTabFocus, _0x31e271, !0x1, true), _0x1093f4.call(_0x2c1832, document.body, 'keyup', function(_0x4e289a) {
_0x2c1832.started && (0x71 === _0x4e289a.which && (_0x4e289a.shiftKey ? null === _0x2c1832.elements.buttons.saveState.getAttribute('hidden') && _0xbae705.call(_0x2c1832, _0x2c1832.elements.buttons.saveState, 'click') : _0xdcec2a.quickSaveState()), 0x73 === _0x4e289a.which && (_0x4e289a.shiftKey ? null === _0x2c1832.elements.buttons.loadState.getAttribute('hidden') && _0xbae705.call(_0x2c1832, _0x2c1832.elements.buttons.loadState, 'click') : _0xdcec2a.quickLoadState()), 0x78 === _0x4e289a.which && _0xbae705.call(_0x2c1832, _0x2c1832.elements.buttons.mute, 'click'));
});
},
container: function() {
var _0x31e271, _0x17edbf = this.emulator,
_0x2c1832 = _0x17edbf.elements,
_0x45d275 = _0x17edbf;
_0x1093f4.call(_0x45d275, _0x2c1832.container, 'mousemove mouseleave touchstart touchmove enterfullscreen exitfullscreen start-game', function(_0x1ac81c) {
var _0x3953b5 = _0x2c1832.controls;
_0x3953b5 && 'enterfullscreen' === _0x1ac81c.type && (_0x3953b5.pressed = !0x1, _0x3953b5.hover = !0x1);
var _0x2c3de3 = 0x0;
['touchstart', 'touchmove', 'mousemove', 'start-game'].includes(_0x1ac81c.type) && (_0x5ab74d.toggleControls.call(_0x45d275, true), _0x2c3de3 = _0x45d275.touch ? 0xbb8 : 0x7d0), clearTimeout(_0x31e271), _0x31e271 = setTimeout(function() {
return _0x5ab74d.toggleControls.call(_0x45d275, !0x1);
}, _0x2c3de3), _0x2c1832.controls.setAttribute('data-timer', _0x31e271);
}), _0x1093f4.call(_0x45d275, window, 'resize', function(_0x3e2cc5) {
var _0x17edbf = _0x45d275.elements.container.clientHeight,
_0x2c1832 = _0x23ffa1.call(_0x45d275, '.' .concat(_0x449eac({
'ejs__menu__container': true
}), ' [role="menu"]'));
Array.from(_0x2c1832).forEach(function(_0x43a16d) {
_0x43a16d.style.maxHeight = '' .concat(_0x17edbf - 0x5f, 'px'), _0x43a16d.style.overflow = 'auto';
}), _0x27f4c4.Module && _0x27f4c4.Module.canvas, _0x45d275.elements.container.clientWidth / _0x45d275.elements.container.clientHeight < 1.3 ? _0x3a8e2f(_0x45d275.elements.container, _0x449eac({
'portrait': true
}), true) : _0x3a8e2f(_0x45d275.elements.container, _0x449eac({
'portrait': true
}), !0x1);
}), _0xbae705.call(_0x45d275, window, 'resize'), _0x1093f4.call(_0x45d275, _0x45d275.elements.container, 'enterfullscreen', function(_0x586586) {
setTimeout(function() {
_0xbae705.call(_0x45d275, window, 'resize');
}, 0x12c);
}), _0x1093f4.call(_0x45d275, _0x45d275.elements.container, 'exitfullscreen', function(_0x4de2f3) {
setTimeout(function() {
_0xbae705.call(_0x45d275, window, 'resize');
}, 0x12c);
}), _0x1093f4.call(_0x45d275, _0x45d275.elements.container, 'start-game', function(_0x5b0a00) {
var _0x17edbf = window.document.createEvent('UIEvents');
_0x17edbf.initUIEvent('resize', true, !0x1, window, 0x0), window.dispatchEvent(_0x17edbf), _0x3a8e2f(_0x45d275.elements.container, _0x449eac({
'game-started': true
}), true);
}), _0x1093f4.call(_0x45d275, _0x45d275.elements.container, 'blur', function(_0x893c7a) {
var _0x17edbf = _0x893c7a.currentTarget;
setTimeout(function() {
_0x17edbf.contains(document.activeElement) || _0xbae705.call(_0x45d275, _0x45d275.elements, 'blurgame');
}, 0x0);
}), _0x1093f4.call(_0x45d275, _0x45d275.elements.container, 'focus', function(_0xe0dee3) {
var _0x17edbf = _0xe0dee3.currentTarget;
setTimeout(function() {
_0x17edbf.contains(document.activeElement) && _0xbae705.call(_0x45d275, _0x45d275.elements, 'focusgame');
}, 0x0);
});
},
media: function() {
var _0x31e271 = this.emulator,
_0x17edbf = _0x31e271.elements,
_0x2c1832 = _0x31e271;
_0x1093f4.call(_0x2c1832, _0x2c1832.game, 'volumechange', function(_0x3099fe) {
return _0x2593da.updateVolume.call(_0x2c1832, _0x3099fe);
}), _0x1093f4.call(_0x2c1832, _0x17edbf.container, 'contextmenu', function(_0x5c22bc) {
_0x2c1832.touch || _0x2c1832.lightgun || _0x2593da.toggleContextMenu.call(_0x2c1832, _0x5c22bc, true), _0x5c22bc.preventDefault();
}, !0x1), _0x1093f4.call(_0x2c1832, _0x17edbf.container, 'mousewheel', function(_0x49c974) {
_0x49c974.stopPropagation();
}, !0x1), _0x1093f4.call(_0x2c1832, _0x17edbf.container, 'mousedown', function(_0x53ee35) {
_0x2c1832.touch || _0x2593da.toggleContextMenu.call(_0x2c1832, _0x53ee35, !0x1);
}, !0x1), _0x1093f4.call(_0x2c1832, _0x2c1832.game, 'volumechange', function() {
_0x2c1832.storage.set({
'volume': _0x2c1832.volume,
'muted': _0x2c1832.muted
}), _0xdcec2a.setVolume && _0xdcec2a.setVolume();
});
var _0x38e17f = _0x2c1832.config.events.concat(['keyup', 'keydown']).join(' ');
_0x1093f4.call(_0x2c1832, _0x2c1832.game, _0x38e17f, function(_0x38e438) {
var _0x2b4804 = _0x38e438.detail,
_0x1bfeb2 = void 0x0 === _0x2b4804 ? {} : _0x2b4804;
'error' === _0x38e438.type && (_0x1bfeb2 = _0x2c1832.game.error), _0xbae705.call(_0x2c1832, _0x17edbf.container, _0x38e438.type, true, _0x1bfeb2);
});
},
proxy: function(_0x52d0c2, _0x500f90, _0x175ce5) {
var _0x4bb44e = this.emulator,
_0x584a64 = _0x4bb44e.config.listeners[_0x175ce5],
_0x5269fd = true;
_0x1e2c68.function(_0x584a64) && (_0x5269fd = _0x584a64.call(_0x4bb44e, _0x52d0c2)), _0x5269fd && _0x1e2c68.function(_0x500f90) && _0x500f90.call(_0x4bb44e, _0x52d0c2);
},
bind: function(_0x4a8d46, _0x8f91ad, _0x2affda, _0x41dfb1) {
var _0x1363b1 = this,
_0x53b9a1 = !(arguments.length > 0x4 && void 0x0 !== arguments[0x4]) || arguments[0x4],
_0x5209a5 = this.emulator,
_0x27b738 = _0x5209a5,
_0x5d89ff = _0x27b738.config.listeners[_0x41dfb1],
_0x100c9f = _0x1e2c68.function(_0x5d89ff);
_0x1093f4.call(_0x27b738, _0x4a8d46, _0x8f91ad, function(_0x5a03ac) {
return _0x1363b1.proxy(_0x5a03ac, _0x2affda, _0x41dfb1);
}, _0x53b9a1 && !_0x100c9f);
},
controls: function() {
var _0x31e271 = this,
_0x17edbf = this.emulator,
_0x2c1832 = _0x17edbf.elements,
_0x127f22 = _0x59aa33.isIE ? 'change' : 'input';
if (this.bind(_0x2c1832.buttons.mute, 'click', function() {
_0x17edbf.muted = !_0x17edbf.muted;
}, 'mute'), this.bind(_0x2c1832.buttons.fullscreen, 'click', function() {
_0x17edbf.fullscreen.toggle();
}, 'fullscreen'), this.bind(_0x2c1832.buttons.gamepad, 'click', function() {
_0x5ab74d.toggleControls.call(_0x17edbf, !0x1), _0x132da7(_0x2c1832.dialogs.gamepad, !0x1);
}, 'mute'), this.bind(_0x2c1832.buttons.saveState, 'click', function() {
_0xbae705.call(_0x17edbf, _0x17edbf.elements.container, 'savestate-start', !0x1, {});
var _0x31e271 = _0xdcec2a.saveState(),
_0x2c1832 = _0xdcec2a.getScreenData();
_0xbae705.call(_0x17edbf, _0x17edbf.elements.container, 'savestate', !0x1, {
'state': _0x31e271,
'screenshot': _0x2c1832
});
}, 'mute'), this.bind(_0x2c1832.buttons.loadState, 'click', function() {
_0xbae705.call(_0x17edbf, _0x17edbf.elements.container, 'loadstate', !0x1, {});
}, 'mute'), this.bind(_0x2c1832.buttons.settings, 'click', function(_0x1396ee) {
_0x1396ee.stopPropagation(), _0x2593da.toggleMenu.call(_0x17edbf, _0x1396ee);
}), this.bind(_0x2c1832.buttons.settings, 'keyup', function(_0x454936) {
var _0x2c1832 = _0x454936.which;
[0xd, 0x20].includes(_0x2c1832) && (0xd !== _0x2c1832 ? (_0x454936.preventDefault(), _0x454936.stopPropagation(), _0x2593da.toggleMenu.call(_0x17edbf, _0x454936)) : _0x2593da.focusFirstMenuItem.call(_0x17edbf, null, true));
}, null, !0x1), this.bind(_0x2c1832.settings.menu, 'keydown', function(_0x40072c) {
0x1b === _0x40072c.which && _0x2593da.toggleMenu.call(_0x17edbf, _0x40072c);
}), _0x59aa33.isIos) {
var _0x4bd188 = _0x23ffa1.call(_0x17edbf, 'input[type=\x22range\x22]');
Array.from(_0x4bd188).forEach(function(_0x345e4c) {
return _0x31e271.bind(_0x345e4c, _0x127f22, function(_0x58e6a9) {
return _0x2b30e0(_0x58e6a9.target);
});
});
}
_0x59aa33.isWebkit && Array.from(_0x23ffa1.call(_0x17edbf, 'input[type="range"]')).forEach(function(_0x45c503) {
_0x31e271.bind(_0x45c503, 'input', function(_0x436691) {
return _0x2593da.updateRangeFill.call(_0x17edbf, _0x436691.target);
});
}), this.bind(_0x2c1832.inputs.volume, _0x127f22, function(_0x42307e) {
_0x17edbf.volume = _0x42307e.target.value;
}, 'volume'), this.bind(_0x2c1832.controls, 'mouseenter mouseleave', function(_0x10170b) {
'mouseleave' === _0x10170b.type && null === _0x10170b.toElement ? _0x2c1832.controls.hover = true : _0x2c1832.controls.hover = !_0x17edbf.touch && 'mouseenter' === _0x10170b.type;
}), this.bind(_0x2c1832.controls, 'mousedown mouseup touchstart touchend touchcancel', function(_0x4bfb22) {
if (['mousedown', 'touchstart'].includes(_0x4bfb22.type)) {
_0x2c1832.controls.pressed = true;
var _0x17edbf = _0x2c1832.controls.getAttribute('data-timer2');
clearTimeout(_0x17edbf);
} else {
var _0x29ba04 = setTimeout(function() {
_0x2c1832.controls.pressed = !0x1;
}, 0xfa0);
_0x2c1832.controls.setAttribute('data-timer2', _0x29ba04);
}
}), this.bind(_0x2c1832.controls, 'focusin focusout', function(_0x54e607) {
var _0x466a37 = _0x17edbf.config,
_0x2ab6f3 = _0x17edbf.elements,
_0x5f0669 = 'focusin' === _0x54e607.type,
_0x11de96 = _0x2ab6f3.controls.getAttribute('data-timer');
if (_0x3a8e2f(_0x2ab6f3.controls, _0x466a37.classNames.noTransition, _0x5f0669), _0x5ab74d.toggleControls.call(_0x17edbf, _0x5f0669), _0x5f0669) {
setTimeout(function() {
_0x3a8e2f(_0x2ab6f3.controls, _0x466a37.classNames.noTransition, !0x1);
}, 0x0);
var _0x314d11 = _0x31e271.touch ? 0xbb8 : 0xfa0;
clearTimeout(_0x11de96), _0x11de96 = setTimeout(function() {
return _0x5ab74d.toggleControls.call(_0x17edbf, !0x1);
}, _0x314d11), _0x2ab6f3.controls.setAttribute('data-timer', _0x11de96);
}
}), this.bind(_0x2c1832.inputs.volume, 'wheel', function(_0x28b2d2) {
var _0x2c1832 = _0x28b2d2.webkitDirectionInvertedFromDevice,
_0x12883c = _0x42b437([_0x28b2d2.deltaX, -_0x28b2d2.deltaY].map(function(_0x1ce956) {
return _0x2c1832 ? -_0x1ce956 : _0x1ce956;
}), 0x2),
_0x247794 = _0x12883c[0x0],
_0x5dcee2 = _0x12883c[0x1],
_0x5691ae = Math.sign(Math.abs(_0x247794) > Math.abs(_0x5dcee2) ? _0x247794 : _0x5dcee2);
_0x17edbf.increaseVolume(_0x5691ae / 0x32);
var _0x47df17 = _0x17edbf.game.volume;
(0x1 === _0x5691ae && _0x47df17 < 0x1 || -0x1 === _0x5691ae && _0x47df17 > 0x0) && _0x28b2d2.preventDefault();
}, 'volume', !0x1), this.bind(_0x2c1832.controls, 'contextmenu', function(_0x1db0c5) {
_0x1db0c5.stopPropagation();
}), this.bind(_0x2c1832.contextMenu, 'contextmenu', function(_0x37851d) {
_0x37851d.stopPropagation();
});
}
}
return _0x31e271;
}();
function _0x1a3a6c(_0x5a5a15, _0x4e2d69) {
for (var _0x2c1832 = 0x0; _0x2c1832 < _0x4e2d69.length; _0x2c1832++) {
var _0x2e1c57 = _0x4e2d69[_0x2c1832];
_0x2e1c57.enumerable = _0x2e1c57.enumerable || false, _0x2e1c57.configurable = true, 'value' in _0x2e1c57 && (_0x2e1c57.writable = true), Object.defineProperty(_0x5a5a15, _0x2e1c57.key, _0x2e1c57);
}
}
var _0x3dbc76 = function() {
function _0x6954aa(_0x28cce1, _0x2ba0e6) {
//_0x2ba0e6.adUrl = 'https://www.youtube.com/embed/8vkh9UO3PnA'
var _0x5938bc = this;
if (function(_0x154660, _0x15626f) {
if (!(_0x154660 instanceof _0x15626f)) throw new TypeError('Cannot call a class as a function');
}(this, _0x6954aa),
this.version = _0x3d61f9.a,
this.system = '',
this.adUrl = null,
this.gameName = null,
this.hash = '',
this.lightgun = false,
this.mouse = false,
this.multitap = false,
this.ready = false,
this.paused = true,
this.started = !0x1,
this.touch = _0x2d904a.touch,
this.game = _0x28cce1,
_0x1e2c68.string(this.game) && (this.game = document.querySelectorAll(this.game)),
(window.jQuery && this.game instanceof jQuery || _0x1e2c68.nodeList(this.game) || _0x1e2c68.array(this.game)) && (this.game = this.game[0x0]),
this.game = this.game,
this.game.innerHTML = '',
this.config = _0x5dc0c0({}, _0x39ca5e, _0x6954aa.defaults, _0x2ba0e6 || {}),
this.lightgun = this.config.lightgun,
this.adUrl = this.config.adUrl || null,
this.gameName = this.config.gameName || null,
this.mouse = this.config.mouse,
this.multitap = this.config.multitap,
this.cheats = this.config.cheats,
this.cheats || (this.cheats = []),
this.color = this.config.color,
Object.keys(this.config.classNames).forEach(function(_0x1d6b41) {
var _0x28cce1 = _0x5938bc;
if (_0x1e2c68.object(_0x28cce1.config.classNames[_0x1d6b41])) Object.keys(_0x28cce1.config.classNames[_0x1d6b41]).forEach(function(_0x42f7f2) {
var _0x2ba0e6 = {};
_0x2ba0e6[_0x5938bc.config.classNames[_0x1d6b41][_0x42f7f2]] = true, _0x5938bc.config.classNames[_0x1d6b41][_0x42f7f2] = _0x449eac(_0x2ba0e6);
});
else {
var _0x2ba0e6 = {};
_0x2ba0e6[_0x5938bc.config.classNames[_0x1d6b41]] = true, _0x5938bc.config.classNames[_0x1d6b41] = _0x449eac(_0x2ba0e6);
}
}), this.config.selectors.controls.wrapper = '.' .concat(_0x449eac({
'ejs__controls': true
})), this.config.selectors.container = '.' .concat(_0x449eac({
'ejs': true
})), this.system = this.config.system, this.elements = {
'container': null,
'buttons': {},
'display': {},
'inputs': {},
'settings': {
'popup': null,
'menu': null,
'panels': {},
'buttons': {}
},
'dialogs': {
'gamepad': null,
'loading': null,
'netplay': null
},
'widgets': {}
}, this.fullscreen = {
'active': false
}, this.game.emulator) console.warn('Target already setup');
else {
this.config.mute = true, this.eventListeners = [], this.listeners = new _0x37093c(this), this.storage = new _0x2f61ba(this, 'ejs_settings'), this.game.emulator = this, _0x1e2c68.element(this.elements.container) || (this.elements.container = _0x428003('div'), _0x580edd(this.game, this.elements.container));
var _0x5e63f0 = _0x428003('div', {
'class': _0x449eac({
'ejs__widgets': true
})
});
this.elements.container.appendChild(_0x5e63f0);
var _0x32c8af = _0x428003('div', {
'class': _0x449eac({
'ejs__dialogs': true
})
});
this.elements.container.appendChild(_0x32c8af), _0x5ab74d.addStyleHook.call(this), _0xdcec2a.setup.call(this), _0x5ab74d.build.call(this), this.listeners.container(), this.listeners.global(), this.fullscreen = new _0x335854(this), _0x27f4c4.create.call(this);
var _0x446e06 = document.createElement('script');
_0x446e06.src = EJS_pathtodata + 'webrtc-adapter.js', document.body.appendChild(_0x446e06);
}
}
var _0x17edbf, _0x2c1832, _0x423c42;
_0x17edbf = _0x6954aa, _0x423c42 = [{
'key': 'setup',
'value': function(_0x3bb461) {
var _0x2c1832 = arguments.length > 0x1 && void 0x0 !== arguments[0x1] ? arguments[0x1] : {},
_0x3eda14 = null;
return _0x1e2c68.string(_0x3bb461) ? _0x3eda14 = Array.from(document.querySelectorAll(_0x3bb461)) : _0x1e2c68.nodeList(_0x3bb461) ? _0x3eda14 = Array.from(_0x3bb461) : _0x1e2c68.array(_0x3bb461) && (_0x3eda14 = _0x3bb461.filter(_0x1e2c68.element)), _0x1e2c68.empty(_0x3eda14) ? null : _0x3eda14.map(function(_0x176f95) {
return new _0x6954aa(_0x176f95, _0x2c1832);
});
}
}], (_0x2c1832 = [{
'key': 'restart',
'value': function() {
this.currentTime = 0x0;
}
}, {
'key': 'increaseVolume',
'value': function(_0x2881c7) {
var _0x17edbf = this.game.muted ? 0x0 : this.volume;
this.volume = _0x17edbf + (_0x1e2c68.number(_0x2881c7) ? _0x2881c7 : 0x0);
}
}, {
'key': 'decreaseVolume',
'value': function(_0x492b2e) {
this.increaseVolume(-_0x492b2e);
}
}, {
'key': 'toggleControls',
'value': function(_0x1c82b4) {
if (this.started) {
var _0x17edbf = void 0x0 === _0x1c82b4 ? void 0x0 : !_0x1c82b4,
_0x2c1832 = _0x3a8e2f(this.elements.container, this.config.classNames.hideControls, _0x17edbf);
return _0x2c1832 && _0x2593da.toggleMenu.call(this, !0x1), !_0x2c1832;
}
return !0x1;
}
}, {
'key': 'loadState',
'value': function(_0x3c6414) {
_0xdcec2a.loadState(_0x3c6414, 0x0);
}
}, {
'key': 'on',
'value': function(_0x44ca1b, _0x2e6552) {
_0x1093f4.call(this, this.elements.container, _0x44ca1b, _0x2e6552);
}
}, {
'key': 'once',
'value': function(_0x9f0e03, _0x44b98a) {
_0x455c85.call(this, this.elements.container, _0x9f0e03, _0x44b98a);
}
}, {
'key': 'off',
'value': function(_0x343615, _0x2023ff) {
_0x20109b(this.elements.container, _0x343615, _0x2023ff);
}
}, {
'key': 'playing',
'set': function() {
var _0x6954aa = !(arguments.length > 0x0 && void 0x0 !== arguments[0x0]) || arguments[0x0];
Array.from(this.elements.buttons.play || []).forEach(function(_0x4a27d3) {
_0x4a27d3.pressed = _0x6954aa;
}), this.paused = !_0x6954aa;
},
'get': function() {
return Boolean(this.ready && !this.paused);
}
}, {
'key': 'volume',
'set': function(_0x52441c) {
var _0x17edbf = _0x52441c;
_0x1e2c68.string(_0x17edbf) && (_0x17edbf = Number(_0x17edbf)), _0x1e2c68.number(_0x17edbf) || (_0x17edbf = this.storage.get('volume')), _0x1e2c68.number(_0x17edbf) || (_0x17edbf = this.config.volume), _0x17edbf > 0x1 && (_0x17edbf = 0x1), _0x17edbf < 0x0 && (_0x17edbf = 0x0), this.config.volume = _0x17edbf, this.game.volume = _0x17edbf, !_0x1e2c68.empty(_0x52441c) && this.muted && _0x17edbf > 0x0 && (this.muted = !0x1);
},
'get': function() {
return Number(this.game.volume);
}
}, {
'key': 'muted',
'set': function(_0x218306) {
var _0x17edbf = _0x218306;
_0x1e2c68.boolean(_0x17edbf) || (_0x17edbf = this.storage.get('muted')), _0x1e2c68.boolean(_0x17edbf) || (_0x17edbf = this.config.muted), this.config.muted = _0x17edbf, this.game.muted = _0x17edbf;
},
'get': function() {
return Boolean(this.game.muted);
}
}])
_0x1a3a6c(_0x17edbf.prototype, _0x2c1832)
_0x423c42 && _0x1a3a6c(_0x17edbf, _0x423c42)
return _0x6954aa;
}();
_0x3dbc76.defaults = {};
_0x17edbf.default = _0x3dbc76;
}]).default;